From 6f1573855aede4991c213e0392aca07d8484df57 Mon Sep 17 00:00:00 2001 From: loks0n <22452787+loks0n@users.noreply.github.com> Date: Tue, 1 Oct 2024 21:29:19 +0100 Subject: [PATCH 01/17] fix: multipart testing --- README.md | 4 +- .../account/create-email-password-session.md | 4 +- .../java/account/create-email-token.md | 4 +- .../java/account/create-magic-u-r-l-token.md | 6 +- .../java/account/create-o-auth2token.md | 4 +- .../java/account/create-phone-token.md | 4 +- docs/examples/java/account/create-recovery.md | 4 +- docs/examples/java/account/create-session.md | 4 +- .../java/account/create-verification.md | 2 +- docs/examples/java/account/create.md | 6 +- docs/examples/java/account/delete-identity.md | 2 +- docs/examples/java/account/delete-session.md | 2 +- docs/examples/java/account/get-session.md | 2 +- docs/examples/java/account/update-email.md | 4 +- .../account/update-magic-u-r-l-session.md | 4 +- .../java/account/update-mfa-authenticator.md | 2 +- .../java/account/update-mfa-challenge.md | 4 +- docs/examples/java/account/update-name.md | 2 +- docs/examples/java/account/update-password.md | 2 +- .../java/account/update-phone-session.md | 4 +- .../java/account/update-phone-verification.md | 4 +- docs/examples/java/account/update-phone.md | 4 +- docs/examples/java/account/update-recovery.md | 4 +- docs/examples/java/account/update-session.md | 2 +- .../java/account/update-verification.md | 4 +- docs/examples/java/avatars/get-favicon.md | 2 +- docs/examples/java/avatars/get-image.md | 2 +- docs/examples/java/avatars/get-initials.md | 2 +- docs/examples/java/avatars/get-q-r.md | 2 +- .../databases/create-boolean-attribute.md | 4 +- .../java/databases/create-collection.md | 6 +- .../databases/create-datetime-attribute.md | 4 +- .../java/databases/create-document.md | 6 +- .../java/databases/create-email-attribute.md | 6 +- .../java/databases/create-enum-attribute.md | 6 +- .../java/databases/create-float-attribute.md | 4 +- docs/examples/java/databases/create-index.md | 4 +- .../databases/create-integer-attribute.md | 4 +- .../java/databases/create-ip-attribute.md | 4 +- .../create-relationship-attribute.md | 6 +- .../java/databases/create-string-attribute.md | 6 +- .../java/databases/create-url-attribute.md | 6 +- docs/examples/java/databases/create.md | 4 +- .../java/databases/delete-attribute.md | 4 +- .../java/databases/delete-collection.md | 4 +- .../java/databases/delete-document.md | 6 +- docs/examples/java/databases/delete-index.md | 4 +- docs/examples/java/databases/delete.md | 2 +- docs/examples/java/databases/get-attribute.md | 4 +- .../examples/java/databases/get-collection.md | 4 +- docs/examples/java/databases/get-document.md | 6 +- docs/examples/java/databases/get-index.md | 4 +- docs/examples/java/databases/get.md | 2 +- .../java/databases/list-attributes.md | 4 +- .../java/databases/list-collections.md | 4 +- .../examples/java/databases/list-documents.md | 4 +- docs/examples/java/databases/list-indexes.md | 4 +- docs/examples/java/databases/list.md | 2 +- .../databases/update-boolean-attribute.md | 4 +- .../java/databases/update-collection.md | 6 +- .../databases/update-datetime-attribute.md | 4 +- .../java/databases/update-document.md | 6 +- .../java/databases/update-email-attribute.md | 6 +- .../java/databases/update-enum-attribute.md | 6 +- .../java/databases/update-float-attribute.md | 4 +- .../databases/update-integer-attribute.md | 4 +- .../java/databases/update-ip-attribute.md | 4 +- .../update-relationship-attribute.md | 4 +- .../java/databases/update-string-attribute.md | 6 +- .../java/databases/update-url-attribute.md | 6 +- docs/examples/java/databases/update.md | 4 +- docs/examples/java/functions/create-build.md | 6 +- .../java/functions/create-deployment.md | 10 +- .../java/functions/create-execution.md | 6 +- .../java/functions/create-variable.md | 6 +- docs/examples/java/functions/create.md | 24 ++-- .../java/functions/delete-deployment.md | 4 +- .../java/functions/delete-execution.md | 4 +- .../java/functions/delete-variable.md | 4 +- docs/examples/java/functions/delete.md | 2 +- .../java/functions/get-deployment-download.md | 4 +- .../examples/java/functions/get-deployment.md | 4 +- docs/examples/java/functions/get-execution.md | 4 +- docs/examples/java/functions/get-variable.md | 4 +- docs/examples/java/functions/get.md | 2 +- .../java/functions/list-deployments.md | 4 +- .../java/functions/list-executions.md | 4 +- .../examples/java/functions/list-variables.md | 2 +- docs/examples/java/functions/list.md | 2 +- .../java/functions/update-deployment-build.md | 4 +- .../java/functions/update-deployment.md | 4 +- .../java/functions/update-variable.md | 8 +- docs/examples/java/functions/update.md | 16 +-- .../java/health/get-queue-databases.md | 2 +- .../java/messaging/create-apns-provider.md | 12 +- docs/examples/java/messaging/create-email.md | 6 +- .../java/messaging/create-fcm-provider.md | 4 +- .../java/messaging/create-mailgun-provider.md | 16 +-- .../java/messaging/create-msg91provider.md | 10 +- docs/examples/java/messaging/create-push.md | 20 ++-- .../messaging/create-sendgrid-provider.md | 14 +-- docs/examples/java/messaging/create-sms.md | 4 +- .../java/messaging/create-smtp-provider.md | 20 ++-- .../java/messaging/create-subscriber.md | 6 +- .../messaging/create-telesign-provider.md | 10 +- .../messaging/create-textmagic-provider.md | 10 +- docs/examples/java/messaging/create-topic.md | 4 +- .../java/messaging/create-twilio-provider.md | 10 +- .../java/messaging/create-vonage-provider.md | 10 +- .../java/messaging/delete-provider.md | 2 +- .../java/messaging/delete-subscriber.md | 4 +- docs/examples/java/messaging/delete-topic.md | 2 +- docs/examples/java/messaging/delete.md | 2 +- docs/examples/java/messaging/get-message.md | 2 +- docs/examples/java/messaging/get-provider.md | 2 +- .../examples/java/messaging/get-subscriber.md | 4 +- docs/examples/java/messaging/get-topic.md | 2 +- .../java/messaging/list-message-logs.md | 2 +- docs/examples/java/messaging/list-messages.md | 2 +- .../java/messaging/list-provider-logs.md | 2 +- .../examples/java/messaging/list-providers.md | 2 +- .../java/messaging/list-subscriber-logs.md | 2 +- .../java/messaging/list-subscribers.md | 4 +- docs/examples/java/messaging/list-targets.md | 2 +- .../java/messaging/list-topic-logs.md | 2 +- docs/examples/java/messaging/list-topics.md | 2 +- .../java/messaging/update-apns-provider.md | 12 +- docs/examples/java/messaging/update-email.md | 6 +- .../java/messaging/update-fcm-provider.md | 4 +- .../java/messaging/update-mailgun-provider.md | 16 +-- .../java/messaging/update-msg91provider.md | 10 +- docs/examples/java/messaging/update-push.md | 18 +-- .../messaging/update-sendgrid-provider.md | 14 +-- docs/examples/java/messaging/update-sms.md | 4 +- .../java/messaging/update-smtp-provider.md | 20 ++-- .../messaging/update-telesign-provider.md | 10 +- .../messaging/update-textmagic-provider.md | 10 +- docs/examples/java/messaging/update-topic.md | 4 +- .../java/messaging/update-twilio-provider.md | 10 +- .../java/messaging/update-vonage-provider.md | 10 +- docs/examples/java/storage/create-bucket.md | 4 +- docs/examples/java/storage/create-file.md | 8 +- docs/examples/java/storage/delete-bucket.md | 2 +- docs/examples/java/storage/delete-file.md | 4 +- docs/examples/java/storage/get-bucket.md | 2 +- .../java/storage/get-file-download.md | 4 +- .../examples/java/storage/get-file-preview.md | 4 +- docs/examples/java/storage/get-file-view.md | 4 +- docs/examples/java/storage/get-file.md | 4 +- docs/examples/java/storage/list-buckets.md | 2 +- docs/examples/java/storage/list-files.md | 4 +- docs/examples/java/storage/update-bucket.md | 4 +- docs/examples/java/storage/update-file.md | 6 +- docs/examples/java/teams/create-membership.md | 12 +- docs/examples/java/teams/create.md | 4 +- docs/examples/java/teams/delete-membership.md | 4 +- docs/examples/java/teams/delete.md | 2 +- docs/examples/java/teams/get-membership.md | 4 +- docs/examples/java/teams/get-prefs.md | 2 +- docs/examples/java/teams/get.md | 2 +- docs/examples/java/teams/list-memberships.md | 4 +- docs/examples/java/teams/list.md | 2 +- .../java/teams/update-membership-status.md | 8 +- docs/examples/java/teams/update-membership.md | 4 +- docs/examples/java/teams/update-name.md | 4 +- docs/examples/java/teams/update-prefs.md | 2 +- docs/examples/java/users/create-argon2user.md | 8 +- .../examples/java/users/create-bcrypt-user.md | 8 +- docs/examples/java/users/create-j-w-t.md | 4 +- docs/examples/java/users/create-m-d5user.md | 8 +- .../java/users/create-mfa-recovery-codes.md | 2 +- .../java/users/create-p-h-pass-user.md | 8 +- docs/examples/java/users/create-s-h-a-user.md | 8 +- .../java/users/create-scrypt-modified-user.md | 14 +-- .../examples/java/users/create-scrypt-user.md | 10 +- docs/examples/java/users/create-session.md | 2 +- docs/examples/java/users/create-target.md | 10 +- docs/examples/java/users/create-token.md | 2 +- docs/examples/java/users/create.md | 8 +- docs/examples/java/users/delete-identity.md | 2 +- .../java/users/delete-mfa-authenticator.md | 2 +- docs/examples/java/users/delete-session.md | 4 +- docs/examples/java/users/delete-sessions.md | 2 +- docs/examples/java/users/delete-target.md | 4 +- docs/examples/java/users/delete.md | 2 +- .../java/users/get-mfa-recovery-codes.md | 2 +- docs/examples/java/users/get-prefs.md | 2 +- docs/examples/java/users/get-target.md | 4 +- docs/examples/java/users/get.md | 2 +- docs/examples/java/users/list-identities.md | 2 +- docs/examples/java/users/list-logs.md | 2 +- docs/examples/java/users/list-memberships.md | 2 +- docs/examples/java/users/list-mfa-factors.md | 2 +- docs/examples/java/users/list-sessions.md | 2 +- docs/examples/java/users/list-targets.md | 2 +- docs/examples/java/users/list.md | 2 +- .../java/users/update-email-verification.md | 2 +- docs/examples/java/users/update-email.md | 4 +- docs/examples/java/users/update-labels.md | 2 +- .../java/users/update-mfa-recovery-codes.md | 2 +- docs/examples/java/users/update-mfa.md | 2 +- docs/examples/java/users/update-name.md | 4 +- docs/examples/java/users/update-password.md | 2 +- .../java/users/update-phone-verification.md | 2 +- docs/examples/java/users/update-phone.md | 4 +- docs/examples/java/users/update-prefs.md | 2 +- docs/examples/java/users/update-status.md | 2 +- docs/examples/java/users/update-target.md | 10 +- .../account/create-email-password-session.md | 4 +- .../kotlin/account/create-email-token.md | 4 +- .../account/create-magic-u-r-l-token.md | 6 +- .../kotlin/account/create-o-auth2token.md | 4 +- .../kotlin/account/create-phone-token.md | 4 +- .../kotlin/account/create-recovery.md | 4 +- .../examples/kotlin/account/create-session.md | 4 +- .../kotlin/account/create-verification.md | 2 +- docs/examples/kotlin/account/create.md | 6 +- .../kotlin/account/delete-identity.md | 2 +- .../examples/kotlin/account/delete-session.md | 2 +- docs/examples/kotlin/account/get-session.md | 2 +- docs/examples/kotlin/account/update-email.md | 4 +- .../account/update-magic-u-r-l-session.md | 4 +- .../account/update-mfa-authenticator.md | 2 +- .../kotlin/account/update-mfa-challenge.md | 4 +- docs/examples/kotlin/account/update-name.md | 2 +- .../kotlin/account/update-password.md | 2 +- .../kotlin/account/update-phone-session.md | 4 +- .../account/update-phone-verification.md | 4 +- docs/examples/kotlin/account/update-phone.md | 4 +- .../kotlin/account/update-recovery.md | 4 +- .../examples/kotlin/account/update-session.md | 2 +- .../kotlin/account/update-verification.md | 4 +- docs/examples/kotlin/avatars/get-favicon.md | 2 +- docs/examples/kotlin/avatars/get-image.md | 2 +- docs/examples/kotlin/avatars/get-initials.md | 2 +- docs/examples/kotlin/avatars/get-q-r.md | 2 +- .../databases/create-boolean-attribute.md | 4 +- .../kotlin/databases/create-collection.md | 6 +- .../databases/create-datetime-attribute.md | 4 +- .../kotlin/databases/create-document.md | 6 +- .../databases/create-email-attribute.md | 6 +- .../kotlin/databases/create-enum-attribute.md | 6 +- .../databases/create-float-attribute.md | 4 +- .../examples/kotlin/databases/create-index.md | 4 +- .../databases/create-integer-attribute.md | 4 +- .../kotlin/databases/create-ip-attribute.md | 4 +- .../create-relationship-attribute.md | 8 +- .../databases/create-string-attribute.md | 6 +- .../kotlin/databases/create-url-attribute.md | 6 +- docs/examples/kotlin/databases/create.md | 4 +- .../kotlin/databases/delete-attribute.md | 4 +- .../kotlin/databases/delete-collection.md | 4 +- .../kotlin/databases/delete-document.md | 6 +- .../examples/kotlin/databases/delete-index.md | 4 +- docs/examples/kotlin/databases/delete.md | 2 +- .../kotlin/databases/get-attribute.md | 4 +- .../kotlin/databases/get-collection.md | 4 +- .../examples/kotlin/databases/get-document.md | 6 +- docs/examples/kotlin/databases/get-index.md | 4 +- docs/examples/kotlin/databases/get.md | 2 +- .../kotlin/databases/list-attributes.md | 4 +- .../kotlin/databases/list-collections.md | 4 +- .../kotlin/databases/list-documents.md | 4 +- .../examples/kotlin/databases/list-indexes.md | 4 +- docs/examples/kotlin/databases/list.md | 2 +- .../databases/update-boolean-attribute.md | 4 +- .../kotlin/databases/update-collection.md | 6 +- .../databases/update-datetime-attribute.md | 4 +- .../kotlin/databases/update-document.md | 6 +- .../databases/update-email-attribute.md | 6 +- .../kotlin/databases/update-enum-attribute.md | 6 +- .../databases/update-float-attribute.md | 4 +- .../databases/update-integer-attribute.md | 4 +- .../kotlin/databases/update-ip-attribute.md | 4 +- .../update-relationship-attribute.md | 6 +- .../databases/update-string-attribute.md | 6 +- .../kotlin/databases/update-url-attribute.md | 6 +- docs/examples/kotlin/databases/update.md | 4 +- .../examples/kotlin/functions/create-build.md | 6 +- .../kotlin/functions/create-deployment.md | 10 +- .../kotlin/functions/create-execution.md | 8 +- .../kotlin/functions/create-variable.md | 6 +- docs/examples/kotlin/functions/create.md | 24 ++-- .../kotlin/functions/delete-deployment.md | 4 +- .../kotlin/functions/delete-execution.md | 4 +- .../kotlin/functions/delete-variable.md | 4 +- docs/examples/kotlin/functions/delete.md | 2 +- .../functions/get-deployment-download.md | 4 +- .../kotlin/functions/get-deployment.md | 4 +- .../kotlin/functions/get-execution.md | 4 +- .../examples/kotlin/functions/get-variable.md | 4 +- docs/examples/kotlin/functions/get.md | 2 +- .../kotlin/functions/list-deployments.md | 4 +- .../kotlin/functions/list-executions.md | 4 +- .../kotlin/functions/list-variables.md | 2 +- docs/examples/kotlin/functions/list.md | 2 +- .../functions/update-deployment-build.md | 4 +- .../kotlin/functions/update-deployment.md | 4 +- .../kotlin/functions/update-variable.md | 8 +- docs/examples/kotlin/functions/update.md | 18 +-- .../kotlin/health/get-queue-databases.md | 2 +- .../kotlin/messaging/create-apns-provider.md | 12 +- .../examples/kotlin/messaging/create-email.md | 6 +- .../kotlin/messaging/create-fcm-provider.md | 4 +- .../messaging/create-mailgun-provider.md | 16 +-- .../kotlin/messaging/create-msg91provider.md | 10 +- docs/examples/kotlin/messaging/create-push.md | 20 ++-- .../messaging/create-sendgrid-provider.md | 14 +-- docs/examples/kotlin/messaging/create-sms.md | 4 +- .../kotlin/messaging/create-smtp-provider.md | 22 ++-- .../kotlin/messaging/create-subscriber.md | 6 +- .../messaging/create-telesign-provider.md | 10 +- .../messaging/create-textmagic-provider.md | 10 +- .../examples/kotlin/messaging/create-topic.md | 4 +- .../messaging/create-twilio-provider.md | 10 +- .../messaging/create-vonage-provider.md | 10 +- .../kotlin/messaging/delete-provider.md | 2 +- .../kotlin/messaging/delete-subscriber.md | 4 +- .../examples/kotlin/messaging/delete-topic.md | 2 +- docs/examples/kotlin/messaging/delete.md | 2 +- docs/examples/kotlin/messaging/get-message.md | 2 +- .../examples/kotlin/messaging/get-provider.md | 2 +- .../kotlin/messaging/get-subscriber.md | 4 +- docs/examples/kotlin/messaging/get-topic.md | 2 +- .../kotlin/messaging/list-message-logs.md | 2 +- .../kotlin/messaging/list-messages.md | 2 +- .../kotlin/messaging/list-provider-logs.md | 2 +- .../kotlin/messaging/list-providers.md | 2 +- .../kotlin/messaging/list-subscriber-logs.md | 2 +- .../kotlin/messaging/list-subscribers.md | 4 +- .../examples/kotlin/messaging/list-targets.md | 2 +- .../kotlin/messaging/list-topic-logs.md | 2 +- docs/examples/kotlin/messaging/list-topics.md | 2 +- .../kotlin/messaging/update-apns-provider.md | 12 +- .../examples/kotlin/messaging/update-email.md | 6 +- .../kotlin/messaging/update-fcm-provider.md | 4 +- .../messaging/update-mailgun-provider.md | 16 +-- .../kotlin/messaging/update-msg91provider.md | 10 +- docs/examples/kotlin/messaging/update-push.md | 18 +-- .../messaging/update-sendgrid-provider.md | 14 +-- docs/examples/kotlin/messaging/update-sms.md | 4 +- .../kotlin/messaging/update-smtp-provider.md | 22 ++-- .../messaging/update-telesign-provider.md | 10 +- .../messaging/update-textmagic-provider.md | 10 +- .../examples/kotlin/messaging/update-topic.md | 4 +- .../messaging/update-twilio-provider.md | 10 +- .../messaging/update-vonage-provider.md | 10 +- docs/examples/kotlin/storage/create-bucket.md | 6 +- docs/examples/kotlin/storage/create-file.md | 8 +- docs/examples/kotlin/storage/delete-bucket.md | 2 +- docs/examples/kotlin/storage/delete-file.md | 4 +- docs/examples/kotlin/storage/get-bucket.md | 2 +- .../kotlin/storage/get-file-download.md | 4 +- .../kotlin/storage/get-file-preview.md | 8 +- docs/examples/kotlin/storage/get-file-view.md | 4 +- docs/examples/kotlin/storage/get-file.md | 4 +- docs/examples/kotlin/storage/list-buckets.md | 2 +- docs/examples/kotlin/storage/list-files.md | 4 +- docs/examples/kotlin/storage/update-bucket.md | 6 +- docs/examples/kotlin/storage/update-file.md | 6 +- .../kotlin/teams/create-membership.md | 12 +- docs/examples/kotlin/teams/create.md | 4 +- .../kotlin/teams/delete-membership.md | 4 +- docs/examples/kotlin/teams/delete.md | 2 +- docs/examples/kotlin/teams/get-membership.md | 4 +- docs/examples/kotlin/teams/get-prefs.md | 2 +- docs/examples/kotlin/teams/get.md | 2 +- .../examples/kotlin/teams/list-memberships.md | 4 +- docs/examples/kotlin/teams/list.md | 2 +- .../kotlin/teams/update-membership-status.md | 8 +- .../kotlin/teams/update-membership.md | 4 +- docs/examples/kotlin/teams/update-name.md | 4 +- docs/examples/kotlin/teams/update-prefs.md | 2 +- .../kotlin/users/create-argon2user.md | 8 +- .../kotlin/users/create-bcrypt-user.md | 8 +- docs/examples/kotlin/users/create-j-w-t.md | 4 +- docs/examples/kotlin/users/create-m-d5user.md | 8 +- .../kotlin/users/create-mfa-recovery-codes.md | 2 +- .../kotlin/users/create-p-h-pass-user.md | 8 +- .../kotlin/users/create-s-h-a-user.md | 10 +- .../users/create-scrypt-modified-user.md | 14 +-- .../kotlin/users/create-scrypt-user.md | 10 +- docs/examples/kotlin/users/create-session.md | 2 +- docs/examples/kotlin/users/create-target.md | 10 +- docs/examples/kotlin/users/create-token.md | 2 +- docs/examples/kotlin/users/create.md | 8 +- docs/examples/kotlin/users/delete-identity.md | 2 +- .../kotlin/users/delete-mfa-authenticator.md | 2 +- docs/examples/kotlin/users/delete-session.md | 4 +- docs/examples/kotlin/users/delete-sessions.md | 2 +- docs/examples/kotlin/users/delete-target.md | 4 +- docs/examples/kotlin/users/delete.md | 2 +- .../kotlin/users/get-mfa-recovery-codes.md | 2 +- docs/examples/kotlin/users/get-prefs.md | 2 +- docs/examples/kotlin/users/get-target.md | 4 +- docs/examples/kotlin/users/get.md | 2 +- docs/examples/kotlin/users/list-identities.md | 2 +- docs/examples/kotlin/users/list-logs.md | 2 +- .../examples/kotlin/users/list-memberships.md | 2 +- .../examples/kotlin/users/list-mfa-factors.md | 2 +- docs/examples/kotlin/users/list-sessions.md | 2 +- docs/examples/kotlin/users/list-targets.md | 2 +- docs/examples/kotlin/users/list.md | 2 +- .../kotlin/users/update-email-verification.md | 2 +- docs/examples/kotlin/users/update-email.md | 4 +- docs/examples/kotlin/users/update-labels.md | 2 +- .../kotlin/users/update-mfa-recovery-codes.md | 2 +- docs/examples/kotlin/users/update-mfa.md | 2 +- docs/examples/kotlin/users/update-name.md | 4 +- docs/examples/kotlin/users/update-password.md | 2 +- .../kotlin/users/update-phone-verification.md | 2 +- docs/examples/kotlin/users/update-phone.md | 4 +- docs/examples/kotlin/users/update-prefs.md | 2 +- docs/examples/kotlin/users/update-status.md | 2 +- docs/examples/kotlin/users/update-target.md | 10 +- src/main/kotlin/io/appwrite/Client.kt | 54 ++++++--- src/main/kotlin/io/appwrite/enums/Runtime.kt | 6 + .../io/appwrite/extensions/TypeExtensions.kt | 101 +++++++++++++++- .../kotlin/io/appwrite/models/Execution.kt | 4 +- .../kotlin/io/appwrite/models/InputFile.kt | 37 ------ src/main/kotlin/io/appwrite/models/Payload.kt | 73 ++++++++++++ .../kotlin/io/appwrite/services/Account.kt | 110 +++++++++--------- .../kotlin/io/appwrite/services/Avatars.kt | 16 +-- .../kotlin/io/appwrite/services/Databases.kt | 86 +++++++------- .../kotlin/io/appwrite/services/Functions.kt | 58 ++++----- .../kotlin/io/appwrite/services/Graphql.kt | 6 +- .../kotlin/io/appwrite/services/Health.kt | 48 ++++---- .../kotlin/io/appwrite/services/Locale.kt | 20 ++-- .../kotlin/io/appwrite/services/Messaging.kt | 94 +++++++-------- .../kotlin/io/appwrite/services/Storage.kt | 32 ++--- src/main/kotlin/io/appwrite/services/Teams.kt | 28 ++--- src/main/kotlin/io/appwrite/services/Users.kt | 108 ++++++++--------- 432 files changed, 1568 insertions(+), 1407 deletions(-) delete mode 100644 src/main/kotlin/io/appwrite/models/InputFile.kt create mode 100644 src/main/kotlin/io/appwrite/models/Payload.kt diff --git a/README.md b/README.md index bddbe28..167ea44 100644 --- a/README.md +++ b/README.md @@ -39,7 +39,7 @@ repositories { Next, add the dependency to your project's `build.gradle(.kts)` file: ```groovy -implementation("io.appwrite:sdk-for-kotlin:6.1.0") +implementation("io.appwrite:sdk-for-kotlin:7.0.0") ``` ### Maven @@ -50,7 +50,7 @@ Add this to your project's `pom.xml` file: io.appwrite sdk-for-kotlin - 6.1.0 + 7.0.0 ``` diff --git a/docs/examples/java/account/create-email-password-session.md b/docs/examples/java/account/create-email-password-session.md index 75fa73f..a92c734 100644 --- a/docs/examples/java/account/create-email-password-session.md +++ b/docs/examples/java/account/create-email-password-session.md @@ -9,8 +9,8 @@ Client client = new Client() Account account = new Account(client); account.createEmailPasswordSession( - "email@example.com", // email - "password", // password + "{$example}", // email + "{$example}", // password new CoroutineCallback<>((result, error) -> { if (error != null) { error.printStackTrace(); diff --git a/docs/examples/java/account/create-email-token.md b/docs/examples/java/account/create-email-token.md index eff6d43..ccd6248 100644 --- a/docs/examples/java/account/create-email-token.md +++ b/docs/examples/java/account/create-email-token.md @@ -9,8 +9,8 @@ Client client = new Client() Account account = new Account(client); account.createEmailToken( - "", // userId - "email@example.com", // email + "{$example}", // userId + "{$example}", // email false, // phrase (optional) new CoroutineCallback<>((result, error) -> { if (error != null) { diff --git a/docs/examples/java/account/create-magic-u-r-l-token.md b/docs/examples/java/account/create-magic-u-r-l-token.md index 3f9bda2..87c452a 100644 --- a/docs/examples/java/account/create-magic-u-r-l-token.md +++ b/docs/examples/java/account/create-magic-u-r-l-token.md @@ -9,9 +9,9 @@ Client client = new Client() Account account = new Account(client); account.createMagicURLToken( - "", // userId - "email@example.com", // email - "https://example.com", // url (optional) + "{$example}", // userId + "{$example}", // email + "{$example}", // url (optional) false, // phrase (optional) new CoroutineCallback<>((result, error) -> { if (error != null) { diff --git a/docs/examples/java/account/create-o-auth2token.md b/docs/examples/java/account/create-o-auth2token.md index 47873c5..bbb4acb 100644 --- a/docs/examples/java/account/create-o-auth2token.md +++ b/docs/examples/java/account/create-o-auth2token.md @@ -11,8 +11,8 @@ Account account = new Account(client); account.createOAuth2Token( OAuthProvider.AMAZON, // provider - "https://example.com", // success (optional) - "https://example.com", // failure (optional) + "{$example}", // success (optional) + "{$example}", // failure (optional) listOf(), // scopes (optional) new CoroutineCallback<>((result, error) -> { if (error != null) { diff --git a/docs/examples/java/account/create-phone-token.md b/docs/examples/java/account/create-phone-token.md index 1f7c05c..7a6e575 100644 --- a/docs/examples/java/account/create-phone-token.md +++ b/docs/examples/java/account/create-phone-token.md @@ -9,8 +9,8 @@ Client client = new Client() Account account = new Account(client); account.createPhoneToken( - "", // userId - "+12065550100", // phone + "{$example}", // userId + "{$example}", // phone new CoroutineCallback<>((result, error) -> { if (error != null) { error.printStackTrace(); diff --git a/docs/examples/java/account/create-recovery.md b/docs/examples/java/account/create-recovery.md index d74106b..84cdee9 100644 --- a/docs/examples/java/account/create-recovery.md +++ b/docs/examples/java/account/create-recovery.md @@ -10,8 +10,8 @@ Client client = new Client() Account account = new Account(client); account.createRecovery( - "email@example.com", // email - "https://example.com", // url + "{$example}", // email + "{$example}", // url new CoroutineCallback<>((result, error) -> { if (error != null) { error.printStackTrace(); diff --git a/docs/examples/java/account/create-session.md b/docs/examples/java/account/create-session.md index 861af3d..5515ae8 100644 --- a/docs/examples/java/account/create-session.md +++ b/docs/examples/java/account/create-session.md @@ -9,8 +9,8 @@ Client client = new Client() Account account = new Account(client); account.createSession( - "", // userId - "", // secret + "{$example}", // userId + "{$example}", // secret new CoroutineCallback<>((result, error) -> { if (error != null) { error.printStackTrace(); diff --git a/docs/examples/java/account/create-verification.md b/docs/examples/java/account/create-verification.md index 4479cc6..9bc4e96 100644 --- a/docs/examples/java/account/create-verification.md +++ b/docs/examples/java/account/create-verification.md @@ -10,7 +10,7 @@ Client client = new Client() Account account = new Account(client); account.createVerification( - "https://example.com", // url + "{$example}", // url new CoroutineCallback<>((result, error) -> { if (error != null) { error.printStackTrace(); diff --git a/docs/examples/java/account/create.md b/docs/examples/java/account/create.md index 3bcfe1d..f59cfc3 100644 --- a/docs/examples/java/account/create.md +++ b/docs/examples/java/account/create.md @@ -9,10 +9,10 @@ Client client = new Client() Account account = new Account(client); account.create( - "", // userId - "email@example.com", // email + "{$example}", // userId + "{$example}", // email "", // password - "", // name (optional) + "{$example}", // name (optional) new CoroutineCallback<>((result, error) -> { if (error != null) { error.printStackTrace(); diff --git a/docs/examples/java/account/delete-identity.md b/docs/examples/java/account/delete-identity.md index 5eec242..3e07f12 100644 --- a/docs/examples/java/account/delete-identity.md +++ b/docs/examples/java/account/delete-identity.md @@ -10,7 +10,7 @@ Client client = new Client() Account account = new Account(client); account.deleteIdentity( - "", // identityId + "{$example}", // identityId new CoroutineCallback<>((result, error) -> { if (error != null) { error.printStackTrace(); diff --git a/docs/examples/java/account/delete-session.md b/docs/examples/java/account/delete-session.md index 687df81..70f3f7e 100644 --- a/docs/examples/java/account/delete-session.md +++ b/docs/examples/java/account/delete-session.md @@ -10,7 +10,7 @@ Client client = new Client() Account account = new Account(client); account.deleteSession( - "", // sessionId + "{$example}", // sessionId new CoroutineCallback<>((result, error) -> { if (error != null) { error.printStackTrace(); diff --git a/docs/examples/java/account/get-session.md b/docs/examples/java/account/get-session.md index 6d07a85..75fd7e8 100644 --- a/docs/examples/java/account/get-session.md +++ b/docs/examples/java/account/get-session.md @@ -10,7 +10,7 @@ Client client = new Client() Account account = new Account(client); account.getSession( - "", // sessionId + "{$example}", // sessionId new CoroutineCallback<>((result, error) -> { if (error != null) { error.printStackTrace(); diff --git a/docs/examples/java/account/update-email.md b/docs/examples/java/account/update-email.md index 391e531..f488c35 100644 --- a/docs/examples/java/account/update-email.md +++ b/docs/examples/java/account/update-email.md @@ -10,8 +10,8 @@ Client client = new Client() Account account = new Account(client); account.updateEmail( - "email@example.com", // email - "password", // password + "{$example}", // email + "{$example}", // password new CoroutineCallback<>((result, error) -> { if (error != null) { error.printStackTrace(); diff --git a/docs/examples/java/account/update-magic-u-r-l-session.md b/docs/examples/java/account/update-magic-u-r-l-session.md index 62fe856..4a7eda5 100644 --- a/docs/examples/java/account/update-magic-u-r-l-session.md +++ b/docs/examples/java/account/update-magic-u-r-l-session.md @@ -9,8 +9,8 @@ Client client = new Client() Account account = new Account(client); account.updateMagicURLSession( - "", // userId - "", // secret + "{$example}", // userId + "{$example}", // secret new CoroutineCallback<>((result, error) -> { if (error != null) { error.printStackTrace(); diff --git a/docs/examples/java/account/update-mfa-authenticator.md b/docs/examples/java/account/update-mfa-authenticator.md index b492d8c..b9fea57 100644 --- a/docs/examples/java/account/update-mfa-authenticator.md +++ b/docs/examples/java/account/update-mfa-authenticator.md @@ -12,7 +12,7 @@ Account account = new Account(client); account.updateMfaAuthenticator( AuthenticatorType.TOTP, // type - "", // otp + "{$example}", // otp new CoroutineCallback<>((result, error) -> { if (error != null) { error.printStackTrace(); diff --git a/docs/examples/java/account/update-mfa-challenge.md b/docs/examples/java/account/update-mfa-challenge.md index 74ca481..e3450df 100644 --- a/docs/examples/java/account/update-mfa-challenge.md +++ b/docs/examples/java/account/update-mfa-challenge.md @@ -10,8 +10,8 @@ Client client = new Client() Account account = new Account(client); account.updateMfaChallenge( - "", // challengeId - "", // otp + "{$example}", // challengeId + "{$example}", // otp new CoroutineCallback<>((result, error) -> { if (error != null) { error.printStackTrace(); diff --git a/docs/examples/java/account/update-name.md b/docs/examples/java/account/update-name.md index 1ce2abf..8c8f840 100644 --- a/docs/examples/java/account/update-name.md +++ b/docs/examples/java/account/update-name.md @@ -10,7 +10,7 @@ Client client = new Client() Account account = new Account(client); account.updateName( - "", // name + "{$example}", // name new CoroutineCallback<>((result, error) -> { if (error != null) { error.printStackTrace(); diff --git a/docs/examples/java/account/update-password.md b/docs/examples/java/account/update-password.md index 437e825..276197a 100644 --- a/docs/examples/java/account/update-password.md +++ b/docs/examples/java/account/update-password.md @@ -11,7 +11,7 @@ Account account = new Account(client); account.updatePassword( "", // password - "password", // oldPassword (optional) + "{$example}", // oldPassword (optional) new CoroutineCallback<>((result, error) -> { if (error != null) { error.printStackTrace(); diff --git a/docs/examples/java/account/update-phone-session.md b/docs/examples/java/account/update-phone-session.md index c401de4..d3e25d4 100644 --- a/docs/examples/java/account/update-phone-session.md +++ b/docs/examples/java/account/update-phone-session.md @@ -9,8 +9,8 @@ Client client = new Client() Account account = new Account(client); account.updatePhoneSession( - "", // userId - "", // secret + "{$example}", // userId + "{$example}", // secret new CoroutineCallback<>((result, error) -> { if (error != null) { error.printStackTrace(); diff --git a/docs/examples/java/account/update-phone-verification.md b/docs/examples/java/account/update-phone-verification.md index ddf786a..1153d5b 100644 --- a/docs/examples/java/account/update-phone-verification.md +++ b/docs/examples/java/account/update-phone-verification.md @@ -10,8 +10,8 @@ Client client = new Client() Account account = new Account(client); account.updatePhoneVerification( - "", // userId - "", // secret + "{$example}", // userId + "{$example}", // secret new CoroutineCallback<>((result, error) -> { if (error != null) { error.printStackTrace(); diff --git a/docs/examples/java/account/update-phone.md b/docs/examples/java/account/update-phone.md index 6a47fd1..4c09029 100644 --- a/docs/examples/java/account/update-phone.md +++ b/docs/examples/java/account/update-phone.md @@ -10,8 +10,8 @@ Client client = new Client() Account account = new Account(client); account.updatePhone( - "+12065550100", // phone - "password", // password + "{$example}", // phone + "{$example}", // password new CoroutineCallback<>((result, error) -> { if (error != null) { error.printStackTrace(); diff --git a/docs/examples/java/account/update-recovery.md b/docs/examples/java/account/update-recovery.md index be4301c..bb4e215 100644 --- a/docs/examples/java/account/update-recovery.md +++ b/docs/examples/java/account/update-recovery.md @@ -10,8 +10,8 @@ Client client = new Client() Account account = new Account(client); account.updateRecovery( - "", // userId - "", // secret + "{$example}", // userId + "{$example}", // secret "", // password new CoroutineCallback<>((result, error) -> { if (error != null) { diff --git a/docs/examples/java/account/update-session.md b/docs/examples/java/account/update-session.md index 96e3506..57c3959 100644 --- a/docs/examples/java/account/update-session.md +++ b/docs/examples/java/account/update-session.md @@ -10,7 +10,7 @@ Client client = new Client() Account account = new Account(client); account.updateSession( - "", // sessionId + "{$example}", // sessionId new CoroutineCallback<>((result, error) -> { if (error != null) { error.printStackTrace(); diff --git a/docs/examples/java/account/update-verification.md b/docs/examples/java/account/update-verification.md index ed8a40b..4f2622a 100644 --- a/docs/examples/java/account/update-verification.md +++ b/docs/examples/java/account/update-verification.md @@ -10,8 +10,8 @@ Client client = new Client() Account account = new Account(client); account.updateVerification( - "", // userId - "", // secret + "{$example}", // userId + "{$example}", // secret new CoroutineCallback<>((result, error) -> { if (error != null) { error.printStackTrace(); diff --git a/docs/examples/java/avatars/get-favicon.md b/docs/examples/java/avatars/get-favicon.md index 9f51941..7c24d5e 100644 --- a/docs/examples/java/avatars/get-favicon.md +++ b/docs/examples/java/avatars/get-favicon.md @@ -10,7 +10,7 @@ Client client = new Client() Avatars avatars = new Avatars(client); avatars.getFavicon( - "https://example.com", // url + "{$example}", // url new CoroutineCallback<>((result, error) -> { if (error != null) { error.printStackTrace(); diff --git a/docs/examples/java/avatars/get-image.md b/docs/examples/java/avatars/get-image.md index af5f217..1a93164 100644 --- a/docs/examples/java/avatars/get-image.md +++ b/docs/examples/java/avatars/get-image.md @@ -10,7 +10,7 @@ Client client = new Client() Avatars avatars = new Avatars(client); avatars.getImage( - "https://example.com", // url + "{$example}", // url 0, // width (optional) 0, // height (optional) new CoroutineCallback<>((result, error) -> { diff --git a/docs/examples/java/avatars/get-initials.md b/docs/examples/java/avatars/get-initials.md index 4b00f73..7277e39 100644 --- a/docs/examples/java/avatars/get-initials.md +++ b/docs/examples/java/avatars/get-initials.md @@ -10,7 +10,7 @@ Client client = new Client() Avatars avatars = new Avatars(client); avatars.getInitials( - "", // name (optional) + "{$example}", // name (optional) 0, // width (optional) 0, // height (optional) "", // background (optional) diff --git a/docs/examples/java/avatars/get-q-r.md b/docs/examples/java/avatars/get-q-r.md index 903e2b0..243e245 100644 --- a/docs/examples/java/avatars/get-q-r.md +++ b/docs/examples/java/avatars/get-q-r.md @@ -10,7 +10,7 @@ Client client = new Client() Avatars avatars = new Avatars(client); avatars.getQR( - "", // text + "{$example}", // text 1, // size (optional) 0, // margin (optional) false, // download (optional) diff --git a/docs/examples/java/databases/create-boolean-attribute.md b/docs/examples/java/databases/create-boolean-attribute.md index d959a65..0c6f55d 100644 --- a/docs/examples/java/databases/create-boolean-attribute.md +++ b/docs/examples/java/databases/create-boolean-attribute.md @@ -10,8 +10,8 @@ Client client = new Client() Databases databases = new Databases(client); databases.createBooleanAttribute( - "", // databaseId - "", // collectionId + "{$example}", // databaseId + "{$example}", // collectionId "", // key false, // required false, // default (optional) diff --git a/docs/examples/java/databases/create-collection.md b/docs/examples/java/databases/create-collection.md index 9a17b26..229c800 100644 --- a/docs/examples/java/databases/create-collection.md +++ b/docs/examples/java/databases/create-collection.md @@ -10,9 +10,9 @@ Client client = new Client() Databases databases = new Databases(client); databases.createCollection( - "", // databaseId - "", // collectionId - "", // name + "{$example}", // databaseId + "{$example}", // collectionId + "{$example}", // name listOf("read("any")"), // permissions (optional) false, // documentSecurity (optional) false, // enabled (optional) diff --git a/docs/examples/java/databases/create-datetime-attribute.md b/docs/examples/java/databases/create-datetime-attribute.md index b35d489..ecb68a2 100644 --- a/docs/examples/java/databases/create-datetime-attribute.md +++ b/docs/examples/java/databases/create-datetime-attribute.md @@ -10,8 +10,8 @@ Client client = new Client() Databases databases = new Databases(client); databases.createDatetimeAttribute( - "", // databaseId - "", // collectionId + "{$example}", // databaseId + "{$example}", // collectionId "", // key false, // required "", // default (optional) diff --git a/docs/examples/java/databases/create-document.md b/docs/examples/java/databases/create-document.md index e05d1fe..ebca7a4 100644 --- a/docs/examples/java/databases/create-document.md +++ b/docs/examples/java/databases/create-document.md @@ -10,9 +10,9 @@ Client client = new Client() Databases databases = new Databases(client); databases.createDocument( - "", // databaseId - "", // collectionId - "", // documentId + "{$example}", // databaseId + "{$example}", // collectionId + "{$example}", // documentId mapOf( "a" to "b" ), // data listOf("read("any")"), // permissions (optional) new CoroutineCallback<>((result, error) -> { diff --git a/docs/examples/java/databases/create-email-attribute.md b/docs/examples/java/databases/create-email-attribute.md index 5a42e97..4a032ca 100644 --- a/docs/examples/java/databases/create-email-attribute.md +++ b/docs/examples/java/databases/create-email-attribute.md @@ -10,11 +10,11 @@ Client client = new Client() Databases databases = new Databases(client); databases.createEmailAttribute( - "", // databaseId - "", // collectionId + "{$example}", // databaseId + "{$example}", // collectionId "", // key false, // required - "email@example.com", // default (optional) + "{$example}", // default (optional) false, // array (optional) new CoroutineCallback<>((result, error) -> { if (error != null) { diff --git a/docs/examples/java/databases/create-enum-attribute.md b/docs/examples/java/databases/create-enum-attribute.md index 59cbd46..eb817f3 100644 --- a/docs/examples/java/databases/create-enum-attribute.md +++ b/docs/examples/java/databases/create-enum-attribute.md @@ -10,12 +10,12 @@ Client client = new Client() Databases databases = new Databases(client); databases.createEnumAttribute( - "", // databaseId - "", // collectionId + "{$example}", // databaseId + "{$example}", // collectionId "", // key listOf(), // elements false, // required - "", // default (optional) + "{$example}", // default (optional) false, // array (optional) new CoroutineCallback<>((result, error) -> { if (error != null) { diff --git a/docs/examples/java/databases/create-float-attribute.md b/docs/examples/java/databases/create-float-attribute.md index cdbdbb2..092b17f 100644 --- a/docs/examples/java/databases/create-float-attribute.md +++ b/docs/examples/java/databases/create-float-attribute.md @@ -10,8 +10,8 @@ Client client = new Client() Databases databases = new Databases(client); databases.createFloatAttribute( - "", // databaseId - "", // collectionId + "{$example}", // databaseId + "{$example}", // collectionId "", // key false, // required 0, // min (optional) diff --git a/docs/examples/java/databases/create-index.md b/docs/examples/java/databases/create-index.md index a3f09d4..56f2303 100644 --- a/docs/examples/java/databases/create-index.md +++ b/docs/examples/java/databases/create-index.md @@ -11,8 +11,8 @@ Client client = new Client() Databases databases = new Databases(client); databases.createIndex( - "", // databaseId - "", // collectionId + "{$example}", // databaseId + "{$example}", // collectionId "", // key IndexType.KEY, // type listOf(), // attributes diff --git a/docs/examples/java/databases/create-integer-attribute.md b/docs/examples/java/databases/create-integer-attribute.md index 37e7f37..0acd2ae 100644 --- a/docs/examples/java/databases/create-integer-attribute.md +++ b/docs/examples/java/databases/create-integer-attribute.md @@ -10,8 +10,8 @@ Client client = new Client() Databases databases = new Databases(client); databases.createIntegerAttribute( - "", // databaseId - "", // collectionId + "{$example}", // databaseId + "{$example}", // collectionId "", // key false, // required 0, // min (optional) diff --git a/docs/examples/java/databases/create-ip-attribute.md b/docs/examples/java/databases/create-ip-attribute.md index bdb0093..9630869 100644 --- a/docs/examples/java/databases/create-ip-attribute.md +++ b/docs/examples/java/databases/create-ip-attribute.md @@ -10,8 +10,8 @@ Client client = new Client() Databases databases = new Databases(client); databases.createIpAttribute( - "", // databaseId - "", // collectionId + "{$example}", // databaseId + "{$example}", // collectionId "", // key false, // required "", // default (optional) diff --git a/docs/examples/java/databases/create-relationship-attribute.md b/docs/examples/java/databases/create-relationship-attribute.md index f3d0f51..36af499 100644 --- a/docs/examples/java/databases/create-relationship-attribute.md +++ b/docs/examples/java/databases/create-relationship-attribute.md @@ -11,9 +11,9 @@ Client client = new Client() Databases databases = new Databases(client); databases.createRelationshipAttribute( - "", // databaseId - "", // collectionId - "", // relatedCollectionId + "{$example}", // databaseId + "{$example}", // collectionId + "{$example}", // relatedCollectionId RelationshipType.ONETOONE, // type false, // twoWay (optional) "", // key (optional) diff --git a/docs/examples/java/databases/create-string-attribute.md b/docs/examples/java/databases/create-string-attribute.md index 7d9d8d4..c4ebac3 100644 --- a/docs/examples/java/databases/create-string-attribute.md +++ b/docs/examples/java/databases/create-string-attribute.md @@ -10,12 +10,12 @@ Client client = new Client() Databases databases = new Databases(client); databases.createStringAttribute( - "", // databaseId - "", // collectionId + "{$example}", // databaseId + "{$example}", // collectionId "", // key 1, // size false, // required - "", // default (optional) + "{$example}", // default (optional) false, // array (optional) false, // encrypt (optional) new CoroutineCallback<>((result, error) -> { diff --git a/docs/examples/java/databases/create-url-attribute.md b/docs/examples/java/databases/create-url-attribute.md index 57ed89d..5abebbd 100644 --- a/docs/examples/java/databases/create-url-attribute.md +++ b/docs/examples/java/databases/create-url-attribute.md @@ -10,11 +10,11 @@ Client client = new Client() Databases databases = new Databases(client); databases.createUrlAttribute( - "", // databaseId - "", // collectionId + "{$example}", // databaseId + "{$example}", // collectionId "", // key false, // required - "https://example.com", // default (optional) + "{$example}", // default (optional) false, // array (optional) new CoroutineCallback<>((result, error) -> { if (error != null) { diff --git a/docs/examples/java/databases/create.md b/docs/examples/java/databases/create.md index 5b66510..315f3c5 100644 --- a/docs/examples/java/databases/create.md +++ b/docs/examples/java/databases/create.md @@ -10,8 +10,8 @@ Client client = new Client() Databases databases = new Databases(client); databases.create( - "", // databaseId - "", // name + "{$example}", // databaseId + "{$example}", // name false, // enabled (optional) new CoroutineCallback<>((result, error) -> { if (error != null) { diff --git a/docs/examples/java/databases/delete-attribute.md b/docs/examples/java/databases/delete-attribute.md index 8f9d2f0..cd2b500 100644 --- a/docs/examples/java/databases/delete-attribute.md +++ b/docs/examples/java/databases/delete-attribute.md @@ -10,8 +10,8 @@ Client client = new Client() Databases databases = new Databases(client); databases.deleteAttribute( - "", // databaseId - "", // collectionId + "{$example}", // databaseId + "{$example}", // collectionId "", // key new CoroutineCallback<>((result, error) -> { if (error != null) { diff --git a/docs/examples/java/databases/delete-collection.md b/docs/examples/java/databases/delete-collection.md index 334e7ad..92cf3b1 100644 --- a/docs/examples/java/databases/delete-collection.md +++ b/docs/examples/java/databases/delete-collection.md @@ -10,8 +10,8 @@ Client client = new Client() Databases databases = new Databases(client); databases.deleteCollection( - "", // databaseId - "", // collectionId + "{$example}", // databaseId + "{$example}", // collectionId new CoroutineCallback<>((result, error) -> { if (error != null) { error.printStackTrace(); diff --git a/docs/examples/java/databases/delete-document.md b/docs/examples/java/databases/delete-document.md index a42b3f1..0f8f0c0 100644 --- a/docs/examples/java/databases/delete-document.md +++ b/docs/examples/java/databases/delete-document.md @@ -10,9 +10,9 @@ Client client = new Client() Databases databases = new Databases(client); databases.deleteDocument( - "", // databaseId - "", // collectionId - "", // documentId + "{$example}", // databaseId + "{$example}", // collectionId + "{$example}", // documentId new CoroutineCallback<>((result, error) -> { if (error != null) { error.printStackTrace(); diff --git a/docs/examples/java/databases/delete-index.md b/docs/examples/java/databases/delete-index.md index 725045e..d6f67f0 100644 --- a/docs/examples/java/databases/delete-index.md +++ b/docs/examples/java/databases/delete-index.md @@ -10,8 +10,8 @@ Client client = new Client() Databases databases = new Databases(client); databases.deleteIndex( - "", // databaseId - "", // collectionId + "{$example}", // databaseId + "{$example}", // collectionId "", // key new CoroutineCallback<>((result, error) -> { if (error != null) { diff --git a/docs/examples/java/databases/delete.md b/docs/examples/java/databases/delete.md index 41fb72b..2cbcebf 100644 --- a/docs/examples/java/databases/delete.md +++ b/docs/examples/java/databases/delete.md @@ -10,7 +10,7 @@ Client client = new Client() Databases databases = new Databases(client); databases.delete( - "", // databaseId + "{$example}", // databaseId new CoroutineCallback<>((result, error) -> { if (error != null) { error.printStackTrace(); diff --git a/docs/examples/java/databases/get-attribute.md b/docs/examples/java/databases/get-attribute.md index 1b29312..c91cca8 100644 --- a/docs/examples/java/databases/get-attribute.md +++ b/docs/examples/java/databases/get-attribute.md @@ -10,8 +10,8 @@ Client client = new Client() Databases databases = new Databases(client); databases.getAttribute( - "", // databaseId - "", // collectionId + "{$example}", // databaseId + "{$example}", // collectionId "", // key new CoroutineCallback<>((result, error) -> { if (error != null) { diff --git a/docs/examples/java/databases/get-collection.md b/docs/examples/java/databases/get-collection.md index 41bbb23..bb52d3e 100644 --- a/docs/examples/java/databases/get-collection.md +++ b/docs/examples/java/databases/get-collection.md @@ -10,8 +10,8 @@ Client client = new Client() Databases databases = new Databases(client); databases.getCollection( - "", // databaseId - "", // collectionId + "{$example}", // databaseId + "{$example}", // collectionId new CoroutineCallback<>((result, error) -> { if (error != null) { error.printStackTrace(); diff --git a/docs/examples/java/databases/get-document.md b/docs/examples/java/databases/get-document.md index 870642b..5b87c93 100644 --- a/docs/examples/java/databases/get-document.md +++ b/docs/examples/java/databases/get-document.md @@ -10,9 +10,9 @@ Client client = new Client() Databases databases = new Databases(client); databases.getDocument( - "", // databaseId - "", // collectionId - "", // documentId + "{$example}", // databaseId + "{$example}", // collectionId + "{$example}", // documentId listOf(), // queries (optional) new CoroutineCallback<>((result, error) -> { if (error != null) { diff --git a/docs/examples/java/databases/get-index.md b/docs/examples/java/databases/get-index.md index eb33b87..dddec5d 100644 --- a/docs/examples/java/databases/get-index.md +++ b/docs/examples/java/databases/get-index.md @@ -10,8 +10,8 @@ Client client = new Client() Databases databases = new Databases(client); databases.getIndex( - "", // databaseId - "", // collectionId + "{$example}", // databaseId + "{$example}", // collectionId "", // key new CoroutineCallback<>((result, error) -> { if (error != null) { diff --git a/docs/examples/java/databases/get.md b/docs/examples/java/databases/get.md index b276da4..056578d 100644 --- a/docs/examples/java/databases/get.md +++ b/docs/examples/java/databases/get.md @@ -10,7 +10,7 @@ Client client = new Client() Databases databases = new Databases(client); databases.get( - "", // databaseId + "{$example}", // databaseId new CoroutineCallback<>((result, error) -> { if (error != null) { error.printStackTrace(); diff --git a/docs/examples/java/databases/list-attributes.md b/docs/examples/java/databases/list-attributes.md index 417fe6e..c34b39c 100644 --- a/docs/examples/java/databases/list-attributes.md +++ b/docs/examples/java/databases/list-attributes.md @@ -10,8 +10,8 @@ Client client = new Client() Databases databases = new Databases(client); databases.listAttributes( - "", // databaseId - "", // collectionId + "{$example}", // databaseId + "{$example}", // collectionId listOf(), // queries (optional) new CoroutineCallback<>((result, error) -> { if (error != null) { diff --git a/docs/examples/java/databases/list-collections.md b/docs/examples/java/databases/list-collections.md index e12e158..b512141 100644 --- a/docs/examples/java/databases/list-collections.md +++ b/docs/examples/java/databases/list-collections.md @@ -10,9 +10,9 @@ Client client = new Client() Databases databases = new Databases(client); databases.listCollections( - "", // databaseId + "{$example}", // databaseId listOf(), // queries (optional) - "", // search (optional) + "{$example}", // search (optional) new CoroutineCallback<>((result, error) -> { if (error != null) { error.printStackTrace(); diff --git a/docs/examples/java/databases/list-documents.md b/docs/examples/java/databases/list-documents.md index 4fab62a..f7ae7a7 100644 --- a/docs/examples/java/databases/list-documents.md +++ b/docs/examples/java/databases/list-documents.md @@ -10,8 +10,8 @@ Client client = new Client() Databases databases = new Databases(client); databases.listDocuments( - "", // databaseId - "", // collectionId + "{$example}", // databaseId + "{$example}", // collectionId listOf(), // queries (optional) new CoroutineCallback<>((result, error) -> { if (error != null) { diff --git a/docs/examples/java/databases/list-indexes.md b/docs/examples/java/databases/list-indexes.md index c266265..76671b6 100644 --- a/docs/examples/java/databases/list-indexes.md +++ b/docs/examples/java/databases/list-indexes.md @@ -10,8 +10,8 @@ Client client = new Client() Databases databases = new Databases(client); databases.listIndexes( - "", // databaseId - "", // collectionId + "{$example}", // databaseId + "{$example}", // collectionId listOf(), // queries (optional) new CoroutineCallback<>((result, error) -> { if (error != null) { diff --git a/docs/examples/java/databases/list.md b/docs/examples/java/databases/list.md index d014a70..46eaa39 100644 --- a/docs/examples/java/databases/list.md +++ b/docs/examples/java/databases/list.md @@ -11,7 +11,7 @@ Databases databases = new Databases(client); databases.list( listOf(), // queries (optional) - "", // search (optional) + "{$example}", // search (optional) new CoroutineCallback<>((result, error) -> { if (error != null) { error.printStackTrace(); diff --git a/docs/examples/java/databases/update-boolean-attribute.md b/docs/examples/java/databases/update-boolean-attribute.md index 01a8ba1..f1075ef 100644 --- a/docs/examples/java/databases/update-boolean-attribute.md +++ b/docs/examples/java/databases/update-boolean-attribute.md @@ -10,8 +10,8 @@ Client client = new Client() Databases databases = new Databases(client); databases.updateBooleanAttribute( - "", // databaseId - "", // collectionId + "{$example}", // databaseId + "{$example}", // collectionId "", // key false, // required false, // default diff --git a/docs/examples/java/databases/update-collection.md b/docs/examples/java/databases/update-collection.md index 533d7a7..e54b6f4 100644 --- a/docs/examples/java/databases/update-collection.md +++ b/docs/examples/java/databases/update-collection.md @@ -10,9 +10,9 @@ Client client = new Client() Databases databases = new Databases(client); databases.updateCollection( - "", // databaseId - "", // collectionId - "", // name + "{$example}", // databaseId + "{$example}", // collectionId + "{$example}", // name listOf("read("any")"), // permissions (optional) false, // documentSecurity (optional) false, // enabled (optional) diff --git a/docs/examples/java/databases/update-datetime-attribute.md b/docs/examples/java/databases/update-datetime-attribute.md index 00b3568..1746313 100644 --- a/docs/examples/java/databases/update-datetime-attribute.md +++ b/docs/examples/java/databases/update-datetime-attribute.md @@ -10,8 +10,8 @@ Client client = new Client() Databases databases = new Databases(client); databases.updateDatetimeAttribute( - "", // databaseId - "", // collectionId + "{$example}", // databaseId + "{$example}", // collectionId "", // key false, // required "", // default diff --git a/docs/examples/java/databases/update-document.md b/docs/examples/java/databases/update-document.md index 43c9600..4ec5d61 100644 --- a/docs/examples/java/databases/update-document.md +++ b/docs/examples/java/databases/update-document.md @@ -10,9 +10,9 @@ Client client = new Client() Databases databases = new Databases(client); databases.updateDocument( - "", // databaseId - "", // collectionId - "", // documentId + "{$example}", // databaseId + "{$example}", // collectionId + "{$example}", // documentId mapOf( "a" to "b" ), // data (optional) listOf("read("any")"), // permissions (optional) new CoroutineCallback<>((result, error) -> { diff --git a/docs/examples/java/databases/update-email-attribute.md b/docs/examples/java/databases/update-email-attribute.md index b931370..9798d5f 100644 --- a/docs/examples/java/databases/update-email-attribute.md +++ b/docs/examples/java/databases/update-email-attribute.md @@ -10,11 +10,11 @@ Client client = new Client() Databases databases = new Databases(client); databases.updateEmailAttribute( - "", // databaseId - "", // collectionId + "{$example}", // databaseId + "{$example}", // collectionId "", // key false, // required - "email@example.com", // default + "{$example}", // default "", // newKey (optional) new CoroutineCallback<>((result, error) -> { if (error != null) { diff --git a/docs/examples/java/databases/update-enum-attribute.md b/docs/examples/java/databases/update-enum-attribute.md index febf784..29b44a1 100644 --- a/docs/examples/java/databases/update-enum-attribute.md +++ b/docs/examples/java/databases/update-enum-attribute.md @@ -10,12 +10,12 @@ Client client = new Client() Databases databases = new Databases(client); databases.updateEnumAttribute( - "", // databaseId - "", // collectionId + "{$example}", // databaseId + "{$example}", // collectionId "", // key listOf(), // elements false, // required - "", // default + "{$example}", // default "", // newKey (optional) new CoroutineCallback<>((result, error) -> { if (error != null) { diff --git a/docs/examples/java/databases/update-float-attribute.md b/docs/examples/java/databases/update-float-attribute.md index 071bd48..ae9800b 100644 --- a/docs/examples/java/databases/update-float-attribute.md +++ b/docs/examples/java/databases/update-float-attribute.md @@ -10,8 +10,8 @@ Client client = new Client() Databases databases = new Databases(client); databases.updateFloatAttribute( - "", // databaseId - "", // collectionId + "{$example}", // databaseId + "{$example}", // collectionId "", // key false, // required 0, // min diff --git a/docs/examples/java/databases/update-integer-attribute.md b/docs/examples/java/databases/update-integer-attribute.md index b6c1e44..5b8cf85 100644 --- a/docs/examples/java/databases/update-integer-attribute.md +++ b/docs/examples/java/databases/update-integer-attribute.md @@ -10,8 +10,8 @@ Client client = new Client() Databases databases = new Databases(client); databases.updateIntegerAttribute( - "", // databaseId - "", // collectionId + "{$example}", // databaseId + "{$example}", // collectionId "", // key false, // required 0, // min diff --git a/docs/examples/java/databases/update-ip-attribute.md b/docs/examples/java/databases/update-ip-attribute.md index 72b85cf..412d5e7 100644 --- a/docs/examples/java/databases/update-ip-attribute.md +++ b/docs/examples/java/databases/update-ip-attribute.md @@ -10,8 +10,8 @@ Client client = new Client() Databases databases = new Databases(client); databases.updateIpAttribute( - "", // databaseId - "", // collectionId + "{$example}", // databaseId + "{$example}", // collectionId "", // key false, // required "", // default diff --git a/docs/examples/java/databases/update-relationship-attribute.md b/docs/examples/java/databases/update-relationship-attribute.md index 73e2121..ab5cc05 100644 --- a/docs/examples/java/databases/update-relationship-attribute.md +++ b/docs/examples/java/databases/update-relationship-attribute.md @@ -10,8 +10,8 @@ Client client = new Client() Databases databases = new Databases(client); databases.updateRelationshipAttribute( - "", // databaseId - "", // collectionId + "{$example}", // databaseId + "{$example}", // collectionId "", // key RelationMutate.CASCADE, // onDelete (optional) "", // newKey (optional) diff --git a/docs/examples/java/databases/update-string-attribute.md b/docs/examples/java/databases/update-string-attribute.md index 75be9e0..fa02a2b 100644 --- a/docs/examples/java/databases/update-string-attribute.md +++ b/docs/examples/java/databases/update-string-attribute.md @@ -10,11 +10,11 @@ Client client = new Client() Databases databases = new Databases(client); databases.updateStringAttribute( - "", // databaseId - "", // collectionId + "{$example}", // databaseId + "{$example}", // collectionId "", // key false, // required - "", // default + "{$example}", // default 0, // size (optional) "", // newKey (optional) new CoroutineCallback<>((result, error) -> { diff --git a/docs/examples/java/databases/update-url-attribute.md b/docs/examples/java/databases/update-url-attribute.md index dcfbf30..236c146 100644 --- a/docs/examples/java/databases/update-url-attribute.md +++ b/docs/examples/java/databases/update-url-attribute.md @@ -10,11 +10,11 @@ Client client = new Client() Databases databases = new Databases(client); databases.updateUrlAttribute( - "", // databaseId - "", // collectionId + "{$example}", // databaseId + "{$example}", // collectionId "", // key false, // required - "https://example.com", // default + "{$example}", // default "", // newKey (optional) new CoroutineCallback<>((result, error) -> { if (error != null) { diff --git a/docs/examples/java/databases/update.md b/docs/examples/java/databases/update.md index f1e6dd3..960df6e 100644 --- a/docs/examples/java/databases/update.md +++ b/docs/examples/java/databases/update.md @@ -10,8 +10,8 @@ Client client = new Client() Databases databases = new Databases(client); databases.update( - "", // databaseId - "", // name + "{$example}", // databaseId + "{$example}", // name false, // enabled (optional) new CoroutineCallback<>((result, error) -> { if (error != null) { diff --git a/docs/examples/java/functions/create-build.md b/docs/examples/java/functions/create-build.md index ad55df1..e4babf3 100644 --- a/docs/examples/java/functions/create-build.md +++ b/docs/examples/java/functions/create-build.md @@ -10,9 +10,9 @@ Client client = new Client() Functions functions = new Functions(client); functions.createBuild( - "", // functionId - "", // deploymentId - "", // buildId (optional) + "{$example}", // functionId + "{$example}", // deploymentId + "{$example}", // buildId (optional) new CoroutineCallback<>((result, error) -> { if (error != null) { error.printStackTrace(); diff --git a/docs/examples/java/functions/create-deployment.md b/docs/examples/java/functions/create-deployment.md index 920998e..0508964 100644 --- a/docs/examples/java/functions/create-deployment.md +++ b/docs/examples/java/functions/create-deployment.md @@ -1,6 +1,6 @@ import io.appwrite.Client; import io.appwrite.coroutines.CoroutineCallback; -import io.appwrite.models.InputFile; +import io.appwrite.models.Payload; import io.appwrite.services.Functions; Client client = new Client() @@ -11,11 +11,11 @@ Client client = new Client() Functions functions = new Functions(client); functions.createDeployment( - "", // functionId - InputFile.fromPath("file.png"), // code + "{$example}", // functionId + Payload.fromFile("/path/to/file.png"), // code false, // activate - "", // entrypoint (optional) - "", // commands (optional) + "{$example}", // entrypoint (optional) + "{$example}", // commands (optional) new CoroutineCallback<>((result, error) -> { if (error != null) { error.printStackTrace(); diff --git a/docs/examples/java/functions/create-execution.md b/docs/examples/java/functions/create-execution.md index 62c0634..97274ce 100644 --- a/docs/examples/java/functions/create-execution.md +++ b/docs/examples/java/functions/create-execution.md @@ -10,10 +10,10 @@ Client client = new Client() Functions functions = new Functions(client); functions.createExecution( - "", // functionId - "", // body (optional) + "{$example}", // functionId + Payload.fromJson(mapOf("x" to "y" as Any)), // body (optional) false, // async (optional) - "", // path (optional) + "{$example}", // path (optional) ExecutionMethod.GET, // method (optional) mapOf( "a" to "b" ), // headers (optional) "", // scheduledAt (optional) diff --git a/docs/examples/java/functions/create-variable.md b/docs/examples/java/functions/create-variable.md index a1d6c7b..cdd4c1a 100644 --- a/docs/examples/java/functions/create-variable.md +++ b/docs/examples/java/functions/create-variable.md @@ -10,9 +10,9 @@ Client client = new Client() Functions functions = new Functions(client); functions.createVariable( - "", // functionId - "", // key - "", // value + "{$example}", // functionId + "{$example}", // key + "{$example}", // value new CoroutineCallback<>((result, error) -> { if (error != null) { error.printStackTrace(); diff --git a/docs/examples/java/functions/create.md b/docs/examples/java/functions/create.md index db0cc56..aef0858 100644 --- a/docs/examples/java/functions/create.md +++ b/docs/examples/java/functions/create.md @@ -11,8 +11,8 @@ Client client = new Client() Functions functions = new Functions(client); functions.create( - "", // functionId - "", // name + "{$example}", // functionId + "{$example}", // name .NODE_14_5, // runtime listOf("any"), // execute (optional) listOf(), // events (optional) @@ -20,18 +20,18 @@ functions.create( 1, // timeout (optional) false, // enabled (optional) false, // logging (optional) - "", // entrypoint (optional) - "", // commands (optional) + "{$example}", // entrypoint (optional) + "{$example}", // commands (optional) listOf(), // scopes (optional) - "", // installationId (optional) - "", // providerRepositoryId (optional) - "", // providerBranch (optional) + "{$example}", // installationId (optional) + "{$example}", // providerRepositoryId (optional) + "{$example}", // providerBranch (optional) false, // providerSilentMode (optional) - "", // providerRootDirectory (optional) - "", // templateRepository (optional) - "", // templateOwner (optional) - "", // templateRootDirectory (optional) - "", // templateVersion (optional) + "{$example}", // providerRootDirectory (optional) + "{$example}", // templateRepository (optional) + "{$example}", // templateOwner (optional) + "{$example}", // templateRootDirectory (optional) + "{$example}", // templateVersion (optional) "", // specification (optional) new CoroutineCallback<>((result, error) -> { if (error != null) { diff --git a/docs/examples/java/functions/delete-deployment.md b/docs/examples/java/functions/delete-deployment.md index f115bcc..9157299 100644 --- a/docs/examples/java/functions/delete-deployment.md +++ b/docs/examples/java/functions/delete-deployment.md @@ -10,8 +10,8 @@ Client client = new Client() Functions functions = new Functions(client); functions.deleteDeployment( - "", // functionId - "", // deploymentId + "{$example}", // functionId + "{$example}", // deploymentId new CoroutineCallback<>((result, error) -> { if (error != null) { error.printStackTrace(); diff --git a/docs/examples/java/functions/delete-execution.md b/docs/examples/java/functions/delete-execution.md index 68c11bd..4240e03 100644 --- a/docs/examples/java/functions/delete-execution.md +++ b/docs/examples/java/functions/delete-execution.md @@ -10,8 +10,8 @@ Client client = new Client() Functions functions = new Functions(client); functions.deleteExecution( - "", // functionId - "", // executionId + "{$example}", // functionId + "{$example}", // executionId new CoroutineCallback<>((result, error) -> { if (error != null) { error.printStackTrace(); diff --git a/docs/examples/java/functions/delete-variable.md b/docs/examples/java/functions/delete-variable.md index ca4d4f4..b0301e6 100644 --- a/docs/examples/java/functions/delete-variable.md +++ b/docs/examples/java/functions/delete-variable.md @@ -10,8 +10,8 @@ Client client = new Client() Functions functions = new Functions(client); functions.deleteVariable( - "", // functionId - "", // variableId + "{$example}", // functionId + "{$example}", // variableId new CoroutineCallback<>((result, error) -> { if (error != null) { error.printStackTrace(); diff --git a/docs/examples/java/functions/delete.md b/docs/examples/java/functions/delete.md index 94c7da5..93af02e 100644 --- a/docs/examples/java/functions/delete.md +++ b/docs/examples/java/functions/delete.md @@ -10,7 +10,7 @@ Client client = new Client() Functions functions = new Functions(client); functions.delete( - "", // functionId + "{$example}", // functionId new CoroutineCallback<>((result, error) -> { if (error != null) { error.printStackTrace(); diff --git a/docs/examples/java/functions/get-deployment-download.md b/docs/examples/java/functions/get-deployment-download.md index 719d662..0332a1e 100644 --- a/docs/examples/java/functions/get-deployment-download.md +++ b/docs/examples/java/functions/get-deployment-download.md @@ -10,8 +10,8 @@ Client client = new Client() Functions functions = new Functions(client); functions.getDeploymentDownload( - "", // functionId - "", // deploymentId + "{$example}", // functionId + "{$example}", // deploymentId new CoroutineCallback<>((result, error) -> { if (error != null) { error.printStackTrace(); diff --git a/docs/examples/java/functions/get-deployment.md b/docs/examples/java/functions/get-deployment.md index f039bee..f70eb0c 100644 --- a/docs/examples/java/functions/get-deployment.md +++ b/docs/examples/java/functions/get-deployment.md @@ -10,8 +10,8 @@ Client client = new Client() Functions functions = new Functions(client); functions.getDeployment( - "", // functionId - "", // deploymentId + "{$example}", // functionId + "{$example}", // deploymentId new CoroutineCallback<>((result, error) -> { if (error != null) { error.printStackTrace(); diff --git a/docs/examples/java/functions/get-execution.md b/docs/examples/java/functions/get-execution.md index 253ff54..7c8bcec 100644 --- a/docs/examples/java/functions/get-execution.md +++ b/docs/examples/java/functions/get-execution.md @@ -10,8 +10,8 @@ Client client = new Client() Functions functions = new Functions(client); functions.getExecution( - "", // functionId - "", // executionId + "{$example}", // functionId + "{$example}", // executionId new CoroutineCallback<>((result, error) -> { if (error != null) { error.printStackTrace(); diff --git a/docs/examples/java/functions/get-variable.md b/docs/examples/java/functions/get-variable.md index 3d01fa4..508034d 100644 --- a/docs/examples/java/functions/get-variable.md +++ b/docs/examples/java/functions/get-variable.md @@ -10,8 +10,8 @@ Client client = new Client() Functions functions = new Functions(client); functions.getVariable( - "", // functionId - "", // variableId + "{$example}", // functionId + "{$example}", // variableId new CoroutineCallback<>((result, error) -> { if (error != null) { error.printStackTrace(); diff --git a/docs/examples/java/functions/get.md b/docs/examples/java/functions/get.md index c22ccca..e854d7f 100644 --- a/docs/examples/java/functions/get.md +++ b/docs/examples/java/functions/get.md @@ -10,7 +10,7 @@ Client client = new Client() Functions functions = new Functions(client); functions.get( - "", // functionId + "{$example}", // functionId new CoroutineCallback<>((result, error) -> { if (error != null) { error.printStackTrace(); diff --git a/docs/examples/java/functions/list-deployments.md b/docs/examples/java/functions/list-deployments.md index 9a1f1ef..62a4f05 100644 --- a/docs/examples/java/functions/list-deployments.md +++ b/docs/examples/java/functions/list-deployments.md @@ -10,9 +10,9 @@ Client client = new Client() Functions functions = new Functions(client); functions.listDeployments( - "", // functionId + "{$example}", // functionId listOf(), // queries (optional) - "", // search (optional) + "{$example}", // search (optional) new CoroutineCallback<>((result, error) -> { if (error != null) { error.printStackTrace(); diff --git a/docs/examples/java/functions/list-executions.md b/docs/examples/java/functions/list-executions.md index f2faa02..a67d2ef 100644 --- a/docs/examples/java/functions/list-executions.md +++ b/docs/examples/java/functions/list-executions.md @@ -10,9 +10,9 @@ Client client = new Client() Functions functions = new Functions(client); functions.listExecutions( - "", // functionId + "{$example}", // functionId listOf(), // queries (optional) - "", // search (optional) + "{$example}", // search (optional) new CoroutineCallback<>((result, error) -> { if (error != null) { error.printStackTrace(); diff --git a/docs/examples/java/functions/list-variables.md b/docs/examples/java/functions/list-variables.md index 1e1e0e7..8c0b845 100644 --- a/docs/examples/java/functions/list-variables.md +++ b/docs/examples/java/functions/list-variables.md @@ -10,7 +10,7 @@ Client client = new Client() Functions functions = new Functions(client); functions.listVariables( - "", // functionId + "{$example}", // functionId new CoroutineCallback<>((result, error) -> { if (error != null) { error.printStackTrace(); diff --git a/docs/examples/java/functions/list.md b/docs/examples/java/functions/list.md index 1c501fd..e37aa87 100644 --- a/docs/examples/java/functions/list.md +++ b/docs/examples/java/functions/list.md @@ -11,7 +11,7 @@ Functions functions = new Functions(client); functions.list( listOf(), // queries (optional) - "", // search (optional) + "{$example}", // search (optional) new CoroutineCallback<>((result, error) -> { if (error != null) { error.printStackTrace(); diff --git a/docs/examples/java/functions/update-deployment-build.md b/docs/examples/java/functions/update-deployment-build.md index 62b684f..fdb9ae1 100644 --- a/docs/examples/java/functions/update-deployment-build.md +++ b/docs/examples/java/functions/update-deployment-build.md @@ -10,8 +10,8 @@ Client client = new Client() Functions functions = new Functions(client); functions.updateDeploymentBuild( - "", // functionId - "", // deploymentId + "{$example}", // functionId + "{$example}", // deploymentId new CoroutineCallback<>((result, error) -> { if (error != null) { error.printStackTrace(); diff --git a/docs/examples/java/functions/update-deployment.md b/docs/examples/java/functions/update-deployment.md index 8d28501..fc03550 100644 --- a/docs/examples/java/functions/update-deployment.md +++ b/docs/examples/java/functions/update-deployment.md @@ -10,8 +10,8 @@ Client client = new Client() Functions functions = new Functions(client); functions.updateDeployment( - "", // functionId - "", // deploymentId + "{$example}", // functionId + "{$example}", // deploymentId new CoroutineCallback<>((result, error) -> { if (error != null) { error.printStackTrace(); diff --git a/docs/examples/java/functions/update-variable.md b/docs/examples/java/functions/update-variable.md index 4e0576e..1ac49ab 100644 --- a/docs/examples/java/functions/update-variable.md +++ b/docs/examples/java/functions/update-variable.md @@ -10,10 +10,10 @@ Client client = new Client() Functions functions = new Functions(client); functions.updateVariable( - "", // functionId - "", // variableId - "", // key - "", // value (optional) + "{$example}", // functionId + "{$example}", // variableId + "{$example}", // key + "{$example}", // value (optional) new CoroutineCallback<>((result, error) -> { if (error != null) { error.printStackTrace(); diff --git a/docs/examples/java/functions/update.md b/docs/examples/java/functions/update.md index c63dfb4..3afaea6 100644 --- a/docs/examples/java/functions/update.md +++ b/docs/examples/java/functions/update.md @@ -10,8 +10,8 @@ Client client = new Client() Functions functions = new Functions(client); functions.update( - "", // functionId - "", // name + "{$example}", // functionId + "{$example}", // name .NODE_14_5, // runtime (optional) listOf("any"), // execute (optional) listOf(), // events (optional) @@ -19,14 +19,14 @@ functions.update( 1, // timeout (optional) false, // enabled (optional) false, // logging (optional) - "", // entrypoint (optional) - "", // commands (optional) + "{$example}", // entrypoint (optional) + "{$example}", // commands (optional) listOf(), // scopes (optional) - "", // installationId (optional) - "", // providerRepositoryId (optional) - "", // providerBranch (optional) + "{$example}", // installationId (optional) + "{$example}", // providerRepositoryId (optional) + "{$example}", // providerBranch (optional) false, // providerSilentMode (optional) - "", // providerRootDirectory (optional) + "{$example}", // providerRootDirectory (optional) "", // specification (optional) new CoroutineCallback<>((result, error) -> { if (error != null) { diff --git a/docs/examples/java/health/get-queue-databases.md b/docs/examples/java/health/get-queue-databases.md index 7f34b19..21d30aa 100644 --- a/docs/examples/java/health/get-queue-databases.md +++ b/docs/examples/java/health/get-queue-databases.md @@ -10,7 +10,7 @@ Client client = new Client() Health health = new Health(client); health.getQueueDatabases( - "", // name (optional) + "{$example}", // name (optional) 0, // threshold (optional) new CoroutineCallback<>((result, error) -> { if (error != null) { diff --git a/docs/examples/java/messaging/create-apns-provider.md b/docs/examples/java/messaging/create-apns-provider.md index 5dde983..ad6a7ef 100644 --- a/docs/examples/java/messaging/create-apns-provider.md +++ b/docs/examples/java/messaging/create-apns-provider.md @@ -10,12 +10,12 @@ Client client = new Client() Messaging messaging = new Messaging(client); messaging.createApnsProvider( - "", // providerId - "", // name - "", // authKey (optional) - "", // authKeyId (optional) - "", // teamId (optional) - "", // bundleId (optional) + "{$example}", // providerId + "{$example}", // name + "{$example}", // authKey (optional) + "{$example}", // authKeyId (optional) + "{$example}", // teamId (optional) + "{$example}", // bundleId (optional) false, // sandbox (optional) false, // enabled (optional) new CoroutineCallback<>((result, error) -> { diff --git a/docs/examples/java/messaging/create-email.md b/docs/examples/java/messaging/create-email.md index 753a89b..edb5381 100644 --- a/docs/examples/java/messaging/create-email.md +++ b/docs/examples/java/messaging/create-email.md @@ -10,9 +10,9 @@ Client client = new Client() Messaging messaging = new Messaging(client); messaging.createEmail( - "", // messageId - "", // subject - "", // content + "{$example}", // messageId + "{$example}", // subject + "{$example}", // content listOf(), // topics (optional) listOf(), // users (optional) listOf(), // targets (optional) diff --git a/docs/examples/java/messaging/create-fcm-provider.md b/docs/examples/java/messaging/create-fcm-provider.md index 1078514..19ecb62 100644 --- a/docs/examples/java/messaging/create-fcm-provider.md +++ b/docs/examples/java/messaging/create-fcm-provider.md @@ -10,8 +10,8 @@ Client client = new Client() Messaging messaging = new Messaging(client); messaging.createFcmProvider( - "", // providerId - "", // name + "{$example}", // providerId + "{$example}", // name mapOf( "a" to "b" ), // serviceAccountJSON (optional) false, // enabled (optional) new CoroutineCallback<>((result, error) -> { diff --git a/docs/examples/java/messaging/create-mailgun-provider.md b/docs/examples/java/messaging/create-mailgun-provider.md index 4b2a7bd..d04bc4a 100644 --- a/docs/examples/java/messaging/create-mailgun-provider.md +++ b/docs/examples/java/messaging/create-mailgun-provider.md @@ -10,15 +10,15 @@ Client client = new Client() Messaging messaging = new Messaging(client); messaging.createMailgunProvider( - "", // providerId - "", // name - "", // apiKey (optional) - "", // domain (optional) + "{$example}", // providerId + "{$example}", // name + "{$example}", // apiKey (optional) + "{$example}", // domain (optional) false, // isEuRegion (optional) - "", // fromName (optional) - "email@example.com", // fromEmail (optional) - "", // replyToName (optional) - "email@example.com", // replyToEmail (optional) + "{$example}", // fromName (optional) + "{$example}", // fromEmail (optional) + "{$example}", // replyToName (optional) + "{$example}", // replyToEmail (optional) false, // enabled (optional) new CoroutineCallback<>((result, error) -> { if (error != null) { diff --git a/docs/examples/java/messaging/create-msg91provider.md b/docs/examples/java/messaging/create-msg91provider.md index 6cc120c..c6e6c4e 100644 --- a/docs/examples/java/messaging/create-msg91provider.md +++ b/docs/examples/java/messaging/create-msg91provider.md @@ -10,11 +10,11 @@ Client client = new Client() Messaging messaging = new Messaging(client); messaging.createMsg91Provider( - "", // providerId - "", // name - "", // templateId (optional) - "", // senderId (optional) - "", // authKey (optional) + "{$example}", // providerId + "{$example}", // name + "{$example}", // templateId (optional) + "{$example}", // senderId (optional) + "{$example}", // authKey (optional) false, // enabled (optional) new CoroutineCallback<>((result, error) -> { if (error != null) { diff --git a/docs/examples/java/messaging/create-push.md b/docs/examples/java/messaging/create-push.md index 934f1fa..a860a8d 100644 --- a/docs/examples/java/messaging/create-push.md +++ b/docs/examples/java/messaging/create-push.md @@ -10,20 +10,20 @@ Client client = new Client() Messaging messaging = new Messaging(client); messaging.createPush( - "", // messageId - "", // title - "<BODY>", // body + "{$example}", // messageId + "{$example}", // title + "{$example}", // body listOf(), // topics (optional) listOf(), // users (optional) listOf(), // targets (optional) mapOf( "a" to "b" ), // data (optional) - "<ACTION>", // action (optional) - "[ID1:ID2]", // image (optional) - "<ICON>", // icon (optional) - "<SOUND>", // sound (optional) - "<COLOR>", // color (optional) - "<TAG>", // tag (optional) - "<BADGE>", // badge (optional) + "{$example}", // action (optional) + "{$example}", // image (optional) + "{$example}", // icon (optional) + "{$example}", // sound (optional) + "{$example}", // color (optional) + "{$example}", // tag (optional) + "{$example}", // badge (optional) false, // draft (optional) "", // scheduledAt (optional) new CoroutineCallback<>((result, error) -> { diff --git a/docs/examples/java/messaging/create-sendgrid-provider.md b/docs/examples/java/messaging/create-sendgrid-provider.md index 20e1274..325da4c 100644 --- a/docs/examples/java/messaging/create-sendgrid-provider.md +++ b/docs/examples/java/messaging/create-sendgrid-provider.md @@ -10,13 +10,13 @@ Client client = new Client() Messaging messaging = new Messaging(client); messaging.createSendgridProvider( - "<PROVIDER_ID>", // providerId - "<NAME>", // name - "<API_KEY>", // apiKey (optional) - "<FROM_NAME>", // fromName (optional) - "email@example.com", // fromEmail (optional) - "<REPLY_TO_NAME>", // replyToName (optional) - "email@example.com", // replyToEmail (optional) + "{$example}", // providerId + "{$example}", // name + "{$example}", // apiKey (optional) + "{$example}", // fromName (optional) + "{$example}", // fromEmail (optional) + "{$example}", // replyToName (optional) + "{$example}", // replyToEmail (optional) false, // enabled (optional) new CoroutineCallback<>((result, error) -> { if (error != null) { diff --git a/docs/examples/java/messaging/create-sms.md b/docs/examples/java/messaging/create-sms.md index 60e1749..17bf81e 100644 --- a/docs/examples/java/messaging/create-sms.md +++ b/docs/examples/java/messaging/create-sms.md @@ -10,8 +10,8 @@ Client client = new Client() Messaging messaging = new Messaging(client); messaging.createSms( - "<MESSAGE_ID>", // messageId - "<CONTENT>", // content + "{$example}", // messageId + "{$example}", // content listOf(), // topics (optional) listOf(), // users (optional) listOf(), // targets (optional) diff --git a/docs/examples/java/messaging/create-smtp-provider.md b/docs/examples/java/messaging/create-smtp-provider.md index 3f69f61..8c3671b 100644 --- a/docs/examples/java/messaging/create-smtp-provider.md +++ b/docs/examples/java/messaging/create-smtp-provider.md @@ -10,19 +10,19 @@ Client client = new Client() Messaging messaging = new Messaging(client); messaging.createSmtpProvider( - "<PROVIDER_ID>", // providerId - "<NAME>", // name - "<HOST>", // host + "{$example}", // providerId + "{$example}", // name + "{$example}", // host 1, // port (optional) - "<USERNAME>", // username (optional) - "<PASSWORD>", // password (optional) + "{$example}", // username (optional) + "{$example}", // password (optional) SmtpEncryption.NONE, // encryption (optional) false, // autoTLS (optional) - "<MAILER>", // mailer (optional) - "<FROM_NAME>", // fromName (optional) - "email@example.com", // fromEmail (optional) - "<REPLY_TO_NAME>", // replyToName (optional) - "email@example.com", // replyToEmail (optional) + "{$example}", // mailer (optional) + "{$example}", // fromName (optional) + "{$example}", // fromEmail (optional) + "{$example}", // replyToName (optional) + "{$example}", // replyToEmail (optional) false, // enabled (optional) new CoroutineCallback<>((result, error) -> { if (error != null) { diff --git a/docs/examples/java/messaging/create-subscriber.md b/docs/examples/java/messaging/create-subscriber.md index 77ef2d5..4ed2672 100644 --- a/docs/examples/java/messaging/create-subscriber.md +++ b/docs/examples/java/messaging/create-subscriber.md @@ -10,9 +10,9 @@ Client client = new Client() Messaging messaging = new Messaging(client); messaging.createSubscriber( - "<TOPIC_ID>", // topicId - "<SUBSCRIBER_ID>", // subscriberId - "<TARGET_ID>", // targetId + "{$example}", // topicId + "{$example}", // subscriberId + "{$example}", // targetId new CoroutineCallback<>((result, error) -> { if (error != null) { error.printStackTrace(); diff --git a/docs/examples/java/messaging/create-telesign-provider.md b/docs/examples/java/messaging/create-telesign-provider.md index f660814..3d9430f 100644 --- a/docs/examples/java/messaging/create-telesign-provider.md +++ b/docs/examples/java/messaging/create-telesign-provider.md @@ -10,11 +10,11 @@ Client client = new Client() Messaging messaging = new Messaging(client); messaging.createTelesignProvider( - "<PROVIDER_ID>", // providerId - "<NAME>", // name - "+12065550100", // from (optional) - "<CUSTOMER_ID>", // customerId (optional) - "<API_KEY>", // apiKey (optional) + "{$example}", // providerId + "{$example}", // name + "{$example}", // from (optional) + "{$example}", // customerId (optional) + "{$example}", // apiKey (optional) false, // enabled (optional) new CoroutineCallback<>((result, error) -> { if (error != null) { diff --git a/docs/examples/java/messaging/create-textmagic-provider.md b/docs/examples/java/messaging/create-textmagic-provider.md index cda11d5..b708e20 100644 --- a/docs/examples/java/messaging/create-textmagic-provider.md +++ b/docs/examples/java/messaging/create-textmagic-provider.md @@ -10,11 +10,11 @@ Client client = new Client() Messaging messaging = new Messaging(client); messaging.createTextmagicProvider( - "<PROVIDER_ID>", // providerId - "<NAME>", // name - "+12065550100", // from (optional) - "<USERNAME>", // username (optional) - "<API_KEY>", // apiKey (optional) + "{$example}", // providerId + "{$example}", // name + "{$example}", // from (optional) + "{$example}", // username (optional) + "{$example}", // apiKey (optional) false, // enabled (optional) new CoroutineCallback<>((result, error) -> { if (error != null) { diff --git a/docs/examples/java/messaging/create-topic.md b/docs/examples/java/messaging/create-topic.md index 8fa74d8..aa27cca 100644 --- a/docs/examples/java/messaging/create-topic.md +++ b/docs/examples/java/messaging/create-topic.md @@ -10,8 +10,8 @@ Client client = new Client() Messaging messaging = new Messaging(client); messaging.createTopic( - "<TOPIC_ID>", // topicId - "<NAME>", // name + "{$example}", // topicId + "{$example}", // name listOf("any"), // subscribe (optional) new CoroutineCallback<>((result, error) -> { if (error != null) { diff --git a/docs/examples/java/messaging/create-twilio-provider.md b/docs/examples/java/messaging/create-twilio-provider.md index a122837..4f3e5bd 100644 --- a/docs/examples/java/messaging/create-twilio-provider.md +++ b/docs/examples/java/messaging/create-twilio-provider.md @@ -10,11 +10,11 @@ Client client = new Client() Messaging messaging = new Messaging(client); messaging.createTwilioProvider( - "<PROVIDER_ID>", // providerId - "<NAME>", // name - "+12065550100", // from (optional) - "<ACCOUNT_SID>", // accountSid (optional) - "<AUTH_TOKEN>", // authToken (optional) + "{$example}", // providerId + "{$example}", // name + "{$example}", // from (optional) + "{$example}", // accountSid (optional) + "{$example}", // authToken (optional) false, // enabled (optional) new CoroutineCallback<>((result, error) -> { if (error != null) { diff --git a/docs/examples/java/messaging/create-vonage-provider.md b/docs/examples/java/messaging/create-vonage-provider.md index 808ca0c..38dd2c1 100644 --- a/docs/examples/java/messaging/create-vonage-provider.md +++ b/docs/examples/java/messaging/create-vonage-provider.md @@ -10,11 +10,11 @@ Client client = new Client() Messaging messaging = new Messaging(client); messaging.createVonageProvider( - "<PROVIDER_ID>", // providerId - "<NAME>", // name - "+12065550100", // from (optional) - "<API_KEY>", // apiKey (optional) - "<API_SECRET>", // apiSecret (optional) + "{$example}", // providerId + "{$example}", // name + "{$example}", // from (optional) + "{$example}", // apiKey (optional) + "{$example}", // apiSecret (optional) false, // enabled (optional) new CoroutineCallback<>((result, error) -> { if (error != null) { diff --git a/docs/examples/java/messaging/delete-provider.md b/docs/examples/java/messaging/delete-provider.md index e1337dc..9166e20 100644 --- a/docs/examples/java/messaging/delete-provider.md +++ b/docs/examples/java/messaging/delete-provider.md @@ -10,7 +10,7 @@ Client client = new Client() Messaging messaging = new Messaging(client); messaging.deleteProvider( - "<PROVIDER_ID>", // providerId + "{$example}", // providerId new CoroutineCallback<>((result, error) -> { if (error != null) { error.printStackTrace(); diff --git a/docs/examples/java/messaging/delete-subscriber.md b/docs/examples/java/messaging/delete-subscriber.md index c80fc72..0bbebfb 100644 --- a/docs/examples/java/messaging/delete-subscriber.md +++ b/docs/examples/java/messaging/delete-subscriber.md @@ -10,8 +10,8 @@ Client client = new Client() Messaging messaging = new Messaging(client); messaging.deleteSubscriber( - "<TOPIC_ID>", // topicId - "<SUBSCRIBER_ID>", // subscriberId + "{$example}", // topicId + "{$example}", // subscriberId new CoroutineCallback<>((result, error) -> { if (error != null) { error.printStackTrace(); diff --git a/docs/examples/java/messaging/delete-topic.md b/docs/examples/java/messaging/delete-topic.md index 9c51144..bb2d98b 100644 --- a/docs/examples/java/messaging/delete-topic.md +++ b/docs/examples/java/messaging/delete-topic.md @@ -10,7 +10,7 @@ Client client = new Client() Messaging messaging = new Messaging(client); messaging.deleteTopic( - "<TOPIC_ID>", // topicId + "{$example}", // topicId new CoroutineCallback<>((result, error) -> { if (error != null) { error.printStackTrace(); diff --git a/docs/examples/java/messaging/delete.md b/docs/examples/java/messaging/delete.md index f90336a..e5d62f1 100644 --- a/docs/examples/java/messaging/delete.md +++ b/docs/examples/java/messaging/delete.md @@ -10,7 +10,7 @@ Client client = new Client() Messaging messaging = new Messaging(client); messaging.delete( - "<MESSAGE_ID>", // messageId + "{$example}", // messageId new CoroutineCallback<>((result, error) -> { if (error != null) { error.printStackTrace(); diff --git a/docs/examples/java/messaging/get-message.md b/docs/examples/java/messaging/get-message.md index 5e940cf..142c018 100644 --- a/docs/examples/java/messaging/get-message.md +++ b/docs/examples/java/messaging/get-message.md @@ -10,7 +10,7 @@ Client client = new Client() Messaging messaging = new Messaging(client); messaging.getMessage( - "<MESSAGE_ID>", // messageId + "{$example}", // messageId new CoroutineCallback<>((result, error) -> { if (error != null) { error.printStackTrace(); diff --git a/docs/examples/java/messaging/get-provider.md b/docs/examples/java/messaging/get-provider.md index 74ece13..c2338ee 100644 --- a/docs/examples/java/messaging/get-provider.md +++ b/docs/examples/java/messaging/get-provider.md @@ -10,7 +10,7 @@ Client client = new Client() Messaging messaging = new Messaging(client); messaging.getProvider( - "<PROVIDER_ID>", // providerId + "{$example}", // providerId new CoroutineCallback<>((result, error) -> { if (error != null) { error.printStackTrace(); diff --git a/docs/examples/java/messaging/get-subscriber.md b/docs/examples/java/messaging/get-subscriber.md index 2e6beaa..a7eab83 100644 --- a/docs/examples/java/messaging/get-subscriber.md +++ b/docs/examples/java/messaging/get-subscriber.md @@ -10,8 +10,8 @@ Client client = new Client() Messaging messaging = new Messaging(client); messaging.getSubscriber( - "<TOPIC_ID>", // topicId - "<SUBSCRIBER_ID>", // subscriberId + "{$example}", // topicId + "{$example}", // subscriberId new CoroutineCallback<>((result, error) -> { if (error != null) { error.printStackTrace(); diff --git a/docs/examples/java/messaging/get-topic.md b/docs/examples/java/messaging/get-topic.md index adf64bb..26fc7ed 100644 --- a/docs/examples/java/messaging/get-topic.md +++ b/docs/examples/java/messaging/get-topic.md @@ -10,7 +10,7 @@ Client client = new Client() Messaging messaging = new Messaging(client); messaging.getTopic( - "<TOPIC_ID>", // topicId + "{$example}", // topicId new CoroutineCallback<>((result, error) -> { if (error != null) { error.printStackTrace(); diff --git a/docs/examples/java/messaging/list-message-logs.md b/docs/examples/java/messaging/list-message-logs.md index 70bb49a..38442cd 100644 --- a/docs/examples/java/messaging/list-message-logs.md +++ b/docs/examples/java/messaging/list-message-logs.md @@ -10,7 +10,7 @@ Client client = new Client() Messaging messaging = new Messaging(client); messaging.listMessageLogs( - "<MESSAGE_ID>", // messageId + "{$example}", // messageId listOf(), // queries (optional) new CoroutineCallback<>((result, error) -> { if (error != null) { diff --git a/docs/examples/java/messaging/list-messages.md b/docs/examples/java/messaging/list-messages.md index 847ce73..5923f8a 100644 --- a/docs/examples/java/messaging/list-messages.md +++ b/docs/examples/java/messaging/list-messages.md @@ -11,7 +11,7 @@ Messaging messaging = new Messaging(client); messaging.listMessages( listOf(), // queries (optional) - "<SEARCH>", // search (optional) + "{$example}", // search (optional) new CoroutineCallback<>((result, error) -> { if (error != null) { error.printStackTrace(); diff --git a/docs/examples/java/messaging/list-provider-logs.md b/docs/examples/java/messaging/list-provider-logs.md index be1aba0..4bf40c6 100644 --- a/docs/examples/java/messaging/list-provider-logs.md +++ b/docs/examples/java/messaging/list-provider-logs.md @@ -10,7 +10,7 @@ Client client = new Client() Messaging messaging = new Messaging(client); messaging.listProviderLogs( - "<PROVIDER_ID>", // providerId + "{$example}", // providerId listOf(), // queries (optional) new CoroutineCallback<>((result, error) -> { if (error != null) { diff --git a/docs/examples/java/messaging/list-providers.md b/docs/examples/java/messaging/list-providers.md index feda900..5c06469 100644 --- a/docs/examples/java/messaging/list-providers.md +++ b/docs/examples/java/messaging/list-providers.md @@ -11,7 +11,7 @@ Messaging messaging = new Messaging(client); messaging.listProviders( listOf(), // queries (optional) - "<SEARCH>", // search (optional) + "{$example}", // search (optional) new CoroutineCallback<>((result, error) -> { if (error != null) { error.printStackTrace(); diff --git a/docs/examples/java/messaging/list-subscriber-logs.md b/docs/examples/java/messaging/list-subscriber-logs.md index 30250e4..c6b4996 100644 --- a/docs/examples/java/messaging/list-subscriber-logs.md +++ b/docs/examples/java/messaging/list-subscriber-logs.md @@ -10,7 +10,7 @@ Client client = new Client() Messaging messaging = new Messaging(client); messaging.listSubscriberLogs( - "<SUBSCRIBER_ID>", // subscriberId + "{$example}", // subscriberId listOf(), // queries (optional) new CoroutineCallback<>((result, error) -> { if (error != null) { diff --git a/docs/examples/java/messaging/list-subscribers.md b/docs/examples/java/messaging/list-subscribers.md index d00d492..0d892e5 100644 --- a/docs/examples/java/messaging/list-subscribers.md +++ b/docs/examples/java/messaging/list-subscribers.md @@ -10,9 +10,9 @@ Client client = new Client() Messaging messaging = new Messaging(client); messaging.listSubscribers( - "<TOPIC_ID>", // topicId + "{$example}", // topicId listOf(), // queries (optional) - "<SEARCH>", // search (optional) + "{$example}", // search (optional) new CoroutineCallback<>((result, error) -> { if (error != null) { error.printStackTrace(); diff --git a/docs/examples/java/messaging/list-targets.md b/docs/examples/java/messaging/list-targets.md index f1eeac0..a0bff84 100644 --- a/docs/examples/java/messaging/list-targets.md +++ b/docs/examples/java/messaging/list-targets.md @@ -10,7 +10,7 @@ Client client = new Client() Messaging messaging = new Messaging(client); messaging.listTargets( - "<MESSAGE_ID>", // messageId + "{$example}", // messageId listOf(), // queries (optional) new CoroutineCallback<>((result, error) -> { if (error != null) { diff --git a/docs/examples/java/messaging/list-topic-logs.md b/docs/examples/java/messaging/list-topic-logs.md index c7edc92..3d9e449 100644 --- a/docs/examples/java/messaging/list-topic-logs.md +++ b/docs/examples/java/messaging/list-topic-logs.md @@ -10,7 +10,7 @@ Client client = new Client() Messaging messaging = new Messaging(client); messaging.listTopicLogs( - "<TOPIC_ID>", // topicId + "{$example}", // topicId listOf(), // queries (optional) new CoroutineCallback<>((result, error) -> { if (error != null) { diff --git a/docs/examples/java/messaging/list-topics.md b/docs/examples/java/messaging/list-topics.md index 278d0d4..7ad8dea 100644 --- a/docs/examples/java/messaging/list-topics.md +++ b/docs/examples/java/messaging/list-topics.md @@ -11,7 +11,7 @@ Messaging messaging = new Messaging(client); messaging.listTopics( listOf(), // queries (optional) - "<SEARCH>", // search (optional) + "{$example}", // search (optional) new CoroutineCallback<>((result, error) -> { if (error != null) { error.printStackTrace(); diff --git a/docs/examples/java/messaging/update-apns-provider.md b/docs/examples/java/messaging/update-apns-provider.md index b9ac1a9..ee6cf1c 100644 --- a/docs/examples/java/messaging/update-apns-provider.md +++ b/docs/examples/java/messaging/update-apns-provider.md @@ -10,13 +10,13 @@ Client client = new Client() Messaging messaging = new Messaging(client); messaging.updateApnsProvider( - "<PROVIDER_ID>", // providerId - "<NAME>", // name (optional) + "{$example}", // providerId + "{$example}", // name (optional) false, // enabled (optional) - "<AUTH_KEY>", // authKey (optional) - "<AUTH_KEY_ID>", // authKeyId (optional) - "<TEAM_ID>", // teamId (optional) - "<BUNDLE_ID>", // bundleId (optional) + "{$example}", // authKey (optional) + "{$example}", // authKeyId (optional) + "{$example}", // teamId (optional) + "{$example}", // bundleId (optional) false, // sandbox (optional) new CoroutineCallback<>((result, error) -> { if (error != null) { diff --git a/docs/examples/java/messaging/update-email.md b/docs/examples/java/messaging/update-email.md index a5d9820..18a0dc6 100644 --- a/docs/examples/java/messaging/update-email.md +++ b/docs/examples/java/messaging/update-email.md @@ -10,12 +10,12 @@ Client client = new Client() Messaging messaging = new Messaging(client); messaging.updateEmail( - "<MESSAGE_ID>", // messageId + "{$example}", // messageId listOf(), // topics (optional) listOf(), // users (optional) listOf(), // targets (optional) - "<SUBJECT>", // subject (optional) - "<CONTENT>", // content (optional) + "{$example}", // subject (optional) + "{$example}", // content (optional) false, // draft (optional) false, // html (optional) listOf(), // cc (optional) diff --git a/docs/examples/java/messaging/update-fcm-provider.md b/docs/examples/java/messaging/update-fcm-provider.md index 956900d..b518659 100644 --- a/docs/examples/java/messaging/update-fcm-provider.md +++ b/docs/examples/java/messaging/update-fcm-provider.md @@ -10,8 +10,8 @@ Client client = new Client() Messaging messaging = new Messaging(client); messaging.updateFcmProvider( - "<PROVIDER_ID>", // providerId - "<NAME>", // name (optional) + "{$example}", // providerId + "{$example}", // name (optional) false, // enabled (optional) mapOf( "a" to "b" ), // serviceAccountJSON (optional) new CoroutineCallback<>((result, error) -> { diff --git a/docs/examples/java/messaging/update-mailgun-provider.md b/docs/examples/java/messaging/update-mailgun-provider.md index 8512de1..2083e1f 100644 --- a/docs/examples/java/messaging/update-mailgun-provider.md +++ b/docs/examples/java/messaging/update-mailgun-provider.md @@ -10,16 +10,16 @@ Client client = new Client() Messaging messaging = new Messaging(client); messaging.updateMailgunProvider( - "<PROVIDER_ID>", // providerId - "<NAME>", // name (optional) - "<API_KEY>", // apiKey (optional) - "<DOMAIN>", // domain (optional) + "{$example}", // providerId + "{$example}", // name (optional) + "{$example}", // apiKey (optional) + "{$example}", // domain (optional) false, // isEuRegion (optional) false, // enabled (optional) - "<FROM_NAME>", // fromName (optional) - "email@example.com", // fromEmail (optional) - "<REPLY_TO_NAME>", // replyToName (optional) - "<REPLY_TO_EMAIL>", // replyToEmail (optional) + "{$example}", // fromName (optional) + "{$example}", // fromEmail (optional) + "{$example}", // replyToName (optional) + "{$example}", // replyToEmail (optional) new CoroutineCallback<>((result, error) -> { if (error != null) { error.printStackTrace(); diff --git a/docs/examples/java/messaging/update-msg91provider.md b/docs/examples/java/messaging/update-msg91provider.md index 74de7d2..5b246c0 100644 --- a/docs/examples/java/messaging/update-msg91provider.md +++ b/docs/examples/java/messaging/update-msg91provider.md @@ -10,12 +10,12 @@ Client client = new Client() Messaging messaging = new Messaging(client); messaging.updateMsg91Provider( - "<PROVIDER_ID>", // providerId - "<NAME>", // name (optional) + "{$example}", // providerId + "{$example}", // name (optional) false, // enabled (optional) - "<TEMPLATE_ID>", // templateId (optional) - "<SENDER_ID>", // senderId (optional) - "<AUTH_KEY>", // authKey (optional) + "{$example}", // templateId (optional) + "{$example}", // senderId (optional) + "{$example}", // authKey (optional) new CoroutineCallback<>((result, error) -> { if (error != null) { error.printStackTrace(); diff --git a/docs/examples/java/messaging/update-push.md b/docs/examples/java/messaging/update-push.md index ef04203..003eb53 100644 --- a/docs/examples/java/messaging/update-push.md +++ b/docs/examples/java/messaging/update-push.md @@ -10,19 +10,19 @@ Client client = new Client() Messaging messaging = new Messaging(client); messaging.updatePush( - "<MESSAGE_ID>", // messageId + "{$example}", // messageId listOf(), // topics (optional) listOf(), // users (optional) listOf(), // targets (optional) - "<TITLE>", // title (optional) - "<BODY>", // body (optional) + "{$example}", // title (optional) + "{$example}", // body (optional) mapOf( "a" to "b" ), // data (optional) - "<ACTION>", // action (optional) - "[ID1:ID2]", // image (optional) - "<ICON>", // icon (optional) - "<SOUND>", // sound (optional) - "<COLOR>", // color (optional) - "<TAG>", // tag (optional) + "{$example}", // action (optional) + "{$example}", // image (optional) + "{$example}", // icon (optional) + "{$example}", // sound (optional) + "{$example}", // color (optional) + "{$example}", // tag (optional) 0, // badge (optional) false, // draft (optional) "", // scheduledAt (optional) diff --git a/docs/examples/java/messaging/update-sendgrid-provider.md b/docs/examples/java/messaging/update-sendgrid-provider.md index 79c89c0..3c693fd 100644 --- a/docs/examples/java/messaging/update-sendgrid-provider.md +++ b/docs/examples/java/messaging/update-sendgrid-provider.md @@ -10,14 +10,14 @@ Client client = new Client() Messaging messaging = new Messaging(client); messaging.updateSendgridProvider( - "<PROVIDER_ID>", // providerId - "<NAME>", // name (optional) + "{$example}", // providerId + "{$example}", // name (optional) false, // enabled (optional) - "<API_KEY>", // apiKey (optional) - "<FROM_NAME>", // fromName (optional) - "email@example.com", // fromEmail (optional) - "<REPLY_TO_NAME>", // replyToName (optional) - "<REPLY_TO_EMAIL>", // replyToEmail (optional) + "{$example}", // apiKey (optional) + "{$example}", // fromName (optional) + "{$example}", // fromEmail (optional) + "{$example}", // replyToName (optional) + "{$example}", // replyToEmail (optional) new CoroutineCallback<>((result, error) -> { if (error != null) { error.printStackTrace(); diff --git a/docs/examples/java/messaging/update-sms.md b/docs/examples/java/messaging/update-sms.md index bfca7d3..e08189f 100644 --- a/docs/examples/java/messaging/update-sms.md +++ b/docs/examples/java/messaging/update-sms.md @@ -10,11 +10,11 @@ Client client = new Client() Messaging messaging = new Messaging(client); messaging.updateSms( - "<MESSAGE_ID>", // messageId + "{$example}", // messageId listOf(), // topics (optional) listOf(), // users (optional) listOf(), // targets (optional) - "<CONTENT>", // content (optional) + "{$example}", // content (optional) false, // draft (optional) "", // scheduledAt (optional) new CoroutineCallback<>((result, error) -> { diff --git a/docs/examples/java/messaging/update-smtp-provider.md b/docs/examples/java/messaging/update-smtp-provider.md index e308381..37d49b5 100644 --- a/docs/examples/java/messaging/update-smtp-provider.md +++ b/docs/examples/java/messaging/update-smtp-provider.md @@ -10,19 +10,19 @@ Client client = new Client() Messaging messaging = new Messaging(client); messaging.updateSmtpProvider( - "<PROVIDER_ID>", // providerId - "<NAME>", // name (optional) - "<HOST>", // host (optional) + "{$example}", // providerId + "{$example}", // name (optional) + "{$example}", // host (optional) 1, // port (optional) - "<USERNAME>", // username (optional) - "<PASSWORD>", // password (optional) + "{$example}", // username (optional) + "{$example}", // password (optional) SmtpEncryption.NONE, // encryption (optional) false, // autoTLS (optional) - "<MAILER>", // mailer (optional) - "<FROM_NAME>", // fromName (optional) - "email@example.com", // fromEmail (optional) - "<REPLY_TO_NAME>", // replyToName (optional) - "<REPLY_TO_EMAIL>", // replyToEmail (optional) + "{$example}", // mailer (optional) + "{$example}", // fromName (optional) + "{$example}", // fromEmail (optional) + "{$example}", // replyToName (optional) + "{$example}", // replyToEmail (optional) false, // enabled (optional) new CoroutineCallback<>((result, error) -> { if (error != null) { diff --git a/docs/examples/java/messaging/update-telesign-provider.md b/docs/examples/java/messaging/update-telesign-provider.md index 6ffb534..07c60b5 100644 --- a/docs/examples/java/messaging/update-telesign-provider.md +++ b/docs/examples/java/messaging/update-telesign-provider.md @@ -10,12 +10,12 @@ Client client = new Client() Messaging messaging = new Messaging(client); messaging.updateTelesignProvider( - "<PROVIDER_ID>", // providerId - "<NAME>", // name (optional) + "{$example}", // providerId + "{$example}", // name (optional) false, // enabled (optional) - "<CUSTOMER_ID>", // customerId (optional) - "<API_KEY>", // apiKey (optional) - "<FROM>", // from (optional) + "{$example}", // customerId (optional) + "{$example}", // apiKey (optional) + "{$example}", // from (optional) new CoroutineCallback<>((result, error) -> { if (error != null) { error.printStackTrace(); diff --git a/docs/examples/java/messaging/update-textmagic-provider.md b/docs/examples/java/messaging/update-textmagic-provider.md index d80b5ae..dfe37f6 100644 --- a/docs/examples/java/messaging/update-textmagic-provider.md +++ b/docs/examples/java/messaging/update-textmagic-provider.md @@ -10,12 +10,12 @@ Client client = new Client() Messaging messaging = new Messaging(client); messaging.updateTextmagicProvider( - "<PROVIDER_ID>", // providerId - "<NAME>", // name (optional) + "{$example}", // providerId + "{$example}", // name (optional) false, // enabled (optional) - "<USERNAME>", // username (optional) - "<API_KEY>", // apiKey (optional) - "<FROM>", // from (optional) + "{$example}", // username (optional) + "{$example}", // apiKey (optional) + "{$example}", // from (optional) new CoroutineCallback<>((result, error) -> { if (error != null) { error.printStackTrace(); diff --git a/docs/examples/java/messaging/update-topic.md b/docs/examples/java/messaging/update-topic.md index 1013fba..6ab70d4 100644 --- a/docs/examples/java/messaging/update-topic.md +++ b/docs/examples/java/messaging/update-topic.md @@ -10,8 +10,8 @@ Client client = new Client() Messaging messaging = new Messaging(client); messaging.updateTopic( - "<TOPIC_ID>", // topicId - "<NAME>", // name (optional) + "{$example}", // topicId + "{$example}", // name (optional) listOf("any"), // subscribe (optional) new CoroutineCallback<>((result, error) -> { if (error != null) { diff --git a/docs/examples/java/messaging/update-twilio-provider.md b/docs/examples/java/messaging/update-twilio-provider.md index 65fb0fc..1039741 100644 --- a/docs/examples/java/messaging/update-twilio-provider.md +++ b/docs/examples/java/messaging/update-twilio-provider.md @@ -10,12 +10,12 @@ Client client = new Client() Messaging messaging = new Messaging(client); messaging.updateTwilioProvider( - "<PROVIDER_ID>", // providerId - "<NAME>", // name (optional) + "{$example}", // providerId + "{$example}", // name (optional) false, // enabled (optional) - "<ACCOUNT_SID>", // accountSid (optional) - "<AUTH_TOKEN>", // authToken (optional) - "<FROM>", // from (optional) + "{$example}", // accountSid (optional) + "{$example}", // authToken (optional) + "{$example}", // from (optional) new CoroutineCallback<>((result, error) -> { if (error != null) { error.printStackTrace(); diff --git a/docs/examples/java/messaging/update-vonage-provider.md b/docs/examples/java/messaging/update-vonage-provider.md index 6548d17..d797fb8 100644 --- a/docs/examples/java/messaging/update-vonage-provider.md +++ b/docs/examples/java/messaging/update-vonage-provider.md @@ -10,12 +10,12 @@ Client client = new Client() Messaging messaging = new Messaging(client); messaging.updateVonageProvider( - "<PROVIDER_ID>", // providerId - "<NAME>", // name (optional) + "{$example}", // providerId + "{$example}", // name (optional) false, // enabled (optional) - "<API_KEY>", // apiKey (optional) - "<API_SECRET>", // apiSecret (optional) - "<FROM>", // from (optional) + "{$example}", // apiKey (optional) + "{$example}", // apiSecret (optional) + "{$example}", // from (optional) new CoroutineCallback<>((result, error) -> { if (error != null) { error.printStackTrace(); diff --git a/docs/examples/java/storage/create-bucket.md b/docs/examples/java/storage/create-bucket.md index ccb9961..d8f9f3e 100644 --- a/docs/examples/java/storage/create-bucket.md +++ b/docs/examples/java/storage/create-bucket.md @@ -10,8 +10,8 @@ Client client = new Client() Storage storage = new Storage(client); storage.createBucket( - "<BUCKET_ID>", // bucketId - "<NAME>", // name + "{$example}", // bucketId + "{$example}", // name listOf("read("any")"), // permissions (optional) false, // fileSecurity (optional) false, // enabled (optional) diff --git a/docs/examples/java/storage/create-file.md b/docs/examples/java/storage/create-file.md index 92907fc..de5d8aa 100644 --- a/docs/examples/java/storage/create-file.md +++ b/docs/examples/java/storage/create-file.md @@ -1,6 +1,6 @@ import io.appwrite.Client; import io.appwrite.coroutines.CoroutineCallback; -import io.appwrite.models.InputFile; +import io.appwrite.models.Payload; import io.appwrite.services.Storage; Client client = new Client() @@ -11,9 +11,9 @@ Client client = new Client() Storage storage = new Storage(client); storage.createFile( - "<BUCKET_ID>", // bucketId - "<FILE_ID>", // fileId - InputFile.fromPath("file.png"), // file + "{$example}", // bucketId + "{$example}", // fileId + Payload.fromFile("/path/to/file.png"), // file listOf("read("any")"), // permissions (optional) new CoroutineCallback<>((result, error) -> { if (error != null) { diff --git a/docs/examples/java/storage/delete-bucket.md b/docs/examples/java/storage/delete-bucket.md index 8c46ba9..0d55476 100644 --- a/docs/examples/java/storage/delete-bucket.md +++ b/docs/examples/java/storage/delete-bucket.md @@ -10,7 +10,7 @@ Client client = new Client() Storage storage = new Storage(client); storage.deleteBucket( - "<BUCKET_ID>", // bucketId + "{$example}", // bucketId new CoroutineCallback<>((result, error) -> { if (error != null) { error.printStackTrace(); diff --git a/docs/examples/java/storage/delete-file.md b/docs/examples/java/storage/delete-file.md index 01d423d..87fb6ac 100644 --- a/docs/examples/java/storage/delete-file.md +++ b/docs/examples/java/storage/delete-file.md @@ -10,8 +10,8 @@ Client client = new Client() Storage storage = new Storage(client); storage.deleteFile( - "<BUCKET_ID>", // bucketId - "<FILE_ID>", // fileId + "{$example}", // bucketId + "{$example}", // fileId new CoroutineCallback<>((result, error) -> { if (error != null) { error.printStackTrace(); diff --git a/docs/examples/java/storage/get-bucket.md b/docs/examples/java/storage/get-bucket.md index 63c847f..5db5395 100644 --- a/docs/examples/java/storage/get-bucket.md +++ b/docs/examples/java/storage/get-bucket.md @@ -10,7 +10,7 @@ Client client = new Client() Storage storage = new Storage(client); storage.getBucket( - "<BUCKET_ID>", // bucketId + "{$example}", // bucketId new CoroutineCallback<>((result, error) -> { if (error != null) { error.printStackTrace(); diff --git a/docs/examples/java/storage/get-file-download.md b/docs/examples/java/storage/get-file-download.md index 32bff0b..4df387d 100644 --- a/docs/examples/java/storage/get-file-download.md +++ b/docs/examples/java/storage/get-file-download.md @@ -10,8 +10,8 @@ Client client = new Client() Storage storage = new Storage(client); storage.getFileDownload( - "<BUCKET_ID>", // bucketId - "<FILE_ID>", // fileId + "{$example}", // bucketId + "{$example}", // fileId new CoroutineCallback<>((result, error) -> { if (error != null) { error.printStackTrace(); diff --git a/docs/examples/java/storage/get-file-preview.md b/docs/examples/java/storage/get-file-preview.md index 650ea4d..a661629 100644 --- a/docs/examples/java/storage/get-file-preview.md +++ b/docs/examples/java/storage/get-file-preview.md @@ -10,8 +10,8 @@ Client client = new Client() Storage storage = new Storage(client); storage.getFilePreview( - "<BUCKET_ID>", // bucketId - "<FILE_ID>", // fileId + "{$example}", // bucketId + "{$example}", // fileId 0, // width (optional) 0, // height (optional) ImageGravity.CENTER, // gravity (optional) diff --git a/docs/examples/java/storage/get-file-view.md b/docs/examples/java/storage/get-file-view.md index 5a81eba..eb6d772 100644 --- a/docs/examples/java/storage/get-file-view.md +++ b/docs/examples/java/storage/get-file-view.md @@ -10,8 +10,8 @@ Client client = new Client() Storage storage = new Storage(client); storage.getFileView( - "<BUCKET_ID>", // bucketId - "<FILE_ID>", // fileId + "{$example}", // bucketId + "{$example}", // fileId new CoroutineCallback<>((result, error) -> { if (error != null) { error.printStackTrace(); diff --git a/docs/examples/java/storage/get-file.md b/docs/examples/java/storage/get-file.md index 004dc01..252b4d4 100644 --- a/docs/examples/java/storage/get-file.md +++ b/docs/examples/java/storage/get-file.md @@ -10,8 +10,8 @@ Client client = new Client() Storage storage = new Storage(client); storage.getFile( - "<BUCKET_ID>", // bucketId - "<FILE_ID>", // fileId + "{$example}", // bucketId + "{$example}", // fileId new CoroutineCallback<>((result, error) -> { if (error != null) { error.printStackTrace(); diff --git a/docs/examples/java/storage/list-buckets.md b/docs/examples/java/storage/list-buckets.md index 8ab56e3..745a48a 100644 --- a/docs/examples/java/storage/list-buckets.md +++ b/docs/examples/java/storage/list-buckets.md @@ -11,7 +11,7 @@ Storage storage = new Storage(client); storage.listBuckets( listOf(), // queries (optional) - "<SEARCH>", // search (optional) + "{$example}", // search (optional) new CoroutineCallback<>((result, error) -> { if (error != null) { error.printStackTrace(); diff --git a/docs/examples/java/storage/list-files.md b/docs/examples/java/storage/list-files.md index 6fbd2c3..7d0706f 100644 --- a/docs/examples/java/storage/list-files.md +++ b/docs/examples/java/storage/list-files.md @@ -10,9 +10,9 @@ Client client = new Client() Storage storage = new Storage(client); storage.listFiles( - "<BUCKET_ID>", // bucketId + "{$example}", // bucketId listOf(), // queries (optional) - "<SEARCH>", // search (optional) + "{$example}", // search (optional) new CoroutineCallback<>((result, error) -> { if (error != null) { error.printStackTrace(); diff --git a/docs/examples/java/storage/update-bucket.md b/docs/examples/java/storage/update-bucket.md index 342174e..a016c89 100644 --- a/docs/examples/java/storage/update-bucket.md +++ b/docs/examples/java/storage/update-bucket.md @@ -10,8 +10,8 @@ Client client = new Client() Storage storage = new Storage(client); storage.updateBucket( - "<BUCKET_ID>", // bucketId - "<NAME>", // name + "{$example}", // bucketId + "{$example}", // name listOf("read("any")"), // permissions (optional) false, // fileSecurity (optional) false, // enabled (optional) diff --git a/docs/examples/java/storage/update-file.md b/docs/examples/java/storage/update-file.md index 3578bcd..fe69341 100644 --- a/docs/examples/java/storage/update-file.md +++ b/docs/examples/java/storage/update-file.md @@ -10,9 +10,9 @@ Client client = new Client() Storage storage = new Storage(client); storage.updateFile( - "<BUCKET_ID>", // bucketId - "<FILE_ID>", // fileId - "<NAME>", // name (optional) + "{$example}", // bucketId + "{$example}", // fileId + "{$example}", // name (optional) listOf("read("any")"), // permissions (optional) new CoroutineCallback<>((result, error) -> { if (error != null) { diff --git a/docs/examples/java/teams/create-membership.md b/docs/examples/java/teams/create-membership.md index f7a4ecb..1261e77 100644 --- a/docs/examples/java/teams/create-membership.md +++ b/docs/examples/java/teams/create-membership.md @@ -10,13 +10,13 @@ Client client = new Client() Teams teams = new Teams(client); teams.createMembership( - "<TEAM_ID>", // teamId + "{$example}", // teamId listOf(), // roles - "email@example.com", // email (optional) - "<USER_ID>", // userId (optional) - "+12065550100", // phone (optional) - "https://example.com", // url (optional) - "<NAME>", // name (optional) + "{$example}", // email (optional) + "{$example}", // userId (optional) + "{$example}", // phone (optional) + "{$example}", // url (optional) + "{$example}", // name (optional) new CoroutineCallback<>((result, error) -> { if (error != null) { error.printStackTrace(); diff --git a/docs/examples/java/teams/create.md b/docs/examples/java/teams/create.md index e8fb127..36202d6 100644 --- a/docs/examples/java/teams/create.md +++ b/docs/examples/java/teams/create.md @@ -10,8 +10,8 @@ Client client = new Client() Teams teams = new Teams(client); teams.create( - "<TEAM_ID>", // teamId - "<NAME>", // name + "{$example}", // teamId + "{$example}", // name listOf(), // roles (optional) new CoroutineCallback<>((result, error) -> { if (error != null) { diff --git a/docs/examples/java/teams/delete-membership.md b/docs/examples/java/teams/delete-membership.md index 0fe1e17..7e0d875 100644 --- a/docs/examples/java/teams/delete-membership.md +++ b/docs/examples/java/teams/delete-membership.md @@ -10,8 +10,8 @@ Client client = new Client() Teams teams = new Teams(client); teams.deleteMembership( - "<TEAM_ID>", // teamId - "<MEMBERSHIP_ID>", // membershipId + "{$example}", // teamId + "{$example}", // membershipId new CoroutineCallback<>((result, error) -> { if (error != null) { error.printStackTrace(); diff --git a/docs/examples/java/teams/delete.md b/docs/examples/java/teams/delete.md index 74f5a7c..fece403 100644 --- a/docs/examples/java/teams/delete.md +++ b/docs/examples/java/teams/delete.md @@ -10,7 +10,7 @@ Client client = new Client() Teams teams = new Teams(client); teams.delete( - "<TEAM_ID>", // teamId + "{$example}", // teamId new CoroutineCallback<>((result, error) -> { if (error != null) { error.printStackTrace(); diff --git a/docs/examples/java/teams/get-membership.md b/docs/examples/java/teams/get-membership.md index d013d91..421b7dd 100644 --- a/docs/examples/java/teams/get-membership.md +++ b/docs/examples/java/teams/get-membership.md @@ -10,8 +10,8 @@ Client client = new Client() Teams teams = new Teams(client); teams.getMembership( - "<TEAM_ID>", // teamId - "<MEMBERSHIP_ID>", // membershipId + "{$example}", // teamId + "{$example}", // membershipId new CoroutineCallback<>((result, error) -> { if (error != null) { error.printStackTrace(); diff --git a/docs/examples/java/teams/get-prefs.md b/docs/examples/java/teams/get-prefs.md index 27cd6f9..ebbe1ea 100644 --- a/docs/examples/java/teams/get-prefs.md +++ b/docs/examples/java/teams/get-prefs.md @@ -10,7 +10,7 @@ Client client = new Client() Teams teams = new Teams(client); teams.getPrefs( - "<TEAM_ID>", // teamId + "{$example}", // teamId new CoroutineCallback<>((result, error) -> { if (error != null) { error.printStackTrace(); diff --git a/docs/examples/java/teams/get.md b/docs/examples/java/teams/get.md index 0416602..bdbee72 100644 --- a/docs/examples/java/teams/get.md +++ b/docs/examples/java/teams/get.md @@ -10,7 +10,7 @@ Client client = new Client() Teams teams = new Teams(client); teams.get( - "<TEAM_ID>", // teamId + "{$example}", // teamId new CoroutineCallback<>((result, error) -> { if (error != null) { error.printStackTrace(); diff --git a/docs/examples/java/teams/list-memberships.md b/docs/examples/java/teams/list-memberships.md index 0260673..966fd8f 100644 --- a/docs/examples/java/teams/list-memberships.md +++ b/docs/examples/java/teams/list-memberships.md @@ -10,9 +10,9 @@ Client client = new Client() Teams teams = new Teams(client); teams.listMemberships( - "<TEAM_ID>", // teamId + "{$example}", // teamId listOf(), // queries (optional) - "<SEARCH>", // search (optional) + "{$example}", // search (optional) new CoroutineCallback<>((result, error) -> { if (error != null) { error.printStackTrace(); diff --git a/docs/examples/java/teams/list.md b/docs/examples/java/teams/list.md index a4e85ac..3789dc3 100644 --- a/docs/examples/java/teams/list.md +++ b/docs/examples/java/teams/list.md @@ -11,7 +11,7 @@ Teams teams = new Teams(client); teams.list( listOf(), // queries (optional) - "<SEARCH>", // search (optional) + "{$example}", // search (optional) new CoroutineCallback<>((result, error) -> { if (error != null) { error.printStackTrace(); diff --git a/docs/examples/java/teams/update-membership-status.md b/docs/examples/java/teams/update-membership-status.md index 8ca3398..42de56e 100644 --- a/docs/examples/java/teams/update-membership-status.md +++ b/docs/examples/java/teams/update-membership-status.md @@ -10,10 +10,10 @@ Client client = new Client() Teams teams = new Teams(client); teams.updateMembershipStatus( - "<TEAM_ID>", // teamId - "<MEMBERSHIP_ID>", // membershipId - "<USER_ID>", // userId - "<SECRET>", // secret + "{$example}", // teamId + "{$example}", // membershipId + "{$example}", // userId + "{$example}", // secret new CoroutineCallback<>((result, error) -> { if (error != null) { error.printStackTrace(); diff --git a/docs/examples/java/teams/update-membership.md b/docs/examples/java/teams/update-membership.md index 60be82c..6be491a 100644 --- a/docs/examples/java/teams/update-membership.md +++ b/docs/examples/java/teams/update-membership.md @@ -10,8 +10,8 @@ Client client = new Client() Teams teams = new Teams(client); teams.updateMembership( - "<TEAM_ID>", // teamId - "<MEMBERSHIP_ID>", // membershipId + "{$example}", // teamId + "{$example}", // membershipId listOf(), // roles new CoroutineCallback<>((result, error) -> { if (error != null) { diff --git a/docs/examples/java/teams/update-name.md b/docs/examples/java/teams/update-name.md index 8db6f04..24783a2 100644 --- a/docs/examples/java/teams/update-name.md +++ b/docs/examples/java/teams/update-name.md @@ -10,8 +10,8 @@ Client client = new Client() Teams teams = new Teams(client); teams.updateName( - "<TEAM_ID>", // teamId - "<NAME>", // name + "{$example}", // teamId + "{$example}", // name new CoroutineCallback<>((result, error) -> { if (error != null) { error.printStackTrace(); diff --git a/docs/examples/java/teams/update-prefs.md b/docs/examples/java/teams/update-prefs.md index 91f1492..2fe3472 100644 --- a/docs/examples/java/teams/update-prefs.md +++ b/docs/examples/java/teams/update-prefs.md @@ -10,7 +10,7 @@ Client client = new Client() Teams teams = new Teams(client); teams.updatePrefs( - "<TEAM_ID>", // teamId + "{$example}", // teamId mapOf( "a" to "b" ), // prefs new CoroutineCallback<>((result, error) -> { if (error != null) { diff --git a/docs/examples/java/users/create-argon2user.md b/docs/examples/java/users/create-argon2user.md index 0127526..ffbeacf 100644 --- a/docs/examples/java/users/create-argon2user.md +++ b/docs/examples/java/users/create-argon2user.md @@ -10,10 +10,10 @@ Client client = new Client() Users users = new Users(client); users.createArgon2User( - "<USER_ID>", // userId - "email@example.com", // email - "password", // password - "<NAME>", // name (optional) + "{$example}", // userId + "{$example}", // email + "{$example}", // password + "{$example}", // name (optional) new CoroutineCallback<>((result, error) -> { if (error != null) { error.printStackTrace(); diff --git a/docs/examples/java/users/create-bcrypt-user.md b/docs/examples/java/users/create-bcrypt-user.md index c98939b..091a172 100644 --- a/docs/examples/java/users/create-bcrypt-user.md +++ b/docs/examples/java/users/create-bcrypt-user.md @@ -10,10 +10,10 @@ Client client = new Client() Users users = new Users(client); users.createBcryptUser( - "<USER_ID>", // userId - "email@example.com", // email - "password", // password - "<NAME>", // name (optional) + "{$example}", // userId + "{$example}", // email + "{$example}", // password + "{$example}", // name (optional) new CoroutineCallback<>((result, error) -> { if (error != null) { error.printStackTrace(); diff --git a/docs/examples/java/users/create-j-w-t.md b/docs/examples/java/users/create-j-w-t.md index c4538b7..c909aa1 100644 --- a/docs/examples/java/users/create-j-w-t.md +++ b/docs/examples/java/users/create-j-w-t.md @@ -10,8 +10,8 @@ Client client = new Client() Users users = new Users(client); users.createJWT( - "<USER_ID>", // userId - "<SESSION_ID>", // sessionId (optional) + "{$example}", // userId + "{$example}", // sessionId (optional) 0, // duration (optional) new CoroutineCallback<>((result, error) -> { if (error != null) { diff --git a/docs/examples/java/users/create-m-d5user.md b/docs/examples/java/users/create-m-d5user.md index 0456a77..53ea58d 100644 --- a/docs/examples/java/users/create-m-d5user.md +++ b/docs/examples/java/users/create-m-d5user.md @@ -10,10 +10,10 @@ Client client = new Client() Users users = new Users(client); users.createMD5User( - "<USER_ID>", // userId - "email@example.com", // email - "password", // password - "<NAME>", // name (optional) + "{$example}", // userId + "{$example}", // email + "{$example}", // password + "{$example}", // name (optional) new CoroutineCallback<>((result, error) -> { if (error != null) { error.printStackTrace(); diff --git a/docs/examples/java/users/create-mfa-recovery-codes.md b/docs/examples/java/users/create-mfa-recovery-codes.md index f9dfbe8..91c292e 100644 --- a/docs/examples/java/users/create-mfa-recovery-codes.md +++ b/docs/examples/java/users/create-mfa-recovery-codes.md @@ -10,7 +10,7 @@ Client client = new Client() Users users = new Users(client); users.createMfaRecoveryCodes( - "<USER_ID>", // userId + "{$example}", // userId new CoroutineCallback<>((result, error) -> { if (error != null) { error.printStackTrace(); diff --git a/docs/examples/java/users/create-p-h-pass-user.md b/docs/examples/java/users/create-p-h-pass-user.md index e977678..45c42fe 100644 --- a/docs/examples/java/users/create-p-h-pass-user.md +++ b/docs/examples/java/users/create-p-h-pass-user.md @@ -10,10 +10,10 @@ Client client = new Client() Users users = new Users(client); users.createPHPassUser( - "<USER_ID>", // userId - "email@example.com", // email - "password", // password - "<NAME>", // name (optional) + "{$example}", // userId + "{$example}", // email + "{$example}", // password + "{$example}", // name (optional) new CoroutineCallback<>((result, error) -> { if (error != null) { error.printStackTrace(); diff --git a/docs/examples/java/users/create-s-h-a-user.md b/docs/examples/java/users/create-s-h-a-user.md index 6a3869c..8fdecc1 100644 --- a/docs/examples/java/users/create-s-h-a-user.md +++ b/docs/examples/java/users/create-s-h-a-user.md @@ -10,11 +10,11 @@ Client client = new Client() Users users = new Users(client); users.createSHAUser( - "<USER_ID>", // userId - "email@example.com", // email - "password", // password + "{$example}", // userId + "{$example}", // email + "{$example}", // password PasswordHash.SHA1, // passwordVersion (optional) - "<NAME>", // name (optional) + "{$example}", // name (optional) new CoroutineCallback<>((result, error) -> { if (error != null) { error.printStackTrace(); diff --git a/docs/examples/java/users/create-scrypt-modified-user.md b/docs/examples/java/users/create-scrypt-modified-user.md index 28d5881..1e4c784 100644 --- a/docs/examples/java/users/create-scrypt-modified-user.md +++ b/docs/examples/java/users/create-scrypt-modified-user.md @@ -10,13 +10,13 @@ Client client = new Client() Users users = new Users(client); users.createScryptModifiedUser( - "<USER_ID>", // userId - "email@example.com", // email - "password", // password - "<PASSWORD_SALT>", // passwordSalt - "<PASSWORD_SALT_SEPARATOR>", // passwordSaltSeparator - "<PASSWORD_SIGNER_KEY>", // passwordSignerKey - "<NAME>", // name (optional) + "{$example}", // userId + "{$example}", // email + "{$example}", // password + "{$example}", // passwordSalt + "{$example}", // passwordSaltSeparator + "{$example}", // passwordSignerKey + "{$example}", // name (optional) new CoroutineCallback<>((result, error) -> { if (error != null) { error.printStackTrace(); diff --git a/docs/examples/java/users/create-scrypt-user.md b/docs/examples/java/users/create-scrypt-user.md index 43e1ad8..2028ef1 100644 --- a/docs/examples/java/users/create-scrypt-user.md +++ b/docs/examples/java/users/create-scrypt-user.md @@ -10,15 +10,15 @@ Client client = new Client() Users users = new Users(client); users.createScryptUser( - "<USER_ID>", // userId - "email@example.com", // email - "password", // password - "<PASSWORD_SALT>", // passwordSalt + "{$example}", // userId + "{$example}", // email + "{$example}", // password + "{$example}", // passwordSalt 0, // passwordCpu 0, // passwordMemory 0, // passwordParallel 0, // passwordLength - "<NAME>", // name (optional) + "{$example}", // name (optional) new CoroutineCallback<>((result, error) -> { if (error != null) { error.printStackTrace(); diff --git a/docs/examples/java/users/create-session.md b/docs/examples/java/users/create-session.md index bc7dfb0..db3b6ec 100644 --- a/docs/examples/java/users/create-session.md +++ b/docs/examples/java/users/create-session.md @@ -10,7 +10,7 @@ Client client = new Client() Users users = new Users(client); users.createSession( - "<USER_ID>", // userId + "{$example}", // userId new CoroutineCallback<>((result, error) -> { if (error != null) { error.printStackTrace(); diff --git a/docs/examples/java/users/create-target.md b/docs/examples/java/users/create-target.md index 6bad1ce..3bfdd49 100644 --- a/docs/examples/java/users/create-target.md +++ b/docs/examples/java/users/create-target.md @@ -11,12 +11,12 @@ Client client = new Client() Users users = new Users(client); users.createTarget( - "<USER_ID>", // userId - "<TARGET_ID>", // targetId + "{$example}", // userId + "{$example}", // targetId MessagingProviderType.EMAIL, // providerType - "<IDENTIFIER>", // identifier - "<PROVIDER_ID>", // providerId (optional) - "<NAME>", // name (optional) + "{$example}", // identifier + "{$example}", // providerId (optional) + "{$example}", // name (optional) new CoroutineCallback<>((result, error) -> { if (error != null) { error.printStackTrace(); diff --git a/docs/examples/java/users/create-token.md b/docs/examples/java/users/create-token.md index 9389e0e..0e5ce2f 100644 --- a/docs/examples/java/users/create-token.md +++ b/docs/examples/java/users/create-token.md @@ -10,7 +10,7 @@ Client client = new Client() Users users = new Users(client); users.createToken( - "<USER_ID>", // userId + "{$example}", // userId 4, // length (optional) 60, // expire (optional) new CoroutineCallback<>((result, error) -> { diff --git a/docs/examples/java/users/create.md b/docs/examples/java/users/create.md index 9889129..8a8ca05 100644 --- a/docs/examples/java/users/create.md +++ b/docs/examples/java/users/create.md @@ -10,11 +10,11 @@ Client client = new Client() Users users = new Users(client); users.create( - "<USER_ID>", // userId - "email@example.com", // email (optional) - "+12065550100", // phone (optional) + "{$example}", // userId + "{$example}", // email (optional) + "{$example}", // phone (optional) "", // password (optional) - "<NAME>", // name (optional) + "{$example}", // name (optional) new CoroutineCallback<>((result, error) -> { if (error != null) { error.printStackTrace(); diff --git a/docs/examples/java/users/delete-identity.md b/docs/examples/java/users/delete-identity.md index 063a91d..7bfd72d 100644 --- a/docs/examples/java/users/delete-identity.md +++ b/docs/examples/java/users/delete-identity.md @@ -10,7 +10,7 @@ Client client = new Client() Users users = new Users(client); users.deleteIdentity( - "<IDENTITY_ID>", // identityId + "{$example}", // identityId new CoroutineCallback<>((result, error) -> { if (error != null) { error.printStackTrace(); diff --git a/docs/examples/java/users/delete-mfa-authenticator.md b/docs/examples/java/users/delete-mfa-authenticator.md index cd5d9ab..acb9b62 100644 --- a/docs/examples/java/users/delete-mfa-authenticator.md +++ b/docs/examples/java/users/delete-mfa-authenticator.md @@ -11,7 +11,7 @@ Client client = new Client() Users users = new Users(client); users.deleteMfaAuthenticator( - "<USER_ID>", // userId + "{$example}", // userId AuthenticatorType.TOTP, // type new CoroutineCallback<>((result, error) -> { if (error != null) { diff --git a/docs/examples/java/users/delete-session.md b/docs/examples/java/users/delete-session.md index 4ed2713..acd4626 100644 --- a/docs/examples/java/users/delete-session.md +++ b/docs/examples/java/users/delete-session.md @@ -10,8 +10,8 @@ Client client = new Client() Users users = new Users(client); users.deleteSession( - "<USER_ID>", // userId - "<SESSION_ID>", // sessionId + "{$example}", // userId + "{$example}", // sessionId new CoroutineCallback<>((result, error) -> { if (error != null) { error.printStackTrace(); diff --git a/docs/examples/java/users/delete-sessions.md b/docs/examples/java/users/delete-sessions.md index f0da6e0..2faceb7 100644 --- a/docs/examples/java/users/delete-sessions.md +++ b/docs/examples/java/users/delete-sessions.md @@ -10,7 +10,7 @@ Client client = new Client() Users users = new Users(client); users.deleteSessions( - "<USER_ID>", // userId + "{$example}", // userId new CoroutineCallback<>((result, error) -> { if (error != null) { error.printStackTrace(); diff --git a/docs/examples/java/users/delete-target.md b/docs/examples/java/users/delete-target.md index ddd0460..8f9f94e 100644 --- a/docs/examples/java/users/delete-target.md +++ b/docs/examples/java/users/delete-target.md @@ -10,8 +10,8 @@ Client client = new Client() Users users = new Users(client); users.deleteTarget( - "<USER_ID>", // userId - "<TARGET_ID>", // targetId + "{$example}", // userId + "{$example}", // targetId new CoroutineCallback<>((result, error) -> { if (error != null) { error.printStackTrace(); diff --git a/docs/examples/java/users/delete.md b/docs/examples/java/users/delete.md index 6a256f8..da6221c 100644 --- a/docs/examples/java/users/delete.md +++ b/docs/examples/java/users/delete.md @@ -10,7 +10,7 @@ Client client = new Client() Users users = new Users(client); users.delete( - "<USER_ID>", // userId + "{$example}", // userId new CoroutineCallback<>((result, error) -> { if (error != null) { error.printStackTrace(); diff --git a/docs/examples/java/users/get-mfa-recovery-codes.md b/docs/examples/java/users/get-mfa-recovery-codes.md index be33d20..8ff2b36 100644 --- a/docs/examples/java/users/get-mfa-recovery-codes.md +++ b/docs/examples/java/users/get-mfa-recovery-codes.md @@ -10,7 +10,7 @@ Client client = new Client() Users users = new Users(client); users.getMfaRecoveryCodes( - "<USER_ID>", // userId + "{$example}", // userId new CoroutineCallback<>((result, error) -> { if (error != null) { error.printStackTrace(); diff --git a/docs/examples/java/users/get-prefs.md b/docs/examples/java/users/get-prefs.md index 3e36f16..09a8e7d 100644 --- a/docs/examples/java/users/get-prefs.md +++ b/docs/examples/java/users/get-prefs.md @@ -10,7 +10,7 @@ Client client = new Client() Users users = new Users(client); users.getPrefs( - "<USER_ID>", // userId + "{$example}", // userId new CoroutineCallback<>((result, error) -> { if (error != null) { error.printStackTrace(); diff --git a/docs/examples/java/users/get-target.md b/docs/examples/java/users/get-target.md index 2ee5b4a..8057537 100644 --- a/docs/examples/java/users/get-target.md +++ b/docs/examples/java/users/get-target.md @@ -10,8 +10,8 @@ Client client = new Client() Users users = new Users(client); users.getTarget( - "<USER_ID>", // userId - "<TARGET_ID>", // targetId + "{$example}", // userId + "{$example}", // targetId new CoroutineCallback<>((result, error) -> { if (error != null) { error.printStackTrace(); diff --git a/docs/examples/java/users/get.md b/docs/examples/java/users/get.md index 8c34eba..f53f631 100644 --- a/docs/examples/java/users/get.md +++ b/docs/examples/java/users/get.md @@ -10,7 +10,7 @@ Client client = new Client() Users users = new Users(client); users.get( - "<USER_ID>", // userId + "{$example}", // userId new CoroutineCallback<>((result, error) -> { if (error != null) { error.printStackTrace(); diff --git a/docs/examples/java/users/list-identities.md b/docs/examples/java/users/list-identities.md index 169b414..feea9fd 100644 --- a/docs/examples/java/users/list-identities.md +++ b/docs/examples/java/users/list-identities.md @@ -11,7 +11,7 @@ Users users = new Users(client); users.listIdentities( listOf(), // queries (optional) - "<SEARCH>", // search (optional) + "{$example}", // search (optional) new CoroutineCallback<>((result, error) -> { if (error != null) { error.printStackTrace(); diff --git a/docs/examples/java/users/list-logs.md b/docs/examples/java/users/list-logs.md index f3d2701..46dff30 100644 --- a/docs/examples/java/users/list-logs.md +++ b/docs/examples/java/users/list-logs.md @@ -10,7 +10,7 @@ Client client = new Client() Users users = new Users(client); users.listLogs( - "<USER_ID>", // userId + "{$example}", // userId listOf(), // queries (optional) new CoroutineCallback<>((result, error) -> { if (error != null) { diff --git a/docs/examples/java/users/list-memberships.md b/docs/examples/java/users/list-memberships.md index 4f3cfd8..4ba8d7b 100644 --- a/docs/examples/java/users/list-memberships.md +++ b/docs/examples/java/users/list-memberships.md @@ -10,7 +10,7 @@ Client client = new Client() Users users = new Users(client); users.listMemberships( - "<USER_ID>", // userId + "{$example}", // userId new CoroutineCallback<>((result, error) -> { if (error != null) { error.printStackTrace(); diff --git a/docs/examples/java/users/list-mfa-factors.md b/docs/examples/java/users/list-mfa-factors.md index 4d51ece..a8a52e7 100644 --- a/docs/examples/java/users/list-mfa-factors.md +++ b/docs/examples/java/users/list-mfa-factors.md @@ -10,7 +10,7 @@ Client client = new Client() Users users = new Users(client); users.listMfaFactors( - "<USER_ID>", // userId + "{$example}", // userId new CoroutineCallback<>((result, error) -> { if (error != null) { error.printStackTrace(); diff --git a/docs/examples/java/users/list-sessions.md b/docs/examples/java/users/list-sessions.md index a1d3a3a..f510a62 100644 --- a/docs/examples/java/users/list-sessions.md +++ b/docs/examples/java/users/list-sessions.md @@ -10,7 +10,7 @@ Client client = new Client() Users users = new Users(client); users.listSessions( - "<USER_ID>", // userId + "{$example}", // userId new CoroutineCallback<>((result, error) -> { if (error != null) { error.printStackTrace(); diff --git a/docs/examples/java/users/list-targets.md b/docs/examples/java/users/list-targets.md index ab04577..c78e49f 100644 --- a/docs/examples/java/users/list-targets.md +++ b/docs/examples/java/users/list-targets.md @@ -10,7 +10,7 @@ Client client = new Client() Users users = new Users(client); users.listTargets( - "<USER_ID>", // userId + "{$example}", // userId listOf(), // queries (optional) new CoroutineCallback<>((result, error) -> { if (error != null) { diff --git a/docs/examples/java/users/list.md b/docs/examples/java/users/list.md index a854ba0..8bf739d 100644 --- a/docs/examples/java/users/list.md +++ b/docs/examples/java/users/list.md @@ -11,7 +11,7 @@ Users users = new Users(client); users.list( listOf(), // queries (optional) - "<SEARCH>", // search (optional) + "{$example}", // search (optional) new CoroutineCallback<>((result, error) -> { if (error != null) { error.printStackTrace(); diff --git a/docs/examples/java/users/update-email-verification.md b/docs/examples/java/users/update-email-verification.md index 7423f77..9f89c11 100644 --- a/docs/examples/java/users/update-email-verification.md +++ b/docs/examples/java/users/update-email-verification.md @@ -10,7 +10,7 @@ Client client = new Client() Users users = new Users(client); users.updateEmailVerification( - "<USER_ID>", // userId + "{$example}", // userId false, // emailVerification new CoroutineCallback<>((result, error) -> { if (error != null) { diff --git a/docs/examples/java/users/update-email.md b/docs/examples/java/users/update-email.md index 23e3977..570d9dd 100644 --- a/docs/examples/java/users/update-email.md +++ b/docs/examples/java/users/update-email.md @@ -10,8 +10,8 @@ Client client = new Client() Users users = new Users(client); users.updateEmail( - "<USER_ID>", // userId - "email@example.com", // email + "{$example}", // userId + "{$example}", // email new CoroutineCallback<>((result, error) -> { if (error != null) { error.printStackTrace(); diff --git a/docs/examples/java/users/update-labels.md b/docs/examples/java/users/update-labels.md index acc3d1b..02f41db 100644 --- a/docs/examples/java/users/update-labels.md +++ b/docs/examples/java/users/update-labels.md @@ -10,7 +10,7 @@ Client client = new Client() Users users = new Users(client); users.updateLabels( - "<USER_ID>", // userId + "{$example}", // userId listOf(), // labels new CoroutineCallback<>((result, error) -> { if (error != null) { diff --git a/docs/examples/java/users/update-mfa-recovery-codes.md b/docs/examples/java/users/update-mfa-recovery-codes.md index eb560e7..c8fd89d 100644 --- a/docs/examples/java/users/update-mfa-recovery-codes.md +++ b/docs/examples/java/users/update-mfa-recovery-codes.md @@ -10,7 +10,7 @@ Client client = new Client() Users users = new Users(client); users.updateMfaRecoveryCodes( - "<USER_ID>", // userId + "{$example}", // userId new CoroutineCallback<>((result, error) -> { if (error != null) { error.printStackTrace(); diff --git a/docs/examples/java/users/update-mfa.md b/docs/examples/java/users/update-mfa.md index e1fc96f..4ac83e3 100644 --- a/docs/examples/java/users/update-mfa.md +++ b/docs/examples/java/users/update-mfa.md @@ -10,7 +10,7 @@ Client client = new Client() Users users = new Users(client); users.updateMfa( - "<USER_ID>", // userId + "{$example}", // userId false, // mfa new CoroutineCallback<>((result, error) -> { if (error != null) { diff --git a/docs/examples/java/users/update-name.md b/docs/examples/java/users/update-name.md index e8bfe56..ca8b97b 100644 --- a/docs/examples/java/users/update-name.md +++ b/docs/examples/java/users/update-name.md @@ -10,8 +10,8 @@ Client client = new Client() Users users = new Users(client); users.updateName( - "<USER_ID>", // userId - "<NAME>", // name + "{$example}", // userId + "{$example}", // name new CoroutineCallback<>((result, error) -> { if (error != null) { error.printStackTrace(); diff --git a/docs/examples/java/users/update-password.md b/docs/examples/java/users/update-password.md index bdf31a7..312d04a 100644 --- a/docs/examples/java/users/update-password.md +++ b/docs/examples/java/users/update-password.md @@ -10,7 +10,7 @@ Client client = new Client() Users users = new Users(client); users.updatePassword( - "<USER_ID>", // userId + "{$example}", // userId "", // password new CoroutineCallback<>((result, error) -> { if (error != null) { diff --git a/docs/examples/java/users/update-phone-verification.md b/docs/examples/java/users/update-phone-verification.md index ce2377b..643465c 100644 --- a/docs/examples/java/users/update-phone-verification.md +++ b/docs/examples/java/users/update-phone-verification.md @@ -10,7 +10,7 @@ Client client = new Client() Users users = new Users(client); users.updatePhoneVerification( - "<USER_ID>", // userId + "{$example}", // userId false, // phoneVerification new CoroutineCallback<>((result, error) -> { if (error != null) { diff --git a/docs/examples/java/users/update-phone.md b/docs/examples/java/users/update-phone.md index e0a0a49..e581c5b 100644 --- a/docs/examples/java/users/update-phone.md +++ b/docs/examples/java/users/update-phone.md @@ -10,8 +10,8 @@ Client client = new Client() Users users = new Users(client); users.updatePhone( - "<USER_ID>", // userId - "+12065550100", // number + "{$example}", // userId + "{$example}", // number new CoroutineCallback<>((result, error) -> { if (error != null) { error.printStackTrace(); diff --git a/docs/examples/java/users/update-prefs.md b/docs/examples/java/users/update-prefs.md index 1d1cc7c..b679c0d 100644 --- a/docs/examples/java/users/update-prefs.md +++ b/docs/examples/java/users/update-prefs.md @@ -10,7 +10,7 @@ Client client = new Client() Users users = new Users(client); users.updatePrefs( - "<USER_ID>", // userId + "{$example}", // userId mapOf( "a" to "b" ), // prefs new CoroutineCallback<>((result, error) -> { if (error != null) { diff --git a/docs/examples/java/users/update-status.md b/docs/examples/java/users/update-status.md index e757ece..b0948b7 100644 --- a/docs/examples/java/users/update-status.md +++ b/docs/examples/java/users/update-status.md @@ -10,7 +10,7 @@ Client client = new Client() Users users = new Users(client); users.updateStatus( - "<USER_ID>", // userId + "{$example}", // userId false, // status new CoroutineCallback<>((result, error) -> { if (error != null) { diff --git a/docs/examples/java/users/update-target.md b/docs/examples/java/users/update-target.md index 23ca8d0..5ccd44c 100644 --- a/docs/examples/java/users/update-target.md +++ b/docs/examples/java/users/update-target.md @@ -10,11 +10,11 @@ Client client = new Client() Users users = new Users(client); users.updateTarget( - "<USER_ID>", // userId - "<TARGET_ID>", // targetId - "<IDENTIFIER>", // identifier (optional) - "<PROVIDER_ID>", // providerId (optional) - "<NAME>", // name (optional) + "{$example}", // userId + "{$example}", // targetId + "{$example}", // identifier (optional) + "{$example}", // providerId (optional) + "{$example}", // name (optional) new CoroutineCallback<>((result, error) -> { if (error != null) { error.printStackTrace(); diff --git a/docs/examples/kotlin/account/create-email-password-session.md b/docs/examples/kotlin/account/create-email-password-session.md index cc3b8cb..7a4002c 100644 --- a/docs/examples/kotlin/account/create-email-password-session.md +++ b/docs/examples/kotlin/account/create-email-password-session.md @@ -9,6 +9,6 @@ val client = Client() val account = Account(client) val response = account.createEmailPasswordSession( - email = "email@example.com", - password = "password" + email = "{$example}", + password = "{$example}" ) diff --git a/docs/examples/kotlin/account/create-email-token.md b/docs/examples/kotlin/account/create-email-token.md index b56e489..91fef00 100644 --- a/docs/examples/kotlin/account/create-email-token.md +++ b/docs/examples/kotlin/account/create-email-token.md @@ -9,7 +9,7 @@ val client = Client() val account = Account(client) val response = account.createEmailToken( - userId = "<USER_ID>", - email = "email@example.com", + userId = "{$example}", + email = "{$example}", phrase = false // optional ) diff --git a/docs/examples/kotlin/account/create-magic-u-r-l-token.md b/docs/examples/kotlin/account/create-magic-u-r-l-token.md index ba66695..eb16ecf 100644 --- a/docs/examples/kotlin/account/create-magic-u-r-l-token.md +++ b/docs/examples/kotlin/account/create-magic-u-r-l-token.md @@ -9,8 +9,8 @@ val client = Client() val account = Account(client) val response = account.createMagicURLToken( - userId = "<USER_ID>", - email = "email@example.com", - url = "https://example.com", // optional + userId = "{$example}", + email = "{$example}", + url = "{$example}", // optional phrase = false // optional ) diff --git a/docs/examples/kotlin/account/create-o-auth2token.md b/docs/examples/kotlin/account/create-o-auth2token.md index 62d176d..b9cd2d6 100644 --- a/docs/examples/kotlin/account/create-o-auth2token.md +++ b/docs/examples/kotlin/account/create-o-auth2token.md @@ -11,7 +11,7 @@ val account = Account(client) account.createOAuth2Token( provider = OAuthProvider.AMAZON, - success = "https://example.com", // optional - failure = "https://example.com", // optional + success = "{$example}", // optional + failure = "{$example}", // optional scopes = listOf() // optional ) diff --git a/docs/examples/kotlin/account/create-phone-token.md b/docs/examples/kotlin/account/create-phone-token.md index b9633e7..23cff34 100644 --- a/docs/examples/kotlin/account/create-phone-token.md +++ b/docs/examples/kotlin/account/create-phone-token.md @@ -9,6 +9,6 @@ val client = Client() val account = Account(client) val response = account.createPhoneToken( - userId = "<USER_ID>", - phone = "+12065550100" + userId = "{$example}", + phone = "{$example}" ) diff --git a/docs/examples/kotlin/account/create-recovery.md b/docs/examples/kotlin/account/create-recovery.md index 27c6af5..015e804 100644 --- a/docs/examples/kotlin/account/create-recovery.md +++ b/docs/examples/kotlin/account/create-recovery.md @@ -10,6 +10,6 @@ val client = Client() val account = Account(client) val response = account.createRecovery( - email = "email@example.com", - url = "https://example.com" + email = "{$example}", + url = "{$example}" ) diff --git a/docs/examples/kotlin/account/create-session.md b/docs/examples/kotlin/account/create-session.md index 5e6c47c..9df922e 100644 --- a/docs/examples/kotlin/account/create-session.md +++ b/docs/examples/kotlin/account/create-session.md @@ -9,6 +9,6 @@ val client = Client() val account = Account(client) val response = account.createSession( - userId = "<USER_ID>", - secret = "<SECRET>" + userId = "{$example}", + secret = "{$example}" ) diff --git a/docs/examples/kotlin/account/create-verification.md b/docs/examples/kotlin/account/create-verification.md index 0d42f8a..d70b509 100644 --- a/docs/examples/kotlin/account/create-verification.md +++ b/docs/examples/kotlin/account/create-verification.md @@ -10,5 +10,5 @@ val client = Client() val account = Account(client) val response = account.createVerification( - url = "https://example.com" + url = "{$example}" ) diff --git a/docs/examples/kotlin/account/create.md b/docs/examples/kotlin/account/create.md index 19d7c12..2195803 100644 --- a/docs/examples/kotlin/account/create.md +++ b/docs/examples/kotlin/account/create.md @@ -9,8 +9,8 @@ val client = Client() val account = Account(client) val response = account.create( - userId = "<USER_ID>", - email = "email@example.com", + userId = "{$example}", + email = "{$example}", password = "", - name = "<NAME>" // optional + name = "{$example}" // optional ) diff --git a/docs/examples/kotlin/account/delete-identity.md b/docs/examples/kotlin/account/delete-identity.md index f6ede24..576f99a 100644 --- a/docs/examples/kotlin/account/delete-identity.md +++ b/docs/examples/kotlin/account/delete-identity.md @@ -10,5 +10,5 @@ val client = Client() val account = Account(client) val response = account.deleteIdentity( - identityId = "<IDENTITY_ID>" + identityId = "{$example}" ) diff --git a/docs/examples/kotlin/account/delete-session.md b/docs/examples/kotlin/account/delete-session.md index 47b80d7..da9dce8 100644 --- a/docs/examples/kotlin/account/delete-session.md +++ b/docs/examples/kotlin/account/delete-session.md @@ -10,5 +10,5 @@ val client = Client() val account = Account(client) val response = account.deleteSession( - sessionId = "<SESSION_ID>" + sessionId = "{$example}" ) diff --git a/docs/examples/kotlin/account/get-session.md b/docs/examples/kotlin/account/get-session.md index 78478e1..8943b0f 100644 --- a/docs/examples/kotlin/account/get-session.md +++ b/docs/examples/kotlin/account/get-session.md @@ -10,5 +10,5 @@ val client = Client() val account = Account(client) val response = account.getSession( - sessionId = "<SESSION_ID>" + sessionId = "{$example}" ) diff --git a/docs/examples/kotlin/account/update-email.md b/docs/examples/kotlin/account/update-email.md index c10c25e..721069c 100644 --- a/docs/examples/kotlin/account/update-email.md +++ b/docs/examples/kotlin/account/update-email.md @@ -10,6 +10,6 @@ val client = Client() val account = Account(client) val response = account.updateEmail( - email = "email@example.com", - password = "password" + email = "{$example}", + password = "{$example}" ) diff --git a/docs/examples/kotlin/account/update-magic-u-r-l-session.md b/docs/examples/kotlin/account/update-magic-u-r-l-session.md index 99b65eb..d44a1c9 100644 --- a/docs/examples/kotlin/account/update-magic-u-r-l-session.md +++ b/docs/examples/kotlin/account/update-magic-u-r-l-session.md @@ -9,6 +9,6 @@ val client = Client() val account = Account(client) val response = account.updateMagicURLSession( - userId = "<USER_ID>", - secret = "<SECRET>" + userId = "{$example}", + secret = "{$example}" ) diff --git a/docs/examples/kotlin/account/update-mfa-authenticator.md b/docs/examples/kotlin/account/update-mfa-authenticator.md index 482dfb3..ad7ba90 100644 --- a/docs/examples/kotlin/account/update-mfa-authenticator.md +++ b/docs/examples/kotlin/account/update-mfa-authenticator.md @@ -12,5 +12,5 @@ val account = Account(client) val response = account.updateMfaAuthenticator( type = AuthenticatorType.TOTP, - otp = "<OTP>" + otp = "{$example}" ) diff --git a/docs/examples/kotlin/account/update-mfa-challenge.md b/docs/examples/kotlin/account/update-mfa-challenge.md index 2a9a1a4..3c17b77 100644 --- a/docs/examples/kotlin/account/update-mfa-challenge.md +++ b/docs/examples/kotlin/account/update-mfa-challenge.md @@ -10,6 +10,6 @@ val client = Client() val account = Account(client) val response = account.updateMfaChallenge( - challengeId = "<CHALLENGE_ID>", - otp = "<OTP>" + challengeId = "{$example}", + otp = "{$example}" ) diff --git a/docs/examples/kotlin/account/update-name.md b/docs/examples/kotlin/account/update-name.md index 13f9019..99f3bbe 100644 --- a/docs/examples/kotlin/account/update-name.md +++ b/docs/examples/kotlin/account/update-name.md @@ -10,5 +10,5 @@ val client = Client() val account = Account(client) val response = account.updateName( - name = "<NAME>" + name = "{$example}" ) diff --git a/docs/examples/kotlin/account/update-password.md b/docs/examples/kotlin/account/update-password.md index fbb6796..25f5331 100644 --- a/docs/examples/kotlin/account/update-password.md +++ b/docs/examples/kotlin/account/update-password.md @@ -11,5 +11,5 @@ val account = Account(client) val response = account.updatePassword( password = "", - oldPassword = "password" // optional + oldPassword = "{$example}" // optional ) diff --git a/docs/examples/kotlin/account/update-phone-session.md b/docs/examples/kotlin/account/update-phone-session.md index 1f6aa40..20d058e 100644 --- a/docs/examples/kotlin/account/update-phone-session.md +++ b/docs/examples/kotlin/account/update-phone-session.md @@ -9,6 +9,6 @@ val client = Client() val account = Account(client) val response = account.updatePhoneSession( - userId = "<USER_ID>", - secret = "<SECRET>" + userId = "{$example}", + secret = "{$example}" ) diff --git a/docs/examples/kotlin/account/update-phone-verification.md b/docs/examples/kotlin/account/update-phone-verification.md index 87cd3ff..9ea0fe2 100644 --- a/docs/examples/kotlin/account/update-phone-verification.md +++ b/docs/examples/kotlin/account/update-phone-verification.md @@ -10,6 +10,6 @@ val client = Client() val account = Account(client) val response = account.updatePhoneVerification( - userId = "<USER_ID>", - secret = "<SECRET>" + userId = "{$example}", + secret = "{$example}" ) diff --git a/docs/examples/kotlin/account/update-phone.md b/docs/examples/kotlin/account/update-phone.md index 1a2600c..0ad0087 100644 --- a/docs/examples/kotlin/account/update-phone.md +++ b/docs/examples/kotlin/account/update-phone.md @@ -10,6 +10,6 @@ val client = Client() val account = Account(client) val response = account.updatePhone( - phone = "+12065550100", - password = "password" + phone = "{$example}", + password = "{$example}" ) diff --git a/docs/examples/kotlin/account/update-recovery.md b/docs/examples/kotlin/account/update-recovery.md index 8626e97..6f23361 100644 --- a/docs/examples/kotlin/account/update-recovery.md +++ b/docs/examples/kotlin/account/update-recovery.md @@ -10,7 +10,7 @@ val client = Client() val account = Account(client) val response = account.updateRecovery( - userId = "<USER_ID>", - secret = "<SECRET>", + userId = "{$example}", + secret = "{$example}", password = "" ) diff --git a/docs/examples/kotlin/account/update-session.md b/docs/examples/kotlin/account/update-session.md index 5f83a2b..80960ae 100644 --- a/docs/examples/kotlin/account/update-session.md +++ b/docs/examples/kotlin/account/update-session.md @@ -10,5 +10,5 @@ val client = Client() val account = Account(client) val response = account.updateSession( - sessionId = "<SESSION_ID>" + sessionId = "{$example}" ) diff --git a/docs/examples/kotlin/account/update-verification.md b/docs/examples/kotlin/account/update-verification.md index 2f8cc25..0a37414 100644 --- a/docs/examples/kotlin/account/update-verification.md +++ b/docs/examples/kotlin/account/update-verification.md @@ -10,6 +10,6 @@ val client = Client() val account = Account(client) val response = account.updateVerification( - userId = "<USER_ID>", - secret = "<SECRET>" + userId = "{$example}", + secret = "{$example}" ) diff --git a/docs/examples/kotlin/avatars/get-favicon.md b/docs/examples/kotlin/avatars/get-favicon.md index 8cf4af2..cdded7d 100644 --- a/docs/examples/kotlin/avatars/get-favicon.md +++ b/docs/examples/kotlin/avatars/get-favicon.md @@ -10,5 +10,5 @@ val client = Client() val avatars = Avatars(client) val result = avatars.getFavicon( - url = "https://example.com" + url = "{$example}" ) diff --git a/docs/examples/kotlin/avatars/get-image.md b/docs/examples/kotlin/avatars/get-image.md index 1369000..7bce377 100644 --- a/docs/examples/kotlin/avatars/get-image.md +++ b/docs/examples/kotlin/avatars/get-image.md @@ -10,7 +10,7 @@ val client = Client() val avatars = Avatars(client) val result = avatars.getImage( - url = "https://example.com", + url = "{$example}", width = 0, // optional height = 0 // optional ) diff --git a/docs/examples/kotlin/avatars/get-initials.md b/docs/examples/kotlin/avatars/get-initials.md index 9549924..8c393b4 100644 --- a/docs/examples/kotlin/avatars/get-initials.md +++ b/docs/examples/kotlin/avatars/get-initials.md @@ -10,7 +10,7 @@ val client = Client() val avatars = Avatars(client) val result = avatars.getInitials( - name = "<NAME>", // optional + name = "{$example}", // optional width = 0, // optional height = 0, // optional background = "" // optional diff --git a/docs/examples/kotlin/avatars/get-q-r.md b/docs/examples/kotlin/avatars/get-q-r.md index cea667b..fcbf579 100644 --- a/docs/examples/kotlin/avatars/get-q-r.md +++ b/docs/examples/kotlin/avatars/get-q-r.md @@ -10,7 +10,7 @@ val client = Client() val avatars = Avatars(client) val result = avatars.getQR( - text = "<TEXT>", + text = "{$example}", size = 1, // optional margin = 0, // optional download = false // optional diff --git a/docs/examples/kotlin/databases/create-boolean-attribute.md b/docs/examples/kotlin/databases/create-boolean-attribute.md index 64ac210..4d28b22 100644 --- a/docs/examples/kotlin/databases/create-boolean-attribute.md +++ b/docs/examples/kotlin/databases/create-boolean-attribute.md @@ -10,8 +10,8 @@ val client = Client() val databases = Databases(client) val response = databases.createBooleanAttribute( - databaseId = "<DATABASE_ID>", - collectionId = "<COLLECTION_ID>", + databaseId = "{$example}", + collectionId = "{$example}", key = "", required = false, default = false, // optional diff --git a/docs/examples/kotlin/databases/create-collection.md b/docs/examples/kotlin/databases/create-collection.md index 03ca6a4..242f4e1 100644 --- a/docs/examples/kotlin/databases/create-collection.md +++ b/docs/examples/kotlin/databases/create-collection.md @@ -10,9 +10,9 @@ val client = Client() val databases = Databases(client) val response = databases.createCollection( - databaseId = "<DATABASE_ID>", - collectionId = "<COLLECTION_ID>", - name = "<NAME>", + databaseId = "{$example}", + collectionId = "{$example}", + name = "{$example}", permissions = listOf("read("any")"), // optional documentSecurity = false, // optional enabled = false // optional diff --git a/docs/examples/kotlin/databases/create-datetime-attribute.md b/docs/examples/kotlin/databases/create-datetime-attribute.md index d9e0771..03ba382 100644 --- a/docs/examples/kotlin/databases/create-datetime-attribute.md +++ b/docs/examples/kotlin/databases/create-datetime-attribute.md @@ -10,8 +10,8 @@ val client = Client() val databases = Databases(client) val response = databases.createDatetimeAttribute( - databaseId = "<DATABASE_ID>", - collectionId = "<COLLECTION_ID>", + databaseId = "{$example}", + collectionId = "{$example}", key = "", required = false, default = "", // optional diff --git a/docs/examples/kotlin/databases/create-document.md b/docs/examples/kotlin/databases/create-document.md index 873e2ed..ab931c8 100644 --- a/docs/examples/kotlin/databases/create-document.md +++ b/docs/examples/kotlin/databases/create-document.md @@ -10,9 +10,9 @@ val client = Client() val databases = Databases(client) val response = databases.createDocument( - databaseId = "<DATABASE_ID>", - collectionId = "<COLLECTION_ID>", - documentId = "<DOCUMENT_ID>", + databaseId = "{$example}", + collectionId = "{$example}", + documentId = "{$example}", data = mapOf( "a" to "b" ), permissions = listOf("read("any")") // optional ) diff --git a/docs/examples/kotlin/databases/create-email-attribute.md b/docs/examples/kotlin/databases/create-email-attribute.md index 5e5091b..c9aaa22 100644 --- a/docs/examples/kotlin/databases/create-email-attribute.md +++ b/docs/examples/kotlin/databases/create-email-attribute.md @@ -10,10 +10,10 @@ val client = Client() val databases = Databases(client) val response = databases.createEmailAttribute( - databaseId = "<DATABASE_ID>", - collectionId = "<COLLECTION_ID>", + databaseId = "{$example}", + collectionId = "{$example}", key = "", required = false, - default = "email@example.com", // optional + default = "{$example}", // optional array = false // optional ) diff --git a/docs/examples/kotlin/databases/create-enum-attribute.md b/docs/examples/kotlin/databases/create-enum-attribute.md index 733fbad..5e1d861 100644 --- a/docs/examples/kotlin/databases/create-enum-attribute.md +++ b/docs/examples/kotlin/databases/create-enum-attribute.md @@ -10,11 +10,11 @@ val client = Client() val databases = Databases(client) val response = databases.createEnumAttribute( - databaseId = "<DATABASE_ID>", - collectionId = "<COLLECTION_ID>", + databaseId = "{$example}", + collectionId = "{$example}", key = "", elements = listOf(), required = false, - default = "<DEFAULT>", // optional + default = "{$example}", // optional array = false // optional ) diff --git a/docs/examples/kotlin/databases/create-float-attribute.md b/docs/examples/kotlin/databases/create-float-attribute.md index 04e9bfa..d8f0d75 100644 --- a/docs/examples/kotlin/databases/create-float-attribute.md +++ b/docs/examples/kotlin/databases/create-float-attribute.md @@ -10,8 +10,8 @@ val client = Client() val databases = Databases(client) val response = databases.createFloatAttribute( - databaseId = "<DATABASE_ID>", - collectionId = "<COLLECTION_ID>", + databaseId = "{$example}", + collectionId = "{$example}", key = "", required = false, min = 0, // optional diff --git a/docs/examples/kotlin/databases/create-index.md b/docs/examples/kotlin/databases/create-index.md index 6dab46f..0e7e904 100644 --- a/docs/examples/kotlin/databases/create-index.md +++ b/docs/examples/kotlin/databases/create-index.md @@ -11,8 +11,8 @@ val client = Client() val databases = Databases(client) val response = databases.createIndex( - databaseId = "<DATABASE_ID>", - collectionId = "<COLLECTION_ID>", + databaseId = "{$example}", + collectionId = "{$example}", key = "", type = IndexType.KEY, attributes = listOf(), diff --git a/docs/examples/kotlin/databases/create-integer-attribute.md b/docs/examples/kotlin/databases/create-integer-attribute.md index 6c483bb..7486536 100644 --- a/docs/examples/kotlin/databases/create-integer-attribute.md +++ b/docs/examples/kotlin/databases/create-integer-attribute.md @@ -10,8 +10,8 @@ val client = Client() val databases = Databases(client) val response = databases.createIntegerAttribute( - databaseId = "<DATABASE_ID>", - collectionId = "<COLLECTION_ID>", + databaseId = "{$example}", + collectionId = "{$example}", key = "", required = false, min = 0, // optional diff --git a/docs/examples/kotlin/databases/create-ip-attribute.md b/docs/examples/kotlin/databases/create-ip-attribute.md index 76dd82d..2987db6 100644 --- a/docs/examples/kotlin/databases/create-ip-attribute.md +++ b/docs/examples/kotlin/databases/create-ip-attribute.md @@ -10,8 +10,8 @@ val client = Client() val databases = Databases(client) val response = databases.createIpAttribute( - databaseId = "<DATABASE_ID>", - collectionId = "<COLLECTION_ID>", + databaseId = "{$example}", + collectionId = "{$example}", key = "", required = false, default = "", // optional diff --git a/docs/examples/kotlin/databases/create-relationship-attribute.md b/docs/examples/kotlin/databases/create-relationship-attribute.md index 4797b94..fde42dd 100644 --- a/docs/examples/kotlin/databases/create-relationship-attribute.md +++ b/docs/examples/kotlin/databases/create-relationship-attribute.md @@ -11,12 +11,12 @@ val client = Client() val databases = Databases(client) val response = databases.createRelationshipAttribute( - databaseId = "<DATABASE_ID>", - collectionId = "<COLLECTION_ID>", - relatedCollectionId = "<RELATED_COLLECTION_ID>", + databaseId = "{$example}", + collectionId = "{$example}", + relatedCollectionId = "{$example}", type = RelationshipType.ONETOONE, twoWay = false, // optional key = "", // optional twoWayKey = "", // optional - onDelete = "cascade" // optional + onDelete = "{$example}" // optional ) diff --git a/docs/examples/kotlin/databases/create-string-attribute.md b/docs/examples/kotlin/databases/create-string-attribute.md index 06781f2..b7a75b2 100644 --- a/docs/examples/kotlin/databases/create-string-attribute.md +++ b/docs/examples/kotlin/databases/create-string-attribute.md @@ -10,12 +10,12 @@ val client = Client() val databases = Databases(client) val response = databases.createStringAttribute( - databaseId = "<DATABASE_ID>", - collectionId = "<COLLECTION_ID>", + databaseId = "{$example}", + collectionId = "{$example}", key = "", size = 1, required = false, - default = "<DEFAULT>", // optional + default = "{$example}", // optional array = false, // optional encrypt = false // optional ) diff --git a/docs/examples/kotlin/databases/create-url-attribute.md b/docs/examples/kotlin/databases/create-url-attribute.md index 33cadc7..7b69262 100644 --- a/docs/examples/kotlin/databases/create-url-attribute.md +++ b/docs/examples/kotlin/databases/create-url-attribute.md @@ -10,10 +10,10 @@ val client = Client() val databases = Databases(client) val response = databases.createUrlAttribute( - databaseId = "<DATABASE_ID>", - collectionId = "<COLLECTION_ID>", + databaseId = "{$example}", + collectionId = "{$example}", key = "", required = false, - default = "https://example.com", // optional + default = "{$example}", // optional array = false // optional ) diff --git a/docs/examples/kotlin/databases/create.md b/docs/examples/kotlin/databases/create.md index c17246f..7578782 100644 --- a/docs/examples/kotlin/databases/create.md +++ b/docs/examples/kotlin/databases/create.md @@ -10,7 +10,7 @@ val client = Client() val databases = Databases(client) val response = databases.create( - databaseId = "<DATABASE_ID>", - name = "<NAME>", + databaseId = "{$example}", + name = "{$example}", enabled = false // optional ) diff --git a/docs/examples/kotlin/databases/delete-attribute.md b/docs/examples/kotlin/databases/delete-attribute.md index 8fed2d8..e239baf 100644 --- a/docs/examples/kotlin/databases/delete-attribute.md +++ b/docs/examples/kotlin/databases/delete-attribute.md @@ -10,7 +10,7 @@ val client = Client() val databases = Databases(client) val response = databases.deleteAttribute( - databaseId = "<DATABASE_ID>", - collectionId = "<COLLECTION_ID>", + databaseId = "{$example}", + collectionId = "{$example}", key = "" ) diff --git a/docs/examples/kotlin/databases/delete-collection.md b/docs/examples/kotlin/databases/delete-collection.md index 2c85947..a04d4bd 100644 --- a/docs/examples/kotlin/databases/delete-collection.md +++ b/docs/examples/kotlin/databases/delete-collection.md @@ -10,6 +10,6 @@ val client = Client() val databases = Databases(client) val response = databases.deleteCollection( - databaseId = "<DATABASE_ID>", - collectionId = "<COLLECTION_ID>" + databaseId = "{$example}", + collectionId = "{$example}" ) diff --git a/docs/examples/kotlin/databases/delete-document.md b/docs/examples/kotlin/databases/delete-document.md index e920841..5774026 100644 --- a/docs/examples/kotlin/databases/delete-document.md +++ b/docs/examples/kotlin/databases/delete-document.md @@ -10,7 +10,7 @@ val client = Client() val databases = Databases(client) val response = databases.deleteDocument( - databaseId = "<DATABASE_ID>", - collectionId = "<COLLECTION_ID>", - documentId = "<DOCUMENT_ID>" + databaseId = "{$example}", + collectionId = "{$example}", + documentId = "{$example}" ) diff --git a/docs/examples/kotlin/databases/delete-index.md b/docs/examples/kotlin/databases/delete-index.md index 8655b6b..d401c9d 100644 --- a/docs/examples/kotlin/databases/delete-index.md +++ b/docs/examples/kotlin/databases/delete-index.md @@ -10,7 +10,7 @@ val client = Client() val databases = Databases(client) val response = databases.deleteIndex( - databaseId = "<DATABASE_ID>", - collectionId = "<COLLECTION_ID>", + databaseId = "{$example}", + collectionId = "{$example}", key = "" ) diff --git a/docs/examples/kotlin/databases/delete.md b/docs/examples/kotlin/databases/delete.md index 13c5660..a769ea6 100644 --- a/docs/examples/kotlin/databases/delete.md +++ b/docs/examples/kotlin/databases/delete.md @@ -10,5 +10,5 @@ val client = Client() val databases = Databases(client) val response = databases.delete( - databaseId = "<DATABASE_ID>" + databaseId = "{$example}" ) diff --git a/docs/examples/kotlin/databases/get-attribute.md b/docs/examples/kotlin/databases/get-attribute.md index 6a7ceb2..16c6a85 100644 --- a/docs/examples/kotlin/databases/get-attribute.md +++ b/docs/examples/kotlin/databases/get-attribute.md @@ -10,7 +10,7 @@ val client = Client() val databases = Databases(client) val response = databases.getAttribute( - databaseId = "<DATABASE_ID>", - collectionId = "<COLLECTION_ID>", + databaseId = "{$example}", + collectionId = "{$example}", key = "" ) diff --git a/docs/examples/kotlin/databases/get-collection.md b/docs/examples/kotlin/databases/get-collection.md index 79980c5..cdc2f97 100644 --- a/docs/examples/kotlin/databases/get-collection.md +++ b/docs/examples/kotlin/databases/get-collection.md @@ -10,6 +10,6 @@ val client = Client() val databases = Databases(client) val response = databases.getCollection( - databaseId = "<DATABASE_ID>", - collectionId = "<COLLECTION_ID>" + databaseId = "{$example}", + collectionId = "{$example}" ) diff --git a/docs/examples/kotlin/databases/get-document.md b/docs/examples/kotlin/databases/get-document.md index 508e0da..e555d21 100644 --- a/docs/examples/kotlin/databases/get-document.md +++ b/docs/examples/kotlin/databases/get-document.md @@ -10,8 +10,8 @@ val client = Client() val databases = Databases(client) val response = databases.getDocument( - databaseId = "<DATABASE_ID>", - collectionId = "<COLLECTION_ID>", - documentId = "<DOCUMENT_ID>", + databaseId = "{$example}", + collectionId = "{$example}", + documentId = "{$example}", queries = listOf() // optional ) diff --git a/docs/examples/kotlin/databases/get-index.md b/docs/examples/kotlin/databases/get-index.md index 3935c38..33041a5 100644 --- a/docs/examples/kotlin/databases/get-index.md +++ b/docs/examples/kotlin/databases/get-index.md @@ -10,7 +10,7 @@ val client = Client() val databases = Databases(client) val response = databases.getIndex( - databaseId = "<DATABASE_ID>", - collectionId = "<COLLECTION_ID>", + databaseId = "{$example}", + collectionId = "{$example}", key = "" ) diff --git a/docs/examples/kotlin/databases/get.md b/docs/examples/kotlin/databases/get.md index bb6b17c..56dd934 100644 --- a/docs/examples/kotlin/databases/get.md +++ b/docs/examples/kotlin/databases/get.md @@ -10,5 +10,5 @@ val client = Client() val databases = Databases(client) val response = databases.get( - databaseId = "<DATABASE_ID>" + databaseId = "{$example}" ) diff --git a/docs/examples/kotlin/databases/list-attributes.md b/docs/examples/kotlin/databases/list-attributes.md index b3f26a2..051c2d2 100644 --- a/docs/examples/kotlin/databases/list-attributes.md +++ b/docs/examples/kotlin/databases/list-attributes.md @@ -10,7 +10,7 @@ val client = Client() val databases = Databases(client) val response = databases.listAttributes( - databaseId = "<DATABASE_ID>", - collectionId = "<COLLECTION_ID>", + databaseId = "{$example}", + collectionId = "{$example}", queries = listOf() // optional ) diff --git a/docs/examples/kotlin/databases/list-collections.md b/docs/examples/kotlin/databases/list-collections.md index 9bdfa6e..05b7430 100644 --- a/docs/examples/kotlin/databases/list-collections.md +++ b/docs/examples/kotlin/databases/list-collections.md @@ -10,7 +10,7 @@ val client = Client() val databases = Databases(client) val response = databases.listCollections( - databaseId = "<DATABASE_ID>", + databaseId = "{$example}", queries = listOf(), // optional - search = "<SEARCH>" // optional + search = "{$example}" // optional ) diff --git a/docs/examples/kotlin/databases/list-documents.md b/docs/examples/kotlin/databases/list-documents.md index 90cef39..1a51d69 100644 --- a/docs/examples/kotlin/databases/list-documents.md +++ b/docs/examples/kotlin/databases/list-documents.md @@ -10,7 +10,7 @@ val client = Client() val databases = Databases(client) val response = databases.listDocuments( - databaseId = "<DATABASE_ID>", - collectionId = "<COLLECTION_ID>", + databaseId = "{$example}", + collectionId = "{$example}", queries = listOf() // optional ) diff --git a/docs/examples/kotlin/databases/list-indexes.md b/docs/examples/kotlin/databases/list-indexes.md index 6dd29ba..28e4637 100644 --- a/docs/examples/kotlin/databases/list-indexes.md +++ b/docs/examples/kotlin/databases/list-indexes.md @@ -10,7 +10,7 @@ val client = Client() val databases = Databases(client) val response = databases.listIndexes( - databaseId = "<DATABASE_ID>", - collectionId = "<COLLECTION_ID>", + databaseId = "{$example}", + collectionId = "{$example}", queries = listOf() // optional ) diff --git a/docs/examples/kotlin/databases/list.md b/docs/examples/kotlin/databases/list.md index f7f332b..82f0598 100644 --- a/docs/examples/kotlin/databases/list.md +++ b/docs/examples/kotlin/databases/list.md @@ -11,5 +11,5 @@ val databases = Databases(client) val response = databases.list( queries = listOf(), // optional - search = "<SEARCH>" // optional + search = "{$example}" // optional ) diff --git a/docs/examples/kotlin/databases/update-boolean-attribute.md b/docs/examples/kotlin/databases/update-boolean-attribute.md index ebffab7..a602d3d 100644 --- a/docs/examples/kotlin/databases/update-boolean-attribute.md +++ b/docs/examples/kotlin/databases/update-boolean-attribute.md @@ -10,8 +10,8 @@ val client = Client() val databases = Databases(client) val response = databases.updateBooleanAttribute( - databaseId = "<DATABASE_ID>", - collectionId = "<COLLECTION_ID>", + databaseId = "{$example}", + collectionId = "{$example}", key = "", required = false, default = false, diff --git a/docs/examples/kotlin/databases/update-collection.md b/docs/examples/kotlin/databases/update-collection.md index 7ceef84..1366927 100644 --- a/docs/examples/kotlin/databases/update-collection.md +++ b/docs/examples/kotlin/databases/update-collection.md @@ -10,9 +10,9 @@ val client = Client() val databases = Databases(client) val response = databases.updateCollection( - databaseId = "<DATABASE_ID>", - collectionId = "<COLLECTION_ID>", - name = "<NAME>", + databaseId = "{$example}", + collectionId = "{$example}", + name = "{$example}", permissions = listOf("read("any")"), // optional documentSecurity = false, // optional enabled = false // optional diff --git a/docs/examples/kotlin/databases/update-datetime-attribute.md b/docs/examples/kotlin/databases/update-datetime-attribute.md index 676c779..d8b8c07 100644 --- a/docs/examples/kotlin/databases/update-datetime-attribute.md +++ b/docs/examples/kotlin/databases/update-datetime-attribute.md @@ -10,8 +10,8 @@ val client = Client() val databases = Databases(client) val response = databases.updateDatetimeAttribute( - databaseId = "<DATABASE_ID>", - collectionId = "<COLLECTION_ID>", + databaseId = "{$example}", + collectionId = "{$example}", key = "", required = false, default = "", diff --git a/docs/examples/kotlin/databases/update-document.md b/docs/examples/kotlin/databases/update-document.md index 1737be1..b0323b1 100644 --- a/docs/examples/kotlin/databases/update-document.md +++ b/docs/examples/kotlin/databases/update-document.md @@ -10,9 +10,9 @@ val client = Client() val databases = Databases(client) val response = databases.updateDocument( - databaseId = "<DATABASE_ID>", - collectionId = "<COLLECTION_ID>", - documentId = "<DOCUMENT_ID>", + databaseId = "{$example}", + collectionId = "{$example}", + documentId = "{$example}", data = mapOf( "a" to "b" ), // optional permissions = listOf("read("any")") // optional ) diff --git a/docs/examples/kotlin/databases/update-email-attribute.md b/docs/examples/kotlin/databases/update-email-attribute.md index 2f1cbd2..b1cd638 100644 --- a/docs/examples/kotlin/databases/update-email-attribute.md +++ b/docs/examples/kotlin/databases/update-email-attribute.md @@ -10,10 +10,10 @@ val client = Client() val databases = Databases(client) val response = databases.updateEmailAttribute( - databaseId = "<DATABASE_ID>", - collectionId = "<COLLECTION_ID>", + databaseId = "{$example}", + collectionId = "{$example}", key = "", required = false, - default = "email@example.com", + default = "{$example}", newKey = "" // optional ) diff --git a/docs/examples/kotlin/databases/update-enum-attribute.md b/docs/examples/kotlin/databases/update-enum-attribute.md index 7c0c92f..2935db8 100644 --- a/docs/examples/kotlin/databases/update-enum-attribute.md +++ b/docs/examples/kotlin/databases/update-enum-attribute.md @@ -10,11 +10,11 @@ val client = Client() val databases = Databases(client) val response = databases.updateEnumAttribute( - databaseId = "<DATABASE_ID>", - collectionId = "<COLLECTION_ID>", + databaseId = "{$example}", + collectionId = "{$example}", key = "", elements = listOf(), required = false, - default = "<DEFAULT>", + default = "{$example}", newKey = "" // optional ) diff --git a/docs/examples/kotlin/databases/update-float-attribute.md b/docs/examples/kotlin/databases/update-float-attribute.md index 4701530..6a7c608 100644 --- a/docs/examples/kotlin/databases/update-float-attribute.md +++ b/docs/examples/kotlin/databases/update-float-attribute.md @@ -10,8 +10,8 @@ val client = Client() val databases = Databases(client) val response = databases.updateFloatAttribute( - databaseId = "<DATABASE_ID>", - collectionId = "<COLLECTION_ID>", + databaseId = "{$example}", + collectionId = "{$example}", key = "", required = false, min = 0, diff --git a/docs/examples/kotlin/databases/update-integer-attribute.md b/docs/examples/kotlin/databases/update-integer-attribute.md index e5742a5..559f857 100644 --- a/docs/examples/kotlin/databases/update-integer-attribute.md +++ b/docs/examples/kotlin/databases/update-integer-attribute.md @@ -10,8 +10,8 @@ val client = Client() val databases = Databases(client) val response = databases.updateIntegerAttribute( - databaseId = "<DATABASE_ID>", - collectionId = "<COLLECTION_ID>", + databaseId = "{$example}", + collectionId = "{$example}", key = "", required = false, min = 0, diff --git a/docs/examples/kotlin/databases/update-ip-attribute.md b/docs/examples/kotlin/databases/update-ip-attribute.md index bfc0cdd..ce63f4f 100644 --- a/docs/examples/kotlin/databases/update-ip-attribute.md +++ b/docs/examples/kotlin/databases/update-ip-attribute.md @@ -10,8 +10,8 @@ val client = Client() val databases = Databases(client) val response = databases.updateIpAttribute( - databaseId = "<DATABASE_ID>", - collectionId = "<COLLECTION_ID>", + databaseId = "{$example}", + collectionId = "{$example}", key = "", required = false, default = "", diff --git a/docs/examples/kotlin/databases/update-relationship-attribute.md b/docs/examples/kotlin/databases/update-relationship-attribute.md index ab12195..11bcc36 100644 --- a/docs/examples/kotlin/databases/update-relationship-attribute.md +++ b/docs/examples/kotlin/databases/update-relationship-attribute.md @@ -10,9 +10,9 @@ val client = Client() val databases = Databases(client) val response = databases.updateRelationshipAttribute( - databaseId = "<DATABASE_ID>", - collectionId = "<COLLECTION_ID>", + databaseId = "{$example}", + collectionId = "{$example}", key = "", - onDelete = "cascade", // optional + onDelete = "{$example}", // optional newKey = "" // optional ) diff --git a/docs/examples/kotlin/databases/update-string-attribute.md b/docs/examples/kotlin/databases/update-string-attribute.md index a37d456..a9eb970 100644 --- a/docs/examples/kotlin/databases/update-string-attribute.md +++ b/docs/examples/kotlin/databases/update-string-attribute.md @@ -10,11 +10,11 @@ val client = Client() val databases = Databases(client) val response = databases.updateStringAttribute( - databaseId = "<DATABASE_ID>", - collectionId = "<COLLECTION_ID>", + databaseId = "{$example}", + collectionId = "{$example}", key = "", required = false, - default = "<DEFAULT>", + default = "{$example}", size = 0, // optional newKey = "" // optional ) diff --git a/docs/examples/kotlin/databases/update-url-attribute.md b/docs/examples/kotlin/databases/update-url-attribute.md index 7835113..de26a1e 100644 --- a/docs/examples/kotlin/databases/update-url-attribute.md +++ b/docs/examples/kotlin/databases/update-url-attribute.md @@ -10,10 +10,10 @@ val client = Client() val databases = Databases(client) val response = databases.updateUrlAttribute( - databaseId = "<DATABASE_ID>", - collectionId = "<COLLECTION_ID>", + databaseId = "{$example}", + collectionId = "{$example}", key = "", required = false, - default = "https://example.com", + default = "{$example}", newKey = "" // optional ) diff --git a/docs/examples/kotlin/databases/update.md b/docs/examples/kotlin/databases/update.md index 7da795c..1cdcb54 100644 --- a/docs/examples/kotlin/databases/update.md +++ b/docs/examples/kotlin/databases/update.md @@ -10,7 +10,7 @@ val client = Client() val databases = Databases(client) val response = databases.update( - databaseId = "<DATABASE_ID>", - name = "<NAME>", + databaseId = "{$example}", + name = "{$example}", enabled = false // optional ) diff --git a/docs/examples/kotlin/functions/create-build.md b/docs/examples/kotlin/functions/create-build.md index 6d20586..b7c3c66 100644 --- a/docs/examples/kotlin/functions/create-build.md +++ b/docs/examples/kotlin/functions/create-build.md @@ -10,7 +10,7 @@ val client = Client() val functions = Functions(client) val response = functions.createBuild( - functionId = "<FUNCTION_ID>", - deploymentId = "<DEPLOYMENT_ID>", - buildId = "<BUILD_ID>" // optional + functionId = "{$example}", + deploymentId = "{$example}", + buildId = "{$example}" // optional ) diff --git a/docs/examples/kotlin/functions/create-deployment.md b/docs/examples/kotlin/functions/create-deployment.md index aba8f0c..1430d9f 100644 --- a/docs/examples/kotlin/functions/create-deployment.md +++ b/docs/examples/kotlin/functions/create-deployment.md @@ -1,6 +1,6 @@ import io.appwrite.Client import io.appwrite.coroutines.CoroutineCallback -import io.appwrite.models.InputFile +import io.appwrite.models.Payload import io.appwrite.services.Functions val client = Client() @@ -11,9 +11,9 @@ val client = Client() val functions = Functions(client) val response = functions.createDeployment( - functionId = "<FUNCTION_ID>", - code = InputFile.fromPath("file.png"), + functionId = "{$example}", + code = Payload.fromFile("/path/to/file.png"), activate = false, - entrypoint = "<ENTRYPOINT>", // optional - commands = "<COMMANDS>" // optional + entrypoint = "{$example}", // optional + commands = "{$example}" // optional ) diff --git a/docs/examples/kotlin/functions/create-execution.md b/docs/examples/kotlin/functions/create-execution.md index 4226745..3130526 100644 --- a/docs/examples/kotlin/functions/create-execution.md +++ b/docs/examples/kotlin/functions/create-execution.md @@ -10,11 +10,11 @@ val client = Client() val functions = Functions(client) val response = functions.createExecution( - functionId = "<FUNCTION_ID>", - body = "<BODY>", // optional + functionId = "{$example}", + body = Payload.fromJson(mapOf("x" to "y" as Any)), // optional async = false, // optional - path = "<PATH>", // optional - method = "GET", // optional + path = "{$example}", // optional + method = "{$example}", // optional headers = mapOf( "a" to "b" ), // optional scheduledAt = "" // optional ) diff --git a/docs/examples/kotlin/functions/create-variable.md b/docs/examples/kotlin/functions/create-variable.md index e5d33b4..92e8454 100644 --- a/docs/examples/kotlin/functions/create-variable.md +++ b/docs/examples/kotlin/functions/create-variable.md @@ -10,7 +10,7 @@ val client = Client() val functions = Functions(client) val response = functions.createVariable( - functionId = "<FUNCTION_ID>", - key = "<KEY>", - value = "<VALUE>" + functionId = "{$example}", + key = "{$example}", + value = "{$example}" ) diff --git a/docs/examples/kotlin/functions/create.md b/docs/examples/kotlin/functions/create.md index d94bdf6..5f41dcb 100644 --- a/docs/examples/kotlin/functions/create.md +++ b/docs/examples/kotlin/functions/create.md @@ -11,8 +11,8 @@ val client = Client() val functions = Functions(client) val response = functions.create( - functionId = "<FUNCTION_ID>", - name = "<NAME>", + functionId = "{$example}", + name = "{$example}", runtime = .NODE_14_5, execute = listOf("any"), // optional events = listOf(), // optional @@ -20,17 +20,17 @@ val response = functions.create( timeout = 1, // optional enabled = false, // optional logging = false, // optional - entrypoint = "<ENTRYPOINT>", // optional - commands = "<COMMANDS>", // optional + entrypoint = "{$example}", // optional + commands = "{$example}", // optional scopes = listOf(), // optional - installationId = "<INSTALLATION_ID>", // optional - providerRepositoryId = "<PROVIDER_REPOSITORY_ID>", // optional - providerBranch = "<PROVIDER_BRANCH>", // optional + installationId = "{$example}", // optional + providerRepositoryId = "{$example}", // optional + providerBranch = "{$example}", // optional providerSilentMode = false, // optional - providerRootDirectory = "<PROVIDER_ROOT_DIRECTORY>", // optional - templateRepository = "<TEMPLATE_REPOSITORY>", // optional - templateOwner = "<TEMPLATE_OWNER>", // optional - templateRootDirectory = "<TEMPLATE_ROOT_DIRECTORY>", // optional - templateVersion = "<TEMPLATE_VERSION>", // optional + providerRootDirectory = "{$example}", // optional + templateRepository = "{$example}", // optional + templateOwner = "{$example}", // optional + templateRootDirectory = "{$example}", // optional + templateVersion = "{$example}", // optional specification = "" // optional ) diff --git a/docs/examples/kotlin/functions/delete-deployment.md b/docs/examples/kotlin/functions/delete-deployment.md index 9e4e476..536c1eb 100644 --- a/docs/examples/kotlin/functions/delete-deployment.md +++ b/docs/examples/kotlin/functions/delete-deployment.md @@ -10,6 +10,6 @@ val client = Client() val functions = Functions(client) val response = functions.deleteDeployment( - functionId = "<FUNCTION_ID>", - deploymentId = "<DEPLOYMENT_ID>" + functionId = "{$example}", + deploymentId = "{$example}" ) diff --git a/docs/examples/kotlin/functions/delete-execution.md b/docs/examples/kotlin/functions/delete-execution.md index eb1f59e..fafd118 100644 --- a/docs/examples/kotlin/functions/delete-execution.md +++ b/docs/examples/kotlin/functions/delete-execution.md @@ -10,6 +10,6 @@ val client = Client() val functions = Functions(client) val response = functions.deleteExecution( - functionId = "<FUNCTION_ID>", - executionId = "<EXECUTION_ID>" + functionId = "{$example}", + executionId = "{$example}" ) diff --git a/docs/examples/kotlin/functions/delete-variable.md b/docs/examples/kotlin/functions/delete-variable.md index 912e769..1119f9a 100644 --- a/docs/examples/kotlin/functions/delete-variable.md +++ b/docs/examples/kotlin/functions/delete-variable.md @@ -10,6 +10,6 @@ val client = Client() val functions = Functions(client) val response = functions.deleteVariable( - functionId = "<FUNCTION_ID>", - variableId = "<VARIABLE_ID>" + functionId = "{$example}", + variableId = "{$example}" ) diff --git a/docs/examples/kotlin/functions/delete.md b/docs/examples/kotlin/functions/delete.md index 97f0b00..c1b4425 100644 --- a/docs/examples/kotlin/functions/delete.md +++ b/docs/examples/kotlin/functions/delete.md @@ -10,5 +10,5 @@ val client = Client() val functions = Functions(client) val response = functions.delete( - functionId = "<FUNCTION_ID>" + functionId = "{$example}" ) diff --git a/docs/examples/kotlin/functions/get-deployment-download.md b/docs/examples/kotlin/functions/get-deployment-download.md index 13dec6a..0160905 100644 --- a/docs/examples/kotlin/functions/get-deployment-download.md +++ b/docs/examples/kotlin/functions/get-deployment-download.md @@ -10,6 +10,6 @@ val client = Client() val functions = Functions(client) val result = functions.getDeploymentDownload( - functionId = "<FUNCTION_ID>", - deploymentId = "<DEPLOYMENT_ID>" + functionId = "{$example}", + deploymentId = "{$example}" ) diff --git a/docs/examples/kotlin/functions/get-deployment.md b/docs/examples/kotlin/functions/get-deployment.md index e844328..4b2b8c1 100644 --- a/docs/examples/kotlin/functions/get-deployment.md +++ b/docs/examples/kotlin/functions/get-deployment.md @@ -10,6 +10,6 @@ val client = Client() val functions = Functions(client) val response = functions.getDeployment( - functionId = "<FUNCTION_ID>", - deploymentId = "<DEPLOYMENT_ID>" + functionId = "{$example}", + deploymentId = "{$example}" ) diff --git a/docs/examples/kotlin/functions/get-execution.md b/docs/examples/kotlin/functions/get-execution.md index 5f981bf..9b4496e 100644 --- a/docs/examples/kotlin/functions/get-execution.md +++ b/docs/examples/kotlin/functions/get-execution.md @@ -10,6 +10,6 @@ val client = Client() val functions = Functions(client) val response = functions.getExecution( - functionId = "<FUNCTION_ID>", - executionId = "<EXECUTION_ID>" + functionId = "{$example}", + executionId = "{$example}" ) diff --git a/docs/examples/kotlin/functions/get-variable.md b/docs/examples/kotlin/functions/get-variable.md index 8d6ee38..6522ed6 100644 --- a/docs/examples/kotlin/functions/get-variable.md +++ b/docs/examples/kotlin/functions/get-variable.md @@ -10,6 +10,6 @@ val client = Client() val functions = Functions(client) val response = functions.getVariable( - functionId = "<FUNCTION_ID>", - variableId = "<VARIABLE_ID>" + functionId = "{$example}", + variableId = "{$example}" ) diff --git a/docs/examples/kotlin/functions/get.md b/docs/examples/kotlin/functions/get.md index f56d8b9..95b07bd 100644 --- a/docs/examples/kotlin/functions/get.md +++ b/docs/examples/kotlin/functions/get.md @@ -10,5 +10,5 @@ val client = Client() val functions = Functions(client) val response = functions.get( - functionId = "<FUNCTION_ID>" + functionId = "{$example}" ) diff --git a/docs/examples/kotlin/functions/list-deployments.md b/docs/examples/kotlin/functions/list-deployments.md index cf7deff..ea833ec 100644 --- a/docs/examples/kotlin/functions/list-deployments.md +++ b/docs/examples/kotlin/functions/list-deployments.md @@ -10,7 +10,7 @@ val client = Client() val functions = Functions(client) val response = functions.listDeployments( - functionId = "<FUNCTION_ID>", + functionId = "{$example}", queries = listOf(), // optional - search = "<SEARCH>" // optional + search = "{$example}" // optional ) diff --git a/docs/examples/kotlin/functions/list-executions.md b/docs/examples/kotlin/functions/list-executions.md index 8f4546c..b540ad8 100644 --- a/docs/examples/kotlin/functions/list-executions.md +++ b/docs/examples/kotlin/functions/list-executions.md @@ -10,7 +10,7 @@ val client = Client() val functions = Functions(client) val response = functions.listExecutions( - functionId = "<FUNCTION_ID>", + functionId = "{$example}", queries = listOf(), // optional - search = "<SEARCH>" // optional + search = "{$example}" // optional ) diff --git a/docs/examples/kotlin/functions/list-variables.md b/docs/examples/kotlin/functions/list-variables.md index 4876517..1e6d91a 100644 --- a/docs/examples/kotlin/functions/list-variables.md +++ b/docs/examples/kotlin/functions/list-variables.md @@ -10,5 +10,5 @@ val client = Client() val functions = Functions(client) val response = functions.listVariables( - functionId = "<FUNCTION_ID>" + functionId = "{$example}" ) diff --git a/docs/examples/kotlin/functions/list.md b/docs/examples/kotlin/functions/list.md index 9a58501..22f11e5 100644 --- a/docs/examples/kotlin/functions/list.md +++ b/docs/examples/kotlin/functions/list.md @@ -11,5 +11,5 @@ val functions = Functions(client) val response = functions.list( queries = listOf(), // optional - search = "<SEARCH>" // optional + search = "{$example}" // optional ) diff --git a/docs/examples/kotlin/functions/update-deployment-build.md b/docs/examples/kotlin/functions/update-deployment-build.md index 6adb07a..aa75556 100644 --- a/docs/examples/kotlin/functions/update-deployment-build.md +++ b/docs/examples/kotlin/functions/update-deployment-build.md @@ -10,6 +10,6 @@ val client = Client() val functions = Functions(client) val response = functions.updateDeploymentBuild( - functionId = "<FUNCTION_ID>", - deploymentId = "<DEPLOYMENT_ID>" + functionId = "{$example}", + deploymentId = "{$example}" ) diff --git a/docs/examples/kotlin/functions/update-deployment.md b/docs/examples/kotlin/functions/update-deployment.md index fb95b08..784d9f6 100644 --- a/docs/examples/kotlin/functions/update-deployment.md +++ b/docs/examples/kotlin/functions/update-deployment.md @@ -10,6 +10,6 @@ val client = Client() val functions = Functions(client) val response = functions.updateDeployment( - functionId = "<FUNCTION_ID>", - deploymentId = "<DEPLOYMENT_ID>" + functionId = "{$example}", + deploymentId = "{$example}" ) diff --git a/docs/examples/kotlin/functions/update-variable.md b/docs/examples/kotlin/functions/update-variable.md index db9438c..ad466ac 100644 --- a/docs/examples/kotlin/functions/update-variable.md +++ b/docs/examples/kotlin/functions/update-variable.md @@ -10,8 +10,8 @@ val client = Client() val functions = Functions(client) val response = functions.updateVariable( - functionId = "<FUNCTION_ID>", - variableId = "<VARIABLE_ID>", - key = "<KEY>", - value = "<VALUE>" // optional + functionId = "{$example}", + variableId = "{$example}", + key = "{$example}", + value = "{$example}" // optional ) diff --git a/docs/examples/kotlin/functions/update.md b/docs/examples/kotlin/functions/update.md index d36c761..586b10a 100644 --- a/docs/examples/kotlin/functions/update.md +++ b/docs/examples/kotlin/functions/update.md @@ -10,22 +10,22 @@ val client = Client() val functions = Functions(client) val response = functions.update( - functionId = "<FUNCTION_ID>", - name = "<NAME>", - runtime = "node-14.5", // optional + functionId = "{$example}", + name = "{$example}", + runtime = "{$example}", // optional execute = listOf("any"), // optional events = listOf(), // optional schedule = "", // optional timeout = 1, // optional enabled = false, // optional logging = false, // optional - entrypoint = "<ENTRYPOINT>", // optional - commands = "<COMMANDS>", // optional + entrypoint = "{$example}", // optional + commands = "{$example}", // optional scopes = listOf(), // optional - installationId = "<INSTALLATION_ID>", // optional - providerRepositoryId = "<PROVIDER_REPOSITORY_ID>", // optional - providerBranch = "<PROVIDER_BRANCH>", // optional + installationId = "{$example}", // optional + providerRepositoryId = "{$example}", // optional + providerBranch = "{$example}", // optional providerSilentMode = false, // optional - providerRootDirectory = "<PROVIDER_ROOT_DIRECTORY>", // optional + providerRootDirectory = "{$example}", // optional specification = "" // optional ) diff --git a/docs/examples/kotlin/health/get-queue-databases.md b/docs/examples/kotlin/health/get-queue-databases.md index fb1dce6..1b8bff3 100644 --- a/docs/examples/kotlin/health/get-queue-databases.md +++ b/docs/examples/kotlin/health/get-queue-databases.md @@ -10,6 +10,6 @@ val client = Client() val health = Health(client) val response = health.getQueueDatabases( - name = "<NAME>", // optional + name = "{$example}", // optional threshold = 0 // optional ) diff --git a/docs/examples/kotlin/messaging/create-apns-provider.md b/docs/examples/kotlin/messaging/create-apns-provider.md index 8a58fe8..951b922 100644 --- a/docs/examples/kotlin/messaging/create-apns-provider.md +++ b/docs/examples/kotlin/messaging/create-apns-provider.md @@ -10,12 +10,12 @@ val client = Client() val messaging = Messaging(client) val response = messaging.createApnsProvider( - providerId = "<PROVIDER_ID>", - name = "<NAME>", - authKey = "<AUTH_KEY>", // optional - authKeyId = "<AUTH_KEY_ID>", // optional - teamId = "<TEAM_ID>", // optional - bundleId = "<BUNDLE_ID>", // optional + providerId = "{$example}", + name = "{$example}", + authKey = "{$example}", // optional + authKeyId = "{$example}", // optional + teamId = "{$example}", // optional + bundleId = "{$example}", // optional sandbox = false, // optional enabled = false // optional ) diff --git a/docs/examples/kotlin/messaging/create-email.md b/docs/examples/kotlin/messaging/create-email.md index 02b0651..a7c4d42 100644 --- a/docs/examples/kotlin/messaging/create-email.md +++ b/docs/examples/kotlin/messaging/create-email.md @@ -10,9 +10,9 @@ val client = Client() val messaging = Messaging(client) val response = messaging.createEmail( - messageId = "<MESSAGE_ID>", - subject = "<SUBJECT>", - content = "<CONTENT>", + messageId = "{$example}", + subject = "{$example}", + content = "{$example}", topics = listOf(), // optional users = listOf(), // optional targets = listOf(), // optional diff --git a/docs/examples/kotlin/messaging/create-fcm-provider.md b/docs/examples/kotlin/messaging/create-fcm-provider.md index 779596c..71041a6 100644 --- a/docs/examples/kotlin/messaging/create-fcm-provider.md +++ b/docs/examples/kotlin/messaging/create-fcm-provider.md @@ -10,8 +10,8 @@ val client = Client() val messaging = Messaging(client) val response = messaging.createFcmProvider( - providerId = "<PROVIDER_ID>", - name = "<NAME>", + providerId = "{$example}", + name = "{$example}", serviceAccountJSON = mapOf( "a" to "b" ), // optional enabled = false // optional ) diff --git a/docs/examples/kotlin/messaging/create-mailgun-provider.md b/docs/examples/kotlin/messaging/create-mailgun-provider.md index a73a27f..e97ca38 100644 --- a/docs/examples/kotlin/messaging/create-mailgun-provider.md +++ b/docs/examples/kotlin/messaging/create-mailgun-provider.md @@ -10,14 +10,14 @@ val client = Client() val messaging = Messaging(client) val response = messaging.createMailgunProvider( - providerId = "<PROVIDER_ID>", - name = "<NAME>", - apiKey = "<API_KEY>", // optional - domain = "<DOMAIN>", // optional + providerId = "{$example}", + name = "{$example}", + apiKey = "{$example}", // optional + domain = "{$example}", // optional isEuRegion = false, // optional - fromName = "<FROM_NAME>", // optional - fromEmail = "email@example.com", // optional - replyToName = "<REPLY_TO_NAME>", // optional - replyToEmail = "email@example.com", // optional + fromName = "{$example}", // optional + fromEmail = "{$example}", // optional + replyToName = "{$example}", // optional + replyToEmail = "{$example}", // optional enabled = false // optional ) diff --git a/docs/examples/kotlin/messaging/create-msg91provider.md b/docs/examples/kotlin/messaging/create-msg91provider.md index 31eb606..e316efd 100644 --- a/docs/examples/kotlin/messaging/create-msg91provider.md +++ b/docs/examples/kotlin/messaging/create-msg91provider.md @@ -10,10 +10,10 @@ val client = Client() val messaging = Messaging(client) val response = messaging.createMsg91Provider( - providerId = "<PROVIDER_ID>", - name = "<NAME>", - templateId = "<TEMPLATE_ID>", // optional - senderId = "<SENDER_ID>", // optional - authKey = "<AUTH_KEY>", // optional + providerId = "{$example}", + name = "{$example}", + templateId = "{$example}", // optional + senderId = "{$example}", // optional + authKey = "{$example}", // optional enabled = false // optional ) diff --git a/docs/examples/kotlin/messaging/create-push.md b/docs/examples/kotlin/messaging/create-push.md index 6a95f63..81734f3 100644 --- a/docs/examples/kotlin/messaging/create-push.md +++ b/docs/examples/kotlin/messaging/create-push.md @@ -10,20 +10,20 @@ val client = Client() val messaging = Messaging(client) val response = messaging.createPush( - messageId = "<MESSAGE_ID>", - title = "<TITLE>", - body = "<BODY>", + messageId = "{$example}", + title = "{$example}", + body = "{$example}", topics = listOf(), // optional users = listOf(), // optional targets = listOf(), // optional data = mapOf( "a" to "b" ), // optional - action = "<ACTION>", // optional - image = "[ID1:ID2]", // optional - icon = "<ICON>", // optional - sound = "<SOUND>", // optional - color = "<COLOR>", // optional - tag = "<TAG>", // optional - badge = "<BADGE>", // optional + action = "{$example}", // optional + image = "{$example}", // optional + icon = "{$example}", // optional + sound = "{$example}", // optional + color = "{$example}", // optional + tag = "{$example}", // optional + badge = "{$example}", // optional draft = false, // optional scheduledAt = "" // optional ) diff --git a/docs/examples/kotlin/messaging/create-sendgrid-provider.md b/docs/examples/kotlin/messaging/create-sendgrid-provider.md index 34f61c9..99cbfb9 100644 --- a/docs/examples/kotlin/messaging/create-sendgrid-provider.md +++ b/docs/examples/kotlin/messaging/create-sendgrid-provider.md @@ -10,12 +10,12 @@ val client = Client() val messaging = Messaging(client) val response = messaging.createSendgridProvider( - providerId = "<PROVIDER_ID>", - name = "<NAME>", - apiKey = "<API_KEY>", // optional - fromName = "<FROM_NAME>", // optional - fromEmail = "email@example.com", // optional - replyToName = "<REPLY_TO_NAME>", // optional - replyToEmail = "email@example.com", // optional + providerId = "{$example}", + name = "{$example}", + apiKey = "{$example}", // optional + fromName = "{$example}", // optional + fromEmail = "{$example}", // optional + replyToName = "{$example}", // optional + replyToEmail = "{$example}", // optional enabled = false // optional ) diff --git a/docs/examples/kotlin/messaging/create-sms.md b/docs/examples/kotlin/messaging/create-sms.md index 6fbcffb..c1307a3 100644 --- a/docs/examples/kotlin/messaging/create-sms.md +++ b/docs/examples/kotlin/messaging/create-sms.md @@ -10,8 +10,8 @@ val client = Client() val messaging = Messaging(client) val response = messaging.createSms( - messageId = "<MESSAGE_ID>", - content = "<CONTENT>", + messageId = "{$example}", + content = "{$example}", topics = listOf(), // optional users = listOf(), // optional targets = listOf(), // optional diff --git a/docs/examples/kotlin/messaging/create-smtp-provider.md b/docs/examples/kotlin/messaging/create-smtp-provider.md index 17643dc..626c825 100644 --- a/docs/examples/kotlin/messaging/create-smtp-provider.md +++ b/docs/examples/kotlin/messaging/create-smtp-provider.md @@ -10,18 +10,18 @@ val client = Client() val messaging = Messaging(client) val response = messaging.createSmtpProvider( - providerId = "<PROVIDER_ID>", - name = "<NAME>", - host = "<HOST>", + providerId = "{$example}", + name = "{$example}", + host = "{$example}", port = 1, // optional - username = "<USERNAME>", // optional - password = "<PASSWORD>", // optional - encryption = "none", // optional + username = "{$example}", // optional + password = "{$example}", // optional + encryption = "{$example}", // optional autoTLS = false, // optional - mailer = "<MAILER>", // optional - fromName = "<FROM_NAME>", // optional - fromEmail = "email@example.com", // optional - replyToName = "<REPLY_TO_NAME>", // optional - replyToEmail = "email@example.com", // optional + mailer = "{$example}", // optional + fromName = "{$example}", // optional + fromEmail = "{$example}", // optional + replyToName = "{$example}", // optional + replyToEmail = "{$example}", // optional enabled = false // optional ) diff --git a/docs/examples/kotlin/messaging/create-subscriber.md b/docs/examples/kotlin/messaging/create-subscriber.md index 805cd58..737714a 100644 --- a/docs/examples/kotlin/messaging/create-subscriber.md +++ b/docs/examples/kotlin/messaging/create-subscriber.md @@ -10,7 +10,7 @@ val client = Client() val messaging = Messaging(client) val response = messaging.createSubscriber( - topicId = "<TOPIC_ID>", - subscriberId = "<SUBSCRIBER_ID>", - targetId = "<TARGET_ID>" + topicId = "{$example}", + subscriberId = "{$example}", + targetId = "{$example}" ) diff --git a/docs/examples/kotlin/messaging/create-telesign-provider.md b/docs/examples/kotlin/messaging/create-telesign-provider.md index 1d44fca..a384f8e 100644 --- a/docs/examples/kotlin/messaging/create-telesign-provider.md +++ b/docs/examples/kotlin/messaging/create-telesign-provider.md @@ -10,10 +10,10 @@ val client = Client() val messaging = Messaging(client) val response = messaging.createTelesignProvider( - providerId = "<PROVIDER_ID>", - name = "<NAME>", - from = "+12065550100", // optional - customerId = "<CUSTOMER_ID>", // optional - apiKey = "<API_KEY>", // optional + providerId = "{$example}", + name = "{$example}", + from = "{$example}", // optional + customerId = "{$example}", // optional + apiKey = "{$example}", // optional enabled = false // optional ) diff --git a/docs/examples/kotlin/messaging/create-textmagic-provider.md b/docs/examples/kotlin/messaging/create-textmagic-provider.md index d88b9bb..3fc9d8f 100644 --- a/docs/examples/kotlin/messaging/create-textmagic-provider.md +++ b/docs/examples/kotlin/messaging/create-textmagic-provider.md @@ -10,10 +10,10 @@ val client = Client() val messaging = Messaging(client) val response = messaging.createTextmagicProvider( - providerId = "<PROVIDER_ID>", - name = "<NAME>", - from = "+12065550100", // optional - username = "<USERNAME>", // optional - apiKey = "<API_KEY>", // optional + providerId = "{$example}", + name = "{$example}", + from = "{$example}", // optional + username = "{$example}", // optional + apiKey = "{$example}", // optional enabled = false // optional ) diff --git a/docs/examples/kotlin/messaging/create-topic.md b/docs/examples/kotlin/messaging/create-topic.md index 6a6b9bd..fae1b75 100644 --- a/docs/examples/kotlin/messaging/create-topic.md +++ b/docs/examples/kotlin/messaging/create-topic.md @@ -10,7 +10,7 @@ val client = Client() val messaging = Messaging(client) val response = messaging.createTopic( - topicId = "<TOPIC_ID>", - name = "<NAME>", + topicId = "{$example}", + name = "{$example}", subscribe = listOf("any") // optional ) diff --git a/docs/examples/kotlin/messaging/create-twilio-provider.md b/docs/examples/kotlin/messaging/create-twilio-provider.md index 3df99e9..eb6fe5e 100644 --- a/docs/examples/kotlin/messaging/create-twilio-provider.md +++ b/docs/examples/kotlin/messaging/create-twilio-provider.md @@ -10,10 +10,10 @@ val client = Client() val messaging = Messaging(client) val response = messaging.createTwilioProvider( - providerId = "<PROVIDER_ID>", - name = "<NAME>", - from = "+12065550100", // optional - accountSid = "<ACCOUNT_SID>", // optional - authToken = "<AUTH_TOKEN>", // optional + providerId = "{$example}", + name = "{$example}", + from = "{$example}", // optional + accountSid = "{$example}", // optional + authToken = "{$example}", // optional enabled = false // optional ) diff --git a/docs/examples/kotlin/messaging/create-vonage-provider.md b/docs/examples/kotlin/messaging/create-vonage-provider.md index 59e5d14..3f90439 100644 --- a/docs/examples/kotlin/messaging/create-vonage-provider.md +++ b/docs/examples/kotlin/messaging/create-vonage-provider.md @@ -10,10 +10,10 @@ val client = Client() val messaging = Messaging(client) val response = messaging.createVonageProvider( - providerId = "<PROVIDER_ID>", - name = "<NAME>", - from = "+12065550100", // optional - apiKey = "<API_KEY>", // optional - apiSecret = "<API_SECRET>", // optional + providerId = "{$example}", + name = "{$example}", + from = "{$example}", // optional + apiKey = "{$example}", // optional + apiSecret = "{$example}", // optional enabled = false // optional ) diff --git a/docs/examples/kotlin/messaging/delete-provider.md b/docs/examples/kotlin/messaging/delete-provider.md index 3ecd64d..132bda3 100644 --- a/docs/examples/kotlin/messaging/delete-provider.md +++ b/docs/examples/kotlin/messaging/delete-provider.md @@ -10,5 +10,5 @@ val client = Client() val messaging = Messaging(client) val response = messaging.deleteProvider( - providerId = "<PROVIDER_ID>" + providerId = "{$example}" ) diff --git a/docs/examples/kotlin/messaging/delete-subscriber.md b/docs/examples/kotlin/messaging/delete-subscriber.md index 4a7c18f..2753d6d 100644 --- a/docs/examples/kotlin/messaging/delete-subscriber.md +++ b/docs/examples/kotlin/messaging/delete-subscriber.md @@ -10,6 +10,6 @@ val client = Client() val messaging = Messaging(client) val response = messaging.deleteSubscriber( - topicId = "<TOPIC_ID>", - subscriberId = "<SUBSCRIBER_ID>" + topicId = "{$example}", + subscriberId = "{$example}" ) diff --git a/docs/examples/kotlin/messaging/delete-topic.md b/docs/examples/kotlin/messaging/delete-topic.md index 4859c0a..fe6c480 100644 --- a/docs/examples/kotlin/messaging/delete-topic.md +++ b/docs/examples/kotlin/messaging/delete-topic.md @@ -10,5 +10,5 @@ val client = Client() val messaging = Messaging(client) val response = messaging.deleteTopic( - topicId = "<TOPIC_ID>" + topicId = "{$example}" ) diff --git a/docs/examples/kotlin/messaging/delete.md b/docs/examples/kotlin/messaging/delete.md index 0b925ca..db4abf9 100644 --- a/docs/examples/kotlin/messaging/delete.md +++ b/docs/examples/kotlin/messaging/delete.md @@ -10,5 +10,5 @@ val client = Client() val messaging = Messaging(client) val response = messaging.delete( - messageId = "<MESSAGE_ID>" + messageId = "{$example}" ) diff --git a/docs/examples/kotlin/messaging/get-message.md b/docs/examples/kotlin/messaging/get-message.md index 01db389..77dcb31 100644 --- a/docs/examples/kotlin/messaging/get-message.md +++ b/docs/examples/kotlin/messaging/get-message.md @@ -10,5 +10,5 @@ val client = Client() val messaging = Messaging(client) val response = messaging.getMessage( - messageId = "<MESSAGE_ID>" + messageId = "{$example}" ) diff --git a/docs/examples/kotlin/messaging/get-provider.md b/docs/examples/kotlin/messaging/get-provider.md index 53e5cf3..e0c5f73 100644 --- a/docs/examples/kotlin/messaging/get-provider.md +++ b/docs/examples/kotlin/messaging/get-provider.md @@ -10,5 +10,5 @@ val client = Client() val messaging = Messaging(client) val response = messaging.getProvider( - providerId = "<PROVIDER_ID>" + providerId = "{$example}" ) diff --git a/docs/examples/kotlin/messaging/get-subscriber.md b/docs/examples/kotlin/messaging/get-subscriber.md index 036f17f..b625692 100644 --- a/docs/examples/kotlin/messaging/get-subscriber.md +++ b/docs/examples/kotlin/messaging/get-subscriber.md @@ -10,6 +10,6 @@ val client = Client() val messaging = Messaging(client) val response = messaging.getSubscriber( - topicId = "<TOPIC_ID>", - subscriberId = "<SUBSCRIBER_ID>" + topicId = "{$example}", + subscriberId = "{$example}" ) diff --git a/docs/examples/kotlin/messaging/get-topic.md b/docs/examples/kotlin/messaging/get-topic.md index 09d3688..e53609e 100644 --- a/docs/examples/kotlin/messaging/get-topic.md +++ b/docs/examples/kotlin/messaging/get-topic.md @@ -10,5 +10,5 @@ val client = Client() val messaging = Messaging(client) val response = messaging.getTopic( - topicId = "<TOPIC_ID>" + topicId = "{$example}" ) diff --git a/docs/examples/kotlin/messaging/list-message-logs.md b/docs/examples/kotlin/messaging/list-message-logs.md index 3048904..74772ae 100644 --- a/docs/examples/kotlin/messaging/list-message-logs.md +++ b/docs/examples/kotlin/messaging/list-message-logs.md @@ -10,6 +10,6 @@ val client = Client() val messaging = Messaging(client) val response = messaging.listMessageLogs( - messageId = "<MESSAGE_ID>", + messageId = "{$example}", queries = listOf() // optional ) diff --git a/docs/examples/kotlin/messaging/list-messages.md b/docs/examples/kotlin/messaging/list-messages.md index e9e509e..b377171 100644 --- a/docs/examples/kotlin/messaging/list-messages.md +++ b/docs/examples/kotlin/messaging/list-messages.md @@ -11,5 +11,5 @@ val messaging = Messaging(client) val response = messaging.listMessages( queries = listOf(), // optional - search = "<SEARCH>" // optional + search = "{$example}" // optional ) diff --git a/docs/examples/kotlin/messaging/list-provider-logs.md b/docs/examples/kotlin/messaging/list-provider-logs.md index e0a52cb..81c24ec 100644 --- a/docs/examples/kotlin/messaging/list-provider-logs.md +++ b/docs/examples/kotlin/messaging/list-provider-logs.md @@ -10,6 +10,6 @@ val client = Client() val messaging = Messaging(client) val response = messaging.listProviderLogs( - providerId = "<PROVIDER_ID>", + providerId = "{$example}", queries = listOf() // optional ) diff --git a/docs/examples/kotlin/messaging/list-providers.md b/docs/examples/kotlin/messaging/list-providers.md index 66439e2..bc055fa 100644 --- a/docs/examples/kotlin/messaging/list-providers.md +++ b/docs/examples/kotlin/messaging/list-providers.md @@ -11,5 +11,5 @@ val messaging = Messaging(client) val response = messaging.listProviders( queries = listOf(), // optional - search = "<SEARCH>" // optional + search = "{$example}" // optional ) diff --git a/docs/examples/kotlin/messaging/list-subscriber-logs.md b/docs/examples/kotlin/messaging/list-subscriber-logs.md index 5472d5f..0fde1f6 100644 --- a/docs/examples/kotlin/messaging/list-subscriber-logs.md +++ b/docs/examples/kotlin/messaging/list-subscriber-logs.md @@ -10,6 +10,6 @@ val client = Client() val messaging = Messaging(client) val response = messaging.listSubscriberLogs( - subscriberId = "<SUBSCRIBER_ID>", + subscriberId = "{$example}", queries = listOf() // optional ) diff --git a/docs/examples/kotlin/messaging/list-subscribers.md b/docs/examples/kotlin/messaging/list-subscribers.md index a95e854..cf675b2 100644 --- a/docs/examples/kotlin/messaging/list-subscribers.md +++ b/docs/examples/kotlin/messaging/list-subscribers.md @@ -10,7 +10,7 @@ val client = Client() val messaging = Messaging(client) val response = messaging.listSubscribers( - topicId = "<TOPIC_ID>", + topicId = "{$example}", queries = listOf(), // optional - search = "<SEARCH>" // optional + search = "{$example}" // optional ) diff --git a/docs/examples/kotlin/messaging/list-targets.md b/docs/examples/kotlin/messaging/list-targets.md index a99e822..9f5bf40 100644 --- a/docs/examples/kotlin/messaging/list-targets.md +++ b/docs/examples/kotlin/messaging/list-targets.md @@ -10,6 +10,6 @@ val client = Client() val messaging = Messaging(client) val response = messaging.listTargets( - messageId = "<MESSAGE_ID>", + messageId = "{$example}", queries = listOf() // optional ) diff --git a/docs/examples/kotlin/messaging/list-topic-logs.md b/docs/examples/kotlin/messaging/list-topic-logs.md index 7b7d2f0..d0e2e51 100644 --- a/docs/examples/kotlin/messaging/list-topic-logs.md +++ b/docs/examples/kotlin/messaging/list-topic-logs.md @@ -10,6 +10,6 @@ val client = Client() val messaging = Messaging(client) val response = messaging.listTopicLogs( - topicId = "<TOPIC_ID>", + topicId = "{$example}", queries = listOf() // optional ) diff --git a/docs/examples/kotlin/messaging/list-topics.md b/docs/examples/kotlin/messaging/list-topics.md index 4550f1e..818793a 100644 --- a/docs/examples/kotlin/messaging/list-topics.md +++ b/docs/examples/kotlin/messaging/list-topics.md @@ -11,5 +11,5 @@ val messaging = Messaging(client) val response = messaging.listTopics( queries = listOf(), // optional - search = "<SEARCH>" // optional + search = "{$example}" // optional ) diff --git a/docs/examples/kotlin/messaging/update-apns-provider.md b/docs/examples/kotlin/messaging/update-apns-provider.md index 83a6083..591181e 100644 --- a/docs/examples/kotlin/messaging/update-apns-provider.md +++ b/docs/examples/kotlin/messaging/update-apns-provider.md @@ -10,12 +10,12 @@ val client = Client() val messaging = Messaging(client) val response = messaging.updateApnsProvider( - providerId = "<PROVIDER_ID>", - name = "<NAME>", // optional + providerId = "{$example}", + name = "{$example}", // optional enabled = false, // optional - authKey = "<AUTH_KEY>", // optional - authKeyId = "<AUTH_KEY_ID>", // optional - teamId = "<TEAM_ID>", // optional - bundleId = "<BUNDLE_ID>", // optional + authKey = "{$example}", // optional + authKeyId = "{$example}", // optional + teamId = "{$example}", // optional + bundleId = "{$example}", // optional sandbox = false // optional ) diff --git a/docs/examples/kotlin/messaging/update-email.md b/docs/examples/kotlin/messaging/update-email.md index 29baf18..54aaa14 100644 --- a/docs/examples/kotlin/messaging/update-email.md +++ b/docs/examples/kotlin/messaging/update-email.md @@ -10,12 +10,12 @@ val client = Client() val messaging = Messaging(client) val response = messaging.updateEmail( - messageId = "<MESSAGE_ID>", + messageId = "{$example}", topics = listOf(), // optional users = listOf(), // optional targets = listOf(), // optional - subject = "<SUBJECT>", // optional - content = "<CONTENT>", // optional + subject = "{$example}", // optional + content = "{$example}", // optional draft = false, // optional html = false, // optional cc = listOf(), // optional diff --git a/docs/examples/kotlin/messaging/update-fcm-provider.md b/docs/examples/kotlin/messaging/update-fcm-provider.md index 4d8534c..4cbb386 100644 --- a/docs/examples/kotlin/messaging/update-fcm-provider.md +++ b/docs/examples/kotlin/messaging/update-fcm-provider.md @@ -10,8 +10,8 @@ val client = Client() val messaging = Messaging(client) val response = messaging.updateFcmProvider( - providerId = "<PROVIDER_ID>", - name = "<NAME>", // optional + providerId = "{$example}", + name = "{$example}", // optional enabled = false, // optional serviceAccountJSON = mapOf( "a" to "b" ) // optional ) diff --git a/docs/examples/kotlin/messaging/update-mailgun-provider.md b/docs/examples/kotlin/messaging/update-mailgun-provider.md index 9caff42..51ff655 100644 --- a/docs/examples/kotlin/messaging/update-mailgun-provider.md +++ b/docs/examples/kotlin/messaging/update-mailgun-provider.md @@ -10,14 +10,14 @@ val client = Client() val messaging = Messaging(client) val response = messaging.updateMailgunProvider( - providerId = "<PROVIDER_ID>", - name = "<NAME>", // optional - apiKey = "<API_KEY>", // optional - domain = "<DOMAIN>", // optional + providerId = "{$example}", + name = "{$example}", // optional + apiKey = "{$example}", // optional + domain = "{$example}", // optional isEuRegion = false, // optional enabled = false, // optional - fromName = "<FROM_NAME>", // optional - fromEmail = "email@example.com", // optional - replyToName = "<REPLY_TO_NAME>", // optional - replyToEmail = "<REPLY_TO_EMAIL>" // optional + fromName = "{$example}", // optional + fromEmail = "{$example}", // optional + replyToName = "{$example}", // optional + replyToEmail = "{$example}" // optional ) diff --git a/docs/examples/kotlin/messaging/update-msg91provider.md b/docs/examples/kotlin/messaging/update-msg91provider.md index 1a6a0b4..5f4cb90 100644 --- a/docs/examples/kotlin/messaging/update-msg91provider.md +++ b/docs/examples/kotlin/messaging/update-msg91provider.md @@ -10,10 +10,10 @@ val client = Client() val messaging = Messaging(client) val response = messaging.updateMsg91Provider( - providerId = "<PROVIDER_ID>", - name = "<NAME>", // optional + providerId = "{$example}", + name = "{$example}", // optional enabled = false, // optional - templateId = "<TEMPLATE_ID>", // optional - senderId = "<SENDER_ID>", // optional - authKey = "<AUTH_KEY>" // optional + templateId = "{$example}", // optional + senderId = "{$example}", // optional + authKey = "{$example}" // optional ) diff --git a/docs/examples/kotlin/messaging/update-push.md b/docs/examples/kotlin/messaging/update-push.md index d91694e..09ef3ab 100644 --- a/docs/examples/kotlin/messaging/update-push.md +++ b/docs/examples/kotlin/messaging/update-push.md @@ -10,19 +10,19 @@ val client = Client() val messaging = Messaging(client) val response = messaging.updatePush( - messageId = "<MESSAGE_ID>", + messageId = "{$example}", topics = listOf(), // optional users = listOf(), // optional targets = listOf(), // optional - title = "<TITLE>", // optional - body = "<BODY>", // optional + title = "{$example}", // optional + body = "{$example}", // optional data = mapOf( "a" to "b" ), // optional - action = "<ACTION>", // optional - image = "[ID1:ID2]", // optional - icon = "<ICON>", // optional - sound = "<SOUND>", // optional - color = "<COLOR>", // optional - tag = "<TAG>", // optional + action = "{$example}", // optional + image = "{$example}", // optional + icon = "{$example}", // optional + sound = "{$example}", // optional + color = "{$example}", // optional + tag = "{$example}", // optional badge = 0, // optional draft = false, // optional scheduledAt = "" // optional diff --git a/docs/examples/kotlin/messaging/update-sendgrid-provider.md b/docs/examples/kotlin/messaging/update-sendgrid-provider.md index 353cbd0..0e3701a 100644 --- a/docs/examples/kotlin/messaging/update-sendgrid-provider.md +++ b/docs/examples/kotlin/messaging/update-sendgrid-provider.md @@ -10,12 +10,12 @@ val client = Client() val messaging = Messaging(client) val response = messaging.updateSendgridProvider( - providerId = "<PROVIDER_ID>", - name = "<NAME>", // optional + providerId = "{$example}", + name = "{$example}", // optional enabled = false, // optional - apiKey = "<API_KEY>", // optional - fromName = "<FROM_NAME>", // optional - fromEmail = "email@example.com", // optional - replyToName = "<REPLY_TO_NAME>", // optional - replyToEmail = "<REPLY_TO_EMAIL>" // optional + apiKey = "{$example}", // optional + fromName = "{$example}", // optional + fromEmail = "{$example}", // optional + replyToName = "{$example}", // optional + replyToEmail = "{$example}" // optional ) diff --git a/docs/examples/kotlin/messaging/update-sms.md b/docs/examples/kotlin/messaging/update-sms.md index 7f008e8..38f6153 100644 --- a/docs/examples/kotlin/messaging/update-sms.md +++ b/docs/examples/kotlin/messaging/update-sms.md @@ -10,11 +10,11 @@ val client = Client() val messaging = Messaging(client) val response = messaging.updateSms( - messageId = "<MESSAGE_ID>", + messageId = "{$example}", topics = listOf(), // optional users = listOf(), // optional targets = listOf(), // optional - content = "<CONTENT>", // optional + content = "{$example}", // optional draft = false, // optional scheduledAt = "" // optional ) diff --git a/docs/examples/kotlin/messaging/update-smtp-provider.md b/docs/examples/kotlin/messaging/update-smtp-provider.md index 465d76b..16e9e5a 100644 --- a/docs/examples/kotlin/messaging/update-smtp-provider.md +++ b/docs/examples/kotlin/messaging/update-smtp-provider.md @@ -10,18 +10,18 @@ val client = Client() val messaging = Messaging(client) val response = messaging.updateSmtpProvider( - providerId = "<PROVIDER_ID>", - name = "<NAME>", // optional - host = "<HOST>", // optional + providerId = "{$example}", + name = "{$example}", // optional + host = "{$example}", // optional port = 1, // optional - username = "<USERNAME>", // optional - password = "<PASSWORD>", // optional - encryption = "none", // optional + username = "{$example}", // optional + password = "{$example}", // optional + encryption = "{$example}", // optional autoTLS = false, // optional - mailer = "<MAILER>", // optional - fromName = "<FROM_NAME>", // optional - fromEmail = "email@example.com", // optional - replyToName = "<REPLY_TO_NAME>", // optional - replyToEmail = "<REPLY_TO_EMAIL>", // optional + mailer = "{$example}", // optional + fromName = "{$example}", // optional + fromEmail = "{$example}", // optional + replyToName = "{$example}", // optional + replyToEmail = "{$example}", // optional enabled = false // optional ) diff --git a/docs/examples/kotlin/messaging/update-telesign-provider.md b/docs/examples/kotlin/messaging/update-telesign-provider.md index 9a4d93e..9501cd0 100644 --- a/docs/examples/kotlin/messaging/update-telesign-provider.md +++ b/docs/examples/kotlin/messaging/update-telesign-provider.md @@ -10,10 +10,10 @@ val client = Client() val messaging = Messaging(client) val response = messaging.updateTelesignProvider( - providerId = "<PROVIDER_ID>", - name = "<NAME>", // optional + providerId = "{$example}", + name = "{$example}", // optional enabled = false, // optional - customerId = "<CUSTOMER_ID>", // optional - apiKey = "<API_KEY>", // optional - from = "<FROM>" // optional + customerId = "{$example}", // optional + apiKey = "{$example}", // optional + from = "{$example}" // optional ) diff --git a/docs/examples/kotlin/messaging/update-textmagic-provider.md b/docs/examples/kotlin/messaging/update-textmagic-provider.md index 14e8ac5..2a3565f 100644 --- a/docs/examples/kotlin/messaging/update-textmagic-provider.md +++ b/docs/examples/kotlin/messaging/update-textmagic-provider.md @@ -10,10 +10,10 @@ val client = Client() val messaging = Messaging(client) val response = messaging.updateTextmagicProvider( - providerId = "<PROVIDER_ID>", - name = "<NAME>", // optional + providerId = "{$example}", + name = "{$example}", // optional enabled = false, // optional - username = "<USERNAME>", // optional - apiKey = "<API_KEY>", // optional - from = "<FROM>" // optional + username = "{$example}", // optional + apiKey = "{$example}", // optional + from = "{$example}" // optional ) diff --git a/docs/examples/kotlin/messaging/update-topic.md b/docs/examples/kotlin/messaging/update-topic.md index 68e8949..a7e2ffc 100644 --- a/docs/examples/kotlin/messaging/update-topic.md +++ b/docs/examples/kotlin/messaging/update-topic.md @@ -10,7 +10,7 @@ val client = Client() val messaging = Messaging(client) val response = messaging.updateTopic( - topicId = "<TOPIC_ID>", - name = "<NAME>", // optional + topicId = "{$example}", + name = "{$example}", // optional subscribe = listOf("any") // optional ) diff --git a/docs/examples/kotlin/messaging/update-twilio-provider.md b/docs/examples/kotlin/messaging/update-twilio-provider.md index 2c7a5e8..398e673 100644 --- a/docs/examples/kotlin/messaging/update-twilio-provider.md +++ b/docs/examples/kotlin/messaging/update-twilio-provider.md @@ -10,10 +10,10 @@ val client = Client() val messaging = Messaging(client) val response = messaging.updateTwilioProvider( - providerId = "<PROVIDER_ID>", - name = "<NAME>", // optional + providerId = "{$example}", + name = "{$example}", // optional enabled = false, // optional - accountSid = "<ACCOUNT_SID>", // optional - authToken = "<AUTH_TOKEN>", // optional - from = "<FROM>" // optional + accountSid = "{$example}", // optional + authToken = "{$example}", // optional + from = "{$example}" // optional ) diff --git a/docs/examples/kotlin/messaging/update-vonage-provider.md b/docs/examples/kotlin/messaging/update-vonage-provider.md index 4d432f7..13305c0 100644 --- a/docs/examples/kotlin/messaging/update-vonage-provider.md +++ b/docs/examples/kotlin/messaging/update-vonage-provider.md @@ -10,10 +10,10 @@ val client = Client() val messaging = Messaging(client) val response = messaging.updateVonageProvider( - providerId = "<PROVIDER_ID>", - name = "<NAME>", // optional + providerId = "{$example}", + name = "{$example}", // optional enabled = false, // optional - apiKey = "<API_KEY>", // optional - apiSecret = "<API_SECRET>", // optional - from = "<FROM>" // optional + apiKey = "{$example}", // optional + apiSecret = "{$example}", // optional + from = "{$example}" // optional ) diff --git a/docs/examples/kotlin/storage/create-bucket.md b/docs/examples/kotlin/storage/create-bucket.md index 0c0119e..a703331 100644 --- a/docs/examples/kotlin/storage/create-bucket.md +++ b/docs/examples/kotlin/storage/create-bucket.md @@ -10,14 +10,14 @@ val client = Client() val storage = Storage(client) val response = storage.createBucket( - bucketId = "<BUCKET_ID>", - name = "<NAME>", + bucketId = "{$example}", + name = "{$example}", permissions = listOf("read("any")"), // optional fileSecurity = false, // optional enabled = false, // optional maximumFileSize = 1, // optional allowedFileExtensions = listOf(), // optional - compression = "none", // optional + compression = "{$example}", // optional encryption = false, // optional antivirus = false // optional ) diff --git a/docs/examples/kotlin/storage/create-file.md b/docs/examples/kotlin/storage/create-file.md index a2203ff..02508ec 100644 --- a/docs/examples/kotlin/storage/create-file.md +++ b/docs/examples/kotlin/storage/create-file.md @@ -1,6 +1,6 @@ import io.appwrite.Client import io.appwrite.coroutines.CoroutineCallback -import io.appwrite.models.InputFile +import io.appwrite.models.Payload import io.appwrite.services.Storage val client = Client() @@ -11,8 +11,8 @@ val client = Client() val storage = Storage(client) val response = storage.createFile( - bucketId = "<BUCKET_ID>", - fileId = "<FILE_ID>", - file = InputFile.fromPath("file.png"), + bucketId = "{$example}", + fileId = "{$example}", + file = Payload.fromFile("/path/to/file.png"), permissions = listOf("read("any")") // optional ) diff --git a/docs/examples/kotlin/storage/delete-bucket.md b/docs/examples/kotlin/storage/delete-bucket.md index 2298103..b5ccff5 100644 --- a/docs/examples/kotlin/storage/delete-bucket.md +++ b/docs/examples/kotlin/storage/delete-bucket.md @@ -10,5 +10,5 @@ val client = Client() val storage = Storage(client) val response = storage.deleteBucket( - bucketId = "<BUCKET_ID>" + bucketId = "{$example}" ) diff --git a/docs/examples/kotlin/storage/delete-file.md b/docs/examples/kotlin/storage/delete-file.md index 5b17c5c..56f5058 100644 --- a/docs/examples/kotlin/storage/delete-file.md +++ b/docs/examples/kotlin/storage/delete-file.md @@ -10,6 +10,6 @@ val client = Client() val storage = Storage(client) val response = storage.deleteFile( - bucketId = "<BUCKET_ID>", - fileId = "<FILE_ID>" + bucketId = "{$example}", + fileId = "{$example}" ) diff --git a/docs/examples/kotlin/storage/get-bucket.md b/docs/examples/kotlin/storage/get-bucket.md index 604ec05..1ecfc44 100644 --- a/docs/examples/kotlin/storage/get-bucket.md +++ b/docs/examples/kotlin/storage/get-bucket.md @@ -10,5 +10,5 @@ val client = Client() val storage = Storage(client) val response = storage.getBucket( - bucketId = "<BUCKET_ID>" + bucketId = "{$example}" ) diff --git a/docs/examples/kotlin/storage/get-file-download.md b/docs/examples/kotlin/storage/get-file-download.md index 46b02e7..507f2f9 100644 --- a/docs/examples/kotlin/storage/get-file-download.md +++ b/docs/examples/kotlin/storage/get-file-download.md @@ -10,6 +10,6 @@ val client = Client() val storage = Storage(client) val result = storage.getFileDownload( - bucketId = "<BUCKET_ID>", - fileId = "<FILE_ID>" + bucketId = "{$example}", + fileId = "{$example}" ) diff --git a/docs/examples/kotlin/storage/get-file-preview.md b/docs/examples/kotlin/storage/get-file-preview.md index 88be42f..382f5ff 100644 --- a/docs/examples/kotlin/storage/get-file-preview.md +++ b/docs/examples/kotlin/storage/get-file-preview.md @@ -10,11 +10,11 @@ val client = Client() val storage = Storage(client) val result = storage.getFilePreview( - bucketId = "<BUCKET_ID>", - fileId = "<FILE_ID>", + bucketId = "{$example}", + fileId = "{$example}", width = 0, // optional height = 0, // optional - gravity = "center", // optional + gravity = "{$example}", // optional quality = 0, // optional borderWidth = 0, // optional borderColor = "", // optional @@ -22,5 +22,5 @@ val result = storage.getFilePreview( opacity = 0, // optional rotation = -360, // optional background = "", // optional - output = "jpg" // optional + output = "{$example}" // optional ) diff --git a/docs/examples/kotlin/storage/get-file-view.md b/docs/examples/kotlin/storage/get-file-view.md index b4ad81f..c8ffcdd 100644 --- a/docs/examples/kotlin/storage/get-file-view.md +++ b/docs/examples/kotlin/storage/get-file-view.md @@ -10,6 +10,6 @@ val client = Client() val storage = Storage(client) val result = storage.getFileView( - bucketId = "<BUCKET_ID>", - fileId = "<FILE_ID>" + bucketId = "{$example}", + fileId = "{$example}" ) diff --git a/docs/examples/kotlin/storage/get-file.md b/docs/examples/kotlin/storage/get-file.md index a6d2d3d..c7a3fd2 100644 --- a/docs/examples/kotlin/storage/get-file.md +++ b/docs/examples/kotlin/storage/get-file.md @@ -10,6 +10,6 @@ val client = Client() val storage = Storage(client) val response = storage.getFile( - bucketId = "<BUCKET_ID>", - fileId = "<FILE_ID>" + bucketId = "{$example}", + fileId = "{$example}" ) diff --git a/docs/examples/kotlin/storage/list-buckets.md b/docs/examples/kotlin/storage/list-buckets.md index 4b22970..f6e7148 100644 --- a/docs/examples/kotlin/storage/list-buckets.md +++ b/docs/examples/kotlin/storage/list-buckets.md @@ -11,5 +11,5 @@ val storage = Storage(client) val response = storage.listBuckets( queries = listOf(), // optional - search = "<SEARCH>" // optional + search = "{$example}" // optional ) diff --git a/docs/examples/kotlin/storage/list-files.md b/docs/examples/kotlin/storage/list-files.md index e7c3d66..4175ed2 100644 --- a/docs/examples/kotlin/storage/list-files.md +++ b/docs/examples/kotlin/storage/list-files.md @@ -10,7 +10,7 @@ val client = Client() val storage = Storage(client) val response = storage.listFiles( - bucketId = "<BUCKET_ID>", + bucketId = "{$example}", queries = listOf(), // optional - search = "<SEARCH>" // optional + search = "{$example}" // optional ) diff --git a/docs/examples/kotlin/storage/update-bucket.md b/docs/examples/kotlin/storage/update-bucket.md index 4040dfb..ca3ea84 100644 --- a/docs/examples/kotlin/storage/update-bucket.md +++ b/docs/examples/kotlin/storage/update-bucket.md @@ -10,14 +10,14 @@ val client = Client() val storage = Storage(client) val response = storage.updateBucket( - bucketId = "<BUCKET_ID>", - name = "<NAME>", + bucketId = "{$example}", + name = "{$example}", permissions = listOf("read("any")"), // optional fileSecurity = false, // optional enabled = false, // optional maximumFileSize = 1, // optional allowedFileExtensions = listOf(), // optional - compression = "none", // optional + compression = "{$example}", // optional encryption = false, // optional antivirus = false // optional ) diff --git a/docs/examples/kotlin/storage/update-file.md b/docs/examples/kotlin/storage/update-file.md index 96d4b08..5f79d91 100644 --- a/docs/examples/kotlin/storage/update-file.md +++ b/docs/examples/kotlin/storage/update-file.md @@ -10,8 +10,8 @@ val client = Client() val storage = Storage(client) val response = storage.updateFile( - bucketId = "<BUCKET_ID>", - fileId = "<FILE_ID>", - name = "<NAME>", // optional + bucketId = "{$example}", + fileId = "{$example}", + name = "{$example}", // optional permissions = listOf("read("any")") // optional ) diff --git a/docs/examples/kotlin/teams/create-membership.md b/docs/examples/kotlin/teams/create-membership.md index 250502e..2e1fbc3 100644 --- a/docs/examples/kotlin/teams/create-membership.md +++ b/docs/examples/kotlin/teams/create-membership.md @@ -10,11 +10,11 @@ val client = Client() val teams = Teams(client) val response = teams.createMembership( - teamId = "<TEAM_ID>", + teamId = "{$example}", roles = listOf(), - email = "email@example.com", // optional - userId = "<USER_ID>", // optional - phone = "+12065550100", // optional - url = "https://example.com", // optional - name = "<NAME>" // optional + email = "{$example}", // optional + userId = "{$example}", // optional + phone = "{$example}", // optional + url = "{$example}", // optional + name = "{$example}" // optional ) diff --git a/docs/examples/kotlin/teams/create.md b/docs/examples/kotlin/teams/create.md index b66029f..e7a5c7f 100644 --- a/docs/examples/kotlin/teams/create.md +++ b/docs/examples/kotlin/teams/create.md @@ -10,7 +10,7 @@ val client = Client() val teams = Teams(client) val response = teams.create( - teamId = "<TEAM_ID>", - name = "<NAME>", + teamId = "{$example}", + name = "{$example}", roles = listOf() // optional ) diff --git a/docs/examples/kotlin/teams/delete-membership.md b/docs/examples/kotlin/teams/delete-membership.md index 0dff545..93559ca 100644 --- a/docs/examples/kotlin/teams/delete-membership.md +++ b/docs/examples/kotlin/teams/delete-membership.md @@ -10,6 +10,6 @@ val client = Client() val teams = Teams(client) val response = teams.deleteMembership( - teamId = "<TEAM_ID>", - membershipId = "<MEMBERSHIP_ID>" + teamId = "{$example}", + membershipId = "{$example}" ) diff --git a/docs/examples/kotlin/teams/delete.md b/docs/examples/kotlin/teams/delete.md index 9a75b2a..4aa8970 100644 --- a/docs/examples/kotlin/teams/delete.md +++ b/docs/examples/kotlin/teams/delete.md @@ -10,5 +10,5 @@ val client = Client() val teams = Teams(client) val response = teams.delete( - teamId = "<TEAM_ID>" + teamId = "{$example}" ) diff --git a/docs/examples/kotlin/teams/get-membership.md b/docs/examples/kotlin/teams/get-membership.md index 77c6ae5..e1fdc94 100644 --- a/docs/examples/kotlin/teams/get-membership.md +++ b/docs/examples/kotlin/teams/get-membership.md @@ -10,6 +10,6 @@ val client = Client() val teams = Teams(client) val response = teams.getMembership( - teamId = "<TEAM_ID>", - membershipId = "<MEMBERSHIP_ID>" + teamId = "{$example}", + membershipId = "{$example}" ) diff --git a/docs/examples/kotlin/teams/get-prefs.md b/docs/examples/kotlin/teams/get-prefs.md index 2700c89..4d6cf69 100644 --- a/docs/examples/kotlin/teams/get-prefs.md +++ b/docs/examples/kotlin/teams/get-prefs.md @@ -10,5 +10,5 @@ val client = Client() val teams = Teams(client) val response = teams.getPrefs( - teamId = "<TEAM_ID>" + teamId = "{$example}" ) diff --git a/docs/examples/kotlin/teams/get.md b/docs/examples/kotlin/teams/get.md index a7be374..8f34d2f 100644 --- a/docs/examples/kotlin/teams/get.md +++ b/docs/examples/kotlin/teams/get.md @@ -10,5 +10,5 @@ val client = Client() val teams = Teams(client) val response = teams.get( - teamId = "<TEAM_ID>" + teamId = "{$example}" ) diff --git a/docs/examples/kotlin/teams/list-memberships.md b/docs/examples/kotlin/teams/list-memberships.md index 916252d..81914d3 100644 --- a/docs/examples/kotlin/teams/list-memberships.md +++ b/docs/examples/kotlin/teams/list-memberships.md @@ -10,7 +10,7 @@ val client = Client() val teams = Teams(client) val response = teams.listMemberships( - teamId = "<TEAM_ID>", + teamId = "{$example}", queries = listOf(), // optional - search = "<SEARCH>" // optional + search = "{$example}" // optional ) diff --git a/docs/examples/kotlin/teams/list.md b/docs/examples/kotlin/teams/list.md index 5af95db..e05db81 100644 --- a/docs/examples/kotlin/teams/list.md +++ b/docs/examples/kotlin/teams/list.md @@ -11,5 +11,5 @@ val teams = Teams(client) val response = teams.list( queries = listOf(), // optional - search = "<SEARCH>" // optional + search = "{$example}" // optional ) diff --git a/docs/examples/kotlin/teams/update-membership-status.md b/docs/examples/kotlin/teams/update-membership-status.md index 75c4a73..45a780f 100644 --- a/docs/examples/kotlin/teams/update-membership-status.md +++ b/docs/examples/kotlin/teams/update-membership-status.md @@ -10,8 +10,8 @@ val client = Client() val teams = Teams(client) val response = teams.updateMembershipStatus( - teamId = "<TEAM_ID>", - membershipId = "<MEMBERSHIP_ID>", - userId = "<USER_ID>", - secret = "<SECRET>" + teamId = "{$example}", + membershipId = "{$example}", + userId = "{$example}", + secret = "{$example}" ) diff --git a/docs/examples/kotlin/teams/update-membership.md b/docs/examples/kotlin/teams/update-membership.md index 556e0a3..5ef03aa 100644 --- a/docs/examples/kotlin/teams/update-membership.md +++ b/docs/examples/kotlin/teams/update-membership.md @@ -10,7 +10,7 @@ val client = Client() val teams = Teams(client) val response = teams.updateMembership( - teamId = "<TEAM_ID>", - membershipId = "<MEMBERSHIP_ID>", + teamId = "{$example}", + membershipId = "{$example}", roles = listOf() ) diff --git a/docs/examples/kotlin/teams/update-name.md b/docs/examples/kotlin/teams/update-name.md index 8e6a2a2..1b8e4a0 100644 --- a/docs/examples/kotlin/teams/update-name.md +++ b/docs/examples/kotlin/teams/update-name.md @@ -10,6 +10,6 @@ val client = Client() val teams = Teams(client) val response = teams.updateName( - teamId = "<TEAM_ID>", - name = "<NAME>" + teamId = "{$example}", + name = "{$example}" ) diff --git a/docs/examples/kotlin/teams/update-prefs.md b/docs/examples/kotlin/teams/update-prefs.md index c9153d3..a4e4b13 100644 --- a/docs/examples/kotlin/teams/update-prefs.md +++ b/docs/examples/kotlin/teams/update-prefs.md @@ -10,6 +10,6 @@ val client = Client() val teams = Teams(client) val response = teams.updatePrefs( - teamId = "<TEAM_ID>", + teamId = "{$example}", prefs = mapOf( "a" to "b" ) ) diff --git a/docs/examples/kotlin/users/create-argon2user.md b/docs/examples/kotlin/users/create-argon2user.md index a01f6d5..d1e163e 100644 --- a/docs/examples/kotlin/users/create-argon2user.md +++ b/docs/examples/kotlin/users/create-argon2user.md @@ -10,8 +10,8 @@ val client = Client() val users = Users(client) val response = users.createArgon2User( - userId = "<USER_ID>", - email = "email@example.com", - password = "password", - name = "<NAME>" // optional + userId = "{$example}", + email = "{$example}", + password = "{$example}", + name = "{$example}" // optional ) diff --git a/docs/examples/kotlin/users/create-bcrypt-user.md b/docs/examples/kotlin/users/create-bcrypt-user.md index b4758e4..1c267f8 100644 --- a/docs/examples/kotlin/users/create-bcrypt-user.md +++ b/docs/examples/kotlin/users/create-bcrypt-user.md @@ -10,8 +10,8 @@ val client = Client() val users = Users(client) val response = users.createBcryptUser( - userId = "<USER_ID>", - email = "email@example.com", - password = "password", - name = "<NAME>" // optional + userId = "{$example}", + email = "{$example}", + password = "{$example}", + name = "{$example}" // optional ) diff --git a/docs/examples/kotlin/users/create-j-w-t.md b/docs/examples/kotlin/users/create-j-w-t.md index 137847d..aa755c3 100644 --- a/docs/examples/kotlin/users/create-j-w-t.md +++ b/docs/examples/kotlin/users/create-j-w-t.md @@ -10,7 +10,7 @@ val client = Client() val users = Users(client) val response = users.createJWT( - userId = "<USER_ID>", - sessionId = "<SESSION_ID>", // optional + userId = "{$example}", + sessionId = "{$example}", // optional duration = 0 // optional ) diff --git a/docs/examples/kotlin/users/create-m-d5user.md b/docs/examples/kotlin/users/create-m-d5user.md index f9d7cb2..df122ef 100644 --- a/docs/examples/kotlin/users/create-m-d5user.md +++ b/docs/examples/kotlin/users/create-m-d5user.md @@ -10,8 +10,8 @@ val client = Client() val users = Users(client) val response = users.createMD5User( - userId = "<USER_ID>", - email = "email@example.com", - password = "password", - name = "<NAME>" // optional + userId = "{$example}", + email = "{$example}", + password = "{$example}", + name = "{$example}" // optional ) diff --git a/docs/examples/kotlin/users/create-mfa-recovery-codes.md b/docs/examples/kotlin/users/create-mfa-recovery-codes.md index b3a3950..65a5dc7 100644 --- a/docs/examples/kotlin/users/create-mfa-recovery-codes.md +++ b/docs/examples/kotlin/users/create-mfa-recovery-codes.md @@ -10,5 +10,5 @@ val client = Client() val users = Users(client) val response = users.createMfaRecoveryCodes( - userId = "<USER_ID>" + userId = "{$example}" ) diff --git a/docs/examples/kotlin/users/create-p-h-pass-user.md b/docs/examples/kotlin/users/create-p-h-pass-user.md index 87d74aa..40cb928 100644 --- a/docs/examples/kotlin/users/create-p-h-pass-user.md +++ b/docs/examples/kotlin/users/create-p-h-pass-user.md @@ -10,8 +10,8 @@ val client = Client() val users = Users(client) val response = users.createPHPassUser( - userId = "<USER_ID>", - email = "email@example.com", - password = "password", - name = "<NAME>" // optional + userId = "{$example}", + email = "{$example}", + password = "{$example}", + name = "{$example}" // optional ) diff --git a/docs/examples/kotlin/users/create-s-h-a-user.md b/docs/examples/kotlin/users/create-s-h-a-user.md index 0be03bf..8f6794d 100644 --- a/docs/examples/kotlin/users/create-s-h-a-user.md +++ b/docs/examples/kotlin/users/create-s-h-a-user.md @@ -10,9 +10,9 @@ val client = Client() val users = Users(client) val response = users.createSHAUser( - userId = "<USER_ID>", - email = "email@example.com", - password = "password", - passwordVersion = "sha1", // optional - name = "<NAME>" // optional + userId = "{$example}", + email = "{$example}", + password = "{$example}", + passwordVersion = "{$example}", // optional + name = "{$example}" // optional ) diff --git a/docs/examples/kotlin/users/create-scrypt-modified-user.md b/docs/examples/kotlin/users/create-scrypt-modified-user.md index f651d3f..dd2fac9 100644 --- a/docs/examples/kotlin/users/create-scrypt-modified-user.md +++ b/docs/examples/kotlin/users/create-scrypt-modified-user.md @@ -10,11 +10,11 @@ val client = Client() val users = Users(client) val response = users.createScryptModifiedUser( - userId = "<USER_ID>", - email = "email@example.com", - password = "password", - passwordSalt = "<PASSWORD_SALT>", - passwordSaltSeparator = "<PASSWORD_SALT_SEPARATOR>", - passwordSignerKey = "<PASSWORD_SIGNER_KEY>", - name = "<NAME>" // optional + userId = "{$example}", + email = "{$example}", + password = "{$example}", + passwordSalt = "{$example}", + passwordSaltSeparator = "{$example}", + passwordSignerKey = "{$example}", + name = "{$example}" // optional ) diff --git a/docs/examples/kotlin/users/create-scrypt-user.md b/docs/examples/kotlin/users/create-scrypt-user.md index 2502312..fb04246 100644 --- a/docs/examples/kotlin/users/create-scrypt-user.md +++ b/docs/examples/kotlin/users/create-scrypt-user.md @@ -10,13 +10,13 @@ val client = Client() val users = Users(client) val response = users.createScryptUser( - userId = "<USER_ID>", - email = "email@example.com", - password = "password", - passwordSalt = "<PASSWORD_SALT>", + userId = "{$example}", + email = "{$example}", + password = "{$example}", + passwordSalt = "{$example}", passwordCpu = 0, passwordMemory = 0, passwordParallel = 0, passwordLength = 0, - name = "<NAME>" // optional + name = "{$example}" // optional ) diff --git a/docs/examples/kotlin/users/create-session.md b/docs/examples/kotlin/users/create-session.md index 4b0e5dc..8094c68 100644 --- a/docs/examples/kotlin/users/create-session.md +++ b/docs/examples/kotlin/users/create-session.md @@ -10,5 +10,5 @@ val client = Client() val users = Users(client) val response = users.createSession( - userId = "<USER_ID>" + userId = "{$example}" ) diff --git a/docs/examples/kotlin/users/create-target.md b/docs/examples/kotlin/users/create-target.md index 4a7856b..0bc52c0 100644 --- a/docs/examples/kotlin/users/create-target.md +++ b/docs/examples/kotlin/users/create-target.md @@ -11,10 +11,10 @@ val client = Client() val users = Users(client) val response = users.createTarget( - userId = "<USER_ID>", - targetId = "<TARGET_ID>", + userId = "{$example}", + targetId = "{$example}", providerType = MessagingProviderType.EMAIL, - identifier = "<IDENTIFIER>", - providerId = "<PROVIDER_ID>", // optional - name = "<NAME>" // optional + identifier = "{$example}", + providerId = "{$example}", // optional + name = "{$example}" // optional ) diff --git a/docs/examples/kotlin/users/create-token.md b/docs/examples/kotlin/users/create-token.md index bd8f76d..78b418d 100644 --- a/docs/examples/kotlin/users/create-token.md +++ b/docs/examples/kotlin/users/create-token.md @@ -10,7 +10,7 @@ val client = Client() val users = Users(client) val response = users.createToken( - userId = "<USER_ID>", + userId = "{$example}", length = 4, // optional expire = 60 // optional ) diff --git a/docs/examples/kotlin/users/create.md b/docs/examples/kotlin/users/create.md index b5bcee9..43575b0 100644 --- a/docs/examples/kotlin/users/create.md +++ b/docs/examples/kotlin/users/create.md @@ -10,9 +10,9 @@ val client = Client() val users = Users(client) val response = users.create( - userId = "<USER_ID>", - email = "email@example.com", // optional - phone = "+12065550100", // optional + userId = "{$example}", + email = "{$example}", // optional + phone = "{$example}", // optional password = "", // optional - name = "<NAME>" // optional + name = "{$example}" // optional ) diff --git a/docs/examples/kotlin/users/delete-identity.md b/docs/examples/kotlin/users/delete-identity.md index 2c0bfae..ff32aa7 100644 --- a/docs/examples/kotlin/users/delete-identity.md +++ b/docs/examples/kotlin/users/delete-identity.md @@ -10,5 +10,5 @@ val client = Client() val users = Users(client) val response = users.deleteIdentity( - identityId = "<IDENTITY_ID>" + identityId = "{$example}" ) diff --git a/docs/examples/kotlin/users/delete-mfa-authenticator.md b/docs/examples/kotlin/users/delete-mfa-authenticator.md index 60989d4..925d56d 100644 --- a/docs/examples/kotlin/users/delete-mfa-authenticator.md +++ b/docs/examples/kotlin/users/delete-mfa-authenticator.md @@ -11,6 +11,6 @@ val client = Client() val users = Users(client) val response = users.deleteMfaAuthenticator( - userId = "<USER_ID>", + userId = "{$example}", type = AuthenticatorType.TOTP ) diff --git a/docs/examples/kotlin/users/delete-session.md b/docs/examples/kotlin/users/delete-session.md index 0127fa3..b4fc88d 100644 --- a/docs/examples/kotlin/users/delete-session.md +++ b/docs/examples/kotlin/users/delete-session.md @@ -10,6 +10,6 @@ val client = Client() val users = Users(client) val response = users.deleteSession( - userId = "<USER_ID>", - sessionId = "<SESSION_ID>" + userId = "{$example}", + sessionId = "{$example}" ) diff --git a/docs/examples/kotlin/users/delete-sessions.md b/docs/examples/kotlin/users/delete-sessions.md index 26d7c70..482fc7a 100644 --- a/docs/examples/kotlin/users/delete-sessions.md +++ b/docs/examples/kotlin/users/delete-sessions.md @@ -10,5 +10,5 @@ val client = Client() val users = Users(client) val response = users.deleteSessions( - userId = "<USER_ID>" + userId = "{$example}" ) diff --git a/docs/examples/kotlin/users/delete-target.md b/docs/examples/kotlin/users/delete-target.md index 6be6652..02ecbd5 100644 --- a/docs/examples/kotlin/users/delete-target.md +++ b/docs/examples/kotlin/users/delete-target.md @@ -10,6 +10,6 @@ val client = Client() val users = Users(client) val response = users.deleteTarget( - userId = "<USER_ID>", - targetId = "<TARGET_ID>" + userId = "{$example}", + targetId = "{$example}" ) diff --git a/docs/examples/kotlin/users/delete.md b/docs/examples/kotlin/users/delete.md index e250c44..adda8ef 100644 --- a/docs/examples/kotlin/users/delete.md +++ b/docs/examples/kotlin/users/delete.md @@ -10,5 +10,5 @@ val client = Client() val users = Users(client) val response = users.delete( - userId = "<USER_ID>" + userId = "{$example}" ) diff --git a/docs/examples/kotlin/users/get-mfa-recovery-codes.md b/docs/examples/kotlin/users/get-mfa-recovery-codes.md index 5860b4c..d5f0559 100644 --- a/docs/examples/kotlin/users/get-mfa-recovery-codes.md +++ b/docs/examples/kotlin/users/get-mfa-recovery-codes.md @@ -10,5 +10,5 @@ val client = Client() val users = Users(client) val response = users.getMfaRecoveryCodes( - userId = "<USER_ID>" + userId = "{$example}" ) diff --git a/docs/examples/kotlin/users/get-prefs.md b/docs/examples/kotlin/users/get-prefs.md index 7654537..e168bc0 100644 --- a/docs/examples/kotlin/users/get-prefs.md +++ b/docs/examples/kotlin/users/get-prefs.md @@ -10,5 +10,5 @@ val client = Client() val users = Users(client) val response = users.getPrefs( - userId = "<USER_ID>" + userId = "{$example}" ) diff --git a/docs/examples/kotlin/users/get-target.md b/docs/examples/kotlin/users/get-target.md index be8bbe8..84eb809 100644 --- a/docs/examples/kotlin/users/get-target.md +++ b/docs/examples/kotlin/users/get-target.md @@ -10,6 +10,6 @@ val client = Client() val users = Users(client) val response = users.getTarget( - userId = "<USER_ID>", - targetId = "<TARGET_ID>" + userId = "{$example}", + targetId = "{$example}" ) diff --git a/docs/examples/kotlin/users/get.md b/docs/examples/kotlin/users/get.md index 8298430..170e1a8 100644 --- a/docs/examples/kotlin/users/get.md +++ b/docs/examples/kotlin/users/get.md @@ -10,5 +10,5 @@ val client = Client() val users = Users(client) val response = users.get( - userId = "<USER_ID>" + userId = "{$example}" ) diff --git a/docs/examples/kotlin/users/list-identities.md b/docs/examples/kotlin/users/list-identities.md index 05156db..6509f35 100644 --- a/docs/examples/kotlin/users/list-identities.md +++ b/docs/examples/kotlin/users/list-identities.md @@ -11,5 +11,5 @@ val users = Users(client) val response = users.listIdentities( queries = listOf(), // optional - search = "<SEARCH>" // optional + search = "{$example}" // optional ) diff --git a/docs/examples/kotlin/users/list-logs.md b/docs/examples/kotlin/users/list-logs.md index 8868d0d..8ba3588 100644 --- a/docs/examples/kotlin/users/list-logs.md +++ b/docs/examples/kotlin/users/list-logs.md @@ -10,6 +10,6 @@ val client = Client() val users = Users(client) val response = users.listLogs( - userId = "<USER_ID>", + userId = "{$example}", queries = listOf() // optional ) diff --git a/docs/examples/kotlin/users/list-memberships.md b/docs/examples/kotlin/users/list-memberships.md index 5a3d2ea..24e5987 100644 --- a/docs/examples/kotlin/users/list-memberships.md +++ b/docs/examples/kotlin/users/list-memberships.md @@ -10,5 +10,5 @@ val client = Client() val users = Users(client) val response = users.listMemberships( - userId = "<USER_ID>" + userId = "{$example}" ) diff --git a/docs/examples/kotlin/users/list-mfa-factors.md b/docs/examples/kotlin/users/list-mfa-factors.md index 25d9a4a..469e20e 100644 --- a/docs/examples/kotlin/users/list-mfa-factors.md +++ b/docs/examples/kotlin/users/list-mfa-factors.md @@ -10,5 +10,5 @@ val client = Client() val users = Users(client) val response = users.listMfaFactors( - userId = "<USER_ID>" + userId = "{$example}" ) diff --git a/docs/examples/kotlin/users/list-sessions.md b/docs/examples/kotlin/users/list-sessions.md index c14ebd7..23506c1 100644 --- a/docs/examples/kotlin/users/list-sessions.md +++ b/docs/examples/kotlin/users/list-sessions.md @@ -10,5 +10,5 @@ val client = Client() val users = Users(client) val response = users.listSessions( - userId = "<USER_ID>" + userId = "{$example}" ) diff --git a/docs/examples/kotlin/users/list-targets.md b/docs/examples/kotlin/users/list-targets.md index d017592..fb343fc 100644 --- a/docs/examples/kotlin/users/list-targets.md +++ b/docs/examples/kotlin/users/list-targets.md @@ -10,6 +10,6 @@ val client = Client() val users = Users(client) val response = users.listTargets( - userId = "<USER_ID>", + userId = "{$example}", queries = listOf() // optional ) diff --git a/docs/examples/kotlin/users/list.md b/docs/examples/kotlin/users/list.md index e86ac0d..f86cd3f 100644 --- a/docs/examples/kotlin/users/list.md +++ b/docs/examples/kotlin/users/list.md @@ -11,5 +11,5 @@ val users = Users(client) val response = users.list( queries = listOf(), // optional - search = "<SEARCH>" // optional + search = "{$example}" // optional ) diff --git a/docs/examples/kotlin/users/update-email-verification.md b/docs/examples/kotlin/users/update-email-verification.md index 3f5f293..2bafa6f 100644 --- a/docs/examples/kotlin/users/update-email-verification.md +++ b/docs/examples/kotlin/users/update-email-verification.md @@ -10,6 +10,6 @@ val client = Client() val users = Users(client) val response = users.updateEmailVerification( - userId = "<USER_ID>", + userId = "{$example}", emailVerification = false ) diff --git a/docs/examples/kotlin/users/update-email.md b/docs/examples/kotlin/users/update-email.md index b7a0644..3e8fecf 100644 --- a/docs/examples/kotlin/users/update-email.md +++ b/docs/examples/kotlin/users/update-email.md @@ -10,6 +10,6 @@ val client = Client() val users = Users(client) val response = users.updateEmail( - userId = "<USER_ID>", - email = "email@example.com" + userId = "{$example}", + email = "{$example}" ) diff --git a/docs/examples/kotlin/users/update-labels.md b/docs/examples/kotlin/users/update-labels.md index ecc2948..720218c 100644 --- a/docs/examples/kotlin/users/update-labels.md +++ b/docs/examples/kotlin/users/update-labels.md @@ -10,6 +10,6 @@ val client = Client() val users = Users(client) val response = users.updateLabels( - userId = "<USER_ID>", + userId = "{$example}", labels = listOf() ) diff --git a/docs/examples/kotlin/users/update-mfa-recovery-codes.md b/docs/examples/kotlin/users/update-mfa-recovery-codes.md index b8fa2c5..903c059 100644 --- a/docs/examples/kotlin/users/update-mfa-recovery-codes.md +++ b/docs/examples/kotlin/users/update-mfa-recovery-codes.md @@ -10,5 +10,5 @@ val client = Client() val users = Users(client) val response = users.updateMfaRecoveryCodes( - userId = "<USER_ID>" + userId = "{$example}" ) diff --git a/docs/examples/kotlin/users/update-mfa.md b/docs/examples/kotlin/users/update-mfa.md index a169f3d..33c3d0e 100644 --- a/docs/examples/kotlin/users/update-mfa.md +++ b/docs/examples/kotlin/users/update-mfa.md @@ -10,6 +10,6 @@ val client = Client() val users = Users(client) val response = users.updateMfa( - userId = "<USER_ID>", + userId = "{$example}", mfa = false ) diff --git a/docs/examples/kotlin/users/update-name.md b/docs/examples/kotlin/users/update-name.md index 32d164d..50f4524 100644 --- a/docs/examples/kotlin/users/update-name.md +++ b/docs/examples/kotlin/users/update-name.md @@ -10,6 +10,6 @@ val client = Client() val users = Users(client) val response = users.updateName( - userId = "<USER_ID>", - name = "<NAME>" + userId = "{$example}", + name = "{$example}" ) diff --git a/docs/examples/kotlin/users/update-password.md b/docs/examples/kotlin/users/update-password.md index 1522267..d9b2321 100644 --- a/docs/examples/kotlin/users/update-password.md +++ b/docs/examples/kotlin/users/update-password.md @@ -10,6 +10,6 @@ val client = Client() val users = Users(client) val response = users.updatePassword( - userId = "<USER_ID>", + userId = "{$example}", password = "" ) diff --git a/docs/examples/kotlin/users/update-phone-verification.md b/docs/examples/kotlin/users/update-phone-verification.md index bc8f4c6..78c1185 100644 --- a/docs/examples/kotlin/users/update-phone-verification.md +++ b/docs/examples/kotlin/users/update-phone-verification.md @@ -10,6 +10,6 @@ val client = Client() val users = Users(client) val response = users.updatePhoneVerification( - userId = "<USER_ID>", + userId = "{$example}", phoneVerification = false ) diff --git a/docs/examples/kotlin/users/update-phone.md b/docs/examples/kotlin/users/update-phone.md index f00a15d..6f9ada0 100644 --- a/docs/examples/kotlin/users/update-phone.md +++ b/docs/examples/kotlin/users/update-phone.md @@ -10,6 +10,6 @@ val client = Client() val users = Users(client) val response = users.updatePhone( - userId = "<USER_ID>", - number = "+12065550100" + userId = "{$example}", + number = "{$example}" ) diff --git a/docs/examples/kotlin/users/update-prefs.md b/docs/examples/kotlin/users/update-prefs.md index cc8dcf6..c330e0d 100644 --- a/docs/examples/kotlin/users/update-prefs.md +++ b/docs/examples/kotlin/users/update-prefs.md @@ -10,6 +10,6 @@ val client = Client() val users = Users(client) val response = users.updatePrefs( - userId = "<USER_ID>", + userId = "{$example}", prefs = mapOf( "a" to "b" ) ) diff --git a/docs/examples/kotlin/users/update-status.md b/docs/examples/kotlin/users/update-status.md index e546ba5..a829a0a 100644 --- a/docs/examples/kotlin/users/update-status.md +++ b/docs/examples/kotlin/users/update-status.md @@ -10,6 +10,6 @@ val client = Client() val users = Users(client) val response = users.updateStatus( - userId = "<USER_ID>", + userId = "{$example}", status = false ) diff --git a/docs/examples/kotlin/users/update-target.md b/docs/examples/kotlin/users/update-target.md index 1827c6a..a56bf49 100644 --- a/docs/examples/kotlin/users/update-target.md +++ b/docs/examples/kotlin/users/update-target.md @@ -10,9 +10,9 @@ val client = Client() val users = Users(client) val response = users.updateTarget( - userId = "<USER_ID>", - targetId = "<TARGET_ID>", - identifier = "<IDENTIFIER>", // optional - providerId = "<PROVIDER_ID>", // optional - name = "<NAME>" // optional + userId = "{$example}", + targetId = "{$example}", + identifier = "{$example}", // optional + providerId = "{$example}", // optional + name = "{$example}" // optional ) diff --git a/src/main/kotlin/io/appwrite/Client.kt b/src/main/kotlin/io/appwrite/Client.kt index 8c18320..9a47c36 100644 --- a/src/main/kotlin/io/appwrite/Client.kt +++ b/src/main/kotlin/io/appwrite/Client.kt @@ -3,7 +3,8 @@ package io.appwrite import io.appwrite.exceptions.AppwriteException import io.appwrite.extensions.fromJson import io.appwrite.extensions.toJson -import io.appwrite.models.InputFile +import io.appwrite.extensions.fromMultiPart +import io.appwrite.models.Payload import io.appwrite.models.UploadProgress import kotlinx.coroutines.CoroutineScope import kotlinx.coroutines.Dispatchers @@ -57,11 +58,11 @@ class Client @JvmOverloads constructor( init { headers = mutableMapOf( "content-type" to "application/json", - "user-agent" to "AppwriteKotlinSDK/6.1.0 ${System.getProperty("http.agent")}", + "user-agent" to "AppwriteKotlinSDK/7.0.0 ${System.getProperty("http.agent")}", "x-sdk-name" to "Kotlin", "x-sdk-platform" to "server", "x-sdk-language" to "kotlin", - "x-sdk-version" to "6.1.0", + "x-sdk-version" to "7.0.0", "x-appwrite-response-format" to "1.6.0", ) @@ -237,7 +238,7 @@ class Client @JvmOverloads constructor( /** * Prepare the HTTP request - * + * * @param method * @param path * @param headers @@ -305,6 +306,14 @@ class Client @JvmOverloads constructor( ) } } + it.value is Payload -> { + val payload = it.value as Payload + if (payload.sourceType == "path") { + builder.addFormDataPart(it.key, payload.filename, File(payload.path).asRequestBody()) + } else { + builder.addFormDataPart(it.key, payload.toString()) + } + } else -> { builder.addFormDataPart(it.key, it.value.toString()) } @@ -332,7 +341,7 @@ class Client @JvmOverloads constructor( * @param headers * @param params * - * @return [T] + * @return [T] */ @Throws(AppwriteException::class) suspend fun <T> call( @@ -355,7 +364,7 @@ class Client @JvmOverloads constructor( * @param headers * @param params * - * @return [T] + * @return [T] */ @Throws(AppwriteException::class) suspend fun redirect( @@ -390,14 +399,14 @@ class Client @JvmOverloads constructor( onProgress: ((UploadProgress) -> Unit)? = null, ): T { var file: RandomAccessFile? = null - val input = params[paramName] as InputFile + val input = params[paramName] as Payload val size: Long = when(input.sourceType) { "path", "file" -> { file = RandomAccessFile(input.path, "r") file.length() } "bytes" -> { - (input.data as ByteArray).size.toLong() + input.toBinary().size.toLong() } else -> throw UnsupportedOperationException() } @@ -405,7 +414,7 @@ class Client @JvmOverloads constructor( if (size < CHUNK_SIZE) { val data = when(input.sourceType) { "file", "path" -> File(input.path).asRequestBody() - "bytes" -> (input.data as ByteArray).toRequestBody(input.mimeType.toMediaType()) + "bytes" -> input.toBinary().toRequestBody(input.mimeType?.toMediaType()) else -> throw UnsupportedOperationException() } params[paramName] = MultipartBody.Part.createFormData( @@ -452,7 +461,7 @@ class Client @JvmOverloads constructor( } else { size - 1 } - (input.data as ByteArray).copyInto( + input.toBinary().copyInto( buffer, startIndex = offset.toInt(), endIndex = end.toInt() @@ -494,7 +503,7 @@ class Client @JvmOverloads constructor( return converter(result as Map<String, Any>) } - /** + /** * Await Redirect * * @param request @@ -521,14 +530,14 @@ class Client @JvmOverloads constructor( .charStream() .buffered() .use(BufferedReader::readText) - + val error = if (response.headers["content-type"]?.contains("application/json") == true) { val map = body.fromJson<Map<String, Any>>() AppwriteException( - map["message"] as? String ?: "", + map["message"] as? String ?: "", (map["code"] as Number).toInt(), - map["type"] as? String ?: "", + map["type"] as? String ?: "", body ) } else { @@ -572,14 +581,14 @@ class Client @JvmOverloads constructor( .charStream() .buffered() .use(BufferedReader::readText) - + val error = if (response.headers["content-type"]?.contains("application/json") == true) { val map = body.fromJson<Map<String, Any>>() AppwriteException( - map["message"] as? String ?: "", + map["message"] as? String ?: "", (map["code"] as Number).toInt(), - map["type"] as? String ?: "", + map["type"] as? String ?: "", body ) } else { @@ -614,6 +623,14 @@ class Client @JvmOverloads constructor( return } } + if (response.headers["content-type"]?.contains("multipart/form-data") == true) { + val binaryBody = response.body!!.bytes() + val body = String(binaryBody) + val map = body.fromMultiPart(binaryBody) + it.resume(converter?.invoke(map) ?: map as T) + return + } + val body = response.body!! .charStream() .buffered() @@ -622,6 +639,7 @@ class Client @JvmOverloads constructor( it.resume(true as T) return } + val map = body.fromJson<Map<String, Any>>() it.resume( converter?.invoke(map) ?: map as T @@ -629,4 +647,4 @@ class Client @JvmOverloads constructor( } }) } -} \ No newline at end of file +} diff --git a/src/main/kotlin/io/appwrite/enums/Runtime.kt b/src/main/kotlin/io/appwrite/enums/Runtime.kt index 02691dc..cfec417 100644 --- a/src/main/kotlin/io/appwrite/enums/Runtime.kt +++ b/src/main/kotlin/io/appwrite/enums/Runtime.kt @@ -43,6 +43,12 @@ enum class Runtime(val value: String) { PYTHON_3_12("python-3.12"), @SerializedName("python-ml-3.11") PYTHON_ML_3_11("python-ml-3.11"), + @SerializedName("deno-1.21") + DENO_1_21("deno-1.21"), + @SerializedName("deno-1.24") + DENO_1_24("deno-1.24"), + @SerializedName("deno-1.35") + DENO_1_35("deno-1.35"), @SerializedName("deno-1.40") DENO_1_40("deno-1.40"), @SerializedName("dart-2.15") diff --git a/src/main/kotlin/io/appwrite/extensions/TypeExtensions.kt b/src/main/kotlin/io/appwrite/extensions/TypeExtensions.kt index 2674b99..521dc81 100644 --- a/src/main/kotlin/io/appwrite/extensions/TypeExtensions.kt +++ b/src/main/kotlin/io/appwrite/extensions/TypeExtensions.kt @@ -1,8 +1,107 @@ package io.appwrite.extensions +import io.appwrite.models.Payload import kotlin.reflect.KClass import kotlin.reflect.typeOf inline fun <reified T : Any> classOf(): Class<T> { return (typeOf<T>().classifier!! as KClass<T>).java -} \ No newline at end of file +} + +fun String.fromMultiPart(binaryBody: ByteArray): Map<String, Any> { + val match = Regex("(-+\\w+)--").find(this) ?: return emptyMap() + // For kotlin + + val boundary = match.groupValues[1] + + var map = + mutableMapOf<String, Any>( + "\$id" to "", + "\$createdAt" to "", + "\$updatedAt" to "", + "\$permissions" to emptyList<String>(), + "functionId" to "", + "trigger" to "", + "status" to "", + "requestMethod" to "", + "requestPath" to "", + "requestHeaders" to emptyList<HashMap<String, Any>>(), + "responseStatusCode" to 0, + "responseBody" to Payload.fromBinary(ByteArray(0)), + "responseHeaders" to emptyList<HashMap<String, Any>>(), + "logs" to "", + "errors" to "", + "duration" to 0.0, + "scheduledAt" to "", + ) + + val parts = this.split(boundary) + for (part in parts) { + var lines = part.split("\r\n") + + val name = Regex("name=\"?(\\w+)").find(part) ?: continue + + lines = + lines + .dropWhile { it.isEmpty() } + .drop(1) + .dropWhile { it.isEmpty() } + .dropLastWhile { it.isEmpty() } + val key = name.groupValues[1] + + if (lines.isEmpty()) { + continue + } + + if (key == "responseBody") { + val needle = "name=\"responseBody\"\r\n\r\n" + val indexOf = this.indexOf(needle) + needle.length + val endBytes = "\r\n-------".toByteArray() + + val list = ByteArray(binaryBody.size - indexOf) + val multipart = binaryBody.drop(indexOf) + + var weHitTheEnd = false + var j = 0 + for (i in multipart) { + if (multipart.size > j + endBytes.size) { + var jj = 0 + for (byte in endBytes) { + if (byte != multipart[j + jj]) break + jj++ + if (jj != endBytes.size - 1) continue + weHitTheEnd = true + } + } + if (weHitTheEnd) { + break + } + + list[j] = multipart[j] + j++ + } + + map["responseBody"] = + Payload.fromBinary(list.dropLastWhile { it == 0.toByte() }.toByteArray()) + continue + } + + if (lines[0] == "Content-Type: application/json") { + lines = lines.drop(1).dropWhile { it.isEmpty() } + val list = lines.joinToString("\r\n").fromJson<List<String>>() + map[key] = list + continue + } + + val value = lines.joinToString("\r\n") + + map[key] = + when (key) { + "responseStatusCode" -> value.toInt() + "duration" -> value.toFloat() + else -> value + } + } + + return map +} diff --git a/src/main/kotlin/io/appwrite/models/Execution.kt b/src/main/kotlin/io/appwrite/models/Execution.kt index 44724fa..c16659a 100644 --- a/src/main/kotlin/io/appwrite/models/Execution.kt +++ b/src/main/kotlin/io/appwrite/models/Execution.kt @@ -77,7 +77,7 @@ data class Execution( * HTTP response body. This will return empty unless execution is created as synchronous. */ @SerializedName("responseBody") - val responseBody: String, + val responseBody: Payload, /** * HTTP response headers as a key-value object. This will return only whitelisted headers. All headers are returned if execution is created as synchronous. @@ -147,7 +147,7 @@ data class Execution( requestPath = map["requestPath"] as String, requestHeaders = (map["requestHeaders"] as List<Map<String, Any>>).map { Headers.from(map = it) }, responseStatusCode = (map["responseStatusCode"] as Number).toLong(), - responseBody = map["responseBody"] as String, + responseBody = map["responseBody"] as Payload, responseHeaders = (map["responseHeaders"] as List<Map<String, Any>>).map { Headers.from(map = it) }, logs = map["logs"] as String, errors = map["errors"] as String, diff --git a/src/main/kotlin/io/appwrite/models/InputFile.kt b/src/main/kotlin/io/appwrite/models/InputFile.kt deleted file mode 100644 index afbb2e9..0000000 --- a/src/main/kotlin/io/appwrite/models/InputFile.kt +++ /dev/null @@ -1,37 +0,0 @@ -package io.appwrite.models - -import java.io.File -import java.net.URLConnection -import java.nio.file.Files -import java.nio.file.Paths - -class InputFile private constructor() { - - lateinit var path: String - lateinit var filename: String - lateinit var mimeType: String - lateinit var sourceType: String - lateinit var data: Any - - companion object { - fun fromFile(file: File) = InputFile().apply { - path = file.canonicalPath - filename = file.name - mimeType = Files.probeContentType(Paths.get(file.canonicalPath)) - ?: URLConnection.guessContentTypeFromName(filename) - ?: "" - sourceType = "file" - } - - fun fromPath(path: String): InputFile = fromFile(File(path)).apply { - sourceType = "path" - } - - fun fromBytes(bytes: ByteArray, filename: String = "", mimeType: String = "") = InputFile().apply { - this.filename = filename - this.mimeType = mimeType - data = bytes - sourceType = "bytes" - } - } -} \ No newline at end of file diff --git a/src/main/kotlin/io/appwrite/models/Payload.kt b/src/main/kotlin/io/appwrite/models/Payload.kt new file mode 100644 index 0000000..b6f5fcc --- /dev/null +++ b/src/main/kotlin/io/appwrite/models/Payload.kt @@ -0,0 +1,73 @@ +package io.appwrite.models + +import io.appwrite.extensions.gson +import java.io.File +import java.net.URLConnection +import java.nio.file.Files +import java.nio.file.Paths + +class Payload private constructor() { + + lateinit var path: String + lateinit var filename: String + lateinit var sourceType: String + lateinit var data: Any + var mimeType: String? = null + + override fun toString(): String { + if (sourceType != "bytes") { + throw IllegalArgumentException("source type is not supported: $sourceType") + } + + return String(data as ByteArray) + } + + fun toBinary(): ByteArray { + if (sourceType != "bytes") { + throw IllegalArgumentException("source type is not supported: $sourceType") + } + + return data as ByteArray + } + + fun toJson(): MutableMap<String, Any> { + if (sourceType != "bytes") { + throw IllegalArgumentException("source type is not supported: $sourceType") + } + + return gson.fromJson(toString(), MutableMap::class.java) as MutableMap<String, Any> + } + + fun toFile(path: String): File { + Files.createDirectories(Paths.get(path).parent); + + val file = File(path) + file.appendBytes(toBinary()) + return file + } + + companion object { + fun fromFile(path: String, filename: String = ""): Payload = fromFileObject(File(path), filename).apply { + sourceType = "path" + } + + fun fromBinary(bytes: ByteArray, filename: String = "") = Payload().apply { + this.filename = filename + data = bytes + sourceType = "bytes" + } + + fun fromString(string: String) = fromBinary(string.toByteArray()) + + fun fromJson(data: Any) = fromString(gson.toJson(data)) + + fun fromFileObject(file: File, name: String = "") = Payload().apply { + path = file.canonicalPath + filename = if (name != "") name else file.name + mimeType = Files.probeContentType(Paths.get(file.canonicalPath)) + ?: URLConnection.guessContentTypeFromName(filename) + ?: "" + sourceType = "file" + } + } +} diff --git a/src/main/kotlin/io/appwrite/services/Account.kt b/src/main/kotlin/io/appwrite/services/Account.kt index debf675..b7bd1f0 100644 --- a/src/main/kotlin/io/appwrite/services/Account.kt +++ b/src/main/kotlin/io/appwrite/services/Account.kt @@ -28,7 +28,7 @@ class Account(client: Client) : Service(client) { val apiParams = mutableMapOf<String, Any?>( ) - val apiHeaders = mutableMapOf( + val apiHeaders = mutableMapOf<String, String>( "content-type" to "application/json", ) val converter: (Any) -> io.appwrite.models.User<T> = { @@ -85,7 +85,7 @@ class Account(client: Client) : Service(client) { "password" to password, "name" to name, ) - val apiHeaders = mutableMapOf( + val apiHeaders = mutableMapOf<String, String>( "content-type" to "application/json", ) val converter: (Any) -> io.appwrite.models.User<T> = { @@ -148,7 +148,7 @@ class Account(client: Client) : Service(client) { "email" to email, "password" to password, ) - val apiHeaders = mutableMapOf( + val apiHeaders = mutableMapOf<String, String>( "content-type" to "application/json", ) val converter: (Any) -> io.appwrite.models.User<T> = { @@ -184,7 +184,7 @@ class Account(client: Client) : Service(client) { ) /** - * List Identities + * List identities * * Get the list of identities for the currently logged in user. * @@ -201,7 +201,7 @@ class Account(client: Client) : Service(client) { val apiParams = mutableMapOf<String, Any?>( "queries" to queries, ) - val apiHeaders = mutableMapOf( + val apiHeaders = mutableMapOf<String, String>( "content-type" to "application/json", ) val converter: (Any) -> io.appwrite.models.IdentityList = { @@ -234,7 +234,7 @@ class Account(client: Client) : Service(client) { val apiParams = mutableMapOf<String, Any?>( ) - val apiHeaders = mutableMapOf( + val apiHeaders = mutableMapOf<String, String>( "content-type" to "application/json", ) return client.call( @@ -260,7 +260,7 @@ class Account(client: Client) : Service(client) { val apiParams = mutableMapOf<String, Any?>( ) - val apiHeaders = mutableMapOf( + val apiHeaders = mutableMapOf<String, String>( "content-type" to "application/json", ) val converter: (Any) -> io.appwrite.models.Jwt = { @@ -294,7 +294,7 @@ class Account(client: Client) : Service(client) { val apiParams = mutableMapOf<String, Any?>( "queries" to queries, ) - val apiHeaders = mutableMapOf( + val apiHeaders = mutableMapOf<String, String>( "content-type" to "application/json", ) val converter: (Any) -> io.appwrite.models.LogList = { @@ -328,7 +328,7 @@ class Account(client: Client) : Service(client) { val apiParams = mutableMapOf<String, Any?>( "mfa" to mfa, ) - val apiHeaders = mutableMapOf( + val apiHeaders = mutableMapOf<String, String>( "content-type" to "application/json", ) val converter: (Any) -> io.appwrite.models.User<T> = { @@ -361,7 +361,7 @@ class Account(client: Client) : Service(client) { ) /** - * Create Authenticator + * Create authenticator * * Add an authenticator app to be used as an MFA factor. Verify the authenticator using the [verify authenticator](/docs/references/cloud/client-web/account#updateMfaAuthenticator) method. * @@ -377,7 +377,7 @@ class Account(client: Client) : Service(client) { val apiParams = mutableMapOf<String, Any?>( ) - val apiHeaders = mutableMapOf( + val apiHeaders = mutableMapOf<String, String>( "content-type" to "application/json", ) val converter: (Any) -> io.appwrite.models.MfaType = { @@ -394,7 +394,7 @@ class Account(client: Client) : Service(client) { } /** - * Verify Authenticator + * Verify authenticator * * Verify an authenticator app after adding it using the [add authenticator](/docs/references/cloud/client-web/account#createMfaAuthenticator) method. * @@ -414,7 +414,7 @@ class Account(client: Client) : Service(client) { val apiParams = mutableMapOf<String, Any?>( "otp" to otp, ) - val apiHeaders = mutableMapOf( + val apiHeaders = mutableMapOf<String, String>( "content-type" to "application/json", ) val converter: (Any) -> io.appwrite.models.User<T> = { @@ -431,7 +431,7 @@ class Account(client: Client) : Service(client) { } /** - * Verify Authenticator + * Verify authenticator * * Verify an authenticator app after adding it using the [add authenticator](/docs/references/cloud/client-web/account#createMfaAuthenticator) method. * @@ -450,7 +450,7 @@ class Account(client: Client) : Service(client) { ) /** - * Delete Authenticator + * Delete authenticator * * Delete an authenticator for a user by ID. * @@ -466,7 +466,7 @@ class Account(client: Client) : Service(client) { val apiParams = mutableMapOf<String, Any?>( ) - val apiHeaders = mutableMapOf( + val apiHeaders = mutableMapOf<String, String>( "content-type" to "application/json", ) return client.call( @@ -479,7 +479,7 @@ class Account(client: Client) : Service(client) { } /** - * Create MFA Challenge + * Create MFA challenge * * Begin the process of MFA verification after sign-in. Finish the flow with [updateMfaChallenge](/docs/references/cloud/client-web/account#updateMfaChallenge) method. * @@ -495,7 +495,7 @@ class Account(client: Client) : Service(client) { val apiParams = mutableMapOf<String, Any?>( "factor" to factor, ) - val apiHeaders = mutableMapOf( + val apiHeaders = mutableMapOf<String, String>( "content-type" to "application/json", ) val converter: (Any) -> io.appwrite.models.MfaChallenge = { @@ -512,7 +512,7 @@ class Account(client: Client) : Service(client) { } /** - * Create MFA Challenge (confirmation) + * Create MFA challenge (confirmation) * * Complete the MFA challenge by providing the one-time password. Finish the process of MFA verification by providing the one-time password. To begin the flow, use [createMfaChallenge](/docs/references/cloud/client-web/account#createMfaChallenge) method. * @@ -531,7 +531,7 @@ class Account(client: Client) : Service(client) { "challengeId" to challengeId, "otp" to otp, ) - val apiHeaders = mutableMapOf( + val apiHeaders = mutableMapOf<String, String>( "content-type" to "application/json", ) return client.call( @@ -544,7 +544,7 @@ class Account(client: Client) : Service(client) { } /** - * List Factors + * List factors * * List the factors available on the account to be used as a MFA challange. * @@ -557,7 +557,7 @@ class Account(client: Client) : Service(client) { val apiParams = mutableMapOf<String, Any?>( ) - val apiHeaders = mutableMapOf( + val apiHeaders = mutableMapOf<String, String>( "content-type" to "application/json", ) val converter: (Any) -> io.appwrite.models.MfaFactors = { @@ -574,7 +574,7 @@ class Account(client: Client) : Service(client) { } /** - * Get MFA Recovery Codes + * Get MFA recovery codes * * Get recovery codes that can be used as backup for MFA flow. Before getting codes, they must be generated using [createMfaRecoveryCodes](/docs/references/cloud/client-web/account#createMfaRecoveryCodes) method. An OTP challenge is required to read recovery codes. * @@ -587,7 +587,7 @@ class Account(client: Client) : Service(client) { val apiParams = mutableMapOf<String, Any?>( ) - val apiHeaders = mutableMapOf( + val apiHeaders = mutableMapOf<String, String>( "content-type" to "application/json", ) val converter: (Any) -> io.appwrite.models.MfaRecoveryCodes = { @@ -604,7 +604,7 @@ class Account(client: Client) : Service(client) { } /** - * Create MFA Recovery Codes + * Create MFA recovery codes * * Generate recovery codes as backup for MFA flow. It's recommended to generate and show then immediately after user successfully adds their authehticator. Recovery codes can be used as a MFA verification type in [createMfaChallenge](/docs/references/cloud/client-web/account#createMfaChallenge) method. * @@ -617,7 +617,7 @@ class Account(client: Client) : Service(client) { val apiParams = mutableMapOf<String, Any?>( ) - val apiHeaders = mutableMapOf( + val apiHeaders = mutableMapOf<String, String>( "content-type" to "application/json", ) val converter: (Any) -> io.appwrite.models.MfaRecoveryCodes = { @@ -634,7 +634,7 @@ class Account(client: Client) : Service(client) { } /** - * Regenerate MFA Recovery Codes + * Regenerate MFA recovery codes * * Regenerate recovery codes that can be used as backup for MFA flow. Before regenerating codes, they must be first generated using [createMfaRecoveryCodes](/docs/references/cloud/client-web/account#createMfaRecoveryCodes) method. An OTP challenge is required to regenreate recovery codes. * @@ -647,7 +647,7 @@ class Account(client: Client) : Service(client) { val apiParams = mutableMapOf<String, Any?>( ) - val apiHeaders = mutableMapOf( + val apiHeaders = mutableMapOf<String, String>( "content-type" to "application/json", ) val converter: (Any) -> io.appwrite.models.MfaRecoveryCodes = { @@ -681,7 +681,7 @@ class Account(client: Client) : Service(client) { val apiParams = mutableMapOf<String, Any?>( "name" to name, ) - val apiHeaders = mutableMapOf( + val apiHeaders = mutableMapOf<String, String>( "content-type" to "application/json", ) val converter: (Any) -> io.appwrite.models.User<T> = { @@ -735,7 +735,7 @@ class Account(client: Client) : Service(client) { "password" to password, "oldPassword" to oldPassword, ) - val apiHeaders = mutableMapOf( + val apiHeaders = mutableMapOf<String, String>( "content-type" to "application/json", ) val converter: (Any) -> io.appwrite.models.User<T> = { @@ -792,7 +792,7 @@ class Account(client: Client) : Service(client) { "phone" to phone, "password" to password, ) - val apiHeaders = mutableMapOf( + val apiHeaders = mutableMapOf<String, String>( "content-type" to "application/json", ) val converter: (Any) -> io.appwrite.models.User<T> = { @@ -842,7 +842,7 @@ class Account(client: Client) : Service(client) { val apiParams = mutableMapOf<String, Any?>( ) - val apiHeaders = mutableMapOf( + val apiHeaders = mutableMapOf<String, String>( "content-type" to "application/json", ) val converter: (Any) -> io.appwrite.models.Preferences<T> = { @@ -889,7 +889,7 @@ class Account(client: Client) : Service(client) { val apiParams = mutableMapOf<String, Any?>( "prefs" to prefs, ) - val apiHeaders = mutableMapOf( + val apiHeaders = mutableMapOf<String, String>( "content-type" to "application/json", ) val converter: (Any) -> io.appwrite.models.User<T> = { @@ -941,7 +941,7 @@ class Account(client: Client) : Service(client) { "email" to email, "url" to url, ) - val apiHeaders = mutableMapOf( + val apiHeaders = mutableMapOf<String, String>( "content-type" to "application/json", ) val converter: (Any) -> io.appwrite.models.Token = { @@ -980,7 +980,7 @@ class Account(client: Client) : Service(client) { "secret" to secret, "password" to password, ) - val apiHeaders = mutableMapOf( + val apiHeaders = mutableMapOf<String, String>( "content-type" to "application/json", ) val converter: (Any) -> io.appwrite.models.Token = { @@ -1010,7 +1010,7 @@ class Account(client: Client) : Service(client) { val apiParams = mutableMapOf<String, Any?>( ) - val apiHeaders = mutableMapOf( + val apiHeaders = mutableMapOf<String, String>( "content-type" to "application/json", ) val converter: (Any) -> io.appwrite.models.SessionList = { @@ -1040,7 +1040,7 @@ class Account(client: Client) : Service(client) { val apiParams = mutableMapOf<String, Any?>( ) - val apiHeaders = mutableMapOf( + val apiHeaders = mutableMapOf<String, String>( "content-type" to "application/json", ) return client.call( @@ -1066,7 +1066,7 @@ class Account(client: Client) : Service(client) { val apiParams = mutableMapOf<String, Any?>( ) - val apiHeaders = mutableMapOf( + val apiHeaders = mutableMapOf<String, String>( "content-type" to "application/json", ) val converter: (Any) -> io.appwrite.models.Session = { @@ -1102,7 +1102,7 @@ class Account(client: Client) : Service(client) { "email" to email, "password" to password, ) - val apiHeaders = mutableMapOf( + val apiHeaders = mutableMapOf<String, String>( "content-type" to "application/json", ) val converter: (Any) -> io.appwrite.models.Session = { @@ -1138,7 +1138,7 @@ class Account(client: Client) : Service(client) { "userId" to userId, "secret" to secret, ) - val apiHeaders = mutableMapOf( + val apiHeaders = mutableMapOf<String, String>( "content-type" to "application/json", ) val converter: (Any) -> io.appwrite.models.Session = { @@ -1174,7 +1174,7 @@ class Account(client: Client) : Service(client) { "userId" to userId, "secret" to secret, ) - val apiHeaders = mutableMapOf( + val apiHeaders = mutableMapOf<String, String>( "content-type" to "application/json", ) val converter: (Any) -> io.appwrite.models.Session = { @@ -1210,7 +1210,7 @@ class Account(client: Client) : Service(client) { "userId" to userId, "secret" to secret, ) - val apiHeaders = mutableMapOf( + val apiHeaders = mutableMapOf<String, String>( "content-type" to "application/json", ) val converter: (Any) -> io.appwrite.models.Session = { @@ -1243,7 +1243,7 @@ class Account(client: Client) : Service(client) { val apiParams = mutableMapOf<String, Any?>( ) - val apiHeaders = mutableMapOf( + val apiHeaders = mutableMapOf<String, String>( "content-type" to "application/json", ) val converter: (Any) -> io.appwrite.models.Session = { @@ -1276,7 +1276,7 @@ class Account(client: Client) : Service(client) { val apiParams = mutableMapOf<String, Any?>( ) - val apiHeaders = mutableMapOf( + val apiHeaders = mutableMapOf<String, String>( "content-type" to "application/json", ) val converter: (Any) -> io.appwrite.models.Session = { @@ -1309,7 +1309,7 @@ class Account(client: Client) : Service(client) { val apiParams = mutableMapOf<String, Any?>( ) - val apiHeaders = mutableMapOf( + val apiHeaders = mutableMapOf<String, String>( "content-type" to "application/json", ) return client.call( @@ -1336,7 +1336,7 @@ class Account(client: Client) : Service(client) { val apiParams = mutableMapOf<String, Any?>( ) - val apiHeaders = mutableMapOf( + val apiHeaders = mutableMapOf<String, String>( "content-type" to "application/json", ) val converter: (Any) -> io.appwrite.models.User<T> = { @@ -1389,7 +1389,7 @@ class Account(client: Client) : Service(client) { "email" to email, "phrase" to phrase, ) - val apiHeaders = mutableMapOf( + val apiHeaders = mutableMapOf<String, String>( "content-type" to "application/json", ) val converter: (Any) -> io.appwrite.models.Token = { @@ -1432,7 +1432,7 @@ class Account(client: Client) : Service(client) { "url" to url, "phrase" to phrase, ) - val apiHeaders = mutableMapOf( + val apiHeaders = mutableMapOf<String, String>( "content-type" to "application/json", ) val converter: (Any) -> io.appwrite.models.Token = { @@ -1475,7 +1475,7 @@ class Account(client: Client) : Service(client) { "failure" to failure, "scopes" to scopes, ) - val apiHeaders = mutableMapOf( + val apiHeaders = mutableMapOf<String, String>( "content-type" to "application/json", ) return client.redirect( @@ -1506,7 +1506,7 @@ class Account(client: Client) : Service(client) { "userId" to userId, "phone" to phone, ) - val apiHeaders = mutableMapOf( + val apiHeaders = mutableMapOf<String, String>( "content-type" to "application/json", ) val converter: (Any) -> io.appwrite.models.Token = { @@ -1539,7 +1539,7 @@ class Account(client: Client) : Service(client) { val apiParams = mutableMapOf<String, Any?>( "url" to url, ) - val apiHeaders = mutableMapOf( + val apiHeaders = mutableMapOf<String, String>( "content-type" to "application/json", ) val converter: (Any) -> io.appwrite.models.Token = { @@ -1575,7 +1575,7 @@ class Account(client: Client) : Service(client) { "userId" to userId, "secret" to secret, ) - val apiHeaders = mutableMapOf( + val apiHeaders = mutableMapOf<String, String>( "content-type" to "application/json", ) val converter: (Any) -> io.appwrite.models.Token = { @@ -1605,7 +1605,7 @@ class Account(client: Client) : Service(client) { val apiParams = mutableMapOf<String, Any?>( ) - val apiHeaders = mutableMapOf( + val apiHeaders = mutableMapOf<String, String>( "content-type" to "application/json", ) val converter: (Any) -> io.appwrite.models.Token = { @@ -1641,7 +1641,7 @@ class Account(client: Client) : Service(client) { "userId" to userId, "secret" to secret, ) - val apiHeaders = mutableMapOf( + val apiHeaders = mutableMapOf<String, String>( "content-type" to "application/json", ) val converter: (Any) -> io.appwrite.models.Token = { @@ -1657,4 +1657,4 @@ class Account(client: Client) : Service(client) { ) } -} \ No newline at end of file +} diff --git a/src/main/kotlin/io/appwrite/services/Avatars.kt b/src/main/kotlin/io/appwrite/services/Avatars.kt index 46c9d8e..3dcfa74 100644 --- a/src/main/kotlin/io/appwrite/services/Avatars.kt +++ b/src/main/kotlin/io/appwrite/services/Avatars.kt @@ -42,7 +42,7 @@ class Avatars(client: Client) : Service(client) { "height" to height, "quality" to quality, ) - val apiHeaders = mutableMapOf( + val apiHeaders = mutableMapOf<String, String>( "content-type" to "application/json", ) return client.call( @@ -80,7 +80,7 @@ class Avatars(client: Client) : Service(client) { "height" to height, "quality" to quality, ) - val apiHeaders = mutableMapOf( + val apiHeaders = mutableMapOf<String, String>( "content-type" to "application/json", ) return client.call( @@ -108,7 +108,7 @@ class Avatars(client: Client) : Service(client) { val apiParams = mutableMapOf<String, Any?>( "url" to url, ) - val apiHeaders = mutableMapOf( + val apiHeaders = mutableMapOf<String, String>( "content-type" to "application/json", ) return client.call( @@ -146,7 +146,7 @@ class Avatars(client: Client) : Service(client) { "height" to height, "quality" to quality, ) - val apiHeaders = mutableMapOf( + val apiHeaders = mutableMapOf<String, String>( "content-type" to "application/json", ) return client.call( @@ -181,7 +181,7 @@ class Avatars(client: Client) : Service(client) { "width" to width, "height" to height, ) - val apiHeaders = mutableMapOf( + val apiHeaders = mutableMapOf<String, String>( "content-type" to "application/json", ) return client.call( @@ -219,7 +219,7 @@ class Avatars(client: Client) : Service(client) { "height" to height, "background" to background, ) - val apiHeaders = mutableMapOf( + val apiHeaders = mutableMapOf<String, String>( "content-type" to "application/json", ) return client.call( @@ -257,7 +257,7 @@ class Avatars(client: Client) : Service(client) { "margin" to margin, "download" to download, ) - val apiHeaders = mutableMapOf( + val apiHeaders = mutableMapOf<String, String>( "content-type" to "application/json", ) return client.call( @@ -268,4 +268,4 @@ class Avatars(client: Client) : Service(client) { ) } -} \ No newline at end of file +} diff --git a/src/main/kotlin/io/appwrite/services/Databases.kt b/src/main/kotlin/io/appwrite/services/Databases.kt index 770412a..f150397 100644 --- a/src/main/kotlin/io/appwrite/services/Databases.kt +++ b/src/main/kotlin/io/appwrite/services/Databases.kt @@ -34,7 +34,7 @@ class Databases(client: Client) : Service(client) { "queries" to queries, "search" to search, ) - val apiHeaders = mutableMapOf( + val apiHeaders = mutableMapOf<String, String>( "content-type" to "application/json", ) val converter: (Any) -> io.appwrite.models.DatabaseList = { @@ -74,7 +74,7 @@ class Databases(client: Client) : Service(client) { "name" to name, "enabled" to enabled, ) - val apiHeaders = mutableMapOf( + val apiHeaders = mutableMapOf<String, String>( "content-type" to "application/json", ) val converter: (Any) -> io.appwrite.models.Database = { @@ -107,7 +107,7 @@ class Databases(client: Client) : Service(client) { val apiParams = mutableMapOf<String, Any?>( ) - val apiHeaders = mutableMapOf( + val apiHeaders = mutableMapOf<String, String>( "content-type" to "application/json", ) val converter: (Any) -> io.appwrite.models.Database = { @@ -147,7 +147,7 @@ class Databases(client: Client) : Service(client) { "name" to name, "enabled" to enabled, ) - val apiHeaders = mutableMapOf( + val apiHeaders = mutableMapOf<String, String>( "content-type" to "application/json", ) val converter: (Any) -> io.appwrite.models.Database = { @@ -180,7 +180,7 @@ class Databases(client: Client) : Service(client) { val apiParams = mutableMapOf<String, Any?>( ) - val apiHeaders = mutableMapOf( + val apiHeaders = mutableMapOf<String, String>( "content-type" to "application/json", ) return client.call( @@ -216,7 +216,7 @@ class Databases(client: Client) : Service(client) { "queries" to queries, "search" to search, ) - val apiHeaders = mutableMapOf( + val apiHeaders = mutableMapOf<String, String>( "content-type" to "application/json", ) val converter: (Any) -> io.appwrite.models.CollectionList = { @@ -265,7 +265,7 @@ class Databases(client: Client) : Service(client) { "documentSecurity" to documentSecurity, "enabled" to enabled, ) - val apiHeaders = mutableMapOf( + val apiHeaders = mutableMapOf<String, String>( "content-type" to "application/json", ) val converter: (Any) -> io.appwrite.models.Collection = { @@ -301,7 +301,7 @@ class Databases(client: Client) : Service(client) { val apiParams = mutableMapOf<String, Any?>( ) - val apiHeaders = mutableMapOf( + val apiHeaders = mutableMapOf<String, String>( "content-type" to "application/json", ) val converter: (Any) -> io.appwrite.models.Collection = { @@ -350,7 +350,7 @@ class Databases(client: Client) : Service(client) { "documentSecurity" to documentSecurity, "enabled" to enabled, ) - val apiHeaders = mutableMapOf( + val apiHeaders = mutableMapOf<String, String>( "content-type" to "application/json", ) val converter: (Any) -> io.appwrite.models.Collection = { @@ -386,7 +386,7 @@ class Databases(client: Client) : Service(client) { val apiParams = mutableMapOf<String, Any?>( ) - val apiHeaders = mutableMapOf( + val apiHeaders = mutableMapOf<String, String>( "content-type" to "application/json", ) return client.call( @@ -422,7 +422,7 @@ class Databases(client: Client) : Service(client) { val apiParams = mutableMapOf<String, Any?>( "queries" to queries, ) - val apiHeaders = mutableMapOf( + val apiHeaders = mutableMapOf<String, String>( "content-type" to "application/json", ) val converter: (Any) -> io.appwrite.models.AttributeList = { @@ -471,7 +471,7 @@ class Databases(client: Client) : Service(client) { "default" to default, "array" to array, ) - val apiHeaders = mutableMapOf( + val apiHeaders = mutableMapOf<String, String>( "content-type" to "application/json", ) val converter: (Any) -> io.appwrite.models.AttributeBoolean = { @@ -520,7 +520,7 @@ class Databases(client: Client) : Service(client) { "default" to default, "newKey" to newKey, ) - val apiHeaders = mutableMapOf( + val apiHeaders = mutableMapOf<String, String>( "content-type" to "application/json", ) val converter: (Any) -> io.appwrite.models.AttributeBoolean = { @@ -569,7 +569,7 @@ class Databases(client: Client) : Service(client) { "default" to default, "array" to array, ) - val apiHeaders = mutableMapOf( + val apiHeaders = mutableMapOf<String, String>( "content-type" to "application/json", ) val converter: (Any) -> io.appwrite.models.AttributeDatetime = { @@ -618,7 +618,7 @@ class Databases(client: Client) : Service(client) { "default" to default, "newKey" to newKey, ) - val apiHeaders = mutableMapOf( + val apiHeaders = mutableMapOf<String, String>( "content-type" to "application/json", ) val converter: (Any) -> io.appwrite.models.AttributeDatetime = { @@ -667,7 +667,7 @@ class Databases(client: Client) : Service(client) { "default" to default, "array" to array, ) - val apiHeaders = mutableMapOf( + val apiHeaders = mutableMapOf<String, String>( "content-type" to "application/json", ) val converter: (Any) -> io.appwrite.models.AttributeEmail = { @@ -716,7 +716,7 @@ class Databases(client: Client) : Service(client) { "default" to default, "newKey" to newKey, ) - val apiHeaders = mutableMapOf( + val apiHeaders = mutableMapOf<String, String>( "content-type" to "application/json", ) val converter: (Any) -> io.appwrite.models.AttributeEmail = { @@ -768,7 +768,7 @@ class Databases(client: Client) : Service(client) { "default" to default, "array" to array, ) - val apiHeaders = mutableMapOf( + val apiHeaders = mutableMapOf<String, String>( "content-type" to "application/json", ) val converter: (Any) -> io.appwrite.models.AttributeEnum = { @@ -820,7 +820,7 @@ class Databases(client: Client) : Service(client) { "default" to default, "newKey" to newKey, ) - val apiHeaders = mutableMapOf( + val apiHeaders = mutableMapOf<String, String>( "content-type" to "application/json", ) val converter: (Any) -> io.appwrite.models.AttributeEnum = { @@ -875,7 +875,7 @@ class Databases(client: Client) : Service(client) { "default" to default, "array" to array, ) - val apiHeaders = mutableMapOf( + val apiHeaders = mutableMapOf<String, String>( "content-type" to "application/json", ) val converter: (Any) -> io.appwrite.models.AttributeFloat = { @@ -930,7 +930,7 @@ class Databases(client: Client) : Service(client) { "default" to default, "newKey" to newKey, ) - val apiHeaders = mutableMapOf( + val apiHeaders = mutableMapOf<String, String>( "content-type" to "application/json", ) val converter: (Any) -> io.appwrite.models.AttributeFloat = { @@ -985,7 +985,7 @@ class Databases(client: Client) : Service(client) { "default" to default, "array" to array, ) - val apiHeaders = mutableMapOf( + val apiHeaders = mutableMapOf<String, String>( "content-type" to "application/json", ) val converter: (Any) -> io.appwrite.models.AttributeInteger = { @@ -1040,7 +1040,7 @@ class Databases(client: Client) : Service(client) { "default" to default, "newKey" to newKey, ) - val apiHeaders = mutableMapOf( + val apiHeaders = mutableMapOf<String, String>( "content-type" to "application/json", ) val converter: (Any) -> io.appwrite.models.AttributeInteger = { @@ -1089,7 +1089,7 @@ class Databases(client: Client) : Service(client) { "default" to default, "array" to array, ) - val apiHeaders = mutableMapOf( + val apiHeaders = mutableMapOf<String, String>( "content-type" to "application/json", ) val converter: (Any) -> io.appwrite.models.AttributeIp = { @@ -1138,7 +1138,7 @@ class Databases(client: Client) : Service(client) { "default" to default, "newKey" to newKey, ) - val apiHeaders = mutableMapOf( + val apiHeaders = mutableMapOf<String, String>( "content-type" to "application/json", ) val converter: (Any) -> io.appwrite.models.AttributeIp = { @@ -1193,7 +1193,7 @@ class Databases(client: Client) : Service(client) { "twoWayKey" to twoWayKey, "onDelete" to onDelete, ) - val apiHeaders = mutableMapOf( + val apiHeaders = mutableMapOf<String, String>( "content-type" to "application/json", ) val converter: (Any) -> io.appwrite.models.AttributeRelationship = { @@ -1248,7 +1248,7 @@ class Databases(client: Client) : Service(client) { "array" to array, "encrypt" to encrypt, ) - val apiHeaders = mutableMapOf( + val apiHeaders = mutableMapOf<String, String>( "content-type" to "application/json", ) val converter: (Any) -> io.appwrite.models.AttributeString = { @@ -1300,7 +1300,7 @@ class Databases(client: Client) : Service(client) { "size" to size, "newKey" to newKey, ) - val apiHeaders = mutableMapOf( + val apiHeaders = mutableMapOf<String, String>( "content-type" to "application/json", ) val converter: (Any) -> io.appwrite.models.AttributeString = { @@ -1349,7 +1349,7 @@ class Databases(client: Client) : Service(client) { "default" to default, "array" to array, ) - val apiHeaders = mutableMapOf( + val apiHeaders = mutableMapOf<String, String>( "content-type" to "application/json", ) val converter: (Any) -> io.appwrite.models.AttributeUrl = { @@ -1398,7 +1398,7 @@ class Databases(client: Client) : Service(client) { "default" to default, "newKey" to newKey, ) - val apiHeaders = mutableMapOf( + val apiHeaders = mutableMapOf<String, String>( "content-type" to "application/json", ) val converter: (Any) -> io.appwrite.models.AttributeUrl = { @@ -1437,7 +1437,7 @@ class Databases(client: Client) : Service(client) { val apiParams = mutableMapOf<String, Any?>( ) - val apiHeaders = mutableMapOf( + val apiHeaders = mutableMapOf<String, String>( "content-type" to "application/json", ) return client.call( @@ -1472,7 +1472,7 @@ class Databases(client: Client) : Service(client) { val apiParams = mutableMapOf<String, Any?>( ) - val apiHeaders = mutableMapOf( + val apiHeaders = mutableMapOf<String, String>( "content-type" to "application/json", ) return client.call( @@ -1514,7 +1514,7 @@ class Databases(client: Client) : Service(client) { "onDelete" to onDelete, "newKey" to newKey, ) - val apiHeaders = mutableMapOf( + val apiHeaders = mutableMapOf<String, String>( "content-type" to "application/json", ) val converter: (Any) -> io.appwrite.models.AttributeRelationship = { @@ -1555,7 +1555,7 @@ class Databases(client: Client) : Service(client) { val apiParams = mutableMapOf<String, Any?>( "queries" to queries, ) - val apiHeaders = mutableMapOf( + val apiHeaders = mutableMapOf<String, String>( "content-type" to "application/json", ) val converter: (Any) -> io.appwrite.models.DocumentList<T> = { @@ -1625,7 +1625,7 @@ class Databases(client: Client) : Service(client) { "data" to data, "permissions" to permissions, ) - val apiHeaders = mutableMapOf( + val apiHeaders = mutableMapOf<String, String>( "content-type" to "application/json", ) val converter: (Any) -> io.appwrite.models.Document<T> = { @@ -1698,7 +1698,7 @@ class Databases(client: Client) : Service(client) { val apiParams = mutableMapOf<String, Any?>( "queries" to queries, ) - val apiHeaders = mutableMapOf( + val apiHeaders = mutableMapOf<String, String>( "content-type" to "application/json", ) val converter: (Any) -> io.appwrite.models.Document<T> = { @@ -1771,7 +1771,7 @@ class Databases(client: Client) : Service(client) { "data" to data, "permissions" to permissions, ) - val apiHeaders = mutableMapOf( + val apiHeaders = mutableMapOf<String, String>( "content-type" to "application/json", ) val converter: (Any) -> io.appwrite.models.Document<T> = { @@ -1839,7 +1839,7 @@ class Databases(client: Client) : Service(client) { val apiParams = mutableMapOf<String, Any?>( ) - val apiHeaders = mutableMapOf( + val apiHeaders = mutableMapOf<String, String>( "content-type" to "application/json", ) return client.call( @@ -1875,7 +1875,7 @@ class Databases(client: Client) : Service(client) { val apiParams = mutableMapOf<String, Any?>( "queries" to queries, ) - val apiHeaders = mutableMapOf( + val apiHeaders = mutableMapOf<String, String>( "content-type" to "application/json", ) val converter: (Any) -> io.appwrite.models.IndexList = { @@ -1924,7 +1924,7 @@ class Databases(client: Client) : Service(client) { "attributes" to attributes, "orders" to orders, ) - val apiHeaders = mutableMapOf( + val apiHeaders = mutableMapOf<String, String>( "content-type" to "application/json", ) val converter: (Any) -> io.appwrite.models.Index = { @@ -1963,7 +1963,7 @@ class Databases(client: Client) : Service(client) { val apiParams = mutableMapOf<String, Any?>( ) - val apiHeaders = mutableMapOf( + val apiHeaders = mutableMapOf<String, String>( "content-type" to "application/json", ) val converter: (Any) -> io.appwrite.models.Index = { @@ -2002,7 +2002,7 @@ class Databases(client: Client) : Service(client) { val apiParams = mutableMapOf<String, Any?>( ) - val apiHeaders = mutableMapOf( + val apiHeaders = mutableMapOf<String, String>( "content-type" to "application/json", ) return client.call( @@ -2014,4 +2014,4 @@ class Databases(client: Client) : Service(client) { ) } -} \ No newline at end of file +} diff --git a/src/main/kotlin/io/appwrite/services/Functions.kt b/src/main/kotlin/io/appwrite/services/Functions.kt index d0a98f5..b13b4c7 100644 --- a/src/main/kotlin/io/appwrite/services/Functions.kt +++ b/src/main/kotlin/io/appwrite/services/Functions.kt @@ -36,7 +36,7 @@ class Functions(client: Client) : Service(client) { "queries" to queries, "search" to search, ) - val apiHeaders = mutableMapOf( + val apiHeaders = mutableMapOf<String, String>( "content-type" to "application/json", ) val converter: (Any) -> io.appwrite.models.FunctionList = { @@ -133,7 +133,7 @@ class Functions(client: Client) : Service(client) { "templateVersion" to templateVersion, "specification" to specification, ) - val apiHeaders = mutableMapOf( + val apiHeaders = mutableMapOf<String, String>( "content-type" to "application/json", ) val converter: (Any) -> io.appwrite.models.Function = { @@ -163,7 +163,7 @@ class Functions(client: Client) : Service(client) { val apiParams = mutableMapOf<String, Any?>( ) - val apiHeaders = mutableMapOf( + val apiHeaders = mutableMapOf<String, String>( "content-type" to "application/json", ) val converter: (Any) -> io.appwrite.models.RuntimeList = { @@ -193,7 +193,7 @@ class Functions(client: Client) : Service(client) { val apiParams = mutableMapOf<String, Any?>( ) - val apiHeaders = mutableMapOf( + val apiHeaders = mutableMapOf<String, String>( "content-type" to "application/json", ) val converter: (Any) -> io.appwrite.models.SpecificationList = { @@ -226,7 +226,7 @@ class Functions(client: Client) : Service(client) { val apiParams = mutableMapOf<String, Any?>( ) - val apiHeaders = mutableMapOf( + val apiHeaders = mutableMapOf<String, String>( "content-type" to "application/json", ) val converter: (Any) -> io.appwrite.models.Function = { @@ -311,7 +311,7 @@ class Functions(client: Client) : Service(client) { "providerRootDirectory" to providerRootDirectory, "specification" to specification, ) - val apiHeaders = mutableMapOf( + val apiHeaders = mutableMapOf<String, String>( "content-type" to "application/json", ) val converter: (Any) -> io.appwrite.models.Function = { @@ -344,7 +344,7 @@ class Functions(client: Client) : Service(client) { val apiParams = mutableMapOf<String, Any?>( ) - val apiHeaders = mutableMapOf( + val apiHeaders = mutableMapOf<String, String>( "content-type" to "application/json", ) return client.call( @@ -380,7 +380,7 @@ class Functions(client: Client) : Service(client) { "queries" to queries, "search" to search, ) - val apiHeaders = mutableMapOf( + val apiHeaders = mutableMapOf<String, String>( "content-type" to "application/json", ) val converter: (Any) -> io.appwrite.models.DeploymentList = { @@ -412,7 +412,7 @@ class Functions(client: Client) : Service(client) { @Throws(AppwriteException::class) suspend fun createDeployment( functionId: String, - code: InputFile, + code: Payload, activate: Boolean, entrypoint: String? = null, commands: String? = null, @@ -427,7 +427,7 @@ class Functions(client: Client) : Service(client) { "code" to code, "activate" to activate, ) - val apiHeaders = mutableMapOf( + val apiHeaders = mutableMapOf<String, String>( "content-type" to "multipart/form-data", ) val converter: (Any) -> io.appwrite.models.Deployment = { @@ -467,7 +467,7 @@ class Functions(client: Client) : Service(client) { val apiParams = mutableMapOf<String, Any?>( ) - val apiHeaders = mutableMapOf( + val apiHeaders = mutableMapOf<String, String>( "content-type" to "application/json", ) val converter: (Any) -> io.appwrite.models.Deployment = { @@ -503,7 +503,7 @@ class Functions(client: Client) : Service(client) { val apiParams = mutableMapOf<String, Any?>( ) - val apiHeaders = mutableMapOf( + val apiHeaders = mutableMapOf<String, String>( "content-type" to "application/json", ) val converter: (Any) -> io.appwrite.models.Function = { @@ -539,7 +539,7 @@ class Functions(client: Client) : Service(client) { val apiParams = mutableMapOf<String, Any?>( ) - val apiHeaders = mutableMapOf( + val apiHeaders = mutableMapOf<String, String>( "content-type" to "application/json", ) return client.call( @@ -575,7 +575,7 @@ class Functions(client: Client) : Service(client) { val apiParams = mutableMapOf<String, Any?>( "buildId" to buildId, ) - val apiHeaders = mutableMapOf( + val apiHeaders = mutableMapOf<String, String>( "content-type" to "application/json", ) return client.call( @@ -607,7 +607,7 @@ class Functions(client: Client) : Service(client) { val apiParams = mutableMapOf<String, Any?>( ) - val apiHeaders = mutableMapOf( + val apiHeaders = mutableMapOf<String, String>( "content-type" to "application/json", ) val converter: (Any) -> io.appwrite.models.Build = { @@ -643,7 +643,7 @@ class Functions(client: Client) : Service(client) { val apiParams = mutableMapOf<String, Any?>( ) - val apiHeaders = mutableMapOf( + val apiHeaders = mutableMapOf<String, String>( "content-type" to "application/json", ) return client.call( @@ -678,7 +678,7 @@ class Functions(client: Client) : Service(client) { "queries" to queries, "search" to search, ) - val apiHeaders = mutableMapOf( + val apiHeaders = mutableMapOf<String, String>( "content-type" to "application/json", ) val converter: (Any) -> io.appwrite.models.ExecutionList = { @@ -712,12 +712,13 @@ class Functions(client: Client) : Service(client) { @Throws(AppwriteException::class) suspend fun createExecution( functionId: String, - body: String? = null, + body: Payload? = null, async: Boolean? = null, path: String? = null, method: io.appwrite.enums.ExecutionMethod? = null, headers: Any? = null, scheduledAt: String? = null, + onProgress: ((UploadProgress) -> Unit)? = null ): io.appwrite.models.Execution { val apiPath = "/functions/{functionId}/executions" .replace("{functionId}", functionId) @@ -730,8 +731,9 @@ class Functions(client: Client) : Service(client) { "headers" to headers, "scheduledAt" to scheduledAt, ) - val apiHeaders = mutableMapOf( - "content-type" to "application/json", + val apiHeaders = mutableMapOf<String, String>( + "content-type" to "multipart/form-data", + "accept" to "multipart/form-data", ) val converter: (Any) -> io.appwrite.models.Execution = { io.appwrite.models.Execution.from(map = it as Map<String, Any>) @@ -766,7 +768,7 @@ class Functions(client: Client) : Service(client) { val apiParams = mutableMapOf<String, Any?>( ) - val apiHeaders = mutableMapOf( + val apiHeaders = mutableMapOf<String, String>( "content-type" to "application/json", ) val converter: (Any) -> io.appwrite.models.Execution = { @@ -802,7 +804,7 @@ class Functions(client: Client) : Service(client) { val apiParams = mutableMapOf<String, Any?>( ) - val apiHeaders = mutableMapOf( + val apiHeaders = mutableMapOf<String, String>( "content-type" to "application/json", ) return client.call( @@ -831,7 +833,7 @@ class Functions(client: Client) : Service(client) { val apiParams = mutableMapOf<String, Any?>( ) - val apiHeaders = mutableMapOf( + val apiHeaders = mutableMapOf<String, String>( "content-type" to "application/json", ) val converter: (Any) -> io.appwrite.models.VariableList = { @@ -870,7 +872,7 @@ class Functions(client: Client) : Service(client) { "key" to key, "value" to value, ) - val apiHeaders = mutableMapOf( + val apiHeaders = mutableMapOf<String, String>( "content-type" to "application/json", ) val converter: (Any) -> io.appwrite.models.Variable = { @@ -906,7 +908,7 @@ class Functions(client: Client) : Service(client) { val apiParams = mutableMapOf<String, Any?>( ) - val apiHeaders = mutableMapOf( + val apiHeaders = mutableMapOf<String, String>( "content-type" to "application/json", ) val converter: (Any) -> io.appwrite.models.Variable = { @@ -949,7 +951,7 @@ class Functions(client: Client) : Service(client) { "key" to key, "value" to value, ) - val apiHeaders = mutableMapOf( + val apiHeaders = mutableMapOf<String, String>( "content-type" to "application/json", ) val converter: (Any) -> io.appwrite.models.Variable = { @@ -985,7 +987,7 @@ class Functions(client: Client) : Service(client) { val apiParams = mutableMapOf<String, Any?>( ) - val apiHeaders = mutableMapOf( + val apiHeaders = mutableMapOf<String, String>( "content-type" to "application/json", ) return client.call( @@ -997,4 +999,4 @@ class Functions(client: Client) : Service(client) { ) } -} \ No newline at end of file +} diff --git a/src/main/kotlin/io/appwrite/services/Graphql.kt b/src/main/kotlin/io/appwrite/services/Graphql.kt index d8a676c..1ca735b 100644 --- a/src/main/kotlin/io/appwrite/services/Graphql.kt +++ b/src/main/kotlin/io/appwrite/services/Graphql.kt @@ -30,7 +30,7 @@ class Graphql(client: Client) : Service(client) { val apiParams = mutableMapOf<String, Any?>( "query" to query, ) - val apiHeaders = mutableMapOf( + val apiHeaders = mutableMapOf<String, String>( "x-sdk-graphql" to "true", "content-type" to "application/json", ) @@ -64,7 +64,7 @@ class Graphql(client: Client) : Service(client) { val apiParams = mutableMapOf<String, Any?>( "query" to query, ) - val apiHeaders = mutableMapOf( + val apiHeaders = mutableMapOf<String, String>( "x-sdk-graphql" to "true", "content-type" to "application/json", ) @@ -81,4 +81,4 @@ class Graphql(client: Client) : Service(client) { ) } -} \ No newline at end of file +} diff --git a/src/main/kotlin/io/appwrite/services/Health.kt b/src/main/kotlin/io/appwrite/services/Health.kt index a566692..e3f97dc 100644 --- a/src/main/kotlin/io/appwrite/services/Health.kt +++ b/src/main/kotlin/io/appwrite/services/Health.kt @@ -27,7 +27,7 @@ class Health(client: Client) : Service(client) { val apiParams = mutableMapOf<String, Any?>( ) - val apiHeaders = mutableMapOf( + val apiHeaders = mutableMapOf<String, String>( "content-type" to "application/json", ) val converter: (Any) -> io.appwrite.models.HealthStatus = { @@ -57,7 +57,7 @@ class Health(client: Client) : Service(client) { val apiParams = mutableMapOf<String, Any?>( ) - val apiHeaders = mutableMapOf( + val apiHeaders = mutableMapOf<String, String>( "content-type" to "application/json", ) val converter: (Any) -> io.appwrite.models.HealthAntivirus = { @@ -87,7 +87,7 @@ class Health(client: Client) : Service(client) { val apiParams = mutableMapOf<String, Any?>( ) - val apiHeaders = mutableMapOf( + val apiHeaders = mutableMapOf<String, String>( "content-type" to "application/json", ) val converter: (Any) -> io.appwrite.models.HealthStatus = { @@ -121,7 +121,7 @@ class Health(client: Client) : Service(client) { val apiParams = mutableMapOf<String, Any?>( "domain" to domain, ) - val apiHeaders = mutableMapOf( + val apiHeaders = mutableMapOf<String, String>( "content-type" to "application/json", ) val converter: (Any) -> io.appwrite.models.HealthCertificate = { @@ -151,7 +151,7 @@ class Health(client: Client) : Service(client) { val apiParams = mutableMapOf<String, Any?>( ) - val apiHeaders = mutableMapOf( + val apiHeaders = mutableMapOf<String, String>( "content-type" to "application/json", ) val converter: (Any) -> io.appwrite.models.HealthStatus = { @@ -181,7 +181,7 @@ class Health(client: Client) : Service(client) { val apiParams = mutableMapOf<String, Any?>( ) - val apiHeaders = mutableMapOf( + val apiHeaders = mutableMapOf<String, String>( "content-type" to "application/json", ) val converter: (Any) -> io.appwrite.models.HealthStatus = { @@ -211,7 +211,7 @@ class Health(client: Client) : Service(client) { val apiParams = mutableMapOf<String, Any?>( ) - val apiHeaders = mutableMapOf( + val apiHeaders = mutableMapOf<String, String>( "content-type" to "application/json", ) val converter: (Any) -> io.appwrite.models.HealthStatus = { @@ -245,7 +245,7 @@ class Health(client: Client) : Service(client) { val apiParams = mutableMapOf<String, Any?>( "threshold" to threshold, ) - val apiHeaders = mutableMapOf( + val apiHeaders = mutableMapOf<String, String>( "content-type" to "application/json", ) val converter: (Any) -> io.appwrite.models.HealthQueue = { @@ -279,7 +279,7 @@ class Health(client: Client) : Service(client) { val apiParams = mutableMapOf<String, Any?>( "threshold" to threshold, ) - val apiHeaders = mutableMapOf( + val apiHeaders = mutableMapOf<String, String>( "content-type" to "application/json", ) val converter: (Any) -> io.appwrite.models.HealthQueue = { @@ -316,7 +316,7 @@ class Health(client: Client) : Service(client) { "name" to name, "threshold" to threshold, ) - val apiHeaders = mutableMapOf( + val apiHeaders = mutableMapOf<String, String>( "content-type" to "application/json", ) val converter: (Any) -> io.appwrite.models.HealthQueue = { @@ -350,7 +350,7 @@ class Health(client: Client) : Service(client) { val apiParams = mutableMapOf<String, Any?>( "threshold" to threshold, ) - val apiHeaders = mutableMapOf( + val apiHeaders = mutableMapOf<String, String>( "content-type" to "application/json", ) val converter: (Any) -> io.appwrite.models.HealthQueue = { @@ -387,7 +387,7 @@ class Health(client: Client) : Service(client) { val apiParams = mutableMapOf<String, Any?>( "threshold" to threshold, ) - val apiHeaders = mutableMapOf( + val apiHeaders = mutableMapOf<String, String>( "content-type" to "application/json", ) val converter: (Any) -> io.appwrite.models.HealthQueue = { @@ -421,7 +421,7 @@ class Health(client: Client) : Service(client) { val apiParams = mutableMapOf<String, Any?>( "threshold" to threshold, ) - val apiHeaders = mutableMapOf( + val apiHeaders = mutableMapOf<String, String>( "content-type" to "application/json", ) val converter: (Any) -> io.appwrite.models.HealthQueue = { @@ -455,7 +455,7 @@ class Health(client: Client) : Service(client) { val apiParams = mutableMapOf<String, Any?>( "threshold" to threshold, ) - val apiHeaders = mutableMapOf( + val apiHeaders = mutableMapOf<String, String>( "content-type" to "application/json", ) val converter: (Any) -> io.appwrite.models.HealthQueue = { @@ -489,7 +489,7 @@ class Health(client: Client) : Service(client) { val apiParams = mutableMapOf<String, Any?>( "threshold" to threshold, ) - val apiHeaders = mutableMapOf( + val apiHeaders = mutableMapOf<String, String>( "content-type" to "application/json", ) val converter: (Any) -> io.appwrite.models.HealthQueue = { @@ -523,7 +523,7 @@ class Health(client: Client) : Service(client) { val apiParams = mutableMapOf<String, Any?>( "threshold" to threshold, ) - val apiHeaders = mutableMapOf( + val apiHeaders = mutableMapOf<String, String>( "content-type" to "application/json", ) val converter: (Any) -> io.appwrite.models.HealthQueue = { @@ -557,7 +557,7 @@ class Health(client: Client) : Service(client) { val apiParams = mutableMapOf<String, Any?>( "threshold" to threshold, ) - val apiHeaders = mutableMapOf( + val apiHeaders = mutableMapOf<String, String>( "content-type" to "application/json", ) val converter: (Any) -> io.appwrite.models.HealthQueue = { @@ -591,7 +591,7 @@ class Health(client: Client) : Service(client) { val apiParams = mutableMapOf<String, Any?>( "threshold" to threshold, ) - val apiHeaders = mutableMapOf( + val apiHeaders = mutableMapOf<String, String>( "content-type" to "application/json", ) val converter: (Any) -> io.appwrite.models.HealthQueue = { @@ -625,7 +625,7 @@ class Health(client: Client) : Service(client) { val apiParams = mutableMapOf<String, Any?>( "threshold" to threshold, ) - val apiHeaders = mutableMapOf( + val apiHeaders = mutableMapOf<String, String>( "content-type" to "application/json", ) val converter: (Any) -> io.appwrite.models.HealthQueue = { @@ -659,7 +659,7 @@ class Health(client: Client) : Service(client) { val apiParams = mutableMapOf<String, Any?>( "threshold" to threshold, ) - val apiHeaders = mutableMapOf( + val apiHeaders = mutableMapOf<String, String>( "content-type" to "application/json", ) val converter: (Any) -> io.appwrite.models.HealthQueue = { @@ -689,7 +689,7 @@ class Health(client: Client) : Service(client) { val apiParams = mutableMapOf<String, Any?>( ) - val apiHeaders = mutableMapOf( + val apiHeaders = mutableMapOf<String, String>( "content-type" to "application/json", ) val converter: (Any) -> io.appwrite.models.HealthStatus = { @@ -719,7 +719,7 @@ class Health(client: Client) : Service(client) { val apiParams = mutableMapOf<String, Any?>( ) - val apiHeaders = mutableMapOf( + val apiHeaders = mutableMapOf<String, String>( "content-type" to "application/json", ) val converter: (Any) -> io.appwrite.models.HealthStatus = { @@ -749,7 +749,7 @@ class Health(client: Client) : Service(client) { val apiParams = mutableMapOf<String, Any?>( ) - val apiHeaders = mutableMapOf( + val apiHeaders = mutableMapOf<String, String>( "content-type" to "application/json", ) val converter: (Any) -> io.appwrite.models.HealthTime = { @@ -765,4 +765,4 @@ class Health(client: Client) : Service(client) { ) } -} \ No newline at end of file +} diff --git a/src/main/kotlin/io/appwrite/services/Locale.kt b/src/main/kotlin/io/appwrite/services/Locale.kt index 8059629..0a81472 100644 --- a/src/main/kotlin/io/appwrite/services/Locale.kt +++ b/src/main/kotlin/io/appwrite/services/Locale.kt @@ -27,7 +27,7 @@ class Locale(client: Client) : Service(client) { val apiParams = mutableMapOf<String, Any?>( ) - val apiHeaders = mutableMapOf( + val apiHeaders = mutableMapOf<String, String>( "content-type" to "application/json", ) val converter: (Any) -> io.appwrite.models.Locale = { @@ -44,7 +44,7 @@ class Locale(client: Client) : Service(client) { } /** - * List Locale Codes + * List locale codes * * List of all locale codes in [ISO 639-1](https://en.wikipedia.org/wiki/List_of_ISO_639-1_codes). * @@ -57,7 +57,7 @@ class Locale(client: Client) : Service(client) { val apiParams = mutableMapOf<String, Any?>( ) - val apiHeaders = mutableMapOf( + val apiHeaders = mutableMapOf<String, String>( "content-type" to "application/json", ) val converter: (Any) -> io.appwrite.models.LocaleCodeList = { @@ -87,7 +87,7 @@ class Locale(client: Client) : Service(client) { val apiParams = mutableMapOf<String, Any?>( ) - val apiHeaders = mutableMapOf( + val apiHeaders = mutableMapOf<String, String>( "content-type" to "application/json", ) val converter: (Any) -> io.appwrite.models.ContinentList = { @@ -117,7 +117,7 @@ class Locale(client: Client) : Service(client) { val apiParams = mutableMapOf<String, Any?>( ) - val apiHeaders = mutableMapOf( + val apiHeaders = mutableMapOf<String, String>( "content-type" to "application/json", ) val converter: (Any) -> io.appwrite.models.CountryList = { @@ -147,7 +147,7 @@ class Locale(client: Client) : Service(client) { val apiParams = mutableMapOf<String, Any?>( ) - val apiHeaders = mutableMapOf( + val apiHeaders = mutableMapOf<String, String>( "content-type" to "application/json", ) val converter: (Any) -> io.appwrite.models.CountryList = { @@ -177,7 +177,7 @@ class Locale(client: Client) : Service(client) { val apiParams = mutableMapOf<String, Any?>( ) - val apiHeaders = mutableMapOf( + val apiHeaders = mutableMapOf<String, String>( "content-type" to "application/json", ) val converter: (Any) -> io.appwrite.models.PhoneList = { @@ -207,7 +207,7 @@ class Locale(client: Client) : Service(client) { val apiParams = mutableMapOf<String, Any?>( ) - val apiHeaders = mutableMapOf( + val apiHeaders = mutableMapOf<String, String>( "content-type" to "application/json", ) val converter: (Any) -> io.appwrite.models.CurrencyList = { @@ -237,7 +237,7 @@ class Locale(client: Client) : Service(client) { val apiParams = mutableMapOf<String, Any?>( ) - val apiHeaders = mutableMapOf( + val apiHeaders = mutableMapOf<String, String>( "content-type" to "application/json", ) val converter: (Any) -> io.appwrite.models.LanguageList = { @@ -253,4 +253,4 @@ class Locale(client: Client) : Service(client) { ) } -} \ No newline at end of file +} diff --git a/src/main/kotlin/io/appwrite/services/Messaging.kt b/src/main/kotlin/io/appwrite/services/Messaging.kt index 5701692..9e8c54b 100644 --- a/src/main/kotlin/io/appwrite/services/Messaging.kt +++ b/src/main/kotlin/io/appwrite/services/Messaging.kt @@ -34,7 +34,7 @@ class Messaging(client: Client) : Service(client) { "queries" to queries, "search" to search, ) - val apiHeaders = mutableMapOf( + val apiHeaders = mutableMapOf<String, String>( "content-type" to "application/json", ) val converter: (Any) -> io.appwrite.models.MessageList = { @@ -101,7 +101,7 @@ class Messaging(client: Client) : Service(client) { "html" to html, "scheduledAt" to scheduledAt, ) - val apiHeaders = mutableMapOf( + val apiHeaders = mutableMapOf<String, String>( "content-type" to "application/json", ) val converter: (Any) -> io.appwrite.models.Message = { @@ -168,7 +168,7 @@ class Messaging(client: Client) : Service(client) { "scheduledAt" to scheduledAt, "attachments" to attachments, ) - val apiHeaders = mutableMapOf( + val apiHeaders = mutableMapOf<String, String>( "content-type" to "application/json", ) val converter: (Any) -> io.appwrite.models.Message = { @@ -247,7 +247,7 @@ class Messaging(client: Client) : Service(client) { "draft" to draft, "scheduledAt" to scheduledAt, ) - val apiHeaders = mutableMapOf( + val apiHeaders = mutableMapOf<String, String>( "content-type" to "application/json", ) val converter: (Any) -> io.appwrite.models.Message = { @@ -326,7 +326,7 @@ class Messaging(client: Client) : Service(client) { "draft" to draft, "scheduledAt" to scheduledAt, ) - val apiHeaders = mutableMapOf( + val apiHeaders = mutableMapOf<String, String>( "content-type" to "application/json", ) val converter: (Any) -> io.appwrite.models.Message = { @@ -378,7 +378,7 @@ class Messaging(client: Client) : Service(client) { "draft" to draft, "scheduledAt" to scheduledAt, ) - val apiHeaders = mutableMapOf( + val apiHeaders = mutableMapOf<String, String>( "content-type" to "application/json", ) val converter: (Any) -> io.appwrite.models.Message = { @@ -430,7 +430,7 @@ class Messaging(client: Client) : Service(client) { "draft" to draft, "scheduledAt" to scheduledAt, ) - val apiHeaders = mutableMapOf( + val apiHeaders = mutableMapOf<String, String>( "content-type" to "application/json", ) val converter: (Any) -> io.appwrite.models.Message = { @@ -463,7 +463,7 @@ class Messaging(client: Client) : Service(client) { val apiParams = mutableMapOf<String, Any?>( ) - val apiHeaders = mutableMapOf( + val apiHeaders = mutableMapOf<String, String>( "content-type" to "application/json", ) val converter: (Any) -> io.appwrite.models.Message = { @@ -496,7 +496,7 @@ class Messaging(client: Client) : Service(client) { val apiParams = mutableMapOf<String, Any?>( ) - val apiHeaders = mutableMapOf( + val apiHeaders = mutableMapOf<String, String>( "content-type" to "application/json", ) return client.call( @@ -529,7 +529,7 @@ class Messaging(client: Client) : Service(client) { val apiParams = mutableMapOf<String, Any?>( "queries" to queries, ) - val apiHeaders = mutableMapOf( + val apiHeaders = mutableMapOf<String, String>( "content-type" to "application/json", ) val converter: (Any) -> io.appwrite.models.LogList = { @@ -566,7 +566,7 @@ class Messaging(client: Client) : Service(client) { val apiParams = mutableMapOf<String, Any?>( "queries" to queries, ) - val apiHeaders = mutableMapOf( + val apiHeaders = mutableMapOf<String, String>( "content-type" to "application/json", ) val converter: (Any) -> io.appwrite.models.TargetList = { @@ -603,7 +603,7 @@ class Messaging(client: Client) : Service(client) { "queries" to queries, "search" to search, ) - val apiHeaders = mutableMapOf( + val apiHeaders = mutableMapOf<String, String>( "content-type" to "application/json", ) val converter: (Any) -> io.appwrite.models.ProviderList = { @@ -658,7 +658,7 @@ class Messaging(client: Client) : Service(client) { "sandbox" to sandbox, "enabled" to enabled, ) - val apiHeaders = mutableMapOf( + val apiHeaders = mutableMapOf<String, String>( "content-type" to "application/json", ) val converter: (Any) -> io.appwrite.models.Provider = { @@ -713,7 +713,7 @@ class Messaging(client: Client) : Service(client) { "bundleId" to bundleId, "sandbox" to sandbox, ) - val apiHeaders = mutableMapOf( + val apiHeaders = mutableMapOf<String, String>( "content-type" to "application/json", ) val converter: (Any) -> io.appwrite.models.Provider = { @@ -756,7 +756,7 @@ class Messaging(client: Client) : Service(client) { "serviceAccountJSON" to serviceAccountJSON, "enabled" to enabled, ) - val apiHeaders = mutableMapOf( + val apiHeaders = mutableMapOf<String, String>( "content-type" to "application/json", ) val converter: (Any) -> io.appwrite.models.Provider = { @@ -799,7 +799,7 @@ class Messaging(client: Client) : Service(client) { "enabled" to enabled, "serviceAccountJSON" to serviceAccountJSON, ) - val apiHeaders = mutableMapOf( + val apiHeaders = mutableMapOf<String, String>( "content-type" to "application/json", ) val converter: (Any) -> io.appwrite.models.Provider = { @@ -860,7 +860,7 @@ class Messaging(client: Client) : Service(client) { "replyToEmail" to replyToEmail, "enabled" to enabled, ) - val apiHeaders = mutableMapOf( + val apiHeaders = mutableMapOf<String, String>( "content-type" to "application/json", ) val converter: (Any) -> io.appwrite.models.Provider = { @@ -921,7 +921,7 @@ class Messaging(client: Client) : Service(client) { "replyToName" to replyToName, "replyToEmail" to replyToEmail, ) - val apiHeaders = mutableMapOf( + val apiHeaders = mutableMapOf<String, String>( "content-type" to "application/json", ) val converter: (Any) -> io.appwrite.models.Provider = { @@ -970,7 +970,7 @@ class Messaging(client: Client) : Service(client) { "authKey" to authKey, "enabled" to enabled, ) - val apiHeaders = mutableMapOf( + val apiHeaders = mutableMapOf<String, String>( "content-type" to "application/json", ) val converter: (Any) -> io.appwrite.models.Provider = { @@ -1019,7 +1019,7 @@ class Messaging(client: Client) : Service(client) { "senderId" to senderId, "authKey" to authKey, ) - val apiHeaders = mutableMapOf( + val apiHeaders = mutableMapOf<String, String>( "content-type" to "application/json", ) val converter: (Any) -> io.appwrite.models.Provider = { @@ -1074,7 +1074,7 @@ class Messaging(client: Client) : Service(client) { "replyToEmail" to replyToEmail, "enabled" to enabled, ) - val apiHeaders = mutableMapOf( + val apiHeaders = mutableMapOf<String, String>( "content-type" to "application/json", ) val converter: (Any) -> io.appwrite.models.Provider = { @@ -1129,7 +1129,7 @@ class Messaging(client: Client) : Service(client) { "replyToName" to replyToName, "replyToEmail" to replyToEmail, ) - val apiHeaders = mutableMapOf( + val apiHeaders = mutableMapOf<String, String>( "content-type" to "application/json", ) val converter: (Any) -> io.appwrite.models.Provider = { @@ -1202,7 +1202,7 @@ class Messaging(client: Client) : Service(client) { "replyToEmail" to replyToEmail, "enabled" to enabled, ) - val apiHeaders = mutableMapOf( + val apiHeaders = mutableMapOf<String, String>( "content-type" to "application/json", ) val converter: (Any) -> io.appwrite.models.Provider = { @@ -1275,7 +1275,7 @@ class Messaging(client: Client) : Service(client) { "replyToEmail" to replyToEmail, "enabled" to enabled, ) - val apiHeaders = mutableMapOf( + val apiHeaders = mutableMapOf<String, String>( "content-type" to "application/json", ) val converter: (Any) -> io.appwrite.models.Provider = { @@ -1324,7 +1324,7 @@ class Messaging(client: Client) : Service(client) { "apiKey" to apiKey, "enabled" to enabled, ) - val apiHeaders = mutableMapOf( + val apiHeaders = mutableMapOf<String, String>( "content-type" to "application/json", ) val converter: (Any) -> io.appwrite.models.Provider = { @@ -1373,7 +1373,7 @@ class Messaging(client: Client) : Service(client) { "apiKey" to apiKey, "from" to from, ) - val apiHeaders = mutableMapOf( + val apiHeaders = mutableMapOf<String, String>( "content-type" to "application/json", ) val converter: (Any) -> io.appwrite.models.Provider = { @@ -1422,7 +1422,7 @@ class Messaging(client: Client) : Service(client) { "apiKey" to apiKey, "enabled" to enabled, ) - val apiHeaders = mutableMapOf( + val apiHeaders = mutableMapOf<String, String>( "content-type" to "application/json", ) val converter: (Any) -> io.appwrite.models.Provider = { @@ -1471,7 +1471,7 @@ class Messaging(client: Client) : Service(client) { "apiKey" to apiKey, "from" to from, ) - val apiHeaders = mutableMapOf( + val apiHeaders = mutableMapOf<String, String>( "content-type" to "application/json", ) val converter: (Any) -> io.appwrite.models.Provider = { @@ -1520,7 +1520,7 @@ class Messaging(client: Client) : Service(client) { "authToken" to authToken, "enabled" to enabled, ) - val apiHeaders = mutableMapOf( + val apiHeaders = mutableMapOf<String, String>( "content-type" to "application/json", ) val converter: (Any) -> io.appwrite.models.Provider = { @@ -1569,7 +1569,7 @@ class Messaging(client: Client) : Service(client) { "authToken" to authToken, "from" to from, ) - val apiHeaders = mutableMapOf( + val apiHeaders = mutableMapOf<String, String>( "content-type" to "application/json", ) val converter: (Any) -> io.appwrite.models.Provider = { @@ -1618,7 +1618,7 @@ class Messaging(client: Client) : Service(client) { "apiSecret" to apiSecret, "enabled" to enabled, ) - val apiHeaders = mutableMapOf( + val apiHeaders = mutableMapOf<String, String>( "content-type" to "application/json", ) val converter: (Any) -> io.appwrite.models.Provider = { @@ -1667,7 +1667,7 @@ class Messaging(client: Client) : Service(client) { "apiSecret" to apiSecret, "from" to from, ) - val apiHeaders = mutableMapOf( + val apiHeaders = mutableMapOf<String, String>( "content-type" to "application/json", ) val converter: (Any) -> io.appwrite.models.Provider = { @@ -1700,7 +1700,7 @@ class Messaging(client: Client) : Service(client) { val apiParams = mutableMapOf<String, Any?>( ) - val apiHeaders = mutableMapOf( + val apiHeaders = mutableMapOf<String, String>( "content-type" to "application/json", ) val converter: (Any) -> io.appwrite.models.Provider = { @@ -1733,7 +1733,7 @@ class Messaging(client: Client) : Service(client) { val apiParams = mutableMapOf<String, Any?>( ) - val apiHeaders = mutableMapOf( + val apiHeaders = mutableMapOf<String, String>( "content-type" to "application/json", ) return client.call( @@ -1766,7 +1766,7 @@ class Messaging(client: Client) : Service(client) { val apiParams = mutableMapOf<String, Any?>( "queries" to queries, ) - val apiHeaders = mutableMapOf( + val apiHeaders = mutableMapOf<String, String>( "content-type" to "application/json", ) val converter: (Any) -> io.appwrite.models.LogList = { @@ -1803,7 +1803,7 @@ class Messaging(client: Client) : Service(client) { val apiParams = mutableMapOf<String, Any?>( "queries" to queries, ) - val apiHeaders = mutableMapOf( + val apiHeaders = mutableMapOf<String, String>( "content-type" to "application/json", ) val converter: (Any) -> io.appwrite.models.LogList = { @@ -1840,7 +1840,7 @@ class Messaging(client: Client) : Service(client) { "queries" to queries, "search" to search, ) - val apiHeaders = mutableMapOf( + val apiHeaders = mutableMapOf<String, String>( "content-type" to "application/json", ) val converter: (Any) -> io.appwrite.models.TopicList = { @@ -1880,7 +1880,7 @@ class Messaging(client: Client) : Service(client) { "name" to name, "subscribe" to subscribe, ) - val apiHeaders = mutableMapOf( + val apiHeaders = mutableMapOf<String, String>( "content-type" to "application/json", ) val converter: (Any) -> io.appwrite.models.Topic = { @@ -1913,7 +1913,7 @@ class Messaging(client: Client) : Service(client) { val apiParams = mutableMapOf<String, Any?>( ) - val apiHeaders = mutableMapOf( + val apiHeaders = mutableMapOf<String, String>( "content-type" to "application/json", ) val converter: (Any) -> io.appwrite.models.Topic = { @@ -1953,7 +1953,7 @@ class Messaging(client: Client) : Service(client) { "name" to name, "subscribe" to subscribe, ) - val apiHeaders = mutableMapOf( + val apiHeaders = mutableMapOf<String, String>( "content-type" to "application/json", ) val converter: (Any) -> io.appwrite.models.Topic = { @@ -1986,7 +1986,7 @@ class Messaging(client: Client) : Service(client) { val apiParams = mutableMapOf<String, Any?>( ) - val apiHeaders = mutableMapOf( + val apiHeaders = mutableMapOf<String, String>( "content-type" to "application/json", ) return client.call( @@ -2019,7 +2019,7 @@ class Messaging(client: Client) : Service(client) { val apiParams = mutableMapOf<String, Any?>( "queries" to queries, ) - val apiHeaders = mutableMapOf( + val apiHeaders = mutableMapOf<String, String>( "content-type" to "application/json", ) val converter: (Any) -> io.appwrite.models.LogList = { @@ -2059,7 +2059,7 @@ class Messaging(client: Client) : Service(client) { "queries" to queries, "search" to search, ) - val apiHeaders = mutableMapOf( + val apiHeaders = mutableMapOf<String, String>( "content-type" to "application/json", ) val converter: (Any) -> io.appwrite.models.SubscriberList = { @@ -2098,7 +2098,7 @@ class Messaging(client: Client) : Service(client) { "subscriberId" to subscriberId, "targetId" to targetId, ) - val apiHeaders = mutableMapOf( + val apiHeaders = mutableMapOf<String, String>( "content-type" to "application/json", ) val converter: (Any) -> io.appwrite.models.Subscriber = { @@ -2134,7 +2134,7 @@ class Messaging(client: Client) : Service(client) { val apiParams = mutableMapOf<String, Any?>( ) - val apiHeaders = mutableMapOf( + val apiHeaders = mutableMapOf<String, String>( "content-type" to "application/json", ) val converter: (Any) -> io.appwrite.models.Subscriber = { @@ -2170,7 +2170,7 @@ class Messaging(client: Client) : Service(client) { val apiParams = mutableMapOf<String, Any?>( ) - val apiHeaders = mutableMapOf( + val apiHeaders = mutableMapOf<String, String>( "content-type" to "application/json", ) return client.call( @@ -2182,4 +2182,4 @@ class Messaging(client: Client) : Service(client) { ) } -} \ No newline at end of file +} diff --git a/src/main/kotlin/io/appwrite/services/Storage.kt b/src/main/kotlin/io/appwrite/services/Storage.kt index 1a69af2..0e2c74c 100644 --- a/src/main/kotlin/io/appwrite/services/Storage.kt +++ b/src/main/kotlin/io/appwrite/services/Storage.kt @@ -36,7 +36,7 @@ class Storage(client: Client) : Service(client) { "queries" to queries, "search" to search, ) - val apiHeaders = mutableMapOf( + val apiHeaders = mutableMapOf<String, String>( "content-type" to "application/json", ) val converter: (Any) -> io.appwrite.models.BucketList = { @@ -97,7 +97,7 @@ class Storage(client: Client) : Service(client) { "encryption" to encryption, "antivirus" to antivirus, ) - val apiHeaders = mutableMapOf( + val apiHeaders = mutableMapOf<String, String>( "content-type" to "application/json", ) val converter: (Any) -> io.appwrite.models.Bucket = { @@ -130,7 +130,7 @@ class Storage(client: Client) : Service(client) { val apiParams = mutableMapOf<String, Any?>( ) - val apiHeaders = mutableMapOf( + val apiHeaders = mutableMapOf<String, String>( "content-type" to "application/json", ) val converter: (Any) -> io.appwrite.models.Bucket = { @@ -191,7 +191,7 @@ class Storage(client: Client) : Service(client) { "encryption" to encryption, "antivirus" to antivirus, ) - val apiHeaders = mutableMapOf( + val apiHeaders = mutableMapOf<String, String>( "content-type" to "application/json", ) val converter: (Any) -> io.appwrite.models.Bucket = { @@ -224,7 +224,7 @@ class Storage(client: Client) : Service(client) { val apiParams = mutableMapOf<String, Any?>( ) - val apiHeaders = mutableMapOf( + val apiHeaders = mutableMapOf<String, String>( "content-type" to "application/json", ) return client.call( @@ -260,7 +260,7 @@ class Storage(client: Client) : Service(client) { "queries" to queries, "search" to search, ) - val apiHeaders = mutableMapOf( + val apiHeaders = mutableMapOf<String, String>( "content-type" to "application/json", ) val converter: (Any) -> io.appwrite.models.FileList = { @@ -292,7 +292,7 @@ class Storage(client: Client) : Service(client) { suspend fun createFile( bucketId: String, fileId: String, - file: InputFile, + file: Payload, permissions: List<String>? = null, onProgress: ((UploadProgress) -> Unit)? = null ): io.appwrite.models.File { @@ -304,7 +304,7 @@ class Storage(client: Client) : Service(client) { "file" to file, "permissions" to permissions, ) - val apiHeaders = mutableMapOf( + val apiHeaders = mutableMapOf<String, String>( "content-type" to "multipart/form-data", ) val converter: (Any) -> io.appwrite.models.File = { @@ -344,7 +344,7 @@ class Storage(client: Client) : Service(client) { val apiParams = mutableMapOf<String, Any?>( ) - val apiHeaders = mutableMapOf( + val apiHeaders = mutableMapOf<String, String>( "content-type" to "application/json", ) val converter: (Any) -> io.appwrite.models.File = { @@ -387,7 +387,7 @@ class Storage(client: Client) : Service(client) { "name" to name, "permissions" to permissions, ) - val apiHeaders = mutableMapOf( + val apiHeaders = mutableMapOf<String, String>( "content-type" to "application/json", ) val converter: (Any) -> io.appwrite.models.File = { @@ -404,7 +404,7 @@ class Storage(client: Client) : Service(client) { } /** - * Delete File + * Delete file * * Delete a file by its unique ID. Only users with write permissions have access to delete this resource. * @@ -423,7 +423,7 @@ class Storage(client: Client) : Service(client) { val apiParams = mutableMapOf<String, Any?>( ) - val apiHeaders = mutableMapOf( + val apiHeaders = mutableMapOf<String, String>( "content-type" to "application/json", ) return client.call( @@ -455,7 +455,7 @@ class Storage(client: Client) : Service(client) { val apiParams = mutableMapOf<String, Any?>( ) - val apiHeaders = mutableMapOf( + val apiHeaders = mutableMapOf<String, String>( "content-type" to "application/json", ) return client.call( @@ -520,7 +520,7 @@ class Storage(client: Client) : Service(client) { "background" to background, "output" to output, ) - val apiHeaders = mutableMapOf( + val apiHeaders = mutableMapOf<String, String>( "content-type" to "application/json", ) return client.call( @@ -551,7 +551,7 @@ class Storage(client: Client) : Service(client) { val apiParams = mutableMapOf<String, Any?>( ) - val apiHeaders = mutableMapOf( + val apiHeaders = mutableMapOf<String, String>( "content-type" to "application/json", ) return client.call( @@ -562,4 +562,4 @@ class Storage(client: Client) : Service(client) { ) } -} \ No newline at end of file +} diff --git a/src/main/kotlin/io/appwrite/services/Teams.kt b/src/main/kotlin/io/appwrite/services/Teams.kt index f102654..f7338d6 100644 --- a/src/main/kotlin/io/appwrite/services/Teams.kt +++ b/src/main/kotlin/io/appwrite/services/Teams.kt @@ -35,7 +35,7 @@ class Teams(client: Client) : Service(client) { "queries" to queries, "search" to search, ) - val apiHeaders = mutableMapOf( + val apiHeaders = mutableMapOf<String, String>( "content-type" to "application/json", ) val converter: (Any) -> io.appwrite.models.TeamList<T> = { @@ -96,7 +96,7 @@ class Teams(client: Client) : Service(client) { "name" to name, "roles" to roles, ) - val apiHeaders = mutableMapOf( + val apiHeaders = mutableMapOf<String, String>( "content-type" to "application/json", ) val converter: (Any) -> io.appwrite.models.Team<T> = { @@ -153,7 +153,7 @@ class Teams(client: Client) : Service(client) { val apiParams = mutableMapOf<String, Any?>( ) - val apiHeaders = mutableMapOf( + val apiHeaders = mutableMapOf<String, String>( "content-type" to "application/json", ) val converter: (Any) -> io.appwrite.models.Team<T> = { @@ -206,7 +206,7 @@ class Teams(client: Client) : Service(client) { val apiParams = mutableMapOf<String, Any?>( "name" to name, ) - val apiHeaders = mutableMapOf( + val apiHeaders = mutableMapOf<String, String>( "content-type" to "application/json", ) val converter: (Any) -> io.appwrite.models.Team<T> = { @@ -258,7 +258,7 @@ class Teams(client: Client) : Service(client) { val apiParams = mutableMapOf<String, Any?>( ) - val apiHeaders = mutableMapOf( + val apiHeaders = mutableMapOf<String, String>( "content-type" to "application/json", ) return client.call( @@ -294,7 +294,7 @@ class Teams(client: Client) : Service(client) { "queries" to queries, "search" to search, ) - val apiHeaders = mutableMapOf( + val apiHeaders = mutableMapOf<String, String>( "content-type" to "application/json", ) val converter: (Any) -> io.appwrite.models.MembershipList = { @@ -346,7 +346,7 @@ class Teams(client: Client) : Service(client) { "url" to url, "name" to name, ) - val apiHeaders = mutableMapOf( + val apiHeaders = mutableMapOf<String, String>( "content-type" to "application/json", ) val converter: (Any) -> io.appwrite.models.Membership = { @@ -382,7 +382,7 @@ class Teams(client: Client) : Service(client) { val apiParams = mutableMapOf<String, Any?>( ) - val apiHeaders = mutableMapOf( + val apiHeaders = mutableMapOf<String, String>( "content-type" to "application/json", ) val converter: (Any) -> io.appwrite.models.Membership = { @@ -421,7 +421,7 @@ class Teams(client: Client) : Service(client) { val apiParams = mutableMapOf<String, Any?>( "roles" to roles, ) - val apiHeaders = mutableMapOf( + val apiHeaders = mutableMapOf<String, String>( "content-type" to "application/json", ) val converter: (Any) -> io.appwrite.models.Membership = { @@ -457,7 +457,7 @@ class Teams(client: Client) : Service(client) { val apiParams = mutableMapOf<String, Any?>( ) - val apiHeaders = mutableMapOf( + val apiHeaders = mutableMapOf<String, String>( "content-type" to "application/json", ) return client.call( @@ -495,7 +495,7 @@ class Teams(client: Client) : Service(client) { "userId" to userId, "secret" to secret, ) - val apiHeaders = mutableMapOf( + val apiHeaders = mutableMapOf<String, String>( "content-type" to "application/json", ) val converter: (Any) -> io.appwrite.models.Membership = { @@ -529,7 +529,7 @@ class Teams(client: Client) : Service(client) { val apiParams = mutableMapOf<String, Any?>( ) - val apiHeaders = mutableMapOf( + val apiHeaders = mutableMapOf<String, String>( "content-type" to "application/json", ) val converter: (Any) -> io.appwrite.models.Preferences<T> = { @@ -582,7 +582,7 @@ class Teams(client: Client) : Service(client) { val apiParams = mutableMapOf<String, Any?>( "prefs" to prefs, ) - val apiHeaders = mutableMapOf( + val apiHeaders = mutableMapOf<String, String>( "content-type" to "application/json", ) val converter: (Any) -> io.appwrite.models.Preferences<T> = { @@ -617,4 +617,4 @@ class Teams(client: Client) : Service(client) { nestedType = classOf(), ) -} \ No newline at end of file +} diff --git a/src/main/kotlin/io/appwrite/services/Users.kt b/src/main/kotlin/io/appwrite/services/Users.kt index 8f4ff00..98d32da 100644 --- a/src/main/kotlin/io/appwrite/services/Users.kt +++ b/src/main/kotlin/io/appwrite/services/Users.kt @@ -35,7 +35,7 @@ class Users(client: Client) : Service(client) { "queries" to queries, "search" to search, ) - val apiHeaders = mutableMapOf( + val apiHeaders = mutableMapOf<String, String>( "content-type" to "application/json", ) val converter: (Any) -> io.appwrite.models.UserList<T> = { @@ -102,7 +102,7 @@ class Users(client: Client) : Service(client) { "password" to password, "name" to name, ) - val apiHeaders = mutableMapOf( + val apiHeaders = mutableMapOf<String, String>( "content-type" to "application/json", ) val converter: (Any) -> io.appwrite.models.User<T> = { @@ -175,7 +175,7 @@ class Users(client: Client) : Service(client) { "password" to password, "name" to name, ) - val apiHeaders = mutableMapOf( + val apiHeaders = mutableMapOf<String, String>( "content-type" to "application/json", ) val converter: (Any) -> io.appwrite.models.User<T> = { @@ -245,7 +245,7 @@ class Users(client: Client) : Service(client) { "password" to password, "name" to name, ) - val apiHeaders = mutableMapOf( + val apiHeaders = mutableMapOf<String, String>( "content-type" to "application/json", ) val converter: (Any) -> io.appwrite.models.User<T> = { @@ -288,7 +288,7 @@ class Users(client: Client) : Service(client) { ) /** - * List Identities + * List identities * * Get identities for all users. * @@ -308,7 +308,7 @@ class Users(client: Client) : Service(client) { "queries" to queries, "search" to search, ) - val apiHeaders = mutableMapOf( + val apiHeaders = mutableMapOf<String, String>( "content-type" to "application/json", ) val converter: (Any) -> io.appwrite.models.IdentityList = { @@ -341,7 +341,7 @@ class Users(client: Client) : Service(client) { val apiParams = mutableMapOf<String, Any?>( ) - val apiHeaders = mutableMapOf( + val apiHeaders = mutableMapOf<String, String>( "content-type" to "application/json", ) return client.call( @@ -381,7 +381,7 @@ class Users(client: Client) : Service(client) { "password" to password, "name" to name, ) - val apiHeaders = mutableMapOf( + val apiHeaders = mutableMapOf<String, String>( "content-type" to "application/json", ) val converter: (Any) -> io.appwrite.models.User<T> = { @@ -451,7 +451,7 @@ class Users(client: Client) : Service(client) { "password" to password, "name" to name, ) - val apiHeaders = mutableMapOf( + val apiHeaders = mutableMapOf<String, String>( "content-type" to "application/json", ) val converter: (Any) -> io.appwrite.models.User<T> = { @@ -536,7 +536,7 @@ class Users(client: Client) : Service(client) { "passwordLength" to passwordLength, "name" to name, ) - val apiHeaders = mutableMapOf( + val apiHeaders = mutableMapOf<String, String>( "content-type" to "application/json", ) val converter: (Any) -> io.appwrite.models.User<T> = { @@ -630,7 +630,7 @@ class Users(client: Client) : Service(client) { "passwordSignerKey" to passwordSignerKey, "name" to name, ) - val apiHeaders = mutableMapOf( + val apiHeaders = mutableMapOf<String, String>( "content-type" to "application/json", ) val converter: (Any) -> io.appwrite.models.User<T> = { @@ -712,7 +712,7 @@ class Users(client: Client) : Service(client) { "passwordVersion" to passwordVersion, "name" to name, ) - val apiHeaders = mutableMapOf( + val apiHeaders = mutableMapOf<String, String>( "content-type" to "application/json", ) val converter: (Any) -> io.appwrite.models.User<T> = { @@ -775,7 +775,7 @@ class Users(client: Client) : Service(client) { val apiParams = mutableMapOf<String, Any?>( ) - val apiHeaders = mutableMapOf( + val apiHeaders = mutableMapOf<String, String>( "content-type" to "application/json", ) val converter: (Any) -> io.appwrite.models.User<T> = { @@ -824,7 +824,7 @@ class Users(client: Client) : Service(client) { val apiParams = mutableMapOf<String, Any?>( ) - val apiHeaders = mutableMapOf( + val apiHeaders = mutableMapOf<String, String>( "content-type" to "application/json", ) return client.call( @@ -857,7 +857,7 @@ class Users(client: Client) : Service(client) { val apiParams = mutableMapOf<String, Any?>( "email" to email, ) - val apiHeaders = mutableMapOf( + val apiHeaders = mutableMapOf<String, String>( "content-type" to "application/json", ) val converter: (Any) -> io.appwrite.models.User<T> = { @@ -916,7 +916,7 @@ class Users(client: Client) : Service(client) { "sessionId" to sessionId, "duration" to duration, ) - val apiHeaders = mutableMapOf( + val apiHeaders = mutableMapOf<String, String>( "content-type" to "application/json", ) val converter: (Any) -> io.appwrite.models.Jwt = { @@ -953,7 +953,7 @@ class Users(client: Client) : Service(client) { val apiParams = mutableMapOf<String, Any?>( "labels" to labels, ) - val apiHeaders = mutableMapOf( + val apiHeaders = mutableMapOf<String, String>( "content-type" to "application/json", ) val converter: (Any) -> io.appwrite.models.User<T> = { @@ -1009,7 +1009,7 @@ class Users(client: Client) : Service(client) { val apiParams = mutableMapOf<String, Any?>( "queries" to queries, ) - val apiHeaders = mutableMapOf( + val apiHeaders = mutableMapOf<String, String>( "content-type" to "application/json", ) val converter: (Any) -> io.appwrite.models.LogList = { @@ -1042,7 +1042,7 @@ class Users(client: Client) : Service(client) { val apiParams = mutableMapOf<String, Any?>( ) - val apiHeaders = mutableMapOf( + val apiHeaders = mutableMapOf<String, String>( "content-type" to "application/json", ) val converter: (Any) -> io.appwrite.models.MembershipList = { @@ -1079,7 +1079,7 @@ class Users(client: Client) : Service(client) { val apiParams = mutableMapOf<String, Any?>( "mfa" to mfa, ) - val apiHeaders = mutableMapOf( + val apiHeaders = mutableMapOf<String, String>( "content-type" to "application/json", ) val converter: (Any) -> io.appwrite.models.User<T> = { @@ -1115,7 +1115,7 @@ class Users(client: Client) : Service(client) { ) /** - * Delete Authenticator + * Delete authenticator * * Delete an authenticator app. * @@ -1135,7 +1135,7 @@ class Users(client: Client) : Service(client) { val apiParams = mutableMapOf<String, Any?>( ) - val apiHeaders = mutableMapOf( + val apiHeaders = mutableMapOf<String, String>( "content-type" to "application/json", ) val converter: (Any) -> io.appwrite.models.User<T> = { @@ -1152,7 +1152,7 @@ class Users(client: Client) : Service(client) { } /** - * Delete Authenticator + * Delete authenticator * * Delete an authenticator app. * @@ -1171,7 +1171,7 @@ class Users(client: Client) : Service(client) { ) /** - * List Factors + * List factors * * List the factors available on the account to be used as a MFA challange. * @@ -1187,7 +1187,7 @@ class Users(client: Client) : Service(client) { val apiParams = mutableMapOf<String, Any?>( ) - val apiHeaders = mutableMapOf( + val apiHeaders = mutableMapOf<String, String>( "content-type" to "application/json", ) val converter: (Any) -> io.appwrite.models.MfaFactors = { @@ -1204,7 +1204,7 @@ class Users(client: Client) : Service(client) { } /** - * Get MFA Recovery Codes + * Get MFA recovery codes * * Get recovery codes that can be used as backup for MFA flow by User ID. Before getting codes, they must be generated using [createMfaRecoveryCodes](/docs/references/cloud/client-web/account#createMfaRecoveryCodes) method. * @@ -1220,7 +1220,7 @@ class Users(client: Client) : Service(client) { val apiParams = mutableMapOf<String, Any?>( ) - val apiHeaders = mutableMapOf( + val apiHeaders = mutableMapOf<String, String>( "content-type" to "application/json", ) val converter: (Any) -> io.appwrite.models.MfaRecoveryCodes = { @@ -1237,7 +1237,7 @@ class Users(client: Client) : Service(client) { } /** - * Regenerate MFA Recovery Codes + * Regenerate MFA recovery codes * * Regenerate recovery codes that can be used as backup for MFA flow by User ID. Before regenerating codes, they must be first generated using [createMfaRecoveryCodes](/docs/references/cloud/client-web/account#createMfaRecoveryCodes) method. * @@ -1253,7 +1253,7 @@ class Users(client: Client) : Service(client) { val apiParams = mutableMapOf<String, Any?>( ) - val apiHeaders = mutableMapOf( + val apiHeaders = mutableMapOf<String, String>( "content-type" to "application/json", ) val converter: (Any) -> io.appwrite.models.MfaRecoveryCodes = { @@ -1270,7 +1270,7 @@ class Users(client: Client) : Service(client) { } /** - * Create MFA Recovery Codes + * Create MFA recovery codes * * Generate recovery codes used as backup for MFA flow for User ID. Recovery codes can be used as a MFA verification type in [createMfaChallenge](/docs/references/cloud/client-web/account#createMfaChallenge) method by client SDK. * @@ -1286,7 +1286,7 @@ class Users(client: Client) : Service(client) { val apiParams = mutableMapOf<String, Any?>( ) - val apiHeaders = mutableMapOf( + val apiHeaders = mutableMapOf<String, String>( "content-type" to "application/json", ) val converter: (Any) -> io.appwrite.models.MfaRecoveryCodes = { @@ -1323,7 +1323,7 @@ class Users(client: Client) : Service(client) { val apiParams = mutableMapOf<String, Any?>( "name" to name, ) - val apiHeaders = mutableMapOf( + val apiHeaders = mutableMapOf<String, String>( "content-type" to "application/json", ) val converter: (Any) -> io.appwrite.models.User<T> = { @@ -1379,7 +1379,7 @@ class Users(client: Client) : Service(client) { val apiParams = mutableMapOf<String, Any?>( "password" to password, ) - val apiHeaders = mutableMapOf( + val apiHeaders = mutableMapOf<String, String>( "content-type" to "application/json", ) val converter: (Any) -> io.appwrite.models.User<T> = { @@ -1435,7 +1435,7 @@ class Users(client: Client) : Service(client) { val apiParams = mutableMapOf<String, Any?>( "number" to number, ) - val apiHeaders = mutableMapOf( + val apiHeaders = mutableMapOf<String, String>( "content-type" to "application/json", ) val converter: (Any) -> io.appwrite.models.User<T> = { @@ -1488,7 +1488,7 @@ class Users(client: Client) : Service(client) { val apiParams = mutableMapOf<String, Any?>( ) - val apiHeaders = mutableMapOf( + val apiHeaders = mutableMapOf<String, String>( "content-type" to "application/json", ) val converter: (Any) -> io.appwrite.models.Preferences<T> = { @@ -1541,7 +1541,7 @@ class Users(client: Client) : Service(client) { val apiParams = mutableMapOf<String, Any?>( "prefs" to prefs, ) - val apiHeaders = mutableMapOf( + val apiHeaders = mutableMapOf<String, String>( "content-type" to "application/json", ) val converter: (Any) -> io.appwrite.models.Preferences<T> = { @@ -1593,7 +1593,7 @@ class Users(client: Client) : Service(client) { val apiParams = mutableMapOf<String, Any?>( ) - val apiHeaders = mutableMapOf( + val apiHeaders = mutableMapOf<String, String>( "content-type" to "application/json", ) val converter: (Any) -> io.appwrite.models.SessionList = { @@ -1626,7 +1626,7 @@ class Users(client: Client) : Service(client) { val apiParams = mutableMapOf<String, Any?>( ) - val apiHeaders = mutableMapOf( + val apiHeaders = mutableMapOf<String, String>( "content-type" to "application/json", ) val converter: (Any) -> io.appwrite.models.Session = { @@ -1659,7 +1659,7 @@ class Users(client: Client) : Service(client) { val apiParams = mutableMapOf<String, Any?>( ) - val apiHeaders = mutableMapOf( + val apiHeaders = mutableMapOf<String, String>( "content-type" to "application/json", ) return client.call( @@ -1691,7 +1691,7 @@ class Users(client: Client) : Service(client) { val apiParams = mutableMapOf<String, Any?>( ) - val apiHeaders = mutableMapOf( + val apiHeaders = mutableMapOf<String, String>( "content-type" to "application/json", ) return client.call( @@ -1724,7 +1724,7 @@ class Users(client: Client) : Service(client) { val apiParams = mutableMapOf<String, Any?>( "status" to status, ) - val apiHeaders = mutableMapOf( + val apiHeaders = mutableMapOf<String, String>( "content-type" to "application/json", ) val converter: (Any) -> io.appwrite.models.User<T> = { @@ -1760,7 +1760,7 @@ class Users(client: Client) : Service(client) { ) /** - * List User Targets + * List user targets * * List the messaging targets that are associated with a user. * @@ -1780,7 +1780,7 @@ class Users(client: Client) : Service(client) { val apiParams = mutableMapOf<String, Any?>( "queries" to queries, ) - val apiHeaders = mutableMapOf( + val apiHeaders = mutableMapOf<String, String>( "content-type" to "application/json", ) val converter: (Any) -> io.appwrite.models.TargetList = { @@ -1797,7 +1797,7 @@ class Users(client: Client) : Service(client) { } /** - * Create User Target + * Create user target * * Create a messaging target. * @@ -1829,7 +1829,7 @@ class Users(client: Client) : Service(client) { "providerId" to providerId, "name" to name, ) - val apiHeaders = mutableMapOf( + val apiHeaders = mutableMapOf<String, String>( "content-type" to "application/json", ) val converter: (Any) -> io.appwrite.models.Target = { @@ -1846,7 +1846,7 @@ class Users(client: Client) : Service(client) { } /** - * Get User Target + * Get user target * * Get a user's push notification target by ID. * @@ -1865,7 +1865,7 @@ class Users(client: Client) : Service(client) { val apiParams = mutableMapOf<String, Any?>( ) - val apiHeaders = mutableMapOf( + val apiHeaders = mutableMapOf<String, String>( "content-type" to "application/json", ) val converter: (Any) -> io.appwrite.models.Target = { @@ -1882,7 +1882,7 @@ class Users(client: Client) : Service(client) { } /** - * Update User target + * Update user target * * Update a messaging target. * @@ -1911,7 +1911,7 @@ class Users(client: Client) : Service(client) { "providerId" to providerId, "name" to name, ) - val apiHeaders = mutableMapOf( + val apiHeaders = mutableMapOf<String, String>( "content-type" to "application/json", ) val converter: (Any) -> io.appwrite.models.Target = { @@ -1947,7 +1947,7 @@ class Users(client: Client) : Service(client) { val apiParams = mutableMapOf<String, Any?>( ) - val apiHeaders = mutableMapOf( + val apiHeaders = mutableMapOf<String, String>( "content-type" to "application/json", ) return client.call( @@ -1983,7 +1983,7 @@ class Users(client: Client) : Service(client) { "length" to length, "expire" to expire, ) - val apiHeaders = mutableMapOf( + val apiHeaders = mutableMapOf<String, String>( "content-type" to "application/json", ) val converter: (Any) -> io.appwrite.models.Token = { @@ -2020,7 +2020,7 @@ class Users(client: Client) : Service(client) { val apiParams = mutableMapOf<String, Any?>( "emailVerification" to emailVerification, ) - val apiHeaders = mutableMapOf( + val apiHeaders = mutableMapOf<String, String>( "content-type" to "application/json", ) val converter: (Any) -> io.appwrite.models.User<T> = { @@ -2076,7 +2076,7 @@ class Users(client: Client) : Service(client) { val apiParams = mutableMapOf<String, Any?>( "phoneVerification" to phoneVerification, ) - val apiHeaders = mutableMapOf( + val apiHeaders = mutableMapOf<String, String>( "content-type" to "application/json", ) val converter: (Any) -> io.appwrite.models.User<T> = { @@ -2111,4 +2111,4 @@ class Users(client: Client) : Service(client) { nestedType = classOf(), ) -} \ No newline at end of file +} From 45f821b5afb7b362f15c186528692014003c4432 Mon Sep 17 00:00:00 2001 From: loks0n <22452787+loks0n@users.noreply.github.com> Date: Tue, 8 Oct 2024 16:22:34 +0100 Subject: [PATCH 02/17] feat: multipart --- src/main/kotlin/io/appwrite/enums/ImageFormat.kt | 4 +++- .../io/appwrite/models/AttributeBoolean.kt | 16 ++++++++++++++++ .../io/appwrite/models/AttributeDatetime.kt | 16 ++++++++++++++++ .../kotlin/io/appwrite/models/AttributeEmail.kt | 16 ++++++++++++++++ .../kotlin/io/appwrite/models/AttributeEnum.kt | 16 ++++++++++++++++ .../kotlin/io/appwrite/models/AttributeFloat.kt | 16 ++++++++++++++++ .../io/appwrite/models/AttributeInteger.kt | 16 ++++++++++++++++ .../kotlin/io/appwrite/models/AttributeIp.kt | 16 ++++++++++++++++ .../io/appwrite/models/AttributeRelationship.kt | 16 ++++++++++++++++ .../kotlin/io/appwrite/models/AttributeString.kt | 16 ++++++++++++++++ .../kotlin/io/appwrite/models/AttributeUrl.kt | 16 ++++++++++++++++ src/main/kotlin/io/appwrite/models/Index.kt | 16 ++++++++++++++++ 12 files changed, 179 insertions(+), 1 deletion(-) diff --git a/src/main/kotlin/io/appwrite/enums/ImageFormat.kt b/src/main/kotlin/io/appwrite/enums/ImageFormat.kt index c6a3b0f..25eea90 100644 --- a/src/main/kotlin/io/appwrite/enums/ImageFormat.kt +++ b/src/main/kotlin/io/appwrite/enums/ImageFormat.kt @@ -12,7 +12,9 @@ enum class ImageFormat(val value: String) { @SerializedName("png") PNG("png"), @SerializedName("webp") - WEBP("webp"); + WEBP("webp"), + @SerializedName("avif") + AVIF("avif"); override fun toString() = value } \ No newline at end of file diff --git a/src/main/kotlin/io/appwrite/models/AttributeBoolean.kt b/src/main/kotlin/io/appwrite/models/AttributeBoolean.kt index 55962c4..2f8477c 100644 --- a/src/main/kotlin/io/appwrite/models/AttributeBoolean.kt +++ b/src/main/kotlin/io/appwrite/models/AttributeBoolean.kt @@ -43,6 +43,18 @@ data class AttributeBoolean( @SerializedName("array") var array: Boolean?, + /** + * Attribute creation date in ISO 8601 format. + */ + @SerializedName("\$createdAt") + val createdAt: String, + + /** + * Attribute update date in ISO 8601 format. + */ + @SerializedName("\$updatedAt") + val updatedAt: String, + /** * Default value for attribute when not provided. Cannot be set when attribute is required. */ @@ -57,6 +69,8 @@ data class AttributeBoolean( "error" to error as Any, "required" to required as Any, "array" to array as Any, + "\$createdAt" to createdAt as Any, + "\$updatedAt" to updatedAt as Any, "default" to default as Any, ) @@ -72,6 +86,8 @@ data class AttributeBoolean( error = map["error"] as String, required = map["required"] as Boolean, array = map["array"] as? Boolean?, + createdAt = map["\$createdAt"] as String, + updatedAt = map["\$updatedAt"] as String, default = map["default"] as? Boolean?, ) } diff --git a/src/main/kotlin/io/appwrite/models/AttributeDatetime.kt b/src/main/kotlin/io/appwrite/models/AttributeDatetime.kt index 0a54b9d..8ae71ef 100644 --- a/src/main/kotlin/io/appwrite/models/AttributeDatetime.kt +++ b/src/main/kotlin/io/appwrite/models/AttributeDatetime.kt @@ -43,6 +43,18 @@ data class AttributeDatetime( @SerializedName("array") var array: Boolean?, + /** + * Attribute creation date in ISO 8601 format. + */ + @SerializedName("\$createdAt") + val createdAt: String, + + /** + * Attribute update date in ISO 8601 format. + */ + @SerializedName("\$updatedAt") + val updatedAt: String, + /** * ISO 8601 format. */ @@ -63,6 +75,8 @@ data class AttributeDatetime( "error" to error as Any, "required" to required as Any, "array" to array as Any, + "\$createdAt" to createdAt as Any, + "\$updatedAt" to updatedAt as Any, "format" to format as Any, "default" to default as Any, ) @@ -79,6 +93,8 @@ data class AttributeDatetime( error = map["error"] as String, required = map["required"] as Boolean, array = map["array"] as? Boolean?, + createdAt = map["\$createdAt"] as String, + updatedAt = map["\$updatedAt"] as String, format = map["format"] as String, default = map["default"] as? String?, ) diff --git a/src/main/kotlin/io/appwrite/models/AttributeEmail.kt b/src/main/kotlin/io/appwrite/models/AttributeEmail.kt index b7b0fbf..87bd1b3 100644 --- a/src/main/kotlin/io/appwrite/models/AttributeEmail.kt +++ b/src/main/kotlin/io/appwrite/models/AttributeEmail.kt @@ -43,6 +43,18 @@ data class AttributeEmail( @SerializedName("array") var array: Boolean?, + /** + * Attribute creation date in ISO 8601 format. + */ + @SerializedName("\$createdAt") + val createdAt: String, + + /** + * Attribute update date in ISO 8601 format. + */ + @SerializedName("\$updatedAt") + val updatedAt: String, + /** * String format. */ @@ -63,6 +75,8 @@ data class AttributeEmail( "error" to error as Any, "required" to required as Any, "array" to array as Any, + "\$createdAt" to createdAt as Any, + "\$updatedAt" to updatedAt as Any, "format" to format as Any, "default" to default as Any, ) @@ -79,6 +93,8 @@ data class AttributeEmail( error = map["error"] as String, required = map["required"] as Boolean, array = map["array"] as? Boolean?, + createdAt = map["\$createdAt"] as String, + updatedAt = map["\$updatedAt"] as String, format = map["format"] as String, default = map["default"] as? String?, ) diff --git a/src/main/kotlin/io/appwrite/models/AttributeEnum.kt b/src/main/kotlin/io/appwrite/models/AttributeEnum.kt index db002d1..e332178 100644 --- a/src/main/kotlin/io/appwrite/models/AttributeEnum.kt +++ b/src/main/kotlin/io/appwrite/models/AttributeEnum.kt @@ -43,6 +43,18 @@ data class AttributeEnum( @SerializedName("array") var array: Boolean?, + /** + * Attribute creation date in ISO 8601 format. + */ + @SerializedName("\$createdAt") + val createdAt: String, + + /** + * Attribute update date in ISO 8601 format. + */ + @SerializedName("\$updatedAt") + val updatedAt: String, + /** * Array of elements in enumerated type. */ @@ -69,6 +81,8 @@ data class AttributeEnum( "error" to error as Any, "required" to required as Any, "array" to array as Any, + "\$createdAt" to createdAt as Any, + "\$updatedAt" to updatedAt as Any, "elements" to elements as Any, "format" to format as Any, "default" to default as Any, @@ -86,6 +100,8 @@ data class AttributeEnum( error = map["error"] as String, required = map["required"] as Boolean, array = map["array"] as? Boolean?, + createdAt = map["\$createdAt"] as String, + updatedAt = map["\$updatedAt"] as String, elements = map["elements"] as List<Any>, format = map["format"] as String, default = map["default"] as? String?, diff --git a/src/main/kotlin/io/appwrite/models/AttributeFloat.kt b/src/main/kotlin/io/appwrite/models/AttributeFloat.kt index 7c6250e..0e8d549 100644 --- a/src/main/kotlin/io/appwrite/models/AttributeFloat.kt +++ b/src/main/kotlin/io/appwrite/models/AttributeFloat.kt @@ -43,6 +43,18 @@ data class AttributeFloat( @SerializedName("array") var array: Boolean?, + /** + * Attribute creation date in ISO 8601 format. + */ + @SerializedName("\$createdAt") + val createdAt: String, + + /** + * Attribute update date in ISO 8601 format. + */ + @SerializedName("\$updatedAt") + val updatedAt: String, + /** * Minimum value to enforce for new documents. */ @@ -69,6 +81,8 @@ data class AttributeFloat( "error" to error as Any, "required" to required as Any, "array" to array as Any, + "\$createdAt" to createdAt as Any, + "\$updatedAt" to updatedAt as Any, "min" to min as Any, "max" to max as Any, "default" to default as Any, @@ -86,6 +100,8 @@ data class AttributeFloat( error = map["error"] as String, required = map["required"] as Boolean, array = map["array"] as? Boolean?, + createdAt = map["\$createdAt"] as String, + updatedAt = map["\$updatedAt"] as String, min = (map["min"] as? Number)?.toDouble(), max = (map["max"] as? Number)?.toDouble(), default = (map["default"] as? Number)?.toDouble(), diff --git a/src/main/kotlin/io/appwrite/models/AttributeInteger.kt b/src/main/kotlin/io/appwrite/models/AttributeInteger.kt index eb35f58..327bd9f 100644 --- a/src/main/kotlin/io/appwrite/models/AttributeInteger.kt +++ b/src/main/kotlin/io/appwrite/models/AttributeInteger.kt @@ -43,6 +43,18 @@ data class AttributeInteger( @SerializedName("array") var array: Boolean?, + /** + * Attribute creation date in ISO 8601 format. + */ + @SerializedName("\$createdAt") + val createdAt: String, + + /** + * Attribute update date in ISO 8601 format. + */ + @SerializedName("\$updatedAt") + val updatedAt: String, + /** * Minimum value to enforce for new documents. */ @@ -69,6 +81,8 @@ data class AttributeInteger( "error" to error as Any, "required" to required as Any, "array" to array as Any, + "\$createdAt" to createdAt as Any, + "\$updatedAt" to updatedAt as Any, "min" to min as Any, "max" to max as Any, "default" to default as Any, @@ -86,6 +100,8 @@ data class AttributeInteger( error = map["error"] as String, required = map["required"] as Boolean, array = map["array"] as? Boolean?, + createdAt = map["\$createdAt"] as String, + updatedAt = map["\$updatedAt"] as String, min = (map["min"] as? Number)?.toLong(), max = (map["max"] as? Number)?.toLong(), default = (map["default"] as? Number)?.toLong(), diff --git a/src/main/kotlin/io/appwrite/models/AttributeIp.kt b/src/main/kotlin/io/appwrite/models/AttributeIp.kt index 0deab91..b366ff2 100644 --- a/src/main/kotlin/io/appwrite/models/AttributeIp.kt +++ b/src/main/kotlin/io/appwrite/models/AttributeIp.kt @@ -43,6 +43,18 @@ data class AttributeIp( @SerializedName("array") var array: Boolean?, + /** + * Attribute creation date in ISO 8601 format. + */ + @SerializedName("\$createdAt") + val createdAt: String, + + /** + * Attribute update date in ISO 8601 format. + */ + @SerializedName("\$updatedAt") + val updatedAt: String, + /** * String format. */ @@ -63,6 +75,8 @@ data class AttributeIp( "error" to error as Any, "required" to required as Any, "array" to array as Any, + "\$createdAt" to createdAt as Any, + "\$updatedAt" to updatedAt as Any, "format" to format as Any, "default" to default as Any, ) @@ -79,6 +93,8 @@ data class AttributeIp( error = map["error"] as String, required = map["required"] as Boolean, array = map["array"] as? Boolean?, + createdAt = map["\$createdAt"] as String, + updatedAt = map["\$updatedAt"] as String, format = map["format"] as String, default = map["default"] as? String?, ) diff --git a/src/main/kotlin/io/appwrite/models/AttributeRelationship.kt b/src/main/kotlin/io/appwrite/models/AttributeRelationship.kt index e65f577..a03def7 100644 --- a/src/main/kotlin/io/appwrite/models/AttributeRelationship.kt +++ b/src/main/kotlin/io/appwrite/models/AttributeRelationship.kt @@ -43,6 +43,18 @@ data class AttributeRelationship( @SerializedName("array") var array: Boolean?, + /** + * Attribute creation date in ISO 8601 format. + */ + @SerializedName("\$createdAt") + val createdAt: String, + + /** + * Attribute update date in ISO 8601 format. + */ + @SerializedName("\$updatedAt") + val updatedAt: String, + /** * The ID of the related collection. */ @@ -87,6 +99,8 @@ data class AttributeRelationship( "error" to error as Any, "required" to required as Any, "array" to array as Any, + "\$createdAt" to createdAt as Any, + "\$updatedAt" to updatedAt as Any, "relatedCollection" to relatedCollection as Any, "relationType" to relationType as Any, "twoWay" to twoWay as Any, @@ -107,6 +121,8 @@ data class AttributeRelationship( error = map["error"] as String, required = map["required"] as Boolean, array = map["array"] as? Boolean?, + createdAt = map["\$createdAt"] as String, + updatedAt = map["\$updatedAt"] as String, relatedCollection = map["relatedCollection"] as String, relationType = map["relationType"] as String, twoWay = map["twoWay"] as Boolean, diff --git a/src/main/kotlin/io/appwrite/models/AttributeString.kt b/src/main/kotlin/io/appwrite/models/AttributeString.kt index 898c2b3..efae2ba 100644 --- a/src/main/kotlin/io/appwrite/models/AttributeString.kt +++ b/src/main/kotlin/io/appwrite/models/AttributeString.kt @@ -43,6 +43,18 @@ data class AttributeString( @SerializedName("array") var array: Boolean?, + /** + * Attribute creation date in ISO 8601 format. + */ + @SerializedName("\$createdAt") + val createdAt: String, + + /** + * Attribute update date in ISO 8601 format. + */ + @SerializedName("\$updatedAt") + val updatedAt: String, + /** * Attribute size. */ @@ -63,6 +75,8 @@ data class AttributeString( "error" to error as Any, "required" to required as Any, "array" to array as Any, + "\$createdAt" to createdAt as Any, + "\$updatedAt" to updatedAt as Any, "size" to size as Any, "default" to default as Any, ) @@ -79,6 +93,8 @@ data class AttributeString( error = map["error"] as String, required = map["required"] as Boolean, array = map["array"] as? Boolean?, + createdAt = map["\$createdAt"] as String, + updatedAt = map["\$updatedAt"] as String, size = (map["size"] as Number).toLong(), default = map["default"] as? String?, ) diff --git a/src/main/kotlin/io/appwrite/models/AttributeUrl.kt b/src/main/kotlin/io/appwrite/models/AttributeUrl.kt index 53b5434..d29ba7e 100644 --- a/src/main/kotlin/io/appwrite/models/AttributeUrl.kt +++ b/src/main/kotlin/io/appwrite/models/AttributeUrl.kt @@ -43,6 +43,18 @@ data class AttributeUrl( @SerializedName("array") var array: Boolean?, + /** + * Attribute creation date in ISO 8601 format. + */ + @SerializedName("\$createdAt") + val createdAt: String, + + /** + * Attribute update date in ISO 8601 format. + */ + @SerializedName("\$updatedAt") + val updatedAt: String, + /** * String format. */ @@ -63,6 +75,8 @@ data class AttributeUrl( "error" to error as Any, "required" to required as Any, "array" to array as Any, + "\$createdAt" to createdAt as Any, + "\$updatedAt" to updatedAt as Any, "format" to format as Any, "default" to default as Any, ) @@ -79,6 +93,8 @@ data class AttributeUrl( error = map["error"] as String, required = map["required"] as Boolean, array = map["array"] as? Boolean?, + createdAt = map["\$createdAt"] as String, + updatedAt = map["\$updatedAt"] as String, format = map["format"] as String, default = map["default"] as? String?, ) diff --git a/src/main/kotlin/io/appwrite/models/Index.kt b/src/main/kotlin/io/appwrite/models/Index.kt index 88857da..1d399e8 100644 --- a/src/main/kotlin/io/appwrite/models/Index.kt +++ b/src/main/kotlin/io/appwrite/models/Index.kt @@ -43,6 +43,18 @@ data class Index( @SerializedName("orders") var orders: List<Any>?, + /** + * Index creation date in ISO 8601 format. + */ + @SerializedName("\$createdAt") + val createdAt: String, + + /** + * Index update date in ISO 8601 format. + */ + @SerializedName("\$updatedAt") + val updatedAt: String, + ) { fun toMap(): Map<String, Any> = mapOf( "key" to key as Any, @@ -51,6 +63,8 @@ data class Index( "error" to error as Any, "attributes" to attributes as Any, "orders" to orders as Any, + "\$createdAt" to createdAt as Any, + "\$updatedAt" to updatedAt as Any, ) companion object { @@ -65,6 +79,8 @@ data class Index( error = map["error"] as String, attributes = map["attributes"] as List<Any>, orders = map["orders"] as? List<Any>?, + createdAt = map["\$createdAt"] as String, + updatedAt = map["\$updatedAt"] as String, ) } } \ No newline at end of file From 445bb4a8025661d3a71a7299516f31b00019a836 Mon Sep 17 00:00:00 2001 From: Jake Barnby <jakeb994@gmail.com> Date: Wed, 11 Dec 2024 00:36:35 +1300 Subject: [PATCH 03/17] Add new push message parameters --- README.md | 6 +- .../account/create-email-password-session.md | 4 +- .../java/account/create-email-token.md | 4 +- .../java/account/create-magic-u-r-l-token.md | 6 +- .../java/account/create-o-auth2token.md | 4 +- .../java/account/create-phone-token.md | 4 +- docs/examples/java/account/create-recovery.md | 4 +- docs/examples/java/account/create-session.md | 4 +- .../java/account/create-verification.md | 2 +- docs/examples/java/account/create.md | 6 +- docs/examples/java/account/delete-identity.md | 2 +- docs/examples/java/account/delete-session.md | 2 +- docs/examples/java/account/get-session.md | 2 +- docs/examples/java/account/update-email.md | 4 +- .../account/update-magic-u-r-l-session.md | 4 +- .../java/account/update-mfa-authenticator.md | 2 +- .../java/account/update-mfa-challenge.md | 4 +- docs/examples/java/account/update-name.md | 2 +- docs/examples/java/account/update-password.md | 2 +- .../java/account/update-phone-session.md | 4 +- .../java/account/update-phone-verification.md | 4 +- docs/examples/java/account/update-phone.md | 4 +- docs/examples/java/account/update-recovery.md | 4 +- docs/examples/java/account/update-session.md | 2 +- .../java/account/update-verification.md | 4 +- docs/examples/java/avatars/get-favicon.md | 2 +- docs/examples/java/avatars/get-image.md | 2 +- docs/examples/java/avatars/get-initials.md | 2 +- docs/examples/java/avatars/get-q-r.md | 2 +- .../databases/create-boolean-attribute.md | 4 +- .../java/databases/create-collection.md | 6 +- .../databases/create-datetime-attribute.md | 4 +- .../java/databases/create-document.md | 6 +- .../java/databases/create-email-attribute.md | 6 +- .../java/databases/create-enum-attribute.md | 6 +- .../java/databases/create-float-attribute.md | 4 +- docs/examples/java/databases/create-index.md | 4 +- .../databases/create-integer-attribute.md | 4 +- .../java/databases/create-ip-attribute.md | 4 +- .../create-relationship-attribute.md | 6 +- .../java/databases/create-string-attribute.md | 6 +- .../java/databases/create-url-attribute.md | 6 +- docs/examples/java/databases/create.md | 4 +- .../java/databases/delete-attribute.md | 4 +- .../java/databases/delete-collection.md | 4 +- .../java/databases/delete-document.md | 6 +- docs/examples/java/databases/delete-index.md | 4 +- docs/examples/java/databases/delete.md | 2 +- docs/examples/java/databases/get-attribute.md | 4 +- .../examples/java/databases/get-collection.md | 4 +- docs/examples/java/databases/get-document.md | 6 +- docs/examples/java/databases/get-index.md | 4 +- docs/examples/java/databases/get.md | 2 +- .../java/databases/list-attributes.md | 4 +- .../java/databases/list-collections.md | 4 +- .../examples/java/databases/list-documents.md | 4 +- docs/examples/java/databases/list-indexes.md | 4 +- docs/examples/java/databases/list.md | 2 +- .../databases/update-boolean-attribute.md | 4 +- .../java/databases/update-collection.md | 6 +- .../databases/update-datetime-attribute.md | 4 +- .../java/databases/update-document.md | 6 +- .../java/databases/update-email-attribute.md | 6 +- .../java/databases/update-enum-attribute.md | 6 +- .../java/databases/update-float-attribute.md | 4 +- .../databases/update-integer-attribute.md | 4 +- .../java/databases/update-ip-attribute.md | 4 +- .../update-relationship-attribute.md | 4 +- .../java/databases/update-string-attribute.md | 8 +- .../java/databases/update-url-attribute.md | 6 +- docs/examples/java/databases/update.md | 4 +- docs/examples/java/functions/create-build.md | 6 +- .../java/functions/create-deployment.md | 10 +- .../java/functions/create-execution.md | 6 +- .../java/functions/create-variable.md | 6 +- docs/examples/java/functions/create.md | 24 ++-- .../java/functions/delete-deployment.md | 4 +- .../java/functions/delete-execution.md | 4 +- .../java/functions/delete-variable.md | 4 +- docs/examples/java/functions/delete.md | 2 +- .../java/functions/get-deployment-download.md | 4 +- .../examples/java/functions/get-deployment.md | 4 +- docs/examples/java/functions/get-execution.md | 4 +- docs/examples/java/functions/get-variable.md | 4 +- docs/examples/java/functions/get.md | 2 +- .../java/functions/list-deployments.md | 4 +- .../java/functions/list-executions.md | 4 +- .../examples/java/functions/list-variables.md | 2 +- docs/examples/java/functions/list.md | 2 +- .../java/functions/update-deployment-build.md | 4 +- .../java/functions/update-deployment.md | 4 +- .../java/functions/update-variable.md | 8 +- docs/examples/java/functions/update.md | 16 +-- .../java/health/get-queue-databases.md | 2 +- .../java/messaging/create-apns-provider.md | 12 +- docs/examples/java/messaging/create-email.md | 6 +- .../java/messaging/create-fcm-provider.md | 4 +- .../java/messaging/create-mailgun-provider.md | 16 +-- .../java/messaging/create-msg91provider.md | 10 +- docs/examples/java/messaging/create-push.md | 23 ++-- .../messaging/create-sendgrid-provider.md | 14 +- docs/examples/java/messaging/create-sms.md | 4 +- .../java/messaging/create-smtp-provider.md | 20 +-- .../java/messaging/create-subscriber.md | 6 +- .../messaging/create-telesign-provider.md | 10 +- .../messaging/create-textmagic-provider.md | 10 +- docs/examples/java/messaging/create-topic.md | 4 +- .../java/messaging/create-twilio-provider.md | 10 +- .../java/messaging/create-vonage-provider.md | 10 +- .../java/messaging/delete-provider.md | 2 +- .../java/messaging/delete-subscriber.md | 4 +- docs/examples/java/messaging/delete-topic.md | 2 +- docs/examples/java/messaging/delete.md | 2 +- docs/examples/java/messaging/get-message.md | 2 +- docs/examples/java/messaging/get-provider.md | 2 +- .../examples/java/messaging/get-subscriber.md | 4 +- docs/examples/java/messaging/get-topic.md | 2 +- .../java/messaging/list-message-logs.md | 2 +- docs/examples/java/messaging/list-messages.md | 2 +- .../java/messaging/list-provider-logs.md | 2 +- .../examples/java/messaging/list-providers.md | 2 +- .../java/messaging/list-subscriber-logs.md | 2 +- .../java/messaging/list-subscribers.md | 4 +- docs/examples/java/messaging/list-targets.md | 2 +- .../java/messaging/list-topic-logs.md | 2 +- docs/examples/java/messaging/list-topics.md | 2 +- .../java/messaging/update-apns-provider.md | 12 +- docs/examples/java/messaging/update-email.md | 6 +- .../java/messaging/update-fcm-provider.md | 4 +- .../java/messaging/update-mailgun-provider.md | 16 +-- .../java/messaging/update-msg91provider.md | 10 +- docs/examples/java/messaging/update-push.md | 21 +-- .../messaging/update-sendgrid-provider.md | 14 +- docs/examples/java/messaging/update-sms.md | 4 +- .../java/messaging/update-smtp-provider.md | 20 +-- .../messaging/update-telesign-provider.md | 10 +- .../messaging/update-textmagic-provider.md | 10 +- docs/examples/java/messaging/update-topic.md | 4 +- .../java/messaging/update-twilio-provider.md | 10 +- .../java/messaging/update-vonage-provider.md | 10 +- docs/examples/java/storage/create-bucket.md | 4 +- docs/examples/java/storage/create-file.md | 8 +- docs/examples/java/storage/delete-bucket.md | 2 +- docs/examples/java/storage/delete-file.md | 4 +- docs/examples/java/storage/get-bucket.md | 2 +- .../java/storage/get-file-download.md | 4 +- .../examples/java/storage/get-file-preview.md | 4 +- docs/examples/java/storage/get-file-view.md | 4 +- docs/examples/java/storage/get-file.md | 4 +- docs/examples/java/storage/list-buckets.md | 2 +- docs/examples/java/storage/list-files.md | 4 +- docs/examples/java/storage/update-bucket.md | 4 +- docs/examples/java/storage/update-file.md | 6 +- docs/examples/java/teams/create-membership.md | 12 +- docs/examples/java/teams/create.md | 4 +- docs/examples/java/teams/delete-membership.md | 4 +- docs/examples/java/teams/delete.md | 2 +- docs/examples/java/teams/get-membership.md | 4 +- docs/examples/java/teams/get-prefs.md | 2 +- docs/examples/java/teams/get.md | 2 +- docs/examples/java/teams/list-memberships.md | 4 +- docs/examples/java/teams/list.md | 2 +- .../java/teams/update-membership-status.md | 8 +- docs/examples/java/teams/update-membership.md | 4 +- docs/examples/java/teams/update-name.md | 4 +- docs/examples/java/teams/update-prefs.md | 2 +- docs/examples/java/users/create-argon2user.md | 8 +- .../examples/java/users/create-bcrypt-user.md | 8 +- docs/examples/java/users/create-j-w-t.md | 4 +- docs/examples/java/users/create-m-d5user.md | 8 +- .../java/users/create-mfa-recovery-codes.md | 2 +- .../java/users/create-p-h-pass-user.md | 8 +- docs/examples/java/users/create-s-h-a-user.md | 8 +- .../java/users/create-scrypt-modified-user.md | 14 +- .../examples/java/users/create-scrypt-user.md | 10 +- docs/examples/java/users/create-session.md | 2 +- docs/examples/java/users/create-target.md | 10 +- docs/examples/java/users/create-token.md | 2 +- docs/examples/java/users/create.md | 8 +- docs/examples/java/users/delete-identity.md | 2 +- .../java/users/delete-mfa-authenticator.md | 2 +- docs/examples/java/users/delete-session.md | 4 +- docs/examples/java/users/delete-sessions.md | 2 +- docs/examples/java/users/delete-target.md | 4 +- docs/examples/java/users/delete.md | 2 +- .../java/users/get-mfa-recovery-codes.md | 2 +- docs/examples/java/users/get-prefs.md | 2 +- docs/examples/java/users/get-target.md | 4 +- docs/examples/java/users/get.md | 2 +- docs/examples/java/users/list-identities.md | 2 +- docs/examples/java/users/list-logs.md | 2 +- docs/examples/java/users/list-memberships.md | 2 +- docs/examples/java/users/list-mfa-factors.md | 2 +- docs/examples/java/users/list-sessions.md | 2 +- docs/examples/java/users/list-targets.md | 2 +- docs/examples/java/users/list.md | 2 +- .../java/users/update-email-verification.md | 2 +- docs/examples/java/users/update-email.md | 4 +- docs/examples/java/users/update-labels.md | 2 +- .../java/users/update-mfa-recovery-codes.md | 2 +- docs/examples/java/users/update-mfa.md | 2 +- docs/examples/java/users/update-name.md | 4 +- docs/examples/java/users/update-password.md | 2 +- .../java/users/update-phone-verification.md | 2 +- docs/examples/java/users/update-phone.md | 4 +- docs/examples/java/users/update-prefs.md | 2 +- docs/examples/java/users/update-status.md | 2 +- docs/examples/java/users/update-target.md | 10 +- .../account/create-email-password-session.md | 4 +- .../kotlin/account/create-email-token.md | 4 +- .../account/create-magic-u-r-l-token.md | 6 +- .../kotlin/account/create-o-auth2token.md | 4 +- .../kotlin/account/create-phone-token.md | 4 +- .../kotlin/account/create-recovery.md | 4 +- .../examples/kotlin/account/create-session.md | 4 +- .../kotlin/account/create-verification.md | 2 +- docs/examples/kotlin/account/create.md | 6 +- .../kotlin/account/delete-identity.md | 2 +- .../examples/kotlin/account/delete-session.md | 2 +- docs/examples/kotlin/account/get-session.md | 2 +- docs/examples/kotlin/account/update-email.md | 4 +- .../account/update-magic-u-r-l-session.md | 4 +- .../account/update-mfa-authenticator.md | 2 +- .../kotlin/account/update-mfa-challenge.md | 4 +- docs/examples/kotlin/account/update-name.md | 2 +- .../kotlin/account/update-password.md | 2 +- .../kotlin/account/update-phone-session.md | 4 +- .../account/update-phone-verification.md | 4 +- docs/examples/kotlin/account/update-phone.md | 4 +- .../kotlin/account/update-recovery.md | 4 +- .../examples/kotlin/account/update-session.md | 2 +- .../kotlin/account/update-verification.md | 4 +- docs/examples/kotlin/avatars/get-favicon.md | 2 +- docs/examples/kotlin/avatars/get-image.md | 2 +- docs/examples/kotlin/avatars/get-initials.md | 2 +- docs/examples/kotlin/avatars/get-q-r.md | 2 +- .../databases/create-boolean-attribute.md | 4 +- .../kotlin/databases/create-collection.md | 6 +- .../databases/create-datetime-attribute.md | 4 +- .../kotlin/databases/create-document.md | 6 +- .../databases/create-email-attribute.md | 6 +- .../kotlin/databases/create-enum-attribute.md | 6 +- .../databases/create-float-attribute.md | 4 +- .../examples/kotlin/databases/create-index.md | 4 +- .../databases/create-integer-attribute.md | 4 +- .../kotlin/databases/create-ip-attribute.md | 4 +- .../create-relationship-attribute.md | 8 +- .../databases/create-string-attribute.md | 6 +- .../kotlin/databases/create-url-attribute.md | 6 +- docs/examples/kotlin/databases/create.md | 4 +- .../kotlin/databases/delete-attribute.md | 4 +- .../kotlin/databases/delete-collection.md | 4 +- .../kotlin/databases/delete-document.md | 6 +- .../examples/kotlin/databases/delete-index.md | 4 +- docs/examples/kotlin/databases/delete.md | 2 +- .../kotlin/databases/get-attribute.md | 4 +- .../kotlin/databases/get-collection.md | 4 +- .../examples/kotlin/databases/get-document.md | 6 +- docs/examples/kotlin/databases/get-index.md | 4 +- docs/examples/kotlin/databases/get.md | 2 +- .../kotlin/databases/list-attributes.md | 4 +- .../kotlin/databases/list-collections.md | 4 +- .../kotlin/databases/list-documents.md | 4 +- .../examples/kotlin/databases/list-indexes.md | 4 +- docs/examples/kotlin/databases/list.md | 2 +- .../databases/update-boolean-attribute.md | 4 +- .../kotlin/databases/update-collection.md | 6 +- .../databases/update-datetime-attribute.md | 4 +- .../kotlin/databases/update-document.md | 6 +- .../databases/update-email-attribute.md | 6 +- .../kotlin/databases/update-enum-attribute.md | 6 +- .../databases/update-float-attribute.md | 4 +- .../databases/update-integer-attribute.md | 4 +- .../kotlin/databases/update-ip-attribute.md | 4 +- .../update-relationship-attribute.md | 6 +- .../databases/update-string-attribute.md | 8 +- .../kotlin/databases/update-url-attribute.md | 6 +- docs/examples/kotlin/databases/update.md | 4 +- .../examples/kotlin/functions/create-build.md | 6 +- .../kotlin/functions/create-deployment.md | 10 +- .../kotlin/functions/create-execution.md | 8 +- .../kotlin/functions/create-variable.md | 6 +- docs/examples/kotlin/functions/create.md | 24 ++-- .../kotlin/functions/delete-deployment.md | 4 +- .../kotlin/functions/delete-execution.md | 4 +- .../kotlin/functions/delete-variable.md | 4 +- docs/examples/kotlin/functions/delete.md | 2 +- .../functions/get-deployment-download.md | 4 +- .../kotlin/functions/get-deployment.md | 4 +- .../kotlin/functions/get-execution.md | 4 +- .../examples/kotlin/functions/get-variable.md | 4 +- docs/examples/kotlin/functions/get.md | 2 +- .../kotlin/functions/list-deployments.md | 4 +- .../kotlin/functions/list-executions.md | 4 +- .../kotlin/functions/list-variables.md | 2 +- docs/examples/kotlin/functions/list.md | 2 +- .../functions/update-deployment-build.md | 4 +- .../kotlin/functions/update-deployment.md | 4 +- .../kotlin/functions/update-variable.md | 8 +- docs/examples/kotlin/functions/update.md | 18 +-- .../kotlin/health/get-queue-databases.md | 2 +- .../kotlin/messaging/create-apns-provider.md | 12 +- .../examples/kotlin/messaging/create-email.md | 6 +- .../kotlin/messaging/create-fcm-provider.md | 4 +- .../messaging/create-mailgun-provider.md | 16 +-- .../kotlin/messaging/create-msg91provider.md | 10 +- docs/examples/kotlin/messaging/create-push.md | 25 ++-- .../messaging/create-sendgrid-provider.md | 14 +- docs/examples/kotlin/messaging/create-sms.md | 4 +- .../kotlin/messaging/create-smtp-provider.md | 22 ++-- .../kotlin/messaging/create-subscriber.md | 6 +- .../messaging/create-telesign-provider.md | 10 +- .../messaging/create-textmagic-provider.md | 10 +- .../examples/kotlin/messaging/create-topic.md | 4 +- .../messaging/create-twilio-provider.md | 10 +- .../messaging/create-vonage-provider.md | 10 +- .../kotlin/messaging/delete-provider.md | 2 +- .../kotlin/messaging/delete-subscriber.md | 4 +- .../examples/kotlin/messaging/delete-topic.md | 2 +- docs/examples/kotlin/messaging/delete.md | 2 +- docs/examples/kotlin/messaging/get-message.md | 2 +- .../examples/kotlin/messaging/get-provider.md | 2 +- .../kotlin/messaging/get-subscriber.md | 4 +- docs/examples/kotlin/messaging/get-topic.md | 2 +- .../kotlin/messaging/list-message-logs.md | 2 +- .../kotlin/messaging/list-messages.md | 2 +- .../kotlin/messaging/list-provider-logs.md | 2 +- .../kotlin/messaging/list-providers.md | 2 +- .../kotlin/messaging/list-subscriber-logs.md | 2 +- .../kotlin/messaging/list-subscribers.md | 4 +- .../examples/kotlin/messaging/list-targets.md | 2 +- .../kotlin/messaging/list-topic-logs.md | 2 +- docs/examples/kotlin/messaging/list-topics.md | 2 +- .../kotlin/messaging/update-apns-provider.md | 12 +- .../examples/kotlin/messaging/update-email.md | 6 +- .../kotlin/messaging/update-fcm-provider.md | 4 +- .../messaging/update-mailgun-provider.md | 16 +-- .../kotlin/messaging/update-msg91provider.md | 10 +- docs/examples/kotlin/messaging/update-push.md | 23 ++-- .../messaging/update-sendgrid-provider.md | 14 +- docs/examples/kotlin/messaging/update-sms.md | 4 +- .../kotlin/messaging/update-smtp-provider.md | 22 ++-- .../messaging/update-telesign-provider.md | 10 +- .../messaging/update-textmagic-provider.md | 10 +- .../examples/kotlin/messaging/update-topic.md | 4 +- .../messaging/update-twilio-provider.md | 10 +- .../messaging/update-vonage-provider.md | 10 +- docs/examples/kotlin/storage/create-bucket.md | 6 +- docs/examples/kotlin/storage/create-file.md | 8 +- docs/examples/kotlin/storage/delete-bucket.md | 2 +- docs/examples/kotlin/storage/delete-file.md | 4 +- docs/examples/kotlin/storage/get-bucket.md | 2 +- .../kotlin/storage/get-file-download.md | 4 +- .../kotlin/storage/get-file-preview.md | 8 +- docs/examples/kotlin/storage/get-file-view.md | 4 +- docs/examples/kotlin/storage/get-file.md | 4 +- docs/examples/kotlin/storage/list-buckets.md | 2 +- docs/examples/kotlin/storage/list-files.md | 4 +- docs/examples/kotlin/storage/update-bucket.md | 6 +- docs/examples/kotlin/storage/update-file.md | 6 +- .../kotlin/teams/create-membership.md | 12 +- docs/examples/kotlin/teams/create.md | 4 +- .../kotlin/teams/delete-membership.md | 4 +- docs/examples/kotlin/teams/delete.md | 2 +- docs/examples/kotlin/teams/get-membership.md | 4 +- docs/examples/kotlin/teams/get-prefs.md | 2 +- docs/examples/kotlin/teams/get.md | 2 +- .../examples/kotlin/teams/list-memberships.md | 4 +- docs/examples/kotlin/teams/list.md | 2 +- .../kotlin/teams/update-membership-status.md | 8 +- .../kotlin/teams/update-membership.md | 4 +- docs/examples/kotlin/teams/update-name.md | 4 +- docs/examples/kotlin/teams/update-prefs.md | 2 +- .../kotlin/users/create-argon2user.md | 8 +- .../kotlin/users/create-bcrypt-user.md | 8 +- docs/examples/kotlin/users/create-j-w-t.md | 4 +- docs/examples/kotlin/users/create-m-d5user.md | 8 +- .../kotlin/users/create-mfa-recovery-codes.md | 2 +- .../kotlin/users/create-p-h-pass-user.md | 8 +- .../kotlin/users/create-s-h-a-user.md | 10 +- .../users/create-scrypt-modified-user.md | 14 +- .../kotlin/users/create-scrypt-user.md | 10 +- docs/examples/kotlin/users/create-session.md | 2 +- docs/examples/kotlin/users/create-target.md | 10 +- docs/examples/kotlin/users/create-token.md | 2 +- docs/examples/kotlin/users/create.md | 8 +- docs/examples/kotlin/users/delete-identity.md | 2 +- .../kotlin/users/delete-mfa-authenticator.md | 2 +- docs/examples/kotlin/users/delete-session.md | 4 +- docs/examples/kotlin/users/delete-sessions.md | 2 +- docs/examples/kotlin/users/delete-target.md | 4 +- docs/examples/kotlin/users/delete.md | 2 +- .../kotlin/users/get-mfa-recovery-codes.md | 2 +- docs/examples/kotlin/users/get-prefs.md | 2 +- docs/examples/kotlin/users/get-target.md | 4 +- docs/examples/kotlin/users/get.md | 2 +- docs/examples/kotlin/users/list-identities.md | 2 +- docs/examples/kotlin/users/list-logs.md | 2 +- .../examples/kotlin/users/list-memberships.md | 2 +- .../examples/kotlin/users/list-mfa-factors.md | 2 +- docs/examples/kotlin/users/list-sessions.md | 2 +- docs/examples/kotlin/users/list-targets.md | 2 +- docs/examples/kotlin/users/list.md | 2 +- .../kotlin/users/update-email-verification.md | 2 +- docs/examples/kotlin/users/update-email.md | 4 +- docs/examples/kotlin/users/update-labels.md | 2 +- .../kotlin/users/update-mfa-recovery-codes.md | 2 +- docs/examples/kotlin/users/update-mfa.md | 2 +- docs/examples/kotlin/users/update-name.md | 4 +- docs/examples/kotlin/users/update-password.md | 2 +- .../kotlin/users/update-phone-verification.md | 2 +- docs/examples/kotlin/users/update-phone.md | 4 +- docs/examples/kotlin/users/update-prefs.md | 2 +- docs/examples/kotlin/users/update-status.md | 2 +- docs/examples/kotlin/users/update-target.md | 10 +- src/main/kotlin/io/appwrite/Client.kt | 54 +++----- .../io/appwrite/enums/MessagePriority.kt | 12 ++ src/main/kotlin/io/appwrite/enums/Runtime.kt | 26 +++- .../io/appwrite/extensions/TypeExtensions.kt | 101 +------------- .../io/appwrite/models/AttributeEnum.kt | 4 +- src/main/kotlin/io/appwrite/models/Bucket.kt | 8 +- .../kotlin/io/appwrite/models/Collection.kt | 4 +- .../kotlin/io/appwrite/models/Document.kt | 6 +- .../kotlin/io/appwrite/models/Execution.kt | 8 +- src/main/kotlin/io/appwrite/models/File.kt | 4 +- .../kotlin/io/appwrite/models/Function.kt | 14 +- src/main/kotlin/io/appwrite/models/Index.kt | 8 +- .../kotlin/io/appwrite/models/InputFile.kt | 37 ++++++ .../kotlin/io/appwrite/models/Membership.kt | 10 +- src/main/kotlin/io/appwrite/models/Message.kt | 16 +-- .../io/appwrite/models/MfaRecoveryCodes.kt | 4 +- src/main/kotlin/io/appwrite/models/Payload.kt | 73 ----------- src/main/kotlin/io/appwrite/models/Runtime.kt | 4 +- src/main/kotlin/io/appwrite/models/Session.kt | 4 +- src/main/kotlin/io/appwrite/models/Target.kt | 8 ++ src/main/kotlin/io/appwrite/models/Topic.kt | 4 +- src/main/kotlin/io/appwrite/models/User.kt | 6 +- .../kotlin/io/appwrite/services/Account.kt | 90 ++++++------- .../kotlin/io/appwrite/services/Avatars.kt | 16 +-- .../kotlin/io/appwrite/services/Databases.kt | 86 ++++++------ .../kotlin/io/appwrite/services/Functions.kt | 58 ++++---- .../kotlin/io/appwrite/services/Graphql.kt | 6 +- .../kotlin/io/appwrite/services/Health.kt | 48 +++---- .../kotlin/io/appwrite/services/Locale.kt | 18 +-- .../kotlin/io/appwrite/services/Messaging.kt | 124 ++++++++++-------- .../kotlin/io/appwrite/services/Storage.kt | 30 ++--- src/main/kotlin/io/appwrite/services/Teams.kt | 32 ++--- src/main/kotlin/io/appwrite/services/Users.kt | 86 ++++++------ 448 files changed, 1520 insertions(+), 1605 deletions(-) create mode 100644 src/main/kotlin/io/appwrite/enums/MessagePriority.kt create mode 100644 src/main/kotlin/io/appwrite/models/InputFile.kt delete mode 100644 src/main/kotlin/io/appwrite/models/Payload.kt diff --git a/README.md b/README.md index 167ea44..5786e19 100644 --- a/README.md +++ b/README.md @@ -2,7 +2,7 @@ ![Maven Central](https://img.shields.io/maven-central/v/io.appwrite/sdk-for-kotlin.svg?color=green&style=flat-square) ![License](https://img.shields.io/github/license/appwrite/sdk-for-kotlin.svg?style=flat-square) -![Version](https://img.shields.io/badge/api%20version-1.6.0-blue.svg?style=flat-square) +![Version](https://img.shields.io/badge/api%20version-1.6.1-blue.svg?style=flat-square) [![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) @@ -39,7 +39,7 @@ repositories { Next, add the dependency to your project's `build.gradle(.kts)` file: ```groovy -implementation("io.appwrite:sdk-for-kotlin:7.0.0") +implementation("io.appwrite:sdk-for-kotlin:6.2.0") ``` ### Maven @@ -50,7 +50,7 @@ Add this to your project's `pom.xml` file: <dependency> <groupId>io.appwrite</groupId> <artifactId>sdk-for-kotlin</artifactId> - <version>7.0.0</version> + <version>6.2.0</version> </dependency> </dependencies> ``` diff --git a/docs/examples/java/account/create-email-password-session.md b/docs/examples/java/account/create-email-password-session.md index a92c734..75fa73f 100644 --- a/docs/examples/java/account/create-email-password-session.md +++ b/docs/examples/java/account/create-email-password-session.md @@ -9,8 +9,8 @@ Client client = new Client() Account account = new Account(client); account.createEmailPasswordSession( - "{$example}", // email - "{$example}", // password + "email@example.com", // email + "password", // password new CoroutineCallback<>((result, error) -> { if (error != null) { error.printStackTrace(); diff --git a/docs/examples/java/account/create-email-token.md b/docs/examples/java/account/create-email-token.md index ccd6248..eff6d43 100644 --- a/docs/examples/java/account/create-email-token.md +++ b/docs/examples/java/account/create-email-token.md @@ -9,8 +9,8 @@ Client client = new Client() Account account = new Account(client); account.createEmailToken( - "{$example}", // userId - "{$example}", // email + "<USER_ID>", // userId + "email@example.com", // email false, // phrase (optional) new CoroutineCallback<>((result, error) -> { if (error != null) { diff --git a/docs/examples/java/account/create-magic-u-r-l-token.md b/docs/examples/java/account/create-magic-u-r-l-token.md index 87c452a..3f9bda2 100644 --- a/docs/examples/java/account/create-magic-u-r-l-token.md +++ b/docs/examples/java/account/create-magic-u-r-l-token.md @@ -9,9 +9,9 @@ Client client = new Client() Account account = new Account(client); account.createMagicURLToken( - "{$example}", // userId - "{$example}", // email - "{$example}", // url (optional) + "<USER_ID>", // userId + "email@example.com", // email + "https://example.com", // url (optional) false, // phrase (optional) new CoroutineCallback<>((result, error) -> { if (error != null) { diff --git a/docs/examples/java/account/create-o-auth2token.md b/docs/examples/java/account/create-o-auth2token.md index bbb4acb..47873c5 100644 --- a/docs/examples/java/account/create-o-auth2token.md +++ b/docs/examples/java/account/create-o-auth2token.md @@ -11,8 +11,8 @@ Account account = new Account(client); account.createOAuth2Token( OAuthProvider.AMAZON, // provider - "{$example}", // success (optional) - "{$example}", // failure (optional) + "https://example.com", // success (optional) + "https://example.com", // failure (optional) listOf(), // scopes (optional) new CoroutineCallback<>((result, error) -> { if (error != null) { diff --git a/docs/examples/java/account/create-phone-token.md b/docs/examples/java/account/create-phone-token.md index 7a6e575..1f7c05c 100644 --- a/docs/examples/java/account/create-phone-token.md +++ b/docs/examples/java/account/create-phone-token.md @@ -9,8 +9,8 @@ Client client = new Client() Account account = new Account(client); account.createPhoneToken( - "{$example}", // userId - "{$example}", // phone + "<USER_ID>", // userId + "+12065550100", // phone new CoroutineCallback<>((result, error) -> { if (error != null) { error.printStackTrace(); diff --git a/docs/examples/java/account/create-recovery.md b/docs/examples/java/account/create-recovery.md index 84cdee9..d74106b 100644 --- a/docs/examples/java/account/create-recovery.md +++ b/docs/examples/java/account/create-recovery.md @@ -10,8 +10,8 @@ Client client = new Client() Account account = new Account(client); account.createRecovery( - "{$example}", // email - "{$example}", // url + "email@example.com", // email + "https://example.com", // url new CoroutineCallback<>((result, error) -> { if (error != null) { error.printStackTrace(); diff --git a/docs/examples/java/account/create-session.md b/docs/examples/java/account/create-session.md index 5515ae8..861af3d 100644 --- a/docs/examples/java/account/create-session.md +++ b/docs/examples/java/account/create-session.md @@ -9,8 +9,8 @@ Client client = new Client() Account account = new Account(client); account.createSession( - "{$example}", // userId - "{$example}", // secret + "<USER_ID>", // userId + "<SECRET>", // secret new CoroutineCallback<>((result, error) -> { if (error != null) { error.printStackTrace(); diff --git a/docs/examples/java/account/create-verification.md b/docs/examples/java/account/create-verification.md index 9bc4e96..4479cc6 100644 --- a/docs/examples/java/account/create-verification.md +++ b/docs/examples/java/account/create-verification.md @@ -10,7 +10,7 @@ Client client = new Client() Account account = new Account(client); account.createVerification( - "{$example}", // url + "https://example.com", // url new CoroutineCallback<>((result, error) -> { if (error != null) { error.printStackTrace(); diff --git a/docs/examples/java/account/create.md b/docs/examples/java/account/create.md index f59cfc3..3bcfe1d 100644 --- a/docs/examples/java/account/create.md +++ b/docs/examples/java/account/create.md @@ -9,10 +9,10 @@ Client client = new Client() Account account = new Account(client); account.create( - "{$example}", // userId - "{$example}", // email + "<USER_ID>", // userId + "email@example.com", // email "", // password - "{$example}", // name (optional) + "<NAME>", // name (optional) new CoroutineCallback<>((result, error) -> { if (error != null) { error.printStackTrace(); diff --git a/docs/examples/java/account/delete-identity.md b/docs/examples/java/account/delete-identity.md index 3e07f12..5eec242 100644 --- a/docs/examples/java/account/delete-identity.md +++ b/docs/examples/java/account/delete-identity.md @@ -10,7 +10,7 @@ Client client = new Client() Account account = new Account(client); account.deleteIdentity( - "{$example}", // identityId + "<IDENTITY_ID>", // identityId new CoroutineCallback<>((result, error) -> { if (error != null) { error.printStackTrace(); diff --git a/docs/examples/java/account/delete-session.md b/docs/examples/java/account/delete-session.md index 70f3f7e..687df81 100644 --- a/docs/examples/java/account/delete-session.md +++ b/docs/examples/java/account/delete-session.md @@ -10,7 +10,7 @@ Client client = new Client() Account account = new Account(client); account.deleteSession( - "{$example}", // sessionId + "<SESSION_ID>", // sessionId new CoroutineCallback<>((result, error) -> { if (error != null) { error.printStackTrace(); diff --git a/docs/examples/java/account/get-session.md b/docs/examples/java/account/get-session.md index 75fd7e8..6d07a85 100644 --- a/docs/examples/java/account/get-session.md +++ b/docs/examples/java/account/get-session.md @@ -10,7 +10,7 @@ Client client = new Client() Account account = new Account(client); account.getSession( - "{$example}", // sessionId + "<SESSION_ID>", // sessionId new CoroutineCallback<>((result, error) -> { if (error != null) { error.printStackTrace(); diff --git a/docs/examples/java/account/update-email.md b/docs/examples/java/account/update-email.md index f488c35..391e531 100644 --- a/docs/examples/java/account/update-email.md +++ b/docs/examples/java/account/update-email.md @@ -10,8 +10,8 @@ Client client = new Client() Account account = new Account(client); account.updateEmail( - "{$example}", // email - "{$example}", // password + "email@example.com", // email + "password", // password new CoroutineCallback<>((result, error) -> { if (error != null) { error.printStackTrace(); diff --git a/docs/examples/java/account/update-magic-u-r-l-session.md b/docs/examples/java/account/update-magic-u-r-l-session.md index 4a7eda5..62fe856 100644 --- a/docs/examples/java/account/update-magic-u-r-l-session.md +++ b/docs/examples/java/account/update-magic-u-r-l-session.md @@ -9,8 +9,8 @@ Client client = new Client() Account account = new Account(client); account.updateMagicURLSession( - "{$example}", // userId - "{$example}", // secret + "<USER_ID>", // userId + "<SECRET>", // secret new CoroutineCallback<>((result, error) -> { if (error != null) { error.printStackTrace(); diff --git a/docs/examples/java/account/update-mfa-authenticator.md b/docs/examples/java/account/update-mfa-authenticator.md index b9fea57..b492d8c 100644 --- a/docs/examples/java/account/update-mfa-authenticator.md +++ b/docs/examples/java/account/update-mfa-authenticator.md @@ -12,7 +12,7 @@ Account account = new Account(client); account.updateMfaAuthenticator( AuthenticatorType.TOTP, // type - "{$example}", // otp + "<OTP>", // otp new CoroutineCallback<>((result, error) -> { if (error != null) { error.printStackTrace(); diff --git a/docs/examples/java/account/update-mfa-challenge.md b/docs/examples/java/account/update-mfa-challenge.md index e3450df..74ca481 100644 --- a/docs/examples/java/account/update-mfa-challenge.md +++ b/docs/examples/java/account/update-mfa-challenge.md @@ -10,8 +10,8 @@ Client client = new Client() Account account = new Account(client); account.updateMfaChallenge( - "{$example}", // challengeId - "{$example}", // otp + "<CHALLENGE_ID>", // challengeId + "<OTP>", // otp new CoroutineCallback<>((result, error) -> { if (error != null) { error.printStackTrace(); diff --git a/docs/examples/java/account/update-name.md b/docs/examples/java/account/update-name.md index 8c8f840..1ce2abf 100644 --- a/docs/examples/java/account/update-name.md +++ b/docs/examples/java/account/update-name.md @@ -10,7 +10,7 @@ Client client = new Client() Account account = new Account(client); account.updateName( - "{$example}", // name + "<NAME>", // name new CoroutineCallback<>((result, error) -> { if (error != null) { error.printStackTrace(); diff --git a/docs/examples/java/account/update-password.md b/docs/examples/java/account/update-password.md index 276197a..437e825 100644 --- a/docs/examples/java/account/update-password.md +++ b/docs/examples/java/account/update-password.md @@ -11,7 +11,7 @@ Account account = new Account(client); account.updatePassword( "", // password - "{$example}", // oldPassword (optional) + "password", // oldPassword (optional) new CoroutineCallback<>((result, error) -> { if (error != null) { error.printStackTrace(); diff --git a/docs/examples/java/account/update-phone-session.md b/docs/examples/java/account/update-phone-session.md index d3e25d4..c401de4 100644 --- a/docs/examples/java/account/update-phone-session.md +++ b/docs/examples/java/account/update-phone-session.md @@ -9,8 +9,8 @@ Client client = new Client() Account account = new Account(client); account.updatePhoneSession( - "{$example}", // userId - "{$example}", // secret + "<USER_ID>", // userId + "<SECRET>", // secret new CoroutineCallback<>((result, error) -> { if (error != null) { error.printStackTrace(); diff --git a/docs/examples/java/account/update-phone-verification.md b/docs/examples/java/account/update-phone-verification.md index 1153d5b..ddf786a 100644 --- a/docs/examples/java/account/update-phone-verification.md +++ b/docs/examples/java/account/update-phone-verification.md @@ -10,8 +10,8 @@ Client client = new Client() Account account = new Account(client); account.updatePhoneVerification( - "{$example}", // userId - "{$example}", // secret + "<USER_ID>", // userId + "<SECRET>", // secret new CoroutineCallback<>((result, error) -> { if (error != null) { error.printStackTrace(); diff --git a/docs/examples/java/account/update-phone.md b/docs/examples/java/account/update-phone.md index 4c09029..6a47fd1 100644 --- a/docs/examples/java/account/update-phone.md +++ b/docs/examples/java/account/update-phone.md @@ -10,8 +10,8 @@ Client client = new Client() Account account = new Account(client); account.updatePhone( - "{$example}", // phone - "{$example}", // password + "+12065550100", // phone + "password", // password new CoroutineCallback<>((result, error) -> { if (error != null) { error.printStackTrace(); diff --git a/docs/examples/java/account/update-recovery.md b/docs/examples/java/account/update-recovery.md index bb4e215..be4301c 100644 --- a/docs/examples/java/account/update-recovery.md +++ b/docs/examples/java/account/update-recovery.md @@ -10,8 +10,8 @@ Client client = new Client() Account account = new Account(client); account.updateRecovery( - "{$example}", // userId - "{$example}", // secret + "<USER_ID>", // userId + "<SECRET>", // secret "", // password new CoroutineCallback<>((result, error) -> { if (error != null) { diff --git a/docs/examples/java/account/update-session.md b/docs/examples/java/account/update-session.md index 57c3959..96e3506 100644 --- a/docs/examples/java/account/update-session.md +++ b/docs/examples/java/account/update-session.md @@ -10,7 +10,7 @@ Client client = new Client() Account account = new Account(client); account.updateSession( - "{$example}", // sessionId + "<SESSION_ID>", // sessionId new CoroutineCallback<>((result, error) -> { if (error != null) { error.printStackTrace(); diff --git a/docs/examples/java/account/update-verification.md b/docs/examples/java/account/update-verification.md index 4f2622a..ed8a40b 100644 --- a/docs/examples/java/account/update-verification.md +++ b/docs/examples/java/account/update-verification.md @@ -10,8 +10,8 @@ Client client = new Client() Account account = new Account(client); account.updateVerification( - "{$example}", // userId - "{$example}", // secret + "<USER_ID>", // userId + "<SECRET>", // secret new CoroutineCallback<>((result, error) -> { if (error != null) { error.printStackTrace(); diff --git a/docs/examples/java/avatars/get-favicon.md b/docs/examples/java/avatars/get-favicon.md index 7c24d5e..9f51941 100644 --- a/docs/examples/java/avatars/get-favicon.md +++ b/docs/examples/java/avatars/get-favicon.md @@ -10,7 +10,7 @@ Client client = new Client() Avatars avatars = new Avatars(client); avatars.getFavicon( - "{$example}", // url + "https://example.com", // url new CoroutineCallback<>((result, error) -> { if (error != null) { error.printStackTrace(); diff --git a/docs/examples/java/avatars/get-image.md b/docs/examples/java/avatars/get-image.md index 1a93164..af5f217 100644 --- a/docs/examples/java/avatars/get-image.md +++ b/docs/examples/java/avatars/get-image.md @@ -10,7 +10,7 @@ Client client = new Client() Avatars avatars = new Avatars(client); avatars.getImage( - "{$example}", // url + "https://example.com", // url 0, // width (optional) 0, // height (optional) new CoroutineCallback<>((result, error) -> { diff --git a/docs/examples/java/avatars/get-initials.md b/docs/examples/java/avatars/get-initials.md index 7277e39..4b00f73 100644 --- a/docs/examples/java/avatars/get-initials.md +++ b/docs/examples/java/avatars/get-initials.md @@ -10,7 +10,7 @@ Client client = new Client() Avatars avatars = new Avatars(client); avatars.getInitials( - "{$example}", // name (optional) + "<NAME>", // name (optional) 0, // width (optional) 0, // height (optional) "", // background (optional) diff --git a/docs/examples/java/avatars/get-q-r.md b/docs/examples/java/avatars/get-q-r.md index 243e245..903e2b0 100644 --- a/docs/examples/java/avatars/get-q-r.md +++ b/docs/examples/java/avatars/get-q-r.md @@ -10,7 +10,7 @@ Client client = new Client() Avatars avatars = new Avatars(client); avatars.getQR( - "{$example}", // text + "<TEXT>", // text 1, // size (optional) 0, // margin (optional) false, // download (optional) diff --git a/docs/examples/java/databases/create-boolean-attribute.md b/docs/examples/java/databases/create-boolean-attribute.md index 0c6f55d..d959a65 100644 --- a/docs/examples/java/databases/create-boolean-attribute.md +++ b/docs/examples/java/databases/create-boolean-attribute.md @@ -10,8 +10,8 @@ Client client = new Client() Databases databases = new Databases(client); databases.createBooleanAttribute( - "{$example}", // databaseId - "{$example}", // collectionId + "<DATABASE_ID>", // databaseId + "<COLLECTION_ID>", // collectionId "", // key false, // required false, // default (optional) diff --git a/docs/examples/java/databases/create-collection.md b/docs/examples/java/databases/create-collection.md index 229c800..9a17b26 100644 --- a/docs/examples/java/databases/create-collection.md +++ b/docs/examples/java/databases/create-collection.md @@ -10,9 +10,9 @@ Client client = new Client() Databases databases = new Databases(client); databases.createCollection( - "{$example}", // databaseId - "{$example}", // collectionId - "{$example}", // name + "<DATABASE_ID>", // databaseId + "<COLLECTION_ID>", // collectionId + "<NAME>", // name listOf("read("any")"), // permissions (optional) false, // documentSecurity (optional) false, // enabled (optional) diff --git a/docs/examples/java/databases/create-datetime-attribute.md b/docs/examples/java/databases/create-datetime-attribute.md index ecb68a2..b35d489 100644 --- a/docs/examples/java/databases/create-datetime-attribute.md +++ b/docs/examples/java/databases/create-datetime-attribute.md @@ -10,8 +10,8 @@ Client client = new Client() Databases databases = new Databases(client); databases.createDatetimeAttribute( - "{$example}", // databaseId - "{$example}", // collectionId + "<DATABASE_ID>", // databaseId + "<COLLECTION_ID>", // collectionId "", // key false, // required "", // default (optional) diff --git a/docs/examples/java/databases/create-document.md b/docs/examples/java/databases/create-document.md index ebca7a4..e05d1fe 100644 --- a/docs/examples/java/databases/create-document.md +++ b/docs/examples/java/databases/create-document.md @@ -10,9 +10,9 @@ Client client = new Client() Databases databases = new Databases(client); databases.createDocument( - "{$example}", // databaseId - "{$example}", // collectionId - "{$example}", // documentId + "<DATABASE_ID>", // databaseId + "<COLLECTION_ID>", // collectionId + "<DOCUMENT_ID>", // documentId mapOf( "a" to "b" ), // data listOf("read("any")"), // permissions (optional) new CoroutineCallback<>((result, error) -> { diff --git a/docs/examples/java/databases/create-email-attribute.md b/docs/examples/java/databases/create-email-attribute.md index 4a032ca..5a42e97 100644 --- a/docs/examples/java/databases/create-email-attribute.md +++ b/docs/examples/java/databases/create-email-attribute.md @@ -10,11 +10,11 @@ Client client = new Client() Databases databases = new Databases(client); databases.createEmailAttribute( - "{$example}", // databaseId - "{$example}", // collectionId + "<DATABASE_ID>", // databaseId + "<COLLECTION_ID>", // collectionId "", // key false, // required - "{$example}", // default (optional) + "email@example.com", // default (optional) false, // array (optional) new CoroutineCallback<>((result, error) -> { if (error != null) { diff --git a/docs/examples/java/databases/create-enum-attribute.md b/docs/examples/java/databases/create-enum-attribute.md index eb817f3..59cbd46 100644 --- a/docs/examples/java/databases/create-enum-attribute.md +++ b/docs/examples/java/databases/create-enum-attribute.md @@ -10,12 +10,12 @@ Client client = new Client() Databases databases = new Databases(client); databases.createEnumAttribute( - "{$example}", // databaseId - "{$example}", // collectionId + "<DATABASE_ID>", // databaseId + "<COLLECTION_ID>", // collectionId "", // key listOf(), // elements false, // required - "{$example}", // default (optional) + "<DEFAULT>", // default (optional) false, // array (optional) new CoroutineCallback<>((result, error) -> { if (error != null) { diff --git a/docs/examples/java/databases/create-float-attribute.md b/docs/examples/java/databases/create-float-attribute.md index 092b17f..cdbdbb2 100644 --- a/docs/examples/java/databases/create-float-attribute.md +++ b/docs/examples/java/databases/create-float-attribute.md @@ -10,8 +10,8 @@ Client client = new Client() Databases databases = new Databases(client); databases.createFloatAttribute( - "{$example}", // databaseId - "{$example}", // collectionId + "<DATABASE_ID>", // databaseId + "<COLLECTION_ID>", // collectionId "", // key false, // required 0, // min (optional) diff --git a/docs/examples/java/databases/create-index.md b/docs/examples/java/databases/create-index.md index 56f2303..a3f09d4 100644 --- a/docs/examples/java/databases/create-index.md +++ b/docs/examples/java/databases/create-index.md @@ -11,8 +11,8 @@ Client client = new Client() Databases databases = new Databases(client); databases.createIndex( - "{$example}", // databaseId - "{$example}", // collectionId + "<DATABASE_ID>", // databaseId + "<COLLECTION_ID>", // collectionId "", // key IndexType.KEY, // type listOf(), // attributes diff --git a/docs/examples/java/databases/create-integer-attribute.md b/docs/examples/java/databases/create-integer-attribute.md index 0acd2ae..37e7f37 100644 --- a/docs/examples/java/databases/create-integer-attribute.md +++ b/docs/examples/java/databases/create-integer-attribute.md @@ -10,8 +10,8 @@ Client client = new Client() Databases databases = new Databases(client); databases.createIntegerAttribute( - "{$example}", // databaseId - "{$example}", // collectionId + "<DATABASE_ID>", // databaseId + "<COLLECTION_ID>", // collectionId "", // key false, // required 0, // min (optional) diff --git a/docs/examples/java/databases/create-ip-attribute.md b/docs/examples/java/databases/create-ip-attribute.md index 9630869..bdb0093 100644 --- a/docs/examples/java/databases/create-ip-attribute.md +++ b/docs/examples/java/databases/create-ip-attribute.md @@ -10,8 +10,8 @@ Client client = new Client() Databases databases = new Databases(client); databases.createIpAttribute( - "{$example}", // databaseId - "{$example}", // collectionId + "<DATABASE_ID>", // databaseId + "<COLLECTION_ID>", // collectionId "", // key false, // required "", // default (optional) diff --git a/docs/examples/java/databases/create-relationship-attribute.md b/docs/examples/java/databases/create-relationship-attribute.md index 36af499..f3d0f51 100644 --- a/docs/examples/java/databases/create-relationship-attribute.md +++ b/docs/examples/java/databases/create-relationship-attribute.md @@ -11,9 +11,9 @@ Client client = new Client() Databases databases = new Databases(client); databases.createRelationshipAttribute( - "{$example}", // databaseId - "{$example}", // collectionId - "{$example}", // relatedCollectionId + "<DATABASE_ID>", // databaseId + "<COLLECTION_ID>", // collectionId + "<RELATED_COLLECTION_ID>", // relatedCollectionId RelationshipType.ONETOONE, // type false, // twoWay (optional) "", // key (optional) diff --git a/docs/examples/java/databases/create-string-attribute.md b/docs/examples/java/databases/create-string-attribute.md index c4ebac3..7d9d8d4 100644 --- a/docs/examples/java/databases/create-string-attribute.md +++ b/docs/examples/java/databases/create-string-attribute.md @@ -10,12 +10,12 @@ Client client = new Client() Databases databases = new Databases(client); databases.createStringAttribute( - "{$example}", // databaseId - "{$example}", // collectionId + "<DATABASE_ID>", // databaseId + "<COLLECTION_ID>", // collectionId "", // key 1, // size false, // required - "{$example}", // default (optional) + "<DEFAULT>", // default (optional) false, // array (optional) false, // encrypt (optional) new CoroutineCallback<>((result, error) -> { diff --git a/docs/examples/java/databases/create-url-attribute.md b/docs/examples/java/databases/create-url-attribute.md index 5abebbd..57ed89d 100644 --- a/docs/examples/java/databases/create-url-attribute.md +++ b/docs/examples/java/databases/create-url-attribute.md @@ -10,11 +10,11 @@ Client client = new Client() Databases databases = new Databases(client); databases.createUrlAttribute( - "{$example}", // databaseId - "{$example}", // collectionId + "<DATABASE_ID>", // databaseId + "<COLLECTION_ID>", // collectionId "", // key false, // required - "{$example}", // default (optional) + "https://example.com", // default (optional) false, // array (optional) new CoroutineCallback<>((result, error) -> { if (error != null) { diff --git a/docs/examples/java/databases/create.md b/docs/examples/java/databases/create.md index 315f3c5..5b66510 100644 --- a/docs/examples/java/databases/create.md +++ b/docs/examples/java/databases/create.md @@ -10,8 +10,8 @@ Client client = new Client() Databases databases = new Databases(client); databases.create( - "{$example}", // databaseId - "{$example}", // name + "<DATABASE_ID>", // databaseId + "<NAME>", // name false, // enabled (optional) new CoroutineCallback<>((result, error) -> { if (error != null) { diff --git a/docs/examples/java/databases/delete-attribute.md b/docs/examples/java/databases/delete-attribute.md index cd2b500..8f9d2f0 100644 --- a/docs/examples/java/databases/delete-attribute.md +++ b/docs/examples/java/databases/delete-attribute.md @@ -10,8 +10,8 @@ Client client = new Client() Databases databases = new Databases(client); databases.deleteAttribute( - "{$example}", // databaseId - "{$example}", // collectionId + "<DATABASE_ID>", // databaseId + "<COLLECTION_ID>", // collectionId "", // key new CoroutineCallback<>((result, error) -> { if (error != null) { diff --git a/docs/examples/java/databases/delete-collection.md b/docs/examples/java/databases/delete-collection.md index 92cf3b1..334e7ad 100644 --- a/docs/examples/java/databases/delete-collection.md +++ b/docs/examples/java/databases/delete-collection.md @@ -10,8 +10,8 @@ Client client = new Client() Databases databases = new Databases(client); databases.deleteCollection( - "{$example}", // databaseId - "{$example}", // collectionId + "<DATABASE_ID>", // databaseId + "<COLLECTION_ID>", // collectionId new CoroutineCallback<>((result, error) -> { if (error != null) { error.printStackTrace(); diff --git a/docs/examples/java/databases/delete-document.md b/docs/examples/java/databases/delete-document.md index 0f8f0c0..a42b3f1 100644 --- a/docs/examples/java/databases/delete-document.md +++ b/docs/examples/java/databases/delete-document.md @@ -10,9 +10,9 @@ Client client = new Client() Databases databases = new Databases(client); databases.deleteDocument( - "{$example}", // databaseId - "{$example}", // collectionId - "{$example}", // documentId + "<DATABASE_ID>", // databaseId + "<COLLECTION_ID>", // collectionId + "<DOCUMENT_ID>", // documentId new CoroutineCallback<>((result, error) -> { if (error != null) { error.printStackTrace(); diff --git a/docs/examples/java/databases/delete-index.md b/docs/examples/java/databases/delete-index.md index d6f67f0..725045e 100644 --- a/docs/examples/java/databases/delete-index.md +++ b/docs/examples/java/databases/delete-index.md @@ -10,8 +10,8 @@ Client client = new Client() Databases databases = new Databases(client); databases.deleteIndex( - "{$example}", // databaseId - "{$example}", // collectionId + "<DATABASE_ID>", // databaseId + "<COLLECTION_ID>", // collectionId "", // key new CoroutineCallback<>((result, error) -> { if (error != null) { diff --git a/docs/examples/java/databases/delete.md b/docs/examples/java/databases/delete.md index 2cbcebf..41fb72b 100644 --- a/docs/examples/java/databases/delete.md +++ b/docs/examples/java/databases/delete.md @@ -10,7 +10,7 @@ Client client = new Client() Databases databases = new Databases(client); databases.delete( - "{$example}", // databaseId + "<DATABASE_ID>", // databaseId new CoroutineCallback<>((result, error) -> { if (error != null) { error.printStackTrace(); diff --git a/docs/examples/java/databases/get-attribute.md b/docs/examples/java/databases/get-attribute.md index c91cca8..1b29312 100644 --- a/docs/examples/java/databases/get-attribute.md +++ b/docs/examples/java/databases/get-attribute.md @@ -10,8 +10,8 @@ Client client = new Client() Databases databases = new Databases(client); databases.getAttribute( - "{$example}", // databaseId - "{$example}", // collectionId + "<DATABASE_ID>", // databaseId + "<COLLECTION_ID>", // collectionId "", // key new CoroutineCallback<>((result, error) -> { if (error != null) { diff --git a/docs/examples/java/databases/get-collection.md b/docs/examples/java/databases/get-collection.md index bb52d3e..41bbb23 100644 --- a/docs/examples/java/databases/get-collection.md +++ b/docs/examples/java/databases/get-collection.md @@ -10,8 +10,8 @@ Client client = new Client() Databases databases = new Databases(client); databases.getCollection( - "{$example}", // databaseId - "{$example}", // collectionId + "<DATABASE_ID>", // databaseId + "<COLLECTION_ID>", // collectionId new CoroutineCallback<>((result, error) -> { if (error != null) { error.printStackTrace(); diff --git a/docs/examples/java/databases/get-document.md b/docs/examples/java/databases/get-document.md index 5b87c93..870642b 100644 --- a/docs/examples/java/databases/get-document.md +++ b/docs/examples/java/databases/get-document.md @@ -10,9 +10,9 @@ Client client = new Client() Databases databases = new Databases(client); databases.getDocument( - "{$example}", // databaseId - "{$example}", // collectionId - "{$example}", // documentId + "<DATABASE_ID>", // databaseId + "<COLLECTION_ID>", // collectionId + "<DOCUMENT_ID>", // documentId listOf(), // queries (optional) new CoroutineCallback<>((result, error) -> { if (error != null) { diff --git a/docs/examples/java/databases/get-index.md b/docs/examples/java/databases/get-index.md index dddec5d..eb33b87 100644 --- a/docs/examples/java/databases/get-index.md +++ b/docs/examples/java/databases/get-index.md @@ -10,8 +10,8 @@ Client client = new Client() Databases databases = new Databases(client); databases.getIndex( - "{$example}", // databaseId - "{$example}", // collectionId + "<DATABASE_ID>", // databaseId + "<COLLECTION_ID>", // collectionId "", // key new CoroutineCallback<>((result, error) -> { if (error != null) { diff --git a/docs/examples/java/databases/get.md b/docs/examples/java/databases/get.md index 056578d..b276da4 100644 --- a/docs/examples/java/databases/get.md +++ b/docs/examples/java/databases/get.md @@ -10,7 +10,7 @@ Client client = new Client() Databases databases = new Databases(client); databases.get( - "{$example}", // databaseId + "<DATABASE_ID>", // databaseId new CoroutineCallback<>((result, error) -> { if (error != null) { error.printStackTrace(); diff --git a/docs/examples/java/databases/list-attributes.md b/docs/examples/java/databases/list-attributes.md index c34b39c..417fe6e 100644 --- a/docs/examples/java/databases/list-attributes.md +++ b/docs/examples/java/databases/list-attributes.md @@ -10,8 +10,8 @@ Client client = new Client() Databases databases = new Databases(client); databases.listAttributes( - "{$example}", // databaseId - "{$example}", // collectionId + "<DATABASE_ID>", // databaseId + "<COLLECTION_ID>", // collectionId listOf(), // queries (optional) new CoroutineCallback<>((result, error) -> { if (error != null) { diff --git a/docs/examples/java/databases/list-collections.md b/docs/examples/java/databases/list-collections.md index b512141..e12e158 100644 --- a/docs/examples/java/databases/list-collections.md +++ b/docs/examples/java/databases/list-collections.md @@ -10,9 +10,9 @@ Client client = new Client() Databases databases = new Databases(client); databases.listCollections( - "{$example}", // databaseId + "<DATABASE_ID>", // databaseId listOf(), // queries (optional) - "{$example}", // search (optional) + "<SEARCH>", // search (optional) new CoroutineCallback<>((result, error) -> { if (error != null) { error.printStackTrace(); diff --git a/docs/examples/java/databases/list-documents.md b/docs/examples/java/databases/list-documents.md index f7ae7a7..4fab62a 100644 --- a/docs/examples/java/databases/list-documents.md +++ b/docs/examples/java/databases/list-documents.md @@ -10,8 +10,8 @@ Client client = new Client() Databases databases = new Databases(client); databases.listDocuments( - "{$example}", // databaseId - "{$example}", // collectionId + "<DATABASE_ID>", // databaseId + "<COLLECTION_ID>", // collectionId listOf(), // queries (optional) new CoroutineCallback<>((result, error) -> { if (error != null) { diff --git a/docs/examples/java/databases/list-indexes.md b/docs/examples/java/databases/list-indexes.md index 76671b6..c266265 100644 --- a/docs/examples/java/databases/list-indexes.md +++ b/docs/examples/java/databases/list-indexes.md @@ -10,8 +10,8 @@ Client client = new Client() Databases databases = new Databases(client); databases.listIndexes( - "{$example}", // databaseId - "{$example}", // collectionId + "<DATABASE_ID>", // databaseId + "<COLLECTION_ID>", // collectionId listOf(), // queries (optional) new CoroutineCallback<>((result, error) -> { if (error != null) { diff --git a/docs/examples/java/databases/list.md b/docs/examples/java/databases/list.md index 46eaa39..d014a70 100644 --- a/docs/examples/java/databases/list.md +++ b/docs/examples/java/databases/list.md @@ -11,7 +11,7 @@ Databases databases = new Databases(client); databases.list( listOf(), // queries (optional) - "{$example}", // search (optional) + "<SEARCH>", // search (optional) new CoroutineCallback<>((result, error) -> { if (error != null) { error.printStackTrace(); diff --git a/docs/examples/java/databases/update-boolean-attribute.md b/docs/examples/java/databases/update-boolean-attribute.md index f1075ef..01a8ba1 100644 --- a/docs/examples/java/databases/update-boolean-attribute.md +++ b/docs/examples/java/databases/update-boolean-attribute.md @@ -10,8 +10,8 @@ Client client = new Client() Databases databases = new Databases(client); databases.updateBooleanAttribute( - "{$example}", // databaseId - "{$example}", // collectionId + "<DATABASE_ID>", // databaseId + "<COLLECTION_ID>", // collectionId "", // key false, // required false, // default diff --git a/docs/examples/java/databases/update-collection.md b/docs/examples/java/databases/update-collection.md index e54b6f4..533d7a7 100644 --- a/docs/examples/java/databases/update-collection.md +++ b/docs/examples/java/databases/update-collection.md @@ -10,9 +10,9 @@ Client client = new Client() Databases databases = new Databases(client); databases.updateCollection( - "{$example}", // databaseId - "{$example}", // collectionId - "{$example}", // name + "<DATABASE_ID>", // databaseId + "<COLLECTION_ID>", // collectionId + "<NAME>", // name listOf("read("any")"), // permissions (optional) false, // documentSecurity (optional) false, // enabled (optional) diff --git a/docs/examples/java/databases/update-datetime-attribute.md b/docs/examples/java/databases/update-datetime-attribute.md index 1746313..00b3568 100644 --- a/docs/examples/java/databases/update-datetime-attribute.md +++ b/docs/examples/java/databases/update-datetime-attribute.md @@ -10,8 +10,8 @@ Client client = new Client() Databases databases = new Databases(client); databases.updateDatetimeAttribute( - "{$example}", // databaseId - "{$example}", // collectionId + "<DATABASE_ID>", // databaseId + "<COLLECTION_ID>", // collectionId "", // key false, // required "", // default diff --git a/docs/examples/java/databases/update-document.md b/docs/examples/java/databases/update-document.md index 4ec5d61..43c9600 100644 --- a/docs/examples/java/databases/update-document.md +++ b/docs/examples/java/databases/update-document.md @@ -10,9 +10,9 @@ Client client = new Client() Databases databases = new Databases(client); databases.updateDocument( - "{$example}", // databaseId - "{$example}", // collectionId - "{$example}", // documentId + "<DATABASE_ID>", // databaseId + "<COLLECTION_ID>", // collectionId + "<DOCUMENT_ID>", // documentId mapOf( "a" to "b" ), // data (optional) listOf("read("any")"), // permissions (optional) new CoroutineCallback<>((result, error) -> { diff --git a/docs/examples/java/databases/update-email-attribute.md b/docs/examples/java/databases/update-email-attribute.md index 9798d5f..b931370 100644 --- a/docs/examples/java/databases/update-email-attribute.md +++ b/docs/examples/java/databases/update-email-attribute.md @@ -10,11 +10,11 @@ Client client = new Client() Databases databases = new Databases(client); databases.updateEmailAttribute( - "{$example}", // databaseId - "{$example}", // collectionId + "<DATABASE_ID>", // databaseId + "<COLLECTION_ID>", // collectionId "", // key false, // required - "{$example}", // default + "email@example.com", // default "", // newKey (optional) new CoroutineCallback<>((result, error) -> { if (error != null) { diff --git a/docs/examples/java/databases/update-enum-attribute.md b/docs/examples/java/databases/update-enum-attribute.md index 29b44a1..febf784 100644 --- a/docs/examples/java/databases/update-enum-attribute.md +++ b/docs/examples/java/databases/update-enum-attribute.md @@ -10,12 +10,12 @@ Client client = new Client() Databases databases = new Databases(client); databases.updateEnumAttribute( - "{$example}", // databaseId - "{$example}", // collectionId + "<DATABASE_ID>", // databaseId + "<COLLECTION_ID>", // collectionId "", // key listOf(), // elements false, // required - "{$example}", // default + "<DEFAULT>", // default "", // newKey (optional) new CoroutineCallback<>((result, error) -> { if (error != null) { diff --git a/docs/examples/java/databases/update-float-attribute.md b/docs/examples/java/databases/update-float-attribute.md index ae9800b..071bd48 100644 --- a/docs/examples/java/databases/update-float-attribute.md +++ b/docs/examples/java/databases/update-float-attribute.md @@ -10,8 +10,8 @@ Client client = new Client() Databases databases = new Databases(client); databases.updateFloatAttribute( - "{$example}", // databaseId - "{$example}", // collectionId + "<DATABASE_ID>", // databaseId + "<COLLECTION_ID>", // collectionId "", // key false, // required 0, // min diff --git a/docs/examples/java/databases/update-integer-attribute.md b/docs/examples/java/databases/update-integer-attribute.md index 5b8cf85..b6c1e44 100644 --- a/docs/examples/java/databases/update-integer-attribute.md +++ b/docs/examples/java/databases/update-integer-attribute.md @@ -10,8 +10,8 @@ Client client = new Client() Databases databases = new Databases(client); databases.updateIntegerAttribute( - "{$example}", // databaseId - "{$example}", // collectionId + "<DATABASE_ID>", // databaseId + "<COLLECTION_ID>", // collectionId "", // key false, // required 0, // min diff --git a/docs/examples/java/databases/update-ip-attribute.md b/docs/examples/java/databases/update-ip-attribute.md index 412d5e7..72b85cf 100644 --- a/docs/examples/java/databases/update-ip-attribute.md +++ b/docs/examples/java/databases/update-ip-attribute.md @@ -10,8 +10,8 @@ Client client = new Client() Databases databases = new Databases(client); databases.updateIpAttribute( - "{$example}", // databaseId - "{$example}", // collectionId + "<DATABASE_ID>", // databaseId + "<COLLECTION_ID>", // collectionId "", // key false, // required "", // default diff --git a/docs/examples/java/databases/update-relationship-attribute.md b/docs/examples/java/databases/update-relationship-attribute.md index ab5cc05..73e2121 100644 --- a/docs/examples/java/databases/update-relationship-attribute.md +++ b/docs/examples/java/databases/update-relationship-attribute.md @@ -10,8 +10,8 @@ Client client = new Client() Databases databases = new Databases(client); databases.updateRelationshipAttribute( - "{$example}", // databaseId - "{$example}", // collectionId + "<DATABASE_ID>", // databaseId + "<COLLECTION_ID>", // collectionId "", // key RelationMutate.CASCADE, // onDelete (optional) "", // newKey (optional) diff --git a/docs/examples/java/databases/update-string-attribute.md b/docs/examples/java/databases/update-string-attribute.md index fa02a2b..2d69006 100644 --- a/docs/examples/java/databases/update-string-attribute.md +++ b/docs/examples/java/databases/update-string-attribute.md @@ -10,12 +10,12 @@ Client client = new Client() Databases databases = new Databases(client); databases.updateStringAttribute( - "{$example}", // databaseId - "{$example}", // collectionId + "<DATABASE_ID>", // databaseId + "<COLLECTION_ID>", // collectionId "", // key false, // required - "{$example}", // default - 0, // size (optional) + "<DEFAULT>", // default + 1, // size (optional) "", // newKey (optional) new CoroutineCallback<>((result, error) -> { if (error != null) { diff --git a/docs/examples/java/databases/update-url-attribute.md b/docs/examples/java/databases/update-url-attribute.md index 236c146..dcfbf30 100644 --- a/docs/examples/java/databases/update-url-attribute.md +++ b/docs/examples/java/databases/update-url-attribute.md @@ -10,11 +10,11 @@ Client client = new Client() Databases databases = new Databases(client); databases.updateUrlAttribute( - "{$example}", // databaseId - "{$example}", // collectionId + "<DATABASE_ID>", // databaseId + "<COLLECTION_ID>", // collectionId "", // key false, // required - "{$example}", // default + "https://example.com", // default "", // newKey (optional) new CoroutineCallback<>((result, error) -> { if (error != null) { diff --git a/docs/examples/java/databases/update.md b/docs/examples/java/databases/update.md index 960df6e..f1e6dd3 100644 --- a/docs/examples/java/databases/update.md +++ b/docs/examples/java/databases/update.md @@ -10,8 +10,8 @@ Client client = new Client() Databases databases = new Databases(client); databases.update( - "{$example}", // databaseId - "{$example}", // name + "<DATABASE_ID>", // databaseId + "<NAME>", // name false, // enabled (optional) new CoroutineCallback<>((result, error) -> { if (error != null) { diff --git a/docs/examples/java/functions/create-build.md b/docs/examples/java/functions/create-build.md index e4babf3..ad55df1 100644 --- a/docs/examples/java/functions/create-build.md +++ b/docs/examples/java/functions/create-build.md @@ -10,9 +10,9 @@ Client client = new Client() Functions functions = new Functions(client); functions.createBuild( - "{$example}", // functionId - "{$example}", // deploymentId - "{$example}", // buildId (optional) + "<FUNCTION_ID>", // functionId + "<DEPLOYMENT_ID>", // deploymentId + "<BUILD_ID>", // buildId (optional) new CoroutineCallback<>((result, error) -> { if (error != null) { error.printStackTrace(); diff --git a/docs/examples/java/functions/create-deployment.md b/docs/examples/java/functions/create-deployment.md index 0508964..920998e 100644 --- a/docs/examples/java/functions/create-deployment.md +++ b/docs/examples/java/functions/create-deployment.md @@ -1,6 +1,6 @@ import io.appwrite.Client; import io.appwrite.coroutines.CoroutineCallback; -import io.appwrite.models.Payload; +import io.appwrite.models.InputFile; import io.appwrite.services.Functions; Client client = new Client() @@ -11,11 +11,11 @@ Client client = new Client() Functions functions = new Functions(client); functions.createDeployment( - "{$example}", // functionId - Payload.fromFile("/path/to/file.png"), // code + "<FUNCTION_ID>", // functionId + InputFile.fromPath("file.png"), // code false, // activate - "{$example}", // entrypoint (optional) - "{$example}", // commands (optional) + "<ENTRYPOINT>", // entrypoint (optional) + "<COMMANDS>", // commands (optional) new CoroutineCallback<>((result, error) -> { if (error != null) { error.printStackTrace(); diff --git a/docs/examples/java/functions/create-execution.md b/docs/examples/java/functions/create-execution.md index 97274ce..62c0634 100644 --- a/docs/examples/java/functions/create-execution.md +++ b/docs/examples/java/functions/create-execution.md @@ -10,10 +10,10 @@ Client client = new Client() Functions functions = new Functions(client); functions.createExecution( - "{$example}", // functionId - Payload.fromJson(mapOf("x" to "y" as Any)), // body (optional) + "<FUNCTION_ID>", // functionId + "<BODY>", // body (optional) false, // async (optional) - "{$example}", // path (optional) + "<PATH>", // path (optional) ExecutionMethod.GET, // method (optional) mapOf( "a" to "b" ), // headers (optional) "", // scheduledAt (optional) diff --git a/docs/examples/java/functions/create-variable.md b/docs/examples/java/functions/create-variable.md index cdd4c1a..a1d6c7b 100644 --- a/docs/examples/java/functions/create-variable.md +++ b/docs/examples/java/functions/create-variable.md @@ -10,9 +10,9 @@ Client client = new Client() Functions functions = new Functions(client); functions.createVariable( - "{$example}", // functionId - "{$example}", // key - "{$example}", // value + "<FUNCTION_ID>", // functionId + "<KEY>", // key + "<VALUE>", // value new CoroutineCallback<>((result, error) -> { if (error != null) { error.printStackTrace(); diff --git a/docs/examples/java/functions/create.md b/docs/examples/java/functions/create.md index aef0858..db0cc56 100644 --- a/docs/examples/java/functions/create.md +++ b/docs/examples/java/functions/create.md @@ -11,8 +11,8 @@ Client client = new Client() Functions functions = new Functions(client); functions.create( - "{$example}", // functionId - "{$example}", // name + "<FUNCTION_ID>", // functionId + "<NAME>", // name .NODE_14_5, // runtime listOf("any"), // execute (optional) listOf(), // events (optional) @@ -20,18 +20,18 @@ functions.create( 1, // timeout (optional) false, // enabled (optional) false, // logging (optional) - "{$example}", // entrypoint (optional) - "{$example}", // commands (optional) + "<ENTRYPOINT>", // entrypoint (optional) + "<COMMANDS>", // commands (optional) listOf(), // scopes (optional) - "{$example}", // installationId (optional) - "{$example}", // providerRepositoryId (optional) - "{$example}", // providerBranch (optional) + "<INSTALLATION_ID>", // installationId (optional) + "<PROVIDER_REPOSITORY_ID>", // providerRepositoryId (optional) + "<PROVIDER_BRANCH>", // providerBranch (optional) false, // providerSilentMode (optional) - "{$example}", // providerRootDirectory (optional) - "{$example}", // templateRepository (optional) - "{$example}", // templateOwner (optional) - "{$example}", // templateRootDirectory (optional) - "{$example}", // templateVersion (optional) + "<PROVIDER_ROOT_DIRECTORY>", // providerRootDirectory (optional) + "<TEMPLATE_REPOSITORY>", // templateRepository (optional) + "<TEMPLATE_OWNER>", // templateOwner (optional) + "<TEMPLATE_ROOT_DIRECTORY>", // templateRootDirectory (optional) + "<TEMPLATE_VERSION>", // templateVersion (optional) "", // specification (optional) new CoroutineCallback<>((result, error) -> { if (error != null) { diff --git a/docs/examples/java/functions/delete-deployment.md b/docs/examples/java/functions/delete-deployment.md index 9157299..f115bcc 100644 --- a/docs/examples/java/functions/delete-deployment.md +++ b/docs/examples/java/functions/delete-deployment.md @@ -10,8 +10,8 @@ Client client = new Client() Functions functions = new Functions(client); functions.deleteDeployment( - "{$example}", // functionId - "{$example}", // deploymentId + "<FUNCTION_ID>", // functionId + "<DEPLOYMENT_ID>", // deploymentId new CoroutineCallback<>((result, error) -> { if (error != null) { error.printStackTrace(); diff --git a/docs/examples/java/functions/delete-execution.md b/docs/examples/java/functions/delete-execution.md index 4240e03..68c11bd 100644 --- a/docs/examples/java/functions/delete-execution.md +++ b/docs/examples/java/functions/delete-execution.md @@ -10,8 +10,8 @@ Client client = new Client() Functions functions = new Functions(client); functions.deleteExecution( - "{$example}", // functionId - "{$example}", // executionId + "<FUNCTION_ID>", // functionId + "<EXECUTION_ID>", // executionId new CoroutineCallback<>((result, error) -> { if (error != null) { error.printStackTrace(); diff --git a/docs/examples/java/functions/delete-variable.md b/docs/examples/java/functions/delete-variable.md index b0301e6..ca4d4f4 100644 --- a/docs/examples/java/functions/delete-variable.md +++ b/docs/examples/java/functions/delete-variable.md @@ -10,8 +10,8 @@ Client client = new Client() Functions functions = new Functions(client); functions.deleteVariable( - "{$example}", // functionId - "{$example}", // variableId + "<FUNCTION_ID>", // functionId + "<VARIABLE_ID>", // variableId new CoroutineCallback<>((result, error) -> { if (error != null) { error.printStackTrace(); diff --git a/docs/examples/java/functions/delete.md b/docs/examples/java/functions/delete.md index 93af02e..94c7da5 100644 --- a/docs/examples/java/functions/delete.md +++ b/docs/examples/java/functions/delete.md @@ -10,7 +10,7 @@ Client client = new Client() Functions functions = new Functions(client); functions.delete( - "{$example}", // functionId + "<FUNCTION_ID>", // functionId new CoroutineCallback<>((result, error) -> { if (error != null) { error.printStackTrace(); diff --git a/docs/examples/java/functions/get-deployment-download.md b/docs/examples/java/functions/get-deployment-download.md index 0332a1e..719d662 100644 --- a/docs/examples/java/functions/get-deployment-download.md +++ b/docs/examples/java/functions/get-deployment-download.md @@ -10,8 +10,8 @@ Client client = new Client() Functions functions = new Functions(client); functions.getDeploymentDownload( - "{$example}", // functionId - "{$example}", // deploymentId + "<FUNCTION_ID>", // functionId + "<DEPLOYMENT_ID>", // deploymentId new CoroutineCallback<>((result, error) -> { if (error != null) { error.printStackTrace(); diff --git a/docs/examples/java/functions/get-deployment.md b/docs/examples/java/functions/get-deployment.md index f70eb0c..f039bee 100644 --- a/docs/examples/java/functions/get-deployment.md +++ b/docs/examples/java/functions/get-deployment.md @@ -10,8 +10,8 @@ Client client = new Client() Functions functions = new Functions(client); functions.getDeployment( - "{$example}", // functionId - "{$example}", // deploymentId + "<FUNCTION_ID>", // functionId + "<DEPLOYMENT_ID>", // deploymentId new CoroutineCallback<>((result, error) -> { if (error != null) { error.printStackTrace(); diff --git a/docs/examples/java/functions/get-execution.md b/docs/examples/java/functions/get-execution.md index 7c8bcec..253ff54 100644 --- a/docs/examples/java/functions/get-execution.md +++ b/docs/examples/java/functions/get-execution.md @@ -10,8 +10,8 @@ Client client = new Client() Functions functions = new Functions(client); functions.getExecution( - "{$example}", // functionId - "{$example}", // executionId + "<FUNCTION_ID>", // functionId + "<EXECUTION_ID>", // executionId new CoroutineCallback<>((result, error) -> { if (error != null) { error.printStackTrace(); diff --git a/docs/examples/java/functions/get-variable.md b/docs/examples/java/functions/get-variable.md index 508034d..3d01fa4 100644 --- a/docs/examples/java/functions/get-variable.md +++ b/docs/examples/java/functions/get-variable.md @@ -10,8 +10,8 @@ Client client = new Client() Functions functions = new Functions(client); functions.getVariable( - "{$example}", // functionId - "{$example}", // variableId + "<FUNCTION_ID>", // functionId + "<VARIABLE_ID>", // variableId new CoroutineCallback<>((result, error) -> { if (error != null) { error.printStackTrace(); diff --git a/docs/examples/java/functions/get.md b/docs/examples/java/functions/get.md index e854d7f..c22ccca 100644 --- a/docs/examples/java/functions/get.md +++ b/docs/examples/java/functions/get.md @@ -10,7 +10,7 @@ Client client = new Client() Functions functions = new Functions(client); functions.get( - "{$example}", // functionId + "<FUNCTION_ID>", // functionId new CoroutineCallback<>((result, error) -> { if (error != null) { error.printStackTrace(); diff --git a/docs/examples/java/functions/list-deployments.md b/docs/examples/java/functions/list-deployments.md index 62a4f05..9a1f1ef 100644 --- a/docs/examples/java/functions/list-deployments.md +++ b/docs/examples/java/functions/list-deployments.md @@ -10,9 +10,9 @@ Client client = new Client() Functions functions = new Functions(client); functions.listDeployments( - "{$example}", // functionId + "<FUNCTION_ID>", // functionId listOf(), // queries (optional) - "{$example}", // search (optional) + "<SEARCH>", // search (optional) new CoroutineCallback<>((result, error) -> { if (error != null) { error.printStackTrace(); diff --git a/docs/examples/java/functions/list-executions.md b/docs/examples/java/functions/list-executions.md index a67d2ef..f2faa02 100644 --- a/docs/examples/java/functions/list-executions.md +++ b/docs/examples/java/functions/list-executions.md @@ -10,9 +10,9 @@ Client client = new Client() Functions functions = new Functions(client); functions.listExecutions( - "{$example}", // functionId + "<FUNCTION_ID>", // functionId listOf(), // queries (optional) - "{$example}", // search (optional) + "<SEARCH>", // search (optional) new CoroutineCallback<>((result, error) -> { if (error != null) { error.printStackTrace(); diff --git a/docs/examples/java/functions/list-variables.md b/docs/examples/java/functions/list-variables.md index 8c0b845..1e1e0e7 100644 --- a/docs/examples/java/functions/list-variables.md +++ b/docs/examples/java/functions/list-variables.md @@ -10,7 +10,7 @@ Client client = new Client() Functions functions = new Functions(client); functions.listVariables( - "{$example}", // functionId + "<FUNCTION_ID>", // functionId new CoroutineCallback<>((result, error) -> { if (error != null) { error.printStackTrace(); diff --git a/docs/examples/java/functions/list.md b/docs/examples/java/functions/list.md index e37aa87..1c501fd 100644 --- a/docs/examples/java/functions/list.md +++ b/docs/examples/java/functions/list.md @@ -11,7 +11,7 @@ Functions functions = new Functions(client); functions.list( listOf(), // queries (optional) - "{$example}", // search (optional) + "<SEARCH>", // search (optional) new CoroutineCallback<>((result, error) -> { if (error != null) { error.printStackTrace(); diff --git a/docs/examples/java/functions/update-deployment-build.md b/docs/examples/java/functions/update-deployment-build.md index fdb9ae1..62b684f 100644 --- a/docs/examples/java/functions/update-deployment-build.md +++ b/docs/examples/java/functions/update-deployment-build.md @@ -10,8 +10,8 @@ Client client = new Client() Functions functions = new Functions(client); functions.updateDeploymentBuild( - "{$example}", // functionId - "{$example}", // deploymentId + "<FUNCTION_ID>", // functionId + "<DEPLOYMENT_ID>", // deploymentId new CoroutineCallback<>((result, error) -> { if (error != null) { error.printStackTrace(); diff --git a/docs/examples/java/functions/update-deployment.md b/docs/examples/java/functions/update-deployment.md index fc03550..8d28501 100644 --- a/docs/examples/java/functions/update-deployment.md +++ b/docs/examples/java/functions/update-deployment.md @@ -10,8 +10,8 @@ Client client = new Client() Functions functions = new Functions(client); functions.updateDeployment( - "{$example}", // functionId - "{$example}", // deploymentId + "<FUNCTION_ID>", // functionId + "<DEPLOYMENT_ID>", // deploymentId new CoroutineCallback<>((result, error) -> { if (error != null) { error.printStackTrace(); diff --git a/docs/examples/java/functions/update-variable.md b/docs/examples/java/functions/update-variable.md index 1ac49ab..4e0576e 100644 --- a/docs/examples/java/functions/update-variable.md +++ b/docs/examples/java/functions/update-variable.md @@ -10,10 +10,10 @@ Client client = new Client() Functions functions = new Functions(client); functions.updateVariable( - "{$example}", // functionId - "{$example}", // variableId - "{$example}", // key - "{$example}", // value (optional) + "<FUNCTION_ID>", // functionId + "<VARIABLE_ID>", // variableId + "<KEY>", // key + "<VALUE>", // value (optional) new CoroutineCallback<>((result, error) -> { if (error != null) { error.printStackTrace(); diff --git a/docs/examples/java/functions/update.md b/docs/examples/java/functions/update.md index 3afaea6..c63dfb4 100644 --- a/docs/examples/java/functions/update.md +++ b/docs/examples/java/functions/update.md @@ -10,8 +10,8 @@ Client client = new Client() Functions functions = new Functions(client); functions.update( - "{$example}", // functionId - "{$example}", // name + "<FUNCTION_ID>", // functionId + "<NAME>", // name .NODE_14_5, // runtime (optional) listOf("any"), // execute (optional) listOf(), // events (optional) @@ -19,14 +19,14 @@ functions.update( 1, // timeout (optional) false, // enabled (optional) false, // logging (optional) - "{$example}", // entrypoint (optional) - "{$example}", // commands (optional) + "<ENTRYPOINT>", // entrypoint (optional) + "<COMMANDS>", // commands (optional) listOf(), // scopes (optional) - "{$example}", // installationId (optional) - "{$example}", // providerRepositoryId (optional) - "{$example}", // providerBranch (optional) + "<INSTALLATION_ID>", // installationId (optional) + "<PROVIDER_REPOSITORY_ID>", // providerRepositoryId (optional) + "<PROVIDER_BRANCH>", // providerBranch (optional) false, // providerSilentMode (optional) - "{$example}", // providerRootDirectory (optional) + "<PROVIDER_ROOT_DIRECTORY>", // providerRootDirectory (optional) "", // specification (optional) new CoroutineCallback<>((result, error) -> { if (error != null) { diff --git a/docs/examples/java/health/get-queue-databases.md b/docs/examples/java/health/get-queue-databases.md index 21d30aa..7f34b19 100644 --- a/docs/examples/java/health/get-queue-databases.md +++ b/docs/examples/java/health/get-queue-databases.md @@ -10,7 +10,7 @@ Client client = new Client() Health health = new Health(client); health.getQueueDatabases( - "{$example}", // name (optional) + "<NAME>", // name (optional) 0, // threshold (optional) new CoroutineCallback<>((result, error) -> { if (error != null) { diff --git a/docs/examples/java/messaging/create-apns-provider.md b/docs/examples/java/messaging/create-apns-provider.md index ad6a7ef..5dde983 100644 --- a/docs/examples/java/messaging/create-apns-provider.md +++ b/docs/examples/java/messaging/create-apns-provider.md @@ -10,12 +10,12 @@ Client client = new Client() Messaging messaging = new Messaging(client); messaging.createApnsProvider( - "{$example}", // providerId - "{$example}", // name - "{$example}", // authKey (optional) - "{$example}", // authKeyId (optional) - "{$example}", // teamId (optional) - "{$example}", // bundleId (optional) + "<PROVIDER_ID>", // providerId + "<NAME>", // name + "<AUTH_KEY>", // authKey (optional) + "<AUTH_KEY_ID>", // authKeyId (optional) + "<TEAM_ID>", // teamId (optional) + "<BUNDLE_ID>", // bundleId (optional) false, // sandbox (optional) false, // enabled (optional) new CoroutineCallback<>((result, error) -> { diff --git a/docs/examples/java/messaging/create-email.md b/docs/examples/java/messaging/create-email.md index edb5381..753a89b 100644 --- a/docs/examples/java/messaging/create-email.md +++ b/docs/examples/java/messaging/create-email.md @@ -10,9 +10,9 @@ Client client = new Client() Messaging messaging = new Messaging(client); messaging.createEmail( - "{$example}", // messageId - "{$example}", // subject - "{$example}", // content + "<MESSAGE_ID>", // messageId + "<SUBJECT>", // subject + "<CONTENT>", // content listOf(), // topics (optional) listOf(), // users (optional) listOf(), // targets (optional) diff --git a/docs/examples/java/messaging/create-fcm-provider.md b/docs/examples/java/messaging/create-fcm-provider.md index 19ecb62..1078514 100644 --- a/docs/examples/java/messaging/create-fcm-provider.md +++ b/docs/examples/java/messaging/create-fcm-provider.md @@ -10,8 +10,8 @@ Client client = new Client() Messaging messaging = new Messaging(client); messaging.createFcmProvider( - "{$example}", // providerId - "{$example}", // name + "<PROVIDER_ID>", // providerId + "<NAME>", // name mapOf( "a" to "b" ), // serviceAccountJSON (optional) false, // enabled (optional) new CoroutineCallback<>((result, error) -> { diff --git a/docs/examples/java/messaging/create-mailgun-provider.md b/docs/examples/java/messaging/create-mailgun-provider.md index d04bc4a..4b2a7bd 100644 --- a/docs/examples/java/messaging/create-mailgun-provider.md +++ b/docs/examples/java/messaging/create-mailgun-provider.md @@ -10,15 +10,15 @@ Client client = new Client() Messaging messaging = new Messaging(client); messaging.createMailgunProvider( - "{$example}", // providerId - "{$example}", // name - "{$example}", // apiKey (optional) - "{$example}", // domain (optional) + "<PROVIDER_ID>", // providerId + "<NAME>", // name + "<API_KEY>", // apiKey (optional) + "<DOMAIN>", // domain (optional) false, // isEuRegion (optional) - "{$example}", // fromName (optional) - "{$example}", // fromEmail (optional) - "{$example}", // replyToName (optional) - "{$example}", // replyToEmail (optional) + "<FROM_NAME>", // fromName (optional) + "email@example.com", // fromEmail (optional) + "<REPLY_TO_NAME>", // replyToName (optional) + "email@example.com", // replyToEmail (optional) false, // enabled (optional) new CoroutineCallback<>((result, error) -> { if (error != null) { diff --git a/docs/examples/java/messaging/create-msg91provider.md b/docs/examples/java/messaging/create-msg91provider.md index c6e6c4e..6cc120c 100644 --- a/docs/examples/java/messaging/create-msg91provider.md +++ b/docs/examples/java/messaging/create-msg91provider.md @@ -10,11 +10,11 @@ Client client = new Client() Messaging messaging = new Messaging(client); messaging.createMsg91Provider( - "{$example}", // providerId - "{$example}", // name - "{$example}", // templateId (optional) - "{$example}", // senderId (optional) - "{$example}", // authKey (optional) + "<PROVIDER_ID>", // providerId + "<NAME>", // name + "<TEMPLATE_ID>", // templateId (optional) + "<SENDER_ID>", // senderId (optional) + "<AUTH_KEY>", // authKey (optional) false, // enabled (optional) new CoroutineCallback<>((result, error) -> { if (error != null) { diff --git a/docs/examples/java/messaging/create-push.md b/docs/examples/java/messaging/create-push.md index a860a8d..56c7a60 100644 --- a/docs/examples/java/messaging/create-push.md +++ b/docs/examples/java/messaging/create-push.md @@ -10,22 +10,25 @@ Client client = new Client() Messaging messaging = new Messaging(client); messaging.createPush( - "{$example}", // messageId - "{$example}", // title - "{$example}", // body + "<MESSAGE_ID>", // messageId + "<TITLE>", // title (optional) + "<BODY>", // body (optional) listOf(), // topics (optional) listOf(), // users (optional) listOf(), // targets (optional) mapOf( "a" to "b" ), // data (optional) - "{$example}", // action (optional) - "{$example}", // image (optional) - "{$example}", // icon (optional) - "{$example}", // sound (optional) - "{$example}", // color (optional) - "{$example}", // tag (optional) - "{$example}", // badge (optional) + "<ACTION>", // action (optional) + "[ID1:ID2]", // image (optional) + "<ICON>", // icon (optional) + "<SOUND>", // sound (optional) + "<COLOR>", // color (optional) + "<TAG>", // tag (optional) + 0, // badge (optional) false, // draft (optional) "", // scheduledAt (optional) + false, // contentAvailable (optional) + false, // critical (optional) + MessagePriority.NORMAL, // priority (optional) new CoroutineCallback<>((result, error) -> { if (error != null) { error.printStackTrace(); diff --git a/docs/examples/java/messaging/create-sendgrid-provider.md b/docs/examples/java/messaging/create-sendgrid-provider.md index 325da4c..20e1274 100644 --- a/docs/examples/java/messaging/create-sendgrid-provider.md +++ b/docs/examples/java/messaging/create-sendgrid-provider.md @@ -10,13 +10,13 @@ Client client = new Client() Messaging messaging = new Messaging(client); messaging.createSendgridProvider( - "{$example}", // providerId - "{$example}", // name - "{$example}", // apiKey (optional) - "{$example}", // fromName (optional) - "{$example}", // fromEmail (optional) - "{$example}", // replyToName (optional) - "{$example}", // replyToEmail (optional) + "<PROVIDER_ID>", // providerId + "<NAME>", // name + "<API_KEY>", // apiKey (optional) + "<FROM_NAME>", // fromName (optional) + "email@example.com", // fromEmail (optional) + "<REPLY_TO_NAME>", // replyToName (optional) + "email@example.com", // replyToEmail (optional) false, // enabled (optional) new CoroutineCallback<>((result, error) -> { if (error != null) { diff --git a/docs/examples/java/messaging/create-sms.md b/docs/examples/java/messaging/create-sms.md index 17bf81e..60e1749 100644 --- a/docs/examples/java/messaging/create-sms.md +++ b/docs/examples/java/messaging/create-sms.md @@ -10,8 +10,8 @@ Client client = new Client() Messaging messaging = new Messaging(client); messaging.createSms( - "{$example}", // messageId - "{$example}", // content + "<MESSAGE_ID>", // messageId + "<CONTENT>", // content listOf(), // topics (optional) listOf(), // users (optional) listOf(), // targets (optional) diff --git a/docs/examples/java/messaging/create-smtp-provider.md b/docs/examples/java/messaging/create-smtp-provider.md index 8c3671b..3f69f61 100644 --- a/docs/examples/java/messaging/create-smtp-provider.md +++ b/docs/examples/java/messaging/create-smtp-provider.md @@ -10,19 +10,19 @@ Client client = new Client() Messaging messaging = new Messaging(client); messaging.createSmtpProvider( - "{$example}", // providerId - "{$example}", // name - "{$example}", // host + "<PROVIDER_ID>", // providerId + "<NAME>", // name + "<HOST>", // host 1, // port (optional) - "{$example}", // username (optional) - "{$example}", // password (optional) + "<USERNAME>", // username (optional) + "<PASSWORD>", // password (optional) SmtpEncryption.NONE, // encryption (optional) false, // autoTLS (optional) - "{$example}", // mailer (optional) - "{$example}", // fromName (optional) - "{$example}", // fromEmail (optional) - "{$example}", // replyToName (optional) - "{$example}", // replyToEmail (optional) + "<MAILER>", // mailer (optional) + "<FROM_NAME>", // fromName (optional) + "email@example.com", // fromEmail (optional) + "<REPLY_TO_NAME>", // replyToName (optional) + "email@example.com", // replyToEmail (optional) false, // enabled (optional) new CoroutineCallback<>((result, error) -> { if (error != null) { diff --git a/docs/examples/java/messaging/create-subscriber.md b/docs/examples/java/messaging/create-subscriber.md index 4ed2672..77ef2d5 100644 --- a/docs/examples/java/messaging/create-subscriber.md +++ b/docs/examples/java/messaging/create-subscriber.md @@ -10,9 +10,9 @@ Client client = new Client() Messaging messaging = new Messaging(client); messaging.createSubscriber( - "{$example}", // topicId - "{$example}", // subscriberId - "{$example}", // targetId + "<TOPIC_ID>", // topicId + "<SUBSCRIBER_ID>", // subscriberId + "<TARGET_ID>", // targetId new CoroutineCallback<>((result, error) -> { if (error != null) { error.printStackTrace(); diff --git a/docs/examples/java/messaging/create-telesign-provider.md b/docs/examples/java/messaging/create-telesign-provider.md index 3d9430f..f660814 100644 --- a/docs/examples/java/messaging/create-telesign-provider.md +++ b/docs/examples/java/messaging/create-telesign-provider.md @@ -10,11 +10,11 @@ Client client = new Client() Messaging messaging = new Messaging(client); messaging.createTelesignProvider( - "{$example}", // providerId - "{$example}", // name - "{$example}", // from (optional) - "{$example}", // customerId (optional) - "{$example}", // apiKey (optional) + "<PROVIDER_ID>", // providerId + "<NAME>", // name + "+12065550100", // from (optional) + "<CUSTOMER_ID>", // customerId (optional) + "<API_KEY>", // apiKey (optional) false, // enabled (optional) new CoroutineCallback<>((result, error) -> { if (error != null) { diff --git a/docs/examples/java/messaging/create-textmagic-provider.md b/docs/examples/java/messaging/create-textmagic-provider.md index b708e20..cda11d5 100644 --- a/docs/examples/java/messaging/create-textmagic-provider.md +++ b/docs/examples/java/messaging/create-textmagic-provider.md @@ -10,11 +10,11 @@ Client client = new Client() Messaging messaging = new Messaging(client); messaging.createTextmagicProvider( - "{$example}", // providerId - "{$example}", // name - "{$example}", // from (optional) - "{$example}", // username (optional) - "{$example}", // apiKey (optional) + "<PROVIDER_ID>", // providerId + "<NAME>", // name + "+12065550100", // from (optional) + "<USERNAME>", // username (optional) + "<API_KEY>", // apiKey (optional) false, // enabled (optional) new CoroutineCallback<>((result, error) -> { if (error != null) { diff --git a/docs/examples/java/messaging/create-topic.md b/docs/examples/java/messaging/create-topic.md index aa27cca..8fa74d8 100644 --- a/docs/examples/java/messaging/create-topic.md +++ b/docs/examples/java/messaging/create-topic.md @@ -10,8 +10,8 @@ Client client = new Client() Messaging messaging = new Messaging(client); messaging.createTopic( - "{$example}", // topicId - "{$example}", // name + "<TOPIC_ID>", // topicId + "<NAME>", // name listOf("any"), // subscribe (optional) new CoroutineCallback<>((result, error) -> { if (error != null) { diff --git a/docs/examples/java/messaging/create-twilio-provider.md b/docs/examples/java/messaging/create-twilio-provider.md index 4f3e5bd..a122837 100644 --- a/docs/examples/java/messaging/create-twilio-provider.md +++ b/docs/examples/java/messaging/create-twilio-provider.md @@ -10,11 +10,11 @@ Client client = new Client() Messaging messaging = new Messaging(client); messaging.createTwilioProvider( - "{$example}", // providerId - "{$example}", // name - "{$example}", // from (optional) - "{$example}", // accountSid (optional) - "{$example}", // authToken (optional) + "<PROVIDER_ID>", // providerId + "<NAME>", // name + "+12065550100", // from (optional) + "<ACCOUNT_SID>", // accountSid (optional) + "<AUTH_TOKEN>", // authToken (optional) false, // enabled (optional) new CoroutineCallback<>((result, error) -> { if (error != null) { diff --git a/docs/examples/java/messaging/create-vonage-provider.md b/docs/examples/java/messaging/create-vonage-provider.md index 38dd2c1..808ca0c 100644 --- a/docs/examples/java/messaging/create-vonage-provider.md +++ b/docs/examples/java/messaging/create-vonage-provider.md @@ -10,11 +10,11 @@ Client client = new Client() Messaging messaging = new Messaging(client); messaging.createVonageProvider( - "{$example}", // providerId - "{$example}", // name - "{$example}", // from (optional) - "{$example}", // apiKey (optional) - "{$example}", // apiSecret (optional) + "<PROVIDER_ID>", // providerId + "<NAME>", // name + "+12065550100", // from (optional) + "<API_KEY>", // apiKey (optional) + "<API_SECRET>", // apiSecret (optional) false, // enabled (optional) new CoroutineCallback<>((result, error) -> { if (error != null) { diff --git a/docs/examples/java/messaging/delete-provider.md b/docs/examples/java/messaging/delete-provider.md index 9166e20..e1337dc 100644 --- a/docs/examples/java/messaging/delete-provider.md +++ b/docs/examples/java/messaging/delete-provider.md @@ -10,7 +10,7 @@ Client client = new Client() Messaging messaging = new Messaging(client); messaging.deleteProvider( - "{$example}", // providerId + "<PROVIDER_ID>", // providerId new CoroutineCallback<>((result, error) -> { if (error != null) { error.printStackTrace(); diff --git a/docs/examples/java/messaging/delete-subscriber.md b/docs/examples/java/messaging/delete-subscriber.md index 0bbebfb..c80fc72 100644 --- a/docs/examples/java/messaging/delete-subscriber.md +++ b/docs/examples/java/messaging/delete-subscriber.md @@ -10,8 +10,8 @@ Client client = new Client() Messaging messaging = new Messaging(client); messaging.deleteSubscriber( - "{$example}", // topicId - "{$example}", // subscriberId + "<TOPIC_ID>", // topicId + "<SUBSCRIBER_ID>", // subscriberId new CoroutineCallback<>((result, error) -> { if (error != null) { error.printStackTrace(); diff --git a/docs/examples/java/messaging/delete-topic.md b/docs/examples/java/messaging/delete-topic.md index bb2d98b..9c51144 100644 --- a/docs/examples/java/messaging/delete-topic.md +++ b/docs/examples/java/messaging/delete-topic.md @@ -10,7 +10,7 @@ Client client = new Client() Messaging messaging = new Messaging(client); messaging.deleteTopic( - "{$example}", // topicId + "<TOPIC_ID>", // topicId new CoroutineCallback<>((result, error) -> { if (error != null) { error.printStackTrace(); diff --git a/docs/examples/java/messaging/delete.md b/docs/examples/java/messaging/delete.md index e5d62f1..f90336a 100644 --- a/docs/examples/java/messaging/delete.md +++ b/docs/examples/java/messaging/delete.md @@ -10,7 +10,7 @@ Client client = new Client() Messaging messaging = new Messaging(client); messaging.delete( - "{$example}", // messageId + "<MESSAGE_ID>", // messageId new CoroutineCallback<>((result, error) -> { if (error != null) { error.printStackTrace(); diff --git a/docs/examples/java/messaging/get-message.md b/docs/examples/java/messaging/get-message.md index 142c018..5e940cf 100644 --- a/docs/examples/java/messaging/get-message.md +++ b/docs/examples/java/messaging/get-message.md @@ -10,7 +10,7 @@ Client client = new Client() Messaging messaging = new Messaging(client); messaging.getMessage( - "{$example}", // messageId + "<MESSAGE_ID>", // messageId new CoroutineCallback<>((result, error) -> { if (error != null) { error.printStackTrace(); diff --git a/docs/examples/java/messaging/get-provider.md b/docs/examples/java/messaging/get-provider.md index c2338ee..74ece13 100644 --- a/docs/examples/java/messaging/get-provider.md +++ b/docs/examples/java/messaging/get-provider.md @@ -10,7 +10,7 @@ Client client = new Client() Messaging messaging = new Messaging(client); messaging.getProvider( - "{$example}", // providerId + "<PROVIDER_ID>", // providerId new CoroutineCallback<>((result, error) -> { if (error != null) { error.printStackTrace(); diff --git a/docs/examples/java/messaging/get-subscriber.md b/docs/examples/java/messaging/get-subscriber.md index a7eab83..2e6beaa 100644 --- a/docs/examples/java/messaging/get-subscriber.md +++ b/docs/examples/java/messaging/get-subscriber.md @@ -10,8 +10,8 @@ Client client = new Client() Messaging messaging = new Messaging(client); messaging.getSubscriber( - "{$example}", // topicId - "{$example}", // subscriberId + "<TOPIC_ID>", // topicId + "<SUBSCRIBER_ID>", // subscriberId new CoroutineCallback<>((result, error) -> { if (error != null) { error.printStackTrace(); diff --git a/docs/examples/java/messaging/get-topic.md b/docs/examples/java/messaging/get-topic.md index 26fc7ed..adf64bb 100644 --- a/docs/examples/java/messaging/get-topic.md +++ b/docs/examples/java/messaging/get-topic.md @@ -10,7 +10,7 @@ Client client = new Client() Messaging messaging = new Messaging(client); messaging.getTopic( - "{$example}", // topicId + "<TOPIC_ID>", // topicId new CoroutineCallback<>((result, error) -> { if (error != null) { error.printStackTrace(); diff --git a/docs/examples/java/messaging/list-message-logs.md b/docs/examples/java/messaging/list-message-logs.md index 38442cd..70bb49a 100644 --- a/docs/examples/java/messaging/list-message-logs.md +++ b/docs/examples/java/messaging/list-message-logs.md @@ -10,7 +10,7 @@ Client client = new Client() Messaging messaging = new Messaging(client); messaging.listMessageLogs( - "{$example}", // messageId + "<MESSAGE_ID>", // messageId listOf(), // queries (optional) new CoroutineCallback<>((result, error) -> { if (error != null) { diff --git a/docs/examples/java/messaging/list-messages.md b/docs/examples/java/messaging/list-messages.md index 5923f8a..847ce73 100644 --- a/docs/examples/java/messaging/list-messages.md +++ b/docs/examples/java/messaging/list-messages.md @@ -11,7 +11,7 @@ Messaging messaging = new Messaging(client); messaging.listMessages( listOf(), // queries (optional) - "{$example}", // search (optional) + "<SEARCH>", // search (optional) new CoroutineCallback<>((result, error) -> { if (error != null) { error.printStackTrace(); diff --git a/docs/examples/java/messaging/list-provider-logs.md b/docs/examples/java/messaging/list-provider-logs.md index 4bf40c6..be1aba0 100644 --- a/docs/examples/java/messaging/list-provider-logs.md +++ b/docs/examples/java/messaging/list-provider-logs.md @@ -10,7 +10,7 @@ Client client = new Client() Messaging messaging = new Messaging(client); messaging.listProviderLogs( - "{$example}", // providerId + "<PROVIDER_ID>", // providerId listOf(), // queries (optional) new CoroutineCallback<>((result, error) -> { if (error != null) { diff --git a/docs/examples/java/messaging/list-providers.md b/docs/examples/java/messaging/list-providers.md index 5c06469..feda900 100644 --- a/docs/examples/java/messaging/list-providers.md +++ b/docs/examples/java/messaging/list-providers.md @@ -11,7 +11,7 @@ Messaging messaging = new Messaging(client); messaging.listProviders( listOf(), // queries (optional) - "{$example}", // search (optional) + "<SEARCH>", // search (optional) new CoroutineCallback<>((result, error) -> { if (error != null) { error.printStackTrace(); diff --git a/docs/examples/java/messaging/list-subscriber-logs.md b/docs/examples/java/messaging/list-subscriber-logs.md index c6b4996..30250e4 100644 --- a/docs/examples/java/messaging/list-subscriber-logs.md +++ b/docs/examples/java/messaging/list-subscriber-logs.md @@ -10,7 +10,7 @@ Client client = new Client() Messaging messaging = new Messaging(client); messaging.listSubscriberLogs( - "{$example}", // subscriberId + "<SUBSCRIBER_ID>", // subscriberId listOf(), // queries (optional) new CoroutineCallback<>((result, error) -> { if (error != null) { diff --git a/docs/examples/java/messaging/list-subscribers.md b/docs/examples/java/messaging/list-subscribers.md index 0d892e5..d00d492 100644 --- a/docs/examples/java/messaging/list-subscribers.md +++ b/docs/examples/java/messaging/list-subscribers.md @@ -10,9 +10,9 @@ Client client = new Client() Messaging messaging = new Messaging(client); messaging.listSubscribers( - "{$example}", // topicId + "<TOPIC_ID>", // topicId listOf(), // queries (optional) - "{$example}", // search (optional) + "<SEARCH>", // search (optional) new CoroutineCallback<>((result, error) -> { if (error != null) { error.printStackTrace(); diff --git a/docs/examples/java/messaging/list-targets.md b/docs/examples/java/messaging/list-targets.md index a0bff84..f1eeac0 100644 --- a/docs/examples/java/messaging/list-targets.md +++ b/docs/examples/java/messaging/list-targets.md @@ -10,7 +10,7 @@ Client client = new Client() Messaging messaging = new Messaging(client); messaging.listTargets( - "{$example}", // messageId + "<MESSAGE_ID>", // messageId listOf(), // queries (optional) new CoroutineCallback<>((result, error) -> { if (error != null) { diff --git a/docs/examples/java/messaging/list-topic-logs.md b/docs/examples/java/messaging/list-topic-logs.md index 3d9e449..c7edc92 100644 --- a/docs/examples/java/messaging/list-topic-logs.md +++ b/docs/examples/java/messaging/list-topic-logs.md @@ -10,7 +10,7 @@ Client client = new Client() Messaging messaging = new Messaging(client); messaging.listTopicLogs( - "{$example}", // topicId + "<TOPIC_ID>", // topicId listOf(), // queries (optional) new CoroutineCallback<>((result, error) -> { if (error != null) { diff --git a/docs/examples/java/messaging/list-topics.md b/docs/examples/java/messaging/list-topics.md index 7ad8dea..278d0d4 100644 --- a/docs/examples/java/messaging/list-topics.md +++ b/docs/examples/java/messaging/list-topics.md @@ -11,7 +11,7 @@ Messaging messaging = new Messaging(client); messaging.listTopics( listOf(), // queries (optional) - "{$example}", // search (optional) + "<SEARCH>", // search (optional) new CoroutineCallback<>((result, error) -> { if (error != null) { error.printStackTrace(); diff --git a/docs/examples/java/messaging/update-apns-provider.md b/docs/examples/java/messaging/update-apns-provider.md index ee6cf1c..b9ac1a9 100644 --- a/docs/examples/java/messaging/update-apns-provider.md +++ b/docs/examples/java/messaging/update-apns-provider.md @@ -10,13 +10,13 @@ Client client = new Client() Messaging messaging = new Messaging(client); messaging.updateApnsProvider( - "{$example}", // providerId - "{$example}", // name (optional) + "<PROVIDER_ID>", // providerId + "<NAME>", // name (optional) false, // enabled (optional) - "{$example}", // authKey (optional) - "{$example}", // authKeyId (optional) - "{$example}", // teamId (optional) - "{$example}", // bundleId (optional) + "<AUTH_KEY>", // authKey (optional) + "<AUTH_KEY_ID>", // authKeyId (optional) + "<TEAM_ID>", // teamId (optional) + "<BUNDLE_ID>", // bundleId (optional) false, // sandbox (optional) new CoroutineCallback<>((result, error) -> { if (error != null) { diff --git a/docs/examples/java/messaging/update-email.md b/docs/examples/java/messaging/update-email.md index 18a0dc6..a5d9820 100644 --- a/docs/examples/java/messaging/update-email.md +++ b/docs/examples/java/messaging/update-email.md @@ -10,12 +10,12 @@ Client client = new Client() Messaging messaging = new Messaging(client); messaging.updateEmail( - "{$example}", // messageId + "<MESSAGE_ID>", // messageId listOf(), // topics (optional) listOf(), // users (optional) listOf(), // targets (optional) - "{$example}", // subject (optional) - "{$example}", // content (optional) + "<SUBJECT>", // subject (optional) + "<CONTENT>", // content (optional) false, // draft (optional) false, // html (optional) listOf(), // cc (optional) diff --git a/docs/examples/java/messaging/update-fcm-provider.md b/docs/examples/java/messaging/update-fcm-provider.md index b518659..956900d 100644 --- a/docs/examples/java/messaging/update-fcm-provider.md +++ b/docs/examples/java/messaging/update-fcm-provider.md @@ -10,8 +10,8 @@ Client client = new Client() Messaging messaging = new Messaging(client); messaging.updateFcmProvider( - "{$example}", // providerId - "{$example}", // name (optional) + "<PROVIDER_ID>", // providerId + "<NAME>", // name (optional) false, // enabled (optional) mapOf( "a" to "b" ), // serviceAccountJSON (optional) new CoroutineCallback<>((result, error) -> { diff --git a/docs/examples/java/messaging/update-mailgun-provider.md b/docs/examples/java/messaging/update-mailgun-provider.md index 2083e1f..8512de1 100644 --- a/docs/examples/java/messaging/update-mailgun-provider.md +++ b/docs/examples/java/messaging/update-mailgun-provider.md @@ -10,16 +10,16 @@ Client client = new Client() Messaging messaging = new Messaging(client); messaging.updateMailgunProvider( - "{$example}", // providerId - "{$example}", // name (optional) - "{$example}", // apiKey (optional) - "{$example}", // domain (optional) + "<PROVIDER_ID>", // providerId + "<NAME>", // name (optional) + "<API_KEY>", // apiKey (optional) + "<DOMAIN>", // domain (optional) false, // isEuRegion (optional) false, // enabled (optional) - "{$example}", // fromName (optional) - "{$example}", // fromEmail (optional) - "{$example}", // replyToName (optional) - "{$example}", // replyToEmail (optional) + "<FROM_NAME>", // fromName (optional) + "email@example.com", // fromEmail (optional) + "<REPLY_TO_NAME>", // replyToName (optional) + "<REPLY_TO_EMAIL>", // replyToEmail (optional) new CoroutineCallback<>((result, error) -> { if (error != null) { error.printStackTrace(); diff --git a/docs/examples/java/messaging/update-msg91provider.md b/docs/examples/java/messaging/update-msg91provider.md index 5b246c0..74de7d2 100644 --- a/docs/examples/java/messaging/update-msg91provider.md +++ b/docs/examples/java/messaging/update-msg91provider.md @@ -10,12 +10,12 @@ Client client = new Client() Messaging messaging = new Messaging(client); messaging.updateMsg91Provider( - "{$example}", // providerId - "{$example}", // name (optional) + "<PROVIDER_ID>", // providerId + "<NAME>", // name (optional) false, // enabled (optional) - "{$example}", // templateId (optional) - "{$example}", // senderId (optional) - "{$example}", // authKey (optional) + "<TEMPLATE_ID>", // templateId (optional) + "<SENDER_ID>", // senderId (optional) + "<AUTH_KEY>", // authKey (optional) new CoroutineCallback<>((result, error) -> { if (error != null) { error.printStackTrace(); diff --git a/docs/examples/java/messaging/update-push.md b/docs/examples/java/messaging/update-push.md index 003eb53..bb8c3c8 100644 --- a/docs/examples/java/messaging/update-push.md +++ b/docs/examples/java/messaging/update-push.md @@ -10,22 +10,25 @@ Client client = new Client() Messaging messaging = new Messaging(client); messaging.updatePush( - "{$example}", // messageId + "<MESSAGE_ID>", // messageId listOf(), // topics (optional) listOf(), // users (optional) listOf(), // targets (optional) - "{$example}", // title (optional) - "{$example}", // body (optional) + "<TITLE>", // title (optional) + "<BODY>", // body (optional) mapOf( "a" to "b" ), // data (optional) - "{$example}", // action (optional) - "{$example}", // image (optional) - "{$example}", // icon (optional) - "{$example}", // sound (optional) - "{$example}", // color (optional) - "{$example}", // tag (optional) + "<ACTION>", // action (optional) + "[ID1:ID2]", // image (optional) + "<ICON>", // icon (optional) + "<SOUND>", // sound (optional) + "<COLOR>", // color (optional) + "<TAG>", // tag (optional) 0, // badge (optional) false, // draft (optional) "", // scheduledAt (optional) + false, // contentAvailable (optional) + false, // critical (optional) + MessagePriority.NORMAL, // priority (optional) new CoroutineCallback<>((result, error) -> { if (error != null) { error.printStackTrace(); diff --git a/docs/examples/java/messaging/update-sendgrid-provider.md b/docs/examples/java/messaging/update-sendgrid-provider.md index 3c693fd..79c89c0 100644 --- a/docs/examples/java/messaging/update-sendgrid-provider.md +++ b/docs/examples/java/messaging/update-sendgrid-provider.md @@ -10,14 +10,14 @@ Client client = new Client() Messaging messaging = new Messaging(client); messaging.updateSendgridProvider( - "{$example}", // providerId - "{$example}", // name (optional) + "<PROVIDER_ID>", // providerId + "<NAME>", // name (optional) false, // enabled (optional) - "{$example}", // apiKey (optional) - "{$example}", // fromName (optional) - "{$example}", // fromEmail (optional) - "{$example}", // replyToName (optional) - "{$example}", // replyToEmail (optional) + "<API_KEY>", // apiKey (optional) + "<FROM_NAME>", // fromName (optional) + "email@example.com", // fromEmail (optional) + "<REPLY_TO_NAME>", // replyToName (optional) + "<REPLY_TO_EMAIL>", // replyToEmail (optional) new CoroutineCallback<>((result, error) -> { if (error != null) { error.printStackTrace(); diff --git a/docs/examples/java/messaging/update-sms.md b/docs/examples/java/messaging/update-sms.md index e08189f..bfca7d3 100644 --- a/docs/examples/java/messaging/update-sms.md +++ b/docs/examples/java/messaging/update-sms.md @@ -10,11 +10,11 @@ Client client = new Client() Messaging messaging = new Messaging(client); messaging.updateSms( - "{$example}", // messageId + "<MESSAGE_ID>", // messageId listOf(), // topics (optional) listOf(), // users (optional) listOf(), // targets (optional) - "{$example}", // content (optional) + "<CONTENT>", // content (optional) false, // draft (optional) "", // scheduledAt (optional) new CoroutineCallback<>((result, error) -> { diff --git a/docs/examples/java/messaging/update-smtp-provider.md b/docs/examples/java/messaging/update-smtp-provider.md index 37d49b5..e308381 100644 --- a/docs/examples/java/messaging/update-smtp-provider.md +++ b/docs/examples/java/messaging/update-smtp-provider.md @@ -10,19 +10,19 @@ Client client = new Client() Messaging messaging = new Messaging(client); messaging.updateSmtpProvider( - "{$example}", // providerId - "{$example}", // name (optional) - "{$example}", // host (optional) + "<PROVIDER_ID>", // providerId + "<NAME>", // name (optional) + "<HOST>", // host (optional) 1, // port (optional) - "{$example}", // username (optional) - "{$example}", // password (optional) + "<USERNAME>", // username (optional) + "<PASSWORD>", // password (optional) SmtpEncryption.NONE, // encryption (optional) false, // autoTLS (optional) - "{$example}", // mailer (optional) - "{$example}", // fromName (optional) - "{$example}", // fromEmail (optional) - "{$example}", // replyToName (optional) - "{$example}", // replyToEmail (optional) + "<MAILER>", // mailer (optional) + "<FROM_NAME>", // fromName (optional) + "email@example.com", // fromEmail (optional) + "<REPLY_TO_NAME>", // replyToName (optional) + "<REPLY_TO_EMAIL>", // replyToEmail (optional) false, // enabled (optional) new CoroutineCallback<>((result, error) -> { if (error != null) { diff --git a/docs/examples/java/messaging/update-telesign-provider.md b/docs/examples/java/messaging/update-telesign-provider.md index 07c60b5..6ffb534 100644 --- a/docs/examples/java/messaging/update-telesign-provider.md +++ b/docs/examples/java/messaging/update-telesign-provider.md @@ -10,12 +10,12 @@ Client client = new Client() Messaging messaging = new Messaging(client); messaging.updateTelesignProvider( - "{$example}", // providerId - "{$example}", // name (optional) + "<PROVIDER_ID>", // providerId + "<NAME>", // name (optional) false, // enabled (optional) - "{$example}", // customerId (optional) - "{$example}", // apiKey (optional) - "{$example}", // from (optional) + "<CUSTOMER_ID>", // customerId (optional) + "<API_KEY>", // apiKey (optional) + "<FROM>", // from (optional) new CoroutineCallback<>((result, error) -> { if (error != null) { error.printStackTrace(); diff --git a/docs/examples/java/messaging/update-textmagic-provider.md b/docs/examples/java/messaging/update-textmagic-provider.md index dfe37f6..d80b5ae 100644 --- a/docs/examples/java/messaging/update-textmagic-provider.md +++ b/docs/examples/java/messaging/update-textmagic-provider.md @@ -10,12 +10,12 @@ Client client = new Client() Messaging messaging = new Messaging(client); messaging.updateTextmagicProvider( - "{$example}", // providerId - "{$example}", // name (optional) + "<PROVIDER_ID>", // providerId + "<NAME>", // name (optional) false, // enabled (optional) - "{$example}", // username (optional) - "{$example}", // apiKey (optional) - "{$example}", // from (optional) + "<USERNAME>", // username (optional) + "<API_KEY>", // apiKey (optional) + "<FROM>", // from (optional) new CoroutineCallback<>((result, error) -> { if (error != null) { error.printStackTrace(); diff --git a/docs/examples/java/messaging/update-topic.md b/docs/examples/java/messaging/update-topic.md index 6ab70d4..1013fba 100644 --- a/docs/examples/java/messaging/update-topic.md +++ b/docs/examples/java/messaging/update-topic.md @@ -10,8 +10,8 @@ Client client = new Client() Messaging messaging = new Messaging(client); messaging.updateTopic( - "{$example}", // topicId - "{$example}", // name (optional) + "<TOPIC_ID>", // topicId + "<NAME>", // name (optional) listOf("any"), // subscribe (optional) new CoroutineCallback<>((result, error) -> { if (error != null) { diff --git a/docs/examples/java/messaging/update-twilio-provider.md b/docs/examples/java/messaging/update-twilio-provider.md index 1039741..65fb0fc 100644 --- a/docs/examples/java/messaging/update-twilio-provider.md +++ b/docs/examples/java/messaging/update-twilio-provider.md @@ -10,12 +10,12 @@ Client client = new Client() Messaging messaging = new Messaging(client); messaging.updateTwilioProvider( - "{$example}", // providerId - "{$example}", // name (optional) + "<PROVIDER_ID>", // providerId + "<NAME>", // name (optional) false, // enabled (optional) - "{$example}", // accountSid (optional) - "{$example}", // authToken (optional) - "{$example}", // from (optional) + "<ACCOUNT_SID>", // accountSid (optional) + "<AUTH_TOKEN>", // authToken (optional) + "<FROM>", // from (optional) new CoroutineCallback<>((result, error) -> { if (error != null) { error.printStackTrace(); diff --git a/docs/examples/java/messaging/update-vonage-provider.md b/docs/examples/java/messaging/update-vonage-provider.md index d797fb8..6548d17 100644 --- a/docs/examples/java/messaging/update-vonage-provider.md +++ b/docs/examples/java/messaging/update-vonage-provider.md @@ -10,12 +10,12 @@ Client client = new Client() Messaging messaging = new Messaging(client); messaging.updateVonageProvider( - "{$example}", // providerId - "{$example}", // name (optional) + "<PROVIDER_ID>", // providerId + "<NAME>", // name (optional) false, // enabled (optional) - "{$example}", // apiKey (optional) - "{$example}", // apiSecret (optional) - "{$example}", // from (optional) + "<API_KEY>", // apiKey (optional) + "<API_SECRET>", // apiSecret (optional) + "<FROM>", // from (optional) new CoroutineCallback<>((result, error) -> { if (error != null) { error.printStackTrace(); diff --git a/docs/examples/java/storage/create-bucket.md b/docs/examples/java/storage/create-bucket.md index d8f9f3e..ccb9961 100644 --- a/docs/examples/java/storage/create-bucket.md +++ b/docs/examples/java/storage/create-bucket.md @@ -10,8 +10,8 @@ Client client = new Client() Storage storage = new Storage(client); storage.createBucket( - "{$example}", // bucketId - "{$example}", // name + "<BUCKET_ID>", // bucketId + "<NAME>", // name listOf("read("any")"), // permissions (optional) false, // fileSecurity (optional) false, // enabled (optional) diff --git a/docs/examples/java/storage/create-file.md b/docs/examples/java/storage/create-file.md index de5d8aa..92907fc 100644 --- a/docs/examples/java/storage/create-file.md +++ b/docs/examples/java/storage/create-file.md @@ -1,6 +1,6 @@ import io.appwrite.Client; import io.appwrite.coroutines.CoroutineCallback; -import io.appwrite.models.Payload; +import io.appwrite.models.InputFile; import io.appwrite.services.Storage; Client client = new Client() @@ -11,9 +11,9 @@ Client client = new Client() Storage storage = new Storage(client); storage.createFile( - "{$example}", // bucketId - "{$example}", // fileId - Payload.fromFile("/path/to/file.png"), // file + "<BUCKET_ID>", // bucketId + "<FILE_ID>", // fileId + InputFile.fromPath("file.png"), // file listOf("read("any")"), // permissions (optional) new CoroutineCallback<>((result, error) -> { if (error != null) { diff --git a/docs/examples/java/storage/delete-bucket.md b/docs/examples/java/storage/delete-bucket.md index 0d55476..8c46ba9 100644 --- a/docs/examples/java/storage/delete-bucket.md +++ b/docs/examples/java/storage/delete-bucket.md @@ -10,7 +10,7 @@ Client client = new Client() Storage storage = new Storage(client); storage.deleteBucket( - "{$example}", // bucketId + "<BUCKET_ID>", // bucketId new CoroutineCallback<>((result, error) -> { if (error != null) { error.printStackTrace(); diff --git a/docs/examples/java/storage/delete-file.md b/docs/examples/java/storage/delete-file.md index 87fb6ac..01d423d 100644 --- a/docs/examples/java/storage/delete-file.md +++ b/docs/examples/java/storage/delete-file.md @@ -10,8 +10,8 @@ Client client = new Client() Storage storage = new Storage(client); storage.deleteFile( - "{$example}", // bucketId - "{$example}", // fileId + "<BUCKET_ID>", // bucketId + "<FILE_ID>", // fileId new CoroutineCallback<>((result, error) -> { if (error != null) { error.printStackTrace(); diff --git a/docs/examples/java/storage/get-bucket.md b/docs/examples/java/storage/get-bucket.md index 5db5395..63c847f 100644 --- a/docs/examples/java/storage/get-bucket.md +++ b/docs/examples/java/storage/get-bucket.md @@ -10,7 +10,7 @@ Client client = new Client() Storage storage = new Storage(client); storage.getBucket( - "{$example}", // bucketId + "<BUCKET_ID>", // bucketId new CoroutineCallback<>((result, error) -> { if (error != null) { error.printStackTrace(); diff --git a/docs/examples/java/storage/get-file-download.md b/docs/examples/java/storage/get-file-download.md index 4df387d..32bff0b 100644 --- a/docs/examples/java/storage/get-file-download.md +++ b/docs/examples/java/storage/get-file-download.md @@ -10,8 +10,8 @@ Client client = new Client() Storage storage = new Storage(client); storage.getFileDownload( - "{$example}", // bucketId - "{$example}", // fileId + "<BUCKET_ID>", // bucketId + "<FILE_ID>", // fileId new CoroutineCallback<>((result, error) -> { if (error != null) { error.printStackTrace(); diff --git a/docs/examples/java/storage/get-file-preview.md b/docs/examples/java/storage/get-file-preview.md index a661629..650ea4d 100644 --- a/docs/examples/java/storage/get-file-preview.md +++ b/docs/examples/java/storage/get-file-preview.md @@ -10,8 +10,8 @@ Client client = new Client() Storage storage = new Storage(client); storage.getFilePreview( - "{$example}", // bucketId - "{$example}", // fileId + "<BUCKET_ID>", // bucketId + "<FILE_ID>", // fileId 0, // width (optional) 0, // height (optional) ImageGravity.CENTER, // gravity (optional) diff --git a/docs/examples/java/storage/get-file-view.md b/docs/examples/java/storage/get-file-view.md index eb6d772..5a81eba 100644 --- a/docs/examples/java/storage/get-file-view.md +++ b/docs/examples/java/storage/get-file-view.md @@ -10,8 +10,8 @@ Client client = new Client() Storage storage = new Storage(client); storage.getFileView( - "{$example}", // bucketId - "{$example}", // fileId + "<BUCKET_ID>", // bucketId + "<FILE_ID>", // fileId new CoroutineCallback<>((result, error) -> { if (error != null) { error.printStackTrace(); diff --git a/docs/examples/java/storage/get-file.md b/docs/examples/java/storage/get-file.md index 252b4d4..004dc01 100644 --- a/docs/examples/java/storage/get-file.md +++ b/docs/examples/java/storage/get-file.md @@ -10,8 +10,8 @@ Client client = new Client() Storage storage = new Storage(client); storage.getFile( - "{$example}", // bucketId - "{$example}", // fileId + "<BUCKET_ID>", // bucketId + "<FILE_ID>", // fileId new CoroutineCallback<>((result, error) -> { if (error != null) { error.printStackTrace(); diff --git a/docs/examples/java/storage/list-buckets.md b/docs/examples/java/storage/list-buckets.md index 745a48a..8ab56e3 100644 --- a/docs/examples/java/storage/list-buckets.md +++ b/docs/examples/java/storage/list-buckets.md @@ -11,7 +11,7 @@ Storage storage = new Storage(client); storage.listBuckets( listOf(), // queries (optional) - "{$example}", // search (optional) + "<SEARCH>", // search (optional) new CoroutineCallback<>((result, error) -> { if (error != null) { error.printStackTrace(); diff --git a/docs/examples/java/storage/list-files.md b/docs/examples/java/storage/list-files.md index 7d0706f..6fbd2c3 100644 --- a/docs/examples/java/storage/list-files.md +++ b/docs/examples/java/storage/list-files.md @@ -10,9 +10,9 @@ Client client = new Client() Storage storage = new Storage(client); storage.listFiles( - "{$example}", // bucketId + "<BUCKET_ID>", // bucketId listOf(), // queries (optional) - "{$example}", // search (optional) + "<SEARCH>", // search (optional) new CoroutineCallback<>((result, error) -> { if (error != null) { error.printStackTrace(); diff --git a/docs/examples/java/storage/update-bucket.md b/docs/examples/java/storage/update-bucket.md index a016c89..342174e 100644 --- a/docs/examples/java/storage/update-bucket.md +++ b/docs/examples/java/storage/update-bucket.md @@ -10,8 +10,8 @@ Client client = new Client() Storage storage = new Storage(client); storage.updateBucket( - "{$example}", // bucketId - "{$example}", // name + "<BUCKET_ID>", // bucketId + "<NAME>", // name listOf("read("any")"), // permissions (optional) false, // fileSecurity (optional) false, // enabled (optional) diff --git a/docs/examples/java/storage/update-file.md b/docs/examples/java/storage/update-file.md index fe69341..3578bcd 100644 --- a/docs/examples/java/storage/update-file.md +++ b/docs/examples/java/storage/update-file.md @@ -10,9 +10,9 @@ Client client = new Client() Storage storage = new Storage(client); storage.updateFile( - "{$example}", // bucketId - "{$example}", // fileId - "{$example}", // name (optional) + "<BUCKET_ID>", // bucketId + "<FILE_ID>", // fileId + "<NAME>", // name (optional) listOf("read("any")"), // permissions (optional) new CoroutineCallback<>((result, error) -> { if (error != null) { diff --git a/docs/examples/java/teams/create-membership.md b/docs/examples/java/teams/create-membership.md index 1261e77..f7a4ecb 100644 --- a/docs/examples/java/teams/create-membership.md +++ b/docs/examples/java/teams/create-membership.md @@ -10,13 +10,13 @@ Client client = new Client() Teams teams = new Teams(client); teams.createMembership( - "{$example}", // teamId + "<TEAM_ID>", // teamId listOf(), // roles - "{$example}", // email (optional) - "{$example}", // userId (optional) - "{$example}", // phone (optional) - "{$example}", // url (optional) - "{$example}", // name (optional) + "email@example.com", // email (optional) + "<USER_ID>", // userId (optional) + "+12065550100", // phone (optional) + "https://example.com", // url (optional) + "<NAME>", // name (optional) new CoroutineCallback<>((result, error) -> { if (error != null) { error.printStackTrace(); diff --git a/docs/examples/java/teams/create.md b/docs/examples/java/teams/create.md index 36202d6..e8fb127 100644 --- a/docs/examples/java/teams/create.md +++ b/docs/examples/java/teams/create.md @@ -10,8 +10,8 @@ Client client = new Client() Teams teams = new Teams(client); teams.create( - "{$example}", // teamId - "{$example}", // name + "<TEAM_ID>", // teamId + "<NAME>", // name listOf(), // roles (optional) new CoroutineCallback<>((result, error) -> { if (error != null) { diff --git a/docs/examples/java/teams/delete-membership.md b/docs/examples/java/teams/delete-membership.md index 7e0d875..0fe1e17 100644 --- a/docs/examples/java/teams/delete-membership.md +++ b/docs/examples/java/teams/delete-membership.md @@ -10,8 +10,8 @@ Client client = new Client() Teams teams = new Teams(client); teams.deleteMembership( - "{$example}", // teamId - "{$example}", // membershipId + "<TEAM_ID>", // teamId + "<MEMBERSHIP_ID>", // membershipId new CoroutineCallback<>((result, error) -> { if (error != null) { error.printStackTrace(); diff --git a/docs/examples/java/teams/delete.md b/docs/examples/java/teams/delete.md index fece403..74f5a7c 100644 --- a/docs/examples/java/teams/delete.md +++ b/docs/examples/java/teams/delete.md @@ -10,7 +10,7 @@ Client client = new Client() Teams teams = new Teams(client); teams.delete( - "{$example}", // teamId + "<TEAM_ID>", // teamId new CoroutineCallback<>((result, error) -> { if (error != null) { error.printStackTrace(); diff --git a/docs/examples/java/teams/get-membership.md b/docs/examples/java/teams/get-membership.md index 421b7dd..d013d91 100644 --- a/docs/examples/java/teams/get-membership.md +++ b/docs/examples/java/teams/get-membership.md @@ -10,8 +10,8 @@ Client client = new Client() Teams teams = new Teams(client); teams.getMembership( - "{$example}", // teamId - "{$example}", // membershipId + "<TEAM_ID>", // teamId + "<MEMBERSHIP_ID>", // membershipId new CoroutineCallback<>((result, error) -> { if (error != null) { error.printStackTrace(); diff --git a/docs/examples/java/teams/get-prefs.md b/docs/examples/java/teams/get-prefs.md index ebbe1ea..27cd6f9 100644 --- a/docs/examples/java/teams/get-prefs.md +++ b/docs/examples/java/teams/get-prefs.md @@ -10,7 +10,7 @@ Client client = new Client() Teams teams = new Teams(client); teams.getPrefs( - "{$example}", // teamId + "<TEAM_ID>", // teamId new CoroutineCallback<>((result, error) -> { if (error != null) { error.printStackTrace(); diff --git a/docs/examples/java/teams/get.md b/docs/examples/java/teams/get.md index bdbee72..0416602 100644 --- a/docs/examples/java/teams/get.md +++ b/docs/examples/java/teams/get.md @@ -10,7 +10,7 @@ Client client = new Client() Teams teams = new Teams(client); teams.get( - "{$example}", // teamId + "<TEAM_ID>", // teamId new CoroutineCallback<>((result, error) -> { if (error != null) { error.printStackTrace(); diff --git a/docs/examples/java/teams/list-memberships.md b/docs/examples/java/teams/list-memberships.md index 966fd8f..0260673 100644 --- a/docs/examples/java/teams/list-memberships.md +++ b/docs/examples/java/teams/list-memberships.md @@ -10,9 +10,9 @@ Client client = new Client() Teams teams = new Teams(client); teams.listMemberships( - "{$example}", // teamId + "<TEAM_ID>", // teamId listOf(), // queries (optional) - "{$example}", // search (optional) + "<SEARCH>", // search (optional) new CoroutineCallback<>((result, error) -> { if (error != null) { error.printStackTrace(); diff --git a/docs/examples/java/teams/list.md b/docs/examples/java/teams/list.md index 3789dc3..a4e85ac 100644 --- a/docs/examples/java/teams/list.md +++ b/docs/examples/java/teams/list.md @@ -11,7 +11,7 @@ Teams teams = new Teams(client); teams.list( listOf(), // queries (optional) - "{$example}", // search (optional) + "<SEARCH>", // search (optional) new CoroutineCallback<>((result, error) -> { if (error != null) { error.printStackTrace(); diff --git a/docs/examples/java/teams/update-membership-status.md b/docs/examples/java/teams/update-membership-status.md index 42de56e..8ca3398 100644 --- a/docs/examples/java/teams/update-membership-status.md +++ b/docs/examples/java/teams/update-membership-status.md @@ -10,10 +10,10 @@ Client client = new Client() Teams teams = new Teams(client); teams.updateMembershipStatus( - "{$example}", // teamId - "{$example}", // membershipId - "{$example}", // userId - "{$example}", // secret + "<TEAM_ID>", // teamId + "<MEMBERSHIP_ID>", // membershipId + "<USER_ID>", // userId + "<SECRET>", // secret new CoroutineCallback<>((result, error) -> { if (error != null) { error.printStackTrace(); diff --git a/docs/examples/java/teams/update-membership.md b/docs/examples/java/teams/update-membership.md index 6be491a..60be82c 100644 --- a/docs/examples/java/teams/update-membership.md +++ b/docs/examples/java/teams/update-membership.md @@ -10,8 +10,8 @@ Client client = new Client() Teams teams = new Teams(client); teams.updateMembership( - "{$example}", // teamId - "{$example}", // membershipId + "<TEAM_ID>", // teamId + "<MEMBERSHIP_ID>", // membershipId listOf(), // roles new CoroutineCallback<>((result, error) -> { if (error != null) { diff --git a/docs/examples/java/teams/update-name.md b/docs/examples/java/teams/update-name.md index 24783a2..8db6f04 100644 --- a/docs/examples/java/teams/update-name.md +++ b/docs/examples/java/teams/update-name.md @@ -10,8 +10,8 @@ Client client = new Client() Teams teams = new Teams(client); teams.updateName( - "{$example}", // teamId - "{$example}", // name + "<TEAM_ID>", // teamId + "<NAME>", // name new CoroutineCallback<>((result, error) -> { if (error != null) { error.printStackTrace(); diff --git a/docs/examples/java/teams/update-prefs.md b/docs/examples/java/teams/update-prefs.md index 2fe3472..91f1492 100644 --- a/docs/examples/java/teams/update-prefs.md +++ b/docs/examples/java/teams/update-prefs.md @@ -10,7 +10,7 @@ Client client = new Client() Teams teams = new Teams(client); teams.updatePrefs( - "{$example}", // teamId + "<TEAM_ID>", // teamId mapOf( "a" to "b" ), // prefs new CoroutineCallback<>((result, error) -> { if (error != null) { diff --git a/docs/examples/java/users/create-argon2user.md b/docs/examples/java/users/create-argon2user.md index ffbeacf..0127526 100644 --- a/docs/examples/java/users/create-argon2user.md +++ b/docs/examples/java/users/create-argon2user.md @@ -10,10 +10,10 @@ Client client = new Client() Users users = new Users(client); users.createArgon2User( - "{$example}", // userId - "{$example}", // email - "{$example}", // password - "{$example}", // name (optional) + "<USER_ID>", // userId + "email@example.com", // email + "password", // password + "<NAME>", // name (optional) new CoroutineCallback<>((result, error) -> { if (error != null) { error.printStackTrace(); diff --git a/docs/examples/java/users/create-bcrypt-user.md b/docs/examples/java/users/create-bcrypt-user.md index 091a172..c98939b 100644 --- a/docs/examples/java/users/create-bcrypt-user.md +++ b/docs/examples/java/users/create-bcrypt-user.md @@ -10,10 +10,10 @@ Client client = new Client() Users users = new Users(client); users.createBcryptUser( - "{$example}", // userId - "{$example}", // email - "{$example}", // password - "{$example}", // name (optional) + "<USER_ID>", // userId + "email@example.com", // email + "password", // password + "<NAME>", // name (optional) new CoroutineCallback<>((result, error) -> { if (error != null) { error.printStackTrace(); diff --git a/docs/examples/java/users/create-j-w-t.md b/docs/examples/java/users/create-j-w-t.md index c909aa1..c4538b7 100644 --- a/docs/examples/java/users/create-j-w-t.md +++ b/docs/examples/java/users/create-j-w-t.md @@ -10,8 +10,8 @@ Client client = new Client() Users users = new Users(client); users.createJWT( - "{$example}", // userId - "{$example}", // sessionId (optional) + "<USER_ID>", // userId + "<SESSION_ID>", // sessionId (optional) 0, // duration (optional) new CoroutineCallback<>((result, error) -> { if (error != null) { diff --git a/docs/examples/java/users/create-m-d5user.md b/docs/examples/java/users/create-m-d5user.md index 53ea58d..0456a77 100644 --- a/docs/examples/java/users/create-m-d5user.md +++ b/docs/examples/java/users/create-m-d5user.md @@ -10,10 +10,10 @@ Client client = new Client() Users users = new Users(client); users.createMD5User( - "{$example}", // userId - "{$example}", // email - "{$example}", // password - "{$example}", // name (optional) + "<USER_ID>", // userId + "email@example.com", // email + "password", // password + "<NAME>", // name (optional) new CoroutineCallback<>((result, error) -> { if (error != null) { error.printStackTrace(); diff --git a/docs/examples/java/users/create-mfa-recovery-codes.md b/docs/examples/java/users/create-mfa-recovery-codes.md index 91c292e..f9dfbe8 100644 --- a/docs/examples/java/users/create-mfa-recovery-codes.md +++ b/docs/examples/java/users/create-mfa-recovery-codes.md @@ -10,7 +10,7 @@ Client client = new Client() Users users = new Users(client); users.createMfaRecoveryCodes( - "{$example}", // userId + "<USER_ID>", // userId new CoroutineCallback<>((result, error) -> { if (error != null) { error.printStackTrace(); diff --git a/docs/examples/java/users/create-p-h-pass-user.md b/docs/examples/java/users/create-p-h-pass-user.md index 45c42fe..e977678 100644 --- a/docs/examples/java/users/create-p-h-pass-user.md +++ b/docs/examples/java/users/create-p-h-pass-user.md @@ -10,10 +10,10 @@ Client client = new Client() Users users = new Users(client); users.createPHPassUser( - "{$example}", // userId - "{$example}", // email - "{$example}", // password - "{$example}", // name (optional) + "<USER_ID>", // userId + "email@example.com", // email + "password", // password + "<NAME>", // name (optional) new CoroutineCallback<>((result, error) -> { if (error != null) { error.printStackTrace(); diff --git a/docs/examples/java/users/create-s-h-a-user.md b/docs/examples/java/users/create-s-h-a-user.md index 8fdecc1..6a3869c 100644 --- a/docs/examples/java/users/create-s-h-a-user.md +++ b/docs/examples/java/users/create-s-h-a-user.md @@ -10,11 +10,11 @@ Client client = new Client() Users users = new Users(client); users.createSHAUser( - "{$example}", // userId - "{$example}", // email - "{$example}", // password + "<USER_ID>", // userId + "email@example.com", // email + "password", // password PasswordHash.SHA1, // passwordVersion (optional) - "{$example}", // name (optional) + "<NAME>", // name (optional) new CoroutineCallback<>((result, error) -> { if (error != null) { error.printStackTrace(); diff --git a/docs/examples/java/users/create-scrypt-modified-user.md b/docs/examples/java/users/create-scrypt-modified-user.md index 1e4c784..28d5881 100644 --- a/docs/examples/java/users/create-scrypt-modified-user.md +++ b/docs/examples/java/users/create-scrypt-modified-user.md @@ -10,13 +10,13 @@ Client client = new Client() Users users = new Users(client); users.createScryptModifiedUser( - "{$example}", // userId - "{$example}", // email - "{$example}", // password - "{$example}", // passwordSalt - "{$example}", // passwordSaltSeparator - "{$example}", // passwordSignerKey - "{$example}", // name (optional) + "<USER_ID>", // userId + "email@example.com", // email + "password", // password + "<PASSWORD_SALT>", // passwordSalt + "<PASSWORD_SALT_SEPARATOR>", // passwordSaltSeparator + "<PASSWORD_SIGNER_KEY>", // passwordSignerKey + "<NAME>", // name (optional) new CoroutineCallback<>((result, error) -> { if (error != null) { error.printStackTrace(); diff --git a/docs/examples/java/users/create-scrypt-user.md b/docs/examples/java/users/create-scrypt-user.md index 2028ef1..43e1ad8 100644 --- a/docs/examples/java/users/create-scrypt-user.md +++ b/docs/examples/java/users/create-scrypt-user.md @@ -10,15 +10,15 @@ Client client = new Client() Users users = new Users(client); users.createScryptUser( - "{$example}", // userId - "{$example}", // email - "{$example}", // password - "{$example}", // passwordSalt + "<USER_ID>", // userId + "email@example.com", // email + "password", // password + "<PASSWORD_SALT>", // passwordSalt 0, // passwordCpu 0, // passwordMemory 0, // passwordParallel 0, // passwordLength - "{$example}", // name (optional) + "<NAME>", // name (optional) new CoroutineCallback<>((result, error) -> { if (error != null) { error.printStackTrace(); diff --git a/docs/examples/java/users/create-session.md b/docs/examples/java/users/create-session.md index db3b6ec..bc7dfb0 100644 --- a/docs/examples/java/users/create-session.md +++ b/docs/examples/java/users/create-session.md @@ -10,7 +10,7 @@ Client client = new Client() Users users = new Users(client); users.createSession( - "{$example}", // userId + "<USER_ID>", // userId new CoroutineCallback<>((result, error) -> { if (error != null) { error.printStackTrace(); diff --git a/docs/examples/java/users/create-target.md b/docs/examples/java/users/create-target.md index 3bfdd49..6bad1ce 100644 --- a/docs/examples/java/users/create-target.md +++ b/docs/examples/java/users/create-target.md @@ -11,12 +11,12 @@ Client client = new Client() Users users = new Users(client); users.createTarget( - "{$example}", // userId - "{$example}", // targetId + "<USER_ID>", // userId + "<TARGET_ID>", // targetId MessagingProviderType.EMAIL, // providerType - "{$example}", // identifier - "{$example}", // providerId (optional) - "{$example}", // name (optional) + "<IDENTIFIER>", // identifier + "<PROVIDER_ID>", // providerId (optional) + "<NAME>", // name (optional) new CoroutineCallback<>((result, error) -> { if (error != null) { error.printStackTrace(); diff --git a/docs/examples/java/users/create-token.md b/docs/examples/java/users/create-token.md index 0e5ce2f..9389e0e 100644 --- a/docs/examples/java/users/create-token.md +++ b/docs/examples/java/users/create-token.md @@ -10,7 +10,7 @@ Client client = new Client() Users users = new Users(client); users.createToken( - "{$example}", // userId + "<USER_ID>", // userId 4, // length (optional) 60, // expire (optional) new CoroutineCallback<>((result, error) -> { diff --git a/docs/examples/java/users/create.md b/docs/examples/java/users/create.md index 8a8ca05..9889129 100644 --- a/docs/examples/java/users/create.md +++ b/docs/examples/java/users/create.md @@ -10,11 +10,11 @@ Client client = new Client() Users users = new Users(client); users.create( - "{$example}", // userId - "{$example}", // email (optional) - "{$example}", // phone (optional) + "<USER_ID>", // userId + "email@example.com", // email (optional) + "+12065550100", // phone (optional) "", // password (optional) - "{$example}", // name (optional) + "<NAME>", // name (optional) new CoroutineCallback<>((result, error) -> { if (error != null) { error.printStackTrace(); diff --git a/docs/examples/java/users/delete-identity.md b/docs/examples/java/users/delete-identity.md index 7bfd72d..063a91d 100644 --- a/docs/examples/java/users/delete-identity.md +++ b/docs/examples/java/users/delete-identity.md @@ -10,7 +10,7 @@ Client client = new Client() Users users = new Users(client); users.deleteIdentity( - "{$example}", // identityId + "<IDENTITY_ID>", // identityId new CoroutineCallback<>((result, error) -> { if (error != null) { error.printStackTrace(); diff --git a/docs/examples/java/users/delete-mfa-authenticator.md b/docs/examples/java/users/delete-mfa-authenticator.md index acb9b62..cd5d9ab 100644 --- a/docs/examples/java/users/delete-mfa-authenticator.md +++ b/docs/examples/java/users/delete-mfa-authenticator.md @@ -11,7 +11,7 @@ Client client = new Client() Users users = new Users(client); users.deleteMfaAuthenticator( - "{$example}", // userId + "<USER_ID>", // userId AuthenticatorType.TOTP, // type new CoroutineCallback<>((result, error) -> { if (error != null) { diff --git a/docs/examples/java/users/delete-session.md b/docs/examples/java/users/delete-session.md index acd4626..4ed2713 100644 --- a/docs/examples/java/users/delete-session.md +++ b/docs/examples/java/users/delete-session.md @@ -10,8 +10,8 @@ Client client = new Client() Users users = new Users(client); users.deleteSession( - "{$example}", // userId - "{$example}", // sessionId + "<USER_ID>", // userId + "<SESSION_ID>", // sessionId new CoroutineCallback<>((result, error) -> { if (error != null) { error.printStackTrace(); diff --git a/docs/examples/java/users/delete-sessions.md b/docs/examples/java/users/delete-sessions.md index 2faceb7..f0da6e0 100644 --- a/docs/examples/java/users/delete-sessions.md +++ b/docs/examples/java/users/delete-sessions.md @@ -10,7 +10,7 @@ Client client = new Client() Users users = new Users(client); users.deleteSessions( - "{$example}", // userId + "<USER_ID>", // userId new CoroutineCallback<>((result, error) -> { if (error != null) { error.printStackTrace(); diff --git a/docs/examples/java/users/delete-target.md b/docs/examples/java/users/delete-target.md index 8f9f94e..ddd0460 100644 --- a/docs/examples/java/users/delete-target.md +++ b/docs/examples/java/users/delete-target.md @@ -10,8 +10,8 @@ Client client = new Client() Users users = new Users(client); users.deleteTarget( - "{$example}", // userId - "{$example}", // targetId + "<USER_ID>", // userId + "<TARGET_ID>", // targetId new CoroutineCallback<>((result, error) -> { if (error != null) { error.printStackTrace(); diff --git a/docs/examples/java/users/delete.md b/docs/examples/java/users/delete.md index da6221c..6a256f8 100644 --- a/docs/examples/java/users/delete.md +++ b/docs/examples/java/users/delete.md @@ -10,7 +10,7 @@ Client client = new Client() Users users = new Users(client); users.delete( - "{$example}", // userId + "<USER_ID>", // userId new CoroutineCallback<>((result, error) -> { if (error != null) { error.printStackTrace(); diff --git a/docs/examples/java/users/get-mfa-recovery-codes.md b/docs/examples/java/users/get-mfa-recovery-codes.md index 8ff2b36..be33d20 100644 --- a/docs/examples/java/users/get-mfa-recovery-codes.md +++ b/docs/examples/java/users/get-mfa-recovery-codes.md @@ -10,7 +10,7 @@ Client client = new Client() Users users = new Users(client); users.getMfaRecoveryCodes( - "{$example}", // userId + "<USER_ID>", // userId new CoroutineCallback<>((result, error) -> { if (error != null) { error.printStackTrace(); diff --git a/docs/examples/java/users/get-prefs.md b/docs/examples/java/users/get-prefs.md index 09a8e7d..3e36f16 100644 --- a/docs/examples/java/users/get-prefs.md +++ b/docs/examples/java/users/get-prefs.md @@ -10,7 +10,7 @@ Client client = new Client() Users users = new Users(client); users.getPrefs( - "{$example}", // userId + "<USER_ID>", // userId new CoroutineCallback<>((result, error) -> { if (error != null) { error.printStackTrace(); diff --git a/docs/examples/java/users/get-target.md b/docs/examples/java/users/get-target.md index 8057537..2ee5b4a 100644 --- a/docs/examples/java/users/get-target.md +++ b/docs/examples/java/users/get-target.md @@ -10,8 +10,8 @@ Client client = new Client() Users users = new Users(client); users.getTarget( - "{$example}", // userId - "{$example}", // targetId + "<USER_ID>", // userId + "<TARGET_ID>", // targetId new CoroutineCallback<>((result, error) -> { if (error != null) { error.printStackTrace(); diff --git a/docs/examples/java/users/get.md b/docs/examples/java/users/get.md index f53f631..8c34eba 100644 --- a/docs/examples/java/users/get.md +++ b/docs/examples/java/users/get.md @@ -10,7 +10,7 @@ Client client = new Client() Users users = new Users(client); users.get( - "{$example}", // userId + "<USER_ID>", // userId new CoroutineCallback<>((result, error) -> { if (error != null) { error.printStackTrace(); diff --git a/docs/examples/java/users/list-identities.md b/docs/examples/java/users/list-identities.md index feea9fd..169b414 100644 --- a/docs/examples/java/users/list-identities.md +++ b/docs/examples/java/users/list-identities.md @@ -11,7 +11,7 @@ Users users = new Users(client); users.listIdentities( listOf(), // queries (optional) - "{$example}", // search (optional) + "<SEARCH>", // search (optional) new CoroutineCallback<>((result, error) -> { if (error != null) { error.printStackTrace(); diff --git a/docs/examples/java/users/list-logs.md b/docs/examples/java/users/list-logs.md index 46dff30..f3d2701 100644 --- a/docs/examples/java/users/list-logs.md +++ b/docs/examples/java/users/list-logs.md @@ -10,7 +10,7 @@ Client client = new Client() Users users = new Users(client); users.listLogs( - "{$example}", // userId + "<USER_ID>", // userId listOf(), // queries (optional) new CoroutineCallback<>((result, error) -> { if (error != null) { diff --git a/docs/examples/java/users/list-memberships.md b/docs/examples/java/users/list-memberships.md index 4ba8d7b..4f3cfd8 100644 --- a/docs/examples/java/users/list-memberships.md +++ b/docs/examples/java/users/list-memberships.md @@ -10,7 +10,7 @@ Client client = new Client() Users users = new Users(client); users.listMemberships( - "{$example}", // userId + "<USER_ID>", // userId new CoroutineCallback<>((result, error) -> { if (error != null) { error.printStackTrace(); diff --git a/docs/examples/java/users/list-mfa-factors.md b/docs/examples/java/users/list-mfa-factors.md index a8a52e7..4d51ece 100644 --- a/docs/examples/java/users/list-mfa-factors.md +++ b/docs/examples/java/users/list-mfa-factors.md @@ -10,7 +10,7 @@ Client client = new Client() Users users = new Users(client); users.listMfaFactors( - "{$example}", // userId + "<USER_ID>", // userId new CoroutineCallback<>((result, error) -> { if (error != null) { error.printStackTrace(); diff --git a/docs/examples/java/users/list-sessions.md b/docs/examples/java/users/list-sessions.md index f510a62..a1d3a3a 100644 --- a/docs/examples/java/users/list-sessions.md +++ b/docs/examples/java/users/list-sessions.md @@ -10,7 +10,7 @@ Client client = new Client() Users users = new Users(client); users.listSessions( - "{$example}", // userId + "<USER_ID>", // userId new CoroutineCallback<>((result, error) -> { if (error != null) { error.printStackTrace(); diff --git a/docs/examples/java/users/list-targets.md b/docs/examples/java/users/list-targets.md index c78e49f..ab04577 100644 --- a/docs/examples/java/users/list-targets.md +++ b/docs/examples/java/users/list-targets.md @@ -10,7 +10,7 @@ Client client = new Client() Users users = new Users(client); users.listTargets( - "{$example}", // userId + "<USER_ID>", // userId listOf(), // queries (optional) new CoroutineCallback<>((result, error) -> { if (error != null) { diff --git a/docs/examples/java/users/list.md b/docs/examples/java/users/list.md index 8bf739d..a854ba0 100644 --- a/docs/examples/java/users/list.md +++ b/docs/examples/java/users/list.md @@ -11,7 +11,7 @@ Users users = new Users(client); users.list( listOf(), // queries (optional) - "{$example}", // search (optional) + "<SEARCH>", // search (optional) new CoroutineCallback<>((result, error) -> { if (error != null) { error.printStackTrace(); diff --git a/docs/examples/java/users/update-email-verification.md b/docs/examples/java/users/update-email-verification.md index 9f89c11..7423f77 100644 --- a/docs/examples/java/users/update-email-verification.md +++ b/docs/examples/java/users/update-email-verification.md @@ -10,7 +10,7 @@ Client client = new Client() Users users = new Users(client); users.updateEmailVerification( - "{$example}", // userId + "<USER_ID>", // userId false, // emailVerification new CoroutineCallback<>((result, error) -> { if (error != null) { diff --git a/docs/examples/java/users/update-email.md b/docs/examples/java/users/update-email.md index 570d9dd..23e3977 100644 --- a/docs/examples/java/users/update-email.md +++ b/docs/examples/java/users/update-email.md @@ -10,8 +10,8 @@ Client client = new Client() Users users = new Users(client); users.updateEmail( - "{$example}", // userId - "{$example}", // email + "<USER_ID>", // userId + "email@example.com", // email new CoroutineCallback<>((result, error) -> { if (error != null) { error.printStackTrace(); diff --git a/docs/examples/java/users/update-labels.md b/docs/examples/java/users/update-labels.md index 02f41db..acc3d1b 100644 --- a/docs/examples/java/users/update-labels.md +++ b/docs/examples/java/users/update-labels.md @@ -10,7 +10,7 @@ Client client = new Client() Users users = new Users(client); users.updateLabels( - "{$example}", // userId + "<USER_ID>", // userId listOf(), // labels new CoroutineCallback<>((result, error) -> { if (error != null) { diff --git a/docs/examples/java/users/update-mfa-recovery-codes.md b/docs/examples/java/users/update-mfa-recovery-codes.md index c8fd89d..eb560e7 100644 --- a/docs/examples/java/users/update-mfa-recovery-codes.md +++ b/docs/examples/java/users/update-mfa-recovery-codes.md @@ -10,7 +10,7 @@ Client client = new Client() Users users = new Users(client); users.updateMfaRecoveryCodes( - "{$example}", // userId + "<USER_ID>", // userId new CoroutineCallback<>((result, error) -> { if (error != null) { error.printStackTrace(); diff --git a/docs/examples/java/users/update-mfa.md b/docs/examples/java/users/update-mfa.md index 4ac83e3..e1fc96f 100644 --- a/docs/examples/java/users/update-mfa.md +++ b/docs/examples/java/users/update-mfa.md @@ -10,7 +10,7 @@ Client client = new Client() Users users = new Users(client); users.updateMfa( - "{$example}", // userId + "<USER_ID>", // userId false, // mfa new CoroutineCallback<>((result, error) -> { if (error != null) { diff --git a/docs/examples/java/users/update-name.md b/docs/examples/java/users/update-name.md index ca8b97b..e8bfe56 100644 --- a/docs/examples/java/users/update-name.md +++ b/docs/examples/java/users/update-name.md @@ -10,8 +10,8 @@ Client client = new Client() Users users = new Users(client); users.updateName( - "{$example}", // userId - "{$example}", // name + "<USER_ID>", // userId + "<NAME>", // name new CoroutineCallback<>((result, error) -> { if (error != null) { error.printStackTrace(); diff --git a/docs/examples/java/users/update-password.md b/docs/examples/java/users/update-password.md index 312d04a..bdf31a7 100644 --- a/docs/examples/java/users/update-password.md +++ b/docs/examples/java/users/update-password.md @@ -10,7 +10,7 @@ Client client = new Client() Users users = new Users(client); users.updatePassword( - "{$example}", // userId + "<USER_ID>", // userId "", // password new CoroutineCallback<>((result, error) -> { if (error != null) { diff --git a/docs/examples/java/users/update-phone-verification.md b/docs/examples/java/users/update-phone-verification.md index 643465c..ce2377b 100644 --- a/docs/examples/java/users/update-phone-verification.md +++ b/docs/examples/java/users/update-phone-verification.md @@ -10,7 +10,7 @@ Client client = new Client() Users users = new Users(client); users.updatePhoneVerification( - "{$example}", // userId + "<USER_ID>", // userId false, // phoneVerification new CoroutineCallback<>((result, error) -> { if (error != null) { diff --git a/docs/examples/java/users/update-phone.md b/docs/examples/java/users/update-phone.md index e581c5b..e0a0a49 100644 --- a/docs/examples/java/users/update-phone.md +++ b/docs/examples/java/users/update-phone.md @@ -10,8 +10,8 @@ Client client = new Client() Users users = new Users(client); users.updatePhone( - "{$example}", // userId - "{$example}", // number + "<USER_ID>", // userId + "+12065550100", // number new CoroutineCallback<>((result, error) -> { if (error != null) { error.printStackTrace(); diff --git a/docs/examples/java/users/update-prefs.md b/docs/examples/java/users/update-prefs.md index b679c0d..1d1cc7c 100644 --- a/docs/examples/java/users/update-prefs.md +++ b/docs/examples/java/users/update-prefs.md @@ -10,7 +10,7 @@ Client client = new Client() Users users = new Users(client); users.updatePrefs( - "{$example}", // userId + "<USER_ID>", // userId mapOf( "a" to "b" ), // prefs new CoroutineCallback<>((result, error) -> { if (error != null) { diff --git a/docs/examples/java/users/update-status.md b/docs/examples/java/users/update-status.md index b0948b7..e757ece 100644 --- a/docs/examples/java/users/update-status.md +++ b/docs/examples/java/users/update-status.md @@ -10,7 +10,7 @@ Client client = new Client() Users users = new Users(client); users.updateStatus( - "{$example}", // userId + "<USER_ID>", // userId false, // status new CoroutineCallback<>((result, error) -> { if (error != null) { diff --git a/docs/examples/java/users/update-target.md b/docs/examples/java/users/update-target.md index 5ccd44c..23ca8d0 100644 --- a/docs/examples/java/users/update-target.md +++ b/docs/examples/java/users/update-target.md @@ -10,11 +10,11 @@ Client client = new Client() Users users = new Users(client); users.updateTarget( - "{$example}", // userId - "{$example}", // targetId - "{$example}", // identifier (optional) - "{$example}", // providerId (optional) - "{$example}", // name (optional) + "<USER_ID>", // userId + "<TARGET_ID>", // targetId + "<IDENTIFIER>", // identifier (optional) + "<PROVIDER_ID>", // providerId (optional) + "<NAME>", // name (optional) new CoroutineCallback<>((result, error) -> { if (error != null) { error.printStackTrace(); diff --git a/docs/examples/kotlin/account/create-email-password-session.md b/docs/examples/kotlin/account/create-email-password-session.md index 7a4002c..cc3b8cb 100644 --- a/docs/examples/kotlin/account/create-email-password-session.md +++ b/docs/examples/kotlin/account/create-email-password-session.md @@ -9,6 +9,6 @@ val client = Client() val account = Account(client) val response = account.createEmailPasswordSession( - email = "{$example}", - password = "{$example}" + email = "email@example.com", + password = "password" ) diff --git a/docs/examples/kotlin/account/create-email-token.md b/docs/examples/kotlin/account/create-email-token.md index 91fef00..b56e489 100644 --- a/docs/examples/kotlin/account/create-email-token.md +++ b/docs/examples/kotlin/account/create-email-token.md @@ -9,7 +9,7 @@ val client = Client() val account = Account(client) val response = account.createEmailToken( - userId = "{$example}", - email = "{$example}", + userId = "<USER_ID>", + email = "email@example.com", phrase = false // optional ) diff --git a/docs/examples/kotlin/account/create-magic-u-r-l-token.md b/docs/examples/kotlin/account/create-magic-u-r-l-token.md index eb16ecf..ba66695 100644 --- a/docs/examples/kotlin/account/create-magic-u-r-l-token.md +++ b/docs/examples/kotlin/account/create-magic-u-r-l-token.md @@ -9,8 +9,8 @@ val client = Client() val account = Account(client) val response = account.createMagicURLToken( - userId = "{$example}", - email = "{$example}", - url = "{$example}", // optional + userId = "<USER_ID>", + email = "email@example.com", + url = "https://example.com", // optional phrase = false // optional ) diff --git a/docs/examples/kotlin/account/create-o-auth2token.md b/docs/examples/kotlin/account/create-o-auth2token.md index b9cd2d6..62d176d 100644 --- a/docs/examples/kotlin/account/create-o-auth2token.md +++ b/docs/examples/kotlin/account/create-o-auth2token.md @@ -11,7 +11,7 @@ val account = Account(client) account.createOAuth2Token( provider = OAuthProvider.AMAZON, - success = "{$example}", // optional - failure = "{$example}", // optional + success = "https://example.com", // optional + failure = "https://example.com", // optional scopes = listOf() // optional ) diff --git a/docs/examples/kotlin/account/create-phone-token.md b/docs/examples/kotlin/account/create-phone-token.md index 23cff34..b9633e7 100644 --- a/docs/examples/kotlin/account/create-phone-token.md +++ b/docs/examples/kotlin/account/create-phone-token.md @@ -9,6 +9,6 @@ val client = Client() val account = Account(client) val response = account.createPhoneToken( - userId = "{$example}", - phone = "{$example}" + userId = "<USER_ID>", + phone = "+12065550100" ) diff --git a/docs/examples/kotlin/account/create-recovery.md b/docs/examples/kotlin/account/create-recovery.md index 015e804..27c6af5 100644 --- a/docs/examples/kotlin/account/create-recovery.md +++ b/docs/examples/kotlin/account/create-recovery.md @@ -10,6 +10,6 @@ val client = Client() val account = Account(client) val response = account.createRecovery( - email = "{$example}", - url = "{$example}" + email = "email@example.com", + url = "https://example.com" ) diff --git a/docs/examples/kotlin/account/create-session.md b/docs/examples/kotlin/account/create-session.md index 9df922e..5e6c47c 100644 --- a/docs/examples/kotlin/account/create-session.md +++ b/docs/examples/kotlin/account/create-session.md @@ -9,6 +9,6 @@ val client = Client() val account = Account(client) val response = account.createSession( - userId = "{$example}", - secret = "{$example}" + userId = "<USER_ID>", + secret = "<SECRET>" ) diff --git a/docs/examples/kotlin/account/create-verification.md b/docs/examples/kotlin/account/create-verification.md index d70b509..0d42f8a 100644 --- a/docs/examples/kotlin/account/create-verification.md +++ b/docs/examples/kotlin/account/create-verification.md @@ -10,5 +10,5 @@ val client = Client() val account = Account(client) val response = account.createVerification( - url = "{$example}" + url = "https://example.com" ) diff --git a/docs/examples/kotlin/account/create.md b/docs/examples/kotlin/account/create.md index 2195803..19d7c12 100644 --- a/docs/examples/kotlin/account/create.md +++ b/docs/examples/kotlin/account/create.md @@ -9,8 +9,8 @@ val client = Client() val account = Account(client) val response = account.create( - userId = "{$example}", - email = "{$example}", + userId = "<USER_ID>", + email = "email@example.com", password = "", - name = "{$example}" // optional + name = "<NAME>" // optional ) diff --git a/docs/examples/kotlin/account/delete-identity.md b/docs/examples/kotlin/account/delete-identity.md index 576f99a..f6ede24 100644 --- a/docs/examples/kotlin/account/delete-identity.md +++ b/docs/examples/kotlin/account/delete-identity.md @@ -10,5 +10,5 @@ val client = Client() val account = Account(client) val response = account.deleteIdentity( - identityId = "{$example}" + identityId = "<IDENTITY_ID>" ) diff --git a/docs/examples/kotlin/account/delete-session.md b/docs/examples/kotlin/account/delete-session.md index da9dce8..47b80d7 100644 --- a/docs/examples/kotlin/account/delete-session.md +++ b/docs/examples/kotlin/account/delete-session.md @@ -10,5 +10,5 @@ val client = Client() val account = Account(client) val response = account.deleteSession( - sessionId = "{$example}" + sessionId = "<SESSION_ID>" ) diff --git a/docs/examples/kotlin/account/get-session.md b/docs/examples/kotlin/account/get-session.md index 8943b0f..78478e1 100644 --- a/docs/examples/kotlin/account/get-session.md +++ b/docs/examples/kotlin/account/get-session.md @@ -10,5 +10,5 @@ val client = Client() val account = Account(client) val response = account.getSession( - sessionId = "{$example}" + sessionId = "<SESSION_ID>" ) diff --git a/docs/examples/kotlin/account/update-email.md b/docs/examples/kotlin/account/update-email.md index 721069c..c10c25e 100644 --- a/docs/examples/kotlin/account/update-email.md +++ b/docs/examples/kotlin/account/update-email.md @@ -10,6 +10,6 @@ val client = Client() val account = Account(client) val response = account.updateEmail( - email = "{$example}", - password = "{$example}" + email = "email@example.com", + password = "password" ) diff --git a/docs/examples/kotlin/account/update-magic-u-r-l-session.md b/docs/examples/kotlin/account/update-magic-u-r-l-session.md index d44a1c9..99b65eb 100644 --- a/docs/examples/kotlin/account/update-magic-u-r-l-session.md +++ b/docs/examples/kotlin/account/update-magic-u-r-l-session.md @@ -9,6 +9,6 @@ val client = Client() val account = Account(client) val response = account.updateMagicURLSession( - userId = "{$example}", - secret = "{$example}" + userId = "<USER_ID>", + secret = "<SECRET>" ) diff --git a/docs/examples/kotlin/account/update-mfa-authenticator.md b/docs/examples/kotlin/account/update-mfa-authenticator.md index ad7ba90..482dfb3 100644 --- a/docs/examples/kotlin/account/update-mfa-authenticator.md +++ b/docs/examples/kotlin/account/update-mfa-authenticator.md @@ -12,5 +12,5 @@ val account = Account(client) val response = account.updateMfaAuthenticator( type = AuthenticatorType.TOTP, - otp = "{$example}" + otp = "<OTP>" ) diff --git a/docs/examples/kotlin/account/update-mfa-challenge.md b/docs/examples/kotlin/account/update-mfa-challenge.md index 3c17b77..2a9a1a4 100644 --- a/docs/examples/kotlin/account/update-mfa-challenge.md +++ b/docs/examples/kotlin/account/update-mfa-challenge.md @@ -10,6 +10,6 @@ val client = Client() val account = Account(client) val response = account.updateMfaChallenge( - challengeId = "{$example}", - otp = "{$example}" + challengeId = "<CHALLENGE_ID>", + otp = "<OTP>" ) diff --git a/docs/examples/kotlin/account/update-name.md b/docs/examples/kotlin/account/update-name.md index 99f3bbe..13f9019 100644 --- a/docs/examples/kotlin/account/update-name.md +++ b/docs/examples/kotlin/account/update-name.md @@ -10,5 +10,5 @@ val client = Client() val account = Account(client) val response = account.updateName( - name = "{$example}" + name = "<NAME>" ) diff --git a/docs/examples/kotlin/account/update-password.md b/docs/examples/kotlin/account/update-password.md index 25f5331..fbb6796 100644 --- a/docs/examples/kotlin/account/update-password.md +++ b/docs/examples/kotlin/account/update-password.md @@ -11,5 +11,5 @@ val account = Account(client) val response = account.updatePassword( password = "", - oldPassword = "{$example}" // optional + oldPassword = "password" // optional ) diff --git a/docs/examples/kotlin/account/update-phone-session.md b/docs/examples/kotlin/account/update-phone-session.md index 20d058e..1f6aa40 100644 --- a/docs/examples/kotlin/account/update-phone-session.md +++ b/docs/examples/kotlin/account/update-phone-session.md @@ -9,6 +9,6 @@ val client = Client() val account = Account(client) val response = account.updatePhoneSession( - userId = "{$example}", - secret = "{$example}" + userId = "<USER_ID>", + secret = "<SECRET>" ) diff --git a/docs/examples/kotlin/account/update-phone-verification.md b/docs/examples/kotlin/account/update-phone-verification.md index 9ea0fe2..87cd3ff 100644 --- a/docs/examples/kotlin/account/update-phone-verification.md +++ b/docs/examples/kotlin/account/update-phone-verification.md @@ -10,6 +10,6 @@ val client = Client() val account = Account(client) val response = account.updatePhoneVerification( - userId = "{$example}", - secret = "{$example}" + userId = "<USER_ID>", + secret = "<SECRET>" ) diff --git a/docs/examples/kotlin/account/update-phone.md b/docs/examples/kotlin/account/update-phone.md index 0ad0087..1a2600c 100644 --- a/docs/examples/kotlin/account/update-phone.md +++ b/docs/examples/kotlin/account/update-phone.md @@ -10,6 +10,6 @@ val client = Client() val account = Account(client) val response = account.updatePhone( - phone = "{$example}", - password = "{$example}" + phone = "+12065550100", + password = "password" ) diff --git a/docs/examples/kotlin/account/update-recovery.md b/docs/examples/kotlin/account/update-recovery.md index 6f23361..8626e97 100644 --- a/docs/examples/kotlin/account/update-recovery.md +++ b/docs/examples/kotlin/account/update-recovery.md @@ -10,7 +10,7 @@ val client = Client() val account = Account(client) val response = account.updateRecovery( - userId = "{$example}", - secret = "{$example}", + userId = "<USER_ID>", + secret = "<SECRET>", password = "" ) diff --git a/docs/examples/kotlin/account/update-session.md b/docs/examples/kotlin/account/update-session.md index 80960ae..5f83a2b 100644 --- a/docs/examples/kotlin/account/update-session.md +++ b/docs/examples/kotlin/account/update-session.md @@ -10,5 +10,5 @@ val client = Client() val account = Account(client) val response = account.updateSession( - sessionId = "{$example}" + sessionId = "<SESSION_ID>" ) diff --git a/docs/examples/kotlin/account/update-verification.md b/docs/examples/kotlin/account/update-verification.md index 0a37414..2f8cc25 100644 --- a/docs/examples/kotlin/account/update-verification.md +++ b/docs/examples/kotlin/account/update-verification.md @@ -10,6 +10,6 @@ val client = Client() val account = Account(client) val response = account.updateVerification( - userId = "{$example}", - secret = "{$example}" + userId = "<USER_ID>", + secret = "<SECRET>" ) diff --git a/docs/examples/kotlin/avatars/get-favicon.md b/docs/examples/kotlin/avatars/get-favicon.md index cdded7d..8cf4af2 100644 --- a/docs/examples/kotlin/avatars/get-favicon.md +++ b/docs/examples/kotlin/avatars/get-favicon.md @@ -10,5 +10,5 @@ val client = Client() val avatars = Avatars(client) val result = avatars.getFavicon( - url = "{$example}" + url = "https://example.com" ) diff --git a/docs/examples/kotlin/avatars/get-image.md b/docs/examples/kotlin/avatars/get-image.md index 7bce377..1369000 100644 --- a/docs/examples/kotlin/avatars/get-image.md +++ b/docs/examples/kotlin/avatars/get-image.md @@ -10,7 +10,7 @@ val client = Client() val avatars = Avatars(client) val result = avatars.getImage( - url = "{$example}", + url = "https://example.com", width = 0, // optional height = 0 // optional ) diff --git a/docs/examples/kotlin/avatars/get-initials.md b/docs/examples/kotlin/avatars/get-initials.md index 8c393b4..9549924 100644 --- a/docs/examples/kotlin/avatars/get-initials.md +++ b/docs/examples/kotlin/avatars/get-initials.md @@ -10,7 +10,7 @@ val client = Client() val avatars = Avatars(client) val result = avatars.getInitials( - name = "{$example}", // optional + name = "<NAME>", // optional width = 0, // optional height = 0, // optional background = "" // optional diff --git a/docs/examples/kotlin/avatars/get-q-r.md b/docs/examples/kotlin/avatars/get-q-r.md index fcbf579..cea667b 100644 --- a/docs/examples/kotlin/avatars/get-q-r.md +++ b/docs/examples/kotlin/avatars/get-q-r.md @@ -10,7 +10,7 @@ val client = Client() val avatars = Avatars(client) val result = avatars.getQR( - text = "{$example}", + text = "<TEXT>", size = 1, // optional margin = 0, // optional download = false // optional diff --git a/docs/examples/kotlin/databases/create-boolean-attribute.md b/docs/examples/kotlin/databases/create-boolean-attribute.md index 4d28b22..64ac210 100644 --- a/docs/examples/kotlin/databases/create-boolean-attribute.md +++ b/docs/examples/kotlin/databases/create-boolean-attribute.md @@ -10,8 +10,8 @@ val client = Client() val databases = Databases(client) val response = databases.createBooleanAttribute( - databaseId = "{$example}", - collectionId = "{$example}", + databaseId = "<DATABASE_ID>", + collectionId = "<COLLECTION_ID>", key = "", required = false, default = false, // optional diff --git a/docs/examples/kotlin/databases/create-collection.md b/docs/examples/kotlin/databases/create-collection.md index 242f4e1..03ca6a4 100644 --- a/docs/examples/kotlin/databases/create-collection.md +++ b/docs/examples/kotlin/databases/create-collection.md @@ -10,9 +10,9 @@ val client = Client() val databases = Databases(client) val response = databases.createCollection( - databaseId = "{$example}", - collectionId = "{$example}", - name = "{$example}", + databaseId = "<DATABASE_ID>", + collectionId = "<COLLECTION_ID>", + name = "<NAME>", permissions = listOf("read("any")"), // optional documentSecurity = false, // optional enabled = false // optional diff --git a/docs/examples/kotlin/databases/create-datetime-attribute.md b/docs/examples/kotlin/databases/create-datetime-attribute.md index 03ba382..d9e0771 100644 --- a/docs/examples/kotlin/databases/create-datetime-attribute.md +++ b/docs/examples/kotlin/databases/create-datetime-attribute.md @@ -10,8 +10,8 @@ val client = Client() val databases = Databases(client) val response = databases.createDatetimeAttribute( - databaseId = "{$example}", - collectionId = "{$example}", + databaseId = "<DATABASE_ID>", + collectionId = "<COLLECTION_ID>", key = "", required = false, default = "", // optional diff --git a/docs/examples/kotlin/databases/create-document.md b/docs/examples/kotlin/databases/create-document.md index ab931c8..873e2ed 100644 --- a/docs/examples/kotlin/databases/create-document.md +++ b/docs/examples/kotlin/databases/create-document.md @@ -10,9 +10,9 @@ val client = Client() val databases = Databases(client) val response = databases.createDocument( - databaseId = "{$example}", - collectionId = "{$example}", - documentId = "{$example}", + databaseId = "<DATABASE_ID>", + collectionId = "<COLLECTION_ID>", + documentId = "<DOCUMENT_ID>", data = mapOf( "a" to "b" ), permissions = listOf("read("any")") // optional ) diff --git a/docs/examples/kotlin/databases/create-email-attribute.md b/docs/examples/kotlin/databases/create-email-attribute.md index c9aaa22..5e5091b 100644 --- a/docs/examples/kotlin/databases/create-email-attribute.md +++ b/docs/examples/kotlin/databases/create-email-attribute.md @@ -10,10 +10,10 @@ val client = Client() val databases = Databases(client) val response = databases.createEmailAttribute( - databaseId = "{$example}", - collectionId = "{$example}", + databaseId = "<DATABASE_ID>", + collectionId = "<COLLECTION_ID>", key = "", required = false, - default = "{$example}", // optional + default = "email@example.com", // optional array = false // optional ) diff --git a/docs/examples/kotlin/databases/create-enum-attribute.md b/docs/examples/kotlin/databases/create-enum-attribute.md index 5e1d861..733fbad 100644 --- a/docs/examples/kotlin/databases/create-enum-attribute.md +++ b/docs/examples/kotlin/databases/create-enum-attribute.md @@ -10,11 +10,11 @@ val client = Client() val databases = Databases(client) val response = databases.createEnumAttribute( - databaseId = "{$example}", - collectionId = "{$example}", + databaseId = "<DATABASE_ID>", + collectionId = "<COLLECTION_ID>", key = "", elements = listOf(), required = false, - default = "{$example}", // optional + default = "<DEFAULT>", // optional array = false // optional ) diff --git a/docs/examples/kotlin/databases/create-float-attribute.md b/docs/examples/kotlin/databases/create-float-attribute.md index d8f0d75..04e9bfa 100644 --- a/docs/examples/kotlin/databases/create-float-attribute.md +++ b/docs/examples/kotlin/databases/create-float-attribute.md @@ -10,8 +10,8 @@ val client = Client() val databases = Databases(client) val response = databases.createFloatAttribute( - databaseId = "{$example}", - collectionId = "{$example}", + databaseId = "<DATABASE_ID>", + collectionId = "<COLLECTION_ID>", key = "", required = false, min = 0, // optional diff --git a/docs/examples/kotlin/databases/create-index.md b/docs/examples/kotlin/databases/create-index.md index 0e7e904..6dab46f 100644 --- a/docs/examples/kotlin/databases/create-index.md +++ b/docs/examples/kotlin/databases/create-index.md @@ -11,8 +11,8 @@ val client = Client() val databases = Databases(client) val response = databases.createIndex( - databaseId = "{$example}", - collectionId = "{$example}", + databaseId = "<DATABASE_ID>", + collectionId = "<COLLECTION_ID>", key = "", type = IndexType.KEY, attributes = listOf(), diff --git a/docs/examples/kotlin/databases/create-integer-attribute.md b/docs/examples/kotlin/databases/create-integer-attribute.md index 7486536..6c483bb 100644 --- a/docs/examples/kotlin/databases/create-integer-attribute.md +++ b/docs/examples/kotlin/databases/create-integer-attribute.md @@ -10,8 +10,8 @@ val client = Client() val databases = Databases(client) val response = databases.createIntegerAttribute( - databaseId = "{$example}", - collectionId = "{$example}", + databaseId = "<DATABASE_ID>", + collectionId = "<COLLECTION_ID>", key = "", required = false, min = 0, // optional diff --git a/docs/examples/kotlin/databases/create-ip-attribute.md b/docs/examples/kotlin/databases/create-ip-attribute.md index 2987db6..76dd82d 100644 --- a/docs/examples/kotlin/databases/create-ip-attribute.md +++ b/docs/examples/kotlin/databases/create-ip-attribute.md @@ -10,8 +10,8 @@ val client = Client() val databases = Databases(client) val response = databases.createIpAttribute( - databaseId = "{$example}", - collectionId = "{$example}", + databaseId = "<DATABASE_ID>", + collectionId = "<COLLECTION_ID>", key = "", required = false, default = "", // optional diff --git a/docs/examples/kotlin/databases/create-relationship-attribute.md b/docs/examples/kotlin/databases/create-relationship-attribute.md index fde42dd..4797b94 100644 --- a/docs/examples/kotlin/databases/create-relationship-attribute.md +++ b/docs/examples/kotlin/databases/create-relationship-attribute.md @@ -11,12 +11,12 @@ val client = Client() val databases = Databases(client) val response = databases.createRelationshipAttribute( - databaseId = "{$example}", - collectionId = "{$example}", - relatedCollectionId = "{$example}", + databaseId = "<DATABASE_ID>", + collectionId = "<COLLECTION_ID>", + relatedCollectionId = "<RELATED_COLLECTION_ID>", type = RelationshipType.ONETOONE, twoWay = false, // optional key = "", // optional twoWayKey = "", // optional - onDelete = "{$example}" // optional + onDelete = "cascade" // optional ) diff --git a/docs/examples/kotlin/databases/create-string-attribute.md b/docs/examples/kotlin/databases/create-string-attribute.md index b7a75b2..06781f2 100644 --- a/docs/examples/kotlin/databases/create-string-attribute.md +++ b/docs/examples/kotlin/databases/create-string-attribute.md @@ -10,12 +10,12 @@ val client = Client() val databases = Databases(client) val response = databases.createStringAttribute( - databaseId = "{$example}", - collectionId = "{$example}", + databaseId = "<DATABASE_ID>", + collectionId = "<COLLECTION_ID>", key = "", size = 1, required = false, - default = "{$example}", // optional + default = "<DEFAULT>", // optional array = false, // optional encrypt = false // optional ) diff --git a/docs/examples/kotlin/databases/create-url-attribute.md b/docs/examples/kotlin/databases/create-url-attribute.md index 7b69262..33cadc7 100644 --- a/docs/examples/kotlin/databases/create-url-attribute.md +++ b/docs/examples/kotlin/databases/create-url-attribute.md @@ -10,10 +10,10 @@ val client = Client() val databases = Databases(client) val response = databases.createUrlAttribute( - databaseId = "{$example}", - collectionId = "{$example}", + databaseId = "<DATABASE_ID>", + collectionId = "<COLLECTION_ID>", key = "", required = false, - default = "{$example}", // optional + default = "https://example.com", // optional array = false // optional ) diff --git a/docs/examples/kotlin/databases/create.md b/docs/examples/kotlin/databases/create.md index 7578782..c17246f 100644 --- a/docs/examples/kotlin/databases/create.md +++ b/docs/examples/kotlin/databases/create.md @@ -10,7 +10,7 @@ val client = Client() val databases = Databases(client) val response = databases.create( - databaseId = "{$example}", - name = "{$example}", + databaseId = "<DATABASE_ID>", + name = "<NAME>", enabled = false // optional ) diff --git a/docs/examples/kotlin/databases/delete-attribute.md b/docs/examples/kotlin/databases/delete-attribute.md index e239baf..8fed2d8 100644 --- a/docs/examples/kotlin/databases/delete-attribute.md +++ b/docs/examples/kotlin/databases/delete-attribute.md @@ -10,7 +10,7 @@ val client = Client() val databases = Databases(client) val response = databases.deleteAttribute( - databaseId = "{$example}", - collectionId = "{$example}", + databaseId = "<DATABASE_ID>", + collectionId = "<COLLECTION_ID>", key = "" ) diff --git a/docs/examples/kotlin/databases/delete-collection.md b/docs/examples/kotlin/databases/delete-collection.md index a04d4bd..2c85947 100644 --- a/docs/examples/kotlin/databases/delete-collection.md +++ b/docs/examples/kotlin/databases/delete-collection.md @@ -10,6 +10,6 @@ val client = Client() val databases = Databases(client) val response = databases.deleteCollection( - databaseId = "{$example}", - collectionId = "{$example}" + databaseId = "<DATABASE_ID>", + collectionId = "<COLLECTION_ID>" ) diff --git a/docs/examples/kotlin/databases/delete-document.md b/docs/examples/kotlin/databases/delete-document.md index 5774026..e920841 100644 --- a/docs/examples/kotlin/databases/delete-document.md +++ b/docs/examples/kotlin/databases/delete-document.md @@ -10,7 +10,7 @@ val client = Client() val databases = Databases(client) val response = databases.deleteDocument( - databaseId = "{$example}", - collectionId = "{$example}", - documentId = "{$example}" + databaseId = "<DATABASE_ID>", + collectionId = "<COLLECTION_ID>", + documentId = "<DOCUMENT_ID>" ) diff --git a/docs/examples/kotlin/databases/delete-index.md b/docs/examples/kotlin/databases/delete-index.md index d401c9d..8655b6b 100644 --- a/docs/examples/kotlin/databases/delete-index.md +++ b/docs/examples/kotlin/databases/delete-index.md @@ -10,7 +10,7 @@ val client = Client() val databases = Databases(client) val response = databases.deleteIndex( - databaseId = "{$example}", - collectionId = "{$example}", + databaseId = "<DATABASE_ID>", + collectionId = "<COLLECTION_ID>", key = "" ) diff --git a/docs/examples/kotlin/databases/delete.md b/docs/examples/kotlin/databases/delete.md index a769ea6..13c5660 100644 --- a/docs/examples/kotlin/databases/delete.md +++ b/docs/examples/kotlin/databases/delete.md @@ -10,5 +10,5 @@ val client = Client() val databases = Databases(client) val response = databases.delete( - databaseId = "{$example}" + databaseId = "<DATABASE_ID>" ) diff --git a/docs/examples/kotlin/databases/get-attribute.md b/docs/examples/kotlin/databases/get-attribute.md index 16c6a85..6a7ceb2 100644 --- a/docs/examples/kotlin/databases/get-attribute.md +++ b/docs/examples/kotlin/databases/get-attribute.md @@ -10,7 +10,7 @@ val client = Client() val databases = Databases(client) val response = databases.getAttribute( - databaseId = "{$example}", - collectionId = "{$example}", + databaseId = "<DATABASE_ID>", + collectionId = "<COLLECTION_ID>", key = "" ) diff --git a/docs/examples/kotlin/databases/get-collection.md b/docs/examples/kotlin/databases/get-collection.md index cdc2f97..79980c5 100644 --- a/docs/examples/kotlin/databases/get-collection.md +++ b/docs/examples/kotlin/databases/get-collection.md @@ -10,6 +10,6 @@ val client = Client() val databases = Databases(client) val response = databases.getCollection( - databaseId = "{$example}", - collectionId = "{$example}" + databaseId = "<DATABASE_ID>", + collectionId = "<COLLECTION_ID>" ) diff --git a/docs/examples/kotlin/databases/get-document.md b/docs/examples/kotlin/databases/get-document.md index e555d21..508e0da 100644 --- a/docs/examples/kotlin/databases/get-document.md +++ b/docs/examples/kotlin/databases/get-document.md @@ -10,8 +10,8 @@ val client = Client() val databases = Databases(client) val response = databases.getDocument( - databaseId = "{$example}", - collectionId = "{$example}", - documentId = "{$example}", + databaseId = "<DATABASE_ID>", + collectionId = "<COLLECTION_ID>", + documentId = "<DOCUMENT_ID>", queries = listOf() // optional ) diff --git a/docs/examples/kotlin/databases/get-index.md b/docs/examples/kotlin/databases/get-index.md index 33041a5..3935c38 100644 --- a/docs/examples/kotlin/databases/get-index.md +++ b/docs/examples/kotlin/databases/get-index.md @@ -10,7 +10,7 @@ val client = Client() val databases = Databases(client) val response = databases.getIndex( - databaseId = "{$example}", - collectionId = "{$example}", + databaseId = "<DATABASE_ID>", + collectionId = "<COLLECTION_ID>", key = "" ) diff --git a/docs/examples/kotlin/databases/get.md b/docs/examples/kotlin/databases/get.md index 56dd934..bb6b17c 100644 --- a/docs/examples/kotlin/databases/get.md +++ b/docs/examples/kotlin/databases/get.md @@ -10,5 +10,5 @@ val client = Client() val databases = Databases(client) val response = databases.get( - databaseId = "{$example}" + databaseId = "<DATABASE_ID>" ) diff --git a/docs/examples/kotlin/databases/list-attributes.md b/docs/examples/kotlin/databases/list-attributes.md index 051c2d2..b3f26a2 100644 --- a/docs/examples/kotlin/databases/list-attributes.md +++ b/docs/examples/kotlin/databases/list-attributes.md @@ -10,7 +10,7 @@ val client = Client() val databases = Databases(client) val response = databases.listAttributes( - databaseId = "{$example}", - collectionId = "{$example}", + databaseId = "<DATABASE_ID>", + collectionId = "<COLLECTION_ID>", queries = listOf() // optional ) diff --git a/docs/examples/kotlin/databases/list-collections.md b/docs/examples/kotlin/databases/list-collections.md index 05b7430..9bdfa6e 100644 --- a/docs/examples/kotlin/databases/list-collections.md +++ b/docs/examples/kotlin/databases/list-collections.md @@ -10,7 +10,7 @@ val client = Client() val databases = Databases(client) val response = databases.listCollections( - databaseId = "{$example}", + databaseId = "<DATABASE_ID>", queries = listOf(), // optional - search = "{$example}" // optional + search = "<SEARCH>" // optional ) diff --git a/docs/examples/kotlin/databases/list-documents.md b/docs/examples/kotlin/databases/list-documents.md index 1a51d69..90cef39 100644 --- a/docs/examples/kotlin/databases/list-documents.md +++ b/docs/examples/kotlin/databases/list-documents.md @@ -10,7 +10,7 @@ val client = Client() val databases = Databases(client) val response = databases.listDocuments( - databaseId = "{$example}", - collectionId = "{$example}", + databaseId = "<DATABASE_ID>", + collectionId = "<COLLECTION_ID>", queries = listOf() // optional ) diff --git a/docs/examples/kotlin/databases/list-indexes.md b/docs/examples/kotlin/databases/list-indexes.md index 28e4637..6dd29ba 100644 --- a/docs/examples/kotlin/databases/list-indexes.md +++ b/docs/examples/kotlin/databases/list-indexes.md @@ -10,7 +10,7 @@ val client = Client() val databases = Databases(client) val response = databases.listIndexes( - databaseId = "{$example}", - collectionId = "{$example}", + databaseId = "<DATABASE_ID>", + collectionId = "<COLLECTION_ID>", queries = listOf() // optional ) diff --git a/docs/examples/kotlin/databases/list.md b/docs/examples/kotlin/databases/list.md index 82f0598..f7f332b 100644 --- a/docs/examples/kotlin/databases/list.md +++ b/docs/examples/kotlin/databases/list.md @@ -11,5 +11,5 @@ val databases = Databases(client) val response = databases.list( queries = listOf(), // optional - search = "{$example}" // optional + search = "<SEARCH>" // optional ) diff --git a/docs/examples/kotlin/databases/update-boolean-attribute.md b/docs/examples/kotlin/databases/update-boolean-attribute.md index a602d3d..ebffab7 100644 --- a/docs/examples/kotlin/databases/update-boolean-attribute.md +++ b/docs/examples/kotlin/databases/update-boolean-attribute.md @@ -10,8 +10,8 @@ val client = Client() val databases = Databases(client) val response = databases.updateBooleanAttribute( - databaseId = "{$example}", - collectionId = "{$example}", + databaseId = "<DATABASE_ID>", + collectionId = "<COLLECTION_ID>", key = "", required = false, default = false, diff --git a/docs/examples/kotlin/databases/update-collection.md b/docs/examples/kotlin/databases/update-collection.md index 1366927..7ceef84 100644 --- a/docs/examples/kotlin/databases/update-collection.md +++ b/docs/examples/kotlin/databases/update-collection.md @@ -10,9 +10,9 @@ val client = Client() val databases = Databases(client) val response = databases.updateCollection( - databaseId = "{$example}", - collectionId = "{$example}", - name = "{$example}", + databaseId = "<DATABASE_ID>", + collectionId = "<COLLECTION_ID>", + name = "<NAME>", permissions = listOf("read("any")"), // optional documentSecurity = false, // optional enabled = false // optional diff --git a/docs/examples/kotlin/databases/update-datetime-attribute.md b/docs/examples/kotlin/databases/update-datetime-attribute.md index d8b8c07..676c779 100644 --- a/docs/examples/kotlin/databases/update-datetime-attribute.md +++ b/docs/examples/kotlin/databases/update-datetime-attribute.md @@ -10,8 +10,8 @@ val client = Client() val databases = Databases(client) val response = databases.updateDatetimeAttribute( - databaseId = "{$example}", - collectionId = "{$example}", + databaseId = "<DATABASE_ID>", + collectionId = "<COLLECTION_ID>", key = "", required = false, default = "", diff --git a/docs/examples/kotlin/databases/update-document.md b/docs/examples/kotlin/databases/update-document.md index b0323b1..1737be1 100644 --- a/docs/examples/kotlin/databases/update-document.md +++ b/docs/examples/kotlin/databases/update-document.md @@ -10,9 +10,9 @@ val client = Client() val databases = Databases(client) val response = databases.updateDocument( - databaseId = "{$example}", - collectionId = "{$example}", - documentId = "{$example}", + databaseId = "<DATABASE_ID>", + collectionId = "<COLLECTION_ID>", + documentId = "<DOCUMENT_ID>", data = mapOf( "a" to "b" ), // optional permissions = listOf("read("any")") // optional ) diff --git a/docs/examples/kotlin/databases/update-email-attribute.md b/docs/examples/kotlin/databases/update-email-attribute.md index b1cd638..2f1cbd2 100644 --- a/docs/examples/kotlin/databases/update-email-attribute.md +++ b/docs/examples/kotlin/databases/update-email-attribute.md @@ -10,10 +10,10 @@ val client = Client() val databases = Databases(client) val response = databases.updateEmailAttribute( - databaseId = "{$example}", - collectionId = "{$example}", + databaseId = "<DATABASE_ID>", + collectionId = "<COLLECTION_ID>", key = "", required = false, - default = "{$example}", + default = "email@example.com", newKey = "" // optional ) diff --git a/docs/examples/kotlin/databases/update-enum-attribute.md b/docs/examples/kotlin/databases/update-enum-attribute.md index 2935db8..7c0c92f 100644 --- a/docs/examples/kotlin/databases/update-enum-attribute.md +++ b/docs/examples/kotlin/databases/update-enum-attribute.md @@ -10,11 +10,11 @@ val client = Client() val databases = Databases(client) val response = databases.updateEnumAttribute( - databaseId = "{$example}", - collectionId = "{$example}", + databaseId = "<DATABASE_ID>", + collectionId = "<COLLECTION_ID>", key = "", elements = listOf(), required = false, - default = "{$example}", + default = "<DEFAULT>", newKey = "" // optional ) diff --git a/docs/examples/kotlin/databases/update-float-attribute.md b/docs/examples/kotlin/databases/update-float-attribute.md index 6a7c608..4701530 100644 --- a/docs/examples/kotlin/databases/update-float-attribute.md +++ b/docs/examples/kotlin/databases/update-float-attribute.md @@ -10,8 +10,8 @@ val client = Client() val databases = Databases(client) val response = databases.updateFloatAttribute( - databaseId = "{$example}", - collectionId = "{$example}", + databaseId = "<DATABASE_ID>", + collectionId = "<COLLECTION_ID>", key = "", required = false, min = 0, diff --git a/docs/examples/kotlin/databases/update-integer-attribute.md b/docs/examples/kotlin/databases/update-integer-attribute.md index 559f857..e5742a5 100644 --- a/docs/examples/kotlin/databases/update-integer-attribute.md +++ b/docs/examples/kotlin/databases/update-integer-attribute.md @@ -10,8 +10,8 @@ val client = Client() val databases = Databases(client) val response = databases.updateIntegerAttribute( - databaseId = "{$example}", - collectionId = "{$example}", + databaseId = "<DATABASE_ID>", + collectionId = "<COLLECTION_ID>", key = "", required = false, min = 0, diff --git a/docs/examples/kotlin/databases/update-ip-attribute.md b/docs/examples/kotlin/databases/update-ip-attribute.md index ce63f4f..bfc0cdd 100644 --- a/docs/examples/kotlin/databases/update-ip-attribute.md +++ b/docs/examples/kotlin/databases/update-ip-attribute.md @@ -10,8 +10,8 @@ val client = Client() val databases = Databases(client) val response = databases.updateIpAttribute( - databaseId = "{$example}", - collectionId = "{$example}", + databaseId = "<DATABASE_ID>", + collectionId = "<COLLECTION_ID>", key = "", required = false, default = "", diff --git a/docs/examples/kotlin/databases/update-relationship-attribute.md b/docs/examples/kotlin/databases/update-relationship-attribute.md index 11bcc36..ab12195 100644 --- a/docs/examples/kotlin/databases/update-relationship-attribute.md +++ b/docs/examples/kotlin/databases/update-relationship-attribute.md @@ -10,9 +10,9 @@ val client = Client() val databases = Databases(client) val response = databases.updateRelationshipAttribute( - databaseId = "{$example}", - collectionId = "{$example}", + databaseId = "<DATABASE_ID>", + collectionId = "<COLLECTION_ID>", key = "", - onDelete = "{$example}", // optional + onDelete = "cascade", // optional newKey = "" // optional ) diff --git a/docs/examples/kotlin/databases/update-string-attribute.md b/docs/examples/kotlin/databases/update-string-attribute.md index a9eb970..32e17be 100644 --- a/docs/examples/kotlin/databases/update-string-attribute.md +++ b/docs/examples/kotlin/databases/update-string-attribute.md @@ -10,11 +10,11 @@ val client = Client() val databases = Databases(client) val response = databases.updateStringAttribute( - databaseId = "{$example}", - collectionId = "{$example}", + databaseId = "<DATABASE_ID>", + collectionId = "<COLLECTION_ID>", key = "", required = false, - default = "{$example}", - size = 0, // optional + default = "<DEFAULT>", + size = 1, // optional newKey = "" // optional ) diff --git a/docs/examples/kotlin/databases/update-url-attribute.md b/docs/examples/kotlin/databases/update-url-attribute.md index de26a1e..7835113 100644 --- a/docs/examples/kotlin/databases/update-url-attribute.md +++ b/docs/examples/kotlin/databases/update-url-attribute.md @@ -10,10 +10,10 @@ val client = Client() val databases = Databases(client) val response = databases.updateUrlAttribute( - databaseId = "{$example}", - collectionId = "{$example}", + databaseId = "<DATABASE_ID>", + collectionId = "<COLLECTION_ID>", key = "", required = false, - default = "{$example}", + default = "https://example.com", newKey = "" // optional ) diff --git a/docs/examples/kotlin/databases/update.md b/docs/examples/kotlin/databases/update.md index 1cdcb54..7da795c 100644 --- a/docs/examples/kotlin/databases/update.md +++ b/docs/examples/kotlin/databases/update.md @@ -10,7 +10,7 @@ val client = Client() val databases = Databases(client) val response = databases.update( - databaseId = "{$example}", - name = "{$example}", + databaseId = "<DATABASE_ID>", + name = "<NAME>", enabled = false // optional ) diff --git a/docs/examples/kotlin/functions/create-build.md b/docs/examples/kotlin/functions/create-build.md index b7c3c66..6d20586 100644 --- a/docs/examples/kotlin/functions/create-build.md +++ b/docs/examples/kotlin/functions/create-build.md @@ -10,7 +10,7 @@ val client = Client() val functions = Functions(client) val response = functions.createBuild( - functionId = "{$example}", - deploymentId = "{$example}", - buildId = "{$example}" // optional + functionId = "<FUNCTION_ID>", + deploymentId = "<DEPLOYMENT_ID>", + buildId = "<BUILD_ID>" // optional ) diff --git a/docs/examples/kotlin/functions/create-deployment.md b/docs/examples/kotlin/functions/create-deployment.md index 1430d9f..aba8f0c 100644 --- a/docs/examples/kotlin/functions/create-deployment.md +++ b/docs/examples/kotlin/functions/create-deployment.md @@ -1,6 +1,6 @@ import io.appwrite.Client import io.appwrite.coroutines.CoroutineCallback -import io.appwrite.models.Payload +import io.appwrite.models.InputFile import io.appwrite.services.Functions val client = Client() @@ -11,9 +11,9 @@ val client = Client() val functions = Functions(client) val response = functions.createDeployment( - functionId = "{$example}", - code = Payload.fromFile("/path/to/file.png"), + functionId = "<FUNCTION_ID>", + code = InputFile.fromPath("file.png"), activate = false, - entrypoint = "{$example}", // optional - commands = "{$example}" // optional + entrypoint = "<ENTRYPOINT>", // optional + commands = "<COMMANDS>" // optional ) diff --git a/docs/examples/kotlin/functions/create-execution.md b/docs/examples/kotlin/functions/create-execution.md index 3130526..4226745 100644 --- a/docs/examples/kotlin/functions/create-execution.md +++ b/docs/examples/kotlin/functions/create-execution.md @@ -10,11 +10,11 @@ val client = Client() val functions = Functions(client) val response = functions.createExecution( - functionId = "{$example}", - body = Payload.fromJson(mapOf("x" to "y" as Any)), // optional + functionId = "<FUNCTION_ID>", + body = "<BODY>", // optional async = false, // optional - path = "{$example}", // optional - method = "{$example}", // optional + path = "<PATH>", // optional + method = "GET", // optional headers = mapOf( "a" to "b" ), // optional scheduledAt = "" // optional ) diff --git a/docs/examples/kotlin/functions/create-variable.md b/docs/examples/kotlin/functions/create-variable.md index 92e8454..e5d33b4 100644 --- a/docs/examples/kotlin/functions/create-variable.md +++ b/docs/examples/kotlin/functions/create-variable.md @@ -10,7 +10,7 @@ val client = Client() val functions = Functions(client) val response = functions.createVariable( - functionId = "{$example}", - key = "{$example}", - value = "{$example}" + functionId = "<FUNCTION_ID>", + key = "<KEY>", + value = "<VALUE>" ) diff --git a/docs/examples/kotlin/functions/create.md b/docs/examples/kotlin/functions/create.md index 5f41dcb..d94bdf6 100644 --- a/docs/examples/kotlin/functions/create.md +++ b/docs/examples/kotlin/functions/create.md @@ -11,8 +11,8 @@ val client = Client() val functions = Functions(client) val response = functions.create( - functionId = "{$example}", - name = "{$example}", + functionId = "<FUNCTION_ID>", + name = "<NAME>", runtime = .NODE_14_5, execute = listOf("any"), // optional events = listOf(), // optional @@ -20,17 +20,17 @@ val response = functions.create( timeout = 1, // optional enabled = false, // optional logging = false, // optional - entrypoint = "{$example}", // optional - commands = "{$example}", // optional + entrypoint = "<ENTRYPOINT>", // optional + commands = "<COMMANDS>", // optional scopes = listOf(), // optional - installationId = "{$example}", // optional - providerRepositoryId = "{$example}", // optional - providerBranch = "{$example}", // optional + installationId = "<INSTALLATION_ID>", // optional + providerRepositoryId = "<PROVIDER_REPOSITORY_ID>", // optional + providerBranch = "<PROVIDER_BRANCH>", // optional providerSilentMode = false, // optional - providerRootDirectory = "{$example}", // optional - templateRepository = "{$example}", // optional - templateOwner = "{$example}", // optional - templateRootDirectory = "{$example}", // optional - templateVersion = "{$example}", // optional + providerRootDirectory = "<PROVIDER_ROOT_DIRECTORY>", // optional + templateRepository = "<TEMPLATE_REPOSITORY>", // optional + templateOwner = "<TEMPLATE_OWNER>", // optional + templateRootDirectory = "<TEMPLATE_ROOT_DIRECTORY>", // optional + templateVersion = "<TEMPLATE_VERSION>", // optional specification = "" // optional ) diff --git a/docs/examples/kotlin/functions/delete-deployment.md b/docs/examples/kotlin/functions/delete-deployment.md index 536c1eb..9e4e476 100644 --- a/docs/examples/kotlin/functions/delete-deployment.md +++ b/docs/examples/kotlin/functions/delete-deployment.md @@ -10,6 +10,6 @@ val client = Client() val functions = Functions(client) val response = functions.deleteDeployment( - functionId = "{$example}", - deploymentId = "{$example}" + functionId = "<FUNCTION_ID>", + deploymentId = "<DEPLOYMENT_ID>" ) diff --git a/docs/examples/kotlin/functions/delete-execution.md b/docs/examples/kotlin/functions/delete-execution.md index fafd118..eb1f59e 100644 --- a/docs/examples/kotlin/functions/delete-execution.md +++ b/docs/examples/kotlin/functions/delete-execution.md @@ -10,6 +10,6 @@ val client = Client() val functions = Functions(client) val response = functions.deleteExecution( - functionId = "{$example}", - executionId = "{$example}" + functionId = "<FUNCTION_ID>", + executionId = "<EXECUTION_ID>" ) diff --git a/docs/examples/kotlin/functions/delete-variable.md b/docs/examples/kotlin/functions/delete-variable.md index 1119f9a..912e769 100644 --- a/docs/examples/kotlin/functions/delete-variable.md +++ b/docs/examples/kotlin/functions/delete-variable.md @@ -10,6 +10,6 @@ val client = Client() val functions = Functions(client) val response = functions.deleteVariable( - functionId = "{$example}", - variableId = "{$example}" + functionId = "<FUNCTION_ID>", + variableId = "<VARIABLE_ID>" ) diff --git a/docs/examples/kotlin/functions/delete.md b/docs/examples/kotlin/functions/delete.md index c1b4425..97f0b00 100644 --- a/docs/examples/kotlin/functions/delete.md +++ b/docs/examples/kotlin/functions/delete.md @@ -10,5 +10,5 @@ val client = Client() val functions = Functions(client) val response = functions.delete( - functionId = "{$example}" + functionId = "<FUNCTION_ID>" ) diff --git a/docs/examples/kotlin/functions/get-deployment-download.md b/docs/examples/kotlin/functions/get-deployment-download.md index 0160905..13dec6a 100644 --- a/docs/examples/kotlin/functions/get-deployment-download.md +++ b/docs/examples/kotlin/functions/get-deployment-download.md @@ -10,6 +10,6 @@ val client = Client() val functions = Functions(client) val result = functions.getDeploymentDownload( - functionId = "{$example}", - deploymentId = "{$example}" + functionId = "<FUNCTION_ID>", + deploymentId = "<DEPLOYMENT_ID>" ) diff --git a/docs/examples/kotlin/functions/get-deployment.md b/docs/examples/kotlin/functions/get-deployment.md index 4b2b8c1..e844328 100644 --- a/docs/examples/kotlin/functions/get-deployment.md +++ b/docs/examples/kotlin/functions/get-deployment.md @@ -10,6 +10,6 @@ val client = Client() val functions = Functions(client) val response = functions.getDeployment( - functionId = "{$example}", - deploymentId = "{$example}" + functionId = "<FUNCTION_ID>", + deploymentId = "<DEPLOYMENT_ID>" ) diff --git a/docs/examples/kotlin/functions/get-execution.md b/docs/examples/kotlin/functions/get-execution.md index 9b4496e..5f981bf 100644 --- a/docs/examples/kotlin/functions/get-execution.md +++ b/docs/examples/kotlin/functions/get-execution.md @@ -10,6 +10,6 @@ val client = Client() val functions = Functions(client) val response = functions.getExecution( - functionId = "{$example}", - executionId = "{$example}" + functionId = "<FUNCTION_ID>", + executionId = "<EXECUTION_ID>" ) diff --git a/docs/examples/kotlin/functions/get-variable.md b/docs/examples/kotlin/functions/get-variable.md index 6522ed6..8d6ee38 100644 --- a/docs/examples/kotlin/functions/get-variable.md +++ b/docs/examples/kotlin/functions/get-variable.md @@ -10,6 +10,6 @@ val client = Client() val functions = Functions(client) val response = functions.getVariable( - functionId = "{$example}", - variableId = "{$example}" + functionId = "<FUNCTION_ID>", + variableId = "<VARIABLE_ID>" ) diff --git a/docs/examples/kotlin/functions/get.md b/docs/examples/kotlin/functions/get.md index 95b07bd..f56d8b9 100644 --- a/docs/examples/kotlin/functions/get.md +++ b/docs/examples/kotlin/functions/get.md @@ -10,5 +10,5 @@ val client = Client() val functions = Functions(client) val response = functions.get( - functionId = "{$example}" + functionId = "<FUNCTION_ID>" ) diff --git a/docs/examples/kotlin/functions/list-deployments.md b/docs/examples/kotlin/functions/list-deployments.md index ea833ec..cf7deff 100644 --- a/docs/examples/kotlin/functions/list-deployments.md +++ b/docs/examples/kotlin/functions/list-deployments.md @@ -10,7 +10,7 @@ val client = Client() val functions = Functions(client) val response = functions.listDeployments( - functionId = "{$example}", + functionId = "<FUNCTION_ID>", queries = listOf(), // optional - search = "{$example}" // optional + search = "<SEARCH>" // optional ) diff --git a/docs/examples/kotlin/functions/list-executions.md b/docs/examples/kotlin/functions/list-executions.md index b540ad8..8f4546c 100644 --- a/docs/examples/kotlin/functions/list-executions.md +++ b/docs/examples/kotlin/functions/list-executions.md @@ -10,7 +10,7 @@ val client = Client() val functions = Functions(client) val response = functions.listExecutions( - functionId = "{$example}", + functionId = "<FUNCTION_ID>", queries = listOf(), // optional - search = "{$example}" // optional + search = "<SEARCH>" // optional ) diff --git a/docs/examples/kotlin/functions/list-variables.md b/docs/examples/kotlin/functions/list-variables.md index 1e6d91a..4876517 100644 --- a/docs/examples/kotlin/functions/list-variables.md +++ b/docs/examples/kotlin/functions/list-variables.md @@ -10,5 +10,5 @@ val client = Client() val functions = Functions(client) val response = functions.listVariables( - functionId = "{$example}" + functionId = "<FUNCTION_ID>" ) diff --git a/docs/examples/kotlin/functions/list.md b/docs/examples/kotlin/functions/list.md index 22f11e5..9a58501 100644 --- a/docs/examples/kotlin/functions/list.md +++ b/docs/examples/kotlin/functions/list.md @@ -11,5 +11,5 @@ val functions = Functions(client) val response = functions.list( queries = listOf(), // optional - search = "{$example}" // optional + search = "<SEARCH>" // optional ) diff --git a/docs/examples/kotlin/functions/update-deployment-build.md b/docs/examples/kotlin/functions/update-deployment-build.md index aa75556..6adb07a 100644 --- a/docs/examples/kotlin/functions/update-deployment-build.md +++ b/docs/examples/kotlin/functions/update-deployment-build.md @@ -10,6 +10,6 @@ val client = Client() val functions = Functions(client) val response = functions.updateDeploymentBuild( - functionId = "{$example}", - deploymentId = "{$example}" + functionId = "<FUNCTION_ID>", + deploymentId = "<DEPLOYMENT_ID>" ) diff --git a/docs/examples/kotlin/functions/update-deployment.md b/docs/examples/kotlin/functions/update-deployment.md index 784d9f6..fb95b08 100644 --- a/docs/examples/kotlin/functions/update-deployment.md +++ b/docs/examples/kotlin/functions/update-deployment.md @@ -10,6 +10,6 @@ val client = Client() val functions = Functions(client) val response = functions.updateDeployment( - functionId = "{$example}", - deploymentId = "{$example}" + functionId = "<FUNCTION_ID>", + deploymentId = "<DEPLOYMENT_ID>" ) diff --git a/docs/examples/kotlin/functions/update-variable.md b/docs/examples/kotlin/functions/update-variable.md index ad466ac..db9438c 100644 --- a/docs/examples/kotlin/functions/update-variable.md +++ b/docs/examples/kotlin/functions/update-variable.md @@ -10,8 +10,8 @@ val client = Client() val functions = Functions(client) val response = functions.updateVariable( - functionId = "{$example}", - variableId = "{$example}", - key = "{$example}", - value = "{$example}" // optional + functionId = "<FUNCTION_ID>", + variableId = "<VARIABLE_ID>", + key = "<KEY>", + value = "<VALUE>" // optional ) diff --git a/docs/examples/kotlin/functions/update.md b/docs/examples/kotlin/functions/update.md index 586b10a..d36c761 100644 --- a/docs/examples/kotlin/functions/update.md +++ b/docs/examples/kotlin/functions/update.md @@ -10,22 +10,22 @@ val client = Client() val functions = Functions(client) val response = functions.update( - functionId = "{$example}", - name = "{$example}", - runtime = "{$example}", // optional + functionId = "<FUNCTION_ID>", + name = "<NAME>", + runtime = "node-14.5", // optional execute = listOf("any"), // optional events = listOf(), // optional schedule = "", // optional timeout = 1, // optional enabled = false, // optional logging = false, // optional - entrypoint = "{$example}", // optional - commands = "{$example}", // optional + entrypoint = "<ENTRYPOINT>", // optional + commands = "<COMMANDS>", // optional scopes = listOf(), // optional - installationId = "{$example}", // optional - providerRepositoryId = "{$example}", // optional - providerBranch = "{$example}", // optional + installationId = "<INSTALLATION_ID>", // optional + providerRepositoryId = "<PROVIDER_REPOSITORY_ID>", // optional + providerBranch = "<PROVIDER_BRANCH>", // optional providerSilentMode = false, // optional - providerRootDirectory = "{$example}", // optional + providerRootDirectory = "<PROVIDER_ROOT_DIRECTORY>", // optional specification = "" // optional ) diff --git a/docs/examples/kotlin/health/get-queue-databases.md b/docs/examples/kotlin/health/get-queue-databases.md index 1b8bff3..fb1dce6 100644 --- a/docs/examples/kotlin/health/get-queue-databases.md +++ b/docs/examples/kotlin/health/get-queue-databases.md @@ -10,6 +10,6 @@ val client = Client() val health = Health(client) val response = health.getQueueDatabases( - name = "{$example}", // optional + name = "<NAME>", // optional threshold = 0 // optional ) diff --git a/docs/examples/kotlin/messaging/create-apns-provider.md b/docs/examples/kotlin/messaging/create-apns-provider.md index 951b922..8a58fe8 100644 --- a/docs/examples/kotlin/messaging/create-apns-provider.md +++ b/docs/examples/kotlin/messaging/create-apns-provider.md @@ -10,12 +10,12 @@ val client = Client() val messaging = Messaging(client) val response = messaging.createApnsProvider( - providerId = "{$example}", - name = "{$example}", - authKey = "{$example}", // optional - authKeyId = "{$example}", // optional - teamId = "{$example}", // optional - bundleId = "{$example}", // optional + providerId = "<PROVIDER_ID>", + name = "<NAME>", + authKey = "<AUTH_KEY>", // optional + authKeyId = "<AUTH_KEY_ID>", // optional + teamId = "<TEAM_ID>", // optional + bundleId = "<BUNDLE_ID>", // optional sandbox = false, // optional enabled = false // optional ) diff --git a/docs/examples/kotlin/messaging/create-email.md b/docs/examples/kotlin/messaging/create-email.md index a7c4d42..02b0651 100644 --- a/docs/examples/kotlin/messaging/create-email.md +++ b/docs/examples/kotlin/messaging/create-email.md @@ -10,9 +10,9 @@ val client = Client() val messaging = Messaging(client) val response = messaging.createEmail( - messageId = "{$example}", - subject = "{$example}", - content = "{$example}", + messageId = "<MESSAGE_ID>", + subject = "<SUBJECT>", + content = "<CONTENT>", topics = listOf(), // optional users = listOf(), // optional targets = listOf(), // optional diff --git a/docs/examples/kotlin/messaging/create-fcm-provider.md b/docs/examples/kotlin/messaging/create-fcm-provider.md index 71041a6..779596c 100644 --- a/docs/examples/kotlin/messaging/create-fcm-provider.md +++ b/docs/examples/kotlin/messaging/create-fcm-provider.md @@ -10,8 +10,8 @@ val client = Client() val messaging = Messaging(client) val response = messaging.createFcmProvider( - providerId = "{$example}", - name = "{$example}", + providerId = "<PROVIDER_ID>", + name = "<NAME>", serviceAccountJSON = mapOf( "a" to "b" ), // optional enabled = false // optional ) diff --git a/docs/examples/kotlin/messaging/create-mailgun-provider.md b/docs/examples/kotlin/messaging/create-mailgun-provider.md index e97ca38..a73a27f 100644 --- a/docs/examples/kotlin/messaging/create-mailgun-provider.md +++ b/docs/examples/kotlin/messaging/create-mailgun-provider.md @@ -10,14 +10,14 @@ val client = Client() val messaging = Messaging(client) val response = messaging.createMailgunProvider( - providerId = "{$example}", - name = "{$example}", - apiKey = "{$example}", // optional - domain = "{$example}", // optional + providerId = "<PROVIDER_ID>", + name = "<NAME>", + apiKey = "<API_KEY>", // optional + domain = "<DOMAIN>", // optional isEuRegion = false, // optional - fromName = "{$example}", // optional - fromEmail = "{$example}", // optional - replyToName = "{$example}", // optional - replyToEmail = "{$example}", // optional + fromName = "<FROM_NAME>", // optional + fromEmail = "email@example.com", // optional + replyToName = "<REPLY_TO_NAME>", // optional + replyToEmail = "email@example.com", // optional enabled = false // optional ) diff --git a/docs/examples/kotlin/messaging/create-msg91provider.md b/docs/examples/kotlin/messaging/create-msg91provider.md index e316efd..31eb606 100644 --- a/docs/examples/kotlin/messaging/create-msg91provider.md +++ b/docs/examples/kotlin/messaging/create-msg91provider.md @@ -10,10 +10,10 @@ val client = Client() val messaging = Messaging(client) val response = messaging.createMsg91Provider( - providerId = "{$example}", - name = "{$example}", - templateId = "{$example}", // optional - senderId = "{$example}", // optional - authKey = "{$example}", // optional + providerId = "<PROVIDER_ID>", + name = "<NAME>", + templateId = "<TEMPLATE_ID>", // optional + senderId = "<SENDER_ID>", // optional + authKey = "<AUTH_KEY>", // optional enabled = false // optional ) diff --git a/docs/examples/kotlin/messaging/create-push.md b/docs/examples/kotlin/messaging/create-push.md index 81734f3..f92a49d 100644 --- a/docs/examples/kotlin/messaging/create-push.md +++ b/docs/examples/kotlin/messaging/create-push.md @@ -10,20 +10,23 @@ val client = Client() val messaging = Messaging(client) val response = messaging.createPush( - messageId = "{$example}", - title = "{$example}", - body = "{$example}", + messageId = "<MESSAGE_ID>", + title = "<TITLE>", // optional + body = "<BODY>", // optional topics = listOf(), // optional users = listOf(), // optional targets = listOf(), // optional data = mapOf( "a" to "b" ), // optional - action = "{$example}", // optional - image = "{$example}", // optional - icon = "{$example}", // optional - sound = "{$example}", // optional - color = "{$example}", // optional - tag = "{$example}", // optional - badge = "{$example}", // optional + action = "<ACTION>", // optional + image = "[ID1:ID2]", // optional + icon = "<ICON>", // optional + sound = "<SOUND>", // optional + color = "<COLOR>", // optional + tag = "<TAG>", // optional + badge = 0, // optional draft = false, // optional - scheduledAt = "" // optional + scheduledAt = "", // optional + contentAvailable = false, // optional + critical = false, // optional + priority = "normal" // optional ) diff --git a/docs/examples/kotlin/messaging/create-sendgrid-provider.md b/docs/examples/kotlin/messaging/create-sendgrid-provider.md index 99cbfb9..34f61c9 100644 --- a/docs/examples/kotlin/messaging/create-sendgrid-provider.md +++ b/docs/examples/kotlin/messaging/create-sendgrid-provider.md @@ -10,12 +10,12 @@ val client = Client() val messaging = Messaging(client) val response = messaging.createSendgridProvider( - providerId = "{$example}", - name = "{$example}", - apiKey = "{$example}", // optional - fromName = "{$example}", // optional - fromEmail = "{$example}", // optional - replyToName = "{$example}", // optional - replyToEmail = "{$example}", // optional + providerId = "<PROVIDER_ID>", + name = "<NAME>", + apiKey = "<API_KEY>", // optional + fromName = "<FROM_NAME>", // optional + fromEmail = "email@example.com", // optional + replyToName = "<REPLY_TO_NAME>", // optional + replyToEmail = "email@example.com", // optional enabled = false // optional ) diff --git a/docs/examples/kotlin/messaging/create-sms.md b/docs/examples/kotlin/messaging/create-sms.md index c1307a3..6fbcffb 100644 --- a/docs/examples/kotlin/messaging/create-sms.md +++ b/docs/examples/kotlin/messaging/create-sms.md @@ -10,8 +10,8 @@ val client = Client() val messaging = Messaging(client) val response = messaging.createSms( - messageId = "{$example}", - content = "{$example}", + messageId = "<MESSAGE_ID>", + content = "<CONTENT>", topics = listOf(), // optional users = listOf(), // optional targets = listOf(), // optional diff --git a/docs/examples/kotlin/messaging/create-smtp-provider.md b/docs/examples/kotlin/messaging/create-smtp-provider.md index 626c825..17643dc 100644 --- a/docs/examples/kotlin/messaging/create-smtp-provider.md +++ b/docs/examples/kotlin/messaging/create-smtp-provider.md @@ -10,18 +10,18 @@ val client = Client() val messaging = Messaging(client) val response = messaging.createSmtpProvider( - providerId = "{$example}", - name = "{$example}", - host = "{$example}", + providerId = "<PROVIDER_ID>", + name = "<NAME>", + host = "<HOST>", port = 1, // optional - username = "{$example}", // optional - password = "{$example}", // optional - encryption = "{$example}", // optional + username = "<USERNAME>", // optional + password = "<PASSWORD>", // optional + encryption = "none", // optional autoTLS = false, // optional - mailer = "{$example}", // optional - fromName = "{$example}", // optional - fromEmail = "{$example}", // optional - replyToName = "{$example}", // optional - replyToEmail = "{$example}", // optional + mailer = "<MAILER>", // optional + fromName = "<FROM_NAME>", // optional + fromEmail = "email@example.com", // optional + replyToName = "<REPLY_TO_NAME>", // optional + replyToEmail = "email@example.com", // optional enabled = false // optional ) diff --git a/docs/examples/kotlin/messaging/create-subscriber.md b/docs/examples/kotlin/messaging/create-subscriber.md index 737714a..805cd58 100644 --- a/docs/examples/kotlin/messaging/create-subscriber.md +++ b/docs/examples/kotlin/messaging/create-subscriber.md @@ -10,7 +10,7 @@ val client = Client() val messaging = Messaging(client) val response = messaging.createSubscriber( - topicId = "{$example}", - subscriberId = "{$example}", - targetId = "{$example}" + topicId = "<TOPIC_ID>", + subscriberId = "<SUBSCRIBER_ID>", + targetId = "<TARGET_ID>" ) diff --git a/docs/examples/kotlin/messaging/create-telesign-provider.md b/docs/examples/kotlin/messaging/create-telesign-provider.md index a384f8e..1d44fca 100644 --- a/docs/examples/kotlin/messaging/create-telesign-provider.md +++ b/docs/examples/kotlin/messaging/create-telesign-provider.md @@ -10,10 +10,10 @@ val client = Client() val messaging = Messaging(client) val response = messaging.createTelesignProvider( - providerId = "{$example}", - name = "{$example}", - from = "{$example}", // optional - customerId = "{$example}", // optional - apiKey = "{$example}", // optional + providerId = "<PROVIDER_ID>", + name = "<NAME>", + from = "+12065550100", // optional + customerId = "<CUSTOMER_ID>", // optional + apiKey = "<API_KEY>", // optional enabled = false // optional ) diff --git a/docs/examples/kotlin/messaging/create-textmagic-provider.md b/docs/examples/kotlin/messaging/create-textmagic-provider.md index 3fc9d8f..d88b9bb 100644 --- a/docs/examples/kotlin/messaging/create-textmagic-provider.md +++ b/docs/examples/kotlin/messaging/create-textmagic-provider.md @@ -10,10 +10,10 @@ val client = Client() val messaging = Messaging(client) val response = messaging.createTextmagicProvider( - providerId = "{$example}", - name = "{$example}", - from = "{$example}", // optional - username = "{$example}", // optional - apiKey = "{$example}", // optional + providerId = "<PROVIDER_ID>", + name = "<NAME>", + from = "+12065550100", // optional + username = "<USERNAME>", // optional + apiKey = "<API_KEY>", // optional enabled = false // optional ) diff --git a/docs/examples/kotlin/messaging/create-topic.md b/docs/examples/kotlin/messaging/create-topic.md index fae1b75..6a6b9bd 100644 --- a/docs/examples/kotlin/messaging/create-topic.md +++ b/docs/examples/kotlin/messaging/create-topic.md @@ -10,7 +10,7 @@ val client = Client() val messaging = Messaging(client) val response = messaging.createTopic( - topicId = "{$example}", - name = "{$example}", + topicId = "<TOPIC_ID>", + name = "<NAME>", subscribe = listOf("any") // optional ) diff --git a/docs/examples/kotlin/messaging/create-twilio-provider.md b/docs/examples/kotlin/messaging/create-twilio-provider.md index eb6fe5e..3df99e9 100644 --- a/docs/examples/kotlin/messaging/create-twilio-provider.md +++ b/docs/examples/kotlin/messaging/create-twilio-provider.md @@ -10,10 +10,10 @@ val client = Client() val messaging = Messaging(client) val response = messaging.createTwilioProvider( - providerId = "{$example}", - name = "{$example}", - from = "{$example}", // optional - accountSid = "{$example}", // optional - authToken = "{$example}", // optional + providerId = "<PROVIDER_ID>", + name = "<NAME>", + from = "+12065550100", // optional + accountSid = "<ACCOUNT_SID>", // optional + authToken = "<AUTH_TOKEN>", // optional enabled = false // optional ) diff --git a/docs/examples/kotlin/messaging/create-vonage-provider.md b/docs/examples/kotlin/messaging/create-vonage-provider.md index 3f90439..59e5d14 100644 --- a/docs/examples/kotlin/messaging/create-vonage-provider.md +++ b/docs/examples/kotlin/messaging/create-vonage-provider.md @@ -10,10 +10,10 @@ val client = Client() val messaging = Messaging(client) val response = messaging.createVonageProvider( - providerId = "{$example}", - name = "{$example}", - from = "{$example}", // optional - apiKey = "{$example}", // optional - apiSecret = "{$example}", // optional + providerId = "<PROVIDER_ID>", + name = "<NAME>", + from = "+12065550100", // optional + apiKey = "<API_KEY>", // optional + apiSecret = "<API_SECRET>", // optional enabled = false // optional ) diff --git a/docs/examples/kotlin/messaging/delete-provider.md b/docs/examples/kotlin/messaging/delete-provider.md index 132bda3..3ecd64d 100644 --- a/docs/examples/kotlin/messaging/delete-provider.md +++ b/docs/examples/kotlin/messaging/delete-provider.md @@ -10,5 +10,5 @@ val client = Client() val messaging = Messaging(client) val response = messaging.deleteProvider( - providerId = "{$example}" + providerId = "<PROVIDER_ID>" ) diff --git a/docs/examples/kotlin/messaging/delete-subscriber.md b/docs/examples/kotlin/messaging/delete-subscriber.md index 2753d6d..4a7c18f 100644 --- a/docs/examples/kotlin/messaging/delete-subscriber.md +++ b/docs/examples/kotlin/messaging/delete-subscriber.md @@ -10,6 +10,6 @@ val client = Client() val messaging = Messaging(client) val response = messaging.deleteSubscriber( - topicId = "{$example}", - subscriberId = "{$example}" + topicId = "<TOPIC_ID>", + subscriberId = "<SUBSCRIBER_ID>" ) diff --git a/docs/examples/kotlin/messaging/delete-topic.md b/docs/examples/kotlin/messaging/delete-topic.md index fe6c480..4859c0a 100644 --- a/docs/examples/kotlin/messaging/delete-topic.md +++ b/docs/examples/kotlin/messaging/delete-topic.md @@ -10,5 +10,5 @@ val client = Client() val messaging = Messaging(client) val response = messaging.deleteTopic( - topicId = "{$example}" + topicId = "<TOPIC_ID>" ) diff --git a/docs/examples/kotlin/messaging/delete.md b/docs/examples/kotlin/messaging/delete.md index db4abf9..0b925ca 100644 --- a/docs/examples/kotlin/messaging/delete.md +++ b/docs/examples/kotlin/messaging/delete.md @@ -10,5 +10,5 @@ val client = Client() val messaging = Messaging(client) val response = messaging.delete( - messageId = "{$example}" + messageId = "<MESSAGE_ID>" ) diff --git a/docs/examples/kotlin/messaging/get-message.md b/docs/examples/kotlin/messaging/get-message.md index 77dcb31..01db389 100644 --- a/docs/examples/kotlin/messaging/get-message.md +++ b/docs/examples/kotlin/messaging/get-message.md @@ -10,5 +10,5 @@ val client = Client() val messaging = Messaging(client) val response = messaging.getMessage( - messageId = "{$example}" + messageId = "<MESSAGE_ID>" ) diff --git a/docs/examples/kotlin/messaging/get-provider.md b/docs/examples/kotlin/messaging/get-provider.md index e0c5f73..53e5cf3 100644 --- a/docs/examples/kotlin/messaging/get-provider.md +++ b/docs/examples/kotlin/messaging/get-provider.md @@ -10,5 +10,5 @@ val client = Client() val messaging = Messaging(client) val response = messaging.getProvider( - providerId = "{$example}" + providerId = "<PROVIDER_ID>" ) diff --git a/docs/examples/kotlin/messaging/get-subscriber.md b/docs/examples/kotlin/messaging/get-subscriber.md index b625692..036f17f 100644 --- a/docs/examples/kotlin/messaging/get-subscriber.md +++ b/docs/examples/kotlin/messaging/get-subscriber.md @@ -10,6 +10,6 @@ val client = Client() val messaging = Messaging(client) val response = messaging.getSubscriber( - topicId = "{$example}", - subscriberId = "{$example}" + topicId = "<TOPIC_ID>", + subscriberId = "<SUBSCRIBER_ID>" ) diff --git a/docs/examples/kotlin/messaging/get-topic.md b/docs/examples/kotlin/messaging/get-topic.md index e53609e..09d3688 100644 --- a/docs/examples/kotlin/messaging/get-topic.md +++ b/docs/examples/kotlin/messaging/get-topic.md @@ -10,5 +10,5 @@ val client = Client() val messaging = Messaging(client) val response = messaging.getTopic( - topicId = "{$example}" + topicId = "<TOPIC_ID>" ) diff --git a/docs/examples/kotlin/messaging/list-message-logs.md b/docs/examples/kotlin/messaging/list-message-logs.md index 74772ae..3048904 100644 --- a/docs/examples/kotlin/messaging/list-message-logs.md +++ b/docs/examples/kotlin/messaging/list-message-logs.md @@ -10,6 +10,6 @@ val client = Client() val messaging = Messaging(client) val response = messaging.listMessageLogs( - messageId = "{$example}", + messageId = "<MESSAGE_ID>", queries = listOf() // optional ) diff --git a/docs/examples/kotlin/messaging/list-messages.md b/docs/examples/kotlin/messaging/list-messages.md index b377171..e9e509e 100644 --- a/docs/examples/kotlin/messaging/list-messages.md +++ b/docs/examples/kotlin/messaging/list-messages.md @@ -11,5 +11,5 @@ val messaging = Messaging(client) val response = messaging.listMessages( queries = listOf(), // optional - search = "{$example}" // optional + search = "<SEARCH>" // optional ) diff --git a/docs/examples/kotlin/messaging/list-provider-logs.md b/docs/examples/kotlin/messaging/list-provider-logs.md index 81c24ec..e0a52cb 100644 --- a/docs/examples/kotlin/messaging/list-provider-logs.md +++ b/docs/examples/kotlin/messaging/list-provider-logs.md @@ -10,6 +10,6 @@ val client = Client() val messaging = Messaging(client) val response = messaging.listProviderLogs( - providerId = "{$example}", + providerId = "<PROVIDER_ID>", queries = listOf() // optional ) diff --git a/docs/examples/kotlin/messaging/list-providers.md b/docs/examples/kotlin/messaging/list-providers.md index bc055fa..66439e2 100644 --- a/docs/examples/kotlin/messaging/list-providers.md +++ b/docs/examples/kotlin/messaging/list-providers.md @@ -11,5 +11,5 @@ val messaging = Messaging(client) val response = messaging.listProviders( queries = listOf(), // optional - search = "{$example}" // optional + search = "<SEARCH>" // optional ) diff --git a/docs/examples/kotlin/messaging/list-subscriber-logs.md b/docs/examples/kotlin/messaging/list-subscriber-logs.md index 0fde1f6..5472d5f 100644 --- a/docs/examples/kotlin/messaging/list-subscriber-logs.md +++ b/docs/examples/kotlin/messaging/list-subscriber-logs.md @@ -10,6 +10,6 @@ val client = Client() val messaging = Messaging(client) val response = messaging.listSubscriberLogs( - subscriberId = "{$example}", + subscriberId = "<SUBSCRIBER_ID>", queries = listOf() // optional ) diff --git a/docs/examples/kotlin/messaging/list-subscribers.md b/docs/examples/kotlin/messaging/list-subscribers.md index cf675b2..a95e854 100644 --- a/docs/examples/kotlin/messaging/list-subscribers.md +++ b/docs/examples/kotlin/messaging/list-subscribers.md @@ -10,7 +10,7 @@ val client = Client() val messaging = Messaging(client) val response = messaging.listSubscribers( - topicId = "{$example}", + topicId = "<TOPIC_ID>", queries = listOf(), // optional - search = "{$example}" // optional + search = "<SEARCH>" // optional ) diff --git a/docs/examples/kotlin/messaging/list-targets.md b/docs/examples/kotlin/messaging/list-targets.md index 9f5bf40..a99e822 100644 --- a/docs/examples/kotlin/messaging/list-targets.md +++ b/docs/examples/kotlin/messaging/list-targets.md @@ -10,6 +10,6 @@ val client = Client() val messaging = Messaging(client) val response = messaging.listTargets( - messageId = "{$example}", + messageId = "<MESSAGE_ID>", queries = listOf() // optional ) diff --git a/docs/examples/kotlin/messaging/list-topic-logs.md b/docs/examples/kotlin/messaging/list-topic-logs.md index d0e2e51..7b7d2f0 100644 --- a/docs/examples/kotlin/messaging/list-topic-logs.md +++ b/docs/examples/kotlin/messaging/list-topic-logs.md @@ -10,6 +10,6 @@ val client = Client() val messaging = Messaging(client) val response = messaging.listTopicLogs( - topicId = "{$example}", + topicId = "<TOPIC_ID>", queries = listOf() // optional ) diff --git a/docs/examples/kotlin/messaging/list-topics.md b/docs/examples/kotlin/messaging/list-topics.md index 818793a..4550f1e 100644 --- a/docs/examples/kotlin/messaging/list-topics.md +++ b/docs/examples/kotlin/messaging/list-topics.md @@ -11,5 +11,5 @@ val messaging = Messaging(client) val response = messaging.listTopics( queries = listOf(), // optional - search = "{$example}" // optional + search = "<SEARCH>" // optional ) diff --git a/docs/examples/kotlin/messaging/update-apns-provider.md b/docs/examples/kotlin/messaging/update-apns-provider.md index 591181e..83a6083 100644 --- a/docs/examples/kotlin/messaging/update-apns-provider.md +++ b/docs/examples/kotlin/messaging/update-apns-provider.md @@ -10,12 +10,12 @@ val client = Client() val messaging = Messaging(client) val response = messaging.updateApnsProvider( - providerId = "{$example}", - name = "{$example}", // optional + providerId = "<PROVIDER_ID>", + name = "<NAME>", // optional enabled = false, // optional - authKey = "{$example}", // optional - authKeyId = "{$example}", // optional - teamId = "{$example}", // optional - bundleId = "{$example}", // optional + authKey = "<AUTH_KEY>", // optional + authKeyId = "<AUTH_KEY_ID>", // optional + teamId = "<TEAM_ID>", // optional + bundleId = "<BUNDLE_ID>", // optional sandbox = false // optional ) diff --git a/docs/examples/kotlin/messaging/update-email.md b/docs/examples/kotlin/messaging/update-email.md index 54aaa14..29baf18 100644 --- a/docs/examples/kotlin/messaging/update-email.md +++ b/docs/examples/kotlin/messaging/update-email.md @@ -10,12 +10,12 @@ val client = Client() val messaging = Messaging(client) val response = messaging.updateEmail( - messageId = "{$example}", + messageId = "<MESSAGE_ID>", topics = listOf(), // optional users = listOf(), // optional targets = listOf(), // optional - subject = "{$example}", // optional - content = "{$example}", // optional + subject = "<SUBJECT>", // optional + content = "<CONTENT>", // optional draft = false, // optional html = false, // optional cc = listOf(), // optional diff --git a/docs/examples/kotlin/messaging/update-fcm-provider.md b/docs/examples/kotlin/messaging/update-fcm-provider.md index 4cbb386..4d8534c 100644 --- a/docs/examples/kotlin/messaging/update-fcm-provider.md +++ b/docs/examples/kotlin/messaging/update-fcm-provider.md @@ -10,8 +10,8 @@ val client = Client() val messaging = Messaging(client) val response = messaging.updateFcmProvider( - providerId = "{$example}", - name = "{$example}", // optional + providerId = "<PROVIDER_ID>", + name = "<NAME>", // optional enabled = false, // optional serviceAccountJSON = mapOf( "a" to "b" ) // optional ) diff --git a/docs/examples/kotlin/messaging/update-mailgun-provider.md b/docs/examples/kotlin/messaging/update-mailgun-provider.md index 51ff655..9caff42 100644 --- a/docs/examples/kotlin/messaging/update-mailgun-provider.md +++ b/docs/examples/kotlin/messaging/update-mailgun-provider.md @@ -10,14 +10,14 @@ val client = Client() val messaging = Messaging(client) val response = messaging.updateMailgunProvider( - providerId = "{$example}", - name = "{$example}", // optional - apiKey = "{$example}", // optional - domain = "{$example}", // optional + providerId = "<PROVIDER_ID>", + name = "<NAME>", // optional + apiKey = "<API_KEY>", // optional + domain = "<DOMAIN>", // optional isEuRegion = false, // optional enabled = false, // optional - fromName = "{$example}", // optional - fromEmail = "{$example}", // optional - replyToName = "{$example}", // optional - replyToEmail = "{$example}" // optional + fromName = "<FROM_NAME>", // optional + fromEmail = "email@example.com", // optional + replyToName = "<REPLY_TO_NAME>", // optional + replyToEmail = "<REPLY_TO_EMAIL>" // optional ) diff --git a/docs/examples/kotlin/messaging/update-msg91provider.md b/docs/examples/kotlin/messaging/update-msg91provider.md index 5f4cb90..1a6a0b4 100644 --- a/docs/examples/kotlin/messaging/update-msg91provider.md +++ b/docs/examples/kotlin/messaging/update-msg91provider.md @@ -10,10 +10,10 @@ val client = Client() val messaging = Messaging(client) val response = messaging.updateMsg91Provider( - providerId = "{$example}", - name = "{$example}", // optional + providerId = "<PROVIDER_ID>", + name = "<NAME>", // optional enabled = false, // optional - templateId = "{$example}", // optional - senderId = "{$example}", // optional - authKey = "{$example}" // optional + templateId = "<TEMPLATE_ID>", // optional + senderId = "<SENDER_ID>", // optional + authKey = "<AUTH_KEY>" // optional ) diff --git a/docs/examples/kotlin/messaging/update-push.md b/docs/examples/kotlin/messaging/update-push.md index 09ef3ab..0ba72c4 100644 --- a/docs/examples/kotlin/messaging/update-push.md +++ b/docs/examples/kotlin/messaging/update-push.md @@ -10,20 +10,23 @@ val client = Client() val messaging = Messaging(client) val response = messaging.updatePush( - messageId = "{$example}", + messageId = "<MESSAGE_ID>", topics = listOf(), // optional users = listOf(), // optional targets = listOf(), // optional - title = "{$example}", // optional - body = "{$example}", // optional + title = "<TITLE>", // optional + body = "<BODY>", // optional data = mapOf( "a" to "b" ), // optional - action = "{$example}", // optional - image = "{$example}", // optional - icon = "{$example}", // optional - sound = "{$example}", // optional - color = "{$example}", // optional - tag = "{$example}", // optional + action = "<ACTION>", // optional + image = "[ID1:ID2]", // optional + icon = "<ICON>", // optional + sound = "<SOUND>", // optional + color = "<COLOR>", // optional + tag = "<TAG>", // optional badge = 0, // optional draft = false, // optional - scheduledAt = "" // optional + scheduledAt = "", // optional + contentAvailable = false, // optional + critical = false, // optional + priority = "normal" // optional ) diff --git a/docs/examples/kotlin/messaging/update-sendgrid-provider.md b/docs/examples/kotlin/messaging/update-sendgrid-provider.md index 0e3701a..353cbd0 100644 --- a/docs/examples/kotlin/messaging/update-sendgrid-provider.md +++ b/docs/examples/kotlin/messaging/update-sendgrid-provider.md @@ -10,12 +10,12 @@ val client = Client() val messaging = Messaging(client) val response = messaging.updateSendgridProvider( - providerId = "{$example}", - name = "{$example}", // optional + providerId = "<PROVIDER_ID>", + name = "<NAME>", // optional enabled = false, // optional - apiKey = "{$example}", // optional - fromName = "{$example}", // optional - fromEmail = "{$example}", // optional - replyToName = "{$example}", // optional - replyToEmail = "{$example}" // optional + apiKey = "<API_KEY>", // optional + fromName = "<FROM_NAME>", // optional + fromEmail = "email@example.com", // optional + replyToName = "<REPLY_TO_NAME>", // optional + replyToEmail = "<REPLY_TO_EMAIL>" // optional ) diff --git a/docs/examples/kotlin/messaging/update-sms.md b/docs/examples/kotlin/messaging/update-sms.md index 38f6153..7f008e8 100644 --- a/docs/examples/kotlin/messaging/update-sms.md +++ b/docs/examples/kotlin/messaging/update-sms.md @@ -10,11 +10,11 @@ val client = Client() val messaging = Messaging(client) val response = messaging.updateSms( - messageId = "{$example}", + messageId = "<MESSAGE_ID>", topics = listOf(), // optional users = listOf(), // optional targets = listOf(), // optional - content = "{$example}", // optional + content = "<CONTENT>", // optional draft = false, // optional scheduledAt = "" // optional ) diff --git a/docs/examples/kotlin/messaging/update-smtp-provider.md b/docs/examples/kotlin/messaging/update-smtp-provider.md index 16e9e5a..465d76b 100644 --- a/docs/examples/kotlin/messaging/update-smtp-provider.md +++ b/docs/examples/kotlin/messaging/update-smtp-provider.md @@ -10,18 +10,18 @@ val client = Client() val messaging = Messaging(client) val response = messaging.updateSmtpProvider( - providerId = "{$example}", - name = "{$example}", // optional - host = "{$example}", // optional + providerId = "<PROVIDER_ID>", + name = "<NAME>", // optional + host = "<HOST>", // optional port = 1, // optional - username = "{$example}", // optional - password = "{$example}", // optional - encryption = "{$example}", // optional + username = "<USERNAME>", // optional + password = "<PASSWORD>", // optional + encryption = "none", // optional autoTLS = false, // optional - mailer = "{$example}", // optional - fromName = "{$example}", // optional - fromEmail = "{$example}", // optional - replyToName = "{$example}", // optional - replyToEmail = "{$example}", // optional + mailer = "<MAILER>", // optional + fromName = "<FROM_NAME>", // optional + fromEmail = "email@example.com", // optional + replyToName = "<REPLY_TO_NAME>", // optional + replyToEmail = "<REPLY_TO_EMAIL>", // optional enabled = false // optional ) diff --git a/docs/examples/kotlin/messaging/update-telesign-provider.md b/docs/examples/kotlin/messaging/update-telesign-provider.md index 9501cd0..9a4d93e 100644 --- a/docs/examples/kotlin/messaging/update-telesign-provider.md +++ b/docs/examples/kotlin/messaging/update-telesign-provider.md @@ -10,10 +10,10 @@ val client = Client() val messaging = Messaging(client) val response = messaging.updateTelesignProvider( - providerId = "{$example}", - name = "{$example}", // optional + providerId = "<PROVIDER_ID>", + name = "<NAME>", // optional enabled = false, // optional - customerId = "{$example}", // optional - apiKey = "{$example}", // optional - from = "{$example}" // optional + customerId = "<CUSTOMER_ID>", // optional + apiKey = "<API_KEY>", // optional + from = "<FROM>" // optional ) diff --git a/docs/examples/kotlin/messaging/update-textmagic-provider.md b/docs/examples/kotlin/messaging/update-textmagic-provider.md index 2a3565f..14e8ac5 100644 --- a/docs/examples/kotlin/messaging/update-textmagic-provider.md +++ b/docs/examples/kotlin/messaging/update-textmagic-provider.md @@ -10,10 +10,10 @@ val client = Client() val messaging = Messaging(client) val response = messaging.updateTextmagicProvider( - providerId = "{$example}", - name = "{$example}", // optional + providerId = "<PROVIDER_ID>", + name = "<NAME>", // optional enabled = false, // optional - username = "{$example}", // optional - apiKey = "{$example}", // optional - from = "{$example}" // optional + username = "<USERNAME>", // optional + apiKey = "<API_KEY>", // optional + from = "<FROM>" // optional ) diff --git a/docs/examples/kotlin/messaging/update-topic.md b/docs/examples/kotlin/messaging/update-topic.md index a7e2ffc..68e8949 100644 --- a/docs/examples/kotlin/messaging/update-topic.md +++ b/docs/examples/kotlin/messaging/update-topic.md @@ -10,7 +10,7 @@ val client = Client() val messaging = Messaging(client) val response = messaging.updateTopic( - topicId = "{$example}", - name = "{$example}", // optional + topicId = "<TOPIC_ID>", + name = "<NAME>", // optional subscribe = listOf("any") // optional ) diff --git a/docs/examples/kotlin/messaging/update-twilio-provider.md b/docs/examples/kotlin/messaging/update-twilio-provider.md index 398e673..2c7a5e8 100644 --- a/docs/examples/kotlin/messaging/update-twilio-provider.md +++ b/docs/examples/kotlin/messaging/update-twilio-provider.md @@ -10,10 +10,10 @@ val client = Client() val messaging = Messaging(client) val response = messaging.updateTwilioProvider( - providerId = "{$example}", - name = "{$example}", // optional + providerId = "<PROVIDER_ID>", + name = "<NAME>", // optional enabled = false, // optional - accountSid = "{$example}", // optional - authToken = "{$example}", // optional - from = "{$example}" // optional + accountSid = "<ACCOUNT_SID>", // optional + authToken = "<AUTH_TOKEN>", // optional + from = "<FROM>" // optional ) diff --git a/docs/examples/kotlin/messaging/update-vonage-provider.md b/docs/examples/kotlin/messaging/update-vonage-provider.md index 13305c0..4d432f7 100644 --- a/docs/examples/kotlin/messaging/update-vonage-provider.md +++ b/docs/examples/kotlin/messaging/update-vonage-provider.md @@ -10,10 +10,10 @@ val client = Client() val messaging = Messaging(client) val response = messaging.updateVonageProvider( - providerId = "{$example}", - name = "{$example}", // optional + providerId = "<PROVIDER_ID>", + name = "<NAME>", // optional enabled = false, // optional - apiKey = "{$example}", // optional - apiSecret = "{$example}", // optional - from = "{$example}" // optional + apiKey = "<API_KEY>", // optional + apiSecret = "<API_SECRET>", // optional + from = "<FROM>" // optional ) diff --git a/docs/examples/kotlin/storage/create-bucket.md b/docs/examples/kotlin/storage/create-bucket.md index a703331..0c0119e 100644 --- a/docs/examples/kotlin/storage/create-bucket.md +++ b/docs/examples/kotlin/storage/create-bucket.md @@ -10,14 +10,14 @@ val client = Client() val storage = Storage(client) val response = storage.createBucket( - bucketId = "{$example}", - name = "{$example}", + bucketId = "<BUCKET_ID>", + name = "<NAME>", permissions = listOf("read("any")"), // optional fileSecurity = false, // optional enabled = false, // optional maximumFileSize = 1, // optional allowedFileExtensions = listOf(), // optional - compression = "{$example}", // optional + compression = "none", // optional encryption = false, // optional antivirus = false // optional ) diff --git a/docs/examples/kotlin/storage/create-file.md b/docs/examples/kotlin/storage/create-file.md index 02508ec..a2203ff 100644 --- a/docs/examples/kotlin/storage/create-file.md +++ b/docs/examples/kotlin/storage/create-file.md @@ -1,6 +1,6 @@ import io.appwrite.Client import io.appwrite.coroutines.CoroutineCallback -import io.appwrite.models.Payload +import io.appwrite.models.InputFile import io.appwrite.services.Storage val client = Client() @@ -11,8 +11,8 @@ val client = Client() val storage = Storage(client) val response = storage.createFile( - bucketId = "{$example}", - fileId = "{$example}", - file = Payload.fromFile("/path/to/file.png"), + bucketId = "<BUCKET_ID>", + fileId = "<FILE_ID>", + file = InputFile.fromPath("file.png"), permissions = listOf("read("any")") // optional ) diff --git a/docs/examples/kotlin/storage/delete-bucket.md b/docs/examples/kotlin/storage/delete-bucket.md index b5ccff5..2298103 100644 --- a/docs/examples/kotlin/storage/delete-bucket.md +++ b/docs/examples/kotlin/storage/delete-bucket.md @@ -10,5 +10,5 @@ val client = Client() val storage = Storage(client) val response = storage.deleteBucket( - bucketId = "{$example}" + bucketId = "<BUCKET_ID>" ) diff --git a/docs/examples/kotlin/storage/delete-file.md b/docs/examples/kotlin/storage/delete-file.md index 56f5058..5b17c5c 100644 --- a/docs/examples/kotlin/storage/delete-file.md +++ b/docs/examples/kotlin/storage/delete-file.md @@ -10,6 +10,6 @@ val client = Client() val storage = Storage(client) val response = storage.deleteFile( - bucketId = "{$example}", - fileId = "{$example}" + bucketId = "<BUCKET_ID>", + fileId = "<FILE_ID>" ) diff --git a/docs/examples/kotlin/storage/get-bucket.md b/docs/examples/kotlin/storage/get-bucket.md index 1ecfc44..604ec05 100644 --- a/docs/examples/kotlin/storage/get-bucket.md +++ b/docs/examples/kotlin/storage/get-bucket.md @@ -10,5 +10,5 @@ val client = Client() val storage = Storage(client) val response = storage.getBucket( - bucketId = "{$example}" + bucketId = "<BUCKET_ID>" ) diff --git a/docs/examples/kotlin/storage/get-file-download.md b/docs/examples/kotlin/storage/get-file-download.md index 507f2f9..46b02e7 100644 --- a/docs/examples/kotlin/storage/get-file-download.md +++ b/docs/examples/kotlin/storage/get-file-download.md @@ -10,6 +10,6 @@ val client = Client() val storage = Storage(client) val result = storage.getFileDownload( - bucketId = "{$example}", - fileId = "{$example}" + bucketId = "<BUCKET_ID>", + fileId = "<FILE_ID>" ) diff --git a/docs/examples/kotlin/storage/get-file-preview.md b/docs/examples/kotlin/storage/get-file-preview.md index 382f5ff..88be42f 100644 --- a/docs/examples/kotlin/storage/get-file-preview.md +++ b/docs/examples/kotlin/storage/get-file-preview.md @@ -10,11 +10,11 @@ val client = Client() val storage = Storage(client) val result = storage.getFilePreview( - bucketId = "{$example}", - fileId = "{$example}", + bucketId = "<BUCKET_ID>", + fileId = "<FILE_ID>", width = 0, // optional height = 0, // optional - gravity = "{$example}", // optional + gravity = "center", // optional quality = 0, // optional borderWidth = 0, // optional borderColor = "", // optional @@ -22,5 +22,5 @@ val result = storage.getFilePreview( opacity = 0, // optional rotation = -360, // optional background = "", // optional - output = "{$example}" // optional + output = "jpg" // optional ) diff --git a/docs/examples/kotlin/storage/get-file-view.md b/docs/examples/kotlin/storage/get-file-view.md index c8ffcdd..b4ad81f 100644 --- a/docs/examples/kotlin/storage/get-file-view.md +++ b/docs/examples/kotlin/storage/get-file-view.md @@ -10,6 +10,6 @@ val client = Client() val storage = Storage(client) val result = storage.getFileView( - bucketId = "{$example}", - fileId = "{$example}" + bucketId = "<BUCKET_ID>", + fileId = "<FILE_ID>" ) diff --git a/docs/examples/kotlin/storage/get-file.md b/docs/examples/kotlin/storage/get-file.md index c7a3fd2..a6d2d3d 100644 --- a/docs/examples/kotlin/storage/get-file.md +++ b/docs/examples/kotlin/storage/get-file.md @@ -10,6 +10,6 @@ val client = Client() val storage = Storage(client) val response = storage.getFile( - bucketId = "{$example}", - fileId = "{$example}" + bucketId = "<BUCKET_ID>", + fileId = "<FILE_ID>" ) diff --git a/docs/examples/kotlin/storage/list-buckets.md b/docs/examples/kotlin/storage/list-buckets.md index f6e7148..4b22970 100644 --- a/docs/examples/kotlin/storage/list-buckets.md +++ b/docs/examples/kotlin/storage/list-buckets.md @@ -11,5 +11,5 @@ val storage = Storage(client) val response = storage.listBuckets( queries = listOf(), // optional - search = "{$example}" // optional + search = "<SEARCH>" // optional ) diff --git a/docs/examples/kotlin/storage/list-files.md b/docs/examples/kotlin/storage/list-files.md index 4175ed2..e7c3d66 100644 --- a/docs/examples/kotlin/storage/list-files.md +++ b/docs/examples/kotlin/storage/list-files.md @@ -10,7 +10,7 @@ val client = Client() val storage = Storage(client) val response = storage.listFiles( - bucketId = "{$example}", + bucketId = "<BUCKET_ID>", queries = listOf(), // optional - search = "{$example}" // optional + search = "<SEARCH>" // optional ) diff --git a/docs/examples/kotlin/storage/update-bucket.md b/docs/examples/kotlin/storage/update-bucket.md index ca3ea84..4040dfb 100644 --- a/docs/examples/kotlin/storage/update-bucket.md +++ b/docs/examples/kotlin/storage/update-bucket.md @@ -10,14 +10,14 @@ val client = Client() val storage = Storage(client) val response = storage.updateBucket( - bucketId = "{$example}", - name = "{$example}", + bucketId = "<BUCKET_ID>", + name = "<NAME>", permissions = listOf("read("any")"), // optional fileSecurity = false, // optional enabled = false, // optional maximumFileSize = 1, // optional allowedFileExtensions = listOf(), // optional - compression = "{$example}", // optional + compression = "none", // optional encryption = false, // optional antivirus = false // optional ) diff --git a/docs/examples/kotlin/storage/update-file.md b/docs/examples/kotlin/storage/update-file.md index 5f79d91..96d4b08 100644 --- a/docs/examples/kotlin/storage/update-file.md +++ b/docs/examples/kotlin/storage/update-file.md @@ -10,8 +10,8 @@ val client = Client() val storage = Storage(client) val response = storage.updateFile( - bucketId = "{$example}", - fileId = "{$example}", - name = "{$example}", // optional + bucketId = "<BUCKET_ID>", + fileId = "<FILE_ID>", + name = "<NAME>", // optional permissions = listOf("read("any")") // optional ) diff --git a/docs/examples/kotlin/teams/create-membership.md b/docs/examples/kotlin/teams/create-membership.md index 2e1fbc3..250502e 100644 --- a/docs/examples/kotlin/teams/create-membership.md +++ b/docs/examples/kotlin/teams/create-membership.md @@ -10,11 +10,11 @@ val client = Client() val teams = Teams(client) val response = teams.createMembership( - teamId = "{$example}", + teamId = "<TEAM_ID>", roles = listOf(), - email = "{$example}", // optional - userId = "{$example}", // optional - phone = "{$example}", // optional - url = "{$example}", // optional - name = "{$example}" // optional + email = "email@example.com", // optional + userId = "<USER_ID>", // optional + phone = "+12065550100", // optional + url = "https://example.com", // optional + name = "<NAME>" // optional ) diff --git a/docs/examples/kotlin/teams/create.md b/docs/examples/kotlin/teams/create.md index e7a5c7f..b66029f 100644 --- a/docs/examples/kotlin/teams/create.md +++ b/docs/examples/kotlin/teams/create.md @@ -10,7 +10,7 @@ val client = Client() val teams = Teams(client) val response = teams.create( - teamId = "{$example}", - name = "{$example}", + teamId = "<TEAM_ID>", + name = "<NAME>", roles = listOf() // optional ) diff --git a/docs/examples/kotlin/teams/delete-membership.md b/docs/examples/kotlin/teams/delete-membership.md index 93559ca..0dff545 100644 --- a/docs/examples/kotlin/teams/delete-membership.md +++ b/docs/examples/kotlin/teams/delete-membership.md @@ -10,6 +10,6 @@ val client = Client() val teams = Teams(client) val response = teams.deleteMembership( - teamId = "{$example}", - membershipId = "{$example}" + teamId = "<TEAM_ID>", + membershipId = "<MEMBERSHIP_ID>" ) diff --git a/docs/examples/kotlin/teams/delete.md b/docs/examples/kotlin/teams/delete.md index 4aa8970..9a75b2a 100644 --- a/docs/examples/kotlin/teams/delete.md +++ b/docs/examples/kotlin/teams/delete.md @@ -10,5 +10,5 @@ val client = Client() val teams = Teams(client) val response = teams.delete( - teamId = "{$example}" + teamId = "<TEAM_ID>" ) diff --git a/docs/examples/kotlin/teams/get-membership.md b/docs/examples/kotlin/teams/get-membership.md index e1fdc94..77c6ae5 100644 --- a/docs/examples/kotlin/teams/get-membership.md +++ b/docs/examples/kotlin/teams/get-membership.md @@ -10,6 +10,6 @@ val client = Client() val teams = Teams(client) val response = teams.getMembership( - teamId = "{$example}", - membershipId = "{$example}" + teamId = "<TEAM_ID>", + membershipId = "<MEMBERSHIP_ID>" ) diff --git a/docs/examples/kotlin/teams/get-prefs.md b/docs/examples/kotlin/teams/get-prefs.md index 4d6cf69..2700c89 100644 --- a/docs/examples/kotlin/teams/get-prefs.md +++ b/docs/examples/kotlin/teams/get-prefs.md @@ -10,5 +10,5 @@ val client = Client() val teams = Teams(client) val response = teams.getPrefs( - teamId = "{$example}" + teamId = "<TEAM_ID>" ) diff --git a/docs/examples/kotlin/teams/get.md b/docs/examples/kotlin/teams/get.md index 8f34d2f..a7be374 100644 --- a/docs/examples/kotlin/teams/get.md +++ b/docs/examples/kotlin/teams/get.md @@ -10,5 +10,5 @@ val client = Client() val teams = Teams(client) val response = teams.get( - teamId = "{$example}" + teamId = "<TEAM_ID>" ) diff --git a/docs/examples/kotlin/teams/list-memberships.md b/docs/examples/kotlin/teams/list-memberships.md index 81914d3..916252d 100644 --- a/docs/examples/kotlin/teams/list-memberships.md +++ b/docs/examples/kotlin/teams/list-memberships.md @@ -10,7 +10,7 @@ val client = Client() val teams = Teams(client) val response = teams.listMemberships( - teamId = "{$example}", + teamId = "<TEAM_ID>", queries = listOf(), // optional - search = "{$example}" // optional + search = "<SEARCH>" // optional ) diff --git a/docs/examples/kotlin/teams/list.md b/docs/examples/kotlin/teams/list.md index e05db81..5af95db 100644 --- a/docs/examples/kotlin/teams/list.md +++ b/docs/examples/kotlin/teams/list.md @@ -11,5 +11,5 @@ val teams = Teams(client) val response = teams.list( queries = listOf(), // optional - search = "{$example}" // optional + search = "<SEARCH>" // optional ) diff --git a/docs/examples/kotlin/teams/update-membership-status.md b/docs/examples/kotlin/teams/update-membership-status.md index 45a780f..75c4a73 100644 --- a/docs/examples/kotlin/teams/update-membership-status.md +++ b/docs/examples/kotlin/teams/update-membership-status.md @@ -10,8 +10,8 @@ val client = Client() val teams = Teams(client) val response = teams.updateMembershipStatus( - teamId = "{$example}", - membershipId = "{$example}", - userId = "{$example}", - secret = "{$example}" + teamId = "<TEAM_ID>", + membershipId = "<MEMBERSHIP_ID>", + userId = "<USER_ID>", + secret = "<SECRET>" ) diff --git a/docs/examples/kotlin/teams/update-membership.md b/docs/examples/kotlin/teams/update-membership.md index 5ef03aa..556e0a3 100644 --- a/docs/examples/kotlin/teams/update-membership.md +++ b/docs/examples/kotlin/teams/update-membership.md @@ -10,7 +10,7 @@ val client = Client() val teams = Teams(client) val response = teams.updateMembership( - teamId = "{$example}", - membershipId = "{$example}", + teamId = "<TEAM_ID>", + membershipId = "<MEMBERSHIP_ID>", roles = listOf() ) diff --git a/docs/examples/kotlin/teams/update-name.md b/docs/examples/kotlin/teams/update-name.md index 1b8e4a0..8e6a2a2 100644 --- a/docs/examples/kotlin/teams/update-name.md +++ b/docs/examples/kotlin/teams/update-name.md @@ -10,6 +10,6 @@ val client = Client() val teams = Teams(client) val response = teams.updateName( - teamId = "{$example}", - name = "{$example}" + teamId = "<TEAM_ID>", + name = "<NAME>" ) diff --git a/docs/examples/kotlin/teams/update-prefs.md b/docs/examples/kotlin/teams/update-prefs.md index a4e4b13..c9153d3 100644 --- a/docs/examples/kotlin/teams/update-prefs.md +++ b/docs/examples/kotlin/teams/update-prefs.md @@ -10,6 +10,6 @@ val client = Client() val teams = Teams(client) val response = teams.updatePrefs( - teamId = "{$example}", + teamId = "<TEAM_ID>", prefs = mapOf( "a" to "b" ) ) diff --git a/docs/examples/kotlin/users/create-argon2user.md b/docs/examples/kotlin/users/create-argon2user.md index d1e163e..a01f6d5 100644 --- a/docs/examples/kotlin/users/create-argon2user.md +++ b/docs/examples/kotlin/users/create-argon2user.md @@ -10,8 +10,8 @@ val client = Client() val users = Users(client) val response = users.createArgon2User( - userId = "{$example}", - email = "{$example}", - password = "{$example}", - name = "{$example}" // optional + userId = "<USER_ID>", + email = "email@example.com", + password = "password", + name = "<NAME>" // optional ) diff --git a/docs/examples/kotlin/users/create-bcrypt-user.md b/docs/examples/kotlin/users/create-bcrypt-user.md index 1c267f8..b4758e4 100644 --- a/docs/examples/kotlin/users/create-bcrypt-user.md +++ b/docs/examples/kotlin/users/create-bcrypt-user.md @@ -10,8 +10,8 @@ val client = Client() val users = Users(client) val response = users.createBcryptUser( - userId = "{$example}", - email = "{$example}", - password = "{$example}", - name = "{$example}" // optional + userId = "<USER_ID>", + email = "email@example.com", + password = "password", + name = "<NAME>" // optional ) diff --git a/docs/examples/kotlin/users/create-j-w-t.md b/docs/examples/kotlin/users/create-j-w-t.md index aa755c3..137847d 100644 --- a/docs/examples/kotlin/users/create-j-w-t.md +++ b/docs/examples/kotlin/users/create-j-w-t.md @@ -10,7 +10,7 @@ val client = Client() val users = Users(client) val response = users.createJWT( - userId = "{$example}", - sessionId = "{$example}", // optional + userId = "<USER_ID>", + sessionId = "<SESSION_ID>", // optional duration = 0 // optional ) diff --git a/docs/examples/kotlin/users/create-m-d5user.md b/docs/examples/kotlin/users/create-m-d5user.md index df122ef..f9d7cb2 100644 --- a/docs/examples/kotlin/users/create-m-d5user.md +++ b/docs/examples/kotlin/users/create-m-d5user.md @@ -10,8 +10,8 @@ val client = Client() val users = Users(client) val response = users.createMD5User( - userId = "{$example}", - email = "{$example}", - password = "{$example}", - name = "{$example}" // optional + userId = "<USER_ID>", + email = "email@example.com", + password = "password", + name = "<NAME>" // optional ) diff --git a/docs/examples/kotlin/users/create-mfa-recovery-codes.md b/docs/examples/kotlin/users/create-mfa-recovery-codes.md index 65a5dc7..b3a3950 100644 --- a/docs/examples/kotlin/users/create-mfa-recovery-codes.md +++ b/docs/examples/kotlin/users/create-mfa-recovery-codes.md @@ -10,5 +10,5 @@ val client = Client() val users = Users(client) val response = users.createMfaRecoveryCodes( - userId = "{$example}" + userId = "<USER_ID>" ) diff --git a/docs/examples/kotlin/users/create-p-h-pass-user.md b/docs/examples/kotlin/users/create-p-h-pass-user.md index 40cb928..87d74aa 100644 --- a/docs/examples/kotlin/users/create-p-h-pass-user.md +++ b/docs/examples/kotlin/users/create-p-h-pass-user.md @@ -10,8 +10,8 @@ val client = Client() val users = Users(client) val response = users.createPHPassUser( - userId = "{$example}", - email = "{$example}", - password = "{$example}", - name = "{$example}" // optional + userId = "<USER_ID>", + email = "email@example.com", + password = "password", + name = "<NAME>" // optional ) diff --git a/docs/examples/kotlin/users/create-s-h-a-user.md b/docs/examples/kotlin/users/create-s-h-a-user.md index 8f6794d..0be03bf 100644 --- a/docs/examples/kotlin/users/create-s-h-a-user.md +++ b/docs/examples/kotlin/users/create-s-h-a-user.md @@ -10,9 +10,9 @@ val client = Client() val users = Users(client) val response = users.createSHAUser( - userId = "{$example}", - email = "{$example}", - password = "{$example}", - passwordVersion = "{$example}", // optional - name = "{$example}" // optional + userId = "<USER_ID>", + email = "email@example.com", + password = "password", + passwordVersion = "sha1", // optional + name = "<NAME>" // optional ) diff --git a/docs/examples/kotlin/users/create-scrypt-modified-user.md b/docs/examples/kotlin/users/create-scrypt-modified-user.md index dd2fac9..f651d3f 100644 --- a/docs/examples/kotlin/users/create-scrypt-modified-user.md +++ b/docs/examples/kotlin/users/create-scrypt-modified-user.md @@ -10,11 +10,11 @@ val client = Client() val users = Users(client) val response = users.createScryptModifiedUser( - userId = "{$example}", - email = "{$example}", - password = "{$example}", - passwordSalt = "{$example}", - passwordSaltSeparator = "{$example}", - passwordSignerKey = "{$example}", - name = "{$example}" // optional + userId = "<USER_ID>", + email = "email@example.com", + password = "password", + passwordSalt = "<PASSWORD_SALT>", + passwordSaltSeparator = "<PASSWORD_SALT_SEPARATOR>", + passwordSignerKey = "<PASSWORD_SIGNER_KEY>", + name = "<NAME>" // optional ) diff --git a/docs/examples/kotlin/users/create-scrypt-user.md b/docs/examples/kotlin/users/create-scrypt-user.md index fb04246..2502312 100644 --- a/docs/examples/kotlin/users/create-scrypt-user.md +++ b/docs/examples/kotlin/users/create-scrypt-user.md @@ -10,13 +10,13 @@ val client = Client() val users = Users(client) val response = users.createScryptUser( - userId = "{$example}", - email = "{$example}", - password = "{$example}", - passwordSalt = "{$example}", + userId = "<USER_ID>", + email = "email@example.com", + password = "password", + passwordSalt = "<PASSWORD_SALT>", passwordCpu = 0, passwordMemory = 0, passwordParallel = 0, passwordLength = 0, - name = "{$example}" // optional + name = "<NAME>" // optional ) diff --git a/docs/examples/kotlin/users/create-session.md b/docs/examples/kotlin/users/create-session.md index 8094c68..4b0e5dc 100644 --- a/docs/examples/kotlin/users/create-session.md +++ b/docs/examples/kotlin/users/create-session.md @@ -10,5 +10,5 @@ val client = Client() val users = Users(client) val response = users.createSession( - userId = "{$example}" + userId = "<USER_ID>" ) diff --git a/docs/examples/kotlin/users/create-target.md b/docs/examples/kotlin/users/create-target.md index 0bc52c0..4a7856b 100644 --- a/docs/examples/kotlin/users/create-target.md +++ b/docs/examples/kotlin/users/create-target.md @@ -11,10 +11,10 @@ val client = Client() val users = Users(client) val response = users.createTarget( - userId = "{$example}", - targetId = "{$example}", + userId = "<USER_ID>", + targetId = "<TARGET_ID>", providerType = MessagingProviderType.EMAIL, - identifier = "{$example}", - providerId = "{$example}", // optional - name = "{$example}" // optional + identifier = "<IDENTIFIER>", + providerId = "<PROVIDER_ID>", // optional + name = "<NAME>" // optional ) diff --git a/docs/examples/kotlin/users/create-token.md b/docs/examples/kotlin/users/create-token.md index 78b418d..bd8f76d 100644 --- a/docs/examples/kotlin/users/create-token.md +++ b/docs/examples/kotlin/users/create-token.md @@ -10,7 +10,7 @@ val client = Client() val users = Users(client) val response = users.createToken( - userId = "{$example}", + userId = "<USER_ID>", length = 4, // optional expire = 60 // optional ) diff --git a/docs/examples/kotlin/users/create.md b/docs/examples/kotlin/users/create.md index 43575b0..b5bcee9 100644 --- a/docs/examples/kotlin/users/create.md +++ b/docs/examples/kotlin/users/create.md @@ -10,9 +10,9 @@ val client = Client() val users = Users(client) val response = users.create( - userId = "{$example}", - email = "{$example}", // optional - phone = "{$example}", // optional + userId = "<USER_ID>", + email = "email@example.com", // optional + phone = "+12065550100", // optional password = "", // optional - name = "{$example}" // optional + name = "<NAME>" // optional ) diff --git a/docs/examples/kotlin/users/delete-identity.md b/docs/examples/kotlin/users/delete-identity.md index ff32aa7..2c0bfae 100644 --- a/docs/examples/kotlin/users/delete-identity.md +++ b/docs/examples/kotlin/users/delete-identity.md @@ -10,5 +10,5 @@ val client = Client() val users = Users(client) val response = users.deleteIdentity( - identityId = "{$example}" + identityId = "<IDENTITY_ID>" ) diff --git a/docs/examples/kotlin/users/delete-mfa-authenticator.md b/docs/examples/kotlin/users/delete-mfa-authenticator.md index 925d56d..60989d4 100644 --- a/docs/examples/kotlin/users/delete-mfa-authenticator.md +++ b/docs/examples/kotlin/users/delete-mfa-authenticator.md @@ -11,6 +11,6 @@ val client = Client() val users = Users(client) val response = users.deleteMfaAuthenticator( - userId = "{$example}", + userId = "<USER_ID>", type = AuthenticatorType.TOTP ) diff --git a/docs/examples/kotlin/users/delete-session.md b/docs/examples/kotlin/users/delete-session.md index b4fc88d..0127fa3 100644 --- a/docs/examples/kotlin/users/delete-session.md +++ b/docs/examples/kotlin/users/delete-session.md @@ -10,6 +10,6 @@ val client = Client() val users = Users(client) val response = users.deleteSession( - userId = "{$example}", - sessionId = "{$example}" + userId = "<USER_ID>", + sessionId = "<SESSION_ID>" ) diff --git a/docs/examples/kotlin/users/delete-sessions.md b/docs/examples/kotlin/users/delete-sessions.md index 482fc7a..26d7c70 100644 --- a/docs/examples/kotlin/users/delete-sessions.md +++ b/docs/examples/kotlin/users/delete-sessions.md @@ -10,5 +10,5 @@ val client = Client() val users = Users(client) val response = users.deleteSessions( - userId = "{$example}" + userId = "<USER_ID>" ) diff --git a/docs/examples/kotlin/users/delete-target.md b/docs/examples/kotlin/users/delete-target.md index 02ecbd5..6be6652 100644 --- a/docs/examples/kotlin/users/delete-target.md +++ b/docs/examples/kotlin/users/delete-target.md @@ -10,6 +10,6 @@ val client = Client() val users = Users(client) val response = users.deleteTarget( - userId = "{$example}", - targetId = "{$example}" + userId = "<USER_ID>", + targetId = "<TARGET_ID>" ) diff --git a/docs/examples/kotlin/users/delete.md b/docs/examples/kotlin/users/delete.md index adda8ef..e250c44 100644 --- a/docs/examples/kotlin/users/delete.md +++ b/docs/examples/kotlin/users/delete.md @@ -10,5 +10,5 @@ val client = Client() val users = Users(client) val response = users.delete( - userId = "{$example}" + userId = "<USER_ID>" ) diff --git a/docs/examples/kotlin/users/get-mfa-recovery-codes.md b/docs/examples/kotlin/users/get-mfa-recovery-codes.md index d5f0559..5860b4c 100644 --- a/docs/examples/kotlin/users/get-mfa-recovery-codes.md +++ b/docs/examples/kotlin/users/get-mfa-recovery-codes.md @@ -10,5 +10,5 @@ val client = Client() val users = Users(client) val response = users.getMfaRecoveryCodes( - userId = "{$example}" + userId = "<USER_ID>" ) diff --git a/docs/examples/kotlin/users/get-prefs.md b/docs/examples/kotlin/users/get-prefs.md index e168bc0..7654537 100644 --- a/docs/examples/kotlin/users/get-prefs.md +++ b/docs/examples/kotlin/users/get-prefs.md @@ -10,5 +10,5 @@ val client = Client() val users = Users(client) val response = users.getPrefs( - userId = "{$example}" + userId = "<USER_ID>" ) diff --git a/docs/examples/kotlin/users/get-target.md b/docs/examples/kotlin/users/get-target.md index 84eb809..be8bbe8 100644 --- a/docs/examples/kotlin/users/get-target.md +++ b/docs/examples/kotlin/users/get-target.md @@ -10,6 +10,6 @@ val client = Client() val users = Users(client) val response = users.getTarget( - userId = "{$example}", - targetId = "{$example}" + userId = "<USER_ID>", + targetId = "<TARGET_ID>" ) diff --git a/docs/examples/kotlin/users/get.md b/docs/examples/kotlin/users/get.md index 170e1a8..8298430 100644 --- a/docs/examples/kotlin/users/get.md +++ b/docs/examples/kotlin/users/get.md @@ -10,5 +10,5 @@ val client = Client() val users = Users(client) val response = users.get( - userId = "{$example}" + userId = "<USER_ID>" ) diff --git a/docs/examples/kotlin/users/list-identities.md b/docs/examples/kotlin/users/list-identities.md index 6509f35..05156db 100644 --- a/docs/examples/kotlin/users/list-identities.md +++ b/docs/examples/kotlin/users/list-identities.md @@ -11,5 +11,5 @@ val users = Users(client) val response = users.listIdentities( queries = listOf(), // optional - search = "{$example}" // optional + search = "<SEARCH>" // optional ) diff --git a/docs/examples/kotlin/users/list-logs.md b/docs/examples/kotlin/users/list-logs.md index 8ba3588..8868d0d 100644 --- a/docs/examples/kotlin/users/list-logs.md +++ b/docs/examples/kotlin/users/list-logs.md @@ -10,6 +10,6 @@ val client = Client() val users = Users(client) val response = users.listLogs( - userId = "{$example}", + userId = "<USER_ID>", queries = listOf() // optional ) diff --git a/docs/examples/kotlin/users/list-memberships.md b/docs/examples/kotlin/users/list-memberships.md index 24e5987..5a3d2ea 100644 --- a/docs/examples/kotlin/users/list-memberships.md +++ b/docs/examples/kotlin/users/list-memberships.md @@ -10,5 +10,5 @@ val client = Client() val users = Users(client) val response = users.listMemberships( - userId = "{$example}" + userId = "<USER_ID>" ) diff --git a/docs/examples/kotlin/users/list-mfa-factors.md b/docs/examples/kotlin/users/list-mfa-factors.md index 469e20e..25d9a4a 100644 --- a/docs/examples/kotlin/users/list-mfa-factors.md +++ b/docs/examples/kotlin/users/list-mfa-factors.md @@ -10,5 +10,5 @@ val client = Client() val users = Users(client) val response = users.listMfaFactors( - userId = "{$example}" + userId = "<USER_ID>" ) diff --git a/docs/examples/kotlin/users/list-sessions.md b/docs/examples/kotlin/users/list-sessions.md index 23506c1..c14ebd7 100644 --- a/docs/examples/kotlin/users/list-sessions.md +++ b/docs/examples/kotlin/users/list-sessions.md @@ -10,5 +10,5 @@ val client = Client() val users = Users(client) val response = users.listSessions( - userId = "{$example}" + userId = "<USER_ID>" ) diff --git a/docs/examples/kotlin/users/list-targets.md b/docs/examples/kotlin/users/list-targets.md index fb343fc..d017592 100644 --- a/docs/examples/kotlin/users/list-targets.md +++ b/docs/examples/kotlin/users/list-targets.md @@ -10,6 +10,6 @@ val client = Client() val users = Users(client) val response = users.listTargets( - userId = "{$example}", + userId = "<USER_ID>", queries = listOf() // optional ) diff --git a/docs/examples/kotlin/users/list.md b/docs/examples/kotlin/users/list.md index f86cd3f..e86ac0d 100644 --- a/docs/examples/kotlin/users/list.md +++ b/docs/examples/kotlin/users/list.md @@ -11,5 +11,5 @@ val users = Users(client) val response = users.list( queries = listOf(), // optional - search = "{$example}" // optional + search = "<SEARCH>" // optional ) diff --git a/docs/examples/kotlin/users/update-email-verification.md b/docs/examples/kotlin/users/update-email-verification.md index 2bafa6f..3f5f293 100644 --- a/docs/examples/kotlin/users/update-email-verification.md +++ b/docs/examples/kotlin/users/update-email-verification.md @@ -10,6 +10,6 @@ val client = Client() val users = Users(client) val response = users.updateEmailVerification( - userId = "{$example}", + userId = "<USER_ID>", emailVerification = false ) diff --git a/docs/examples/kotlin/users/update-email.md b/docs/examples/kotlin/users/update-email.md index 3e8fecf..b7a0644 100644 --- a/docs/examples/kotlin/users/update-email.md +++ b/docs/examples/kotlin/users/update-email.md @@ -10,6 +10,6 @@ val client = Client() val users = Users(client) val response = users.updateEmail( - userId = "{$example}", - email = "{$example}" + userId = "<USER_ID>", + email = "email@example.com" ) diff --git a/docs/examples/kotlin/users/update-labels.md b/docs/examples/kotlin/users/update-labels.md index 720218c..ecc2948 100644 --- a/docs/examples/kotlin/users/update-labels.md +++ b/docs/examples/kotlin/users/update-labels.md @@ -10,6 +10,6 @@ val client = Client() val users = Users(client) val response = users.updateLabels( - userId = "{$example}", + userId = "<USER_ID>", labels = listOf() ) diff --git a/docs/examples/kotlin/users/update-mfa-recovery-codes.md b/docs/examples/kotlin/users/update-mfa-recovery-codes.md index 903c059..b8fa2c5 100644 --- a/docs/examples/kotlin/users/update-mfa-recovery-codes.md +++ b/docs/examples/kotlin/users/update-mfa-recovery-codes.md @@ -10,5 +10,5 @@ val client = Client() val users = Users(client) val response = users.updateMfaRecoveryCodes( - userId = "{$example}" + userId = "<USER_ID>" ) diff --git a/docs/examples/kotlin/users/update-mfa.md b/docs/examples/kotlin/users/update-mfa.md index 33c3d0e..a169f3d 100644 --- a/docs/examples/kotlin/users/update-mfa.md +++ b/docs/examples/kotlin/users/update-mfa.md @@ -10,6 +10,6 @@ val client = Client() val users = Users(client) val response = users.updateMfa( - userId = "{$example}", + userId = "<USER_ID>", mfa = false ) diff --git a/docs/examples/kotlin/users/update-name.md b/docs/examples/kotlin/users/update-name.md index 50f4524..32d164d 100644 --- a/docs/examples/kotlin/users/update-name.md +++ b/docs/examples/kotlin/users/update-name.md @@ -10,6 +10,6 @@ val client = Client() val users = Users(client) val response = users.updateName( - userId = "{$example}", - name = "{$example}" + userId = "<USER_ID>", + name = "<NAME>" ) diff --git a/docs/examples/kotlin/users/update-password.md b/docs/examples/kotlin/users/update-password.md index d9b2321..1522267 100644 --- a/docs/examples/kotlin/users/update-password.md +++ b/docs/examples/kotlin/users/update-password.md @@ -10,6 +10,6 @@ val client = Client() val users = Users(client) val response = users.updatePassword( - userId = "{$example}", + userId = "<USER_ID>", password = "" ) diff --git a/docs/examples/kotlin/users/update-phone-verification.md b/docs/examples/kotlin/users/update-phone-verification.md index 78c1185..bc8f4c6 100644 --- a/docs/examples/kotlin/users/update-phone-verification.md +++ b/docs/examples/kotlin/users/update-phone-verification.md @@ -10,6 +10,6 @@ val client = Client() val users = Users(client) val response = users.updatePhoneVerification( - userId = "{$example}", + userId = "<USER_ID>", phoneVerification = false ) diff --git a/docs/examples/kotlin/users/update-phone.md b/docs/examples/kotlin/users/update-phone.md index 6f9ada0..f00a15d 100644 --- a/docs/examples/kotlin/users/update-phone.md +++ b/docs/examples/kotlin/users/update-phone.md @@ -10,6 +10,6 @@ val client = Client() val users = Users(client) val response = users.updatePhone( - userId = "{$example}", - number = "{$example}" + userId = "<USER_ID>", + number = "+12065550100" ) diff --git a/docs/examples/kotlin/users/update-prefs.md b/docs/examples/kotlin/users/update-prefs.md index c330e0d..cc8dcf6 100644 --- a/docs/examples/kotlin/users/update-prefs.md +++ b/docs/examples/kotlin/users/update-prefs.md @@ -10,6 +10,6 @@ val client = Client() val users = Users(client) val response = users.updatePrefs( - userId = "{$example}", + userId = "<USER_ID>", prefs = mapOf( "a" to "b" ) ) diff --git a/docs/examples/kotlin/users/update-status.md b/docs/examples/kotlin/users/update-status.md index a829a0a..e546ba5 100644 --- a/docs/examples/kotlin/users/update-status.md +++ b/docs/examples/kotlin/users/update-status.md @@ -10,6 +10,6 @@ val client = Client() val users = Users(client) val response = users.updateStatus( - userId = "{$example}", + userId = "<USER_ID>", status = false ) diff --git a/docs/examples/kotlin/users/update-target.md b/docs/examples/kotlin/users/update-target.md index a56bf49..1827c6a 100644 --- a/docs/examples/kotlin/users/update-target.md +++ b/docs/examples/kotlin/users/update-target.md @@ -10,9 +10,9 @@ val client = Client() val users = Users(client) val response = users.updateTarget( - userId = "{$example}", - targetId = "{$example}", - identifier = "{$example}", // optional - providerId = "{$example}", // optional - name = "{$example}" // optional + userId = "<USER_ID>", + targetId = "<TARGET_ID>", + identifier = "<IDENTIFIER>", // optional + providerId = "<PROVIDER_ID>", // optional + name = "<NAME>" // optional ) diff --git a/src/main/kotlin/io/appwrite/Client.kt b/src/main/kotlin/io/appwrite/Client.kt index 9a47c36..c8ff8d9 100644 --- a/src/main/kotlin/io/appwrite/Client.kt +++ b/src/main/kotlin/io/appwrite/Client.kt @@ -3,8 +3,7 @@ package io.appwrite import io.appwrite.exceptions.AppwriteException import io.appwrite.extensions.fromJson import io.appwrite.extensions.toJson -import io.appwrite.extensions.fromMultiPart -import io.appwrite.models.Payload +import io.appwrite.models.InputFile import io.appwrite.models.UploadProgress import kotlinx.coroutines.CoroutineScope import kotlinx.coroutines.Dispatchers @@ -58,11 +57,11 @@ class Client @JvmOverloads constructor( init { headers = mutableMapOf( "content-type" to "application/json", - "user-agent" to "AppwriteKotlinSDK/7.0.0 ${System.getProperty("http.agent")}", + "user-agent" to "AppwriteKotlinSDK/6.2.0 ${System.getProperty("http.agent")}", "x-sdk-name" to "Kotlin", "x-sdk-platform" to "server", "x-sdk-language" to "kotlin", - "x-sdk-version" to "7.0.0", + "x-sdk-version" to "6.2.0", "x-appwrite-response-format" to "1.6.0", ) @@ -238,7 +237,7 @@ class Client @JvmOverloads constructor( /** * Prepare the HTTP request - * + * * @param method * @param path * @param headers @@ -306,14 +305,6 @@ class Client @JvmOverloads constructor( ) } } - it.value is Payload -> { - val payload = it.value as Payload - if (payload.sourceType == "path") { - builder.addFormDataPart(it.key, payload.filename, File(payload.path).asRequestBody()) - } else { - builder.addFormDataPart(it.key, payload.toString()) - } - } else -> { builder.addFormDataPart(it.key, it.value.toString()) } @@ -341,7 +332,7 @@ class Client @JvmOverloads constructor( * @param headers * @param params * - * @return [T] + * @return [T] */ @Throws(AppwriteException::class) suspend fun <T> call( @@ -364,7 +355,7 @@ class Client @JvmOverloads constructor( * @param headers * @param params * - * @return [T] + * @return [T] */ @Throws(AppwriteException::class) suspend fun redirect( @@ -399,14 +390,14 @@ class Client @JvmOverloads constructor( onProgress: ((UploadProgress) -> Unit)? = null, ): T { var file: RandomAccessFile? = null - val input = params[paramName] as Payload + val input = params[paramName] as InputFile val size: Long = when(input.sourceType) { "path", "file" -> { file = RandomAccessFile(input.path, "r") file.length() } "bytes" -> { - input.toBinary().size.toLong() + (input.data as ByteArray).size.toLong() } else -> throw UnsupportedOperationException() } @@ -414,7 +405,7 @@ class Client @JvmOverloads constructor( if (size < CHUNK_SIZE) { val data = when(input.sourceType) { "file", "path" -> File(input.path).asRequestBody() - "bytes" -> input.toBinary().toRequestBody(input.mimeType?.toMediaType()) + "bytes" -> (input.data as ByteArray).toRequestBody(input.mimeType.toMediaType()) else -> throw UnsupportedOperationException() } params[paramName] = MultipartBody.Part.createFormData( @@ -461,7 +452,7 @@ class Client @JvmOverloads constructor( } else { size - 1 } - input.toBinary().copyInto( + (input.data as ByteArray).copyInto( buffer, startIndex = offset.toInt(), endIndex = end.toInt() @@ -503,7 +494,7 @@ class Client @JvmOverloads constructor( return converter(result as Map<String, Any>) } - /** + /** * Await Redirect * * @param request @@ -530,14 +521,14 @@ class Client @JvmOverloads constructor( .charStream() .buffered() .use(BufferedReader::readText) - + val error = if (response.headers["content-type"]?.contains("application/json") == true) { val map = body.fromJson<Map<String, Any>>() AppwriteException( - map["message"] as? String ?: "", + map["message"] as? String ?: "", (map["code"] as Number).toInt(), - map["type"] as? String ?: "", + map["type"] as? String ?: "", body ) } else { @@ -581,14 +572,14 @@ class Client @JvmOverloads constructor( .charStream() .buffered() .use(BufferedReader::readText) - + val error = if (response.headers["content-type"]?.contains("application/json") == true) { val map = body.fromJson<Map<String, Any>>() AppwriteException( - map["message"] as? String ?: "", + map["message"] as? String ?: "", (map["code"] as Number).toInt(), - map["type"] as? String ?: "", + map["type"] as? String ?: "", body ) } else { @@ -623,14 +614,6 @@ class Client @JvmOverloads constructor( return } } - if (response.headers["content-type"]?.contains("multipart/form-data") == true) { - val binaryBody = response.body!!.bytes() - val body = String(binaryBody) - val map = body.fromMultiPart(binaryBody) - it.resume(converter?.invoke(map) ?: map as T) - return - } - val body = response.body!! .charStream() .buffered() @@ -639,7 +622,6 @@ class Client @JvmOverloads constructor( it.resume(true as T) return } - val map = body.fromJson<Map<String, Any>>() it.resume( converter?.invoke(map) ?: map as T @@ -647,4 +629,4 @@ class Client @JvmOverloads constructor( } }) } -} +} \ No newline at end of file diff --git a/src/main/kotlin/io/appwrite/enums/MessagePriority.kt b/src/main/kotlin/io/appwrite/enums/MessagePriority.kt new file mode 100644 index 0000000..6218c1e --- /dev/null +++ b/src/main/kotlin/io/appwrite/enums/MessagePriority.kt @@ -0,0 +1,12 @@ +package io.appwrite.enums + +import com.google.gson.annotations.SerializedName + +enum class MessagePriority(val value: String) { + @SerializedName("normal") + NORMAL("normal"), + @SerializedName("high") + HIGH("high"); + + override fun toString() = value +} \ No newline at end of file diff --git a/src/main/kotlin/io/appwrite/enums/Runtime.kt b/src/main/kotlin/io/appwrite/enums/Runtime.kt index cfec417..c19f52b 100644 --- a/src/main/kotlin/io/appwrite/enums/Runtime.kt +++ b/src/main/kotlin/io/appwrite/enums/Runtime.kt @@ -15,6 +15,8 @@ enum class Runtime(val value: String) { NODE_20_0("node-20.0"), @SerializedName("node-21.0") NODE_21_0("node-21.0"), + @SerializedName("node-22") + NODE_22("node-22"), @SerializedName("php-8.0") PHP_8_0("php-8.0"), @SerializedName("php-8.1") @@ -51,6 +53,10 @@ enum class Runtime(val value: String) { DENO_1_35("deno-1.35"), @SerializedName("deno-1.40") DENO_1_40("deno-1.40"), + @SerializedName("deno-1.46") + DENO_1_46("deno-1.46"), + @SerializedName("deno-2.0") + DENO_2_0("deno-2.0"), @SerializedName("dart-2.15") DART_2_15("dart-2.15"), @SerializedName("dart-2.16") @@ -65,12 +71,14 @@ enum class Runtime(val value: String) { DART_3_1("dart-3.1"), @SerializedName("dart-3.3") DART_3_3("dart-3.3"), - @SerializedName("dotnet-3.1") - DOTNET_3_1("dotnet-3.1"), + @SerializedName("dart-3.5") + DART_3_5("dart-3.5"), @SerializedName("dotnet-6.0") DOTNET_6_0("dotnet-6.0"), @SerializedName("dotnet-7.0") DOTNET_7_0("dotnet-7.0"), + @SerializedName("dotnet-8.0") + DOTNET_8_0("dotnet-8.0"), @SerializedName("java-8.0") JAVA_8_0("java-8.0"), @SerializedName("java-11.0") @@ -81,26 +89,38 @@ enum class Runtime(val value: String) { JAVA_18_0("java-18.0"), @SerializedName("java-21.0") JAVA_21_0("java-21.0"), + @SerializedName("java-22") + JAVA_22("java-22"), @SerializedName("swift-5.5") SWIFT_5_5("swift-5.5"), @SerializedName("swift-5.8") SWIFT_5_8("swift-5.8"), @SerializedName("swift-5.9") SWIFT_5_9("swift-5.9"), + @SerializedName("swift-5.10") + SWIFT_5_10("swift-5.10"), @SerializedName("kotlin-1.6") KOTLIN_1_6("kotlin-1.6"), @SerializedName("kotlin-1.8") KOTLIN_1_8("kotlin-1.8"), @SerializedName("kotlin-1.9") KOTLIN_1_9("kotlin-1.9"), + @SerializedName("kotlin-2.0") + KOTLIN_2_0("kotlin-2.0"), @SerializedName("cpp-17") CPP_17("cpp-17"), @SerializedName("cpp-20") CPP_20("cpp-20"), @SerializedName("bun-1.0") BUN_1_0("bun-1.0"), + @SerializedName("bun-1.1") + BUN_1_1("bun-1.1"), @SerializedName("go-1.23") - GO_1_23("go-1.23"); + GO_1_23("go-1.23"), + @SerializedName("static-1") + STATIC_1("static-1"), + @SerializedName("flutter-3.24") + FLUTTER_3_24("flutter-3.24"); override fun toString() = value } \ No newline at end of file diff --git a/src/main/kotlin/io/appwrite/extensions/TypeExtensions.kt b/src/main/kotlin/io/appwrite/extensions/TypeExtensions.kt index 521dc81..2674b99 100644 --- a/src/main/kotlin/io/appwrite/extensions/TypeExtensions.kt +++ b/src/main/kotlin/io/appwrite/extensions/TypeExtensions.kt @@ -1,107 +1,8 @@ package io.appwrite.extensions -import io.appwrite.models.Payload import kotlin.reflect.KClass import kotlin.reflect.typeOf inline fun <reified T : Any> classOf(): Class<T> { return (typeOf<T>().classifier!! as KClass<T>).java -} - -fun String.fromMultiPart(binaryBody: ByteArray): Map<String, Any> { - val match = Regex("(-+\\w+)--").find(this) ?: return emptyMap() - // For kotlin - - val boundary = match.groupValues[1] - - var map = - mutableMapOf<String, Any>( - "\$id" to "", - "\$createdAt" to "", - "\$updatedAt" to "", - "\$permissions" to emptyList<String>(), - "functionId" to "", - "trigger" to "", - "status" to "", - "requestMethod" to "", - "requestPath" to "", - "requestHeaders" to emptyList<HashMap<String, Any>>(), - "responseStatusCode" to 0, - "responseBody" to Payload.fromBinary(ByteArray(0)), - "responseHeaders" to emptyList<HashMap<String, Any>>(), - "logs" to "", - "errors" to "", - "duration" to 0.0, - "scheduledAt" to "", - ) - - val parts = this.split(boundary) - for (part in parts) { - var lines = part.split("\r\n") - - val name = Regex("name=\"?(\\w+)").find(part) ?: continue - - lines = - lines - .dropWhile { it.isEmpty() } - .drop(1) - .dropWhile { it.isEmpty() } - .dropLastWhile { it.isEmpty() } - val key = name.groupValues[1] - - if (lines.isEmpty()) { - continue - } - - if (key == "responseBody") { - val needle = "name=\"responseBody\"\r\n\r\n" - val indexOf = this.indexOf(needle) + needle.length - val endBytes = "\r\n-------".toByteArray() - - val list = ByteArray(binaryBody.size - indexOf) - val multipart = binaryBody.drop(indexOf) - - var weHitTheEnd = false - var j = 0 - for (i in multipart) { - if (multipart.size > j + endBytes.size) { - var jj = 0 - for (byte in endBytes) { - if (byte != multipart[j + jj]) break - jj++ - if (jj != endBytes.size - 1) continue - weHitTheEnd = true - } - } - if (weHitTheEnd) { - break - } - - list[j] = multipart[j] - j++ - } - - map["responseBody"] = - Payload.fromBinary(list.dropLastWhile { it == 0.toByte() }.toByteArray()) - continue - } - - if (lines[0] == "Content-Type: application/json") { - lines = lines.drop(1).dropWhile { it.isEmpty() } - val list = lines.joinToString("\r\n").fromJson<List<String>>() - map[key] = list - continue - } - - val value = lines.joinToString("\r\n") - - map[key] = - when (key) { - "responseStatusCode" -> value.toInt() - "duration" -> value.toFloat() - else -> value - } - } - - return map -} +} \ No newline at end of file diff --git a/src/main/kotlin/io/appwrite/models/AttributeEnum.kt b/src/main/kotlin/io/appwrite/models/AttributeEnum.kt index e332178..c8af621 100644 --- a/src/main/kotlin/io/appwrite/models/AttributeEnum.kt +++ b/src/main/kotlin/io/appwrite/models/AttributeEnum.kt @@ -59,7 +59,7 @@ data class AttributeEnum( * Array of elements in enumerated type. */ @SerializedName("elements") - val elements: List<Any>, + val elements: List<String>, /** * String format. @@ -102,7 +102,7 @@ data class AttributeEnum( array = map["array"] as? Boolean?, createdAt = map["\$createdAt"] as String, updatedAt = map["\$updatedAt"] as String, - elements = map["elements"] as List<Any>, + elements = map["elements"] as List<String>, format = map["format"] as String, default = map["default"] as? String?, ) diff --git a/src/main/kotlin/io/appwrite/models/Bucket.kt b/src/main/kotlin/io/appwrite/models/Bucket.kt index 25891cd..9faeb35 100644 --- a/src/main/kotlin/io/appwrite/models/Bucket.kt +++ b/src/main/kotlin/io/appwrite/models/Bucket.kt @@ -29,7 +29,7 @@ data class Bucket( * Bucket permissions. [Learn more about permissions](https://appwrite.io/docs/permissions). */ @SerializedName("\$permissions") - val permissions: List<Any>, + val permissions: List<String>, /** * Whether file-level security is enabled. [Learn more about permissions](https://appwrite.io/docs/permissions). @@ -59,7 +59,7 @@ data class Bucket( * Allowed file extensions. */ @SerializedName("allowedFileExtensions") - val allowedFileExtensions: List<Any>, + val allowedFileExtensions: List<String>, /** * Compression algorithm choosen for compression. Will be one of none, [gzip](https://en.wikipedia.org/wiki/Gzip), or [zstd](https://en.wikipedia.org/wiki/Zstd). @@ -104,12 +104,12 @@ data class Bucket( id = map["\$id"] as String, createdAt = map["\$createdAt"] as String, updatedAt = map["\$updatedAt"] as String, - permissions = map["\$permissions"] as List<Any>, + permissions = map["\$permissions"] as List<String>, fileSecurity = map["fileSecurity"] as Boolean, name = map["name"] as String, enabled = map["enabled"] as Boolean, maximumFileSize = (map["maximumFileSize"] as Number).toLong(), - allowedFileExtensions = map["allowedFileExtensions"] as List<Any>, + allowedFileExtensions = map["allowedFileExtensions"] as List<String>, compression = map["compression"] as String, encryption = map["encryption"] as Boolean, antivirus = map["antivirus"] as Boolean, diff --git a/src/main/kotlin/io/appwrite/models/Collection.kt b/src/main/kotlin/io/appwrite/models/Collection.kt index bf4699d..56b7b41 100644 --- a/src/main/kotlin/io/appwrite/models/Collection.kt +++ b/src/main/kotlin/io/appwrite/models/Collection.kt @@ -29,7 +29,7 @@ data class Collection( * Collection permissions. [Learn more about permissions](https://appwrite.io/docs/permissions). */ @SerializedName("\$permissions") - val permissions: List<Any>, + val permissions: List<String>, /** * Database ID. @@ -90,7 +90,7 @@ data class Collection( id = map["\$id"] as String, createdAt = map["\$createdAt"] as String, updatedAt = map["\$updatedAt"] as String, - permissions = map["\$permissions"] as List<Any>, + permissions = map["\$permissions"] as List<String>, databaseId = map["databaseId"] as String, name = map["name"] as String, enabled = map["enabled"] as Boolean, diff --git a/src/main/kotlin/io/appwrite/models/Document.kt b/src/main/kotlin/io/appwrite/models/Document.kt index 5a7d371..01204de 100644 --- a/src/main/kotlin/io/appwrite/models/Document.kt +++ b/src/main/kotlin/io/appwrite/models/Document.kt @@ -41,7 +41,7 @@ data class Document<T>( * Document permissions. [Learn more about permissions](https://appwrite.io/docs/permissions). */ @SerializedName("\$permissions") - val permissions: List<Any>, + val permissions: List<String>, /** * Additional properties @@ -66,7 +66,7 @@ data class Document<T>( databaseId: String, createdAt: String, updatedAt: String, - permissions: List<Any>, + permissions: List<String>, data: Map<String, Any> ) = Document<Map<String, Any>>( id, @@ -88,7 +88,7 @@ data class Document<T>( databaseId = map["\$databaseId"] as String, createdAt = map["\$createdAt"] as String, updatedAt = map["\$updatedAt"] as String, - permissions = map["\$permissions"] as List<Any>, + permissions = map["\$permissions"] as List<String>, data = map.jsonCast(to = nestedType) ) } diff --git a/src/main/kotlin/io/appwrite/models/Execution.kt b/src/main/kotlin/io/appwrite/models/Execution.kt index c16659a..1b6226a 100644 --- a/src/main/kotlin/io/appwrite/models/Execution.kt +++ b/src/main/kotlin/io/appwrite/models/Execution.kt @@ -29,7 +29,7 @@ data class Execution( * Execution roles. */ @SerializedName("\$permissions") - val permissions: List<Any>, + val permissions: List<String>, /** * Function ID. @@ -77,7 +77,7 @@ data class Execution( * HTTP response body. This will return empty unless execution is created as synchronous. */ @SerializedName("responseBody") - val responseBody: Payload, + val responseBody: String, /** * HTTP response headers as a key-value object. This will return only whitelisted headers. All headers are returned if execution is created as synchronous. @@ -139,7 +139,7 @@ data class Execution( id = map["\$id"] as String, createdAt = map["\$createdAt"] as String, updatedAt = map["\$updatedAt"] as String, - permissions = map["\$permissions"] as List<Any>, + permissions = map["\$permissions"] as List<String>, functionId = map["functionId"] as String, trigger = map["trigger"] as String, status = map["status"] as String, @@ -147,7 +147,7 @@ data class Execution( requestPath = map["requestPath"] as String, requestHeaders = (map["requestHeaders"] as List<Map<String, Any>>).map { Headers.from(map = it) }, responseStatusCode = (map["responseStatusCode"] as Number).toLong(), - responseBody = map["responseBody"] as Payload, + responseBody = map["responseBody"] as String, responseHeaders = (map["responseHeaders"] as List<Map<String, Any>>).map { Headers.from(map = it) }, logs = map["logs"] as String, errors = map["errors"] as String, diff --git a/src/main/kotlin/io/appwrite/models/File.kt b/src/main/kotlin/io/appwrite/models/File.kt index 5c2b731..897fc4a 100644 --- a/src/main/kotlin/io/appwrite/models/File.kt +++ b/src/main/kotlin/io/appwrite/models/File.kt @@ -35,7 +35,7 @@ data class File( * File permissions. [Learn more about permissions](https://appwrite.io/docs/permissions). */ @SerializedName("\$permissions") - val permissions: List<Any>, + val permissions: List<String>, /** * File name. @@ -98,7 +98,7 @@ data class File( bucketId = map["bucketId"] as String, createdAt = map["\$createdAt"] as String, updatedAt = map["\$updatedAt"] as String, - permissions = map["\$permissions"] as List<Any>, + permissions = map["\$permissions"] as List<String>, name = map["name"] as String, signature = map["signature"] as String, mimeType = map["mimeType"] as String, diff --git a/src/main/kotlin/io/appwrite/models/Function.kt b/src/main/kotlin/io/appwrite/models/Function.kt index d46c936..bb1b50e 100644 --- a/src/main/kotlin/io/appwrite/models/Function.kt +++ b/src/main/kotlin/io/appwrite/models/Function.kt @@ -29,7 +29,7 @@ data class Function( * Execution permissions. */ @SerializedName("execute") - val execute: List<Any>, + val execute: List<String>, /** * Function name. @@ -71,7 +71,7 @@ data class Function( * Allowed permission scopes. */ @SerializedName("scopes") - val scopes: List<Any>, + val scopes: List<String>, /** * Function variables. @@ -83,10 +83,10 @@ data class Function( * Function trigger events. */ @SerializedName("events") - val events: List<Any>, + val events: List<String>, /** - * Function execution schedult in CRON format. + * Function execution schedule in CRON format. */ @SerializedName("schedule") val schedule: String, @@ -188,16 +188,16 @@ data class Function( id = map["\$id"] as String, createdAt = map["\$createdAt"] as String, updatedAt = map["\$updatedAt"] as String, - execute = map["execute"] as List<Any>, + execute = map["execute"] as List<String>, name = map["name"] as String, enabled = map["enabled"] as Boolean, live = map["live"] as Boolean, logging = map["logging"] as Boolean, runtime = map["runtime"] as String, deployment = map["deployment"] as String, - scopes = map["scopes"] as List<Any>, + scopes = map["scopes"] as List<String>, vars = (map["vars"] as List<Map<String, Any>>).map { Variable.from(map = it) }, - events = map["events"] as List<Any>, + events = map["events"] as List<String>, schedule = map["schedule"] as String, timeout = (map["timeout"] as Number).toLong(), entrypoint = map["entrypoint"] as String, diff --git a/src/main/kotlin/io/appwrite/models/Index.kt b/src/main/kotlin/io/appwrite/models/Index.kt index 1d399e8..c45e25f 100644 --- a/src/main/kotlin/io/appwrite/models/Index.kt +++ b/src/main/kotlin/io/appwrite/models/Index.kt @@ -35,13 +35,13 @@ data class Index( * Index attributes. */ @SerializedName("attributes") - val attributes: List<Any>, + val attributes: List<String>, /** * Index orders. */ @SerializedName("orders") - var orders: List<Any>?, + var orders: List<String>?, /** * Index creation date in ISO 8601 format. @@ -77,8 +77,8 @@ data class Index( type = map["type"] as String, status = map["status"] as String, error = map["error"] as String, - attributes = map["attributes"] as List<Any>, - orders = map["orders"] as? List<Any>?, + attributes = map["attributes"] as List<String>, + orders = map["orders"] as? List<String>?, createdAt = map["\$createdAt"] as String, updatedAt = map["\$updatedAt"] as String, ) diff --git a/src/main/kotlin/io/appwrite/models/InputFile.kt b/src/main/kotlin/io/appwrite/models/InputFile.kt new file mode 100644 index 0000000..afbb2e9 --- /dev/null +++ b/src/main/kotlin/io/appwrite/models/InputFile.kt @@ -0,0 +1,37 @@ +package io.appwrite.models + +import java.io.File +import java.net.URLConnection +import java.nio.file.Files +import java.nio.file.Paths + +class InputFile private constructor() { + + lateinit var path: String + lateinit var filename: String + lateinit var mimeType: String + lateinit var sourceType: String + lateinit var data: Any + + companion object { + fun fromFile(file: File) = InputFile().apply { + path = file.canonicalPath + filename = file.name + mimeType = Files.probeContentType(Paths.get(file.canonicalPath)) + ?: URLConnection.guessContentTypeFromName(filename) + ?: "" + sourceType = "file" + } + + fun fromPath(path: String): InputFile = fromFile(File(path)).apply { + sourceType = "path" + } + + fun fromBytes(bytes: ByteArray, filename: String = "", mimeType: String = "") = InputFile().apply { + this.filename = filename + this.mimeType = mimeType + data = bytes + sourceType = "bytes" + } + } +} \ No newline at end of file diff --git a/src/main/kotlin/io/appwrite/models/Membership.kt b/src/main/kotlin/io/appwrite/models/Membership.kt index 17ab303..4a899ee 100644 --- a/src/main/kotlin/io/appwrite/models/Membership.kt +++ b/src/main/kotlin/io/appwrite/models/Membership.kt @@ -32,13 +32,13 @@ data class Membership( val userId: String, /** - * User name. + * User name. Hide this attribute by toggling membership privacy in the Console. */ @SerializedName("userName") val userName: String, /** - * User email address. + * User email address. Hide this attribute by toggling membership privacy in the Console. */ @SerializedName("userEmail") val userEmail: String, @@ -74,7 +74,7 @@ data class Membership( val confirm: Boolean, /** - * Multi factor authentication status, true if the user has MFA enabled or false otherwise. + * Multi factor authentication status, true if the user has MFA enabled or false otherwise. Hide this attribute by toggling membership privacy in the Console. */ @SerializedName("mfa") val mfa: Boolean, @@ -83,7 +83,7 @@ data class Membership( * User list of roles */ @SerializedName("roles") - val roles: List<Any>, + val roles: List<String>, ) { fun toMap(): Map<String, Any> = mapOf( @@ -120,7 +120,7 @@ data class Membership( joined = map["joined"] as String, confirm = map["confirm"] as Boolean, mfa = map["mfa"] as Boolean, - roles = map["roles"] as List<Any>, + roles = map["roles"] as List<String>, ) } } \ No newline at end of file diff --git a/src/main/kotlin/io/appwrite/models/Message.kt b/src/main/kotlin/io/appwrite/models/Message.kt index 4550dd5..e5509c1 100644 --- a/src/main/kotlin/io/appwrite/models/Message.kt +++ b/src/main/kotlin/io/appwrite/models/Message.kt @@ -35,19 +35,19 @@ data class Message( * Topic IDs set as recipients. */ @SerializedName("topics") - val topics: List<Any>, + val topics: List<String>, /** * User IDs set as recipients. */ @SerializedName("users") - val users: List<Any>, + val users: List<String>, /** * Target IDs set as recipients. */ @SerializedName("targets") - val targets: List<Any>, + val targets: List<String>, /** * The scheduled time for message. @@ -65,7 +65,7 @@ data class Message( * Delivery errors if any. */ @SerializedName("deliveryErrors") - var deliveryErrors: List<Any>?, + var deliveryErrors: List<String>?, /** * Number of recipients the message was delivered to. @@ -112,12 +112,12 @@ data class Message( createdAt = map["\$createdAt"] as String, updatedAt = map["\$updatedAt"] as String, providerType = map["providerType"] as String, - topics = map["topics"] as List<Any>, - users = map["users"] as List<Any>, - targets = map["targets"] as List<Any>, + topics = map["topics"] as List<String>, + users = map["users"] as List<String>, + targets = map["targets"] as List<String>, scheduledAt = map["scheduledAt"] as? String?, deliveredAt = map["deliveredAt"] as? String?, - deliveryErrors = map["deliveryErrors"] as? List<Any>?, + deliveryErrors = map["deliveryErrors"] as? List<String>?, deliveredTotal = (map["deliveredTotal"] as Number).toLong(), data = map["data"] as Any, status = map["status"] as String, diff --git a/src/main/kotlin/io/appwrite/models/MfaRecoveryCodes.kt b/src/main/kotlin/io/appwrite/models/MfaRecoveryCodes.kt index ad8bc45..3fab41a 100644 --- a/src/main/kotlin/io/appwrite/models/MfaRecoveryCodes.kt +++ b/src/main/kotlin/io/appwrite/models/MfaRecoveryCodes.kt @@ -11,7 +11,7 @@ data class MfaRecoveryCodes( * Recovery codes. */ @SerializedName("recoveryCodes") - val recoveryCodes: List<Any>, + val recoveryCodes: List<String>, ) { fun toMap(): Map<String, Any> = mapOf( @@ -24,7 +24,7 @@ data class MfaRecoveryCodes( fun from( map: Map<String, Any>, ) = MfaRecoveryCodes( - recoveryCodes = map["recoveryCodes"] as List<Any>, + recoveryCodes = map["recoveryCodes"] as List<String>, ) } } \ No newline at end of file diff --git a/src/main/kotlin/io/appwrite/models/Payload.kt b/src/main/kotlin/io/appwrite/models/Payload.kt deleted file mode 100644 index b6f5fcc..0000000 --- a/src/main/kotlin/io/appwrite/models/Payload.kt +++ /dev/null @@ -1,73 +0,0 @@ -package io.appwrite.models - -import io.appwrite.extensions.gson -import java.io.File -import java.net.URLConnection -import java.nio.file.Files -import java.nio.file.Paths - -class Payload private constructor() { - - lateinit var path: String - lateinit var filename: String - lateinit var sourceType: String - lateinit var data: Any - var mimeType: String? = null - - override fun toString(): String { - if (sourceType != "bytes") { - throw IllegalArgumentException("source type is not supported: $sourceType") - } - - return String(data as ByteArray) - } - - fun toBinary(): ByteArray { - if (sourceType != "bytes") { - throw IllegalArgumentException("source type is not supported: $sourceType") - } - - return data as ByteArray - } - - fun toJson(): MutableMap<String, Any> { - if (sourceType != "bytes") { - throw IllegalArgumentException("source type is not supported: $sourceType") - } - - return gson.fromJson(toString(), MutableMap::class.java) as MutableMap<String, Any> - } - - fun toFile(path: String): File { - Files.createDirectories(Paths.get(path).parent); - - val file = File(path) - file.appendBytes(toBinary()) - return file - } - - companion object { - fun fromFile(path: String, filename: String = ""): Payload = fromFileObject(File(path), filename).apply { - sourceType = "path" - } - - fun fromBinary(bytes: ByteArray, filename: String = "") = Payload().apply { - this.filename = filename - data = bytes - sourceType = "bytes" - } - - fun fromString(string: String) = fromBinary(string.toByteArray()) - - fun fromJson(data: Any) = fromString(gson.toJson(data)) - - fun fromFileObject(file: File, name: String = "") = Payload().apply { - path = file.canonicalPath - filename = if (name != "") name else file.name - mimeType = Files.probeContentType(Paths.get(file.canonicalPath)) - ?: URLConnection.guessContentTypeFromName(filename) - ?: "" - sourceType = "file" - } - } -} diff --git a/src/main/kotlin/io/appwrite/models/Runtime.kt b/src/main/kotlin/io/appwrite/models/Runtime.kt index e4261e0..79c5b6b 100644 --- a/src/main/kotlin/io/appwrite/models/Runtime.kt +++ b/src/main/kotlin/io/appwrite/models/Runtime.kt @@ -53,7 +53,7 @@ data class Runtime( * List of supported architectures. */ @SerializedName("supports") - val supports: List<Any>, + val supports: List<String>, ) { fun toMap(): Map<String, Any> = mapOf( @@ -80,7 +80,7 @@ data class Runtime( base = map["base"] as String, image = map["image"] as String, logo = map["logo"] as String, - supports = map["supports"] as List<Any>, + supports = map["supports"] as List<String>, ) } } \ No newline at end of file diff --git a/src/main/kotlin/io/appwrite/models/Session.kt b/src/main/kotlin/io/appwrite/models/Session.kt index 1c6a7b2..02dbb28 100644 --- a/src/main/kotlin/io/appwrite/models/Session.kt +++ b/src/main/kotlin/io/appwrite/models/Session.kt @@ -167,7 +167,7 @@ data class Session( * Returns a list of active session factors. */ @SerializedName("factors") - val factors: List<Any>, + val factors: List<String>, /** * Secret used to authenticate the user. Only included if the request was made with an API key @@ -246,7 +246,7 @@ data class Session( countryCode = map["countryCode"] as String, countryName = map["countryName"] as String, current = map["current"] as Boolean, - factors = map["factors"] as List<Any>, + factors = map["factors"] as List<String>, secret = map["secret"] as String, mfaUpdatedAt = map["mfaUpdatedAt"] as String, ) diff --git a/src/main/kotlin/io/appwrite/models/Target.kt b/src/main/kotlin/io/appwrite/models/Target.kt index bd4d207..54b4694 100644 --- a/src/main/kotlin/io/appwrite/models/Target.kt +++ b/src/main/kotlin/io/appwrite/models/Target.kt @@ -55,6 +55,12 @@ data class Target( @SerializedName("identifier") val identifier: String, + /** + * Is the target expired. + */ + @SerializedName("expired") + val expired: Boolean, + ) { fun toMap(): Map<String, Any> = mapOf( "\$id" to id as Any, @@ -65,6 +71,7 @@ data class Target( "providerId" to providerId as Any, "providerType" to providerType as Any, "identifier" to identifier as Any, + "expired" to expired as Any, ) companion object { @@ -81,6 +88,7 @@ data class Target( providerId = map["providerId"] as? String?, providerType = map["providerType"] as String, identifier = map["identifier"] as String, + expired = map["expired"] as Boolean, ) } } \ No newline at end of file diff --git a/src/main/kotlin/io/appwrite/models/Topic.kt b/src/main/kotlin/io/appwrite/models/Topic.kt index 82f59f1..accfbff 100644 --- a/src/main/kotlin/io/appwrite/models/Topic.kt +++ b/src/main/kotlin/io/appwrite/models/Topic.kt @@ -53,7 +53,7 @@ data class Topic( * Subscribe permissions. */ @SerializedName("subscribe") - val subscribe: List<Any>, + val subscribe: List<String>, ) { fun toMap(): Map<String, Any> = mapOf( @@ -80,7 +80,7 @@ data class Topic( emailTotal = (map["emailTotal"] as Number).toLong(), smsTotal = (map["smsTotal"] as Number).toLong(), pushTotal = (map["pushTotal"] as Number).toLong(), - subscribe = map["subscribe"] as List<Any>, + subscribe = map["subscribe"] as List<String>, ) } } \ No newline at end of file diff --git a/src/main/kotlin/io/appwrite/models/User.kt b/src/main/kotlin/io/appwrite/models/User.kt index 095467a..fd03fc2 100644 --- a/src/main/kotlin/io/appwrite/models/User.kt +++ b/src/main/kotlin/io/appwrite/models/User.kt @@ -65,7 +65,7 @@ data class User<T>( * Labels for the user. */ @SerializedName("labels") - val labels: List<Any>, + val labels: List<String>, /** * Password update time in ISO 8601 format. @@ -155,7 +155,7 @@ data class User<T>( hashOptions: Any?, registration: String, status: Boolean, - labels: List<Any>, + labels: List<String>, passwordUpdate: String, email: String, phone: String, @@ -201,7 +201,7 @@ data class User<T>( hashOptions = map["hashOptions"] as? Any?, registration = map["registration"] as String, status = map["status"] as Boolean, - labels = map["labels"] as List<Any>, + labels = map["labels"] as List<String>, passwordUpdate = map["passwordUpdate"] as String, email = map["email"] as String, phone = map["phone"] as String, diff --git a/src/main/kotlin/io/appwrite/services/Account.kt b/src/main/kotlin/io/appwrite/services/Account.kt index b7bd1f0..aaa851c 100644 --- a/src/main/kotlin/io/appwrite/services/Account.kt +++ b/src/main/kotlin/io/appwrite/services/Account.kt @@ -28,7 +28,7 @@ class Account(client: Client) : Service(client) { val apiParams = mutableMapOf<String, Any?>( ) - val apiHeaders = mutableMapOf<String, String>( + val apiHeaders = mutableMapOf( "content-type" to "application/json", ) val converter: (Any) -> io.appwrite.models.User<T> = { @@ -85,7 +85,7 @@ class Account(client: Client) : Service(client) { "password" to password, "name" to name, ) - val apiHeaders = mutableMapOf<String, String>( + val apiHeaders = mutableMapOf( "content-type" to "application/json", ) val converter: (Any) -> io.appwrite.models.User<T> = { @@ -148,7 +148,7 @@ class Account(client: Client) : Service(client) { "email" to email, "password" to password, ) - val apiHeaders = mutableMapOf<String, String>( + val apiHeaders = mutableMapOf( "content-type" to "application/json", ) val converter: (Any) -> io.appwrite.models.User<T> = { @@ -201,7 +201,7 @@ class Account(client: Client) : Service(client) { val apiParams = mutableMapOf<String, Any?>( "queries" to queries, ) - val apiHeaders = mutableMapOf<String, String>( + val apiHeaders = mutableMapOf( "content-type" to "application/json", ) val converter: (Any) -> io.appwrite.models.IdentityList = { @@ -234,7 +234,7 @@ class Account(client: Client) : Service(client) { val apiParams = mutableMapOf<String, Any?>( ) - val apiHeaders = mutableMapOf<String, String>( + val apiHeaders = mutableMapOf( "content-type" to "application/json", ) return client.call( @@ -260,7 +260,7 @@ class Account(client: Client) : Service(client) { val apiParams = mutableMapOf<String, Any?>( ) - val apiHeaders = mutableMapOf<String, String>( + val apiHeaders = mutableMapOf( "content-type" to "application/json", ) val converter: (Any) -> io.appwrite.models.Jwt = { @@ -294,7 +294,7 @@ class Account(client: Client) : Service(client) { val apiParams = mutableMapOf<String, Any?>( "queries" to queries, ) - val apiHeaders = mutableMapOf<String, String>( + val apiHeaders = mutableMapOf( "content-type" to "application/json", ) val converter: (Any) -> io.appwrite.models.LogList = { @@ -328,7 +328,7 @@ class Account(client: Client) : Service(client) { val apiParams = mutableMapOf<String, Any?>( "mfa" to mfa, ) - val apiHeaders = mutableMapOf<String, String>( + val apiHeaders = mutableMapOf( "content-type" to "application/json", ) val converter: (Any) -> io.appwrite.models.User<T> = { @@ -377,7 +377,7 @@ class Account(client: Client) : Service(client) { val apiParams = mutableMapOf<String, Any?>( ) - val apiHeaders = mutableMapOf<String, String>( + val apiHeaders = mutableMapOf( "content-type" to "application/json", ) val converter: (Any) -> io.appwrite.models.MfaType = { @@ -414,7 +414,7 @@ class Account(client: Client) : Service(client) { val apiParams = mutableMapOf<String, Any?>( "otp" to otp, ) - val apiHeaders = mutableMapOf<String, String>( + val apiHeaders = mutableMapOf( "content-type" to "application/json", ) val converter: (Any) -> io.appwrite.models.User<T> = { @@ -466,7 +466,7 @@ class Account(client: Client) : Service(client) { val apiParams = mutableMapOf<String, Any?>( ) - val apiHeaders = mutableMapOf<String, String>( + val apiHeaders = mutableMapOf( "content-type" to "application/json", ) return client.call( @@ -495,7 +495,7 @@ class Account(client: Client) : Service(client) { val apiParams = mutableMapOf<String, Any?>( "factor" to factor, ) - val apiHeaders = mutableMapOf<String, String>( + val apiHeaders = mutableMapOf( "content-type" to "application/json", ) val converter: (Any) -> io.appwrite.models.MfaChallenge = { @@ -531,7 +531,7 @@ class Account(client: Client) : Service(client) { "challengeId" to challengeId, "otp" to otp, ) - val apiHeaders = mutableMapOf<String, String>( + val apiHeaders = mutableMapOf( "content-type" to "application/json", ) return client.call( @@ -557,7 +557,7 @@ class Account(client: Client) : Service(client) { val apiParams = mutableMapOf<String, Any?>( ) - val apiHeaders = mutableMapOf<String, String>( + val apiHeaders = mutableMapOf( "content-type" to "application/json", ) val converter: (Any) -> io.appwrite.models.MfaFactors = { @@ -587,7 +587,7 @@ class Account(client: Client) : Service(client) { val apiParams = mutableMapOf<String, Any?>( ) - val apiHeaders = mutableMapOf<String, String>( + val apiHeaders = mutableMapOf( "content-type" to "application/json", ) val converter: (Any) -> io.appwrite.models.MfaRecoveryCodes = { @@ -617,7 +617,7 @@ class Account(client: Client) : Service(client) { val apiParams = mutableMapOf<String, Any?>( ) - val apiHeaders = mutableMapOf<String, String>( + val apiHeaders = mutableMapOf( "content-type" to "application/json", ) val converter: (Any) -> io.appwrite.models.MfaRecoveryCodes = { @@ -647,7 +647,7 @@ class Account(client: Client) : Service(client) { val apiParams = mutableMapOf<String, Any?>( ) - val apiHeaders = mutableMapOf<String, String>( + val apiHeaders = mutableMapOf( "content-type" to "application/json", ) val converter: (Any) -> io.appwrite.models.MfaRecoveryCodes = { @@ -681,7 +681,7 @@ class Account(client: Client) : Service(client) { val apiParams = mutableMapOf<String, Any?>( "name" to name, ) - val apiHeaders = mutableMapOf<String, String>( + val apiHeaders = mutableMapOf( "content-type" to "application/json", ) val converter: (Any) -> io.appwrite.models.User<T> = { @@ -735,7 +735,7 @@ class Account(client: Client) : Service(client) { "password" to password, "oldPassword" to oldPassword, ) - val apiHeaders = mutableMapOf<String, String>( + val apiHeaders = mutableMapOf( "content-type" to "application/json", ) val converter: (Any) -> io.appwrite.models.User<T> = { @@ -792,7 +792,7 @@ class Account(client: Client) : Service(client) { "phone" to phone, "password" to password, ) - val apiHeaders = mutableMapOf<String, String>( + val apiHeaders = mutableMapOf( "content-type" to "application/json", ) val converter: (Any) -> io.appwrite.models.User<T> = { @@ -842,7 +842,7 @@ class Account(client: Client) : Service(client) { val apiParams = mutableMapOf<String, Any?>( ) - val apiHeaders = mutableMapOf<String, String>( + val apiHeaders = mutableMapOf( "content-type" to "application/json", ) val converter: (Any) -> io.appwrite.models.Preferences<T> = { @@ -889,7 +889,7 @@ class Account(client: Client) : Service(client) { val apiParams = mutableMapOf<String, Any?>( "prefs" to prefs, ) - val apiHeaders = mutableMapOf<String, String>( + val apiHeaders = mutableMapOf( "content-type" to "application/json", ) val converter: (Any) -> io.appwrite.models.User<T> = { @@ -941,7 +941,7 @@ class Account(client: Client) : Service(client) { "email" to email, "url" to url, ) - val apiHeaders = mutableMapOf<String, String>( + val apiHeaders = mutableMapOf( "content-type" to "application/json", ) val converter: (Any) -> io.appwrite.models.Token = { @@ -980,7 +980,7 @@ class Account(client: Client) : Service(client) { "secret" to secret, "password" to password, ) - val apiHeaders = mutableMapOf<String, String>( + val apiHeaders = mutableMapOf( "content-type" to "application/json", ) val converter: (Any) -> io.appwrite.models.Token = { @@ -1010,7 +1010,7 @@ class Account(client: Client) : Service(client) { val apiParams = mutableMapOf<String, Any?>( ) - val apiHeaders = mutableMapOf<String, String>( + val apiHeaders = mutableMapOf( "content-type" to "application/json", ) val converter: (Any) -> io.appwrite.models.SessionList = { @@ -1040,7 +1040,7 @@ class Account(client: Client) : Service(client) { val apiParams = mutableMapOf<String, Any?>( ) - val apiHeaders = mutableMapOf<String, String>( + val apiHeaders = mutableMapOf( "content-type" to "application/json", ) return client.call( @@ -1066,7 +1066,7 @@ class Account(client: Client) : Service(client) { val apiParams = mutableMapOf<String, Any?>( ) - val apiHeaders = mutableMapOf<String, String>( + val apiHeaders = mutableMapOf( "content-type" to "application/json", ) val converter: (Any) -> io.appwrite.models.Session = { @@ -1102,7 +1102,7 @@ class Account(client: Client) : Service(client) { "email" to email, "password" to password, ) - val apiHeaders = mutableMapOf<String, String>( + val apiHeaders = mutableMapOf( "content-type" to "application/json", ) val converter: (Any) -> io.appwrite.models.Session = { @@ -1138,7 +1138,7 @@ class Account(client: Client) : Service(client) { "userId" to userId, "secret" to secret, ) - val apiHeaders = mutableMapOf<String, String>( + val apiHeaders = mutableMapOf( "content-type" to "application/json", ) val converter: (Any) -> io.appwrite.models.Session = { @@ -1174,7 +1174,7 @@ class Account(client: Client) : Service(client) { "userId" to userId, "secret" to secret, ) - val apiHeaders = mutableMapOf<String, String>( + val apiHeaders = mutableMapOf( "content-type" to "application/json", ) val converter: (Any) -> io.appwrite.models.Session = { @@ -1210,7 +1210,7 @@ class Account(client: Client) : Service(client) { "userId" to userId, "secret" to secret, ) - val apiHeaders = mutableMapOf<String, String>( + val apiHeaders = mutableMapOf( "content-type" to "application/json", ) val converter: (Any) -> io.appwrite.models.Session = { @@ -1243,7 +1243,7 @@ class Account(client: Client) : Service(client) { val apiParams = mutableMapOf<String, Any?>( ) - val apiHeaders = mutableMapOf<String, String>( + val apiHeaders = mutableMapOf( "content-type" to "application/json", ) val converter: (Any) -> io.appwrite.models.Session = { @@ -1276,7 +1276,7 @@ class Account(client: Client) : Service(client) { val apiParams = mutableMapOf<String, Any?>( ) - val apiHeaders = mutableMapOf<String, String>( + val apiHeaders = mutableMapOf( "content-type" to "application/json", ) val converter: (Any) -> io.appwrite.models.Session = { @@ -1309,7 +1309,7 @@ class Account(client: Client) : Service(client) { val apiParams = mutableMapOf<String, Any?>( ) - val apiHeaders = mutableMapOf<String, String>( + val apiHeaders = mutableMapOf( "content-type" to "application/json", ) return client.call( @@ -1336,7 +1336,7 @@ class Account(client: Client) : Service(client) { val apiParams = mutableMapOf<String, Any?>( ) - val apiHeaders = mutableMapOf<String, String>( + val apiHeaders = mutableMapOf( "content-type" to "application/json", ) val converter: (Any) -> io.appwrite.models.User<T> = { @@ -1389,7 +1389,7 @@ class Account(client: Client) : Service(client) { "email" to email, "phrase" to phrase, ) - val apiHeaders = mutableMapOf<String, String>( + val apiHeaders = mutableMapOf( "content-type" to "application/json", ) val converter: (Any) -> io.appwrite.models.Token = { @@ -1408,7 +1408,7 @@ class Account(client: Client) : Service(client) { /** * Create magic URL token * - * Sends the user an email with a secret key for creating a session. If the provided user ID has not been registered, a new user will be created. When the user clicks the link in the email, the user is redirected back to the URL you provided with the secret key and userId values attached to the URL query string. Use the query string parameters to submit a request to the [POST /v1/account/sessions/token](https://appwrite.io/docs/references/cloud/client-web/account#createSession) endpoint to complete the login process. The link sent to the user's email address is valid for 1 hour. If you are on a mobile device you can leave the URL parameter empty, so that the login completion will be handled by your Appwrite instance by default.A user is limited to 10 active sessions at a time by default. [Learn more about session limits](https://appwrite.io/docs/authentication-security#limits). + * Sends the user an email with a secret key for creating a session. If the provided user ID has not been registered, a new user will be created. When the user clicks the link in the email, the user is redirected back to the URL you provided with the secret key and userId values attached to the URL query string. Use the query string parameters to submit a request to the [POST /v1/account/sessions/token](https://appwrite.io/docs/references/cloud/client-web/account#createSession) endpoint to complete the login process. The link sent to the user's email address is valid for 1 hour.A user is limited to 10 active sessions at a time by default. [Learn more about session limits](https://appwrite.io/docs/authentication-security#limits). * * @param userId 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. * @param email User email. @@ -1432,7 +1432,7 @@ class Account(client: Client) : Service(client) { "url" to url, "phrase" to phrase, ) - val apiHeaders = mutableMapOf<String, String>( + val apiHeaders = mutableMapOf( "content-type" to "application/json", ) val converter: (Any) -> io.appwrite.models.Token = { @@ -1475,7 +1475,7 @@ class Account(client: Client) : Service(client) { "failure" to failure, "scopes" to scopes, ) - val apiHeaders = mutableMapOf<String, String>( + val apiHeaders = mutableMapOf( "content-type" to "application/json", ) return client.redirect( @@ -1506,7 +1506,7 @@ class Account(client: Client) : Service(client) { "userId" to userId, "phone" to phone, ) - val apiHeaders = mutableMapOf<String, String>( + val apiHeaders = mutableMapOf( "content-type" to "application/json", ) val converter: (Any) -> io.appwrite.models.Token = { @@ -1539,7 +1539,7 @@ class Account(client: Client) : Service(client) { val apiParams = mutableMapOf<String, Any?>( "url" to url, ) - val apiHeaders = mutableMapOf<String, String>( + val apiHeaders = mutableMapOf( "content-type" to "application/json", ) val converter: (Any) -> io.appwrite.models.Token = { @@ -1575,7 +1575,7 @@ class Account(client: Client) : Service(client) { "userId" to userId, "secret" to secret, ) - val apiHeaders = mutableMapOf<String, String>( + val apiHeaders = mutableMapOf( "content-type" to "application/json", ) val converter: (Any) -> io.appwrite.models.Token = { @@ -1605,7 +1605,7 @@ class Account(client: Client) : Service(client) { val apiParams = mutableMapOf<String, Any?>( ) - val apiHeaders = mutableMapOf<String, String>( + val apiHeaders = mutableMapOf( "content-type" to "application/json", ) val converter: (Any) -> io.appwrite.models.Token = { @@ -1641,7 +1641,7 @@ class Account(client: Client) : Service(client) { "userId" to userId, "secret" to secret, ) - val apiHeaders = mutableMapOf<String, String>( + val apiHeaders = mutableMapOf( "content-type" to "application/json", ) val converter: (Any) -> io.appwrite.models.Token = { @@ -1657,4 +1657,4 @@ class Account(client: Client) : Service(client) { ) } -} +} \ No newline at end of file diff --git a/src/main/kotlin/io/appwrite/services/Avatars.kt b/src/main/kotlin/io/appwrite/services/Avatars.kt index 3dcfa74..46c9d8e 100644 --- a/src/main/kotlin/io/appwrite/services/Avatars.kt +++ b/src/main/kotlin/io/appwrite/services/Avatars.kt @@ -42,7 +42,7 @@ class Avatars(client: Client) : Service(client) { "height" to height, "quality" to quality, ) - val apiHeaders = mutableMapOf<String, String>( + val apiHeaders = mutableMapOf( "content-type" to "application/json", ) return client.call( @@ -80,7 +80,7 @@ class Avatars(client: Client) : Service(client) { "height" to height, "quality" to quality, ) - val apiHeaders = mutableMapOf<String, String>( + val apiHeaders = mutableMapOf( "content-type" to "application/json", ) return client.call( @@ -108,7 +108,7 @@ class Avatars(client: Client) : Service(client) { val apiParams = mutableMapOf<String, Any?>( "url" to url, ) - val apiHeaders = mutableMapOf<String, String>( + val apiHeaders = mutableMapOf( "content-type" to "application/json", ) return client.call( @@ -146,7 +146,7 @@ class Avatars(client: Client) : Service(client) { "height" to height, "quality" to quality, ) - val apiHeaders = mutableMapOf<String, String>( + val apiHeaders = mutableMapOf( "content-type" to "application/json", ) return client.call( @@ -181,7 +181,7 @@ class Avatars(client: Client) : Service(client) { "width" to width, "height" to height, ) - val apiHeaders = mutableMapOf<String, String>( + val apiHeaders = mutableMapOf( "content-type" to "application/json", ) return client.call( @@ -219,7 +219,7 @@ class Avatars(client: Client) : Service(client) { "height" to height, "background" to background, ) - val apiHeaders = mutableMapOf<String, String>( + val apiHeaders = mutableMapOf( "content-type" to "application/json", ) return client.call( @@ -257,7 +257,7 @@ class Avatars(client: Client) : Service(client) { "margin" to margin, "download" to download, ) - val apiHeaders = mutableMapOf<String, String>( + val apiHeaders = mutableMapOf( "content-type" to "application/json", ) return client.call( @@ -268,4 +268,4 @@ class Avatars(client: Client) : Service(client) { ) } -} +} \ No newline at end of file diff --git a/src/main/kotlin/io/appwrite/services/Databases.kt b/src/main/kotlin/io/appwrite/services/Databases.kt index f150397..770412a 100644 --- a/src/main/kotlin/io/appwrite/services/Databases.kt +++ b/src/main/kotlin/io/appwrite/services/Databases.kt @@ -34,7 +34,7 @@ class Databases(client: Client) : Service(client) { "queries" to queries, "search" to search, ) - val apiHeaders = mutableMapOf<String, String>( + val apiHeaders = mutableMapOf( "content-type" to "application/json", ) val converter: (Any) -> io.appwrite.models.DatabaseList = { @@ -74,7 +74,7 @@ class Databases(client: Client) : Service(client) { "name" to name, "enabled" to enabled, ) - val apiHeaders = mutableMapOf<String, String>( + val apiHeaders = mutableMapOf( "content-type" to "application/json", ) val converter: (Any) -> io.appwrite.models.Database = { @@ -107,7 +107,7 @@ class Databases(client: Client) : Service(client) { val apiParams = mutableMapOf<String, Any?>( ) - val apiHeaders = mutableMapOf<String, String>( + val apiHeaders = mutableMapOf( "content-type" to "application/json", ) val converter: (Any) -> io.appwrite.models.Database = { @@ -147,7 +147,7 @@ class Databases(client: Client) : Service(client) { "name" to name, "enabled" to enabled, ) - val apiHeaders = mutableMapOf<String, String>( + val apiHeaders = mutableMapOf( "content-type" to "application/json", ) val converter: (Any) -> io.appwrite.models.Database = { @@ -180,7 +180,7 @@ class Databases(client: Client) : Service(client) { val apiParams = mutableMapOf<String, Any?>( ) - val apiHeaders = mutableMapOf<String, String>( + val apiHeaders = mutableMapOf( "content-type" to "application/json", ) return client.call( @@ -216,7 +216,7 @@ class Databases(client: Client) : Service(client) { "queries" to queries, "search" to search, ) - val apiHeaders = mutableMapOf<String, String>( + val apiHeaders = mutableMapOf( "content-type" to "application/json", ) val converter: (Any) -> io.appwrite.models.CollectionList = { @@ -265,7 +265,7 @@ class Databases(client: Client) : Service(client) { "documentSecurity" to documentSecurity, "enabled" to enabled, ) - val apiHeaders = mutableMapOf<String, String>( + val apiHeaders = mutableMapOf( "content-type" to "application/json", ) val converter: (Any) -> io.appwrite.models.Collection = { @@ -301,7 +301,7 @@ class Databases(client: Client) : Service(client) { val apiParams = mutableMapOf<String, Any?>( ) - val apiHeaders = mutableMapOf<String, String>( + val apiHeaders = mutableMapOf( "content-type" to "application/json", ) val converter: (Any) -> io.appwrite.models.Collection = { @@ -350,7 +350,7 @@ class Databases(client: Client) : Service(client) { "documentSecurity" to documentSecurity, "enabled" to enabled, ) - val apiHeaders = mutableMapOf<String, String>( + val apiHeaders = mutableMapOf( "content-type" to "application/json", ) val converter: (Any) -> io.appwrite.models.Collection = { @@ -386,7 +386,7 @@ class Databases(client: Client) : Service(client) { val apiParams = mutableMapOf<String, Any?>( ) - val apiHeaders = mutableMapOf<String, String>( + val apiHeaders = mutableMapOf( "content-type" to "application/json", ) return client.call( @@ -422,7 +422,7 @@ class Databases(client: Client) : Service(client) { val apiParams = mutableMapOf<String, Any?>( "queries" to queries, ) - val apiHeaders = mutableMapOf<String, String>( + val apiHeaders = mutableMapOf( "content-type" to "application/json", ) val converter: (Any) -> io.appwrite.models.AttributeList = { @@ -471,7 +471,7 @@ class Databases(client: Client) : Service(client) { "default" to default, "array" to array, ) - val apiHeaders = mutableMapOf<String, String>( + val apiHeaders = mutableMapOf( "content-type" to "application/json", ) val converter: (Any) -> io.appwrite.models.AttributeBoolean = { @@ -520,7 +520,7 @@ class Databases(client: Client) : Service(client) { "default" to default, "newKey" to newKey, ) - val apiHeaders = mutableMapOf<String, String>( + val apiHeaders = mutableMapOf( "content-type" to "application/json", ) val converter: (Any) -> io.appwrite.models.AttributeBoolean = { @@ -569,7 +569,7 @@ class Databases(client: Client) : Service(client) { "default" to default, "array" to array, ) - val apiHeaders = mutableMapOf<String, String>( + val apiHeaders = mutableMapOf( "content-type" to "application/json", ) val converter: (Any) -> io.appwrite.models.AttributeDatetime = { @@ -618,7 +618,7 @@ class Databases(client: Client) : Service(client) { "default" to default, "newKey" to newKey, ) - val apiHeaders = mutableMapOf<String, String>( + val apiHeaders = mutableMapOf( "content-type" to "application/json", ) val converter: (Any) -> io.appwrite.models.AttributeDatetime = { @@ -667,7 +667,7 @@ class Databases(client: Client) : Service(client) { "default" to default, "array" to array, ) - val apiHeaders = mutableMapOf<String, String>( + val apiHeaders = mutableMapOf( "content-type" to "application/json", ) val converter: (Any) -> io.appwrite.models.AttributeEmail = { @@ -716,7 +716,7 @@ class Databases(client: Client) : Service(client) { "default" to default, "newKey" to newKey, ) - val apiHeaders = mutableMapOf<String, String>( + val apiHeaders = mutableMapOf( "content-type" to "application/json", ) val converter: (Any) -> io.appwrite.models.AttributeEmail = { @@ -768,7 +768,7 @@ class Databases(client: Client) : Service(client) { "default" to default, "array" to array, ) - val apiHeaders = mutableMapOf<String, String>( + val apiHeaders = mutableMapOf( "content-type" to "application/json", ) val converter: (Any) -> io.appwrite.models.AttributeEnum = { @@ -820,7 +820,7 @@ class Databases(client: Client) : Service(client) { "default" to default, "newKey" to newKey, ) - val apiHeaders = mutableMapOf<String, String>( + val apiHeaders = mutableMapOf( "content-type" to "application/json", ) val converter: (Any) -> io.appwrite.models.AttributeEnum = { @@ -875,7 +875,7 @@ class Databases(client: Client) : Service(client) { "default" to default, "array" to array, ) - val apiHeaders = mutableMapOf<String, String>( + val apiHeaders = mutableMapOf( "content-type" to "application/json", ) val converter: (Any) -> io.appwrite.models.AttributeFloat = { @@ -930,7 +930,7 @@ class Databases(client: Client) : Service(client) { "default" to default, "newKey" to newKey, ) - val apiHeaders = mutableMapOf<String, String>( + val apiHeaders = mutableMapOf( "content-type" to "application/json", ) val converter: (Any) -> io.appwrite.models.AttributeFloat = { @@ -985,7 +985,7 @@ class Databases(client: Client) : Service(client) { "default" to default, "array" to array, ) - val apiHeaders = mutableMapOf<String, String>( + val apiHeaders = mutableMapOf( "content-type" to "application/json", ) val converter: (Any) -> io.appwrite.models.AttributeInteger = { @@ -1040,7 +1040,7 @@ class Databases(client: Client) : Service(client) { "default" to default, "newKey" to newKey, ) - val apiHeaders = mutableMapOf<String, String>( + val apiHeaders = mutableMapOf( "content-type" to "application/json", ) val converter: (Any) -> io.appwrite.models.AttributeInteger = { @@ -1089,7 +1089,7 @@ class Databases(client: Client) : Service(client) { "default" to default, "array" to array, ) - val apiHeaders = mutableMapOf<String, String>( + val apiHeaders = mutableMapOf( "content-type" to "application/json", ) val converter: (Any) -> io.appwrite.models.AttributeIp = { @@ -1138,7 +1138,7 @@ class Databases(client: Client) : Service(client) { "default" to default, "newKey" to newKey, ) - val apiHeaders = mutableMapOf<String, String>( + val apiHeaders = mutableMapOf( "content-type" to "application/json", ) val converter: (Any) -> io.appwrite.models.AttributeIp = { @@ -1193,7 +1193,7 @@ class Databases(client: Client) : Service(client) { "twoWayKey" to twoWayKey, "onDelete" to onDelete, ) - val apiHeaders = mutableMapOf<String, String>( + val apiHeaders = mutableMapOf( "content-type" to "application/json", ) val converter: (Any) -> io.appwrite.models.AttributeRelationship = { @@ -1248,7 +1248,7 @@ class Databases(client: Client) : Service(client) { "array" to array, "encrypt" to encrypt, ) - val apiHeaders = mutableMapOf<String, String>( + val apiHeaders = mutableMapOf( "content-type" to "application/json", ) val converter: (Any) -> io.appwrite.models.AttributeString = { @@ -1300,7 +1300,7 @@ class Databases(client: Client) : Service(client) { "size" to size, "newKey" to newKey, ) - val apiHeaders = mutableMapOf<String, String>( + val apiHeaders = mutableMapOf( "content-type" to "application/json", ) val converter: (Any) -> io.appwrite.models.AttributeString = { @@ -1349,7 +1349,7 @@ class Databases(client: Client) : Service(client) { "default" to default, "array" to array, ) - val apiHeaders = mutableMapOf<String, String>( + val apiHeaders = mutableMapOf( "content-type" to "application/json", ) val converter: (Any) -> io.appwrite.models.AttributeUrl = { @@ -1398,7 +1398,7 @@ class Databases(client: Client) : Service(client) { "default" to default, "newKey" to newKey, ) - val apiHeaders = mutableMapOf<String, String>( + val apiHeaders = mutableMapOf( "content-type" to "application/json", ) val converter: (Any) -> io.appwrite.models.AttributeUrl = { @@ -1437,7 +1437,7 @@ class Databases(client: Client) : Service(client) { val apiParams = mutableMapOf<String, Any?>( ) - val apiHeaders = mutableMapOf<String, String>( + val apiHeaders = mutableMapOf( "content-type" to "application/json", ) return client.call( @@ -1472,7 +1472,7 @@ class Databases(client: Client) : Service(client) { val apiParams = mutableMapOf<String, Any?>( ) - val apiHeaders = mutableMapOf<String, String>( + val apiHeaders = mutableMapOf( "content-type" to "application/json", ) return client.call( @@ -1514,7 +1514,7 @@ class Databases(client: Client) : Service(client) { "onDelete" to onDelete, "newKey" to newKey, ) - val apiHeaders = mutableMapOf<String, String>( + val apiHeaders = mutableMapOf( "content-type" to "application/json", ) val converter: (Any) -> io.appwrite.models.AttributeRelationship = { @@ -1555,7 +1555,7 @@ class Databases(client: Client) : Service(client) { val apiParams = mutableMapOf<String, Any?>( "queries" to queries, ) - val apiHeaders = mutableMapOf<String, String>( + val apiHeaders = mutableMapOf( "content-type" to "application/json", ) val converter: (Any) -> io.appwrite.models.DocumentList<T> = { @@ -1625,7 +1625,7 @@ class Databases(client: Client) : Service(client) { "data" to data, "permissions" to permissions, ) - val apiHeaders = mutableMapOf<String, String>( + val apiHeaders = mutableMapOf( "content-type" to "application/json", ) val converter: (Any) -> io.appwrite.models.Document<T> = { @@ -1698,7 +1698,7 @@ class Databases(client: Client) : Service(client) { val apiParams = mutableMapOf<String, Any?>( "queries" to queries, ) - val apiHeaders = mutableMapOf<String, String>( + val apiHeaders = mutableMapOf( "content-type" to "application/json", ) val converter: (Any) -> io.appwrite.models.Document<T> = { @@ -1771,7 +1771,7 @@ class Databases(client: Client) : Service(client) { "data" to data, "permissions" to permissions, ) - val apiHeaders = mutableMapOf<String, String>( + val apiHeaders = mutableMapOf( "content-type" to "application/json", ) val converter: (Any) -> io.appwrite.models.Document<T> = { @@ -1839,7 +1839,7 @@ class Databases(client: Client) : Service(client) { val apiParams = mutableMapOf<String, Any?>( ) - val apiHeaders = mutableMapOf<String, String>( + val apiHeaders = mutableMapOf( "content-type" to "application/json", ) return client.call( @@ -1875,7 +1875,7 @@ class Databases(client: Client) : Service(client) { val apiParams = mutableMapOf<String, Any?>( "queries" to queries, ) - val apiHeaders = mutableMapOf<String, String>( + val apiHeaders = mutableMapOf( "content-type" to "application/json", ) val converter: (Any) -> io.appwrite.models.IndexList = { @@ -1924,7 +1924,7 @@ class Databases(client: Client) : Service(client) { "attributes" to attributes, "orders" to orders, ) - val apiHeaders = mutableMapOf<String, String>( + val apiHeaders = mutableMapOf( "content-type" to "application/json", ) val converter: (Any) -> io.appwrite.models.Index = { @@ -1963,7 +1963,7 @@ class Databases(client: Client) : Service(client) { val apiParams = mutableMapOf<String, Any?>( ) - val apiHeaders = mutableMapOf<String, String>( + val apiHeaders = mutableMapOf( "content-type" to "application/json", ) val converter: (Any) -> io.appwrite.models.Index = { @@ -2002,7 +2002,7 @@ class Databases(client: Client) : Service(client) { val apiParams = mutableMapOf<String, Any?>( ) - val apiHeaders = mutableMapOf<String, String>( + val apiHeaders = mutableMapOf( "content-type" to "application/json", ) return client.call( @@ -2014,4 +2014,4 @@ class Databases(client: Client) : Service(client) { ) } -} +} \ No newline at end of file diff --git a/src/main/kotlin/io/appwrite/services/Functions.kt b/src/main/kotlin/io/appwrite/services/Functions.kt index b13b4c7..d0a98f5 100644 --- a/src/main/kotlin/io/appwrite/services/Functions.kt +++ b/src/main/kotlin/io/appwrite/services/Functions.kt @@ -36,7 +36,7 @@ class Functions(client: Client) : Service(client) { "queries" to queries, "search" to search, ) - val apiHeaders = mutableMapOf<String, String>( + val apiHeaders = mutableMapOf( "content-type" to "application/json", ) val converter: (Any) -> io.appwrite.models.FunctionList = { @@ -133,7 +133,7 @@ class Functions(client: Client) : Service(client) { "templateVersion" to templateVersion, "specification" to specification, ) - val apiHeaders = mutableMapOf<String, String>( + val apiHeaders = mutableMapOf( "content-type" to "application/json", ) val converter: (Any) -> io.appwrite.models.Function = { @@ -163,7 +163,7 @@ class Functions(client: Client) : Service(client) { val apiParams = mutableMapOf<String, Any?>( ) - val apiHeaders = mutableMapOf<String, String>( + val apiHeaders = mutableMapOf( "content-type" to "application/json", ) val converter: (Any) -> io.appwrite.models.RuntimeList = { @@ -193,7 +193,7 @@ class Functions(client: Client) : Service(client) { val apiParams = mutableMapOf<String, Any?>( ) - val apiHeaders = mutableMapOf<String, String>( + val apiHeaders = mutableMapOf( "content-type" to "application/json", ) val converter: (Any) -> io.appwrite.models.SpecificationList = { @@ -226,7 +226,7 @@ class Functions(client: Client) : Service(client) { val apiParams = mutableMapOf<String, Any?>( ) - val apiHeaders = mutableMapOf<String, String>( + val apiHeaders = mutableMapOf( "content-type" to "application/json", ) val converter: (Any) -> io.appwrite.models.Function = { @@ -311,7 +311,7 @@ class Functions(client: Client) : Service(client) { "providerRootDirectory" to providerRootDirectory, "specification" to specification, ) - val apiHeaders = mutableMapOf<String, String>( + val apiHeaders = mutableMapOf( "content-type" to "application/json", ) val converter: (Any) -> io.appwrite.models.Function = { @@ -344,7 +344,7 @@ class Functions(client: Client) : Service(client) { val apiParams = mutableMapOf<String, Any?>( ) - val apiHeaders = mutableMapOf<String, String>( + val apiHeaders = mutableMapOf( "content-type" to "application/json", ) return client.call( @@ -380,7 +380,7 @@ class Functions(client: Client) : Service(client) { "queries" to queries, "search" to search, ) - val apiHeaders = mutableMapOf<String, String>( + val apiHeaders = mutableMapOf( "content-type" to "application/json", ) val converter: (Any) -> io.appwrite.models.DeploymentList = { @@ -412,7 +412,7 @@ class Functions(client: Client) : Service(client) { @Throws(AppwriteException::class) suspend fun createDeployment( functionId: String, - code: Payload, + code: InputFile, activate: Boolean, entrypoint: String? = null, commands: String? = null, @@ -427,7 +427,7 @@ class Functions(client: Client) : Service(client) { "code" to code, "activate" to activate, ) - val apiHeaders = mutableMapOf<String, String>( + val apiHeaders = mutableMapOf( "content-type" to "multipart/form-data", ) val converter: (Any) -> io.appwrite.models.Deployment = { @@ -467,7 +467,7 @@ class Functions(client: Client) : Service(client) { val apiParams = mutableMapOf<String, Any?>( ) - val apiHeaders = mutableMapOf<String, String>( + val apiHeaders = mutableMapOf( "content-type" to "application/json", ) val converter: (Any) -> io.appwrite.models.Deployment = { @@ -503,7 +503,7 @@ class Functions(client: Client) : Service(client) { val apiParams = mutableMapOf<String, Any?>( ) - val apiHeaders = mutableMapOf<String, String>( + val apiHeaders = mutableMapOf( "content-type" to "application/json", ) val converter: (Any) -> io.appwrite.models.Function = { @@ -539,7 +539,7 @@ class Functions(client: Client) : Service(client) { val apiParams = mutableMapOf<String, Any?>( ) - val apiHeaders = mutableMapOf<String, String>( + val apiHeaders = mutableMapOf( "content-type" to "application/json", ) return client.call( @@ -575,7 +575,7 @@ class Functions(client: Client) : Service(client) { val apiParams = mutableMapOf<String, Any?>( "buildId" to buildId, ) - val apiHeaders = mutableMapOf<String, String>( + val apiHeaders = mutableMapOf( "content-type" to "application/json", ) return client.call( @@ -607,7 +607,7 @@ class Functions(client: Client) : Service(client) { val apiParams = mutableMapOf<String, Any?>( ) - val apiHeaders = mutableMapOf<String, String>( + val apiHeaders = mutableMapOf( "content-type" to "application/json", ) val converter: (Any) -> io.appwrite.models.Build = { @@ -643,7 +643,7 @@ class Functions(client: Client) : Service(client) { val apiParams = mutableMapOf<String, Any?>( ) - val apiHeaders = mutableMapOf<String, String>( + val apiHeaders = mutableMapOf( "content-type" to "application/json", ) return client.call( @@ -678,7 +678,7 @@ class Functions(client: Client) : Service(client) { "queries" to queries, "search" to search, ) - val apiHeaders = mutableMapOf<String, String>( + val apiHeaders = mutableMapOf( "content-type" to "application/json", ) val converter: (Any) -> io.appwrite.models.ExecutionList = { @@ -712,13 +712,12 @@ class Functions(client: Client) : Service(client) { @Throws(AppwriteException::class) suspend fun createExecution( functionId: String, - body: Payload? = null, + body: String? = null, async: Boolean? = null, path: String? = null, method: io.appwrite.enums.ExecutionMethod? = null, headers: Any? = null, scheduledAt: String? = null, - onProgress: ((UploadProgress) -> Unit)? = null ): io.appwrite.models.Execution { val apiPath = "/functions/{functionId}/executions" .replace("{functionId}", functionId) @@ -731,9 +730,8 @@ class Functions(client: Client) : Service(client) { "headers" to headers, "scheduledAt" to scheduledAt, ) - val apiHeaders = mutableMapOf<String, String>( - "content-type" to "multipart/form-data", - "accept" to "multipart/form-data", + val apiHeaders = mutableMapOf( + "content-type" to "application/json", ) val converter: (Any) -> io.appwrite.models.Execution = { io.appwrite.models.Execution.from(map = it as Map<String, Any>) @@ -768,7 +766,7 @@ class Functions(client: Client) : Service(client) { val apiParams = mutableMapOf<String, Any?>( ) - val apiHeaders = mutableMapOf<String, String>( + val apiHeaders = mutableMapOf( "content-type" to "application/json", ) val converter: (Any) -> io.appwrite.models.Execution = { @@ -804,7 +802,7 @@ class Functions(client: Client) : Service(client) { val apiParams = mutableMapOf<String, Any?>( ) - val apiHeaders = mutableMapOf<String, String>( + val apiHeaders = mutableMapOf( "content-type" to "application/json", ) return client.call( @@ -833,7 +831,7 @@ class Functions(client: Client) : Service(client) { val apiParams = mutableMapOf<String, Any?>( ) - val apiHeaders = mutableMapOf<String, String>( + val apiHeaders = mutableMapOf( "content-type" to "application/json", ) val converter: (Any) -> io.appwrite.models.VariableList = { @@ -872,7 +870,7 @@ class Functions(client: Client) : Service(client) { "key" to key, "value" to value, ) - val apiHeaders = mutableMapOf<String, String>( + val apiHeaders = mutableMapOf( "content-type" to "application/json", ) val converter: (Any) -> io.appwrite.models.Variable = { @@ -908,7 +906,7 @@ class Functions(client: Client) : Service(client) { val apiParams = mutableMapOf<String, Any?>( ) - val apiHeaders = mutableMapOf<String, String>( + val apiHeaders = mutableMapOf( "content-type" to "application/json", ) val converter: (Any) -> io.appwrite.models.Variable = { @@ -951,7 +949,7 @@ class Functions(client: Client) : Service(client) { "key" to key, "value" to value, ) - val apiHeaders = mutableMapOf<String, String>( + val apiHeaders = mutableMapOf( "content-type" to "application/json", ) val converter: (Any) -> io.appwrite.models.Variable = { @@ -987,7 +985,7 @@ class Functions(client: Client) : Service(client) { val apiParams = mutableMapOf<String, Any?>( ) - val apiHeaders = mutableMapOf<String, String>( + val apiHeaders = mutableMapOf( "content-type" to "application/json", ) return client.call( @@ -999,4 +997,4 @@ class Functions(client: Client) : Service(client) { ) } -} +} \ No newline at end of file diff --git a/src/main/kotlin/io/appwrite/services/Graphql.kt b/src/main/kotlin/io/appwrite/services/Graphql.kt index 1ca735b..d8a676c 100644 --- a/src/main/kotlin/io/appwrite/services/Graphql.kt +++ b/src/main/kotlin/io/appwrite/services/Graphql.kt @@ -30,7 +30,7 @@ class Graphql(client: Client) : Service(client) { val apiParams = mutableMapOf<String, Any?>( "query" to query, ) - val apiHeaders = mutableMapOf<String, String>( + val apiHeaders = mutableMapOf( "x-sdk-graphql" to "true", "content-type" to "application/json", ) @@ -64,7 +64,7 @@ class Graphql(client: Client) : Service(client) { val apiParams = mutableMapOf<String, Any?>( "query" to query, ) - val apiHeaders = mutableMapOf<String, String>( + val apiHeaders = mutableMapOf( "x-sdk-graphql" to "true", "content-type" to "application/json", ) @@ -81,4 +81,4 @@ class Graphql(client: Client) : Service(client) { ) } -} +} \ No newline at end of file diff --git a/src/main/kotlin/io/appwrite/services/Health.kt b/src/main/kotlin/io/appwrite/services/Health.kt index e3f97dc..a566692 100644 --- a/src/main/kotlin/io/appwrite/services/Health.kt +++ b/src/main/kotlin/io/appwrite/services/Health.kt @@ -27,7 +27,7 @@ class Health(client: Client) : Service(client) { val apiParams = mutableMapOf<String, Any?>( ) - val apiHeaders = mutableMapOf<String, String>( + val apiHeaders = mutableMapOf( "content-type" to "application/json", ) val converter: (Any) -> io.appwrite.models.HealthStatus = { @@ -57,7 +57,7 @@ class Health(client: Client) : Service(client) { val apiParams = mutableMapOf<String, Any?>( ) - val apiHeaders = mutableMapOf<String, String>( + val apiHeaders = mutableMapOf( "content-type" to "application/json", ) val converter: (Any) -> io.appwrite.models.HealthAntivirus = { @@ -87,7 +87,7 @@ class Health(client: Client) : Service(client) { val apiParams = mutableMapOf<String, Any?>( ) - val apiHeaders = mutableMapOf<String, String>( + val apiHeaders = mutableMapOf( "content-type" to "application/json", ) val converter: (Any) -> io.appwrite.models.HealthStatus = { @@ -121,7 +121,7 @@ class Health(client: Client) : Service(client) { val apiParams = mutableMapOf<String, Any?>( "domain" to domain, ) - val apiHeaders = mutableMapOf<String, String>( + val apiHeaders = mutableMapOf( "content-type" to "application/json", ) val converter: (Any) -> io.appwrite.models.HealthCertificate = { @@ -151,7 +151,7 @@ class Health(client: Client) : Service(client) { val apiParams = mutableMapOf<String, Any?>( ) - val apiHeaders = mutableMapOf<String, String>( + val apiHeaders = mutableMapOf( "content-type" to "application/json", ) val converter: (Any) -> io.appwrite.models.HealthStatus = { @@ -181,7 +181,7 @@ class Health(client: Client) : Service(client) { val apiParams = mutableMapOf<String, Any?>( ) - val apiHeaders = mutableMapOf<String, String>( + val apiHeaders = mutableMapOf( "content-type" to "application/json", ) val converter: (Any) -> io.appwrite.models.HealthStatus = { @@ -211,7 +211,7 @@ class Health(client: Client) : Service(client) { val apiParams = mutableMapOf<String, Any?>( ) - val apiHeaders = mutableMapOf<String, String>( + val apiHeaders = mutableMapOf( "content-type" to "application/json", ) val converter: (Any) -> io.appwrite.models.HealthStatus = { @@ -245,7 +245,7 @@ class Health(client: Client) : Service(client) { val apiParams = mutableMapOf<String, Any?>( "threshold" to threshold, ) - val apiHeaders = mutableMapOf<String, String>( + val apiHeaders = mutableMapOf( "content-type" to "application/json", ) val converter: (Any) -> io.appwrite.models.HealthQueue = { @@ -279,7 +279,7 @@ class Health(client: Client) : Service(client) { val apiParams = mutableMapOf<String, Any?>( "threshold" to threshold, ) - val apiHeaders = mutableMapOf<String, String>( + val apiHeaders = mutableMapOf( "content-type" to "application/json", ) val converter: (Any) -> io.appwrite.models.HealthQueue = { @@ -316,7 +316,7 @@ class Health(client: Client) : Service(client) { "name" to name, "threshold" to threshold, ) - val apiHeaders = mutableMapOf<String, String>( + val apiHeaders = mutableMapOf( "content-type" to "application/json", ) val converter: (Any) -> io.appwrite.models.HealthQueue = { @@ -350,7 +350,7 @@ class Health(client: Client) : Service(client) { val apiParams = mutableMapOf<String, Any?>( "threshold" to threshold, ) - val apiHeaders = mutableMapOf<String, String>( + val apiHeaders = mutableMapOf( "content-type" to "application/json", ) val converter: (Any) -> io.appwrite.models.HealthQueue = { @@ -387,7 +387,7 @@ class Health(client: Client) : Service(client) { val apiParams = mutableMapOf<String, Any?>( "threshold" to threshold, ) - val apiHeaders = mutableMapOf<String, String>( + val apiHeaders = mutableMapOf( "content-type" to "application/json", ) val converter: (Any) -> io.appwrite.models.HealthQueue = { @@ -421,7 +421,7 @@ class Health(client: Client) : Service(client) { val apiParams = mutableMapOf<String, Any?>( "threshold" to threshold, ) - val apiHeaders = mutableMapOf<String, String>( + val apiHeaders = mutableMapOf( "content-type" to "application/json", ) val converter: (Any) -> io.appwrite.models.HealthQueue = { @@ -455,7 +455,7 @@ class Health(client: Client) : Service(client) { val apiParams = mutableMapOf<String, Any?>( "threshold" to threshold, ) - val apiHeaders = mutableMapOf<String, String>( + val apiHeaders = mutableMapOf( "content-type" to "application/json", ) val converter: (Any) -> io.appwrite.models.HealthQueue = { @@ -489,7 +489,7 @@ class Health(client: Client) : Service(client) { val apiParams = mutableMapOf<String, Any?>( "threshold" to threshold, ) - val apiHeaders = mutableMapOf<String, String>( + val apiHeaders = mutableMapOf( "content-type" to "application/json", ) val converter: (Any) -> io.appwrite.models.HealthQueue = { @@ -523,7 +523,7 @@ class Health(client: Client) : Service(client) { val apiParams = mutableMapOf<String, Any?>( "threshold" to threshold, ) - val apiHeaders = mutableMapOf<String, String>( + val apiHeaders = mutableMapOf( "content-type" to "application/json", ) val converter: (Any) -> io.appwrite.models.HealthQueue = { @@ -557,7 +557,7 @@ class Health(client: Client) : Service(client) { val apiParams = mutableMapOf<String, Any?>( "threshold" to threshold, ) - val apiHeaders = mutableMapOf<String, String>( + val apiHeaders = mutableMapOf( "content-type" to "application/json", ) val converter: (Any) -> io.appwrite.models.HealthQueue = { @@ -591,7 +591,7 @@ class Health(client: Client) : Service(client) { val apiParams = mutableMapOf<String, Any?>( "threshold" to threshold, ) - val apiHeaders = mutableMapOf<String, String>( + val apiHeaders = mutableMapOf( "content-type" to "application/json", ) val converter: (Any) -> io.appwrite.models.HealthQueue = { @@ -625,7 +625,7 @@ class Health(client: Client) : Service(client) { val apiParams = mutableMapOf<String, Any?>( "threshold" to threshold, ) - val apiHeaders = mutableMapOf<String, String>( + val apiHeaders = mutableMapOf( "content-type" to "application/json", ) val converter: (Any) -> io.appwrite.models.HealthQueue = { @@ -659,7 +659,7 @@ class Health(client: Client) : Service(client) { val apiParams = mutableMapOf<String, Any?>( "threshold" to threshold, ) - val apiHeaders = mutableMapOf<String, String>( + val apiHeaders = mutableMapOf( "content-type" to "application/json", ) val converter: (Any) -> io.appwrite.models.HealthQueue = { @@ -689,7 +689,7 @@ class Health(client: Client) : Service(client) { val apiParams = mutableMapOf<String, Any?>( ) - val apiHeaders = mutableMapOf<String, String>( + val apiHeaders = mutableMapOf( "content-type" to "application/json", ) val converter: (Any) -> io.appwrite.models.HealthStatus = { @@ -719,7 +719,7 @@ class Health(client: Client) : Service(client) { val apiParams = mutableMapOf<String, Any?>( ) - val apiHeaders = mutableMapOf<String, String>( + val apiHeaders = mutableMapOf( "content-type" to "application/json", ) val converter: (Any) -> io.appwrite.models.HealthStatus = { @@ -749,7 +749,7 @@ class Health(client: Client) : Service(client) { val apiParams = mutableMapOf<String, Any?>( ) - val apiHeaders = mutableMapOf<String, String>( + val apiHeaders = mutableMapOf( "content-type" to "application/json", ) val converter: (Any) -> io.appwrite.models.HealthTime = { @@ -765,4 +765,4 @@ class Health(client: Client) : Service(client) { ) } -} +} \ No newline at end of file diff --git a/src/main/kotlin/io/appwrite/services/Locale.kt b/src/main/kotlin/io/appwrite/services/Locale.kt index 0a81472..170fd8b 100644 --- a/src/main/kotlin/io/appwrite/services/Locale.kt +++ b/src/main/kotlin/io/appwrite/services/Locale.kt @@ -27,7 +27,7 @@ class Locale(client: Client) : Service(client) { val apiParams = mutableMapOf<String, Any?>( ) - val apiHeaders = mutableMapOf<String, String>( + val apiHeaders = mutableMapOf( "content-type" to "application/json", ) val converter: (Any) -> io.appwrite.models.Locale = { @@ -57,7 +57,7 @@ class Locale(client: Client) : Service(client) { val apiParams = mutableMapOf<String, Any?>( ) - val apiHeaders = mutableMapOf<String, String>( + val apiHeaders = mutableMapOf( "content-type" to "application/json", ) val converter: (Any) -> io.appwrite.models.LocaleCodeList = { @@ -87,7 +87,7 @@ class Locale(client: Client) : Service(client) { val apiParams = mutableMapOf<String, Any?>( ) - val apiHeaders = mutableMapOf<String, String>( + val apiHeaders = mutableMapOf( "content-type" to "application/json", ) val converter: (Any) -> io.appwrite.models.ContinentList = { @@ -117,7 +117,7 @@ class Locale(client: Client) : Service(client) { val apiParams = mutableMapOf<String, Any?>( ) - val apiHeaders = mutableMapOf<String, String>( + val apiHeaders = mutableMapOf( "content-type" to "application/json", ) val converter: (Any) -> io.appwrite.models.CountryList = { @@ -147,7 +147,7 @@ class Locale(client: Client) : Service(client) { val apiParams = mutableMapOf<String, Any?>( ) - val apiHeaders = mutableMapOf<String, String>( + val apiHeaders = mutableMapOf( "content-type" to "application/json", ) val converter: (Any) -> io.appwrite.models.CountryList = { @@ -177,7 +177,7 @@ class Locale(client: Client) : Service(client) { val apiParams = mutableMapOf<String, Any?>( ) - val apiHeaders = mutableMapOf<String, String>( + val apiHeaders = mutableMapOf( "content-type" to "application/json", ) val converter: (Any) -> io.appwrite.models.PhoneList = { @@ -207,7 +207,7 @@ class Locale(client: Client) : Service(client) { val apiParams = mutableMapOf<String, Any?>( ) - val apiHeaders = mutableMapOf<String, String>( + val apiHeaders = mutableMapOf( "content-type" to "application/json", ) val converter: (Any) -> io.appwrite.models.CurrencyList = { @@ -237,7 +237,7 @@ class Locale(client: Client) : Service(client) { val apiParams = mutableMapOf<String, Any?>( ) - val apiHeaders = mutableMapOf<String, String>( + val apiHeaders = mutableMapOf( "content-type" to "application/json", ) val converter: (Any) -> io.appwrite.models.LanguageList = { @@ -253,4 +253,4 @@ class Locale(client: Client) : Service(client) { ) } -} +} \ No newline at end of file diff --git a/src/main/kotlin/io/appwrite/services/Messaging.kt b/src/main/kotlin/io/appwrite/services/Messaging.kt index 9e8c54b..be6c259 100644 --- a/src/main/kotlin/io/appwrite/services/Messaging.kt +++ b/src/main/kotlin/io/appwrite/services/Messaging.kt @@ -34,7 +34,7 @@ class Messaging(client: Client) : Service(client) { "queries" to queries, "search" to search, ) - val apiHeaders = mutableMapOf<String, String>( + val apiHeaders = mutableMapOf( "content-type" to "application/json", ) val converter: (Any) -> io.appwrite.models.MessageList = { @@ -101,7 +101,7 @@ class Messaging(client: Client) : Service(client) { "html" to html, "scheduledAt" to scheduledAt, ) - val apiHeaders = mutableMapOf<String, String>( + val apiHeaders = mutableMapOf( "content-type" to "application/json", ) val converter: (Any) -> io.appwrite.models.Message = { @@ -168,7 +168,7 @@ class Messaging(client: Client) : Service(client) { "scheduledAt" to scheduledAt, "attachments" to attachments, ) - val apiHeaders = mutableMapOf<String, String>( + val apiHeaders = mutableMapOf( "content-type" to "application/json", ) val converter: (Any) -> io.appwrite.models.Message = { @@ -195,24 +195,27 @@ class Messaging(client: Client) : Service(client) { * @param topics List of Topic IDs. * @param users List of User IDs. * @param targets List of Targets IDs. - * @param data Additional Data for push notification. + * @param data Additional key-value pair data for push notification. * @param action Action for push notification. * @param image Image for push notification. Must be a compound bucket ID to file ID of a jpeg, png, or bmp image in Appwrite Storage. It should be formatted as <BUCKET_ID>:<FILE_ID>. * @param icon Icon for push notification. Available only for Android and Web Platform. - * @param sound Sound for push notification. Available only for Android and IOS Platform. + * @param sound Sound for push notification. Available only for Android and iOS Platform. * @param color Color for push notification. Available only for Android Platform. * @param tag Tag for push notification. Available only for Android Platform. - * @param badge Badge for push notification. Available only for IOS Platform. + * @param badge Badge for push notification. Available only for iOS Platform. * @param draft Is message a draft * @param scheduledAt Scheduled delivery time for message in [ISO 8601](https://www.iso.org/iso-8601-date-and-time-format.html) format. DateTime value must be in future. + * @param contentAvailable If set to true, the notification will be delivered in the background. Available only for iOS Platform. + * @param critical If set to true, the notification will be marked as critical. This requires the app to have the critical notification entitlement. Available only for iOS Platform. + * @param priority Set the notification priority. "normal" will consider device state and may not deliver notifications immediately. "high" will always attempt to immediately deliver the notification. * @return [io.appwrite.models.Message] */ @JvmOverloads @Throws(AppwriteException::class) suspend fun createPush( messageId: String, - title: String, - body: String, + title: String? = null, + body: String? = null, topics: List<String>? = null, users: List<String>? = null, targets: List<String>? = null, @@ -223,9 +226,12 @@ class Messaging(client: Client) : Service(client) { sound: String? = null, color: String? = null, tag: String? = null, - badge: String? = null, + badge: Long? = null, draft: Boolean? = null, scheduledAt: String? = null, + contentAvailable: Boolean? = null, + critical: Boolean? = null, + priority: io.appwrite.enums.MessagePriority? = null, ): io.appwrite.models.Message { val apiPath = "/messaging/messages/push" @@ -246,8 +252,11 @@ class Messaging(client: Client) : Service(client) { "badge" to badge, "draft" to draft, "scheduledAt" to scheduledAt, + "contentAvailable" to contentAvailable, + "critical" to critical, + "priority" to priority, ) - val apiHeaders = mutableMapOf<String, String>( + val apiHeaders = mutableMapOf( "content-type" to "application/json", ) val converter: (Any) -> io.appwrite.models.Message = { @@ -284,6 +293,9 @@ class Messaging(client: Client) : Service(client) { * @param badge Badge for push notification. Available only for iOS platforms. * @param draft Is message a draft * @param scheduledAt Scheduled delivery time for message in [ISO 8601](https://www.iso.org/iso-8601-date-and-time-format.html) format. DateTime value must be in future. + * @param contentAvailable If set to true, the notification will be delivered in the background. Available only for iOS Platform. + * @param critical If set to true, the notification will be marked as critical. This requires the app to have the critical notification entitlement. Available only for iOS Platform. + * @param priority Set the notification priority. "normal" will consider device battery state and may send notifications later. "high" will always attempt to immediately deliver the notification. * @return [io.appwrite.models.Message] */ @JvmOverloads @@ -305,6 +317,9 @@ class Messaging(client: Client) : Service(client) { badge: Long? = null, draft: Boolean? = null, scheduledAt: String? = null, + contentAvailable: Boolean? = null, + critical: Boolean? = null, + priority: io.appwrite.enums.MessagePriority? = null, ): io.appwrite.models.Message { val apiPath = "/messaging/messages/push/{messageId}" .replace("{messageId}", messageId) @@ -325,8 +340,11 @@ class Messaging(client: Client) : Service(client) { "badge" to badge, "draft" to draft, "scheduledAt" to scheduledAt, + "contentAvailable" to contentAvailable, + "critical" to critical, + "priority" to priority, ) - val apiHeaders = mutableMapOf<String, String>( + val apiHeaders = mutableMapOf( "content-type" to "application/json", ) val converter: (Any) -> io.appwrite.models.Message = { @@ -378,7 +396,7 @@ class Messaging(client: Client) : Service(client) { "draft" to draft, "scheduledAt" to scheduledAt, ) - val apiHeaders = mutableMapOf<String, String>( + val apiHeaders = mutableMapOf( "content-type" to "application/json", ) val converter: (Any) -> io.appwrite.models.Message = { @@ -430,7 +448,7 @@ class Messaging(client: Client) : Service(client) { "draft" to draft, "scheduledAt" to scheduledAt, ) - val apiHeaders = mutableMapOf<String, String>( + val apiHeaders = mutableMapOf( "content-type" to "application/json", ) val converter: (Any) -> io.appwrite.models.Message = { @@ -463,7 +481,7 @@ class Messaging(client: Client) : Service(client) { val apiParams = mutableMapOf<String, Any?>( ) - val apiHeaders = mutableMapOf<String, String>( + val apiHeaders = mutableMapOf( "content-type" to "application/json", ) val converter: (Any) -> io.appwrite.models.Message = { @@ -496,7 +514,7 @@ class Messaging(client: Client) : Service(client) { val apiParams = mutableMapOf<String, Any?>( ) - val apiHeaders = mutableMapOf<String, String>( + val apiHeaders = mutableMapOf( "content-type" to "application/json", ) return client.call( @@ -529,7 +547,7 @@ class Messaging(client: Client) : Service(client) { val apiParams = mutableMapOf<String, Any?>( "queries" to queries, ) - val apiHeaders = mutableMapOf<String, String>( + val apiHeaders = mutableMapOf( "content-type" to "application/json", ) val converter: (Any) -> io.appwrite.models.LogList = { @@ -566,7 +584,7 @@ class Messaging(client: Client) : Service(client) { val apiParams = mutableMapOf<String, Any?>( "queries" to queries, ) - val apiHeaders = mutableMapOf<String, String>( + val apiHeaders = mutableMapOf( "content-type" to "application/json", ) val converter: (Any) -> io.appwrite.models.TargetList = { @@ -603,7 +621,7 @@ class Messaging(client: Client) : Service(client) { "queries" to queries, "search" to search, ) - val apiHeaders = mutableMapOf<String, String>( + val apiHeaders = mutableMapOf( "content-type" to "application/json", ) val converter: (Any) -> io.appwrite.models.ProviderList = { @@ -658,7 +676,7 @@ class Messaging(client: Client) : Service(client) { "sandbox" to sandbox, "enabled" to enabled, ) - val apiHeaders = mutableMapOf<String, String>( + val apiHeaders = mutableMapOf( "content-type" to "application/json", ) val converter: (Any) -> io.appwrite.models.Provider = { @@ -713,7 +731,7 @@ class Messaging(client: Client) : Service(client) { "bundleId" to bundleId, "sandbox" to sandbox, ) - val apiHeaders = mutableMapOf<String, String>( + val apiHeaders = mutableMapOf( "content-type" to "application/json", ) val converter: (Any) -> io.appwrite.models.Provider = { @@ -756,7 +774,7 @@ class Messaging(client: Client) : Service(client) { "serviceAccountJSON" to serviceAccountJSON, "enabled" to enabled, ) - val apiHeaders = mutableMapOf<String, String>( + val apiHeaders = mutableMapOf( "content-type" to "application/json", ) val converter: (Any) -> io.appwrite.models.Provider = { @@ -799,7 +817,7 @@ class Messaging(client: Client) : Service(client) { "enabled" to enabled, "serviceAccountJSON" to serviceAccountJSON, ) - val apiHeaders = mutableMapOf<String, String>( + val apiHeaders = mutableMapOf( "content-type" to "application/json", ) val converter: (Any) -> io.appwrite.models.Provider = { @@ -860,7 +878,7 @@ class Messaging(client: Client) : Service(client) { "replyToEmail" to replyToEmail, "enabled" to enabled, ) - val apiHeaders = mutableMapOf<String, String>( + val apiHeaders = mutableMapOf( "content-type" to "application/json", ) val converter: (Any) -> io.appwrite.models.Provider = { @@ -921,7 +939,7 @@ class Messaging(client: Client) : Service(client) { "replyToName" to replyToName, "replyToEmail" to replyToEmail, ) - val apiHeaders = mutableMapOf<String, String>( + val apiHeaders = mutableMapOf( "content-type" to "application/json", ) val converter: (Any) -> io.appwrite.models.Provider = { @@ -970,7 +988,7 @@ class Messaging(client: Client) : Service(client) { "authKey" to authKey, "enabled" to enabled, ) - val apiHeaders = mutableMapOf<String, String>( + val apiHeaders = mutableMapOf( "content-type" to "application/json", ) val converter: (Any) -> io.appwrite.models.Provider = { @@ -1019,7 +1037,7 @@ class Messaging(client: Client) : Service(client) { "senderId" to senderId, "authKey" to authKey, ) - val apiHeaders = mutableMapOf<String, String>( + val apiHeaders = mutableMapOf( "content-type" to "application/json", ) val converter: (Any) -> io.appwrite.models.Provider = { @@ -1074,7 +1092,7 @@ class Messaging(client: Client) : Service(client) { "replyToEmail" to replyToEmail, "enabled" to enabled, ) - val apiHeaders = mutableMapOf<String, String>( + val apiHeaders = mutableMapOf( "content-type" to "application/json", ) val converter: (Any) -> io.appwrite.models.Provider = { @@ -1129,7 +1147,7 @@ class Messaging(client: Client) : Service(client) { "replyToName" to replyToName, "replyToEmail" to replyToEmail, ) - val apiHeaders = mutableMapOf<String, String>( + val apiHeaders = mutableMapOf( "content-type" to "application/json", ) val converter: (Any) -> io.appwrite.models.Provider = { @@ -1202,7 +1220,7 @@ class Messaging(client: Client) : Service(client) { "replyToEmail" to replyToEmail, "enabled" to enabled, ) - val apiHeaders = mutableMapOf<String, String>( + val apiHeaders = mutableMapOf( "content-type" to "application/json", ) val converter: (Any) -> io.appwrite.models.Provider = { @@ -1275,7 +1293,7 @@ class Messaging(client: Client) : Service(client) { "replyToEmail" to replyToEmail, "enabled" to enabled, ) - val apiHeaders = mutableMapOf<String, String>( + val apiHeaders = mutableMapOf( "content-type" to "application/json", ) val converter: (Any) -> io.appwrite.models.Provider = { @@ -1324,7 +1342,7 @@ class Messaging(client: Client) : Service(client) { "apiKey" to apiKey, "enabled" to enabled, ) - val apiHeaders = mutableMapOf<String, String>( + val apiHeaders = mutableMapOf( "content-type" to "application/json", ) val converter: (Any) -> io.appwrite.models.Provider = { @@ -1373,7 +1391,7 @@ class Messaging(client: Client) : Service(client) { "apiKey" to apiKey, "from" to from, ) - val apiHeaders = mutableMapOf<String, String>( + val apiHeaders = mutableMapOf( "content-type" to "application/json", ) val converter: (Any) -> io.appwrite.models.Provider = { @@ -1422,7 +1440,7 @@ class Messaging(client: Client) : Service(client) { "apiKey" to apiKey, "enabled" to enabled, ) - val apiHeaders = mutableMapOf<String, String>( + val apiHeaders = mutableMapOf( "content-type" to "application/json", ) val converter: (Any) -> io.appwrite.models.Provider = { @@ -1471,7 +1489,7 @@ class Messaging(client: Client) : Service(client) { "apiKey" to apiKey, "from" to from, ) - val apiHeaders = mutableMapOf<String, String>( + val apiHeaders = mutableMapOf( "content-type" to "application/json", ) val converter: (Any) -> io.appwrite.models.Provider = { @@ -1520,7 +1538,7 @@ class Messaging(client: Client) : Service(client) { "authToken" to authToken, "enabled" to enabled, ) - val apiHeaders = mutableMapOf<String, String>( + val apiHeaders = mutableMapOf( "content-type" to "application/json", ) val converter: (Any) -> io.appwrite.models.Provider = { @@ -1569,7 +1587,7 @@ class Messaging(client: Client) : Service(client) { "authToken" to authToken, "from" to from, ) - val apiHeaders = mutableMapOf<String, String>( + val apiHeaders = mutableMapOf( "content-type" to "application/json", ) val converter: (Any) -> io.appwrite.models.Provider = { @@ -1618,7 +1636,7 @@ class Messaging(client: Client) : Service(client) { "apiSecret" to apiSecret, "enabled" to enabled, ) - val apiHeaders = mutableMapOf<String, String>( + val apiHeaders = mutableMapOf( "content-type" to "application/json", ) val converter: (Any) -> io.appwrite.models.Provider = { @@ -1667,7 +1685,7 @@ class Messaging(client: Client) : Service(client) { "apiSecret" to apiSecret, "from" to from, ) - val apiHeaders = mutableMapOf<String, String>( + val apiHeaders = mutableMapOf( "content-type" to "application/json", ) val converter: (Any) -> io.appwrite.models.Provider = { @@ -1700,7 +1718,7 @@ class Messaging(client: Client) : Service(client) { val apiParams = mutableMapOf<String, Any?>( ) - val apiHeaders = mutableMapOf<String, String>( + val apiHeaders = mutableMapOf( "content-type" to "application/json", ) val converter: (Any) -> io.appwrite.models.Provider = { @@ -1733,7 +1751,7 @@ class Messaging(client: Client) : Service(client) { val apiParams = mutableMapOf<String, Any?>( ) - val apiHeaders = mutableMapOf<String, String>( + val apiHeaders = mutableMapOf( "content-type" to "application/json", ) return client.call( @@ -1766,7 +1784,7 @@ class Messaging(client: Client) : Service(client) { val apiParams = mutableMapOf<String, Any?>( "queries" to queries, ) - val apiHeaders = mutableMapOf<String, String>( + val apiHeaders = mutableMapOf( "content-type" to "application/json", ) val converter: (Any) -> io.appwrite.models.LogList = { @@ -1803,7 +1821,7 @@ class Messaging(client: Client) : Service(client) { val apiParams = mutableMapOf<String, Any?>( "queries" to queries, ) - val apiHeaders = mutableMapOf<String, String>( + val apiHeaders = mutableMapOf( "content-type" to "application/json", ) val converter: (Any) -> io.appwrite.models.LogList = { @@ -1840,7 +1858,7 @@ class Messaging(client: Client) : Service(client) { "queries" to queries, "search" to search, ) - val apiHeaders = mutableMapOf<String, String>( + val apiHeaders = mutableMapOf( "content-type" to "application/json", ) val converter: (Any) -> io.appwrite.models.TopicList = { @@ -1880,7 +1898,7 @@ class Messaging(client: Client) : Service(client) { "name" to name, "subscribe" to subscribe, ) - val apiHeaders = mutableMapOf<String, String>( + val apiHeaders = mutableMapOf( "content-type" to "application/json", ) val converter: (Any) -> io.appwrite.models.Topic = { @@ -1913,7 +1931,7 @@ class Messaging(client: Client) : Service(client) { val apiParams = mutableMapOf<String, Any?>( ) - val apiHeaders = mutableMapOf<String, String>( + val apiHeaders = mutableMapOf( "content-type" to "application/json", ) val converter: (Any) -> io.appwrite.models.Topic = { @@ -1953,7 +1971,7 @@ class Messaging(client: Client) : Service(client) { "name" to name, "subscribe" to subscribe, ) - val apiHeaders = mutableMapOf<String, String>( + val apiHeaders = mutableMapOf( "content-type" to "application/json", ) val converter: (Any) -> io.appwrite.models.Topic = { @@ -1986,7 +2004,7 @@ class Messaging(client: Client) : Service(client) { val apiParams = mutableMapOf<String, Any?>( ) - val apiHeaders = mutableMapOf<String, String>( + val apiHeaders = mutableMapOf( "content-type" to "application/json", ) return client.call( @@ -2019,7 +2037,7 @@ class Messaging(client: Client) : Service(client) { val apiParams = mutableMapOf<String, Any?>( "queries" to queries, ) - val apiHeaders = mutableMapOf<String, String>( + val apiHeaders = mutableMapOf( "content-type" to "application/json", ) val converter: (Any) -> io.appwrite.models.LogList = { @@ -2059,7 +2077,7 @@ class Messaging(client: Client) : Service(client) { "queries" to queries, "search" to search, ) - val apiHeaders = mutableMapOf<String, String>( + val apiHeaders = mutableMapOf( "content-type" to "application/json", ) val converter: (Any) -> io.appwrite.models.SubscriberList = { @@ -2098,7 +2116,7 @@ class Messaging(client: Client) : Service(client) { "subscriberId" to subscriberId, "targetId" to targetId, ) - val apiHeaders = mutableMapOf<String, String>( + val apiHeaders = mutableMapOf( "content-type" to "application/json", ) val converter: (Any) -> io.appwrite.models.Subscriber = { @@ -2134,7 +2152,7 @@ class Messaging(client: Client) : Service(client) { val apiParams = mutableMapOf<String, Any?>( ) - val apiHeaders = mutableMapOf<String, String>( + val apiHeaders = mutableMapOf( "content-type" to "application/json", ) val converter: (Any) -> io.appwrite.models.Subscriber = { @@ -2170,7 +2188,7 @@ class Messaging(client: Client) : Service(client) { val apiParams = mutableMapOf<String, Any?>( ) - val apiHeaders = mutableMapOf<String, String>( + val apiHeaders = mutableMapOf( "content-type" to "application/json", ) return client.call( @@ -2182,4 +2200,4 @@ class Messaging(client: Client) : Service(client) { ) } -} +} \ No newline at end of file diff --git a/src/main/kotlin/io/appwrite/services/Storage.kt b/src/main/kotlin/io/appwrite/services/Storage.kt index 0e2c74c..5a10935 100644 --- a/src/main/kotlin/io/appwrite/services/Storage.kt +++ b/src/main/kotlin/io/appwrite/services/Storage.kt @@ -36,7 +36,7 @@ class Storage(client: Client) : Service(client) { "queries" to queries, "search" to search, ) - val apiHeaders = mutableMapOf<String, String>( + val apiHeaders = mutableMapOf( "content-type" to "application/json", ) val converter: (Any) -> io.appwrite.models.BucketList = { @@ -97,7 +97,7 @@ class Storage(client: Client) : Service(client) { "encryption" to encryption, "antivirus" to antivirus, ) - val apiHeaders = mutableMapOf<String, String>( + val apiHeaders = mutableMapOf( "content-type" to "application/json", ) val converter: (Any) -> io.appwrite.models.Bucket = { @@ -130,7 +130,7 @@ class Storage(client: Client) : Service(client) { val apiParams = mutableMapOf<String, Any?>( ) - val apiHeaders = mutableMapOf<String, String>( + val apiHeaders = mutableMapOf( "content-type" to "application/json", ) val converter: (Any) -> io.appwrite.models.Bucket = { @@ -191,7 +191,7 @@ class Storage(client: Client) : Service(client) { "encryption" to encryption, "antivirus" to antivirus, ) - val apiHeaders = mutableMapOf<String, String>( + val apiHeaders = mutableMapOf( "content-type" to "application/json", ) val converter: (Any) -> io.appwrite.models.Bucket = { @@ -224,7 +224,7 @@ class Storage(client: Client) : Service(client) { val apiParams = mutableMapOf<String, Any?>( ) - val apiHeaders = mutableMapOf<String, String>( + val apiHeaders = mutableMapOf( "content-type" to "application/json", ) return client.call( @@ -260,7 +260,7 @@ class Storage(client: Client) : Service(client) { "queries" to queries, "search" to search, ) - val apiHeaders = mutableMapOf<String, String>( + val apiHeaders = mutableMapOf( "content-type" to "application/json", ) val converter: (Any) -> io.appwrite.models.FileList = { @@ -292,7 +292,7 @@ class Storage(client: Client) : Service(client) { suspend fun createFile( bucketId: String, fileId: String, - file: Payload, + file: InputFile, permissions: List<String>? = null, onProgress: ((UploadProgress) -> Unit)? = null ): io.appwrite.models.File { @@ -304,7 +304,7 @@ class Storage(client: Client) : Service(client) { "file" to file, "permissions" to permissions, ) - val apiHeaders = mutableMapOf<String, String>( + val apiHeaders = mutableMapOf( "content-type" to "multipart/form-data", ) val converter: (Any) -> io.appwrite.models.File = { @@ -344,7 +344,7 @@ class Storage(client: Client) : Service(client) { val apiParams = mutableMapOf<String, Any?>( ) - val apiHeaders = mutableMapOf<String, String>( + val apiHeaders = mutableMapOf( "content-type" to "application/json", ) val converter: (Any) -> io.appwrite.models.File = { @@ -387,7 +387,7 @@ class Storage(client: Client) : Service(client) { "name" to name, "permissions" to permissions, ) - val apiHeaders = mutableMapOf<String, String>( + val apiHeaders = mutableMapOf( "content-type" to "application/json", ) val converter: (Any) -> io.appwrite.models.File = { @@ -423,7 +423,7 @@ class Storage(client: Client) : Service(client) { val apiParams = mutableMapOf<String, Any?>( ) - val apiHeaders = mutableMapOf<String, String>( + val apiHeaders = mutableMapOf( "content-type" to "application/json", ) return client.call( @@ -455,7 +455,7 @@ class Storage(client: Client) : Service(client) { val apiParams = mutableMapOf<String, Any?>( ) - val apiHeaders = mutableMapOf<String, String>( + val apiHeaders = mutableMapOf( "content-type" to "application/json", ) return client.call( @@ -520,7 +520,7 @@ class Storage(client: Client) : Service(client) { "background" to background, "output" to output, ) - val apiHeaders = mutableMapOf<String, String>( + val apiHeaders = mutableMapOf( "content-type" to "application/json", ) return client.call( @@ -551,7 +551,7 @@ class Storage(client: Client) : Service(client) { val apiParams = mutableMapOf<String, Any?>( ) - val apiHeaders = mutableMapOf<String, String>( + val apiHeaders = mutableMapOf( "content-type" to "application/json", ) return client.call( @@ -562,4 +562,4 @@ class Storage(client: Client) : Service(client) { ) } -} +} \ No newline at end of file diff --git a/src/main/kotlin/io/appwrite/services/Teams.kt b/src/main/kotlin/io/appwrite/services/Teams.kt index f7338d6..aa355dc 100644 --- a/src/main/kotlin/io/appwrite/services/Teams.kt +++ b/src/main/kotlin/io/appwrite/services/Teams.kt @@ -35,7 +35,7 @@ class Teams(client: Client) : Service(client) { "queries" to queries, "search" to search, ) - val apiHeaders = mutableMapOf<String, String>( + val apiHeaders = mutableMapOf( "content-type" to "application/json", ) val converter: (Any) -> io.appwrite.models.TeamList<T> = { @@ -96,7 +96,7 @@ class Teams(client: Client) : Service(client) { "name" to name, "roles" to roles, ) - val apiHeaders = mutableMapOf<String, String>( + val apiHeaders = mutableMapOf( "content-type" to "application/json", ) val converter: (Any) -> io.appwrite.models.Team<T> = { @@ -153,7 +153,7 @@ class Teams(client: Client) : Service(client) { val apiParams = mutableMapOf<String, Any?>( ) - val apiHeaders = mutableMapOf<String, String>( + val apiHeaders = mutableMapOf( "content-type" to "application/json", ) val converter: (Any) -> io.appwrite.models.Team<T> = { @@ -206,7 +206,7 @@ class Teams(client: Client) : Service(client) { val apiParams = mutableMapOf<String, Any?>( "name" to name, ) - val apiHeaders = mutableMapOf<String, String>( + val apiHeaders = mutableMapOf( "content-type" to "application/json", ) val converter: (Any) -> io.appwrite.models.Team<T> = { @@ -258,7 +258,7 @@ class Teams(client: Client) : Service(client) { val apiParams = mutableMapOf<String, Any?>( ) - val apiHeaders = mutableMapOf<String, String>( + val apiHeaders = mutableMapOf( "content-type" to "application/json", ) return client.call( @@ -273,7 +273,7 @@ class Teams(client: Client) : Service(client) { /** * List team memberships * - * Use this endpoint to list a team's members using the team's ID. All team members have read access to this endpoint. + * Use this endpoint to list a team's members using the team's ID. All team members have read access to this endpoint. Hide sensitive attributes from the response by toggling membership privacy in the Console. * * @param teamId Team ID. * @param queries Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https://appwrite.io/docs/queries). Maximum of 100 queries are allowed, each 4096 characters long. You may filter on the following attributes: userId, teamId, invited, joined, confirm @@ -294,7 +294,7 @@ class Teams(client: Client) : Service(client) { "queries" to queries, "search" to search, ) - val apiHeaders = mutableMapOf<String, String>( + val apiHeaders = mutableMapOf( "content-type" to "application/json", ) val converter: (Any) -> io.appwrite.models.MembershipList = { @@ -346,7 +346,7 @@ class Teams(client: Client) : Service(client) { "url" to url, "name" to name, ) - val apiHeaders = mutableMapOf<String, String>( + val apiHeaders = mutableMapOf( "content-type" to "application/json", ) val converter: (Any) -> io.appwrite.models.Membership = { @@ -365,7 +365,7 @@ class Teams(client: Client) : Service(client) { /** * Get team membership * - * Get a team member by the membership unique id. All team members have read access for this resource. + * Get a team member by the membership unique id. All team members have read access for this resource. Hide sensitive attributes from the response by toggling membership privacy in the Console. * * @param teamId Team ID. * @param membershipId Membership ID. @@ -382,7 +382,7 @@ class Teams(client: Client) : Service(client) { val apiParams = mutableMapOf<String, Any?>( ) - val apiHeaders = mutableMapOf<String, String>( + val apiHeaders = mutableMapOf( "content-type" to "application/json", ) val converter: (Any) -> io.appwrite.models.Membership = { @@ -421,7 +421,7 @@ class Teams(client: Client) : Service(client) { val apiParams = mutableMapOf<String, Any?>( "roles" to roles, ) - val apiHeaders = mutableMapOf<String, String>( + val apiHeaders = mutableMapOf( "content-type" to "application/json", ) val converter: (Any) -> io.appwrite.models.Membership = { @@ -457,7 +457,7 @@ class Teams(client: Client) : Service(client) { val apiParams = mutableMapOf<String, Any?>( ) - val apiHeaders = mutableMapOf<String, String>( + val apiHeaders = mutableMapOf( "content-type" to "application/json", ) return client.call( @@ -495,7 +495,7 @@ class Teams(client: Client) : Service(client) { "userId" to userId, "secret" to secret, ) - val apiHeaders = mutableMapOf<String, String>( + val apiHeaders = mutableMapOf( "content-type" to "application/json", ) val converter: (Any) -> io.appwrite.models.Membership = { @@ -529,7 +529,7 @@ class Teams(client: Client) : Service(client) { val apiParams = mutableMapOf<String, Any?>( ) - val apiHeaders = mutableMapOf<String, String>( + val apiHeaders = mutableMapOf( "content-type" to "application/json", ) val converter: (Any) -> io.appwrite.models.Preferences<T> = { @@ -582,7 +582,7 @@ class Teams(client: Client) : Service(client) { val apiParams = mutableMapOf<String, Any?>( "prefs" to prefs, ) - val apiHeaders = mutableMapOf<String, String>( + val apiHeaders = mutableMapOf( "content-type" to "application/json", ) val converter: (Any) -> io.appwrite.models.Preferences<T> = { @@ -617,4 +617,4 @@ class Teams(client: Client) : Service(client) { nestedType = classOf(), ) -} +} \ No newline at end of file diff --git a/src/main/kotlin/io/appwrite/services/Users.kt b/src/main/kotlin/io/appwrite/services/Users.kt index 98d32da..28c3cf3 100644 --- a/src/main/kotlin/io/appwrite/services/Users.kt +++ b/src/main/kotlin/io/appwrite/services/Users.kt @@ -35,7 +35,7 @@ class Users(client: Client) : Service(client) { "queries" to queries, "search" to search, ) - val apiHeaders = mutableMapOf<String, String>( + val apiHeaders = mutableMapOf( "content-type" to "application/json", ) val converter: (Any) -> io.appwrite.models.UserList<T> = { @@ -102,7 +102,7 @@ class Users(client: Client) : Service(client) { "password" to password, "name" to name, ) - val apiHeaders = mutableMapOf<String, String>( + val apiHeaders = mutableMapOf( "content-type" to "application/json", ) val converter: (Any) -> io.appwrite.models.User<T> = { @@ -175,7 +175,7 @@ class Users(client: Client) : Service(client) { "password" to password, "name" to name, ) - val apiHeaders = mutableMapOf<String, String>( + val apiHeaders = mutableMapOf( "content-type" to "application/json", ) val converter: (Any) -> io.appwrite.models.User<T> = { @@ -245,7 +245,7 @@ class Users(client: Client) : Service(client) { "password" to password, "name" to name, ) - val apiHeaders = mutableMapOf<String, String>( + val apiHeaders = mutableMapOf( "content-type" to "application/json", ) val converter: (Any) -> io.appwrite.models.User<T> = { @@ -308,7 +308,7 @@ class Users(client: Client) : Service(client) { "queries" to queries, "search" to search, ) - val apiHeaders = mutableMapOf<String, String>( + val apiHeaders = mutableMapOf( "content-type" to "application/json", ) val converter: (Any) -> io.appwrite.models.IdentityList = { @@ -341,7 +341,7 @@ class Users(client: Client) : Service(client) { val apiParams = mutableMapOf<String, Any?>( ) - val apiHeaders = mutableMapOf<String, String>( + val apiHeaders = mutableMapOf( "content-type" to "application/json", ) return client.call( @@ -381,7 +381,7 @@ class Users(client: Client) : Service(client) { "password" to password, "name" to name, ) - val apiHeaders = mutableMapOf<String, String>( + val apiHeaders = mutableMapOf( "content-type" to "application/json", ) val converter: (Any) -> io.appwrite.models.User<T> = { @@ -451,7 +451,7 @@ class Users(client: Client) : Service(client) { "password" to password, "name" to name, ) - val apiHeaders = mutableMapOf<String, String>( + val apiHeaders = mutableMapOf( "content-type" to "application/json", ) val converter: (Any) -> io.appwrite.models.User<T> = { @@ -536,7 +536,7 @@ class Users(client: Client) : Service(client) { "passwordLength" to passwordLength, "name" to name, ) - val apiHeaders = mutableMapOf<String, String>( + val apiHeaders = mutableMapOf( "content-type" to "application/json", ) val converter: (Any) -> io.appwrite.models.User<T> = { @@ -630,7 +630,7 @@ class Users(client: Client) : Service(client) { "passwordSignerKey" to passwordSignerKey, "name" to name, ) - val apiHeaders = mutableMapOf<String, String>( + val apiHeaders = mutableMapOf( "content-type" to "application/json", ) val converter: (Any) -> io.appwrite.models.User<T> = { @@ -712,7 +712,7 @@ class Users(client: Client) : Service(client) { "passwordVersion" to passwordVersion, "name" to name, ) - val apiHeaders = mutableMapOf<String, String>( + val apiHeaders = mutableMapOf( "content-type" to "application/json", ) val converter: (Any) -> io.appwrite.models.User<T> = { @@ -775,7 +775,7 @@ class Users(client: Client) : Service(client) { val apiParams = mutableMapOf<String, Any?>( ) - val apiHeaders = mutableMapOf<String, String>( + val apiHeaders = mutableMapOf( "content-type" to "application/json", ) val converter: (Any) -> io.appwrite.models.User<T> = { @@ -824,7 +824,7 @@ class Users(client: Client) : Service(client) { val apiParams = mutableMapOf<String, Any?>( ) - val apiHeaders = mutableMapOf<String, String>( + val apiHeaders = mutableMapOf( "content-type" to "application/json", ) return client.call( @@ -857,7 +857,7 @@ class Users(client: Client) : Service(client) { val apiParams = mutableMapOf<String, Any?>( "email" to email, ) - val apiHeaders = mutableMapOf<String, String>( + val apiHeaders = mutableMapOf( "content-type" to "application/json", ) val converter: (Any) -> io.appwrite.models.User<T> = { @@ -916,7 +916,7 @@ class Users(client: Client) : Service(client) { "sessionId" to sessionId, "duration" to duration, ) - val apiHeaders = mutableMapOf<String, String>( + val apiHeaders = mutableMapOf( "content-type" to "application/json", ) val converter: (Any) -> io.appwrite.models.Jwt = { @@ -953,7 +953,7 @@ class Users(client: Client) : Service(client) { val apiParams = mutableMapOf<String, Any?>( "labels" to labels, ) - val apiHeaders = mutableMapOf<String, String>( + val apiHeaders = mutableMapOf( "content-type" to "application/json", ) val converter: (Any) -> io.appwrite.models.User<T> = { @@ -1009,7 +1009,7 @@ class Users(client: Client) : Service(client) { val apiParams = mutableMapOf<String, Any?>( "queries" to queries, ) - val apiHeaders = mutableMapOf<String, String>( + val apiHeaders = mutableMapOf( "content-type" to "application/json", ) val converter: (Any) -> io.appwrite.models.LogList = { @@ -1042,7 +1042,7 @@ class Users(client: Client) : Service(client) { val apiParams = mutableMapOf<String, Any?>( ) - val apiHeaders = mutableMapOf<String, String>( + val apiHeaders = mutableMapOf( "content-type" to "application/json", ) val converter: (Any) -> io.appwrite.models.MembershipList = { @@ -1079,7 +1079,7 @@ class Users(client: Client) : Service(client) { val apiParams = mutableMapOf<String, Any?>( "mfa" to mfa, ) - val apiHeaders = mutableMapOf<String, String>( + val apiHeaders = mutableMapOf( "content-type" to "application/json", ) val converter: (Any) -> io.appwrite.models.User<T> = { @@ -1135,7 +1135,7 @@ class Users(client: Client) : Service(client) { val apiParams = mutableMapOf<String, Any?>( ) - val apiHeaders = mutableMapOf<String, String>( + val apiHeaders = mutableMapOf( "content-type" to "application/json", ) val converter: (Any) -> io.appwrite.models.User<T> = { @@ -1187,7 +1187,7 @@ class Users(client: Client) : Service(client) { val apiParams = mutableMapOf<String, Any?>( ) - val apiHeaders = mutableMapOf<String, String>( + val apiHeaders = mutableMapOf( "content-type" to "application/json", ) val converter: (Any) -> io.appwrite.models.MfaFactors = { @@ -1220,7 +1220,7 @@ class Users(client: Client) : Service(client) { val apiParams = mutableMapOf<String, Any?>( ) - val apiHeaders = mutableMapOf<String, String>( + val apiHeaders = mutableMapOf( "content-type" to "application/json", ) val converter: (Any) -> io.appwrite.models.MfaRecoveryCodes = { @@ -1253,7 +1253,7 @@ class Users(client: Client) : Service(client) { val apiParams = mutableMapOf<String, Any?>( ) - val apiHeaders = mutableMapOf<String, String>( + val apiHeaders = mutableMapOf( "content-type" to "application/json", ) val converter: (Any) -> io.appwrite.models.MfaRecoveryCodes = { @@ -1286,7 +1286,7 @@ class Users(client: Client) : Service(client) { val apiParams = mutableMapOf<String, Any?>( ) - val apiHeaders = mutableMapOf<String, String>( + val apiHeaders = mutableMapOf( "content-type" to "application/json", ) val converter: (Any) -> io.appwrite.models.MfaRecoveryCodes = { @@ -1323,7 +1323,7 @@ class Users(client: Client) : Service(client) { val apiParams = mutableMapOf<String, Any?>( "name" to name, ) - val apiHeaders = mutableMapOf<String, String>( + val apiHeaders = mutableMapOf( "content-type" to "application/json", ) val converter: (Any) -> io.appwrite.models.User<T> = { @@ -1379,7 +1379,7 @@ class Users(client: Client) : Service(client) { val apiParams = mutableMapOf<String, Any?>( "password" to password, ) - val apiHeaders = mutableMapOf<String, String>( + val apiHeaders = mutableMapOf( "content-type" to "application/json", ) val converter: (Any) -> io.appwrite.models.User<T> = { @@ -1435,7 +1435,7 @@ class Users(client: Client) : Service(client) { val apiParams = mutableMapOf<String, Any?>( "number" to number, ) - val apiHeaders = mutableMapOf<String, String>( + val apiHeaders = mutableMapOf( "content-type" to "application/json", ) val converter: (Any) -> io.appwrite.models.User<T> = { @@ -1488,7 +1488,7 @@ class Users(client: Client) : Service(client) { val apiParams = mutableMapOf<String, Any?>( ) - val apiHeaders = mutableMapOf<String, String>( + val apiHeaders = mutableMapOf( "content-type" to "application/json", ) val converter: (Any) -> io.appwrite.models.Preferences<T> = { @@ -1541,7 +1541,7 @@ class Users(client: Client) : Service(client) { val apiParams = mutableMapOf<String, Any?>( "prefs" to prefs, ) - val apiHeaders = mutableMapOf<String, String>( + val apiHeaders = mutableMapOf( "content-type" to "application/json", ) val converter: (Any) -> io.appwrite.models.Preferences<T> = { @@ -1593,7 +1593,7 @@ class Users(client: Client) : Service(client) { val apiParams = mutableMapOf<String, Any?>( ) - val apiHeaders = mutableMapOf<String, String>( + val apiHeaders = mutableMapOf( "content-type" to "application/json", ) val converter: (Any) -> io.appwrite.models.SessionList = { @@ -1626,7 +1626,7 @@ class Users(client: Client) : Service(client) { val apiParams = mutableMapOf<String, Any?>( ) - val apiHeaders = mutableMapOf<String, String>( + val apiHeaders = mutableMapOf( "content-type" to "application/json", ) val converter: (Any) -> io.appwrite.models.Session = { @@ -1659,7 +1659,7 @@ class Users(client: Client) : Service(client) { val apiParams = mutableMapOf<String, Any?>( ) - val apiHeaders = mutableMapOf<String, String>( + val apiHeaders = mutableMapOf( "content-type" to "application/json", ) return client.call( @@ -1691,7 +1691,7 @@ class Users(client: Client) : Service(client) { val apiParams = mutableMapOf<String, Any?>( ) - val apiHeaders = mutableMapOf<String, String>( + val apiHeaders = mutableMapOf( "content-type" to "application/json", ) return client.call( @@ -1724,7 +1724,7 @@ class Users(client: Client) : Service(client) { val apiParams = mutableMapOf<String, Any?>( "status" to status, ) - val apiHeaders = mutableMapOf<String, String>( + val apiHeaders = mutableMapOf( "content-type" to "application/json", ) val converter: (Any) -> io.appwrite.models.User<T> = { @@ -1780,7 +1780,7 @@ class Users(client: Client) : Service(client) { val apiParams = mutableMapOf<String, Any?>( "queries" to queries, ) - val apiHeaders = mutableMapOf<String, String>( + val apiHeaders = mutableMapOf( "content-type" to "application/json", ) val converter: (Any) -> io.appwrite.models.TargetList = { @@ -1829,7 +1829,7 @@ class Users(client: Client) : Service(client) { "providerId" to providerId, "name" to name, ) - val apiHeaders = mutableMapOf<String, String>( + val apiHeaders = mutableMapOf( "content-type" to "application/json", ) val converter: (Any) -> io.appwrite.models.Target = { @@ -1865,7 +1865,7 @@ class Users(client: Client) : Service(client) { val apiParams = mutableMapOf<String, Any?>( ) - val apiHeaders = mutableMapOf<String, String>( + val apiHeaders = mutableMapOf( "content-type" to "application/json", ) val converter: (Any) -> io.appwrite.models.Target = { @@ -1911,7 +1911,7 @@ class Users(client: Client) : Service(client) { "providerId" to providerId, "name" to name, ) - val apiHeaders = mutableMapOf<String, String>( + val apiHeaders = mutableMapOf( "content-type" to "application/json", ) val converter: (Any) -> io.appwrite.models.Target = { @@ -1947,7 +1947,7 @@ class Users(client: Client) : Service(client) { val apiParams = mutableMapOf<String, Any?>( ) - val apiHeaders = mutableMapOf<String, String>( + val apiHeaders = mutableMapOf( "content-type" to "application/json", ) return client.call( @@ -1983,7 +1983,7 @@ class Users(client: Client) : Service(client) { "length" to length, "expire" to expire, ) - val apiHeaders = mutableMapOf<String, String>( + val apiHeaders = mutableMapOf( "content-type" to "application/json", ) val converter: (Any) -> io.appwrite.models.Token = { @@ -2020,7 +2020,7 @@ class Users(client: Client) : Service(client) { val apiParams = mutableMapOf<String, Any?>( "emailVerification" to emailVerification, ) - val apiHeaders = mutableMapOf<String, String>( + val apiHeaders = mutableMapOf( "content-type" to "application/json", ) val converter: (Any) -> io.appwrite.models.User<T> = { @@ -2076,7 +2076,7 @@ class Users(client: Client) : Service(client) { val apiParams = mutableMapOf<String, Any?>( "phoneVerification" to phoneVerification, ) - val apiHeaders = mutableMapOf<String, String>( + val apiHeaders = mutableMapOf( "content-type" to "application/json", ) val converter: (Any) -> io.appwrite.models.User<T> = { @@ -2111,4 +2111,4 @@ class Users(client: Client) : Service(client) { nestedType = classOf(), ) -} +} \ No newline at end of file From 2186d83efaa41b467afde37b3622e98f9905f91d Mon Sep 17 00:00:00 2001 From: loks0n <22452787+loks0n@users.noreply.github.com> Date: Tue, 28 Jan 2025 18:31:02 +0000 Subject: [PATCH 04/17] fix: pong response & chunked upload --- LICENSE.md | 2 +- README.md | 4 +- src/main/kotlin/io/appwrite/Client.kt | 55 ++++++++++++++----- .../kotlin/io/appwrite/enums/ImageFormat.kt | 2 + .../kotlin/io/appwrite/services/Account.kt | 10 +++- .../kotlin/io/appwrite/services/Functions.kt | 4 +- .../kotlin/io/appwrite/services/Messaging.kt | 2 +- src/main/kotlin/io/appwrite/services/Users.kt | 32 ++--------- 8 files changed, 60 insertions(+), 51 deletions(-) diff --git a/LICENSE.md b/LICENSE.md index 5479bb8..c1602fc 100644 --- a/LICENSE.md +++ b/LICENSE.md @@ -1,4 +1,4 @@ -Copyright (c) 2024 Appwrite (https://appwrite.io) and individual contributors. +Copyright (c) 2025 Appwrite (https://appwrite.io) and individual contributors. All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: diff --git a/README.md b/README.md index 5786e19..579a046 100644 --- a/README.md +++ b/README.md @@ -39,7 +39,7 @@ repositories { Next, add the dependency to your project's `build.gradle(.kts)` file: ```groovy -implementation("io.appwrite:sdk-for-kotlin:6.2.0") +implementation("io.appwrite:sdk-for-kotlin:6.2.1") ``` ### Maven @@ -50,7 +50,7 @@ Add this to your project's `pom.xml` file: <dependency> <groupId>io.appwrite</groupId> <artifactId>sdk-for-kotlin</artifactId> - <version>6.2.0</version> + <version>6.2.1</version> </dependency> </dependencies> ``` diff --git a/src/main/kotlin/io/appwrite/Client.kt b/src/main/kotlin/io/appwrite/Client.kt index c8ff8d9..8c790ff 100644 --- a/src/main/kotlin/io/appwrite/Client.kt +++ b/src/main/kotlin/io/appwrite/Client.kt @@ -57,11 +57,11 @@ class Client @JvmOverloads constructor( init { headers = mutableMapOf( "content-type" to "application/json", - "user-agent" to "AppwriteKotlinSDK/6.2.0 ${System.getProperty("http.agent")}", + "user-agent" to "AppwriteKotlinSDK/6.2.1 ${System.getProperty("http.agent")}", "x-sdk-name" to "Kotlin", "x-sdk-platform" to "server", "x-sdk-language" to "kotlin", - "x-sdk-version" to "6.2.0", + "x-sdk-version" to "6.2.1", "x-appwrite-response-format" to "1.6.0", ) @@ -235,9 +235,28 @@ class Client @JvmOverloads constructor( return this } + /** + * Sends a "ping" request to Appwrite to verify connectivity. + * + * @return String + */ + suspend fun ping(): String { + val apiPath = "/ping" + val apiParams = mutableMapOf<String, Any?>() + val apiHeaders = mutableMapOf("content-type" to "application/json") + + return call( + "GET", + apiPath, + apiHeaders, + apiParams, + responseType = String::class.java + ) + } + /** * Prepare the HTTP request - * + * * @param method * @param path * @param headers @@ -332,7 +351,7 @@ class Client @JvmOverloads constructor( * @param headers * @param params * - * @return [T] + * @return [T] */ @Throws(AppwriteException::class) suspend fun <T> call( @@ -355,7 +374,7 @@ class Client @JvmOverloads constructor( * @param headers * @param params * - * @return [T] + * @return [T] */ @Throws(AppwriteException::class) suspend fun redirect( @@ -427,7 +446,7 @@ class Client @JvmOverloads constructor( var offset = 0L var result: Map<*, *>? = null - if (idParamName?.isNotEmpty() == true && params[idParamName] != "unique()") { + if (idParamName?.isNotEmpty() == true) { // Make a request to check if a file already exists val current = call( method = "GET", @@ -494,7 +513,7 @@ class Client @JvmOverloads constructor( return converter(result as Map<String, Any>) } - /** + /** * Await Redirect * * @param request @@ -521,14 +540,14 @@ class Client @JvmOverloads constructor( .charStream() .buffered() .use(BufferedReader::readText) - + val error = if (response.headers["content-type"]?.contains("application/json") == true) { val map = body.fromJson<Map<String, Any>>() AppwriteException( - map["message"] as? String ?: "", + map["message"] as? String ?: "", (map["code"] as Number).toInt(), - map["type"] as? String ?: "", + map["type"] as? String ?: "", body ) } else { @@ -572,14 +591,14 @@ class Client @JvmOverloads constructor( .charStream() .buffered() .use(BufferedReader::readText) - + val error = if (response.headers["content-type"]?.contains("application/json") == true) { val map = body.fromJson<Map<String, Any>>() AppwriteException( - map["message"] as? String ?: "", + map["message"] as? String ?: "", (map["code"] as Number).toInt(), - map["type"] as? String ?: "", + map["type"] as? String ?: "", body ) } else { @@ -601,6 +620,14 @@ class Client @JvmOverloads constructor( it.resume(true as T) return } + responseType == String::class.java -> { + val body = response.body!! + .charStream() + .buffered() + .use(BufferedReader::readText) + it.resume(body as T) + return + } responseType == ByteArray::class.java -> { it.resume(response.body!! .byteStream() @@ -629,4 +656,4 @@ class Client @JvmOverloads constructor( } }) } -} \ No newline at end of file +} diff --git a/src/main/kotlin/io/appwrite/enums/ImageFormat.kt b/src/main/kotlin/io/appwrite/enums/ImageFormat.kt index 25eea90..7249f2a 100644 --- a/src/main/kotlin/io/appwrite/enums/ImageFormat.kt +++ b/src/main/kotlin/io/appwrite/enums/ImageFormat.kt @@ -13,6 +13,8 @@ enum class ImageFormat(val value: String) { PNG("png"), @SerializedName("webp") WEBP("webp"), + @SerializedName("heic") + HEIC("heic"), @SerializedName("avif") AVIF("avif"); diff --git a/src/main/kotlin/io/appwrite/services/Account.kt b/src/main/kotlin/io/appwrite/services/Account.kt index aaa851c..a06e99f 100644 --- a/src/main/kotlin/io/appwrite/services/Account.kt +++ b/src/main/kotlin/io/appwrite/services/Account.kt @@ -518,13 +518,13 @@ class Account(client: Client) : Service(client) { * * @param challengeId ID of the challenge. * @param otp Valid verification token. - * @return [Any] + * @return [io.appwrite.models.Session] */ @Throws(AppwriteException::class) suspend fun updateMfaChallenge( challengeId: String, otp: String, - ): Any { + ): io.appwrite.models.Session { val apiPath = "/account/mfa/challenge" val apiParams = mutableMapOf<String, Any?>( @@ -534,12 +534,16 @@ class Account(client: Client) : Service(client) { val apiHeaders = mutableMapOf( "content-type" to "application/json", ) + val converter: (Any) -> io.appwrite.models.Session = { + io.appwrite.models.Session.from(map = it as Map<String, Any>) + } return client.call( "PUT", apiPath, apiHeaders, apiParams, - responseType = Any::class.java, + responseType = io.appwrite.models.Session::class.java, + converter, ) } diff --git a/src/main/kotlin/io/appwrite/services/Functions.kt b/src/main/kotlin/io/appwrite/services/Functions.kt index d0a98f5..df94e53 100644 --- a/src/main/kotlin/io/appwrite/services/Functions.kt +++ b/src/main/kotlin/io/appwrite/services/Functions.kt @@ -554,7 +554,7 @@ class Functions(client: Client) : Service(client) { /** * Rebuild deployment * - * + * Create a new build for an existing function deployment. This endpoint allows you to rebuild a deployment with the updated function configuration, including its entrypoint and build commands if they have been modified The build process will be queued and executed asynchronously. The original deployment's code will be preserved and used for the new build. * * @param functionId Function ID. * @param deploymentId Deployment ID. @@ -590,7 +590,7 @@ class Functions(client: Client) : Service(client) { /** * Cancel deployment * - * + * Cancel an ongoing function deployment build. If the build is already in progress, it will be stopped and marked as canceled. If the build hasn't started yet, it will be marked as canceled without executing. You cannot cancel builds that have already completed (status 'ready') or failed. The response includes the final build status and details. * * @param functionId Function ID. * @param deploymentId Deployment ID. diff --git a/src/main/kotlin/io/appwrite/services/Messaging.kt b/src/main/kotlin/io/appwrite/services/Messaging.kt index be6c259..b1eac2a 100644 --- a/src/main/kotlin/io/appwrite/services/Messaging.kt +++ b/src/main/kotlin/io/appwrite/services/Messaging.kt @@ -415,7 +415,7 @@ class Messaging(client: Client) : Service(client) { /** * Update SMS * - * Update an email message by its unique ID. + * Update an SMS message by its unique ID. * * @param messageId Message ID. * @param topics List of Topic IDs. diff --git a/src/main/kotlin/io/appwrite/services/Users.kt b/src/main/kotlin/io/appwrite/services/Users.kt index 28c3cf3..00d266b 100644 --- a/src/main/kotlin/io/appwrite/services/Users.kt +++ b/src/main/kotlin/io/appwrite/services/Users.kt @@ -1121,14 +1121,13 @@ class Users(client: Client) : Service(client) { * * @param userId User ID. * @param type Type of authenticator. - * @return [io.appwrite.models.User<T>] + * @return [Any] */ @Throws(AppwriteException::class) - suspend fun <T> deleteMfaAuthenticator( + suspend fun deleteMfaAuthenticator( userId: String, type: io.appwrite.enums.AuthenticatorType, - nestedType: Class<T>, - ): io.appwrite.models.User<T> { + ): Any { val apiPath = "/users/{userId}/mfa/authenticators/{type}" .replace("{userId}", userId) .replace("{type}", type.value) @@ -1138,38 +1137,15 @@ class Users(client: Client) : Service(client) { val apiHeaders = mutableMapOf( "content-type" to "application/json", ) - val converter: (Any) -> io.appwrite.models.User<T> = { - io.appwrite.models.User.from(map = it as Map<String, Any>, nestedType) - } return client.call( "DELETE", apiPath, apiHeaders, apiParams, - responseType = classOf(), - converter, + responseType = Any::class.java, ) } - /** - * Delete authenticator - * - * Delete an authenticator app. - * - * @param userId User ID. - * @param type Type of authenticator. - * @return [io.appwrite.models.User<T>] - */ - @Throws(AppwriteException::class) - suspend fun deleteMfaAuthenticator( - userId: String, - type: io.appwrite.enums.AuthenticatorType, - ): io.appwrite.models.User<Map<String, Any>> = deleteMfaAuthenticator( - userId, - type, - nestedType = classOf(), - ) - /** * List factors * From b41238024861da149f004d2778c3eac7124c7d41 Mon Sep 17 00:00:00 2001 From: loks0n <22452787+loks0n@users.noreply.github.com> Date: Wed, 29 Jan 2025 08:04:57 +0000 Subject: [PATCH 05/17] chore: bump versions --- README.md | 4 ++-- src/main/kotlin/io/appwrite/Client.kt | 4 ++-- src/main/kotlin/io/appwrite/services/Users.kt | 19 ------------------- 3 files changed, 4 insertions(+), 23 deletions(-) diff --git a/README.md b/README.md index 579a046..be83985 100644 --- a/README.md +++ b/README.md @@ -39,7 +39,7 @@ repositories { Next, add the dependency to your project's `build.gradle(.kts)` file: ```groovy -implementation("io.appwrite:sdk-for-kotlin:6.2.1") +implementation("io.appwrite:sdk-for-kotlin:7.0.0") ``` ### Maven @@ -50,7 +50,7 @@ Add this to your project's `pom.xml` file: <dependency> <groupId>io.appwrite</groupId> <artifactId>sdk-for-kotlin</artifactId> - <version>6.2.1</version> + <version>7.0.0</version> </dependency> </dependencies> ``` diff --git a/src/main/kotlin/io/appwrite/Client.kt b/src/main/kotlin/io/appwrite/Client.kt index 8c790ff..cf5e7c4 100644 --- a/src/main/kotlin/io/appwrite/Client.kt +++ b/src/main/kotlin/io/appwrite/Client.kt @@ -57,11 +57,11 @@ class Client @JvmOverloads constructor( init { headers = mutableMapOf( "content-type" to "application/json", - "user-agent" to "AppwriteKotlinSDK/6.2.1 ${System.getProperty("http.agent")}", + "user-agent" to "AppwriteKotlinSDK/7.0.0 ${System.getProperty("http.agent")}", "x-sdk-name" to "Kotlin", "x-sdk-platform" to "server", "x-sdk-language" to "kotlin", - "x-sdk-version" to "6.2.1", + "x-sdk-version" to "7.0.0", "x-appwrite-response-format" to "1.6.0", ) diff --git a/src/main/kotlin/io/appwrite/services/Users.kt b/src/main/kotlin/io/appwrite/services/Users.kt index 4b750f4..00d266b 100644 --- a/src/main/kotlin/io/appwrite/services/Users.kt +++ b/src/main/kotlin/io/appwrite/services/Users.kt @@ -1146,25 +1146,6 @@ class Users(client: Client) : Service(client) { ) } - /** - * Delete authenticator - * - * Delete an authenticator app. - * - * @param userId User ID. - * @param type Type of authenticator. - * @return [io.appwrite.models.User<T>] - */ - @Throws(AppwriteException::class) - suspend fun deleteMfaAuthenticator( - userId: String, - type: io.appwrite.enums.AuthenticatorType, - ): io.appwrite.models.User<Map<String, Any>> = deleteMfaAuthenticator( - userId, - type, - nestedType = classOf(), - ) - /** * List factors * From 6ca4d448ef9104d6d9c06791af53b5fe40ce8dbe Mon Sep 17 00:00:00 2001 From: loks0n <22452787+loks0n@users.noreply.github.com> Date: Thu, 17 Apr 2025 19:55:49 +0100 Subject: [PATCH 06/17] fix: remove content-type from GET requests --- README.md | 6 +- .../java/databases/update-float-attribute.md | 4 +- .../databases/update-integer-attribute.md | 4 +- ...e-dump.md => get-queue-stats-resources.md} | 2 +- docs/examples/java/health/get-queue.md | 19 --- .../databases/update-float-attribute.md | 4 +- .../databases/update-integer-attribute.md | 4 +- ...e-dump.md => get-queue-stats-resources.md} | 2 +- docs/examples/kotlin/health/get-queue.md | 12 -- src/main/kotlin/io/appwrite/Client.kt | 14 +- .../kotlin/io/appwrite/enums/CreditCard.kt | 4 +- src/main/kotlin/io/appwrite/enums/Name.kt | 8 +- .../kotlin/io/appwrite/enums/OAuthProvider.kt | 2 + .../kotlin/io/appwrite/services/Account.kt | 119 +-------------- .../kotlin/io/appwrite/services/Avatars.kt | 23 +-- .../kotlin/io/appwrite/services/Databases.kt | 114 +-------------- .../kotlin/io/appwrite/services/Functions.kt | 59 -------- .../kotlin/io/appwrite/services/Graphql.kt | 4 - .../kotlin/io/appwrite/services/Health.kt | 108 +------------- .../kotlin/io/appwrite/services/Locale.kt | 24 --- .../kotlin/io/appwrite/services/Messaging.kt | 111 +------------- .../kotlin/io/appwrite/services/Storage.kt | 33 ----- src/main/kotlin/io/appwrite/services/Teams.kt | 43 ------ src/main/kotlin/io/appwrite/services/Users.kt | 137 ------------------ 24 files changed, 49 insertions(+), 811 deletions(-) rename docs/examples/java/health/{get-queue-usage-dump.md => get-queue-stats-resources.md} (94%) delete mode 100644 docs/examples/java/health/get-queue.md rename docs/examples/kotlin/health/{get-queue-usage-dump.md => get-queue-stats-resources.md} (89%) delete mode 100644 docs/examples/kotlin/health/get-queue.md diff --git a/README.md b/README.md index be83985..c3201a1 100644 --- a/README.md +++ b/README.md @@ -2,7 +2,7 @@ ![Maven Central](https://img.shields.io/maven-central/v/io.appwrite/sdk-for-kotlin.svg?color=green&style=flat-square) ![License](https://img.shields.io/github/license/appwrite/sdk-for-kotlin.svg?style=flat-square) -![Version](https://img.shields.io/badge/api%20version-1.6.1-blue.svg?style=flat-square) +![Version](https://img.shields.io/badge/api%20version-1.6.2-blue.svg?style=flat-square) [![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) @@ -39,7 +39,7 @@ repositories { Next, add the dependency to your project's `build.gradle(.kts)` file: ```groovy -implementation("io.appwrite:sdk-for-kotlin:7.0.0") +implementation("io.appwrite:sdk-for-kotlin:7.0.1") ``` ### Maven @@ -50,7 +50,7 @@ Add this to your project's `pom.xml` file: <dependency> <groupId>io.appwrite</groupId> <artifactId>sdk-for-kotlin</artifactId> - <version>7.0.0</version> + <version>7.0.1</version> </dependency> </dependencies> ``` diff --git a/docs/examples/java/databases/update-float-attribute.md b/docs/examples/java/databases/update-float-attribute.md index 071bd48..061e2a9 100644 --- a/docs/examples/java/databases/update-float-attribute.md +++ b/docs/examples/java/databases/update-float-attribute.md @@ -14,9 +14,9 @@ databases.updateFloatAttribute( "<COLLECTION_ID>", // collectionId "", // key false, // required - 0, // min - 0, // max 0, // default + 0, // min (optional) + 0, // max (optional) "", // newKey (optional) new CoroutineCallback<>((result, error) -> { if (error != null) { diff --git a/docs/examples/java/databases/update-integer-attribute.md b/docs/examples/java/databases/update-integer-attribute.md index b6c1e44..24a26eb 100644 --- a/docs/examples/java/databases/update-integer-attribute.md +++ b/docs/examples/java/databases/update-integer-attribute.md @@ -14,9 +14,9 @@ databases.updateIntegerAttribute( "<COLLECTION_ID>", // collectionId "", // key false, // required - 0, // min - 0, // max 0, // default + 0, // min (optional) + 0, // max (optional) "", // newKey (optional) new CoroutineCallback<>((result, error) -> { if (error != null) { diff --git a/docs/examples/java/health/get-queue-usage-dump.md b/docs/examples/java/health/get-queue-stats-resources.md similarity index 94% rename from docs/examples/java/health/get-queue-usage-dump.md rename to docs/examples/java/health/get-queue-stats-resources.md index 59bd406..5a6db4a 100644 --- a/docs/examples/java/health/get-queue-usage-dump.md +++ b/docs/examples/java/health/get-queue-stats-resources.md @@ -9,7 +9,7 @@ Client client = new Client() Health health = new Health(client); -health.getQueueUsageDump( +health.getQueueStatsResources( 0, // threshold (optional) new CoroutineCallback<>((result, error) -> { if (error != null) { diff --git a/docs/examples/java/health/get-queue.md b/docs/examples/java/health/get-queue.md deleted file mode 100644 index 55937b7..0000000 --- a/docs/examples/java/health/get-queue.md +++ /dev/null @@ -1,19 +0,0 @@ -import io.appwrite.Client; -import io.appwrite.coroutines.CoroutineCallback; -import io.appwrite.services.Health; - -Client client = new Client() - .setEndpoint("https://cloud.appwrite.io/v1") // Your API Endpoint - .setProject("<YOUR_PROJECT_ID>") // Your project ID - .setKey("<YOUR_API_KEY>"); // Your secret API key - -Health health = new Health(client); - -health.getQueue(new CoroutineCallback<>((result, error) -> { - if (error != null) { - error.printStackTrace(); - return; - } - - System.out.println(result); -})); diff --git a/docs/examples/kotlin/databases/update-float-attribute.md b/docs/examples/kotlin/databases/update-float-attribute.md index 4701530..3d0485f 100644 --- a/docs/examples/kotlin/databases/update-float-attribute.md +++ b/docs/examples/kotlin/databases/update-float-attribute.md @@ -14,8 +14,8 @@ val response = databases.updateFloatAttribute( collectionId = "<COLLECTION_ID>", key = "", required = false, - min = 0, - max = 0, default = 0, + min = 0, // optional + max = 0, // optional newKey = "" // optional ) diff --git a/docs/examples/kotlin/databases/update-integer-attribute.md b/docs/examples/kotlin/databases/update-integer-attribute.md index e5742a5..249972d 100644 --- a/docs/examples/kotlin/databases/update-integer-attribute.md +++ b/docs/examples/kotlin/databases/update-integer-attribute.md @@ -14,8 +14,8 @@ val response = databases.updateIntegerAttribute( collectionId = "<COLLECTION_ID>", key = "", required = false, - min = 0, - max = 0, default = 0, + min = 0, // optional + max = 0, // optional newKey = "" // optional ) diff --git a/docs/examples/kotlin/health/get-queue-usage-dump.md b/docs/examples/kotlin/health/get-queue-stats-resources.md similarity index 89% rename from docs/examples/kotlin/health/get-queue-usage-dump.md rename to docs/examples/kotlin/health/get-queue-stats-resources.md index a1b1a30..ac95abc 100644 --- a/docs/examples/kotlin/health/get-queue-usage-dump.md +++ b/docs/examples/kotlin/health/get-queue-stats-resources.md @@ -9,6 +9,6 @@ val client = Client() val health = Health(client) -val response = health.getQueueUsageDump( +val response = health.getQueueStatsResources( threshold = 0 // optional ) diff --git a/docs/examples/kotlin/health/get-queue.md b/docs/examples/kotlin/health/get-queue.md deleted file mode 100644 index d24e8c4..0000000 --- a/docs/examples/kotlin/health/get-queue.md +++ /dev/null @@ -1,12 +0,0 @@ -import io.appwrite.Client -import io.appwrite.coroutines.CoroutineCallback -import io.appwrite.services.Health - -val client = Client() - .setEndpoint("https://cloud.appwrite.io/v1") // Your API Endpoint - .setProject("<YOUR_PROJECT_ID>") // Your project ID - .setKey("<YOUR_API_KEY>") // Your secret API key - -val health = Health(client) - -val response = health.getQueue() diff --git a/src/main/kotlin/io/appwrite/Client.kt b/src/main/kotlin/io/appwrite/Client.kt index cf5e7c4..fe533b6 100644 --- a/src/main/kotlin/io/appwrite/Client.kt +++ b/src/main/kotlin/io/appwrite/Client.kt @@ -21,6 +21,7 @@ import java.io.BufferedReader import java.io.File import java.io.RandomAccessFile import java.io.IOException +import java.lang.IllegalArgumentException import java.security.SecureRandom import java.security.cert.X509Certificate import javax.net.ssl.HostnameVerifier @@ -57,11 +58,11 @@ class Client @JvmOverloads constructor( init { headers = mutableMapOf( "content-type" to "application/json", - "user-agent" to "AppwriteKotlinSDK/7.0.0 ${System.getProperty("http.agent")}", + "user-agent" to "AppwriteKotlinSDK/7.0.1 ${System.getProperty("http.agent")}", "x-sdk-name" to "Kotlin", "x-sdk-platform" to "server", "x-sdk-language" to "kotlin", - "x-sdk-version" to "7.0.0", + "x-sdk-version" to "7.0.1", "x-appwrite-response-format" to "1.6.0", ) @@ -217,7 +218,12 @@ class Client @JvmOverloads constructor( * * @return this */ + @Throws(IllegalArgumentException::class) fun setEndpoint(endPoint: String): Client { + require(endPoint.startsWith("http://") || endPoint.startsWith("https://")) { + "Invalid endpoint URL: $endPoint" + } + this.endPoint = endPoint return this } @@ -551,7 +557,7 @@ class Client @JvmOverloads constructor( body ) } else { - AppwriteException(body, response.code) + AppwriteException(body, response.code, "", body) } it.cancel(error) return @@ -602,7 +608,7 @@ class Client @JvmOverloads constructor( body ) } else { - AppwriteException(body, response.code) + AppwriteException(body, response.code, "", body) } it.cancel(error) return diff --git a/src/main/kotlin/io/appwrite/enums/CreditCard.kt b/src/main/kotlin/io/appwrite/enums/CreditCard.kt index 063de61..1826304 100644 --- a/src/main/kotlin/io/appwrite/enums/CreditCard.kt +++ b/src/main/kotlin/io/appwrite/enums/CreditCard.kt @@ -34,7 +34,9 @@ enum class CreditCard(val value: String) { @SerializedName("mir") MIR("mir"), @SerializedName("maestro") - MAESTRO("maestro"); + MAESTRO("maestro"), + @SerializedName("rupay") + RUPAY("rupay"); override fun toString() = value } \ No newline at end of file diff --git a/src/main/kotlin/io/appwrite/enums/Name.kt b/src/main/kotlin/io/appwrite/enums/Name.kt index 2b6f863..0ef4251 100644 --- a/src/main/kotlin/io/appwrite/enums/Name.kt +++ b/src/main/kotlin/io/appwrite/enums/Name.kt @@ -13,10 +13,10 @@ enum class Name(val value: String) { V1_MAILS("v1-mails"), @SerializedName("v1-functions") V1_FUNCTIONS("v1-functions"), - @SerializedName("v1-usage") - V1_USAGE("v1-usage"), - @SerializedName("v1-usage-dump") - V1_USAGE_DUMP("v1-usage-dump"), + @SerializedName("v1-stats-resources") + V1_STATS_RESOURCES("v1-stats-resources"), + @SerializedName("v1-stats-usage") + V1_STATS_USAGE("v1-stats-usage"), @SerializedName("v1-webhooks") V1_WEBHOOKS("v1-webhooks"), @SerializedName("v1-certificates") diff --git a/src/main/kotlin/io/appwrite/enums/OAuthProvider.kt b/src/main/kotlin/io/appwrite/enums/OAuthProvider.kt index dc1b9b3..b0cff85 100644 --- a/src/main/kotlin/io/appwrite/enums/OAuthProvider.kt +++ b/src/main/kotlin/io/appwrite/enums/OAuthProvider.kt @@ -31,6 +31,8 @@ enum class OAuthProvider(val value: String) { ETSY("etsy"), @SerializedName("facebook") FACEBOOK("facebook"), + @SerializedName("figma") + FIGMA("figma"), @SerializedName("github") GITHUB("github"), @SerializedName("gitlab") diff --git a/src/main/kotlin/io/appwrite/services/Account.kt b/src/main/kotlin/io/appwrite/services/Account.kt index a06e99f..e631719 100644 --- a/src/main/kotlin/io/appwrite/services/Account.kt +++ b/src/main/kotlin/io/appwrite/services/Account.kt @@ -14,8 +14,6 @@ import java.io.File class Account(client: Client) : Service(client) { /** - * Get account - * * Get the currently logged in user. * * @return [io.appwrite.models.User<T>] @@ -29,7 +27,6 @@ class Account(client: Client) : Service(client) { val apiParams = mutableMapOf<String, Any?>( ) val apiHeaders = mutableMapOf( - "content-type" to "application/json", ) val converter: (Any) -> io.appwrite.models.User<T> = { io.appwrite.models.User.from(map = it as Map<String, Any>, nestedType) @@ -45,8 +42,6 @@ class Account(client: Client) : Service(client) { } /** - * Get account - * * Get the currently logged in user. * * @return [io.appwrite.models.User<T>] @@ -58,8 +53,6 @@ class Account(client: Client) : Service(client) { ) /** - * Create account - * * Use this endpoint to allow a new user to register a new account in your project. After the user registration completes successfully, you can use the [/account/verfication](https://appwrite.io/docs/references/cloud/client-web/account#createVerification) route to start verifying the user email address. To allow the new user to login to their new account, you need to create a new [account session](https://appwrite.io/docs/references/cloud/client-web/account#createEmailSession). * * @param userId User ID. Choose a custom ID or generate a random ID with `ID.unique()`. Valid chars are a-z, A-Z, 0-9, period, hyphen, and underscore. Can't start with a special char. Max length is 36 chars. @@ -102,8 +95,6 @@ class Account(client: Client) : Service(client) { } /** - * Create account - * * Use this endpoint to allow a new user to register a new account in your project. After the user registration completes successfully, you can use the [/account/verfication](https://appwrite.io/docs/references/cloud/client-web/account#createVerification) route to start verifying the user email address. To allow the new user to login to their new account, you need to create a new [account session](https://appwrite.io/docs/references/cloud/client-web/account#createEmailSession). * * @param userId User ID. Choose a custom ID or generate a random ID with `ID.unique()`. Valid chars are a-z, A-Z, 0-9, period, hyphen, and underscore. Can't start with a special char. Max length is 36 chars. @@ -128,8 +119,6 @@ class Account(client: Client) : Service(client) { ) /** - * Update email - * * Update currently logged in user account email address. After changing user address, the user confirmation status will get reset. A new confirmation email is not sent automatically however you can use the send confirmation email endpoint again to send the confirmation email. For security measures, user password is required to complete this request.This endpoint can also be used to convert an anonymous account to a normal one, by passing an email address and a new password. * * @param email User email. @@ -165,8 +154,6 @@ class Account(client: Client) : Service(client) { } /** - * Update email - * * Update currently logged in user account email address. After changing user address, the user confirmation status will get reset. A new confirmation email is not sent automatically however you can use the send confirmation email endpoint again to send the confirmation email. For security measures, user password is required to complete this request.This endpoint can also be used to convert an anonymous account to a normal one, by passing an email address and a new password. * * @param email User email. @@ -184,8 +171,6 @@ class Account(client: Client) : Service(client) { ) /** - * List identities - * * Get the list of identities for the currently logged in user. * * @param queries Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https://appwrite.io/docs/queries). Maximum of 100 queries are allowed, each 4096 characters long. You may filter on the following attributes: userId, provider, providerUid, providerEmail, providerAccessTokenExpiry @@ -202,7 +187,6 @@ class Account(client: Client) : Service(client) { "queries" to queries, ) val apiHeaders = mutableMapOf( - "content-type" to "application/json", ) val converter: (Any) -> io.appwrite.models.IdentityList = { io.appwrite.models.IdentityList.from(map = it as Map<String, Any>) @@ -218,8 +202,6 @@ class Account(client: Client) : Service(client) { } /** - * Delete identity - * * Delete an identity by its unique ID. * * @param identityId Identity ID. @@ -247,8 +229,6 @@ class Account(client: Client) : Service(client) { } /** - * Create JWT - * * Use this endpoint to create a JSON Web Token. You can use the resulting JWT to authenticate on behalf of the current user when working with the Appwrite server-side API and SDKs. The JWT secret is valid for 15 minutes from its creation and will be invalid if the user will logout in that time frame. * * @return [io.appwrite.models.Jwt] @@ -277,8 +257,6 @@ class Account(client: Client) : Service(client) { } /** - * List logs - * * Get the list of latest security activity logs for the currently logged in user. Each log returns user IP address, location and date and time of log. * * @param queries Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https://appwrite.io/docs/queries). Only supported methods are limit and offset @@ -295,7 +273,6 @@ class Account(client: Client) : Service(client) { "queries" to queries, ) val apiHeaders = mutableMapOf( - "content-type" to "application/json", ) val converter: (Any) -> io.appwrite.models.LogList = { io.appwrite.models.LogList.from(map = it as Map<String, Any>) @@ -311,8 +288,6 @@ class Account(client: Client) : Service(client) { } /** - * Update MFA - * * Enable or disable MFA on an account. * * @param mfa Enable or disable MFA. @@ -345,8 +320,6 @@ class Account(client: Client) : Service(client) { } /** - * Update MFA - * * Enable or disable MFA on an account. * * @param mfa Enable or disable MFA. @@ -361,8 +334,6 @@ class Account(client: Client) : Service(client) { ) /** - * Create authenticator - * * Add an authenticator app to be used as an MFA factor. Verify the authenticator using the [verify authenticator](/docs/references/cloud/client-web/account#updateMfaAuthenticator) method. * * @param type Type of authenticator. Must be `totp` @@ -394,8 +365,6 @@ class Account(client: Client) : Service(client) { } /** - * Verify authenticator - * * Verify an authenticator app after adding it using the [add authenticator](/docs/references/cloud/client-web/account#createMfaAuthenticator) method. * * @param type Type of authenticator. @@ -431,8 +400,6 @@ class Account(client: Client) : Service(client) { } /** - * Verify authenticator - * * Verify an authenticator app after adding it using the [add authenticator](/docs/references/cloud/client-web/account#createMfaAuthenticator) method. * * @param type Type of authenticator. @@ -450,8 +417,6 @@ class Account(client: Client) : Service(client) { ) /** - * Delete authenticator - * * Delete an authenticator for a user by ID. * * @param type Type of authenticator. @@ -479,8 +444,6 @@ class Account(client: Client) : Service(client) { } /** - * Create MFA challenge - * * Begin the process of MFA verification after sign-in. Finish the flow with [updateMfaChallenge](/docs/references/cloud/client-web/account#updateMfaChallenge) method. * * @param factor Factor used for verification. Must be one of following: `email`, `phone`, `totp`, `recoveryCode`. @@ -512,8 +475,6 @@ class Account(client: Client) : Service(client) { } /** - * Create MFA challenge (confirmation) - * * Complete the MFA challenge by providing the one-time password. Finish the process of MFA verification by providing the one-time password. To begin the flow, use [createMfaChallenge](/docs/references/cloud/client-web/account#createMfaChallenge) method. * * @param challengeId ID of the challenge. @@ -548,8 +509,6 @@ class Account(client: Client) : Service(client) { } /** - * List factors - * * List the factors available on the account to be used as a MFA challange. * * @return [io.appwrite.models.MfaFactors] @@ -562,7 +521,6 @@ class Account(client: Client) : Service(client) { val apiParams = mutableMapOf<String, Any?>( ) val apiHeaders = mutableMapOf( - "content-type" to "application/json", ) val converter: (Any) -> io.appwrite.models.MfaFactors = { io.appwrite.models.MfaFactors.from(map = it as Map<String, Any>) @@ -578,8 +536,6 @@ class Account(client: Client) : Service(client) { } /** - * Get MFA recovery codes - * * Get recovery codes that can be used as backup for MFA flow. Before getting codes, they must be generated using [createMfaRecoveryCodes](/docs/references/cloud/client-web/account#createMfaRecoveryCodes) method. An OTP challenge is required to read recovery codes. * * @return [io.appwrite.models.MfaRecoveryCodes] @@ -592,7 +548,6 @@ class Account(client: Client) : Service(client) { val apiParams = mutableMapOf<String, Any?>( ) val apiHeaders = mutableMapOf( - "content-type" to "application/json", ) val converter: (Any) -> io.appwrite.models.MfaRecoveryCodes = { io.appwrite.models.MfaRecoveryCodes.from(map = it as Map<String, Any>) @@ -608,8 +563,6 @@ class Account(client: Client) : Service(client) { } /** - * Create MFA recovery codes - * * Generate recovery codes as backup for MFA flow. It's recommended to generate and show then immediately after user successfully adds their authehticator. Recovery codes can be used as a MFA verification type in [createMfaChallenge](/docs/references/cloud/client-web/account#createMfaChallenge) method. * * @return [io.appwrite.models.MfaRecoveryCodes] @@ -638,8 +591,6 @@ class Account(client: Client) : Service(client) { } /** - * Regenerate MFA recovery codes - * * Regenerate recovery codes that can be used as backup for MFA flow. Before regenerating codes, they must be first generated using [createMfaRecoveryCodes](/docs/references/cloud/client-web/account#createMfaRecoveryCodes) method. An OTP challenge is required to regenreate recovery codes. * * @return [io.appwrite.models.MfaRecoveryCodes] @@ -668,8 +619,6 @@ class Account(client: Client) : Service(client) { } /** - * Update name - * * Update currently logged in user account name. * * @param name User name. Max length: 128 chars. @@ -702,8 +651,6 @@ class Account(client: Client) : Service(client) { } /** - * Update name - * * Update currently logged in user account name. * * @param name User name. Max length: 128 chars. @@ -718,8 +665,6 @@ class Account(client: Client) : Service(client) { ) /** - * Update password - * * Update currently logged in user password. For validation, user is required to pass in the new password, and the old password. For users created with OAuth, Team Invites and Magic URL, oldPassword is optional. * * @param password New user password. Must be at least 8 chars. @@ -756,8 +701,6 @@ class Account(client: Client) : Service(client) { } /** - * Update password - * * Update currently logged in user password. For validation, user is required to pass in the new password, and the old password. For users created with OAuth, Team Invites and Magic URL, oldPassword is optional. * * @param password New user password. Must be at least 8 chars. @@ -776,8 +719,6 @@ class Account(client: Client) : Service(client) { ) /** - * Update phone - * * Update the currently logged in user's phone number. After updating the phone number, the phone verification status will be reset. A confirmation SMS is not sent automatically, however you can use the [POST /account/verification/phone](https://appwrite.io/docs/references/cloud/client-web/account#createPhoneVerification) endpoint to send a confirmation SMS. * * @param phone Phone number. Format this number with a leading '+' and a country code, e.g., +16175551212. @@ -813,8 +754,6 @@ class Account(client: Client) : Service(client) { } /** - * Update phone - * * Update the currently logged in user's phone number. After updating the phone number, the phone verification status will be reset. A confirmation SMS is not sent automatically, however you can use the [POST /account/verification/phone](https://appwrite.io/docs/references/cloud/client-web/account#createPhoneVerification) endpoint to send a confirmation SMS. * * @param phone Phone number. Format this number with a leading '+' and a country code, e.g., +16175551212. @@ -832,8 +771,6 @@ class Account(client: Client) : Service(client) { ) /** - * Get account preferences - * * Get the preferences as a key-value object for the currently logged in user. * * @return [io.appwrite.models.Preferences<T>] @@ -847,7 +784,6 @@ class Account(client: Client) : Service(client) { val apiParams = mutableMapOf<String, Any?>( ) val apiHeaders = mutableMapOf( - "content-type" to "application/json", ) val converter: (Any) -> io.appwrite.models.Preferences<T> = { io.appwrite.models.Preferences.from(map = it as Map<String, Any>, nestedType) @@ -863,8 +799,6 @@ class Account(client: Client) : Service(client) { } /** - * Get account preferences - * * Get the preferences as a key-value object for the currently logged in user. * * @return [io.appwrite.models.Preferences<T>] @@ -876,8 +810,6 @@ class Account(client: Client) : Service(client) { ) /** - * Update preferences - * * Update currently logged in user account preferences. The object you pass is stored as is, and replaces any previous value. The maximum allowed prefs size is 64kB and throws error if exceeded. * * @param prefs Prefs key-value JSON object. @@ -910,8 +842,6 @@ class Account(client: Client) : Service(client) { } /** - * Update preferences - * * Update currently logged in user account preferences. The object you pass is stored as is, and replaces any previous value. The maximum allowed prefs size is 64kB and throws error if exceeded. * * @param prefs Prefs key-value JSON object. @@ -926,8 +856,6 @@ class Account(client: Client) : Service(client) { ) /** - * Create password recovery - * * Sends the user an email with a temporary secret key for password reset. When the user clicks the confirmation link he is redirected back to your app password reset URL with the secret key and email address values attached to the URL query string. Use the query string params to submit a request to the [PUT /account/recovery](https://appwrite.io/docs/references/cloud/client-web/account#updateRecovery) endpoint to complete the process. The verification link sent to the user's email address is valid for 1 hour. * * @param email User email. @@ -962,8 +890,6 @@ class Account(client: Client) : Service(client) { } /** - * Create password recovery (confirmation) - * * Use this endpoint to complete the user account password reset. Both the **userId** and **secret** arguments will be passed as query parameters to the redirect URL you have provided when sending your request to the [POST /account/recovery](https://appwrite.io/docs/references/cloud/client-web/account#createRecovery) endpoint.Please note that in order to avoid a [Redirect Attack](https://github.com/OWASP/CheatSheetSeries/blob/master/cheatsheets/Unvalidated_Redirects_and_Forwards_Cheat_Sheet.md) the only valid redirect URLs are the ones from domains you have set when adding your platforms in the console interface. * * @param userId User ID. @@ -1001,8 +927,6 @@ class Account(client: Client) : Service(client) { } /** - * List sessions - * * Get the list of active sessions across different devices for the currently logged in user. * * @return [io.appwrite.models.SessionList] @@ -1015,7 +939,6 @@ class Account(client: Client) : Service(client) { val apiParams = mutableMapOf<String, Any?>( ) val apiHeaders = mutableMapOf( - "content-type" to "application/json", ) val converter: (Any) -> io.appwrite.models.SessionList = { io.appwrite.models.SessionList.from(map = it as Map<String, Any>) @@ -1031,8 +954,6 @@ class Account(client: Client) : Service(client) { } /** - * Delete sessions - * * Delete all sessions from the user account and remove any sessions cookies from the end client. * * @return [Any] @@ -1057,8 +978,6 @@ class Account(client: Client) : Service(client) { } /** - * Create anonymous session - * * Use this endpoint to allow a new user to register an anonymous account in your project. This route will also create a new session for the user. To allow the new user to convert an anonymous account to a normal account, you need to update its [email and password](https://appwrite.io/docs/references/cloud/client-web/account#updateEmail) or create an [OAuth2 session](https://appwrite.io/docs/references/cloud/client-web/account#CreateOAuth2Session). * * @return [io.appwrite.models.Session] @@ -1087,8 +1006,6 @@ class Account(client: Client) : Service(client) { } /** - * Create email password session - * * Allow the user to login into their account by providing a valid email and password combination. This route will create a new session for the user.A user is limited to 10 active sessions at a time by default. [Learn more about session limits](https://appwrite.io/docs/authentication-security#limits). * * @param email User email. @@ -1123,8 +1040,6 @@ class Account(client: Client) : Service(client) { } /** - * Update magic URL session - * * Use this endpoint to create a session from token. Provide the **userId** and **secret** parameters from the successful response of authentication flows initiated by token creation. For example, magic URL and phone login. * * @param userId User ID. Choose a custom ID or generate a random ID with `ID.unique()`. Valid chars are a-z, A-Z, 0-9, period, hyphen, and underscore. Can't start with a special char. Max length is 36 chars. @@ -1159,8 +1074,6 @@ class Account(client: Client) : Service(client) { } /** - * Update phone session - * * Use this endpoint to create a session from token. Provide the **userId** and **secret** parameters from the successful response of authentication flows initiated by token creation. For example, magic URL and phone login. * * @param userId User ID. Choose a custom ID or generate a random ID with `ID.unique()`. Valid chars are a-z, A-Z, 0-9, period, hyphen, and underscore. Can't start with a special char. Max length is 36 chars. @@ -1195,8 +1108,6 @@ class Account(client: Client) : Service(client) { } /** - * Create session - * * Use this endpoint to create a session from token. Provide the **userId** and **secret** parameters from the successful response of authentication flows initiated by token creation. For example, magic URL and phone login. * * @param userId User ID. Choose a custom ID or generate a random ID with `ID.unique()`. Valid chars are a-z, A-Z, 0-9, period, hyphen, and underscore. Can't start with a special char. Max length is 36 chars. @@ -1231,8 +1142,6 @@ class Account(client: Client) : Service(client) { } /** - * Get session - * * Use this endpoint to get a logged in user's session using a Session ID. Inputting 'current' will return the current session being used. * * @param sessionId Session ID. Use the string 'current' to get the current device session. @@ -1248,7 +1157,6 @@ class Account(client: Client) : Service(client) { val apiParams = mutableMapOf<String, Any?>( ) val apiHeaders = mutableMapOf( - "content-type" to "application/json", ) val converter: (Any) -> io.appwrite.models.Session = { io.appwrite.models.Session.from(map = it as Map<String, Any>) @@ -1264,8 +1172,6 @@ class Account(client: Client) : Service(client) { } /** - * Update session - * * Use this endpoint to extend a session's length. Extending a session is useful when session expiry is short. If the session was created using an OAuth provider, this endpoint refreshes the access token from the provider. * * @param sessionId Session ID. Use the string 'current' to update the current device session. @@ -1297,8 +1203,6 @@ class Account(client: Client) : Service(client) { } /** - * Delete session - * * Logout the user. Use 'current' as the session ID to logout on this device, use a session ID to logout on another device. If you're looking to logout the user on all devices, use [Delete Sessions](https://appwrite.io/docs/references/cloud/client-web/account#deleteSessions) instead. * * @param sessionId Session ID. Use the string 'current' to delete the current device session. @@ -1326,8 +1230,6 @@ class Account(client: Client) : Service(client) { } /** - * Update status - * * Block the currently logged in user account. Behind the scene, the user record is not deleted but permanently blocked from any access. To completely delete a user, use the Users API instead. * * @return [io.appwrite.models.User<T>] @@ -1357,8 +1259,6 @@ class Account(client: Client) : Service(client) { } /** - * Update status - * * Block the currently logged in user account. Behind the scene, the user record is not deleted but permanently blocked from any access. To completely delete a user, use the Users API instead. * * @return [io.appwrite.models.User<T>] @@ -1370,8 +1270,6 @@ class Account(client: Client) : Service(client) { ) /** - * Create email token (OTP) - * * Sends the user an email with a secret key for creating a session. If the provided user ID has not be registered, a new user will be created. Use the returned user ID and secret and submit a request to the [POST /v1/account/sessions/token](https://appwrite.io/docs/references/cloud/client-web/account#createSession) endpoint to complete the login process. The secret sent to the user's email is valid for 15 minutes.A user is limited to 10 active sessions at a time by default. [Learn more about session limits](https://appwrite.io/docs/authentication-security#limits). * * @param userId User ID. Choose a custom ID or generate a random ID with `ID.unique()`. Valid chars are a-z, A-Z, 0-9, period, hyphen, and underscore. Can't start with a special char. Max length is 36 chars. @@ -1410,8 +1308,6 @@ class Account(client: Client) : Service(client) { } /** - * Create magic URL token - * * Sends the user an email with a secret key for creating a session. If the provided user ID has not been registered, a new user will be created. When the user clicks the link in the email, the user is redirected back to the URL you provided with the secret key and userId values attached to the URL query string. Use the query string parameters to submit a request to the [POST /v1/account/sessions/token](https://appwrite.io/docs/references/cloud/client-web/account#createSession) endpoint to complete the login process. The link sent to the user's email address is valid for 1 hour.A user is limited to 10 active sessions at a time by default. [Learn more about session limits](https://appwrite.io/docs/authentication-security#limits). * * @param userId 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. @@ -1453,11 +1349,9 @@ class Account(client: Client) : Service(client) { } /** - * Create OAuth2 token - * * Allow the user to login to their account using the OAuth2 provider of their choice. Each OAuth2 provider should be enabled from the Appwrite console first. Use the success and failure arguments to provide a redirect URL's back to your app when login is completed. If authentication succeeds, `userId` and `secret` of a token will be appended to the success URL as query parameters. These can be used to create a new session using the [Create session](https://appwrite.io/docs/references/cloud/client-web/account#createSession) endpoint.A user is limited to 10 active sessions at a time by default. [Learn more about session limits](https://appwrite.io/docs/authentication-security#limits). * - * @param provider OAuth2 Provider. Currently, supported providers are: amazon, apple, auth0, authentik, autodesk, bitbucket, bitly, box, dailymotion, discord, disqus, dropbox, etsy, facebook, github, gitlab, google, linkedin, microsoft, notion, oidc, okta, paypal, paypalSandbox, podio, salesforce, slack, spotify, stripe, tradeshift, tradeshiftBox, twitch, wordpress, yahoo, yammer, yandex, zoho, zoom. + * @param provider 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. * @param success 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. * @param failure 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. * @param scopes 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. @@ -1480,7 +1374,6 @@ class Account(client: Client) : Service(client) { "scopes" to scopes, ) val apiHeaders = mutableMapOf( - "content-type" to "application/json", ) return client.redirect( "GET", @@ -1491,8 +1384,6 @@ class Account(client: Client) : Service(client) { } /** - * Create phone token - * * Sends the user an SMS with a secret key for creating a session. If the provided user ID has not be registered, a new user will be created. Use the returned user ID and secret and submit a request to the [POST /v1/account/sessions/token](https://appwrite.io/docs/references/cloud/client-web/account#createSession) endpoint to complete the login process. The secret sent to the user's phone is valid for 15 minutes.A user is limited to 10 active sessions at a time by default. [Learn more about session limits](https://appwrite.io/docs/authentication-security#limits). * * @param userId 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. @@ -1527,8 +1418,6 @@ class Account(client: Client) : Service(client) { } /** - * Create email verification - * * Use this endpoint to send a verification message to your user email address to confirm they are the valid owners of that address. Both the **userId** and **secret** arguments will be passed as query parameters to the URL you have provided to be attached to the verification email. The provided URL should redirect the user back to your app and allow you to complete the verification process by verifying both the **userId** and **secret** parameters. Learn more about how to [complete the verification process](https://appwrite.io/docs/references/cloud/client-web/account#updateVerification). The verification link sent to the user's email address is valid for 7 days.Please note that in order to avoid a [Redirect Attack](https://github.com/OWASP/CheatSheetSeries/blob/master/cheatsheets/Unvalidated_Redirects_and_Forwards_Cheat_Sheet.md), the only valid redirect URLs are the ones from domains you have set when adding your platforms in the console interface. * * @param url URL to redirect the user back to your app from the verification email. Only URLs from hostnames in your project platform list are allowed. This requirement helps to prevent an [open redirect](https://cheatsheetseries.owasp.org/cheatsheets/Unvalidated_Redirects_and_Forwards_Cheat_Sheet.html) attack against your project API. @@ -1560,8 +1449,6 @@ class Account(client: Client) : Service(client) { } /** - * Create email verification (confirmation) - * * Use this endpoint to complete the user email verification process. Use both the **userId** and **secret** parameters that were attached to your app URL to verify the user email ownership. If confirmed this route will return a 200 status code. * * @param userId User ID. @@ -1596,8 +1483,6 @@ class Account(client: Client) : Service(client) { } /** - * Create phone verification - * * Use this endpoint to send a verification SMS to the currently logged in user. This endpoint is meant for use after updating a user's phone number using the [accountUpdatePhone](https://appwrite.io/docs/references/cloud/client-web/account#updatePhone) endpoint. Learn more about how to [complete the verification process](https://appwrite.io/docs/references/cloud/client-web/account#updatePhoneVerification). The verification code sent to the user's phone number is valid for 15 minutes. * * @return [io.appwrite.models.Token] @@ -1626,8 +1511,6 @@ class Account(client: Client) : Service(client) { } /** - * Update phone verification (confirmation) - * * Use this endpoint to complete the user phone verification process. Use the **userId** and **secret** that were sent to your user's phone number to verify the user email ownership. If confirmed this route will return a 200 status code. * * @param userId User ID. diff --git a/src/main/kotlin/io/appwrite/services/Avatars.kt b/src/main/kotlin/io/appwrite/services/Avatars.kt index 46c9d8e..7427e65 100644 --- a/src/main/kotlin/io/appwrite/services/Avatars.kt +++ b/src/main/kotlin/io/appwrite/services/Avatars.kt @@ -16,8 +16,6 @@ import java.io.File class Avatars(client: Client) : Service(client) { /** - * Get browser icon - * * You can use this endpoint to show different browser icons to your users. The code argument receives the browser code as it appears in your user [GET /account/sessions](https://appwrite.io/docs/references/cloud/client-web/account#getSessions) endpoint. Use width, height and quality arguments to change the output settings.When one dimension is specified and the other is 0, the image is scaled with preserved aspect ratio. If both dimensions are 0, the API provides an image at source quality. If dimensions are not specified, the default size of image returned is 100x100px. * * @param code Browser Code. @@ -43,7 +41,6 @@ class Avatars(client: Client) : Service(client) { "quality" to quality, ) val apiHeaders = mutableMapOf( - "content-type" to "application/json", ) return client.call( "GET", @@ -54,11 +51,9 @@ class Avatars(client: Client) : Service(client) { } /** - * Get credit card icon - * * The credit card endpoint will return you the icon of the credit card provider you need. Use width, height and quality arguments to change the output settings.When one dimension is specified and the other is 0, the image is scaled with preserved aspect ratio. If both dimensions are 0, the API provides an image at source quality. If dimensions are not specified, the default size of image returned is 100x100px. * - * @param code Credit Card Code. Possible values: amex, argencard, cabal, cencosud, diners, discover, elo, hipercard, jcb, mastercard, naranja, targeta-shopping, union-china-pay, visa, mir, maestro. + * @param code Credit Card Code. Possible values: amex, argencard, cabal, cencosud, diners, discover, elo, hipercard, jcb, mastercard, naranja, targeta-shopping, union-china-pay, visa, mir, maestro, rupay. * @param width Image width. Pass an integer between 0 to 2000. Defaults to 100. * @param height Image height. Pass an integer between 0 to 2000. Defaults to 100. * @param quality Image quality. Pass an integer between 0 to 100. Defaults to 100. @@ -81,7 +76,6 @@ class Avatars(client: Client) : Service(client) { "quality" to quality, ) val apiHeaders = mutableMapOf( - "content-type" to "application/json", ) return client.call( "GET", @@ -92,8 +86,6 @@ class Avatars(client: Client) : Service(client) { } /** - * Get favicon - * * Use this endpoint to fetch the favorite icon (AKA favicon) of any remote website URL.This endpoint does not follow HTTP redirects. * * @param url Website URL which you want to fetch the favicon from. @@ -109,7 +101,6 @@ class Avatars(client: Client) : Service(client) { "url" to url, ) val apiHeaders = mutableMapOf( - "content-type" to "application/json", ) return client.call( "GET", @@ -120,8 +111,6 @@ class Avatars(client: Client) : Service(client) { } /** - * Get country flag - * * You can use this endpoint to show different country flags icons to your users. The code argument receives the 2 letter country code. Use width, height and quality arguments to change the output settings. Country codes follow the [ISO 3166-1](https://en.wikipedia.org/wiki/ISO_3166-1) standard.When one dimension is specified and the other is 0, the image is scaled with preserved aspect ratio. If both dimensions are 0, the API provides an image at source quality. If dimensions are not specified, the default size of image returned is 100x100px. * * @param code Country Code. ISO Alpha-2 country code format. @@ -147,7 +136,6 @@ class Avatars(client: Client) : Service(client) { "quality" to quality, ) val apiHeaders = mutableMapOf( - "content-type" to "application/json", ) return client.call( "GET", @@ -158,8 +146,6 @@ class Avatars(client: Client) : Service(client) { } /** - * Get image from URL - * * Use this endpoint to fetch a remote image URL and crop it to any image size you want. This endpoint is very useful if you need to crop and display remote images in your app or in case you want to make sure a 3rd party image is properly served using a TLS protocol.When one dimension is specified and the other is 0, the image is scaled with preserved aspect ratio. If both dimensions are 0, the API provides an image at source quality. If dimensions are not specified, the default size of image returned is 400x400px.This endpoint does not follow HTTP redirects. * * @param url Image URL which you want to crop. @@ -182,7 +168,6 @@ class Avatars(client: Client) : Service(client) { "height" to height, ) val apiHeaders = mutableMapOf( - "content-type" to "application/json", ) return client.call( "GET", @@ -193,8 +178,6 @@ class Avatars(client: Client) : Service(client) { } /** - * Get user initials - * * Use this endpoint to show your user initials avatar icon on your website or app. By default, this route will try to print your logged-in user name or email initials. You can also overwrite the user name if you pass the 'name' parameter. If no name is given and no user is logged, an empty avatar will be returned.You can use the color and background params to change the avatar colors. By default, a random theme will be selected. The random theme will persist for the user's initials when reloading the same theme will always return for the same initials.When one dimension is specified and the other is 0, the image is scaled with preserved aspect ratio. If both dimensions are 0, the API provides an image at source quality. If dimensions are not specified, the default size of image returned is 100x100px. * * @param name Full Name. When empty, current user name or email will be used. Max length: 128 chars. @@ -220,7 +203,6 @@ class Avatars(client: Client) : Service(client) { "background" to background, ) val apiHeaders = mutableMapOf( - "content-type" to "application/json", ) return client.call( "GET", @@ -231,8 +213,6 @@ class Avatars(client: Client) : Service(client) { } /** - * Get QR code - * * Converts a given plain text to a QR code image. You can use the query parameters to change the size and style of the resulting image. * * @param text Plain text to be converted to QR code image. @@ -258,7 +238,6 @@ class Avatars(client: Client) : Service(client) { "download" to download, ) val apiHeaders = mutableMapOf( - "content-type" to "application/json", ) return client.call( "GET", diff --git a/src/main/kotlin/io/appwrite/services/Databases.kt b/src/main/kotlin/io/appwrite/services/Databases.kt index 770412a..d24e014 100644 --- a/src/main/kotlin/io/appwrite/services/Databases.kt +++ b/src/main/kotlin/io/appwrite/services/Databases.kt @@ -14,8 +14,6 @@ import java.io.File class Databases(client: Client) : Service(client) { /** - * List databases - * * Get a list of all databases from the current Appwrite project. You can use the search parameter to filter your results. * * @param queries Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https://appwrite.io/docs/queries). Maximum of 100 queries are allowed, each 4096 characters long. You may filter on the following attributes: name @@ -35,7 +33,6 @@ class Databases(client: Client) : Service(client) { "search" to search, ) val apiHeaders = mutableMapOf( - "content-type" to "application/json", ) val converter: (Any) -> io.appwrite.models.DatabaseList = { io.appwrite.models.DatabaseList.from(map = it as Map<String, Any>) @@ -51,8 +48,6 @@ class Databases(client: Client) : Service(client) { } /** - * Create database - * * Create a new Database. * * @param databaseId 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. @@ -91,8 +86,6 @@ class Databases(client: Client) : Service(client) { } /** - * Get database - * * Get a database by its unique ID. This endpoint response returns a JSON object with the database metadata. * * @param databaseId Database ID. @@ -108,7 +101,6 @@ class Databases(client: Client) : Service(client) { val apiParams = mutableMapOf<String, Any?>( ) val apiHeaders = mutableMapOf( - "content-type" to "application/json", ) val converter: (Any) -> io.appwrite.models.Database = { io.appwrite.models.Database.from(map = it as Map<String, Any>) @@ -124,8 +116,6 @@ class Databases(client: Client) : Service(client) { } /** - * Update database - * * Update a database by its unique ID. * * @param databaseId Database ID. @@ -164,8 +154,6 @@ class Databases(client: Client) : Service(client) { } /** - * Delete database - * * Delete a database by its unique ID. Only API keys with with databases.write scope can delete a database. * * @param databaseId Database ID. @@ -193,8 +181,6 @@ class Databases(client: Client) : Service(client) { } /** - * List collections - * * Get a list of all collections that belong to the provided databaseId. You can use the search parameter to filter your results. * * @param databaseId Database ID. @@ -217,7 +203,6 @@ class Databases(client: Client) : Service(client) { "search" to search, ) val apiHeaders = mutableMapOf( - "content-type" to "application/json", ) val converter: (Any) -> io.appwrite.models.CollectionList = { io.appwrite.models.CollectionList.from(map = it as Map<String, Any>) @@ -233,8 +218,6 @@ class Databases(client: Client) : Service(client) { } /** - * Create collection - * * Create a new Collection. Before using this route, you should create a new database resource using either a [server integration](https://appwrite.io/docs/server/databases#databasesCreateCollection) API or directly from your database console. * * @param databaseId Database ID. @@ -282,8 +265,6 @@ class Databases(client: Client) : Service(client) { } /** - * Get collection - * * Get a collection by its unique ID. This endpoint response returns a JSON object with the collection metadata. * * @param databaseId Database ID. @@ -302,7 +283,6 @@ class Databases(client: Client) : Service(client) { val apiParams = mutableMapOf<String, Any?>( ) val apiHeaders = mutableMapOf( - "content-type" to "application/json", ) val converter: (Any) -> io.appwrite.models.Collection = { io.appwrite.models.Collection.from(map = it as Map<String, Any>) @@ -318,8 +298,6 @@ class Databases(client: Client) : Service(client) { } /** - * Update collection - * * Update a collection by its unique ID. * * @param databaseId Database ID. @@ -367,8 +345,6 @@ class Databases(client: Client) : Service(client) { } /** - * Delete collection - * * Delete a collection by its unique ID. Only users with write permissions have access to delete this resource. * * @param databaseId Database ID. @@ -399,8 +375,6 @@ class Databases(client: Client) : Service(client) { } /** - * List attributes - * * List attributes in the collection. * * @param databaseId Database ID. @@ -423,7 +397,6 @@ class Databases(client: Client) : Service(client) { "queries" to queries, ) val apiHeaders = mutableMapOf( - "content-type" to "application/json", ) val converter: (Any) -> io.appwrite.models.AttributeList = { io.appwrite.models.AttributeList.from(map = it as Map<String, Any>) @@ -439,8 +412,6 @@ class Databases(client: Client) : Service(client) { } /** - * Create boolean attribute - * * Create a boolean attribute. * * @param databaseId Database ID. @@ -488,8 +459,6 @@ class Databases(client: Client) : Service(client) { } /** - * Update boolean attribute - * * Update a boolean attribute. Changing the `default` value will not update already existing documents. * * @param databaseId Database ID. @@ -537,8 +506,6 @@ class Databases(client: Client) : Service(client) { } /** - * Create datetime attribute - * * Create a date time attribute according to the ISO 8601 standard. * * @param databaseId Database ID. @@ -586,8 +553,6 @@ class Databases(client: Client) : Service(client) { } /** - * Update dateTime attribute - * * Update a date time attribute. Changing the `default` value will not update already existing documents. * * @param databaseId Database ID. @@ -635,8 +600,6 @@ class Databases(client: Client) : Service(client) { } /** - * Create email attribute - * * Create an email attribute. * * @param databaseId Database ID. @@ -684,8 +647,6 @@ class Databases(client: Client) : Service(client) { } /** - * Update email attribute - * * Update an email attribute. Changing the `default` value will not update already existing documents. * * @param databaseId Database ID. @@ -733,8 +694,6 @@ class Databases(client: Client) : Service(client) { } /** - * Create enum attribute - * * Create an enumeration attribute. The `elements` param acts as a white-list of accepted values for this attribute. * * @param databaseId Database ID. @@ -785,8 +744,6 @@ class Databases(client: Client) : Service(client) { } /** - * Update enum attribute - * * Update an enum attribute. Changing the `default` value will not update already existing documents. * * @param databaseId Database ID. @@ -837,8 +794,6 @@ class Databases(client: Client) : Service(client) { } /** - * Create float attribute - * * Create a float attribute. Optionally, minimum and maximum values can be provided. * * @param databaseId Database ID. @@ -892,17 +847,15 @@ class Databases(client: Client) : Service(client) { } /** - * Update float attribute - * * Update a float attribute. Changing the `default` value will not update already existing documents. * * @param databaseId Database ID. * @param collectionId Collection ID. You can create a new collection using the Database service [server integration](https://appwrite.io/docs/server/databases#databasesCreateCollection). * @param key Attribute Key. * @param required Is attribute required? + * @param default Default value for attribute when not provided. Cannot be set when attribute is required. * @param min Minimum value to enforce on new documents * @param max Maximum value to enforce on new documents - * @param default Default value for attribute when not provided. Cannot be set when attribute is required. * @param newKey New attribute key. * @return [io.appwrite.models.AttributeFloat] */ @@ -913,9 +866,9 @@ class Databases(client: Client) : Service(client) { collectionId: String, key: String, required: Boolean, - min: Double, - max: Double, default: Double? = null, + min: Double? = null, + max: Double? = null, newKey: String? = null, ): io.appwrite.models.AttributeFloat { val apiPath = "/databases/{databaseId}/collections/{collectionId}/attributes/float/{key}" @@ -947,8 +900,6 @@ class Databases(client: Client) : Service(client) { } /** - * Create integer attribute - * * Create an integer attribute. Optionally, minimum and maximum values can be provided. * * @param databaseId Database ID. @@ -1002,17 +953,15 @@ class Databases(client: Client) : Service(client) { } /** - * Update integer attribute - * * Update an integer attribute. Changing the `default` value will not update already existing documents. * * @param databaseId Database ID. * @param collectionId Collection ID. You can create a new collection using the Database service [server integration](https://appwrite.io/docs/server/databases#databasesCreateCollection). * @param key Attribute Key. * @param required Is attribute required? + * @param default Default value for attribute when not provided. Cannot be set when attribute is required. * @param min Minimum value to enforce on new documents * @param max Maximum value to enforce on new documents - * @param default Default value for attribute when not provided. Cannot be set when attribute is required. * @param newKey New attribute key. * @return [io.appwrite.models.AttributeInteger] */ @@ -1023,9 +972,9 @@ class Databases(client: Client) : Service(client) { collectionId: String, key: String, required: Boolean, - min: Long, - max: Long, default: Long? = null, + min: Long? = null, + max: Long? = null, newKey: String? = null, ): io.appwrite.models.AttributeInteger { val apiPath = "/databases/{databaseId}/collections/{collectionId}/attributes/integer/{key}" @@ -1057,8 +1006,6 @@ class Databases(client: Client) : Service(client) { } /** - * Create IP address attribute - * * Create IP address attribute. * * @param databaseId Database ID. @@ -1106,8 +1053,6 @@ class Databases(client: Client) : Service(client) { } /** - * Update IP address attribute - * * Update an ip attribute. Changing the `default` value will not update already existing documents. * * @param databaseId Database ID. @@ -1155,8 +1100,6 @@ class Databases(client: Client) : Service(client) { } /** - * Create relationship attribute - * * Create relationship attribute. [Learn more about relationship attributes](https://appwrite.io/docs/databases-relationships#relationship-attributes). * * @param databaseId Database ID. @@ -1210,8 +1153,6 @@ class Databases(client: Client) : Service(client) { } /** - * Create string attribute - * * Create a string attribute. * * @param databaseId Database ID. @@ -1265,8 +1206,6 @@ class Databases(client: Client) : Service(client) { } /** - * Update string attribute - * * Update a string attribute. Changing the `default` value will not update already existing documents. * * @param databaseId Database ID. @@ -1317,8 +1256,6 @@ class Databases(client: Client) : Service(client) { } /** - * Create URL attribute - * * Create a URL attribute. * * @param databaseId Database ID. @@ -1366,8 +1303,6 @@ class Databases(client: Client) : Service(client) { } /** - * Update URL attribute - * * Update an url attribute. Changing the `default` value will not update already existing documents. * * @param databaseId Database ID. @@ -1415,8 +1350,6 @@ class Databases(client: Client) : Service(client) { } /** - * Get attribute - * * Get attribute by ID. * * @param databaseId Database ID. @@ -1438,7 +1371,6 @@ class Databases(client: Client) : Service(client) { val apiParams = mutableMapOf<String, Any?>( ) val apiHeaders = mutableMapOf( - "content-type" to "application/json", ) return client.call( "GET", @@ -1450,8 +1382,6 @@ class Databases(client: Client) : Service(client) { } /** - * Delete attribute - * * Deletes an attribute. * * @param databaseId Database ID. @@ -1485,8 +1415,6 @@ class Databases(client: Client) : Service(client) { } /** - * Update relationship attribute - * * Update relationship attribute. [Learn more about relationship attributes](https://appwrite.io/docs/databases-relationships#relationship-attributes). * * @param databaseId Database ID. @@ -1531,8 +1459,6 @@ class Databases(client: Client) : Service(client) { } /** - * List documents - * * Get a list of all the user's documents in a given collection. You can use the query params to filter your results. * * @param databaseId Database ID. @@ -1556,7 +1482,6 @@ class Databases(client: Client) : Service(client) { "queries" to queries, ) val apiHeaders = mutableMapOf( - "content-type" to "application/json", ) val converter: (Any) -> io.appwrite.models.DocumentList<T> = { io.appwrite.models.DocumentList.from(map = it as Map<String, Any>, nestedType) @@ -1572,8 +1497,6 @@ class Databases(client: Client) : Service(client) { } /** - * List documents - * * Get a list of all the user's documents in a given collection. You can use the query params to filter your results. * * @param databaseId Database ID. @@ -1595,8 +1518,6 @@ class Databases(client: Client) : Service(client) { ) /** - * Create document - * * Create a new Document. Before using this route, you should create a new collection resource using either a [server integration](https://appwrite.io/docs/server/databases#databasesCreateCollection) API or directly from your database console. * * @param databaseId Database ID. @@ -1642,8 +1563,6 @@ class Databases(client: Client) : Service(client) { } /** - * Create document - * * Create a new Document. Before using this route, you should create a new collection resource using either a [server integration](https://appwrite.io/docs/server/databases#databasesCreateCollection) API or directly from your database console. * * @param databaseId Database ID. @@ -1671,8 +1590,6 @@ class Databases(client: Client) : Service(client) { ) /** - * Get document - * * Get a document by its unique ID. This endpoint response returns a JSON object with the document data. * * @param databaseId Database ID. @@ -1699,7 +1616,6 @@ class Databases(client: Client) : Service(client) { "queries" to queries, ) val apiHeaders = mutableMapOf( - "content-type" to "application/json", ) val converter: (Any) -> io.appwrite.models.Document<T> = { io.appwrite.models.Document.from(map = it as Map<String, Any>, nestedType) @@ -1715,8 +1631,6 @@ class Databases(client: Client) : Service(client) { } /** - * Get document - * * Get a document by its unique ID. This endpoint response returns a JSON object with the document data. * * @param databaseId Database ID. @@ -1741,8 +1655,6 @@ class Databases(client: Client) : Service(client) { ) /** - * Update document - * * Update a document by its unique ID. Using the patch method you can pass only specific fields that will get updated. * * @param databaseId Database ID. @@ -1788,8 +1700,6 @@ class Databases(client: Client) : Service(client) { } /** - * Update document - * * Update a document by its unique ID. Using the patch method you can pass only specific fields that will get updated. * * @param databaseId Database ID. @@ -1817,8 +1727,6 @@ class Databases(client: Client) : Service(client) { ) /** - * Delete document - * * Delete a document by its unique ID. * * @param databaseId Database ID. @@ -1852,8 +1760,6 @@ class Databases(client: Client) : Service(client) { } /** - * List indexes - * * List indexes in the collection. * * @param databaseId Database ID. @@ -1876,7 +1782,6 @@ class Databases(client: Client) : Service(client) { "queries" to queries, ) val apiHeaders = mutableMapOf( - "content-type" to "application/json", ) val converter: (Any) -> io.appwrite.models.IndexList = { io.appwrite.models.IndexList.from(map = it as Map<String, Any>) @@ -1892,8 +1797,6 @@ class Databases(client: Client) : Service(client) { } /** - * Create index - * * Creates an index on the attributes listed. Your index should include all the attributes you will query in a single request.Attributes can be `key`, `fulltext`, and `unique`. * * @param databaseId Database ID. @@ -1941,8 +1844,6 @@ class Databases(client: Client) : Service(client) { } /** - * Get index - * * Get index by ID. * * @param databaseId Database ID. @@ -1964,7 +1865,6 @@ class Databases(client: Client) : Service(client) { val apiParams = mutableMapOf<String, Any?>( ) val apiHeaders = mutableMapOf( - "content-type" to "application/json", ) val converter: (Any) -> io.appwrite.models.Index = { io.appwrite.models.Index.from(map = it as Map<String, Any>) @@ -1980,8 +1880,6 @@ class Databases(client: Client) : Service(client) { } /** - * Delete index - * * Delete an index. * * @param databaseId Database ID. diff --git a/src/main/kotlin/io/appwrite/services/Functions.kt b/src/main/kotlin/io/appwrite/services/Functions.kt index df94e53..e445cbe 100644 --- a/src/main/kotlin/io/appwrite/services/Functions.kt +++ b/src/main/kotlin/io/appwrite/services/Functions.kt @@ -16,8 +16,6 @@ import java.io.File class Functions(client: Client) : Service(client) { /** - * List functions - * * Get a list of all the project's functions. You can use the query params to filter your results. * * @param queries Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https://appwrite.io/docs/queries). Maximum of 100 queries are allowed, each 4096 characters long. You may filter on the following attributes: name, enabled, runtime, deployment, schedule, scheduleNext, schedulePrevious, timeout, entrypoint, commands, installationId @@ -37,7 +35,6 @@ class Functions(client: Client) : Service(client) { "search" to search, ) val apiHeaders = mutableMapOf( - "content-type" to "application/json", ) val converter: (Any) -> io.appwrite.models.FunctionList = { io.appwrite.models.FunctionList.from(map = it as Map<String, Any>) @@ -53,8 +50,6 @@ class Functions(client: Client) : Service(client) { } /** - * Create function - * * Create a new function. You can pass a list of [permissions](https://appwrite.io/docs/permissions) to allow different project users or team with access to execute the function using the client API. * * @param functionId Function 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. @@ -150,8 +145,6 @@ class Functions(client: Client) : Service(client) { } /** - * List runtimes - * * Get a list of all runtimes that are currently active on your instance. * * @return [io.appwrite.models.RuntimeList] @@ -164,7 +157,6 @@ class Functions(client: Client) : Service(client) { val apiParams = mutableMapOf<String, Any?>( ) val apiHeaders = mutableMapOf( - "content-type" to "application/json", ) val converter: (Any) -> io.appwrite.models.RuntimeList = { io.appwrite.models.RuntimeList.from(map = it as Map<String, Any>) @@ -180,8 +172,6 @@ class Functions(client: Client) : Service(client) { } /** - * List available function runtime specifications - * * List allowed function specifications for this instance. * * @return [io.appwrite.models.SpecificationList] @@ -194,7 +184,6 @@ class Functions(client: Client) : Service(client) { val apiParams = mutableMapOf<String, Any?>( ) val apiHeaders = mutableMapOf( - "content-type" to "application/json", ) val converter: (Any) -> io.appwrite.models.SpecificationList = { io.appwrite.models.SpecificationList.from(map = it as Map<String, Any>) @@ -210,8 +199,6 @@ class Functions(client: Client) : Service(client) { } /** - * Get function - * * Get a function by its unique ID. * * @param functionId Function ID. @@ -227,7 +214,6 @@ class Functions(client: Client) : Service(client) { val apiParams = mutableMapOf<String, Any?>( ) val apiHeaders = mutableMapOf( - "content-type" to "application/json", ) val converter: (Any) -> io.appwrite.models.Function = { io.appwrite.models.Function.from(map = it as Map<String, Any>) @@ -243,8 +229,6 @@ class Functions(client: Client) : Service(client) { } /** - * Update function - * * Update function by its unique ID. * * @param functionId Function ID. @@ -328,8 +312,6 @@ class Functions(client: Client) : Service(client) { } /** - * Delete function - * * Delete a function by its unique ID. * * @param functionId Function ID. @@ -357,8 +339,6 @@ class Functions(client: Client) : Service(client) { } /** - * List deployments - * * Get a list of all the project's code deployments. You can use the query params to filter your results. * * @param functionId Function ID. @@ -381,7 +361,6 @@ class Functions(client: Client) : Service(client) { "search" to search, ) val apiHeaders = mutableMapOf( - "content-type" to "application/json", ) val converter: (Any) -> io.appwrite.models.DeploymentList = { io.appwrite.models.DeploymentList.from(map = it as Map<String, Any>) @@ -397,8 +376,6 @@ class Functions(client: Client) : Service(client) { } /** - * Create deployment - * * Create a new function code deployment. Use this endpoint to upload a new version of your code function. To execute your newly uploaded code, you'll need to update the function's deployment to use your new deployment UID.This endpoint accepts a tar.gz file compressed with your code. Make sure to include any dependencies your code has within the compressed file. You can learn more about code packaging in the [Appwrite Cloud Functions tutorial](https://appwrite.io/docs/functions).Use the "command" param to set the entrypoint used to execute your code. * * @param functionId Function ID. @@ -448,8 +425,6 @@ class Functions(client: Client) : Service(client) { } /** - * Get deployment - * * Get a code deployment by its unique ID. * * @param functionId Function ID. @@ -468,7 +443,6 @@ class Functions(client: Client) : Service(client) { val apiParams = mutableMapOf<String, Any?>( ) val apiHeaders = mutableMapOf( - "content-type" to "application/json", ) val converter: (Any) -> io.appwrite.models.Deployment = { io.appwrite.models.Deployment.from(map = it as Map<String, Any>) @@ -484,8 +458,6 @@ class Functions(client: Client) : Service(client) { } /** - * Update deployment - * * Update the function code deployment ID using the unique function ID. Use this endpoint to switch the code deployment that should be executed by the execution endpoint. * * @param functionId Function ID. @@ -520,8 +492,6 @@ class Functions(client: Client) : Service(client) { } /** - * Delete deployment - * * Delete a code deployment by its unique ID. * * @param functionId Function ID. @@ -552,8 +522,6 @@ class Functions(client: Client) : Service(client) { } /** - * Rebuild deployment - * * Create a new build for an existing function deployment. This endpoint allows you to rebuild a deployment with the updated function configuration, including its entrypoint and build commands if they have been modified The build process will be queued and executed asynchronously. The original deployment's code will be preserved and used for the new build. * * @param functionId Function ID. @@ -588,8 +556,6 @@ class Functions(client: Client) : Service(client) { } /** - * Cancel deployment - * * Cancel an ongoing function deployment build. If the build is already in progress, it will be stopped and marked as canceled. If the build hasn't started yet, it will be marked as canceled without executing. You cannot cancel builds that have already completed (status 'ready') or failed. The response includes the final build status and details. * * @param functionId Function ID. @@ -624,8 +590,6 @@ class Functions(client: Client) : Service(client) { } /** - * Download deployment - * * Get a Deployment's contents by its unique ID. This endpoint supports range requests for partial or streaming file download. * * @param functionId Function ID. @@ -644,7 +608,6 @@ class Functions(client: Client) : Service(client) { val apiParams = mutableMapOf<String, Any?>( ) val apiHeaders = mutableMapOf( - "content-type" to "application/json", ) return client.call( "GET", @@ -655,8 +618,6 @@ class Functions(client: Client) : Service(client) { } /** - * List executions - * * Get a list of all the current user function execution logs. You can use the query params to filter your results. * * @param functionId Function ID. @@ -679,7 +640,6 @@ class Functions(client: Client) : Service(client) { "search" to search, ) val apiHeaders = mutableMapOf( - "content-type" to "application/json", ) val converter: (Any) -> io.appwrite.models.ExecutionList = { io.appwrite.models.ExecutionList.from(map = it as Map<String, Any>) @@ -695,8 +655,6 @@ class Functions(client: Client) : Service(client) { } /** - * Create execution - * * Trigger a function execution. The returned object will return you the current execution status. You can ping the `Get Execution` endpoint to get updates on the current execution status. Once this endpoint is called, your function execution process will start asynchronously. * * @param functionId Function ID. @@ -747,8 +705,6 @@ class Functions(client: Client) : Service(client) { } /** - * Get execution - * * Get a function execution log by its unique ID. * * @param functionId Function ID. @@ -767,7 +723,6 @@ class Functions(client: Client) : Service(client) { val apiParams = mutableMapOf<String, Any?>( ) val apiHeaders = mutableMapOf( - "content-type" to "application/json", ) val converter: (Any) -> io.appwrite.models.Execution = { io.appwrite.models.Execution.from(map = it as Map<String, Any>) @@ -783,8 +738,6 @@ class Functions(client: Client) : Service(client) { } /** - * Delete execution - * * Delete a function execution by its unique ID. * * @param functionId Function ID. @@ -815,8 +768,6 @@ class Functions(client: Client) : Service(client) { } /** - * List variables - * * Get a list of all variables of a specific function. * * @param functionId Function unique ID. @@ -832,7 +783,6 @@ class Functions(client: Client) : Service(client) { val apiParams = mutableMapOf<String, Any?>( ) val apiHeaders = mutableMapOf( - "content-type" to "application/json", ) val converter: (Any) -> io.appwrite.models.VariableList = { io.appwrite.models.VariableList.from(map = it as Map<String, Any>) @@ -848,8 +798,6 @@ class Functions(client: Client) : Service(client) { } /** - * Create variable - * * Create a new function environment variable. These variables can be accessed in the function at runtime as environment variables. * * @param functionId Function unique ID. @@ -887,8 +835,6 @@ class Functions(client: Client) : Service(client) { } /** - * Get variable - * * Get a variable by its unique ID. * * @param functionId Function unique ID. @@ -907,7 +853,6 @@ class Functions(client: Client) : Service(client) { val apiParams = mutableMapOf<String, Any?>( ) val apiHeaders = mutableMapOf( - "content-type" to "application/json", ) val converter: (Any) -> io.appwrite.models.Variable = { io.appwrite.models.Variable.from(map = it as Map<String, Any>) @@ -923,8 +868,6 @@ class Functions(client: Client) : Service(client) { } /** - * Update variable - * * Update variable by its unique ID. * * @param functionId Function unique ID. @@ -966,8 +909,6 @@ class Functions(client: Client) : Service(client) { } /** - * Delete variable - * * Delete a variable by its unique ID. * * @param functionId Function unique ID. diff --git a/src/main/kotlin/io/appwrite/services/Graphql.kt b/src/main/kotlin/io/appwrite/services/Graphql.kt index d8a676c..1e72cd4 100644 --- a/src/main/kotlin/io/appwrite/services/Graphql.kt +++ b/src/main/kotlin/io/appwrite/services/Graphql.kt @@ -14,8 +14,6 @@ import java.io.File class Graphql(client: Client) : Service(client) { /** - * GraphQL endpoint - * * Execute a GraphQL mutation. * * @param query The query or queries to execute. @@ -48,8 +46,6 @@ class Graphql(client: Client) : Service(client) { } /** - * GraphQL endpoint - * * Execute a GraphQL mutation. * * @param query The query or queries to execute. diff --git a/src/main/kotlin/io/appwrite/services/Health.kt b/src/main/kotlin/io/appwrite/services/Health.kt index a566692..9302782 100644 --- a/src/main/kotlin/io/appwrite/services/Health.kt +++ b/src/main/kotlin/io/appwrite/services/Health.kt @@ -14,8 +14,6 @@ import java.io.File class Health(client: Client) : Service(client) { /** - * Get HTTP - * * Check the Appwrite HTTP server is up and responsive. * * @return [io.appwrite.models.HealthStatus] @@ -28,7 +26,6 @@ class Health(client: Client) : Service(client) { val apiParams = mutableMapOf<String, Any?>( ) val apiHeaders = mutableMapOf( - "content-type" to "application/json", ) val converter: (Any) -> io.appwrite.models.HealthStatus = { io.appwrite.models.HealthStatus.from(map = it as Map<String, Any>) @@ -44,8 +41,6 @@ class Health(client: Client) : Service(client) { } /** - * Get antivirus - * * Check the Appwrite Antivirus server is up and connection is successful. * * @return [io.appwrite.models.HealthAntivirus] @@ -58,7 +53,6 @@ class Health(client: Client) : Service(client) { val apiParams = mutableMapOf<String, Any?>( ) val apiHeaders = mutableMapOf( - "content-type" to "application/json", ) val converter: (Any) -> io.appwrite.models.HealthAntivirus = { io.appwrite.models.HealthAntivirus.from(map = it as Map<String, Any>) @@ -74,8 +68,6 @@ class Health(client: Client) : Service(client) { } /** - * Get cache - * * Check the Appwrite in-memory cache servers are up and connection is successful. * * @return [io.appwrite.models.HealthStatus] @@ -88,7 +80,6 @@ class Health(client: Client) : Service(client) { val apiParams = mutableMapOf<String, Any?>( ) val apiHeaders = mutableMapOf( - "content-type" to "application/json", ) val converter: (Any) -> io.appwrite.models.HealthStatus = { io.appwrite.models.HealthStatus.from(map = it as Map<String, Any>) @@ -104,8 +95,6 @@ class Health(client: Client) : Service(client) { } /** - * Get the SSL certificate for a domain - * * Get the SSL certificate for a domain * * @param domain string @@ -122,7 +111,6 @@ class Health(client: Client) : Service(client) { "domain" to domain, ) val apiHeaders = mutableMapOf( - "content-type" to "application/json", ) val converter: (Any) -> io.appwrite.models.HealthCertificate = { io.appwrite.models.HealthCertificate.from(map = it as Map<String, Any>) @@ -138,8 +126,6 @@ class Health(client: Client) : Service(client) { } /** - * Get DB - * * Check the Appwrite database servers are up and connection is successful. * * @return [io.appwrite.models.HealthStatus] @@ -152,7 +138,6 @@ class Health(client: Client) : Service(client) { val apiParams = mutableMapOf<String, Any?>( ) val apiHeaders = mutableMapOf( - "content-type" to "application/json", ) val converter: (Any) -> io.appwrite.models.HealthStatus = { io.appwrite.models.HealthStatus.from(map = it as Map<String, Any>) @@ -168,8 +153,6 @@ class Health(client: Client) : Service(client) { } /** - * Get pubsub - * * Check the Appwrite pub-sub servers are up and connection is successful. * * @return [io.appwrite.models.HealthStatus] @@ -182,37 +165,6 @@ class Health(client: Client) : Service(client) { val apiParams = mutableMapOf<String, Any?>( ) val apiHeaders = mutableMapOf( - "content-type" to "application/json", - ) - val converter: (Any) -> io.appwrite.models.HealthStatus = { - io.appwrite.models.HealthStatus.from(map = it as Map<String, Any>) - } - return client.call( - "GET", - apiPath, - apiHeaders, - apiParams, - responseType = io.appwrite.models.HealthStatus::class.java, - converter, - ) - } - - /** - * Get queue - * - * Check the Appwrite queue messaging servers are up and connection is successful. - * - * @return [io.appwrite.models.HealthStatus] - */ - @Throws(AppwriteException::class) - suspend fun getQueue( - ): io.appwrite.models.HealthStatus { - val apiPath = "/health/queue" - - val apiParams = mutableMapOf<String, Any?>( - ) - val apiHeaders = mutableMapOf( - "content-type" to "application/json", ) val converter: (Any) -> io.appwrite.models.HealthStatus = { io.appwrite.models.HealthStatus.from(map = it as Map<String, Any>) @@ -228,8 +180,6 @@ class Health(client: Client) : Service(client) { } /** - * Get builds queue - * * Get the number of builds that are waiting to be processed in the Appwrite internal queue server. * * @param threshold Queue size threshold. When hit (equal or higher), endpoint returns server error. Default value is 5000. @@ -246,7 +196,6 @@ class Health(client: Client) : Service(client) { "threshold" to threshold, ) val apiHeaders = mutableMapOf( - "content-type" to "application/json", ) val converter: (Any) -> io.appwrite.models.HealthQueue = { io.appwrite.models.HealthQueue.from(map = it as Map<String, Any>) @@ -262,8 +211,6 @@ class Health(client: Client) : Service(client) { } /** - * Get certificates queue - * * Get the number of certificates that are waiting to be issued against [Letsencrypt](https://letsencrypt.org/) in the Appwrite internal queue server. * * @param threshold Queue size threshold. When hit (equal or higher), endpoint returns server error. Default value is 5000. @@ -280,7 +227,6 @@ class Health(client: Client) : Service(client) { "threshold" to threshold, ) val apiHeaders = mutableMapOf( - "content-type" to "application/json", ) val converter: (Any) -> io.appwrite.models.HealthQueue = { io.appwrite.models.HealthQueue.from(map = it as Map<String, Any>) @@ -296,8 +242,6 @@ class Health(client: Client) : Service(client) { } /** - * Get databases queue - * * Get the number of database changes that are waiting to be processed in the Appwrite internal queue server. * * @param name Queue name for which to check the queue size @@ -317,7 +261,6 @@ class Health(client: Client) : Service(client) { "threshold" to threshold, ) val apiHeaders = mutableMapOf( - "content-type" to "application/json", ) val converter: (Any) -> io.appwrite.models.HealthQueue = { io.appwrite.models.HealthQueue.from(map = it as Map<String, Any>) @@ -333,8 +276,6 @@ class Health(client: Client) : Service(client) { } /** - * Get deletes queue - * * Get the number of background destructive changes that are waiting to be processed in the Appwrite internal queue server. * * @param threshold Queue size threshold. When hit (equal or higher), endpoint returns server error. Default value is 5000. @@ -351,7 +292,6 @@ class Health(client: Client) : Service(client) { "threshold" to threshold, ) val apiHeaders = mutableMapOf( - "content-type" to "application/json", ) val converter: (Any) -> io.appwrite.models.HealthQueue = { io.appwrite.models.HealthQueue.from(map = it as Map<String, Any>) @@ -367,8 +307,6 @@ class Health(client: Client) : Service(client) { } /** - * Get number of failed queue jobs - * * Returns the amount of failed jobs in a given queue. * * @param name The name of the queue @@ -388,7 +326,6 @@ class Health(client: Client) : Service(client) { "threshold" to threshold, ) val apiHeaders = mutableMapOf( - "content-type" to "application/json", ) val converter: (Any) -> io.appwrite.models.HealthQueue = { io.appwrite.models.HealthQueue.from(map = it as Map<String, Any>) @@ -404,8 +341,6 @@ class Health(client: Client) : Service(client) { } /** - * Get functions queue - * * Get the number of function executions that are waiting to be processed in the Appwrite internal queue server. * * @param threshold Queue size threshold. When hit (equal or higher), endpoint returns server error. Default value is 5000. @@ -422,7 +357,6 @@ class Health(client: Client) : Service(client) { "threshold" to threshold, ) val apiHeaders = mutableMapOf( - "content-type" to "application/json", ) val converter: (Any) -> io.appwrite.models.HealthQueue = { io.appwrite.models.HealthQueue.from(map = it as Map<String, Any>) @@ -438,8 +372,6 @@ class Health(client: Client) : Service(client) { } /** - * Get logs queue - * * Get the number of logs that are waiting to be processed in the Appwrite internal queue server. * * @param threshold Queue size threshold. When hit (equal or higher), endpoint returns server error. Default value is 5000. @@ -456,7 +388,6 @@ class Health(client: Client) : Service(client) { "threshold" to threshold, ) val apiHeaders = mutableMapOf( - "content-type" to "application/json", ) val converter: (Any) -> io.appwrite.models.HealthQueue = { io.appwrite.models.HealthQueue.from(map = it as Map<String, Any>) @@ -472,8 +403,6 @@ class Health(client: Client) : Service(client) { } /** - * Get mails queue - * * Get the number of mails that are waiting to be processed in the Appwrite internal queue server. * * @param threshold Queue size threshold. When hit (equal or higher), endpoint returns server error. Default value is 5000. @@ -490,7 +419,6 @@ class Health(client: Client) : Service(client) { "threshold" to threshold, ) val apiHeaders = mutableMapOf( - "content-type" to "application/json", ) val converter: (Any) -> io.appwrite.models.HealthQueue = { io.appwrite.models.HealthQueue.from(map = it as Map<String, Any>) @@ -506,8 +434,6 @@ class Health(client: Client) : Service(client) { } /** - * Get messaging queue - * * Get the number of messages that are waiting to be processed in the Appwrite internal queue server. * * @param threshold Queue size threshold. When hit (equal or higher), endpoint returns server error. Default value is 5000. @@ -524,7 +450,6 @@ class Health(client: Client) : Service(client) { "threshold" to threshold, ) val apiHeaders = mutableMapOf( - "content-type" to "application/json", ) val converter: (Any) -> io.appwrite.models.HealthQueue = { io.appwrite.models.HealthQueue.from(map = it as Map<String, Any>) @@ -540,8 +465,6 @@ class Health(client: Client) : Service(client) { } /** - * Get migrations queue - * * Get the number of migrations that are waiting to be processed in the Appwrite internal queue server. * * @param threshold Queue size threshold. When hit (equal or higher), endpoint returns server error. Default value is 5000. @@ -558,7 +481,6 @@ class Health(client: Client) : Service(client) { "threshold" to threshold, ) val apiHeaders = mutableMapOf( - "content-type" to "application/json", ) val converter: (Any) -> io.appwrite.models.HealthQueue = { io.appwrite.models.HealthQueue.from(map = it as Map<String, Any>) @@ -574,25 +496,22 @@ class Health(client: Client) : Service(client) { } /** - * Get usage queue - * - * Get the number of metrics that are waiting to be processed in the Appwrite internal queue server. + * Get the number of metrics that are waiting to be processed in the Appwrite stats resources queue. * * @param threshold Queue size threshold. When hit (equal or higher), endpoint returns server error. Default value is 5000. * @return [io.appwrite.models.HealthQueue] */ @JvmOverloads @Throws(AppwriteException::class) - suspend fun getQueueUsage( + suspend fun getQueueStatsResources( threshold: Long? = null, ): io.appwrite.models.HealthQueue { - val apiPath = "/health/queue/usage" + val apiPath = "/health/queue/stats-resources" val apiParams = mutableMapOf<String, Any?>( "threshold" to threshold, ) val apiHeaders = mutableMapOf( - "content-type" to "application/json", ) val converter: (Any) -> io.appwrite.models.HealthQueue = { io.appwrite.models.HealthQueue.from(map = it as Map<String, Any>) @@ -608,25 +527,22 @@ class Health(client: Client) : Service(client) { } /** - * Get usage dump queue - * - * Get the number of projects containing metrics that are waiting to be processed in the Appwrite internal queue server. + * Get the number of metrics that are waiting to be processed in the Appwrite internal queue server. * * @param threshold Queue size threshold. When hit (equal or higher), endpoint returns server error. Default value is 5000. * @return [io.appwrite.models.HealthQueue] */ @JvmOverloads @Throws(AppwriteException::class) - suspend fun getQueueUsageDump( + suspend fun getQueueUsage( threshold: Long? = null, ): io.appwrite.models.HealthQueue { - val apiPath = "/health/queue/usage-dump" + val apiPath = "/health/queue/stats-usage" val apiParams = mutableMapOf<String, Any?>( "threshold" to threshold, ) val apiHeaders = mutableMapOf( - "content-type" to "application/json", ) val converter: (Any) -> io.appwrite.models.HealthQueue = { io.appwrite.models.HealthQueue.from(map = it as Map<String, Any>) @@ -642,8 +558,6 @@ class Health(client: Client) : Service(client) { } /** - * Get webhooks queue - * * Get the number of webhooks that are waiting to be processed in the Appwrite internal queue server. * * @param threshold Queue size threshold. When hit (equal or higher), endpoint returns server error. Default value is 5000. @@ -660,7 +574,6 @@ class Health(client: Client) : Service(client) { "threshold" to threshold, ) val apiHeaders = mutableMapOf( - "content-type" to "application/json", ) val converter: (Any) -> io.appwrite.models.HealthQueue = { io.appwrite.models.HealthQueue.from(map = it as Map<String, Any>) @@ -676,8 +589,6 @@ class Health(client: Client) : Service(client) { } /** - * Get storage - * * Check the Appwrite storage device is up and connection is successful. * * @return [io.appwrite.models.HealthStatus] @@ -690,7 +601,6 @@ class Health(client: Client) : Service(client) { val apiParams = mutableMapOf<String, Any?>( ) val apiHeaders = mutableMapOf( - "content-type" to "application/json", ) val converter: (Any) -> io.appwrite.models.HealthStatus = { io.appwrite.models.HealthStatus.from(map = it as Map<String, Any>) @@ -706,8 +616,6 @@ class Health(client: Client) : Service(client) { } /** - * Get local storage - * * Check the Appwrite local storage device is up and connection is successful. * * @return [io.appwrite.models.HealthStatus] @@ -720,7 +628,6 @@ class Health(client: Client) : Service(client) { val apiParams = mutableMapOf<String, Any?>( ) val apiHeaders = mutableMapOf( - "content-type" to "application/json", ) val converter: (Any) -> io.appwrite.models.HealthStatus = { io.appwrite.models.HealthStatus.from(map = it as Map<String, Any>) @@ -736,8 +643,6 @@ class Health(client: Client) : Service(client) { } /** - * Get time - * * Check the Appwrite server time is synced with Google remote NTP server. We use this technology to smoothly handle leap seconds with no disruptive events. The [Network Time Protocol](https://en.wikipedia.org/wiki/Network_Time_Protocol) (NTP) is used by hundreds of millions of computers and devices to synchronize their clocks over the Internet. If your computer sets its own clock, it likely uses NTP. * * @return [io.appwrite.models.HealthTime] @@ -750,7 +655,6 @@ class Health(client: Client) : Service(client) { val apiParams = mutableMapOf<String, Any?>( ) val apiHeaders = mutableMapOf( - "content-type" to "application/json", ) val converter: (Any) -> io.appwrite.models.HealthTime = { io.appwrite.models.HealthTime.from(map = it as Map<String, Any>) diff --git a/src/main/kotlin/io/appwrite/services/Locale.kt b/src/main/kotlin/io/appwrite/services/Locale.kt index 170fd8b..28049e4 100644 --- a/src/main/kotlin/io/appwrite/services/Locale.kt +++ b/src/main/kotlin/io/appwrite/services/Locale.kt @@ -14,8 +14,6 @@ import java.io.File class Locale(client: Client) : Service(client) { /** - * Get user locale - * * Get the current user location based on IP. Returns an object with user country code, country name, continent name, continent code, ip address and suggested currency. You can use the locale header to get the data in a supported language.([IP Geolocation by DB-IP](https://db-ip.com)) * * @return [io.appwrite.models.Locale] @@ -28,7 +26,6 @@ class Locale(client: Client) : Service(client) { val apiParams = mutableMapOf<String, Any?>( ) val apiHeaders = mutableMapOf( - "content-type" to "application/json", ) val converter: (Any) -> io.appwrite.models.Locale = { io.appwrite.models.Locale.from(map = it as Map<String, Any>) @@ -44,8 +41,6 @@ class Locale(client: Client) : Service(client) { } /** - * List locale codes - * * List of all locale codes in [ISO 639-1](https://en.wikipedia.org/wiki/List_of_ISO_639-1_codes). * * @return [io.appwrite.models.LocaleCodeList] @@ -58,7 +53,6 @@ class Locale(client: Client) : Service(client) { val apiParams = mutableMapOf<String, Any?>( ) val apiHeaders = mutableMapOf( - "content-type" to "application/json", ) val converter: (Any) -> io.appwrite.models.LocaleCodeList = { io.appwrite.models.LocaleCodeList.from(map = it as Map<String, Any>) @@ -74,8 +68,6 @@ class Locale(client: Client) : Service(client) { } /** - * List continents - * * List of all continents. You can use the locale header to get the data in a supported language. * * @return [io.appwrite.models.ContinentList] @@ -88,7 +80,6 @@ class Locale(client: Client) : Service(client) { val apiParams = mutableMapOf<String, Any?>( ) val apiHeaders = mutableMapOf( - "content-type" to "application/json", ) val converter: (Any) -> io.appwrite.models.ContinentList = { io.appwrite.models.ContinentList.from(map = it as Map<String, Any>) @@ -104,8 +95,6 @@ class Locale(client: Client) : Service(client) { } /** - * List countries - * * List of all countries. You can use the locale header to get the data in a supported language. * * @return [io.appwrite.models.CountryList] @@ -118,7 +107,6 @@ class Locale(client: Client) : Service(client) { val apiParams = mutableMapOf<String, Any?>( ) val apiHeaders = mutableMapOf( - "content-type" to "application/json", ) val converter: (Any) -> io.appwrite.models.CountryList = { io.appwrite.models.CountryList.from(map = it as Map<String, Any>) @@ -134,8 +122,6 @@ class Locale(client: Client) : Service(client) { } /** - * List EU countries - * * List of all countries that are currently members of the EU. You can use the locale header to get the data in a supported language. * * @return [io.appwrite.models.CountryList] @@ -148,7 +134,6 @@ class Locale(client: Client) : Service(client) { val apiParams = mutableMapOf<String, Any?>( ) val apiHeaders = mutableMapOf( - "content-type" to "application/json", ) val converter: (Any) -> io.appwrite.models.CountryList = { io.appwrite.models.CountryList.from(map = it as Map<String, Any>) @@ -164,8 +149,6 @@ class Locale(client: Client) : Service(client) { } /** - * List countries phone codes - * * List of all countries phone codes. You can use the locale header to get the data in a supported language. * * @return [io.appwrite.models.PhoneList] @@ -178,7 +161,6 @@ class Locale(client: Client) : Service(client) { val apiParams = mutableMapOf<String, Any?>( ) val apiHeaders = mutableMapOf( - "content-type" to "application/json", ) val converter: (Any) -> io.appwrite.models.PhoneList = { io.appwrite.models.PhoneList.from(map = it as Map<String, Any>) @@ -194,8 +176,6 @@ class Locale(client: Client) : Service(client) { } /** - * List currencies - * * List of all currencies, including currency symbol, name, plural, and decimal digits for all major and minor currencies. You can use the locale header to get the data in a supported language. * * @return [io.appwrite.models.CurrencyList] @@ -208,7 +188,6 @@ class Locale(client: Client) : Service(client) { val apiParams = mutableMapOf<String, Any?>( ) val apiHeaders = mutableMapOf( - "content-type" to "application/json", ) val converter: (Any) -> io.appwrite.models.CurrencyList = { io.appwrite.models.CurrencyList.from(map = it as Map<String, Any>) @@ -224,8 +203,6 @@ class Locale(client: Client) : Service(client) { } /** - * List languages - * * List of all languages classified by ISO 639-1 including 2-letter code, name in English, and name in the respective language. * * @return [io.appwrite.models.LanguageList] @@ -238,7 +215,6 @@ class Locale(client: Client) : Service(client) { val apiParams = mutableMapOf<String, Any?>( ) val apiHeaders = mutableMapOf( - "content-type" to "application/json", ) val converter: (Any) -> io.appwrite.models.LanguageList = { io.appwrite.models.LanguageList.from(map = it as Map<String, Any>) diff --git a/src/main/kotlin/io/appwrite/services/Messaging.kt b/src/main/kotlin/io/appwrite/services/Messaging.kt index b1eac2a..f8e19d5 100644 --- a/src/main/kotlin/io/appwrite/services/Messaging.kt +++ b/src/main/kotlin/io/appwrite/services/Messaging.kt @@ -14,8 +14,6 @@ import java.io.File class Messaging(client: Client) : Service(client) { /** - * List messages - * * Get a list of all messages from the current Appwrite project. * * @param queries Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https://appwrite.io/docs/queries). Maximum of 100 queries are allowed, each 4096 characters long. You may filter on the following attributes: scheduledAt, deliveredAt, deliveredTotal, status, description, providerType @@ -35,7 +33,6 @@ class Messaging(client: Client) : Service(client) { "search" to search, ) val apiHeaders = mutableMapOf( - "content-type" to "application/json", ) val converter: (Any) -> io.appwrite.models.MessageList = { io.appwrite.models.MessageList.from(map = it as Map<String, Any>) @@ -51,8 +48,6 @@ class Messaging(client: Client) : Service(client) { } /** - * Create email - * * Create a new email message. * * @param messageId Message 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. @@ -118,9 +113,7 @@ class Messaging(client: Client) : Service(client) { } /** - * Update email - * - * Update an email message by its unique ID. + * Update an email message by its unique ID. This endpoint only works on messages that are in draft status. Messages that are already processing, sent, or failed cannot be updated. * * @param messageId Message ID. * @param topics List of Topic IDs. @@ -185,8 +178,6 @@ class Messaging(client: Client) : Service(client) { } /** - * Create push notification - * * Create a new push notification. * * @param messageId Message 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. @@ -273,9 +264,7 @@ class Messaging(client: Client) : Service(client) { } /** - * Update push notification - * - * Update a push notification by its unique ID. + * Update a push notification by its unique ID. This endpoint only works on messages that are in draft status. Messages that are already processing, sent, or failed cannot be updated. * * @param messageId Message ID. * @param topics List of Topic IDs. @@ -361,8 +350,6 @@ class Messaging(client: Client) : Service(client) { } /** - * Create SMS - * * Create a new SMS message. * * @param messageId Message 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. @@ -413,9 +400,7 @@ class Messaging(client: Client) : Service(client) { } /** - * Update SMS - * - * Update an SMS message by its unique ID. + * Update an SMS message by its unique ID. This endpoint only works on messages that are in draft status. Messages that are already processing, sent, or failed cannot be updated. * * @param messageId Message ID. * @param topics List of Topic IDs. @@ -465,8 +450,6 @@ class Messaging(client: Client) : Service(client) { } /** - * Get message - * * Get a message by its unique ID. * * @param messageId Message ID. @@ -482,7 +465,6 @@ class Messaging(client: Client) : Service(client) { val apiParams = mutableMapOf<String, Any?>( ) val apiHeaders = mutableMapOf( - "content-type" to "application/json", ) val converter: (Any) -> io.appwrite.models.Message = { io.appwrite.models.Message.from(map = it as Map<String, Any>) @@ -498,8 +480,6 @@ class Messaging(client: Client) : Service(client) { } /** - * Delete message - * * Delete a message. If the message is not a draft or scheduled, but has been sent, this will not recall the message. * * @param messageId Message ID. @@ -527,8 +507,6 @@ class Messaging(client: Client) : Service(client) { } /** - * List message logs - * * Get the message activity logs listed by its unique ID. * * @param messageId Message ID. @@ -548,7 +526,6 @@ class Messaging(client: Client) : Service(client) { "queries" to queries, ) val apiHeaders = mutableMapOf( - "content-type" to "application/json", ) val converter: (Any) -> io.appwrite.models.LogList = { io.appwrite.models.LogList.from(map = it as Map<String, Any>) @@ -564,8 +541,6 @@ class Messaging(client: Client) : Service(client) { } /** - * List message targets - * * Get a list of the targets associated with a message. * * @param messageId Message ID. @@ -585,7 +560,6 @@ class Messaging(client: Client) : Service(client) { "queries" to queries, ) val apiHeaders = mutableMapOf( - "content-type" to "application/json", ) val converter: (Any) -> io.appwrite.models.TargetList = { io.appwrite.models.TargetList.from(map = it as Map<String, Any>) @@ -601,8 +575,6 @@ class Messaging(client: Client) : Service(client) { } /** - * List providers - * * Get a list of all providers from the current Appwrite project. * * @param queries Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https://appwrite.io/docs/queries). Maximum of 100 queries are allowed, each 4096 characters long. You may filter on the following attributes: name, provider, type, enabled @@ -622,7 +594,6 @@ class Messaging(client: Client) : Service(client) { "search" to search, ) val apiHeaders = mutableMapOf( - "content-type" to "application/json", ) val converter: (Any) -> io.appwrite.models.ProviderList = { io.appwrite.models.ProviderList.from(map = it as Map<String, Any>) @@ -638,8 +609,6 @@ class Messaging(client: Client) : Service(client) { } /** - * Create APNS provider - * * Create a new Apple Push Notification service provider. * * @param providerId Provider 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. @@ -693,8 +662,6 @@ class Messaging(client: Client) : Service(client) { } /** - * Update APNS provider - * * Update a Apple Push Notification service provider by its unique ID. * * @param providerId Provider ID. @@ -748,8 +715,6 @@ class Messaging(client: Client) : Service(client) { } /** - * Create FCM provider - * * Create a new Firebase Cloud Messaging provider. * * @param providerId Provider 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. @@ -791,8 +756,6 @@ class Messaging(client: Client) : Service(client) { } /** - * Update FCM provider - * * Update a Firebase Cloud Messaging provider by its unique ID. * * @param providerId Provider ID. @@ -834,8 +797,6 @@ class Messaging(client: Client) : Service(client) { } /** - * Create Mailgun provider - * * Create a new Mailgun provider. * * @param providerId Provider 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. @@ -895,8 +856,6 @@ class Messaging(client: Client) : Service(client) { } /** - * Update Mailgun provider - * * Update a Mailgun provider by its unique ID. * * @param providerId Provider ID. @@ -956,8 +915,6 @@ class Messaging(client: Client) : Service(client) { } /** - * Create Msg91 provider - * * Create a new MSG91 provider. * * @param providerId Provider 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. @@ -1005,8 +962,6 @@ class Messaging(client: Client) : Service(client) { } /** - * Update Msg91 provider - * * Update a MSG91 provider by its unique ID. * * @param providerId Provider ID. @@ -1054,8 +1009,6 @@ class Messaging(client: Client) : Service(client) { } /** - * Create Sendgrid provider - * * Create a new Sendgrid provider. * * @param providerId Provider 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. @@ -1109,8 +1062,6 @@ class Messaging(client: Client) : Service(client) { } /** - * Update Sendgrid provider - * * Update a Sendgrid provider by its unique ID. * * @param providerId Provider ID. @@ -1164,8 +1115,6 @@ class Messaging(client: Client) : Service(client) { } /** - * Create SMTP provider - * * Create a new SMTP provider. * * @param providerId Provider 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. @@ -1237,8 +1186,6 @@ class Messaging(client: Client) : Service(client) { } /** - * Update SMTP provider - * * Update a SMTP provider by its unique ID. * * @param providerId Provider ID. @@ -1310,8 +1257,6 @@ class Messaging(client: Client) : Service(client) { } /** - * Create Telesign provider - * * Create a new Telesign provider. * * @param providerId Provider 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. @@ -1359,8 +1304,6 @@ class Messaging(client: Client) : Service(client) { } /** - * Update Telesign provider - * * Update a Telesign provider by its unique ID. * * @param providerId Provider ID. @@ -1408,8 +1351,6 @@ class Messaging(client: Client) : Service(client) { } /** - * Create Textmagic provider - * * Create a new Textmagic provider. * * @param providerId Provider 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. @@ -1457,8 +1398,6 @@ class Messaging(client: Client) : Service(client) { } /** - * Update Textmagic provider - * * Update a Textmagic provider by its unique ID. * * @param providerId Provider ID. @@ -1506,8 +1445,6 @@ class Messaging(client: Client) : Service(client) { } /** - * Create Twilio provider - * * Create a new Twilio provider. * * @param providerId Provider 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. @@ -1555,8 +1492,6 @@ class Messaging(client: Client) : Service(client) { } /** - * Update Twilio provider - * * Update a Twilio provider by its unique ID. * * @param providerId Provider ID. @@ -1604,8 +1539,6 @@ class Messaging(client: Client) : Service(client) { } /** - * Create Vonage provider - * * Create a new Vonage provider. * * @param providerId Provider 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. @@ -1653,8 +1586,6 @@ class Messaging(client: Client) : Service(client) { } /** - * Update Vonage provider - * * Update a Vonage provider by its unique ID. * * @param providerId Provider ID. @@ -1702,8 +1633,6 @@ class Messaging(client: Client) : Service(client) { } /** - * Get provider - * * Get a provider by its unique ID. * * @param providerId Provider ID. @@ -1719,7 +1648,6 @@ class Messaging(client: Client) : Service(client) { val apiParams = mutableMapOf<String, Any?>( ) val apiHeaders = mutableMapOf( - "content-type" to "application/json", ) val converter: (Any) -> io.appwrite.models.Provider = { io.appwrite.models.Provider.from(map = it as Map<String, Any>) @@ -1735,8 +1663,6 @@ class Messaging(client: Client) : Service(client) { } /** - * Delete provider - * * Delete a provider by its unique ID. * * @param providerId Provider ID. @@ -1764,8 +1690,6 @@ class Messaging(client: Client) : Service(client) { } /** - * List provider logs - * * Get the provider activity logs listed by its unique ID. * * @param providerId Provider ID. @@ -1785,7 +1709,6 @@ class Messaging(client: Client) : Service(client) { "queries" to queries, ) val apiHeaders = mutableMapOf( - "content-type" to "application/json", ) val converter: (Any) -> io.appwrite.models.LogList = { io.appwrite.models.LogList.from(map = it as Map<String, Any>) @@ -1801,8 +1724,6 @@ class Messaging(client: Client) : Service(client) { } /** - * List subscriber logs - * * Get the subscriber activity logs listed by its unique ID. * * @param subscriberId Subscriber ID. @@ -1822,7 +1743,6 @@ class Messaging(client: Client) : Service(client) { "queries" to queries, ) val apiHeaders = mutableMapOf( - "content-type" to "application/json", ) val converter: (Any) -> io.appwrite.models.LogList = { io.appwrite.models.LogList.from(map = it as Map<String, Any>) @@ -1838,8 +1758,6 @@ class Messaging(client: Client) : Service(client) { } /** - * List topics - * * Get a list of all topics from the current Appwrite project. * * @param queries Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https://appwrite.io/docs/queries). Maximum of 100 queries are allowed, each 4096 characters long. You may filter on the following attributes: name, description, emailTotal, smsTotal, pushTotal @@ -1859,7 +1777,6 @@ class Messaging(client: Client) : Service(client) { "search" to search, ) val apiHeaders = mutableMapOf( - "content-type" to "application/json", ) val converter: (Any) -> io.appwrite.models.TopicList = { io.appwrite.models.TopicList.from(map = it as Map<String, Any>) @@ -1875,8 +1792,6 @@ class Messaging(client: Client) : Service(client) { } /** - * Create topic - * * Create a new topic. * * @param topicId Topic ID. Choose a custom Topic ID or a new Topic ID. @@ -1915,8 +1830,6 @@ class Messaging(client: Client) : Service(client) { } /** - * Get topic - * * Get a topic by its unique ID. * * @param topicId Topic ID. @@ -1932,7 +1845,6 @@ class Messaging(client: Client) : Service(client) { val apiParams = mutableMapOf<String, Any?>( ) val apiHeaders = mutableMapOf( - "content-type" to "application/json", ) val converter: (Any) -> io.appwrite.models.Topic = { io.appwrite.models.Topic.from(map = it as Map<String, Any>) @@ -1948,8 +1860,6 @@ class Messaging(client: Client) : Service(client) { } /** - * Update topic - * * Update a topic by its unique ID. * * @param topicId Topic ID. @@ -1988,8 +1898,6 @@ class Messaging(client: Client) : Service(client) { } /** - * Delete topic - * * Delete a topic by its unique ID. * * @param topicId Topic ID. @@ -2017,8 +1925,6 @@ class Messaging(client: Client) : Service(client) { } /** - * List topic logs - * * Get the topic activity logs listed by its unique ID. * * @param topicId Topic ID. @@ -2038,7 +1944,6 @@ class Messaging(client: Client) : Service(client) { "queries" to queries, ) val apiHeaders = mutableMapOf( - "content-type" to "application/json", ) val converter: (Any) -> io.appwrite.models.LogList = { io.appwrite.models.LogList.from(map = it as Map<String, Any>) @@ -2054,8 +1959,6 @@ class Messaging(client: Client) : Service(client) { } /** - * List subscribers - * * Get a list of all subscribers from the current Appwrite project. * * @param topicId Topic ID. The topic ID subscribed to. @@ -2078,7 +1981,6 @@ class Messaging(client: Client) : Service(client) { "search" to search, ) val apiHeaders = mutableMapOf( - "content-type" to "application/json", ) val converter: (Any) -> io.appwrite.models.SubscriberList = { io.appwrite.models.SubscriberList.from(map = it as Map<String, Any>) @@ -2094,8 +1996,6 @@ class Messaging(client: Client) : Service(client) { } /** - * Create subscriber - * * Create a new subscriber. * * @param topicId Topic ID. The topic ID to subscribe to. @@ -2133,8 +2033,6 @@ class Messaging(client: Client) : Service(client) { } /** - * Get subscriber - * * Get a subscriber by its unique ID. * * @param topicId Topic ID. The topic ID subscribed to. @@ -2153,7 +2051,6 @@ class Messaging(client: Client) : Service(client) { val apiParams = mutableMapOf<String, Any?>( ) val apiHeaders = mutableMapOf( - "content-type" to "application/json", ) val converter: (Any) -> io.appwrite.models.Subscriber = { io.appwrite.models.Subscriber.from(map = it as Map<String, Any>) @@ -2169,8 +2066,6 @@ class Messaging(client: Client) : Service(client) { } /** - * Delete subscriber - * * Delete a subscriber by its unique ID. * * @param topicId Topic ID. The topic ID subscribed to. diff --git a/src/main/kotlin/io/appwrite/services/Storage.kt b/src/main/kotlin/io/appwrite/services/Storage.kt index 5a10935..560378a 100644 --- a/src/main/kotlin/io/appwrite/services/Storage.kt +++ b/src/main/kotlin/io/appwrite/services/Storage.kt @@ -16,8 +16,6 @@ import java.io.File class Storage(client: Client) : Service(client) { /** - * List buckets - * * Get a list of all the storage buckets. You can use the query params to filter your results. * * @param queries Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https://appwrite.io/docs/queries). Maximum of 100 queries are allowed, each 4096 characters long. You may filter on the following attributes: enabled, name, fileSecurity, maximumFileSize, encryption, antivirus @@ -37,7 +35,6 @@ class Storage(client: Client) : Service(client) { "search" to search, ) val apiHeaders = mutableMapOf( - "content-type" to "application/json", ) val converter: (Any) -> io.appwrite.models.BucketList = { io.appwrite.models.BucketList.from(map = it as Map<String, Any>) @@ -53,8 +50,6 @@ class Storage(client: Client) : Service(client) { } /** - * Create bucket - * * Create a new storage bucket. * * @param bucketId 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. @@ -114,8 +109,6 @@ class Storage(client: Client) : Service(client) { } /** - * Get bucket - * * Get a storage bucket by its unique ID. This endpoint response returns a JSON object with the storage bucket metadata. * * @param bucketId Bucket unique ID. @@ -131,7 +124,6 @@ class Storage(client: Client) : Service(client) { val apiParams = mutableMapOf<String, Any?>( ) val apiHeaders = mutableMapOf( - "content-type" to "application/json", ) val converter: (Any) -> io.appwrite.models.Bucket = { io.appwrite.models.Bucket.from(map = it as Map<String, Any>) @@ -147,8 +139,6 @@ class Storage(client: Client) : Service(client) { } /** - * Update bucket - * * Update a storage bucket by its unique ID. * * @param bucketId Bucket unique ID. @@ -208,8 +198,6 @@ class Storage(client: Client) : Service(client) { } /** - * Delete bucket - * * Delete a storage bucket by its unique ID. * * @param bucketId Bucket unique ID. @@ -237,8 +225,6 @@ class Storage(client: Client) : Service(client) { } /** - * List files - * * Get a list of all the user files. You can use the query params to filter your results. * * @param bucketId Storage bucket unique ID. You can create a new storage bucket using the Storage service [server integration](https://appwrite.io/docs/server/storage#createBucket). @@ -261,7 +247,6 @@ class Storage(client: Client) : Service(client) { "search" to search, ) val apiHeaders = mutableMapOf( - "content-type" to "application/json", ) val converter: (Any) -> io.appwrite.models.FileList = { io.appwrite.models.FileList.from(map = it as Map<String, Any>) @@ -277,8 +262,6 @@ class Storage(client: Client) : Service(client) { } /** - * Create file - * * Create a new file. Before using this route, you should create a new bucket resource using either a [server integration](https://appwrite.io/docs/server/storage#storageCreateBucket) API or directly from your Appwrite console.Larger files should be uploaded using multiple requests with the [content-range](https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Content-Range) header to send a partial request with a maximum supported chunk of `5MB`. The `content-range` header values should always be in bytes.When the first request is sent, the server will return the **File** object, and the subsequent part request must include the file's **id** in `x-appwrite-id` header to allow the server to know that the partial upload is for the existing file and not for a new one.If you're creating a new file using one of the Appwrite SDKs, all the chunking logic will be managed by the SDK internally. * * @param bucketId Storage bucket unique ID. You can create a new storage bucket using the Storage service [server integration](https://appwrite.io/docs/server/storage#createBucket). @@ -325,8 +308,6 @@ class Storage(client: Client) : Service(client) { } /** - * Get file - * * Get a file by its unique ID. This endpoint response returns a JSON object with the file metadata. * * @param bucketId Storage bucket unique ID. You can create a new storage bucket using the Storage service [server integration](https://appwrite.io/docs/server/storage#createBucket). @@ -345,7 +326,6 @@ class Storage(client: Client) : Service(client) { val apiParams = mutableMapOf<String, Any?>( ) val apiHeaders = mutableMapOf( - "content-type" to "application/json", ) val converter: (Any) -> io.appwrite.models.File = { io.appwrite.models.File.from(map = it as Map<String, Any>) @@ -361,8 +341,6 @@ class Storage(client: Client) : Service(client) { } /** - * Update file - * * Update a file by its unique ID. Only users with write permissions have access to update this resource. * * @param bucketId Storage bucket unique ID. You can create a new storage bucket using the Storage service [server integration](https://appwrite.io/docs/server/storage#createBucket). @@ -404,8 +382,6 @@ class Storage(client: Client) : Service(client) { } /** - * Delete file - * * Delete a file by its unique ID. Only users with write permissions have access to delete this resource. * * @param bucketId Storage bucket unique ID. You can create a new storage bucket using the Storage service [server integration](https://appwrite.io/docs/server/storage#createBucket). @@ -436,8 +412,6 @@ class Storage(client: Client) : Service(client) { } /** - * Get file for download - * * Get a file content by its unique ID. The endpoint response return with a 'Content-Disposition: attachment' header that tells the browser to start downloading the file to user downloads directory. * * @param bucketId Storage bucket ID. You can create a new storage bucket using the Storage service [server integration](https://appwrite.io/docs/server/storage#createBucket). @@ -456,7 +430,6 @@ class Storage(client: Client) : Service(client) { val apiParams = mutableMapOf<String, Any?>( ) val apiHeaders = mutableMapOf( - "content-type" to "application/json", ) return client.call( "GET", @@ -467,8 +440,6 @@ class Storage(client: Client) : Service(client) { } /** - * Get file preview - * * Get a file preview image. Currently, this method supports preview for image files (jpg, png, and gif), other supported formats, like pdf, docs, slides, and spreadsheets, will return the file icon image. You can also pass query string arguments for cutting and resizing your preview image. Preview is supported only for image files smaller than 10MB. * * @param bucketId Storage bucket unique ID. You can create a new storage bucket using the Storage service [server integration](https://appwrite.io/docs/server/storage#createBucket). @@ -521,7 +492,6 @@ class Storage(client: Client) : Service(client) { "output" to output, ) val apiHeaders = mutableMapOf( - "content-type" to "application/json", ) return client.call( "GET", @@ -532,8 +502,6 @@ class Storage(client: Client) : Service(client) { } /** - * Get file for view - * * Get a file content by its unique ID. This endpoint is similar to the download method but returns with no 'Content-Disposition: attachment' header. * * @param bucketId Storage bucket unique ID. You can create a new storage bucket using the Storage service [server integration](https://appwrite.io/docs/server/storage#createBucket). @@ -552,7 +520,6 @@ class Storage(client: Client) : Service(client) { val apiParams = mutableMapOf<String, Any?>( ) val apiHeaders = mutableMapOf( - "content-type" to "application/json", ) return client.call( "GET", diff --git a/src/main/kotlin/io/appwrite/services/Teams.kt b/src/main/kotlin/io/appwrite/services/Teams.kt index aa355dc..6349dcb 100644 --- a/src/main/kotlin/io/appwrite/services/Teams.kt +++ b/src/main/kotlin/io/appwrite/services/Teams.kt @@ -14,8 +14,6 @@ import java.io.File class Teams(client: Client) : Service(client) { /** - * List teams - * * Get a list of all the teams in which the current user is a member. You can use the parameters to filter your results. * * @param queries Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https://appwrite.io/docs/queries). Maximum of 100 queries are allowed, each 4096 characters long. You may filter on the following attributes: name, total, billingPlan @@ -36,7 +34,6 @@ class Teams(client: Client) : Service(client) { "search" to search, ) val apiHeaders = mutableMapOf( - "content-type" to "application/json", ) val converter: (Any) -> io.appwrite.models.TeamList<T> = { io.appwrite.models.TeamList.from(map = it as Map<String, Any>, nestedType) @@ -52,8 +49,6 @@ class Teams(client: Client) : Service(client) { } /** - * List teams - * * Get a list of all the teams in which the current user is a member. You can use the parameters to filter your results. * * @param queries Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https://appwrite.io/docs/queries). Maximum of 100 queries are allowed, each 4096 characters long. You may filter on the following attributes: name, total, billingPlan @@ -72,8 +67,6 @@ class Teams(client: Client) : Service(client) { ) /** - * Create team - * * Create a new team. The user who creates the team will automatically be assigned as the owner of the team. Only the users with the owner role can invite new members, add new owners and delete or update the team. * * @param teamId Team 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. @@ -113,8 +106,6 @@ class Teams(client: Client) : Service(client) { } /** - * Create team - * * Create a new team. The user who creates the team will automatically be assigned as the owner of the team. Only the users with the owner role can invite new members, add new owners and delete or update the team. * * @param teamId Team 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. @@ -136,8 +127,6 @@ class Teams(client: Client) : Service(client) { ) /** - * Get team - * * Get a team by its ID. All team members have read access for this resource. * * @param teamId Team ID. @@ -154,7 +143,6 @@ class Teams(client: Client) : Service(client) { val apiParams = mutableMapOf<String, Any?>( ) val apiHeaders = mutableMapOf( - "content-type" to "application/json", ) val converter: (Any) -> io.appwrite.models.Team<T> = { io.appwrite.models.Team.from(map = it as Map<String, Any>, nestedType) @@ -170,8 +158,6 @@ class Teams(client: Client) : Service(client) { } /** - * Get team - * * Get a team by its ID. All team members have read access for this resource. * * @param teamId Team ID. @@ -186,8 +172,6 @@ class Teams(client: Client) : Service(client) { ) /** - * Update name - * * Update the team's name by its unique ID. * * @param teamId Team ID. @@ -223,8 +207,6 @@ class Teams(client: Client) : Service(client) { } /** - * Update name - * * Update the team's name by its unique ID. * * @param teamId Team ID. @@ -242,8 +224,6 @@ class Teams(client: Client) : Service(client) { ) /** - * Delete team - * * Delete a team using its ID. Only team members with the owner role can delete the team. * * @param teamId Team ID. @@ -271,8 +251,6 @@ class Teams(client: Client) : Service(client) { } /** - * List team memberships - * * Use this endpoint to list a team's members using the team's ID. All team members have read access to this endpoint. Hide sensitive attributes from the response by toggling membership privacy in the Console. * * @param teamId Team ID. @@ -295,7 +273,6 @@ class Teams(client: Client) : Service(client) { "search" to search, ) val apiHeaders = mutableMapOf( - "content-type" to "application/json", ) val converter: (Any) -> io.appwrite.models.MembershipList = { io.appwrite.models.MembershipList.from(map = it as Map<String, Any>) @@ -311,8 +288,6 @@ class Teams(client: Client) : Service(client) { } /** - * Create team membership - * * Invite a new member to join your team. Provide an ID for existing users, or invite unregistered users using an email or phone number. If initiated from a Client SDK, Appwrite will send an email or sms with a link to join the team to the invited user, and an account will be created for them if one doesn't exist. If initiated from a Server SDK, the new member will be added automatically to the team.You only need to provide one of a user ID, email, or phone number. Appwrite will prioritize accepting the user ID > email > phone number if you provide more than one of these parameters.Use the `url` parameter to redirect the user from the invitation email to your app. After the user is redirected, use the [Update Team Membership Status](https://appwrite.io/docs/references/cloud/client-web/teams#updateMembershipStatus) endpoint to allow the user to accept the invitation to the team. Please note that to avoid a [Redirect Attack](https://github.com/OWASP/CheatSheetSeries/blob/master/cheatsheets/Unvalidated_Redirects_and_Forwards_Cheat_Sheet.md) Appwrite will accept the only redirect URLs under the domains you have added as a platform on the Appwrite Console. * * @param teamId Team ID. @@ -363,8 +338,6 @@ class Teams(client: Client) : Service(client) { } /** - * Get team membership - * * Get a team member by the membership unique id. All team members have read access for this resource. Hide sensitive attributes from the response by toggling membership privacy in the Console. * * @param teamId Team ID. @@ -383,7 +356,6 @@ class Teams(client: Client) : Service(client) { val apiParams = mutableMapOf<String, Any?>( ) val apiHeaders = mutableMapOf( - "content-type" to "application/json", ) val converter: (Any) -> io.appwrite.models.Membership = { io.appwrite.models.Membership.from(map = it as Map<String, Any>) @@ -399,8 +371,6 @@ class Teams(client: Client) : Service(client) { } /** - * Update membership - * * Modify the roles of a team member. Only team members with the owner role have access to this endpoint. Learn more about [roles and permissions](https://appwrite.io/docs/permissions). * * @param teamId Team ID. @@ -438,8 +408,6 @@ class Teams(client: Client) : Service(client) { } /** - * Delete team membership - * * This endpoint allows a user to leave a team or for a team owner to delete the membership of any other team member. You can also use this endpoint to delete a user membership even if it is not accepted. * * @param teamId Team ID. @@ -470,8 +438,6 @@ class Teams(client: Client) : Service(client) { } /** - * Update team membership status - * * Use this endpoint to allow a user to accept an invitation to join a team after being redirected back to your app from the invitation email received by the user.If the request is successful, a session for the user is automatically created. * * @param teamId Team ID. @@ -512,8 +478,6 @@ class Teams(client: Client) : Service(client) { } /** - * Get team preferences - * * Get the team's shared preferences by its unique ID. If a preference doesn't need to be shared by all team members, prefer storing them in [user preferences](https://appwrite.io/docs/references/cloud/client-web/account#getPrefs). * * @param teamId Team ID. @@ -530,7 +494,6 @@ class Teams(client: Client) : Service(client) { val apiParams = mutableMapOf<String, Any?>( ) val apiHeaders = mutableMapOf( - "content-type" to "application/json", ) val converter: (Any) -> io.appwrite.models.Preferences<T> = { io.appwrite.models.Preferences.from(map = it as Map<String, Any>, nestedType) @@ -546,8 +509,6 @@ class Teams(client: Client) : Service(client) { } /** - * Get team preferences - * * Get the team's shared preferences by its unique ID. If a preference doesn't need to be shared by all team members, prefer storing them in [user preferences](https://appwrite.io/docs/references/cloud/client-web/account#getPrefs). * * @param teamId Team ID. @@ -562,8 +523,6 @@ class Teams(client: Client) : Service(client) { ) /** - * Update preferences - * * Update the team's preferences by its unique ID. The object you pass is stored as is and replaces any previous value. The maximum allowed prefs size is 64kB and throws an error if exceeded. * * @param teamId Team ID. @@ -599,8 +558,6 @@ class Teams(client: Client) : Service(client) { } /** - * Update preferences - * * Update the team's preferences by its unique ID. The object you pass is stored as is and replaces any previous value. The maximum allowed prefs size is 64kB and throws an error if exceeded. * * @param teamId Team ID. diff --git a/src/main/kotlin/io/appwrite/services/Users.kt b/src/main/kotlin/io/appwrite/services/Users.kt index 00d266b..600b182 100644 --- a/src/main/kotlin/io/appwrite/services/Users.kt +++ b/src/main/kotlin/io/appwrite/services/Users.kt @@ -14,8 +14,6 @@ import java.io.File class Users(client: Client) : Service(client) { /** - * List users - * * Get a list of all the project's users. You can use the query params to filter your results. * * @param queries Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https://appwrite.io/docs/queries). Maximum of 100 queries are allowed, each 4096 characters long. You may filter on the following attributes: name, email, phone, status, passwordUpdate, registration, emailVerification, phoneVerification, labels @@ -36,7 +34,6 @@ class Users(client: Client) : Service(client) { "search" to search, ) val apiHeaders = mutableMapOf( - "content-type" to "application/json", ) val converter: (Any) -> io.appwrite.models.UserList<T> = { io.appwrite.models.UserList.from(map = it as Map<String, Any>, nestedType) @@ -52,8 +49,6 @@ class Users(client: Client) : Service(client) { } /** - * List users - * * Get a list of all the project's users. You can use the query params to filter your results. * * @param queries Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https://appwrite.io/docs/queries). Maximum of 100 queries are allowed, each 4096 characters long. You may filter on the following attributes: name, email, phone, status, passwordUpdate, registration, emailVerification, phoneVerification, labels @@ -72,8 +67,6 @@ class Users(client: Client) : Service(client) { ) /** - * Create user - * * Create a new user. * * @param userId User ID. Choose a custom ID or generate a random ID with `ID.unique()`. Valid chars are a-z, A-Z, 0-9, period, hyphen, and underscore. Can't start with a special char. Max length is 36 chars. @@ -119,8 +112,6 @@ class Users(client: Client) : Service(client) { } /** - * Create user - * * Create a new user. * * @param userId User ID. Choose a custom ID or generate a random ID with `ID.unique()`. Valid chars are a-z, A-Z, 0-9, period, hyphen, and underscore. Can't start with a special char. Max length is 36 chars. @@ -148,8 +139,6 @@ class Users(client: Client) : Service(client) { ) /** - * Create user with Argon2 password - * * Create a new user. Password provided must be hashed with the [Argon2](https://en.wikipedia.org/wiki/Argon2) algorithm. Use the [POST /users](https://appwrite.io/docs/server/users#usersCreate) endpoint to create users with a plain text password. * * @param userId User ID. Choose a custom ID or generate a random ID with `ID.unique()`. Valid chars are a-z, A-Z, 0-9, period, hyphen, and underscore. Can't start with a special char. Max length is 36 chars. @@ -192,8 +181,6 @@ class Users(client: Client) : Service(client) { } /** - * Create user with Argon2 password - * * Create a new user. Password provided must be hashed with the [Argon2](https://en.wikipedia.org/wiki/Argon2) algorithm. Use the [POST /users](https://appwrite.io/docs/server/users#usersCreate) endpoint to create users with a plain text password. * * @param userId User ID. Choose a custom ID or generate a random ID with `ID.unique()`. Valid chars are a-z, A-Z, 0-9, period, hyphen, and underscore. Can't start with a special char. Max length is 36 chars. @@ -218,8 +205,6 @@ class Users(client: Client) : Service(client) { ) /** - * Create user with bcrypt password - * * Create a new user. Password provided must be hashed with the [Bcrypt](https://en.wikipedia.org/wiki/Bcrypt) algorithm. Use the [POST /users](https://appwrite.io/docs/server/users#usersCreate) endpoint to create users with a plain text password. * * @param userId User ID. Choose a custom ID or generate a random ID with `ID.unique()`. Valid chars are a-z, A-Z, 0-9, period, hyphen, and underscore. Can't start with a special char. Max length is 36 chars. @@ -262,8 +247,6 @@ class Users(client: Client) : Service(client) { } /** - * Create user with bcrypt password - * * Create a new user. Password provided must be hashed with the [Bcrypt](https://en.wikipedia.org/wiki/Bcrypt) algorithm. Use the [POST /users](https://appwrite.io/docs/server/users#usersCreate) endpoint to create users with a plain text password. * * @param userId User ID. Choose a custom ID or generate a random ID with `ID.unique()`. Valid chars are a-z, A-Z, 0-9, period, hyphen, and underscore. Can't start with a special char. Max length is 36 chars. @@ -288,8 +271,6 @@ class Users(client: Client) : Service(client) { ) /** - * List identities - * * Get identities for all users. * * @param queries Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https://appwrite.io/docs/queries). Maximum of 100 queries are allowed, each 4096 characters long. You may filter on the following attributes: userId, provider, providerUid, providerEmail, providerAccessTokenExpiry @@ -309,7 +290,6 @@ class Users(client: Client) : Service(client) { "search" to search, ) val apiHeaders = mutableMapOf( - "content-type" to "application/json", ) val converter: (Any) -> io.appwrite.models.IdentityList = { io.appwrite.models.IdentityList.from(map = it as Map<String, Any>) @@ -325,8 +305,6 @@ class Users(client: Client) : Service(client) { } /** - * Delete identity - * * Delete an identity by its unique ID. * * @param identityId Identity ID. @@ -354,8 +332,6 @@ class Users(client: Client) : Service(client) { } /** - * Create user with MD5 password - * * Create a new user. Password provided must be hashed with the [MD5](https://en.wikipedia.org/wiki/MD5) algorithm. Use the [POST /users](https://appwrite.io/docs/server/users#usersCreate) endpoint to create users with a plain text password. * * @param userId User ID. Choose a custom ID or generate a random ID with `ID.unique()`. Valid chars are a-z, A-Z, 0-9, period, hyphen, and underscore. Can't start with a special char. Max length is 36 chars. @@ -398,8 +374,6 @@ class Users(client: Client) : Service(client) { } /** - * Create user with MD5 password - * * Create a new user. Password provided must be hashed with the [MD5](https://en.wikipedia.org/wiki/MD5) algorithm. Use the [POST /users](https://appwrite.io/docs/server/users#usersCreate) endpoint to create users with a plain text password. * * @param userId User ID. Choose a custom ID or generate a random ID with `ID.unique()`. Valid chars are a-z, A-Z, 0-9, period, hyphen, and underscore. Can't start with a special char. Max length is 36 chars. @@ -424,8 +398,6 @@ class Users(client: Client) : Service(client) { ) /** - * Create user with PHPass password - * * Create a new user. Password provided must be hashed with the [PHPass](https://www.openwall.com/phpass/) algorithm. Use the [POST /users](https://appwrite.io/docs/server/users#usersCreate) endpoint to create users with a plain text password. * * @param userId User ID. Choose a custom ID or pass the string `ID.unique()`to auto generate it. 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. @@ -468,8 +440,6 @@ class Users(client: Client) : Service(client) { } /** - * Create user with PHPass password - * * Create a new user. Password provided must be hashed with the [PHPass](https://www.openwall.com/phpass/) algorithm. Use the [POST /users](https://appwrite.io/docs/server/users#usersCreate) endpoint to create users with a plain text password. * * @param userId User ID. Choose a custom ID or pass the string `ID.unique()`to auto generate it. 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. @@ -494,8 +464,6 @@ class Users(client: Client) : Service(client) { ) /** - * Create user with Scrypt password - * * Create a new user. Password provided must be hashed with the [Scrypt](https://github.com/Tarsnap/scrypt) algorithm. Use the [POST /users](https://appwrite.io/docs/server/users#usersCreate) endpoint to create users with a plain text password. * * @param userId User ID. Choose a custom ID or generate a random ID with `ID.unique()`. Valid chars are a-z, A-Z, 0-9, period, hyphen, and underscore. Can't start with a special char. Max length is 36 chars. @@ -553,8 +521,6 @@ class Users(client: Client) : Service(client) { } /** - * Create user with Scrypt password - * * Create a new user. Password provided must be hashed with the [Scrypt](https://github.com/Tarsnap/scrypt) algorithm. Use the [POST /users](https://appwrite.io/docs/server/users#usersCreate) endpoint to create users with a plain text password. * * @param userId User ID. Choose a custom ID or generate a random ID with `ID.unique()`. Valid chars are a-z, A-Z, 0-9, period, hyphen, and underscore. Can't start with a special char. Max length is 36 chars. @@ -594,8 +560,6 @@ class Users(client: Client) : Service(client) { ) /** - * Create user with Scrypt modified password - * * Create a new user. Password provided must be hashed with the [Scrypt Modified](https://gist.github.com/Meldiron/eecf84a0225eccb5a378d45bb27462cc) algorithm. Use the [POST /users](https://appwrite.io/docs/server/users#usersCreate) endpoint to create users with a plain text password. * * @param userId User ID. Choose a custom ID or generate a random ID with `ID.unique()`. Valid chars are a-z, A-Z, 0-9, period, hyphen, and underscore. Can't start with a special char. Max length is 36 chars. @@ -647,8 +611,6 @@ class Users(client: Client) : Service(client) { } /** - * Create user with Scrypt modified password - * * Create a new user. Password provided must be hashed with the [Scrypt Modified](https://gist.github.com/Meldiron/eecf84a0225eccb5a378d45bb27462cc) algorithm. Use the [POST /users](https://appwrite.io/docs/server/users#usersCreate) endpoint to create users with a plain text password. * * @param userId User ID. Choose a custom ID or generate a random ID with `ID.unique()`. Valid chars are a-z, A-Z, 0-9, period, hyphen, and underscore. Can't start with a special char. Max length is 36 chars. @@ -682,8 +644,6 @@ class Users(client: Client) : Service(client) { ) /** - * Create user with SHA password - * * Create a new user. Password provided must be hashed with the [SHA](https://en.wikipedia.org/wiki/Secure_Hash_Algorithm) algorithm. Use the [POST /users](https://appwrite.io/docs/server/users#usersCreate) endpoint to create users with a plain text password. * * @param userId User ID. Choose a custom ID or generate a random ID with `ID.unique()`. Valid chars are a-z, A-Z, 0-9, period, hyphen, and underscore. Can't start with a special char. Max length is 36 chars. @@ -729,8 +689,6 @@ class Users(client: Client) : Service(client) { } /** - * Create user with SHA password - * * Create a new user. Password provided must be hashed with the [SHA](https://en.wikipedia.org/wiki/Secure_Hash_Algorithm) algorithm. Use the [POST /users](https://appwrite.io/docs/server/users#usersCreate) endpoint to create users with a plain text password. * * @param userId User ID. Choose a custom ID or generate a random ID with `ID.unique()`. Valid chars are a-z, A-Z, 0-9, period, hyphen, and underscore. Can't start with a special char. Max length is 36 chars. @@ -758,8 +716,6 @@ class Users(client: Client) : Service(client) { ) /** - * Get user - * * Get a user by its unique ID. * * @param userId User ID. @@ -776,7 +732,6 @@ class Users(client: Client) : Service(client) { val apiParams = mutableMapOf<String, Any?>( ) val apiHeaders = mutableMapOf( - "content-type" to "application/json", ) val converter: (Any) -> io.appwrite.models.User<T> = { io.appwrite.models.User.from(map = it as Map<String, Any>, nestedType) @@ -792,8 +747,6 @@ class Users(client: Client) : Service(client) { } /** - * Get user - * * Get a user by its unique ID. * * @param userId User ID. @@ -808,8 +761,6 @@ class Users(client: Client) : Service(client) { ) /** - * Delete user - * * Delete a user by its unique ID, thereby releasing it's ID. Since ID is released and can be reused, all user-related resources like documents or storage files should be deleted before user deletion. If you want to keep ID reserved, use the [updateStatus](https://appwrite.io/docs/server/users#usersUpdateStatus) endpoint instead. * * @param userId User ID. @@ -837,8 +788,6 @@ class Users(client: Client) : Service(client) { } /** - * Update email - * * Update the user email by its unique ID. * * @param userId User ID. @@ -874,8 +823,6 @@ class Users(client: Client) : Service(client) { } /** - * Update email - * * Update the user email by its unique ID. * * @param userId User ID. @@ -893,8 +840,6 @@ class Users(client: Client) : Service(client) { ) /** - * Create user JWT - * * Use this endpoint to create a JSON Web Token for user by its unique ID. You can use the resulting JWT to authenticate on behalf of the user. The JWT secret will become invalid if the session it uses gets deleted. * * @param userId User ID. @@ -933,8 +878,6 @@ class Users(client: Client) : Service(client) { } /** - * Update user labels - * * Update the user labels by its unique ID. Labels can be used to grant access to resources. While teams are a way for user's to share access to a resource, labels can be defined by the developer to grant access without an invitation. See the [Permissions docs](https://appwrite.io/docs/permissions) for more info. * * @param userId User ID. @@ -970,8 +913,6 @@ class Users(client: Client) : Service(client) { } /** - * Update user labels - * * Update the user labels by its unique ID. Labels can be used to grant access to resources. While teams are a way for user's to share access to a resource, labels can be defined by the developer to grant access without an invitation. See the [Permissions docs](https://appwrite.io/docs/permissions) for more info. * * @param userId User ID. @@ -989,8 +930,6 @@ class Users(client: Client) : Service(client) { ) /** - * List user logs - * * Get the user activity logs list by its unique ID. * * @param userId User ID. @@ -1010,7 +949,6 @@ class Users(client: Client) : Service(client) { "queries" to queries, ) val apiHeaders = mutableMapOf( - "content-type" to "application/json", ) val converter: (Any) -> io.appwrite.models.LogList = { io.appwrite.models.LogList.from(map = it as Map<String, Any>) @@ -1026,8 +964,6 @@ class Users(client: Client) : Service(client) { } /** - * List user memberships - * * Get the user membership list by its unique ID. * * @param userId User ID. @@ -1043,7 +979,6 @@ class Users(client: Client) : Service(client) { val apiParams = mutableMapOf<String, Any?>( ) val apiHeaders = mutableMapOf( - "content-type" to "application/json", ) val converter: (Any) -> io.appwrite.models.MembershipList = { io.appwrite.models.MembershipList.from(map = it as Map<String, Any>) @@ -1059,8 +994,6 @@ class Users(client: Client) : Service(client) { } /** - * Update MFA - * * Enable or disable MFA on a user account. * * @param userId User ID. @@ -1096,8 +1029,6 @@ class Users(client: Client) : Service(client) { } /** - * Update MFA - * * Enable or disable MFA on a user account. * * @param userId User ID. @@ -1115,8 +1046,6 @@ class Users(client: Client) : Service(client) { ) /** - * Delete authenticator - * * Delete an authenticator app. * * @param userId User ID. @@ -1147,8 +1076,6 @@ class Users(client: Client) : Service(client) { } /** - * List factors - * * List the factors available on the account to be used as a MFA challange. * * @param userId User ID. @@ -1164,7 +1091,6 @@ class Users(client: Client) : Service(client) { val apiParams = mutableMapOf<String, Any?>( ) val apiHeaders = mutableMapOf( - "content-type" to "application/json", ) val converter: (Any) -> io.appwrite.models.MfaFactors = { io.appwrite.models.MfaFactors.from(map = it as Map<String, Any>) @@ -1180,8 +1106,6 @@ class Users(client: Client) : Service(client) { } /** - * Get MFA recovery codes - * * Get recovery codes that can be used as backup for MFA flow by User ID. Before getting codes, they must be generated using [createMfaRecoveryCodes](/docs/references/cloud/client-web/account#createMfaRecoveryCodes) method. * * @param userId User ID. @@ -1197,7 +1121,6 @@ class Users(client: Client) : Service(client) { val apiParams = mutableMapOf<String, Any?>( ) val apiHeaders = mutableMapOf( - "content-type" to "application/json", ) val converter: (Any) -> io.appwrite.models.MfaRecoveryCodes = { io.appwrite.models.MfaRecoveryCodes.from(map = it as Map<String, Any>) @@ -1213,8 +1136,6 @@ class Users(client: Client) : Service(client) { } /** - * Regenerate MFA recovery codes - * * Regenerate recovery codes that can be used as backup for MFA flow by User ID. Before regenerating codes, they must be first generated using [createMfaRecoveryCodes](/docs/references/cloud/client-web/account#createMfaRecoveryCodes) method. * * @param userId User ID. @@ -1246,8 +1167,6 @@ class Users(client: Client) : Service(client) { } /** - * Create MFA recovery codes - * * Generate recovery codes used as backup for MFA flow for User ID. Recovery codes can be used as a MFA verification type in [createMfaChallenge](/docs/references/cloud/client-web/account#createMfaChallenge) method by client SDK. * * @param userId User ID. @@ -1279,8 +1198,6 @@ class Users(client: Client) : Service(client) { } /** - * Update name - * * Update the user name by its unique ID. * * @param userId User ID. @@ -1316,8 +1233,6 @@ class Users(client: Client) : Service(client) { } /** - * Update name - * * Update the user name by its unique ID. * * @param userId User ID. @@ -1335,8 +1250,6 @@ class Users(client: Client) : Service(client) { ) /** - * Update password - * * Update the user password by its unique ID. * * @param userId User ID. @@ -1372,8 +1285,6 @@ class Users(client: Client) : Service(client) { } /** - * Update password - * * Update the user password by its unique ID. * * @param userId User ID. @@ -1391,8 +1302,6 @@ class Users(client: Client) : Service(client) { ) /** - * Update phone - * * Update the user phone by its unique ID. * * @param userId User ID. @@ -1428,8 +1337,6 @@ class Users(client: Client) : Service(client) { } /** - * Update phone - * * Update the user phone by its unique ID. * * @param userId User ID. @@ -1447,8 +1354,6 @@ class Users(client: Client) : Service(client) { ) /** - * Get user preferences - * * Get the user preferences by its unique ID. * * @param userId User ID. @@ -1465,7 +1370,6 @@ class Users(client: Client) : Service(client) { val apiParams = mutableMapOf<String, Any?>( ) val apiHeaders = mutableMapOf( - "content-type" to "application/json", ) val converter: (Any) -> io.appwrite.models.Preferences<T> = { io.appwrite.models.Preferences.from(map = it as Map<String, Any>, nestedType) @@ -1481,8 +1385,6 @@ class Users(client: Client) : Service(client) { } /** - * Get user preferences - * * Get the user preferences by its unique ID. * * @param userId User ID. @@ -1497,8 +1399,6 @@ class Users(client: Client) : Service(client) { ) /** - * Update user preferences - * * Update the user preferences by its unique ID. The object you pass is stored as is, and replaces any previous value. The maximum allowed prefs size is 64kB and throws error if exceeded. * * @param userId User ID. @@ -1534,8 +1434,6 @@ class Users(client: Client) : Service(client) { } /** - * Update user preferences - * * Update the user preferences by its unique ID. The object you pass is stored as is, and replaces any previous value. The maximum allowed prefs size is 64kB and throws error if exceeded. * * @param userId User ID. @@ -1553,8 +1451,6 @@ class Users(client: Client) : Service(client) { ) /** - * List user sessions - * * Get the user sessions list by its unique ID. * * @param userId User ID. @@ -1570,7 +1466,6 @@ class Users(client: Client) : Service(client) { val apiParams = mutableMapOf<String, Any?>( ) val apiHeaders = mutableMapOf( - "content-type" to "application/json", ) val converter: (Any) -> io.appwrite.models.SessionList = { io.appwrite.models.SessionList.from(map = it as Map<String, Any>) @@ -1586,8 +1481,6 @@ class Users(client: Client) : Service(client) { } /** - * Create session - * * Creates a session for a user. Returns an immediately usable session object.If you want to generate a token for a custom authentication flow, use the [POST /users/{userId}/tokens](https://appwrite.io/docs/server/users#createToken) endpoint. * * @param userId User ID. Choose a custom ID or generate a random ID with `ID.unique()`. Valid chars are a-z, A-Z, 0-9, period, hyphen, and underscore. Can't start with a special char. Max length is 36 chars. @@ -1619,8 +1512,6 @@ class Users(client: Client) : Service(client) { } /** - * Delete user sessions - * * Delete all user's sessions by using the user's unique ID. * * @param userId User ID. @@ -1648,8 +1539,6 @@ class Users(client: Client) : Service(client) { } /** - * Delete user session - * * Delete a user sessions by its unique ID. * * @param userId User ID. @@ -1680,8 +1569,6 @@ class Users(client: Client) : Service(client) { } /** - * Update user status - * * Update the user status by its unique ID. Use this endpoint as an alternative to deleting a user if you want to keep user's ID reserved. * * @param userId User ID. @@ -1717,8 +1604,6 @@ class Users(client: Client) : Service(client) { } /** - * Update user status - * * Update the user status by its unique ID. Use this endpoint as an alternative to deleting a user if you want to keep user's ID reserved. * * @param userId User ID. @@ -1736,8 +1621,6 @@ class Users(client: Client) : Service(client) { ) /** - * List user targets - * * List the messaging targets that are associated with a user. * * @param userId User ID. @@ -1757,7 +1640,6 @@ class Users(client: Client) : Service(client) { "queries" to queries, ) val apiHeaders = mutableMapOf( - "content-type" to "application/json", ) val converter: (Any) -> io.appwrite.models.TargetList = { io.appwrite.models.TargetList.from(map = it as Map<String, Any>) @@ -1773,8 +1655,6 @@ class Users(client: Client) : Service(client) { } /** - * Create user target - * * Create a messaging target. * * @param userId User ID. @@ -1822,8 +1702,6 @@ class Users(client: Client) : Service(client) { } /** - * Get user target - * * Get a user's push notification target by ID. * * @param userId User ID. @@ -1842,7 +1720,6 @@ class Users(client: Client) : Service(client) { val apiParams = mutableMapOf<String, Any?>( ) val apiHeaders = mutableMapOf( - "content-type" to "application/json", ) val converter: (Any) -> io.appwrite.models.Target = { io.appwrite.models.Target.from(map = it as Map<String, Any>) @@ -1858,8 +1735,6 @@ class Users(client: Client) : Service(client) { } /** - * Update user target - * * Update a messaging target. * * @param userId User ID. @@ -1904,8 +1779,6 @@ class Users(client: Client) : Service(client) { } /** - * Delete user target - * * Delete a messaging target. * * @param userId User ID. @@ -1936,8 +1809,6 @@ class Users(client: Client) : Service(client) { } /** - * Create token - * * Returns a token with a secret key for creating a session. Use the user ID and secret and submit a request to the [PUT /account/sessions/token](https://appwrite.io/docs/references/cloud/client-web/account#createSession) endpoint to complete the login process. * * @param userId User ID. @@ -1976,8 +1847,6 @@ class Users(client: Client) : Service(client) { } /** - * Update email verification - * * Update the user email verification status by its unique ID. * * @param userId User ID. @@ -2013,8 +1882,6 @@ class Users(client: Client) : Service(client) { } /** - * Update email verification - * * Update the user email verification status by its unique ID. * * @param userId User ID. @@ -2032,8 +1899,6 @@ class Users(client: Client) : Service(client) { ) /** - * Update phone verification - * * Update the user phone verification status by its unique ID. * * @param userId User ID. @@ -2069,8 +1934,6 @@ class Users(client: Client) : Service(client) { } /** - * Update phone verification - * * Update the user phone verification status by its unique ID. * * @param userId User ID. From f8697b5c3c4a9ef51253b6007a6b6df4c23917bb Mon Sep 17 00:00:00 2001 From: loks0n <22452787+loks0n@users.noreply.github.com> Date: Thu, 17 Apr 2025 20:38:32 +0100 Subject: [PATCH 07/17] chore: major version bump --- README.md | 4 ++-- src/main/kotlin/io/appwrite/Client.kt | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/README.md b/README.md index c3201a1..e0b45f4 100644 --- a/README.md +++ b/README.md @@ -39,7 +39,7 @@ repositories { Next, add the dependency to your project's `build.gradle(.kts)` file: ```groovy -implementation("io.appwrite:sdk-for-kotlin:7.0.1") +implementation("io.appwrite:sdk-for-kotlin:8.0.0") ``` ### Maven @@ -50,7 +50,7 @@ Add this to your project's `pom.xml` file: <dependency> <groupId>io.appwrite</groupId> <artifactId>sdk-for-kotlin</artifactId> - <version>7.0.1</version> + <version>8.0.0</version> </dependency> </dependencies> ``` diff --git a/src/main/kotlin/io/appwrite/Client.kt b/src/main/kotlin/io/appwrite/Client.kt index fe533b6..2f5a476 100644 --- a/src/main/kotlin/io/appwrite/Client.kt +++ b/src/main/kotlin/io/appwrite/Client.kt @@ -58,11 +58,11 @@ class Client @JvmOverloads constructor( init { headers = mutableMapOf( "content-type" to "application/json", - "user-agent" to "AppwriteKotlinSDK/7.0.1 ${System.getProperty("http.agent")}", + "user-agent" to "AppwriteKotlinSDK/8.0.0 ${System.getProperty("http.agent")}", "x-sdk-name" to "Kotlin", "x-sdk-platform" to "server", "x-sdk-language" to "kotlin", - "x-sdk-version" to "7.0.1", + "x-sdk-version" to "8.0.0", "x-appwrite-response-format" to "1.6.0", ) From 7ec590437451c68e607bf0da76431c8dd03c9dbf Mon Sep 17 00:00:00 2001 From: root <chiragaggarwal5k@gmail.com> Date: Thu, 24 Apr 2025 16:17:06 +0000 Subject: [PATCH 08/17] chore: regenerate sdk --- .../java/account/create-anonymous-session.md | 2 +- .../account/create-email-password-session.md | 2 +- .../java/account/create-email-token.md | 2 +- docs/examples/java/account/create-j-w-t.md | 2 +- .../java/account/create-magic-u-r-l-token.md | 2 +- .../java/account/create-mfa-authenticator.md | 2 +- .../java/account/create-mfa-challenge.md | 2 +- .../java/account/create-mfa-recovery-codes.md | 2 +- .../java/account/create-o-auth2token.md | 2 +- .../java/account/create-phone-token.md | 2 +- .../java/account/create-phone-verification.md | 2 +- docs/examples/java/account/create-recovery.md | 2 +- docs/examples/java/account/create-session.md | 2 +- .../java/account/create-verification.md | 2 +- docs/examples/java/account/create.md | 2 +- docs/examples/java/account/delete-identity.md | 2 +- .../java/account/delete-mfa-authenticator.md | 2 +- docs/examples/java/account/delete-session.md | 2 +- docs/examples/java/account/delete-sessions.md | 2 +- .../java/account/get-mfa-recovery-codes.md | 2 +- docs/examples/java/account/get-prefs.md | 2 +- docs/examples/java/account/get-session.md | 2 +- docs/examples/java/account/get.md | 2 +- docs/examples/java/account/list-identities.md | 2 +- docs/examples/java/account/list-logs.md | 2 +- .../examples/java/account/list-mfa-factors.md | 2 +- docs/examples/java/account/list-sessions.md | 2 +- docs/examples/java/account/update-email.md | 2 +- docs/examples/java/account/update-m-f-a.md | 2 +- .../account/update-magic-u-r-l-session.md | 2 +- .../java/account/update-mfa-authenticator.md | 2 +- .../java/account/update-mfa-challenge.md | 2 +- .../java/account/update-mfa-recovery-codes.md | 2 +- docs/examples/java/account/update-name.md | 2 +- docs/examples/java/account/update-password.md | 2 +- .../java/account/update-phone-session.md | 2 +- .../java/account/update-phone-verification.md | 2 +- docs/examples/java/account/update-phone.md | 2 +- docs/examples/java/account/update-prefs.md | 2 +- docs/examples/java/account/update-recovery.md | 2 +- docs/examples/java/account/update-session.md | 2 +- docs/examples/java/account/update-status.md | 2 +- .../java/account/update-verification.md | 2 +- docs/examples/java/avatars/get-browser.md | 2 +- docs/examples/java/avatars/get-credit-card.md | 2 +- docs/examples/java/avatars/get-favicon.md | 2 +- docs/examples/java/avatars/get-flag.md | 2 +- docs/examples/java/avatars/get-image.md | 2 +- docs/examples/java/avatars/get-initials.md | 2 +- docs/examples/java/avatars/get-q-r.md | 2 +- .../databases/create-boolean-attribute.md | 2 +- .../java/databases/create-collection.md | 2 +- .../databases/create-datetime-attribute.md | 2 +- .../java/databases/create-document.md | 2 +- .../java/databases/create-email-attribute.md | 2 +- .../java/databases/create-enum-attribute.md | 2 +- .../java/databases/create-float-attribute.md | 2 +- docs/examples/java/databases/create-index.md | 2 +- .../databases/create-integer-attribute.md | 2 +- .../java/databases/create-ip-attribute.md | 2 +- .../create-relationship-attribute.md | 2 +- .../java/databases/create-string-attribute.md | 2 +- .../java/databases/create-url-attribute.md | 2 +- docs/examples/java/databases/create.md | 2 +- .../java/databases/delete-attribute.md | 2 +- .../java/databases/delete-collection.md | 2 +- .../java/databases/delete-document.md | 2 +- docs/examples/java/databases/delete-index.md | 2 +- docs/examples/java/databases/delete.md | 2 +- docs/examples/java/databases/get-attribute.md | 2 +- .../examples/java/databases/get-collection.md | 2 +- docs/examples/java/databases/get-document.md | 2 +- docs/examples/java/databases/get-index.md | 2 +- docs/examples/java/databases/get.md | 2 +- .../java/databases/list-attributes.md | 2 +- .../java/databases/list-collections.md | 2 +- .../examples/java/databases/list-documents.md | 2 +- docs/examples/java/databases/list-indexes.md | 2 +- docs/examples/java/databases/list.md | 2 +- .../databases/update-boolean-attribute.md | 2 +- .../java/databases/update-collection.md | 2 +- .../databases/update-datetime-attribute.md | 2 +- .../java/databases/update-document.md | 2 +- .../java/databases/update-email-attribute.md | 2 +- .../java/databases/update-enum-attribute.md | 2 +- .../java/databases/update-float-attribute.md | 2 +- .../databases/update-integer-attribute.md | 2 +- .../java/databases/update-ip-attribute.md | 2 +- .../update-relationship-attribute.md | 2 +- .../java/databases/update-string-attribute.md | 2 +- .../java/databases/update-url-attribute.md | 2 +- docs/examples/java/databases/update.md | 2 +- docs/examples/java/functions/create-build.md | 2 +- .../java/functions/create-deployment.md | 2 +- .../java/functions/create-execution.md | 2 +- .../java/functions/create-variable.md | 2 +- docs/examples/java/functions/create.md | 2 +- .../java/functions/delete-deployment.md | 2 +- .../java/functions/delete-execution.md | 2 +- .../java/functions/delete-variable.md | 2 +- docs/examples/java/functions/delete.md | 2 +- .../java/functions/get-deployment-download.md | 2 +- .../examples/java/functions/get-deployment.md | 2 +- docs/examples/java/functions/get-execution.md | 2 +- docs/examples/java/functions/get-variable.md | 2 +- docs/examples/java/functions/get.md | 2 +- .../java/functions/list-deployments.md | 2 +- .../java/functions/list-executions.md | 2 +- docs/examples/java/functions/list-runtimes.md | 2 +- .../java/functions/list-specifications.md | 2 +- .../examples/java/functions/list-variables.md | 2 +- docs/examples/java/functions/list.md | 2 +- .../java/functions/update-deployment-build.md | 2 +- .../java/functions/update-deployment.md | 2 +- .../java/functions/update-variable.md | 2 +- docs/examples/java/functions/update.md | 2 +- docs/examples/java/graphql/mutation.md | 2 +- docs/examples/java/graphql/query.md | 2 +- docs/examples/java/health/get-antivirus.md | 2 +- docs/examples/java/health/get-cache.md | 2 +- docs/examples/java/health/get-certificate.md | 2 +- docs/examples/java/health/get-d-b.md | 2 +- docs/examples/java/health/get-failed-jobs.md | 2 +- docs/examples/java/health/get-pub-sub.md | 2 +- docs/examples/java/health/get-queue-builds.md | 2 +- .../java/health/get-queue-certificates.md | 2 +- .../java/health/get-queue-databases.md | 2 +- .../examples/java/health/get-queue-deletes.md | 2 +- .../java/health/get-queue-functions.md | 2 +- docs/examples/java/health/get-queue-logs.md | 2 +- docs/examples/java/health/get-queue-mails.md | 2 +- .../java/health/get-queue-messaging.md | 2 +- .../java/health/get-queue-migrations.md | 2 +- .../java/health/get-queue-stats-resources.md | 2 +- docs/examples/java/health/get-queue-usage.md | 2 +- .../java/health/get-queue-webhooks.md | 2 +- .../examples/java/health/get-storage-local.md | 2 +- docs/examples/java/health/get-storage.md | 2 +- docs/examples/java/health/get-time.md | 2 +- docs/examples/java/health/get.md | 2 +- docs/examples/java/locale/get.md | 2 +- docs/examples/java/locale/list-codes.md | 2 +- docs/examples/java/locale/list-continents.md | 2 +- .../java/locale/list-countries-e-u.md | 2 +- .../java/locale/list-countries-phones.md | 2 +- docs/examples/java/locale/list-countries.md | 2 +- docs/examples/java/locale/list-currencies.md | 2 +- docs/examples/java/locale/list-languages.md | 2 +- .../java/messaging/create-apns-provider.md | 2 +- docs/examples/java/messaging/create-email.md | 2 +- .../java/messaging/create-fcm-provider.md | 2 +- .../java/messaging/create-mailgun-provider.md | 2 +- .../java/messaging/create-msg91provider.md | 2 +- docs/examples/java/messaging/create-push.md | 2 +- .../messaging/create-sendgrid-provider.md | 2 +- docs/examples/java/messaging/create-sms.md | 2 +- .../java/messaging/create-smtp-provider.md | 2 +- .../java/messaging/create-subscriber.md | 2 +- .../messaging/create-telesign-provider.md | 2 +- .../messaging/create-textmagic-provider.md | 2 +- docs/examples/java/messaging/create-topic.md | 2 +- .../java/messaging/create-twilio-provider.md | 2 +- .../java/messaging/create-vonage-provider.md | 2 +- .../java/messaging/delete-provider.md | 2 +- .../java/messaging/delete-subscriber.md | 2 +- docs/examples/java/messaging/delete-topic.md | 2 +- docs/examples/java/messaging/delete.md | 2 +- docs/examples/java/messaging/get-message.md | 2 +- docs/examples/java/messaging/get-provider.md | 2 +- .../examples/java/messaging/get-subscriber.md | 2 +- docs/examples/java/messaging/get-topic.md | 2 +- .../java/messaging/list-message-logs.md | 2 +- docs/examples/java/messaging/list-messages.md | 2 +- .../java/messaging/list-provider-logs.md | 2 +- .../examples/java/messaging/list-providers.md | 2 +- .../java/messaging/list-subscriber-logs.md | 2 +- .../java/messaging/list-subscribers.md | 2 +- docs/examples/java/messaging/list-targets.md | 2 +- .../java/messaging/list-topic-logs.md | 2 +- docs/examples/java/messaging/list-topics.md | 2 +- .../java/messaging/update-apns-provider.md | 2 +- docs/examples/java/messaging/update-email.md | 2 +- .../java/messaging/update-fcm-provider.md | 2 +- .../java/messaging/update-mailgun-provider.md | 2 +- .../java/messaging/update-msg91provider.md | 2 +- docs/examples/java/messaging/update-push.md | 2 +- .../messaging/update-sendgrid-provider.md | 2 +- docs/examples/java/messaging/update-sms.md | 2 +- .../java/messaging/update-smtp-provider.md | 2 +- .../messaging/update-telesign-provider.md | 2 +- .../messaging/update-textmagic-provider.md | 2 +- docs/examples/java/messaging/update-topic.md | 2 +- .../java/messaging/update-twilio-provider.md | 2 +- .../java/messaging/update-vonage-provider.md | 2 +- docs/examples/java/storage/create-bucket.md | 2 +- docs/examples/java/storage/create-file.md | 2 +- docs/examples/java/storage/delete-bucket.md | 2 +- docs/examples/java/storage/delete-file.md | 2 +- docs/examples/java/storage/get-bucket.md | 2 +- .../java/storage/get-file-download.md | 2 +- .../examples/java/storage/get-file-preview.md | 2 +- docs/examples/java/storage/get-file-view.md | 2 +- docs/examples/java/storage/get-file.md | 2 +- docs/examples/java/storage/list-buckets.md | 2 +- docs/examples/java/storage/list-files.md | 2 +- docs/examples/java/storage/update-bucket.md | 2 +- docs/examples/java/storage/update-file.md | 2 +- docs/examples/java/teams/create-membership.md | 2 +- docs/examples/java/teams/create.md | 2 +- docs/examples/java/teams/delete-membership.md | 2 +- docs/examples/java/teams/delete.md | 2 +- docs/examples/java/teams/get-membership.md | 2 +- docs/examples/java/teams/get-prefs.md | 2 +- docs/examples/java/teams/get.md | 2 +- docs/examples/java/teams/list-memberships.md | 2 +- docs/examples/java/teams/list.md | 2 +- .../java/teams/update-membership-status.md | 2 +- docs/examples/java/teams/update-membership.md | 2 +- docs/examples/java/teams/update-name.md | 2 +- docs/examples/java/teams/update-prefs.md | 2 +- docs/examples/java/users/create-argon2user.md | 2 +- .../examples/java/users/create-bcrypt-user.md | 2 +- docs/examples/java/users/create-j-w-t.md | 2 +- docs/examples/java/users/create-m-d5user.md | 2 +- .../java/users/create-mfa-recovery-codes.md | 2 +- .../java/users/create-p-h-pass-user.md | 2 +- docs/examples/java/users/create-s-h-a-user.md | 2 +- .../java/users/create-scrypt-modified-user.md | 2 +- .../examples/java/users/create-scrypt-user.md | 2 +- docs/examples/java/users/create-session.md | 2 +- docs/examples/java/users/create-target.md | 2 +- docs/examples/java/users/create-token.md | 2 +- docs/examples/java/users/create.md | 2 +- docs/examples/java/users/delete-identity.md | 2 +- .../java/users/delete-mfa-authenticator.md | 2 +- docs/examples/java/users/delete-session.md | 2 +- docs/examples/java/users/delete-sessions.md | 2 +- docs/examples/java/users/delete-target.md | 2 +- docs/examples/java/users/delete.md | 2 +- .../java/users/get-mfa-recovery-codes.md | 2 +- docs/examples/java/users/get-prefs.md | 2 +- docs/examples/java/users/get-target.md | 2 +- docs/examples/java/users/get.md | 2 +- docs/examples/java/users/list-identities.md | 2 +- docs/examples/java/users/list-logs.md | 2 +- docs/examples/java/users/list-memberships.md | 2 +- docs/examples/java/users/list-mfa-factors.md | 2 +- docs/examples/java/users/list-sessions.md | 2 +- docs/examples/java/users/list-targets.md | 2 +- docs/examples/java/users/list.md | 2 +- .../java/users/update-email-verification.md | 2 +- docs/examples/java/users/update-email.md | 2 +- docs/examples/java/users/update-labels.md | 2 +- .../java/users/update-mfa-recovery-codes.md | 2 +- docs/examples/java/users/update-mfa.md | 2 +- docs/examples/java/users/update-name.md | 2 +- docs/examples/java/users/update-password.md | 2 +- .../java/users/update-phone-verification.md | 2 +- docs/examples/java/users/update-phone.md | 2 +- docs/examples/java/users/update-prefs.md | 2 +- docs/examples/java/users/update-status.md | 2 +- docs/examples/java/users/update-target.md | 2 +- .../account/create-anonymous-session.md | 2 +- .../account/create-email-password-session.md | 2 +- .../kotlin/account/create-email-token.md | 2 +- docs/examples/kotlin/account/create-j-w-t.md | 2 +- .../account/create-magic-u-r-l-token.md | 2 +- .../account/create-mfa-authenticator.md | 2 +- .../kotlin/account/create-mfa-challenge.md | 2 +- .../account/create-mfa-recovery-codes.md | 2 +- .../kotlin/account/create-o-auth2token.md | 2 +- .../kotlin/account/create-phone-token.md | 2 +- .../account/create-phone-verification.md | 2 +- .../kotlin/account/create-recovery.md | 2 +- .../examples/kotlin/account/create-session.md | 2 +- .../kotlin/account/create-verification.md | 2 +- docs/examples/kotlin/account/create.md | 2 +- .../kotlin/account/delete-identity.md | 2 +- .../account/delete-mfa-authenticator.md | 2 +- .../examples/kotlin/account/delete-session.md | 2 +- .../kotlin/account/delete-sessions.md | 2 +- .../kotlin/account/get-mfa-recovery-codes.md | 2 +- docs/examples/kotlin/account/get-prefs.md | 2 +- docs/examples/kotlin/account/get-session.md | 2 +- docs/examples/kotlin/account/get.md | 2 +- .../kotlin/account/list-identities.md | 2 +- docs/examples/kotlin/account/list-logs.md | 2 +- .../kotlin/account/list-mfa-factors.md | 2 +- docs/examples/kotlin/account/list-sessions.md | 2 +- docs/examples/kotlin/account/update-email.md | 2 +- docs/examples/kotlin/account/update-m-f-a.md | 2 +- .../account/update-magic-u-r-l-session.md | 2 +- .../account/update-mfa-authenticator.md | 2 +- .../kotlin/account/update-mfa-challenge.md | 2 +- .../account/update-mfa-recovery-codes.md | 2 +- docs/examples/kotlin/account/update-name.md | 2 +- .../kotlin/account/update-password.md | 2 +- .../kotlin/account/update-phone-session.md | 2 +- .../account/update-phone-verification.md | 2 +- docs/examples/kotlin/account/update-phone.md | 2 +- docs/examples/kotlin/account/update-prefs.md | 2 +- .../kotlin/account/update-recovery.md | 2 +- .../examples/kotlin/account/update-session.md | 2 +- docs/examples/kotlin/account/update-status.md | 2 +- .../kotlin/account/update-verification.md | 2 +- docs/examples/kotlin/avatars/get-browser.md | 2 +- .../kotlin/avatars/get-credit-card.md | 2 +- docs/examples/kotlin/avatars/get-favicon.md | 2 +- docs/examples/kotlin/avatars/get-flag.md | 2 +- docs/examples/kotlin/avatars/get-image.md | 2 +- docs/examples/kotlin/avatars/get-initials.md | 2 +- docs/examples/kotlin/avatars/get-q-r.md | 2 +- .../databases/create-boolean-attribute.md | 2 +- .../kotlin/databases/create-collection.md | 2 +- .../databases/create-datetime-attribute.md | 2 +- .../kotlin/databases/create-document.md | 2 +- .../databases/create-email-attribute.md | 2 +- .../kotlin/databases/create-enum-attribute.md | 2 +- .../databases/create-float-attribute.md | 2 +- .../examples/kotlin/databases/create-index.md | 2 +- .../databases/create-integer-attribute.md | 2 +- .../kotlin/databases/create-ip-attribute.md | 2 +- .../create-relationship-attribute.md | 2 +- .../databases/create-string-attribute.md | 2 +- .../kotlin/databases/create-url-attribute.md | 2 +- docs/examples/kotlin/databases/create.md | 2 +- .../kotlin/databases/delete-attribute.md | 2 +- .../kotlin/databases/delete-collection.md | 2 +- .../kotlin/databases/delete-document.md | 2 +- .../examples/kotlin/databases/delete-index.md | 2 +- docs/examples/kotlin/databases/delete.md | 2 +- .../kotlin/databases/get-attribute.md | 2 +- .../kotlin/databases/get-collection.md | 2 +- .../examples/kotlin/databases/get-document.md | 2 +- docs/examples/kotlin/databases/get-index.md | 2 +- docs/examples/kotlin/databases/get.md | 2 +- .../kotlin/databases/list-attributes.md | 2 +- .../kotlin/databases/list-collections.md | 2 +- .../kotlin/databases/list-documents.md | 2 +- .../examples/kotlin/databases/list-indexes.md | 2 +- docs/examples/kotlin/databases/list.md | 2 +- .../databases/update-boolean-attribute.md | 2 +- .../kotlin/databases/update-collection.md | 2 +- .../databases/update-datetime-attribute.md | 2 +- .../kotlin/databases/update-document.md | 2 +- .../databases/update-email-attribute.md | 2 +- .../kotlin/databases/update-enum-attribute.md | 2 +- .../databases/update-float-attribute.md | 2 +- .../databases/update-integer-attribute.md | 2 +- .../kotlin/databases/update-ip-attribute.md | 2 +- .../update-relationship-attribute.md | 2 +- .../databases/update-string-attribute.md | 2 +- .../kotlin/databases/update-url-attribute.md | 2 +- docs/examples/kotlin/databases/update.md | 2 +- .../examples/kotlin/functions/create-build.md | 2 +- .../kotlin/functions/create-deployment.md | 2 +- .../kotlin/functions/create-execution.md | 2 +- .../kotlin/functions/create-variable.md | 2 +- docs/examples/kotlin/functions/create.md | 2 +- .../kotlin/functions/delete-deployment.md | 2 +- .../kotlin/functions/delete-execution.md | 2 +- .../kotlin/functions/delete-variable.md | 2 +- docs/examples/kotlin/functions/delete.md | 2 +- .../functions/get-deployment-download.md | 2 +- .../kotlin/functions/get-deployment.md | 2 +- .../kotlin/functions/get-execution.md | 2 +- .../examples/kotlin/functions/get-variable.md | 2 +- docs/examples/kotlin/functions/get.md | 2 +- .../kotlin/functions/list-deployments.md | 2 +- .../kotlin/functions/list-executions.md | 2 +- .../kotlin/functions/list-runtimes.md | 2 +- .../kotlin/functions/list-specifications.md | 2 +- .../kotlin/functions/list-variables.md | 2 +- docs/examples/kotlin/functions/list.md | 2 +- .../functions/update-deployment-build.md | 2 +- .../kotlin/functions/update-deployment.md | 2 +- .../kotlin/functions/update-variable.md | 2 +- docs/examples/kotlin/functions/update.md | 2 +- docs/examples/kotlin/graphql/mutation.md | 2 +- docs/examples/kotlin/graphql/query.md | 2 +- docs/examples/kotlin/health/get-antivirus.md | 2 +- docs/examples/kotlin/health/get-cache.md | 2 +- .../examples/kotlin/health/get-certificate.md | 2 +- docs/examples/kotlin/health/get-d-b.md | 2 +- .../examples/kotlin/health/get-failed-jobs.md | 2 +- docs/examples/kotlin/health/get-pub-sub.md | 2 +- .../kotlin/health/get-queue-builds.md | 2 +- .../kotlin/health/get-queue-certificates.md | 2 +- .../kotlin/health/get-queue-databases.md | 2 +- .../kotlin/health/get-queue-deletes.md | 2 +- .../kotlin/health/get-queue-functions.md | 2 +- docs/examples/kotlin/health/get-queue-logs.md | 2 +- .../examples/kotlin/health/get-queue-mails.md | 2 +- .../kotlin/health/get-queue-messaging.md | 2 +- .../kotlin/health/get-queue-migrations.md | 2 +- .../health/get-queue-stats-resources.md | 2 +- .../examples/kotlin/health/get-queue-usage.md | 2 +- .../kotlin/health/get-queue-webhooks.md | 2 +- .../kotlin/health/get-storage-local.md | 2 +- docs/examples/kotlin/health/get-storage.md | 2 +- docs/examples/kotlin/health/get-time.md | 2 +- docs/examples/kotlin/health/get.md | 2 +- docs/examples/kotlin/locale/get.md | 2 +- docs/examples/kotlin/locale/list-codes.md | 2 +- .../examples/kotlin/locale/list-continents.md | 2 +- .../kotlin/locale/list-countries-e-u.md | 2 +- .../kotlin/locale/list-countries-phones.md | 2 +- docs/examples/kotlin/locale/list-countries.md | 2 +- .../examples/kotlin/locale/list-currencies.md | 2 +- docs/examples/kotlin/locale/list-languages.md | 2 +- .../kotlin/messaging/create-apns-provider.md | 2 +- .../examples/kotlin/messaging/create-email.md | 2 +- .../kotlin/messaging/create-fcm-provider.md | 2 +- .../messaging/create-mailgun-provider.md | 2 +- .../kotlin/messaging/create-msg91provider.md | 2 +- docs/examples/kotlin/messaging/create-push.md | 2 +- .../messaging/create-sendgrid-provider.md | 2 +- docs/examples/kotlin/messaging/create-sms.md | 2 +- .../kotlin/messaging/create-smtp-provider.md | 2 +- .../kotlin/messaging/create-subscriber.md | 2 +- .../messaging/create-telesign-provider.md | 2 +- .../messaging/create-textmagic-provider.md | 2 +- .../examples/kotlin/messaging/create-topic.md | 2 +- .../messaging/create-twilio-provider.md | 2 +- .../messaging/create-vonage-provider.md | 2 +- .../kotlin/messaging/delete-provider.md | 2 +- .../kotlin/messaging/delete-subscriber.md | 2 +- .../examples/kotlin/messaging/delete-topic.md | 2 +- docs/examples/kotlin/messaging/delete.md | 2 +- docs/examples/kotlin/messaging/get-message.md | 2 +- .../examples/kotlin/messaging/get-provider.md | 2 +- .../kotlin/messaging/get-subscriber.md | 2 +- docs/examples/kotlin/messaging/get-topic.md | 2 +- .../kotlin/messaging/list-message-logs.md | 2 +- .../kotlin/messaging/list-messages.md | 2 +- .../kotlin/messaging/list-provider-logs.md | 2 +- .../kotlin/messaging/list-providers.md | 2 +- .../kotlin/messaging/list-subscriber-logs.md | 2 +- .../kotlin/messaging/list-subscribers.md | 2 +- .../examples/kotlin/messaging/list-targets.md | 2 +- .../kotlin/messaging/list-topic-logs.md | 2 +- docs/examples/kotlin/messaging/list-topics.md | 2 +- .../kotlin/messaging/update-apns-provider.md | 2 +- .../examples/kotlin/messaging/update-email.md | 2 +- .../kotlin/messaging/update-fcm-provider.md | 2 +- .../messaging/update-mailgun-provider.md | 2 +- .../kotlin/messaging/update-msg91provider.md | 2 +- docs/examples/kotlin/messaging/update-push.md | 2 +- .../messaging/update-sendgrid-provider.md | 2 +- docs/examples/kotlin/messaging/update-sms.md | 2 +- .../kotlin/messaging/update-smtp-provider.md | 2 +- .../messaging/update-telesign-provider.md | 2 +- .../messaging/update-textmagic-provider.md | 2 +- .../examples/kotlin/messaging/update-topic.md | 2 +- .../messaging/update-twilio-provider.md | 2 +- .../messaging/update-vonage-provider.md | 2 +- docs/examples/kotlin/storage/create-bucket.md | 2 +- docs/examples/kotlin/storage/create-file.md | 2 +- docs/examples/kotlin/storage/delete-bucket.md | 2 +- docs/examples/kotlin/storage/delete-file.md | 2 +- docs/examples/kotlin/storage/get-bucket.md | 2 +- .../kotlin/storage/get-file-download.md | 2 +- .../kotlin/storage/get-file-preview.md | 2 +- docs/examples/kotlin/storage/get-file-view.md | 2 +- docs/examples/kotlin/storage/get-file.md | 2 +- docs/examples/kotlin/storage/list-buckets.md | 2 +- docs/examples/kotlin/storage/list-files.md | 2 +- docs/examples/kotlin/storage/update-bucket.md | 2 +- docs/examples/kotlin/storage/update-file.md | 2 +- .../kotlin/teams/create-membership.md | 2 +- docs/examples/kotlin/teams/create.md | 2 +- .../kotlin/teams/delete-membership.md | 2 +- docs/examples/kotlin/teams/delete.md | 2 +- docs/examples/kotlin/teams/get-membership.md | 2 +- docs/examples/kotlin/teams/get-prefs.md | 2 +- docs/examples/kotlin/teams/get.md | 2 +- .../examples/kotlin/teams/list-memberships.md | 2 +- docs/examples/kotlin/teams/list.md | 2 +- .../kotlin/teams/update-membership-status.md | 2 +- .../kotlin/teams/update-membership.md | 2 +- docs/examples/kotlin/teams/update-name.md | 2 +- docs/examples/kotlin/teams/update-prefs.md | 2 +- .../kotlin/users/create-argon2user.md | 2 +- .../kotlin/users/create-bcrypt-user.md | 2 +- docs/examples/kotlin/users/create-j-w-t.md | 2 +- docs/examples/kotlin/users/create-m-d5user.md | 2 +- .../kotlin/users/create-mfa-recovery-codes.md | 2 +- .../kotlin/users/create-p-h-pass-user.md | 2 +- .../kotlin/users/create-s-h-a-user.md | 2 +- .../users/create-scrypt-modified-user.md | 2 +- .../kotlin/users/create-scrypt-user.md | 2 +- docs/examples/kotlin/users/create-session.md | 2 +- docs/examples/kotlin/users/create-target.md | 2 +- docs/examples/kotlin/users/create-token.md | 2 +- docs/examples/kotlin/users/create.md | 2 +- docs/examples/kotlin/users/delete-identity.md | 2 +- .../kotlin/users/delete-mfa-authenticator.md | 2 +- docs/examples/kotlin/users/delete-session.md | 2 +- docs/examples/kotlin/users/delete-sessions.md | 2 +- docs/examples/kotlin/users/delete-target.md | 2 +- docs/examples/kotlin/users/delete.md | 2 +- .../kotlin/users/get-mfa-recovery-codes.md | 2 +- docs/examples/kotlin/users/get-prefs.md | 2 +- docs/examples/kotlin/users/get-target.md | 2 +- docs/examples/kotlin/users/get.md | 2 +- docs/examples/kotlin/users/list-identities.md | 2 +- docs/examples/kotlin/users/list-logs.md | 2 +- .../examples/kotlin/users/list-memberships.md | 2 +- .../examples/kotlin/users/list-mfa-factors.md | 2 +- docs/examples/kotlin/users/list-sessions.md | 2 +- docs/examples/kotlin/users/list-targets.md | 2 +- docs/examples/kotlin/users/list.md | 2 +- .../kotlin/users/update-email-verification.md | 2 +- docs/examples/kotlin/users/update-email.md | 2 +- docs/examples/kotlin/users/update-labels.md | 2 +- .../kotlin/users/update-mfa-recovery-codes.md | 2 +- docs/examples/kotlin/users/update-mfa.md | 2 +- docs/examples/kotlin/users/update-name.md | 2 +- docs/examples/kotlin/users/update-password.md | 2 +- .../kotlin/users/update-phone-verification.md | 2 +- docs/examples/kotlin/users/update-phone.md | 2 +- docs/examples/kotlin/users/update-prefs.md | 2 +- docs/examples/kotlin/users/update-status.md | 2 +- docs/examples/kotlin/users/update-target.md | 2 +- .../kotlin/io/appwrite/services/Account.kt | 86 ++++++++--------- .../kotlin/io/appwrite/services/Avatars.kt | 14 +-- .../kotlin/io/appwrite/services/Databases.kt | 84 ++++++++--------- .../kotlin/io/appwrite/services/Functions.kt | 48 +++++----- .../kotlin/io/appwrite/services/Graphql.kt | 4 +- .../kotlin/io/appwrite/services/Health.kt | 44 ++++----- .../kotlin/io/appwrite/services/Locale.kt | 16 ++-- .../kotlin/io/appwrite/services/Messaging.kt | 92 +++++++++---------- .../kotlin/io/appwrite/services/Storage.kt | 26 +++--- src/main/kotlin/io/appwrite/services/Teams.kt | 26 +++--- src/main/kotlin/io/appwrite/services/Users.kt | 84 ++++++++--------- 535 files changed, 786 insertions(+), 786 deletions(-) diff --git a/docs/examples/java/account/create-anonymous-session.md b/docs/examples/java/account/create-anonymous-session.md index 0ba9c69..d65c20a 100644 --- a/docs/examples/java/account/create-anonymous-session.md +++ b/docs/examples/java/account/create-anonymous-session.md @@ -3,7 +3,7 @@ import io.appwrite.coroutines.CoroutineCallback; import io.appwrite.services.Account; Client client = new Client() - .setEndpoint("https://cloud.appwrite.io/v1") // Your API Endpoint + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint .setProject("<YOUR_PROJECT_ID>"); // Your project ID Account account = new Account(client); diff --git a/docs/examples/java/account/create-email-password-session.md b/docs/examples/java/account/create-email-password-session.md index 75fa73f..6339310 100644 --- a/docs/examples/java/account/create-email-password-session.md +++ b/docs/examples/java/account/create-email-password-session.md @@ -3,7 +3,7 @@ import io.appwrite.coroutines.CoroutineCallback; import io.appwrite.services.Account; Client client = new Client() - .setEndpoint("https://cloud.appwrite.io/v1") // Your API Endpoint + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint .setProject("<YOUR_PROJECT_ID>"); // Your project ID Account account = new Account(client); diff --git a/docs/examples/java/account/create-email-token.md b/docs/examples/java/account/create-email-token.md index eff6d43..7a6a0d7 100644 --- a/docs/examples/java/account/create-email-token.md +++ b/docs/examples/java/account/create-email-token.md @@ -3,7 +3,7 @@ import io.appwrite.coroutines.CoroutineCallback; import io.appwrite.services.Account; Client client = new Client() - .setEndpoint("https://cloud.appwrite.io/v1") // Your API Endpoint + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint .setProject("<YOUR_PROJECT_ID>"); // Your project ID Account account = new Account(client); diff --git a/docs/examples/java/account/create-j-w-t.md b/docs/examples/java/account/create-j-w-t.md index 285d1e0..3756ede 100644 --- a/docs/examples/java/account/create-j-w-t.md +++ b/docs/examples/java/account/create-j-w-t.md @@ -3,7 +3,7 @@ import io.appwrite.coroutines.CoroutineCallback; import io.appwrite.services.Account; Client client = new Client() - .setEndpoint("https://cloud.appwrite.io/v1") // Your API Endpoint + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint .setProject("<YOUR_PROJECT_ID>"); // Your project ID Account account = new Account(client); diff --git a/docs/examples/java/account/create-magic-u-r-l-token.md b/docs/examples/java/account/create-magic-u-r-l-token.md index 3f9bda2..df021f9 100644 --- a/docs/examples/java/account/create-magic-u-r-l-token.md +++ b/docs/examples/java/account/create-magic-u-r-l-token.md @@ -3,7 +3,7 @@ import io.appwrite.coroutines.CoroutineCallback; import io.appwrite.services.Account; Client client = new Client() - .setEndpoint("https://cloud.appwrite.io/v1") // Your API Endpoint + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint .setProject("<YOUR_PROJECT_ID>"); // Your project ID Account account = new Account(client); diff --git a/docs/examples/java/account/create-mfa-authenticator.md b/docs/examples/java/account/create-mfa-authenticator.md index eb127bd..ee37e48 100644 --- a/docs/examples/java/account/create-mfa-authenticator.md +++ b/docs/examples/java/account/create-mfa-authenticator.md @@ -4,7 +4,7 @@ import io.appwrite.services.Account; import io.appwrite.enums.AuthenticatorType; Client client = new Client() - .setEndpoint("https://cloud.appwrite.io/v1") // Your API Endpoint + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint .setProject("<YOUR_PROJECT_ID>") // Your project ID .setSession(""); // The user session to authenticate with diff --git a/docs/examples/java/account/create-mfa-challenge.md b/docs/examples/java/account/create-mfa-challenge.md index e5fcbe9..4a07e26 100644 --- a/docs/examples/java/account/create-mfa-challenge.md +++ b/docs/examples/java/account/create-mfa-challenge.md @@ -4,7 +4,7 @@ import io.appwrite.services.Account; import io.appwrite.enums.AuthenticationFactor; Client client = new Client() - .setEndpoint("https://cloud.appwrite.io/v1") // Your API Endpoint + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint .setProject("<YOUR_PROJECT_ID>"); // Your project ID Account account = new Account(client); diff --git a/docs/examples/java/account/create-mfa-recovery-codes.md b/docs/examples/java/account/create-mfa-recovery-codes.md index b64fb7d..eb76cdc 100644 --- a/docs/examples/java/account/create-mfa-recovery-codes.md +++ b/docs/examples/java/account/create-mfa-recovery-codes.md @@ -3,7 +3,7 @@ import io.appwrite.coroutines.CoroutineCallback; import io.appwrite.services.Account; Client client = new Client() - .setEndpoint("https://cloud.appwrite.io/v1") // Your API Endpoint + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint .setProject("<YOUR_PROJECT_ID>") // Your project ID .setSession(""); // The user session to authenticate with diff --git a/docs/examples/java/account/create-o-auth2token.md b/docs/examples/java/account/create-o-auth2token.md index 47873c5..5b325f5 100644 --- a/docs/examples/java/account/create-o-auth2token.md +++ b/docs/examples/java/account/create-o-auth2token.md @@ -4,7 +4,7 @@ import io.appwrite.services.Account; import io.appwrite.enums.OAuthProvider; Client client = new Client() - .setEndpoint("https://cloud.appwrite.io/v1") // Your API Endpoint + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint .setProject("<YOUR_PROJECT_ID>"); // Your project ID Account account = new Account(client); diff --git a/docs/examples/java/account/create-phone-token.md b/docs/examples/java/account/create-phone-token.md index 1f7c05c..14fb812 100644 --- a/docs/examples/java/account/create-phone-token.md +++ b/docs/examples/java/account/create-phone-token.md @@ -3,7 +3,7 @@ import io.appwrite.coroutines.CoroutineCallback; import io.appwrite.services.Account; Client client = new Client() - .setEndpoint("https://cloud.appwrite.io/v1") // Your API Endpoint + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint .setProject("<YOUR_PROJECT_ID>"); // Your project ID Account account = new Account(client); diff --git a/docs/examples/java/account/create-phone-verification.md b/docs/examples/java/account/create-phone-verification.md index 07937ab..9e49c62 100644 --- a/docs/examples/java/account/create-phone-verification.md +++ b/docs/examples/java/account/create-phone-verification.md @@ -3,7 +3,7 @@ import io.appwrite.coroutines.CoroutineCallback; import io.appwrite.services.Account; Client client = new Client() - .setEndpoint("https://cloud.appwrite.io/v1") // Your API Endpoint + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint .setProject("<YOUR_PROJECT_ID>") // Your project ID .setSession(""); // The user session to authenticate with diff --git a/docs/examples/java/account/create-recovery.md b/docs/examples/java/account/create-recovery.md index d74106b..f529ea4 100644 --- a/docs/examples/java/account/create-recovery.md +++ b/docs/examples/java/account/create-recovery.md @@ -3,7 +3,7 @@ import io.appwrite.coroutines.CoroutineCallback; import io.appwrite.services.Account; Client client = new Client() - .setEndpoint("https://cloud.appwrite.io/v1") // Your API Endpoint + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint .setProject("<YOUR_PROJECT_ID>") // Your project ID .setSession(""); // The user session to authenticate with diff --git a/docs/examples/java/account/create-session.md b/docs/examples/java/account/create-session.md index 861af3d..5bcdf99 100644 --- a/docs/examples/java/account/create-session.md +++ b/docs/examples/java/account/create-session.md @@ -3,7 +3,7 @@ import io.appwrite.coroutines.CoroutineCallback; import io.appwrite.services.Account; Client client = new Client() - .setEndpoint("https://cloud.appwrite.io/v1") // Your API Endpoint + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint .setProject("<YOUR_PROJECT_ID>"); // Your project ID Account account = new Account(client); diff --git a/docs/examples/java/account/create-verification.md b/docs/examples/java/account/create-verification.md index 4479cc6..65c8e8b 100644 --- a/docs/examples/java/account/create-verification.md +++ b/docs/examples/java/account/create-verification.md @@ -3,7 +3,7 @@ import io.appwrite.coroutines.CoroutineCallback; import io.appwrite.services.Account; Client client = new Client() - .setEndpoint("https://cloud.appwrite.io/v1") // Your API Endpoint + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint .setProject("<YOUR_PROJECT_ID>") // Your project ID .setSession(""); // The user session to authenticate with diff --git a/docs/examples/java/account/create.md b/docs/examples/java/account/create.md index 3bcfe1d..d24bfb8 100644 --- a/docs/examples/java/account/create.md +++ b/docs/examples/java/account/create.md @@ -3,7 +3,7 @@ import io.appwrite.coroutines.CoroutineCallback; import io.appwrite.services.Account; Client client = new Client() - .setEndpoint("https://cloud.appwrite.io/v1") // Your API Endpoint + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint .setProject("<YOUR_PROJECT_ID>"); // Your project ID Account account = new Account(client); diff --git a/docs/examples/java/account/delete-identity.md b/docs/examples/java/account/delete-identity.md index 5eec242..0d6f860 100644 --- a/docs/examples/java/account/delete-identity.md +++ b/docs/examples/java/account/delete-identity.md @@ -3,7 +3,7 @@ import io.appwrite.coroutines.CoroutineCallback; import io.appwrite.services.Account; Client client = new Client() - .setEndpoint("https://cloud.appwrite.io/v1") // Your API Endpoint + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint .setProject("<YOUR_PROJECT_ID>") // Your project ID .setSession(""); // The user session to authenticate with diff --git a/docs/examples/java/account/delete-mfa-authenticator.md b/docs/examples/java/account/delete-mfa-authenticator.md index 7f3b6b9..06835f6 100644 --- a/docs/examples/java/account/delete-mfa-authenticator.md +++ b/docs/examples/java/account/delete-mfa-authenticator.md @@ -4,7 +4,7 @@ import io.appwrite.services.Account; import io.appwrite.enums.AuthenticatorType; Client client = new Client() - .setEndpoint("https://cloud.appwrite.io/v1") // Your API Endpoint + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint .setProject("<YOUR_PROJECT_ID>") // Your project ID .setSession(""); // The user session to authenticate with diff --git a/docs/examples/java/account/delete-session.md b/docs/examples/java/account/delete-session.md index 687df81..fd27d74 100644 --- a/docs/examples/java/account/delete-session.md +++ b/docs/examples/java/account/delete-session.md @@ -3,7 +3,7 @@ import io.appwrite.coroutines.CoroutineCallback; import io.appwrite.services.Account; Client client = new Client() - .setEndpoint("https://cloud.appwrite.io/v1") // Your API Endpoint + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint .setProject("<YOUR_PROJECT_ID>") // Your project ID .setSession(""); // The user session to authenticate with diff --git a/docs/examples/java/account/delete-sessions.md b/docs/examples/java/account/delete-sessions.md index 0bfa1f2..11076e7 100644 --- a/docs/examples/java/account/delete-sessions.md +++ b/docs/examples/java/account/delete-sessions.md @@ -3,7 +3,7 @@ import io.appwrite.coroutines.CoroutineCallback; import io.appwrite.services.Account; Client client = new Client() - .setEndpoint("https://cloud.appwrite.io/v1") // Your API Endpoint + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint .setProject("<YOUR_PROJECT_ID>") // Your project ID .setSession(""); // The user session to authenticate with diff --git a/docs/examples/java/account/get-mfa-recovery-codes.md b/docs/examples/java/account/get-mfa-recovery-codes.md index f99634d..c818c3e 100644 --- a/docs/examples/java/account/get-mfa-recovery-codes.md +++ b/docs/examples/java/account/get-mfa-recovery-codes.md @@ -3,7 +3,7 @@ import io.appwrite.coroutines.CoroutineCallback; import io.appwrite.services.Account; Client client = new Client() - .setEndpoint("https://cloud.appwrite.io/v1") // Your API Endpoint + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint .setProject("<YOUR_PROJECT_ID>") // Your project ID .setSession(""); // The user session to authenticate with diff --git a/docs/examples/java/account/get-prefs.md b/docs/examples/java/account/get-prefs.md index 46d4181..6614f92 100644 --- a/docs/examples/java/account/get-prefs.md +++ b/docs/examples/java/account/get-prefs.md @@ -3,7 +3,7 @@ import io.appwrite.coroutines.CoroutineCallback; import io.appwrite.services.Account; Client client = new Client() - .setEndpoint("https://cloud.appwrite.io/v1") // Your API Endpoint + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint .setProject("<YOUR_PROJECT_ID>") // Your project ID .setSession(""); // The user session to authenticate with diff --git a/docs/examples/java/account/get-session.md b/docs/examples/java/account/get-session.md index 6d07a85..3f30d90 100644 --- a/docs/examples/java/account/get-session.md +++ b/docs/examples/java/account/get-session.md @@ -3,7 +3,7 @@ import io.appwrite.coroutines.CoroutineCallback; import io.appwrite.services.Account; Client client = new Client() - .setEndpoint("https://cloud.appwrite.io/v1") // Your API Endpoint + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint .setProject("<YOUR_PROJECT_ID>") // Your project ID .setSession(""); // The user session to authenticate with diff --git a/docs/examples/java/account/get.md b/docs/examples/java/account/get.md index 6d0eb40..70e2dfb 100644 --- a/docs/examples/java/account/get.md +++ b/docs/examples/java/account/get.md @@ -3,7 +3,7 @@ import io.appwrite.coroutines.CoroutineCallback; import io.appwrite.services.Account; Client client = new Client() - .setEndpoint("https://cloud.appwrite.io/v1") // Your API Endpoint + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint .setProject("<YOUR_PROJECT_ID>") // Your project ID .setSession(""); // The user session to authenticate with diff --git a/docs/examples/java/account/list-identities.md b/docs/examples/java/account/list-identities.md index 8977a23..ceb4b30 100644 --- a/docs/examples/java/account/list-identities.md +++ b/docs/examples/java/account/list-identities.md @@ -3,7 +3,7 @@ import io.appwrite.coroutines.CoroutineCallback; import io.appwrite.services.Account; Client client = new Client() - .setEndpoint("https://cloud.appwrite.io/v1") // Your API Endpoint + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint .setProject("<YOUR_PROJECT_ID>") // Your project ID .setSession(""); // The user session to authenticate with diff --git a/docs/examples/java/account/list-logs.md b/docs/examples/java/account/list-logs.md index e26cab9..de22fce 100644 --- a/docs/examples/java/account/list-logs.md +++ b/docs/examples/java/account/list-logs.md @@ -3,7 +3,7 @@ import io.appwrite.coroutines.CoroutineCallback; import io.appwrite.services.Account; Client client = new Client() - .setEndpoint("https://cloud.appwrite.io/v1") // Your API Endpoint + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint .setProject("<YOUR_PROJECT_ID>") // Your project ID .setSession(""); // The user session to authenticate with diff --git a/docs/examples/java/account/list-mfa-factors.md b/docs/examples/java/account/list-mfa-factors.md index 74f3e53..d9f90a4 100644 --- a/docs/examples/java/account/list-mfa-factors.md +++ b/docs/examples/java/account/list-mfa-factors.md @@ -3,7 +3,7 @@ import io.appwrite.coroutines.CoroutineCallback; import io.appwrite.services.Account; Client client = new Client() - .setEndpoint("https://cloud.appwrite.io/v1") // Your API Endpoint + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint .setProject("<YOUR_PROJECT_ID>") // Your project ID .setSession(""); // The user session to authenticate with diff --git a/docs/examples/java/account/list-sessions.md b/docs/examples/java/account/list-sessions.md index 6b01d44..557832d 100644 --- a/docs/examples/java/account/list-sessions.md +++ b/docs/examples/java/account/list-sessions.md @@ -3,7 +3,7 @@ import io.appwrite.coroutines.CoroutineCallback; import io.appwrite.services.Account; Client client = new Client() - .setEndpoint("https://cloud.appwrite.io/v1") // Your API Endpoint + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint .setProject("<YOUR_PROJECT_ID>") // Your project ID .setSession(""); // The user session to authenticate with diff --git a/docs/examples/java/account/update-email.md b/docs/examples/java/account/update-email.md index 391e531..8529ba6 100644 --- a/docs/examples/java/account/update-email.md +++ b/docs/examples/java/account/update-email.md @@ -3,7 +3,7 @@ import io.appwrite.coroutines.CoroutineCallback; import io.appwrite.services.Account; Client client = new Client() - .setEndpoint("https://cloud.appwrite.io/v1") // Your API Endpoint + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint .setProject("<YOUR_PROJECT_ID>") // Your project ID .setSession(""); // The user session to authenticate with diff --git a/docs/examples/java/account/update-m-f-a.md b/docs/examples/java/account/update-m-f-a.md index 58ac56b..d1b60c5 100644 --- a/docs/examples/java/account/update-m-f-a.md +++ b/docs/examples/java/account/update-m-f-a.md @@ -3,7 +3,7 @@ import io.appwrite.coroutines.CoroutineCallback; import io.appwrite.services.Account; Client client = new Client() - .setEndpoint("https://cloud.appwrite.io/v1") // Your API Endpoint + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint .setProject("<YOUR_PROJECT_ID>") // Your project ID .setSession(""); // The user session to authenticate with diff --git a/docs/examples/java/account/update-magic-u-r-l-session.md b/docs/examples/java/account/update-magic-u-r-l-session.md index 62fe856..b4735f4 100644 --- a/docs/examples/java/account/update-magic-u-r-l-session.md +++ b/docs/examples/java/account/update-magic-u-r-l-session.md @@ -3,7 +3,7 @@ import io.appwrite.coroutines.CoroutineCallback; import io.appwrite.services.Account; Client client = new Client() - .setEndpoint("https://cloud.appwrite.io/v1") // Your API Endpoint + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint .setProject("<YOUR_PROJECT_ID>"); // Your project ID Account account = new Account(client); diff --git a/docs/examples/java/account/update-mfa-authenticator.md b/docs/examples/java/account/update-mfa-authenticator.md index b492d8c..947c85a 100644 --- a/docs/examples/java/account/update-mfa-authenticator.md +++ b/docs/examples/java/account/update-mfa-authenticator.md @@ -4,7 +4,7 @@ import io.appwrite.services.Account; import io.appwrite.enums.AuthenticatorType; Client client = new Client() - .setEndpoint("https://cloud.appwrite.io/v1") // Your API Endpoint + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint .setProject("<YOUR_PROJECT_ID>") // Your project ID .setSession(""); // The user session to authenticate with diff --git a/docs/examples/java/account/update-mfa-challenge.md b/docs/examples/java/account/update-mfa-challenge.md index 74ca481..b9b0ae9 100644 --- a/docs/examples/java/account/update-mfa-challenge.md +++ b/docs/examples/java/account/update-mfa-challenge.md @@ -3,7 +3,7 @@ import io.appwrite.coroutines.CoroutineCallback; import io.appwrite.services.Account; Client client = new Client() - .setEndpoint("https://cloud.appwrite.io/v1") // Your API Endpoint + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint .setProject("<YOUR_PROJECT_ID>") // Your project ID .setSession(""); // The user session to authenticate with diff --git a/docs/examples/java/account/update-mfa-recovery-codes.md b/docs/examples/java/account/update-mfa-recovery-codes.md index 8f38ad8..4b3e527 100644 --- a/docs/examples/java/account/update-mfa-recovery-codes.md +++ b/docs/examples/java/account/update-mfa-recovery-codes.md @@ -3,7 +3,7 @@ import io.appwrite.coroutines.CoroutineCallback; import io.appwrite.services.Account; Client client = new Client() - .setEndpoint("https://cloud.appwrite.io/v1") // Your API Endpoint + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint .setProject("<YOUR_PROJECT_ID>") // Your project ID .setSession(""); // The user session to authenticate with diff --git a/docs/examples/java/account/update-name.md b/docs/examples/java/account/update-name.md index 1ce2abf..749fe26 100644 --- a/docs/examples/java/account/update-name.md +++ b/docs/examples/java/account/update-name.md @@ -3,7 +3,7 @@ import io.appwrite.coroutines.CoroutineCallback; import io.appwrite.services.Account; Client client = new Client() - .setEndpoint("https://cloud.appwrite.io/v1") // Your API Endpoint + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint .setProject("<YOUR_PROJECT_ID>") // Your project ID .setSession(""); // The user session to authenticate with diff --git a/docs/examples/java/account/update-password.md b/docs/examples/java/account/update-password.md index 437e825..8eaa08b 100644 --- a/docs/examples/java/account/update-password.md +++ b/docs/examples/java/account/update-password.md @@ -3,7 +3,7 @@ import io.appwrite.coroutines.CoroutineCallback; import io.appwrite.services.Account; Client client = new Client() - .setEndpoint("https://cloud.appwrite.io/v1") // Your API Endpoint + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint .setProject("<YOUR_PROJECT_ID>") // Your project ID .setSession(""); // The user session to authenticate with diff --git a/docs/examples/java/account/update-phone-session.md b/docs/examples/java/account/update-phone-session.md index c401de4..cbfdca5 100644 --- a/docs/examples/java/account/update-phone-session.md +++ b/docs/examples/java/account/update-phone-session.md @@ -3,7 +3,7 @@ import io.appwrite.coroutines.CoroutineCallback; import io.appwrite.services.Account; Client client = new Client() - .setEndpoint("https://cloud.appwrite.io/v1") // Your API Endpoint + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint .setProject("<YOUR_PROJECT_ID>"); // Your project ID Account account = new Account(client); diff --git a/docs/examples/java/account/update-phone-verification.md b/docs/examples/java/account/update-phone-verification.md index ddf786a..9988265 100644 --- a/docs/examples/java/account/update-phone-verification.md +++ b/docs/examples/java/account/update-phone-verification.md @@ -3,7 +3,7 @@ import io.appwrite.coroutines.CoroutineCallback; import io.appwrite.services.Account; Client client = new Client() - .setEndpoint("https://cloud.appwrite.io/v1") // Your API Endpoint + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint .setProject("<YOUR_PROJECT_ID>") // Your project ID .setSession(""); // The user session to authenticate with diff --git a/docs/examples/java/account/update-phone.md b/docs/examples/java/account/update-phone.md index 6a47fd1..d54aa9c 100644 --- a/docs/examples/java/account/update-phone.md +++ b/docs/examples/java/account/update-phone.md @@ -3,7 +3,7 @@ import io.appwrite.coroutines.CoroutineCallback; import io.appwrite.services.Account; Client client = new Client() - .setEndpoint("https://cloud.appwrite.io/v1") // Your API Endpoint + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint .setProject("<YOUR_PROJECT_ID>") // Your project ID .setSession(""); // The user session to authenticate with diff --git a/docs/examples/java/account/update-prefs.md b/docs/examples/java/account/update-prefs.md index 8c10ede..0e900d0 100644 --- a/docs/examples/java/account/update-prefs.md +++ b/docs/examples/java/account/update-prefs.md @@ -3,7 +3,7 @@ import io.appwrite.coroutines.CoroutineCallback; import io.appwrite.services.Account; Client client = new Client() - .setEndpoint("https://cloud.appwrite.io/v1") // Your API Endpoint + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint .setProject("<YOUR_PROJECT_ID>") // Your project ID .setSession(""); // The user session to authenticate with diff --git a/docs/examples/java/account/update-recovery.md b/docs/examples/java/account/update-recovery.md index be4301c..8ab16e1 100644 --- a/docs/examples/java/account/update-recovery.md +++ b/docs/examples/java/account/update-recovery.md @@ -3,7 +3,7 @@ import io.appwrite.coroutines.CoroutineCallback; import io.appwrite.services.Account; Client client = new Client() - .setEndpoint("https://cloud.appwrite.io/v1") // Your API Endpoint + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint .setProject("<YOUR_PROJECT_ID>") // Your project ID .setSession(""); // The user session to authenticate with diff --git a/docs/examples/java/account/update-session.md b/docs/examples/java/account/update-session.md index 96e3506..8233c05 100644 --- a/docs/examples/java/account/update-session.md +++ b/docs/examples/java/account/update-session.md @@ -3,7 +3,7 @@ import io.appwrite.coroutines.CoroutineCallback; import io.appwrite.services.Account; Client client = new Client() - .setEndpoint("https://cloud.appwrite.io/v1") // Your API Endpoint + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint .setProject("<YOUR_PROJECT_ID>") // Your project ID .setSession(""); // The user session to authenticate with diff --git a/docs/examples/java/account/update-status.md b/docs/examples/java/account/update-status.md index 7c42f35..d5f4f79 100644 --- a/docs/examples/java/account/update-status.md +++ b/docs/examples/java/account/update-status.md @@ -3,7 +3,7 @@ import io.appwrite.coroutines.CoroutineCallback; import io.appwrite.services.Account; Client client = new Client() - .setEndpoint("https://cloud.appwrite.io/v1") // Your API Endpoint + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint .setProject("<YOUR_PROJECT_ID>") // Your project ID .setSession(""); // The user session to authenticate with diff --git a/docs/examples/java/account/update-verification.md b/docs/examples/java/account/update-verification.md index ed8a40b..dafe6db 100644 --- a/docs/examples/java/account/update-verification.md +++ b/docs/examples/java/account/update-verification.md @@ -3,7 +3,7 @@ import io.appwrite.coroutines.CoroutineCallback; import io.appwrite.services.Account; Client client = new Client() - .setEndpoint("https://cloud.appwrite.io/v1") // Your API Endpoint + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint .setProject("<YOUR_PROJECT_ID>") // Your project ID .setSession(""); // The user session to authenticate with diff --git a/docs/examples/java/avatars/get-browser.md b/docs/examples/java/avatars/get-browser.md index 4cd18b6..c87d5e9 100644 --- a/docs/examples/java/avatars/get-browser.md +++ b/docs/examples/java/avatars/get-browser.md @@ -4,7 +4,7 @@ import io.appwrite.services.Avatars; import io.appwrite.enums.Browser; Client client = new Client() - .setEndpoint("https://cloud.appwrite.io/v1") // Your API Endpoint + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint .setProject("<YOUR_PROJECT_ID>") // Your project ID .setSession(""); // The user session to authenticate with diff --git a/docs/examples/java/avatars/get-credit-card.md b/docs/examples/java/avatars/get-credit-card.md index eadbf5d..ddb53a6 100644 --- a/docs/examples/java/avatars/get-credit-card.md +++ b/docs/examples/java/avatars/get-credit-card.md @@ -4,7 +4,7 @@ import io.appwrite.services.Avatars; import io.appwrite.enums.CreditCard; Client client = new Client() - .setEndpoint("https://cloud.appwrite.io/v1") // Your API Endpoint + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint .setProject("<YOUR_PROJECT_ID>") // Your project ID .setSession(""); // The user session to authenticate with diff --git a/docs/examples/java/avatars/get-favicon.md b/docs/examples/java/avatars/get-favicon.md index 9f51941..f4e89cf 100644 --- a/docs/examples/java/avatars/get-favicon.md +++ b/docs/examples/java/avatars/get-favicon.md @@ -3,7 +3,7 @@ import io.appwrite.coroutines.CoroutineCallback; import io.appwrite.services.Avatars; Client client = new Client() - .setEndpoint("https://cloud.appwrite.io/v1") // Your API Endpoint + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint .setProject("<YOUR_PROJECT_ID>") // Your project ID .setSession(""); // The user session to authenticate with diff --git a/docs/examples/java/avatars/get-flag.md b/docs/examples/java/avatars/get-flag.md index 1b7f423..aadf426 100644 --- a/docs/examples/java/avatars/get-flag.md +++ b/docs/examples/java/avatars/get-flag.md @@ -4,7 +4,7 @@ import io.appwrite.services.Avatars; import io.appwrite.enums.Flag; Client client = new Client() - .setEndpoint("https://cloud.appwrite.io/v1") // Your API Endpoint + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint .setProject("<YOUR_PROJECT_ID>") // Your project ID .setSession(""); // The user session to authenticate with diff --git a/docs/examples/java/avatars/get-image.md b/docs/examples/java/avatars/get-image.md index af5f217..afad760 100644 --- a/docs/examples/java/avatars/get-image.md +++ b/docs/examples/java/avatars/get-image.md @@ -3,7 +3,7 @@ import io.appwrite.coroutines.CoroutineCallback; import io.appwrite.services.Avatars; Client client = new Client() - .setEndpoint("https://cloud.appwrite.io/v1") // Your API Endpoint + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint .setProject("<YOUR_PROJECT_ID>") // Your project ID .setSession(""); // The user session to authenticate with diff --git a/docs/examples/java/avatars/get-initials.md b/docs/examples/java/avatars/get-initials.md index 4b00f73..171b636 100644 --- a/docs/examples/java/avatars/get-initials.md +++ b/docs/examples/java/avatars/get-initials.md @@ -3,7 +3,7 @@ import io.appwrite.coroutines.CoroutineCallback; import io.appwrite.services.Avatars; Client client = new Client() - .setEndpoint("https://cloud.appwrite.io/v1") // Your API Endpoint + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint .setProject("<YOUR_PROJECT_ID>") // Your project ID .setSession(""); // The user session to authenticate with diff --git a/docs/examples/java/avatars/get-q-r.md b/docs/examples/java/avatars/get-q-r.md index 903e2b0..113fd1f 100644 --- a/docs/examples/java/avatars/get-q-r.md +++ b/docs/examples/java/avatars/get-q-r.md @@ -3,7 +3,7 @@ import io.appwrite.coroutines.CoroutineCallback; import io.appwrite.services.Avatars; Client client = new Client() - .setEndpoint("https://cloud.appwrite.io/v1") // Your API Endpoint + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint .setProject("<YOUR_PROJECT_ID>") // Your project ID .setSession(""); // The user session to authenticate with diff --git a/docs/examples/java/databases/create-boolean-attribute.md b/docs/examples/java/databases/create-boolean-attribute.md index d959a65..7585471 100644 --- a/docs/examples/java/databases/create-boolean-attribute.md +++ b/docs/examples/java/databases/create-boolean-attribute.md @@ -3,7 +3,7 @@ import io.appwrite.coroutines.CoroutineCallback; import io.appwrite.services.Databases; Client client = new Client() - .setEndpoint("https://cloud.appwrite.io/v1") // Your API Endpoint + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint .setProject("<YOUR_PROJECT_ID>") // Your project ID .setKey("<YOUR_API_KEY>"); // Your secret API key diff --git a/docs/examples/java/databases/create-collection.md b/docs/examples/java/databases/create-collection.md index 9a17b26..8ec51e6 100644 --- a/docs/examples/java/databases/create-collection.md +++ b/docs/examples/java/databases/create-collection.md @@ -3,7 +3,7 @@ import io.appwrite.coroutines.CoroutineCallback; import io.appwrite.services.Databases; Client client = new Client() - .setEndpoint("https://cloud.appwrite.io/v1") // Your API Endpoint + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint .setProject("<YOUR_PROJECT_ID>") // Your project ID .setKey("<YOUR_API_KEY>"); // Your secret API key diff --git a/docs/examples/java/databases/create-datetime-attribute.md b/docs/examples/java/databases/create-datetime-attribute.md index b35d489..d95e048 100644 --- a/docs/examples/java/databases/create-datetime-attribute.md +++ b/docs/examples/java/databases/create-datetime-attribute.md @@ -3,7 +3,7 @@ import io.appwrite.coroutines.CoroutineCallback; import io.appwrite.services.Databases; Client client = new Client() - .setEndpoint("https://cloud.appwrite.io/v1") // Your API Endpoint + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint .setProject("<YOUR_PROJECT_ID>") // Your project ID .setKey("<YOUR_API_KEY>"); // Your secret API key diff --git a/docs/examples/java/databases/create-document.md b/docs/examples/java/databases/create-document.md index e05d1fe..5231be3 100644 --- a/docs/examples/java/databases/create-document.md +++ b/docs/examples/java/databases/create-document.md @@ -3,7 +3,7 @@ import io.appwrite.coroutines.CoroutineCallback; import io.appwrite.services.Databases; Client client = new Client() - .setEndpoint("https://cloud.appwrite.io/v1") // Your API Endpoint + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint .setProject("<YOUR_PROJECT_ID>") // Your project ID .setSession(""); // The user session to authenticate with diff --git a/docs/examples/java/databases/create-email-attribute.md b/docs/examples/java/databases/create-email-attribute.md index 5a42e97..b2ecc99 100644 --- a/docs/examples/java/databases/create-email-attribute.md +++ b/docs/examples/java/databases/create-email-attribute.md @@ -3,7 +3,7 @@ import io.appwrite.coroutines.CoroutineCallback; import io.appwrite.services.Databases; Client client = new Client() - .setEndpoint("https://cloud.appwrite.io/v1") // Your API Endpoint + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint .setProject("<YOUR_PROJECT_ID>") // Your project ID .setKey("<YOUR_API_KEY>"); // Your secret API key diff --git a/docs/examples/java/databases/create-enum-attribute.md b/docs/examples/java/databases/create-enum-attribute.md index 59cbd46..4420208 100644 --- a/docs/examples/java/databases/create-enum-attribute.md +++ b/docs/examples/java/databases/create-enum-attribute.md @@ -3,7 +3,7 @@ import io.appwrite.coroutines.CoroutineCallback; import io.appwrite.services.Databases; Client client = new Client() - .setEndpoint("https://cloud.appwrite.io/v1") // Your API Endpoint + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint .setProject("<YOUR_PROJECT_ID>") // Your project ID .setKey("<YOUR_API_KEY>"); // Your secret API key diff --git a/docs/examples/java/databases/create-float-attribute.md b/docs/examples/java/databases/create-float-attribute.md index cdbdbb2..2263cdb 100644 --- a/docs/examples/java/databases/create-float-attribute.md +++ b/docs/examples/java/databases/create-float-attribute.md @@ -3,7 +3,7 @@ import io.appwrite.coroutines.CoroutineCallback; import io.appwrite.services.Databases; Client client = new Client() - .setEndpoint("https://cloud.appwrite.io/v1") // Your API Endpoint + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint .setProject("<YOUR_PROJECT_ID>") // Your project ID .setKey("<YOUR_API_KEY>"); // Your secret API key diff --git a/docs/examples/java/databases/create-index.md b/docs/examples/java/databases/create-index.md index a3f09d4..f3faec7 100644 --- a/docs/examples/java/databases/create-index.md +++ b/docs/examples/java/databases/create-index.md @@ -4,7 +4,7 @@ import io.appwrite.services.Databases; import io.appwrite.enums.IndexType; Client client = new Client() - .setEndpoint("https://cloud.appwrite.io/v1") // Your API Endpoint + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint .setProject("<YOUR_PROJECT_ID>") // Your project ID .setKey("<YOUR_API_KEY>"); // Your secret API key diff --git a/docs/examples/java/databases/create-integer-attribute.md b/docs/examples/java/databases/create-integer-attribute.md index 37e7f37..b084e7c 100644 --- a/docs/examples/java/databases/create-integer-attribute.md +++ b/docs/examples/java/databases/create-integer-attribute.md @@ -3,7 +3,7 @@ import io.appwrite.coroutines.CoroutineCallback; import io.appwrite.services.Databases; Client client = new Client() - .setEndpoint("https://cloud.appwrite.io/v1") // Your API Endpoint + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint .setProject("<YOUR_PROJECT_ID>") // Your project ID .setKey("<YOUR_API_KEY>"); // Your secret API key diff --git a/docs/examples/java/databases/create-ip-attribute.md b/docs/examples/java/databases/create-ip-attribute.md index bdb0093..ba62dba 100644 --- a/docs/examples/java/databases/create-ip-attribute.md +++ b/docs/examples/java/databases/create-ip-attribute.md @@ -3,7 +3,7 @@ import io.appwrite.coroutines.CoroutineCallback; import io.appwrite.services.Databases; Client client = new Client() - .setEndpoint("https://cloud.appwrite.io/v1") // Your API Endpoint + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint .setProject("<YOUR_PROJECT_ID>") // Your project ID .setKey("<YOUR_API_KEY>"); // Your secret API key diff --git a/docs/examples/java/databases/create-relationship-attribute.md b/docs/examples/java/databases/create-relationship-attribute.md index f3d0f51..a67f452 100644 --- a/docs/examples/java/databases/create-relationship-attribute.md +++ b/docs/examples/java/databases/create-relationship-attribute.md @@ -4,7 +4,7 @@ import io.appwrite.services.Databases; import io.appwrite.enums.RelationshipType; Client client = new Client() - .setEndpoint("https://cloud.appwrite.io/v1") // Your API Endpoint + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint .setProject("<YOUR_PROJECT_ID>") // Your project ID .setKey("<YOUR_API_KEY>"); // Your secret API key diff --git a/docs/examples/java/databases/create-string-attribute.md b/docs/examples/java/databases/create-string-attribute.md index 7d9d8d4..3286c7a 100644 --- a/docs/examples/java/databases/create-string-attribute.md +++ b/docs/examples/java/databases/create-string-attribute.md @@ -3,7 +3,7 @@ import io.appwrite.coroutines.CoroutineCallback; import io.appwrite.services.Databases; Client client = new Client() - .setEndpoint("https://cloud.appwrite.io/v1") // Your API Endpoint + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint .setProject("<YOUR_PROJECT_ID>") // Your project ID .setKey("<YOUR_API_KEY>"); // Your secret API key diff --git a/docs/examples/java/databases/create-url-attribute.md b/docs/examples/java/databases/create-url-attribute.md index 57ed89d..d445d67 100644 --- a/docs/examples/java/databases/create-url-attribute.md +++ b/docs/examples/java/databases/create-url-attribute.md @@ -3,7 +3,7 @@ import io.appwrite.coroutines.CoroutineCallback; import io.appwrite.services.Databases; Client client = new Client() - .setEndpoint("https://cloud.appwrite.io/v1") // Your API Endpoint + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint .setProject("<YOUR_PROJECT_ID>") // Your project ID .setKey("<YOUR_API_KEY>"); // Your secret API key diff --git a/docs/examples/java/databases/create.md b/docs/examples/java/databases/create.md index 5b66510..31cd37e 100644 --- a/docs/examples/java/databases/create.md +++ b/docs/examples/java/databases/create.md @@ -3,7 +3,7 @@ import io.appwrite.coroutines.CoroutineCallback; import io.appwrite.services.Databases; Client client = new Client() - .setEndpoint("https://cloud.appwrite.io/v1") // Your API Endpoint + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint .setProject("<YOUR_PROJECT_ID>") // Your project ID .setKey("<YOUR_API_KEY>"); // Your secret API key diff --git a/docs/examples/java/databases/delete-attribute.md b/docs/examples/java/databases/delete-attribute.md index 8f9d2f0..236d492 100644 --- a/docs/examples/java/databases/delete-attribute.md +++ b/docs/examples/java/databases/delete-attribute.md @@ -3,7 +3,7 @@ import io.appwrite.coroutines.CoroutineCallback; import io.appwrite.services.Databases; Client client = new Client() - .setEndpoint("https://cloud.appwrite.io/v1") // Your API Endpoint + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint .setProject("<YOUR_PROJECT_ID>") // Your project ID .setKey("<YOUR_API_KEY>"); // Your secret API key diff --git a/docs/examples/java/databases/delete-collection.md b/docs/examples/java/databases/delete-collection.md index 334e7ad..5da2a3d 100644 --- a/docs/examples/java/databases/delete-collection.md +++ b/docs/examples/java/databases/delete-collection.md @@ -3,7 +3,7 @@ import io.appwrite.coroutines.CoroutineCallback; import io.appwrite.services.Databases; Client client = new Client() - .setEndpoint("https://cloud.appwrite.io/v1") // Your API Endpoint + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint .setProject("<YOUR_PROJECT_ID>") // Your project ID .setKey("<YOUR_API_KEY>"); // Your secret API key diff --git a/docs/examples/java/databases/delete-document.md b/docs/examples/java/databases/delete-document.md index a42b3f1..f6e6209 100644 --- a/docs/examples/java/databases/delete-document.md +++ b/docs/examples/java/databases/delete-document.md @@ -3,7 +3,7 @@ import io.appwrite.coroutines.CoroutineCallback; import io.appwrite.services.Databases; Client client = new Client() - .setEndpoint("https://cloud.appwrite.io/v1") // Your API Endpoint + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint .setProject("<YOUR_PROJECT_ID>") // Your project ID .setSession(""); // The user session to authenticate with diff --git a/docs/examples/java/databases/delete-index.md b/docs/examples/java/databases/delete-index.md index 725045e..6f68435 100644 --- a/docs/examples/java/databases/delete-index.md +++ b/docs/examples/java/databases/delete-index.md @@ -3,7 +3,7 @@ import io.appwrite.coroutines.CoroutineCallback; import io.appwrite.services.Databases; Client client = new Client() - .setEndpoint("https://cloud.appwrite.io/v1") // Your API Endpoint + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint .setProject("<YOUR_PROJECT_ID>") // Your project ID .setKey("<YOUR_API_KEY>"); // Your secret API key diff --git a/docs/examples/java/databases/delete.md b/docs/examples/java/databases/delete.md index 41fb72b..b082491 100644 --- a/docs/examples/java/databases/delete.md +++ b/docs/examples/java/databases/delete.md @@ -3,7 +3,7 @@ import io.appwrite.coroutines.CoroutineCallback; import io.appwrite.services.Databases; Client client = new Client() - .setEndpoint("https://cloud.appwrite.io/v1") // Your API Endpoint + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint .setProject("<YOUR_PROJECT_ID>") // Your project ID .setKey("<YOUR_API_KEY>"); // Your secret API key diff --git a/docs/examples/java/databases/get-attribute.md b/docs/examples/java/databases/get-attribute.md index 1b29312..672f0b0 100644 --- a/docs/examples/java/databases/get-attribute.md +++ b/docs/examples/java/databases/get-attribute.md @@ -3,7 +3,7 @@ import io.appwrite.coroutines.CoroutineCallback; import io.appwrite.services.Databases; Client client = new Client() - .setEndpoint("https://cloud.appwrite.io/v1") // Your API Endpoint + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint .setProject("<YOUR_PROJECT_ID>") // Your project ID .setKey("<YOUR_API_KEY>"); // Your secret API key diff --git a/docs/examples/java/databases/get-collection.md b/docs/examples/java/databases/get-collection.md index 41bbb23..59401be 100644 --- a/docs/examples/java/databases/get-collection.md +++ b/docs/examples/java/databases/get-collection.md @@ -3,7 +3,7 @@ import io.appwrite.coroutines.CoroutineCallback; import io.appwrite.services.Databases; Client client = new Client() - .setEndpoint("https://cloud.appwrite.io/v1") // Your API Endpoint + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint .setProject("<YOUR_PROJECT_ID>") // Your project ID .setKey("<YOUR_API_KEY>"); // Your secret API key diff --git a/docs/examples/java/databases/get-document.md b/docs/examples/java/databases/get-document.md index 870642b..2719073 100644 --- a/docs/examples/java/databases/get-document.md +++ b/docs/examples/java/databases/get-document.md @@ -3,7 +3,7 @@ import io.appwrite.coroutines.CoroutineCallback; import io.appwrite.services.Databases; Client client = new Client() - .setEndpoint("https://cloud.appwrite.io/v1") // Your API Endpoint + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint .setProject("<YOUR_PROJECT_ID>") // Your project ID .setSession(""); // The user session to authenticate with diff --git a/docs/examples/java/databases/get-index.md b/docs/examples/java/databases/get-index.md index eb33b87..61cfe84 100644 --- a/docs/examples/java/databases/get-index.md +++ b/docs/examples/java/databases/get-index.md @@ -3,7 +3,7 @@ import io.appwrite.coroutines.CoroutineCallback; import io.appwrite.services.Databases; Client client = new Client() - .setEndpoint("https://cloud.appwrite.io/v1") // Your API Endpoint + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint .setProject("<YOUR_PROJECT_ID>") // Your project ID .setKey("<YOUR_API_KEY>"); // Your secret API key diff --git a/docs/examples/java/databases/get.md b/docs/examples/java/databases/get.md index b276da4..b0e3742 100644 --- a/docs/examples/java/databases/get.md +++ b/docs/examples/java/databases/get.md @@ -3,7 +3,7 @@ import io.appwrite.coroutines.CoroutineCallback; import io.appwrite.services.Databases; Client client = new Client() - .setEndpoint("https://cloud.appwrite.io/v1") // Your API Endpoint + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint .setProject("<YOUR_PROJECT_ID>") // Your project ID .setKey("<YOUR_API_KEY>"); // Your secret API key diff --git a/docs/examples/java/databases/list-attributes.md b/docs/examples/java/databases/list-attributes.md index 417fe6e..9681831 100644 --- a/docs/examples/java/databases/list-attributes.md +++ b/docs/examples/java/databases/list-attributes.md @@ -3,7 +3,7 @@ import io.appwrite.coroutines.CoroutineCallback; import io.appwrite.services.Databases; Client client = new Client() - .setEndpoint("https://cloud.appwrite.io/v1") // Your API Endpoint + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint .setProject("<YOUR_PROJECT_ID>") // Your project ID .setKey("<YOUR_API_KEY>"); // Your secret API key diff --git a/docs/examples/java/databases/list-collections.md b/docs/examples/java/databases/list-collections.md index e12e158..3253447 100644 --- a/docs/examples/java/databases/list-collections.md +++ b/docs/examples/java/databases/list-collections.md @@ -3,7 +3,7 @@ import io.appwrite.coroutines.CoroutineCallback; import io.appwrite.services.Databases; Client client = new Client() - .setEndpoint("https://cloud.appwrite.io/v1") // Your API Endpoint + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint .setProject("<YOUR_PROJECT_ID>") // Your project ID .setKey("<YOUR_API_KEY>"); // Your secret API key diff --git a/docs/examples/java/databases/list-documents.md b/docs/examples/java/databases/list-documents.md index 4fab62a..36982c0 100644 --- a/docs/examples/java/databases/list-documents.md +++ b/docs/examples/java/databases/list-documents.md @@ -3,7 +3,7 @@ import io.appwrite.coroutines.CoroutineCallback; import io.appwrite.services.Databases; Client client = new Client() - .setEndpoint("https://cloud.appwrite.io/v1") // Your API Endpoint + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint .setProject("<YOUR_PROJECT_ID>") // Your project ID .setSession(""); // The user session to authenticate with diff --git a/docs/examples/java/databases/list-indexes.md b/docs/examples/java/databases/list-indexes.md index c266265..8c912bb 100644 --- a/docs/examples/java/databases/list-indexes.md +++ b/docs/examples/java/databases/list-indexes.md @@ -3,7 +3,7 @@ import io.appwrite.coroutines.CoroutineCallback; import io.appwrite.services.Databases; Client client = new Client() - .setEndpoint("https://cloud.appwrite.io/v1") // Your API Endpoint + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint .setProject("<YOUR_PROJECT_ID>") // Your project ID .setKey("<YOUR_API_KEY>"); // Your secret API key diff --git a/docs/examples/java/databases/list.md b/docs/examples/java/databases/list.md index d014a70..758b9f7 100644 --- a/docs/examples/java/databases/list.md +++ b/docs/examples/java/databases/list.md @@ -3,7 +3,7 @@ import io.appwrite.coroutines.CoroutineCallback; import io.appwrite.services.Databases; Client client = new Client() - .setEndpoint("https://cloud.appwrite.io/v1") // Your API Endpoint + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint .setProject("<YOUR_PROJECT_ID>") // Your project ID .setKey("<YOUR_API_KEY>"); // Your secret API key diff --git a/docs/examples/java/databases/update-boolean-attribute.md b/docs/examples/java/databases/update-boolean-attribute.md index 01a8ba1..3c95851 100644 --- a/docs/examples/java/databases/update-boolean-attribute.md +++ b/docs/examples/java/databases/update-boolean-attribute.md @@ -3,7 +3,7 @@ import io.appwrite.coroutines.CoroutineCallback; import io.appwrite.services.Databases; Client client = new Client() - .setEndpoint("https://cloud.appwrite.io/v1") // Your API Endpoint + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint .setProject("<YOUR_PROJECT_ID>") // Your project ID .setKey("<YOUR_API_KEY>"); // Your secret API key diff --git a/docs/examples/java/databases/update-collection.md b/docs/examples/java/databases/update-collection.md index 533d7a7..6805c11 100644 --- a/docs/examples/java/databases/update-collection.md +++ b/docs/examples/java/databases/update-collection.md @@ -3,7 +3,7 @@ import io.appwrite.coroutines.CoroutineCallback; import io.appwrite.services.Databases; Client client = new Client() - .setEndpoint("https://cloud.appwrite.io/v1") // Your API Endpoint + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint .setProject("<YOUR_PROJECT_ID>") // Your project ID .setKey("<YOUR_API_KEY>"); // Your secret API key diff --git a/docs/examples/java/databases/update-datetime-attribute.md b/docs/examples/java/databases/update-datetime-attribute.md index 00b3568..3f451b8 100644 --- a/docs/examples/java/databases/update-datetime-attribute.md +++ b/docs/examples/java/databases/update-datetime-attribute.md @@ -3,7 +3,7 @@ import io.appwrite.coroutines.CoroutineCallback; import io.appwrite.services.Databases; Client client = new Client() - .setEndpoint("https://cloud.appwrite.io/v1") // Your API Endpoint + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint .setProject("<YOUR_PROJECT_ID>") // Your project ID .setKey("<YOUR_API_KEY>"); // Your secret API key diff --git a/docs/examples/java/databases/update-document.md b/docs/examples/java/databases/update-document.md index 43c9600..f7b05c9 100644 --- a/docs/examples/java/databases/update-document.md +++ b/docs/examples/java/databases/update-document.md @@ -3,7 +3,7 @@ import io.appwrite.coroutines.CoroutineCallback; import io.appwrite.services.Databases; Client client = new Client() - .setEndpoint("https://cloud.appwrite.io/v1") // Your API Endpoint + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint .setProject("<YOUR_PROJECT_ID>") // Your project ID .setSession(""); // The user session to authenticate with diff --git a/docs/examples/java/databases/update-email-attribute.md b/docs/examples/java/databases/update-email-attribute.md index b931370..1ff1221 100644 --- a/docs/examples/java/databases/update-email-attribute.md +++ b/docs/examples/java/databases/update-email-attribute.md @@ -3,7 +3,7 @@ import io.appwrite.coroutines.CoroutineCallback; import io.appwrite.services.Databases; Client client = new Client() - .setEndpoint("https://cloud.appwrite.io/v1") // Your API Endpoint + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint .setProject("<YOUR_PROJECT_ID>") // Your project ID .setKey("<YOUR_API_KEY>"); // Your secret API key diff --git a/docs/examples/java/databases/update-enum-attribute.md b/docs/examples/java/databases/update-enum-attribute.md index febf784..8960680 100644 --- a/docs/examples/java/databases/update-enum-attribute.md +++ b/docs/examples/java/databases/update-enum-attribute.md @@ -3,7 +3,7 @@ import io.appwrite.coroutines.CoroutineCallback; import io.appwrite.services.Databases; Client client = new Client() - .setEndpoint("https://cloud.appwrite.io/v1") // Your API Endpoint + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint .setProject("<YOUR_PROJECT_ID>") // Your project ID .setKey("<YOUR_API_KEY>"); // Your secret API key diff --git a/docs/examples/java/databases/update-float-attribute.md b/docs/examples/java/databases/update-float-attribute.md index 061e2a9..0076987 100644 --- a/docs/examples/java/databases/update-float-attribute.md +++ b/docs/examples/java/databases/update-float-attribute.md @@ -3,7 +3,7 @@ import io.appwrite.coroutines.CoroutineCallback; import io.appwrite.services.Databases; Client client = new Client() - .setEndpoint("https://cloud.appwrite.io/v1") // Your API Endpoint + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint .setProject("<YOUR_PROJECT_ID>") // Your project ID .setKey("<YOUR_API_KEY>"); // Your secret API key diff --git a/docs/examples/java/databases/update-integer-attribute.md b/docs/examples/java/databases/update-integer-attribute.md index 24a26eb..c39af22 100644 --- a/docs/examples/java/databases/update-integer-attribute.md +++ b/docs/examples/java/databases/update-integer-attribute.md @@ -3,7 +3,7 @@ import io.appwrite.coroutines.CoroutineCallback; import io.appwrite.services.Databases; Client client = new Client() - .setEndpoint("https://cloud.appwrite.io/v1") // Your API Endpoint + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint .setProject("<YOUR_PROJECT_ID>") // Your project ID .setKey("<YOUR_API_KEY>"); // Your secret API key diff --git a/docs/examples/java/databases/update-ip-attribute.md b/docs/examples/java/databases/update-ip-attribute.md index 72b85cf..44b4da2 100644 --- a/docs/examples/java/databases/update-ip-attribute.md +++ b/docs/examples/java/databases/update-ip-attribute.md @@ -3,7 +3,7 @@ import io.appwrite.coroutines.CoroutineCallback; import io.appwrite.services.Databases; Client client = new Client() - .setEndpoint("https://cloud.appwrite.io/v1") // Your API Endpoint + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint .setProject("<YOUR_PROJECT_ID>") // Your project ID .setKey("<YOUR_API_KEY>"); // Your secret API key diff --git a/docs/examples/java/databases/update-relationship-attribute.md b/docs/examples/java/databases/update-relationship-attribute.md index 73e2121..8af20e9 100644 --- a/docs/examples/java/databases/update-relationship-attribute.md +++ b/docs/examples/java/databases/update-relationship-attribute.md @@ -3,7 +3,7 @@ import io.appwrite.coroutines.CoroutineCallback; import io.appwrite.services.Databases; Client client = new Client() - .setEndpoint("https://cloud.appwrite.io/v1") // Your API Endpoint + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint .setProject("<YOUR_PROJECT_ID>") // Your project ID .setKey("<YOUR_API_KEY>"); // Your secret API key diff --git a/docs/examples/java/databases/update-string-attribute.md b/docs/examples/java/databases/update-string-attribute.md index 2d69006..1f156f3 100644 --- a/docs/examples/java/databases/update-string-attribute.md +++ b/docs/examples/java/databases/update-string-attribute.md @@ -3,7 +3,7 @@ import io.appwrite.coroutines.CoroutineCallback; import io.appwrite.services.Databases; Client client = new Client() - .setEndpoint("https://cloud.appwrite.io/v1") // Your API Endpoint + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint .setProject("<YOUR_PROJECT_ID>") // Your project ID .setKey("<YOUR_API_KEY>"); // Your secret API key diff --git a/docs/examples/java/databases/update-url-attribute.md b/docs/examples/java/databases/update-url-attribute.md index dcfbf30..959054a 100644 --- a/docs/examples/java/databases/update-url-attribute.md +++ b/docs/examples/java/databases/update-url-attribute.md @@ -3,7 +3,7 @@ import io.appwrite.coroutines.CoroutineCallback; import io.appwrite.services.Databases; Client client = new Client() - .setEndpoint("https://cloud.appwrite.io/v1") // Your API Endpoint + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint .setProject("<YOUR_PROJECT_ID>") // Your project ID .setKey("<YOUR_API_KEY>"); // Your secret API key diff --git a/docs/examples/java/databases/update.md b/docs/examples/java/databases/update.md index f1e6dd3..9928dae 100644 --- a/docs/examples/java/databases/update.md +++ b/docs/examples/java/databases/update.md @@ -3,7 +3,7 @@ import io.appwrite.coroutines.CoroutineCallback; import io.appwrite.services.Databases; Client client = new Client() - .setEndpoint("https://cloud.appwrite.io/v1") // Your API Endpoint + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint .setProject("<YOUR_PROJECT_ID>") // Your project ID .setKey("<YOUR_API_KEY>"); // Your secret API key diff --git a/docs/examples/java/functions/create-build.md b/docs/examples/java/functions/create-build.md index ad55df1..a3f6cc5 100644 --- a/docs/examples/java/functions/create-build.md +++ b/docs/examples/java/functions/create-build.md @@ -3,7 +3,7 @@ import io.appwrite.coroutines.CoroutineCallback; import io.appwrite.services.Functions; Client client = new Client() - .setEndpoint("https://cloud.appwrite.io/v1") // Your API Endpoint + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint .setProject("<YOUR_PROJECT_ID>") // Your project ID .setKey("<YOUR_API_KEY>"); // Your secret API key diff --git a/docs/examples/java/functions/create-deployment.md b/docs/examples/java/functions/create-deployment.md index 920998e..6e435f4 100644 --- a/docs/examples/java/functions/create-deployment.md +++ b/docs/examples/java/functions/create-deployment.md @@ -4,7 +4,7 @@ import io.appwrite.models.InputFile; import io.appwrite.services.Functions; Client client = new Client() - .setEndpoint("https://cloud.appwrite.io/v1") // Your API Endpoint + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint .setProject("<YOUR_PROJECT_ID>") // Your project ID .setKey("<YOUR_API_KEY>"); // Your secret API key diff --git a/docs/examples/java/functions/create-execution.md b/docs/examples/java/functions/create-execution.md index 62c0634..82d48fa 100644 --- a/docs/examples/java/functions/create-execution.md +++ b/docs/examples/java/functions/create-execution.md @@ -3,7 +3,7 @@ import io.appwrite.coroutines.CoroutineCallback; import io.appwrite.services.Functions; Client client = new Client() - .setEndpoint("https://cloud.appwrite.io/v1") // Your API Endpoint + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint .setProject("<YOUR_PROJECT_ID>") // Your project ID .setSession(""); // The user session to authenticate with diff --git a/docs/examples/java/functions/create-variable.md b/docs/examples/java/functions/create-variable.md index a1d6c7b..df2bb8e 100644 --- a/docs/examples/java/functions/create-variable.md +++ b/docs/examples/java/functions/create-variable.md @@ -3,7 +3,7 @@ import io.appwrite.coroutines.CoroutineCallback; import io.appwrite.services.Functions; Client client = new Client() - .setEndpoint("https://cloud.appwrite.io/v1") // Your API Endpoint + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint .setProject("<YOUR_PROJECT_ID>") // Your project ID .setKey("<YOUR_API_KEY>"); // Your secret API key diff --git a/docs/examples/java/functions/create.md b/docs/examples/java/functions/create.md index db0cc56..7137e40 100644 --- a/docs/examples/java/functions/create.md +++ b/docs/examples/java/functions/create.md @@ -4,7 +4,7 @@ import io.appwrite.services.Functions; import io.appwrite.enums.Runtime; Client client = new Client() - .setEndpoint("https://cloud.appwrite.io/v1") // Your API Endpoint + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint .setProject("<YOUR_PROJECT_ID>") // Your project ID .setKey("<YOUR_API_KEY>"); // Your secret API key diff --git a/docs/examples/java/functions/delete-deployment.md b/docs/examples/java/functions/delete-deployment.md index f115bcc..1a6279f 100644 --- a/docs/examples/java/functions/delete-deployment.md +++ b/docs/examples/java/functions/delete-deployment.md @@ -3,7 +3,7 @@ import io.appwrite.coroutines.CoroutineCallback; import io.appwrite.services.Functions; Client client = new Client() - .setEndpoint("https://cloud.appwrite.io/v1") // Your API Endpoint + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint .setProject("<YOUR_PROJECT_ID>") // Your project ID .setKey("<YOUR_API_KEY>"); // Your secret API key diff --git a/docs/examples/java/functions/delete-execution.md b/docs/examples/java/functions/delete-execution.md index 68c11bd..68f81e8 100644 --- a/docs/examples/java/functions/delete-execution.md +++ b/docs/examples/java/functions/delete-execution.md @@ -3,7 +3,7 @@ import io.appwrite.coroutines.CoroutineCallback; import io.appwrite.services.Functions; Client client = new Client() - .setEndpoint("https://cloud.appwrite.io/v1") // Your API Endpoint + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint .setProject("<YOUR_PROJECT_ID>") // Your project ID .setKey("<YOUR_API_KEY>"); // Your secret API key diff --git a/docs/examples/java/functions/delete-variable.md b/docs/examples/java/functions/delete-variable.md index ca4d4f4..c881bdc 100644 --- a/docs/examples/java/functions/delete-variable.md +++ b/docs/examples/java/functions/delete-variable.md @@ -3,7 +3,7 @@ import io.appwrite.coroutines.CoroutineCallback; import io.appwrite.services.Functions; Client client = new Client() - .setEndpoint("https://cloud.appwrite.io/v1") // Your API Endpoint + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint .setProject("<YOUR_PROJECT_ID>") // Your project ID .setKey("<YOUR_API_KEY>"); // Your secret API key diff --git a/docs/examples/java/functions/delete.md b/docs/examples/java/functions/delete.md index 94c7da5..255fc00 100644 --- a/docs/examples/java/functions/delete.md +++ b/docs/examples/java/functions/delete.md @@ -3,7 +3,7 @@ import io.appwrite.coroutines.CoroutineCallback; import io.appwrite.services.Functions; Client client = new Client() - .setEndpoint("https://cloud.appwrite.io/v1") // Your API Endpoint + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint .setProject("<YOUR_PROJECT_ID>") // Your project ID .setKey("<YOUR_API_KEY>"); // Your secret API key diff --git a/docs/examples/java/functions/get-deployment-download.md b/docs/examples/java/functions/get-deployment-download.md index 719d662..e2a0748 100644 --- a/docs/examples/java/functions/get-deployment-download.md +++ b/docs/examples/java/functions/get-deployment-download.md @@ -3,7 +3,7 @@ import io.appwrite.coroutines.CoroutineCallback; import io.appwrite.services.Functions; Client client = new Client() - .setEndpoint("https://cloud.appwrite.io/v1") // Your API Endpoint + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint .setProject("<YOUR_PROJECT_ID>") // Your project ID .setKey("<YOUR_API_KEY>"); // Your secret API key diff --git a/docs/examples/java/functions/get-deployment.md b/docs/examples/java/functions/get-deployment.md index f039bee..b300027 100644 --- a/docs/examples/java/functions/get-deployment.md +++ b/docs/examples/java/functions/get-deployment.md @@ -3,7 +3,7 @@ import io.appwrite.coroutines.CoroutineCallback; import io.appwrite.services.Functions; Client client = new Client() - .setEndpoint("https://cloud.appwrite.io/v1") // Your API Endpoint + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint .setProject("<YOUR_PROJECT_ID>") // Your project ID .setKey("<YOUR_API_KEY>"); // Your secret API key diff --git a/docs/examples/java/functions/get-execution.md b/docs/examples/java/functions/get-execution.md index 253ff54..76e302f 100644 --- a/docs/examples/java/functions/get-execution.md +++ b/docs/examples/java/functions/get-execution.md @@ -3,7 +3,7 @@ import io.appwrite.coroutines.CoroutineCallback; import io.appwrite.services.Functions; Client client = new Client() - .setEndpoint("https://cloud.appwrite.io/v1") // Your API Endpoint + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint .setProject("<YOUR_PROJECT_ID>") // Your project ID .setSession(""); // The user session to authenticate with diff --git a/docs/examples/java/functions/get-variable.md b/docs/examples/java/functions/get-variable.md index 3d01fa4..d54882b 100644 --- a/docs/examples/java/functions/get-variable.md +++ b/docs/examples/java/functions/get-variable.md @@ -3,7 +3,7 @@ import io.appwrite.coroutines.CoroutineCallback; import io.appwrite.services.Functions; Client client = new Client() - .setEndpoint("https://cloud.appwrite.io/v1") // Your API Endpoint + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint .setProject("<YOUR_PROJECT_ID>") // Your project ID .setKey("<YOUR_API_KEY>"); // Your secret API key diff --git a/docs/examples/java/functions/get.md b/docs/examples/java/functions/get.md index c22ccca..aa55b93 100644 --- a/docs/examples/java/functions/get.md +++ b/docs/examples/java/functions/get.md @@ -3,7 +3,7 @@ import io.appwrite.coroutines.CoroutineCallback; import io.appwrite.services.Functions; Client client = new Client() - .setEndpoint("https://cloud.appwrite.io/v1") // Your API Endpoint + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint .setProject("<YOUR_PROJECT_ID>") // Your project ID .setKey("<YOUR_API_KEY>"); // Your secret API key diff --git a/docs/examples/java/functions/list-deployments.md b/docs/examples/java/functions/list-deployments.md index 9a1f1ef..16a10ca 100644 --- a/docs/examples/java/functions/list-deployments.md +++ b/docs/examples/java/functions/list-deployments.md @@ -3,7 +3,7 @@ import io.appwrite.coroutines.CoroutineCallback; import io.appwrite.services.Functions; Client client = new Client() - .setEndpoint("https://cloud.appwrite.io/v1") // Your API Endpoint + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint .setProject("<YOUR_PROJECT_ID>") // Your project ID .setKey("<YOUR_API_KEY>"); // Your secret API key diff --git a/docs/examples/java/functions/list-executions.md b/docs/examples/java/functions/list-executions.md index f2faa02..7a2ff91 100644 --- a/docs/examples/java/functions/list-executions.md +++ b/docs/examples/java/functions/list-executions.md @@ -3,7 +3,7 @@ import io.appwrite.coroutines.CoroutineCallback; import io.appwrite.services.Functions; Client client = new Client() - .setEndpoint("https://cloud.appwrite.io/v1") // Your API Endpoint + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint .setProject("<YOUR_PROJECT_ID>") // Your project ID .setSession(""); // The user session to authenticate with diff --git a/docs/examples/java/functions/list-runtimes.md b/docs/examples/java/functions/list-runtimes.md index 156e81f..304a90d 100644 --- a/docs/examples/java/functions/list-runtimes.md +++ b/docs/examples/java/functions/list-runtimes.md @@ -3,7 +3,7 @@ import io.appwrite.coroutines.CoroutineCallback; import io.appwrite.services.Functions; Client client = new Client() - .setEndpoint("https://cloud.appwrite.io/v1") // Your API Endpoint + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint .setProject("<YOUR_PROJECT_ID>") // Your project ID .setKey("<YOUR_API_KEY>"); // Your secret API key diff --git a/docs/examples/java/functions/list-specifications.md b/docs/examples/java/functions/list-specifications.md index 47d941c..e6c9c09 100644 --- a/docs/examples/java/functions/list-specifications.md +++ b/docs/examples/java/functions/list-specifications.md @@ -3,7 +3,7 @@ import io.appwrite.coroutines.CoroutineCallback; import io.appwrite.services.Functions; Client client = new Client() - .setEndpoint("https://cloud.appwrite.io/v1") // Your API Endpoint + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint .setProject("<YOUR_PROJECT_ID>") // Your project ID .setKey("<YOUR_API_KEY>"); // Your secret API key diff --git a/docs/examples/java/functions/list-variables.md b/docs/examples/java/functions/list-variables.md index 1e1e0e7..98c9ff4 100644 --- a/docs/examples/java/functions/list-variables.md +++ b/docs/examples/java/functions/list-variables.md @@ -3,7 +3,7 @@ import io.appwrite.coroutines.CoroutineCallback; import io.appwrite.services.Functions; Client client = new Client() - .setEndpoint("https://cloud.appwrite.io/v1") // Your API Endpoint + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint .setProject("<YOUR_PROJECT_ID>") // Your project ID .setKey("<YOUR_API_KEY>"); // Your secret API key diff --git a/docs/examples/java/functions/list.md b/docs/examples/java/functions/list.md index 1c501fd..a9a3206 100644 --- a/docs/examples/java/functions/list.md +++ b/docs/examples/java/functions/list.md @@ -3,7 +3,7 @@ import io.appwrite.coroutines.CoroutineCallback; import io.appwrite.services.Functions; Client client = new Client() - .setEndpoint("https://cloud.appwrite.io/v1") // Your API Endpoint + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint .setProject("<YOUR_PROJECT_ID>") // Your project ID .setKey("<YOUR_API_KEY>"); // Your secret API key diff --git a/docs/examples/java/functions/update-deployment-build.md b/docs/examples/java/functions/update-deployment-build.md index 62b684f..5fc416b 100644 --- a/docs/examples/java/functions/update-deployment-build.md +++ b/docs/examples/java/functions/update-deployment-build.md @@ -3,7 +3,7 @@ import io.appwrite.coroutines.CoroutineCallback; import io.appwrite.services.Functions; Client client = new Client() - .setEndpoint("https://cloud.appwrite.io/v1") // Your API Endpoint + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint .setProject("<YOUR_PROJECT_ID>") // Your project ID .setKey("<YOUR_API_KEY>"); // Your secret API key diff --git a/docs/examples/java/functions/update-deployment.md b/docs/examples/java/functions/update-deployment.md index 8d28501..b83e001 100644 --- a/docs/examples/java/functions/update-deployment.md +++ b/docs/examples/java/functions/update-deployment.md @@ -3,7 +3,7 @@ import io.appwrite.coroutines.CoroutineCallback; import io.appwrite.services.Functions; Client client = new Client() - .setEndpoint("https://cloud.appwrite.io/v1") // Your API Endpoint + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint .setProject("<YOUR_PROJECT_ID>") // Your project ID .setKey("<YOUR_API_KEY>"); // Your secret API key diff --git a/docs/examples/java/functions/update-variable.md b/docs/examples/java/functions/update-variable.md index 4e0576e..d2bf6db 100644 --- a/docs/examples/java/functions/update-variable.md +++ b/docs/examples/java/functions/update-variable.md @@ -3,7 +3,7 @@ import io.appwrite.coroutines.CoroutineCallback; import io.appwrite.services.Functions; Client client = new Client() - .setEndpoint("https://cloud.appwrite.io/v1") // Your API Endpoint + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint .setProject("<YOUR_PROJECT_ID>") // Your project ID .setKey("<YOUR_API_KEY>"); // Your secret API key diff --git a/docs/examples/java/functions/update.md b/docs/examples/java/functions/update.md index c63dfb4..5956c57 100644 --- a/docs/examples/java/functions/update.md +++ b/docs/examples/java/functions/update.md @@ -3,7 +3,7 @@ import io.appwrite.coroutines.CoroutineCallback; import io.appwrite.services.Functions; Client client = new Client() - .setEndpoint("https://cloud.appwrite.io/v1") // Your API Endpoint + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint .setProject("<YOUR_PROJECT_ID>") // Your project ID .setKey("<YOUR_API_KEY>"); // Your secret API key diff --git a/docs/examples/java/graphql/mutation.md b/docs/examples/java/graphql/mutation.md index a929468..7788924 100644 --- a/docs/examples/java/graphql/mutation.md +++ b/docs/examples/java/graphql/mutation.md @@ -3,7 +3,7 @@ import io.appwrite.coroutines.CoroutineCallback; import io.appwrite.services.Graphql; Client client = new Client() - .setEndpoint("https://cloud.appwrite.io/v1") // Your API Endpoint + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint .setProject("<YOUR_PROJECT_ID>") // Your project ID .setKey("<YOUR_API_KEY>"); // Your secret API key diff --git a/docs/examples/java/graphql/query.md b/docs/examples/java/graphql/query.md index 8182ea7..e109d52 100644 --- a/docs/examples/java/graphql/query.md +++ b/docs/examples/java/graphql/query.md @@ -3,7 +3,7 @@ import io.appwrite.coroutines.CoroutineCallback; import io.appwrite.services.Graphql; Client client = new Client() - .setEndpoint("https://cloud.appwrite.io/v1") // Your API Endpoint + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint .setProject("<YOUR_PROJECT_ID>") // Your project ID .setKey("<YOUR_API_KEY>"); // Your secret API key diff --git a/docs/examples/java/health/get-antivirus.md b/docs/examples/java/health/get-antivirus.md index 6c1eb15..ca3abf7 100644 --- a/docs/examples/java/health/get-antivirus.md +++ b/docs/examples/java/health/get-antivirus.md @@ -3,7 +3,7 @@ import io.appwrite.coroutines.CoroutineCallback; import io.appwrite.services.Health; Client client = new Client() - .setEndpoint("https://cloud.appwrite.io/v1") // Your API Endpoint + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint .setProject("<YOUR_PROJECT_ID>") // Your project ID .setKey("<YOUR_API_KEY>"); // Your secret API key diff --git a/docs/examples/java/health/get-cache.md b/docs/examples/java/health/get-cache.md index 62880c9..24a584c 100644 --- a/docs/examples/java/health/get-cache.md +++ b/docs/examples/java/health/get-cache.md @@ -3,7 +3,7 @@ import io.appwrite.coroutines.CoroutineCallback; import io.appwrite.services.Health; Client client = new Client() - .setEndpoint("https://cloud.appwrite.io/v1") // Your API Endpoint + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint .setProject("<YOUR_PROJECT_ID>") // Your project ID .setKey("<YOUR_API_KEY>"); // Your secret API key diff --git a/docs/examples/java/health/get-certificate.md b/docs/examples/java/health/get-certificate.md index 2a60a4c..f4cb5a4 100644 --- a/docs/examples/java/health/get-certificate.md +++ b/docs/examples/java/health/get-certificate.md @@ -3,7 +3,7 @@ import io.appwrite.coroutines.CoroutineCallback; import io.appwrite.services.Health; Client client = new Client() - .setEndpoint("https://cloud.appwrite.io/v1") // Your API Endpoint + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint .setProject("<YOUR_PROJECT_ID>") // Your project ID .setKey("<YOUR_API_KEY>"); // Your secret API key diff --git a/docs/examples/java/health/get-d-b.md b/docs/examples/java/health/get-d-b.md index 703989f..c7a7bef 100644 --- a/docs/examples/java/health/get-d-b.md +++ b/docs/examples/java/health/get-d-b.md @@ -3,7 +3,7 @@ import io.appwrite.coroutines.CoroutineCallback; import io.appwrite.services.Health; Client client = new Client() - .setEndpoint("https://cloud.appwrite.io/v1") // Your API Endpoint + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint .setProject("<YOUR_PROJECT_ID>") // Your project ID .setKey("<YOUR_API_KEY>"); // Your secret API key diff --git a/docs/examples/java/health/get-failed-jobs.md b/docs/examples/java/health/get-failed-jobs.md index 25f53b8..d2b81bd 100644 --- a/docs/examples/java/health/get-failed-jobs.md +++ b/docs/examples/java/health/get-failed-jobs.md @@ -4,7 +4,7 @@ import io.appwrite.services.Health; import io.appwrite.enums.Name; Client client = new Client() - .setEndpoint("https://cloud.appwrite.io/v1") // Your API Endpoint + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint .setProject("<YOUR_PROJECT_ID>") // Your project ID .setKey("<YOUR_API_KEY>"); // Your secret API key diff --git a/docs/examples/java/health/get-pub-sub.md b/docs/examples/java/health/get-pub-sub.md index 116da6f..70210c4 100644 --- a/docs/examples/java/health/get-pub-sub.md +++ b/docs/examples/java/health/get-pub-sub.md @@ -3,7 +3,7 @@ import io.appwrite.coroutines.CoroutineCallback; import io.appwrite.services.Health; Client client = new Client() - .setEndpoint("https://cloud.appwrite.io/v1") // Your API Endpoint + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint .setProject("<YOUR_PROJECT_ID>") // Your project ID .setKey("<YOUR_API_KEY>"); // Your secret API key diff --git a/docs/examples/java/health/get-queue-builds.md b/docs/examples/java/health/get-queue-builds.md index a80a745..2ca5d7f 100644 --- a/docs/examples/java/health/get-queue-builds.md +++ b/docs/examples/java/health/get-queue-builds.md @@ -3,7 +3,7 @@ import io.appwrite.coroutines.CoroutineCallback; import io.appwrite.services.Health; Client client = new Client() - .setEndpoint("https://cloud.appwrite.io/v1") // Your API Endpoint + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint .setProject("<YOUR_PROJECT_ID>") // Your project ID .setKey("<YOUR_API_KEY>"); // Your secret API key diff --git a/docs/examples/java/health/get-queue-certificates.md b/docs/examples/java/health/get-queue-certificates.md index ee0d48e..519817a 100644 --- a/docs/examples/java/health/get-queue-certificates.md +++ b/docs/examples/java/health/get-queue-certificates.md @@ -3,7 +3,7 @@ import io.appwrite.coroutines.CoroutineCallback; import io.appwrite.services.Health; Client client = new Client() - .setEndpoint("https://cloud.appwrite.io/v1") // Your API Endpoint + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint .setProject("<YOUR_PROJECT_ID>") // Your project ID .setKey("<YOUR_API_KEY>"); // Your secret API key diff --git a/docs/examples/java/health/get-queue-databases.md b/docs/examples/java/health/get-queue-databases.md index 7f34b19..2f17566 100644 --- a/docs/examples/java/health/get-queue-databases.md +++ b/docs/examples/java/health/get-queue-databases.md @@ -3,7 +3,7 @@ import io.appwrite.coroutines.CoroutineCallback; import io.appwrite.services.Health; Client client = new Client() - .setEndpoint("https://cloud.appwrite.io/v1") // Your API Endpoint + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint .setProject("<YOUR_PROJECT_ID>") // Your project ID .setKey("<YOUR_API_KEY>"); // Your secret API key diff --git a/docs/examples/java/health/get-queue-deletes.md b/docs/examples/java/health/get-queue-deletes.md index 23ed2af..e65aa9a 100644 --- a/docs/examples/java/health/get-queue-deletes.md +++ b/docs/examples/java/health/get-queue-deletes.md @@ -3,7 +3,7 @@ import io.appwrite.coroutines.CoroutineCallback; import io.appwrite.services.Health; Client client = new Client() - .setEndpoint("https://cloud.appwrite.io/v1") // Your API Endpoint + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint .setProject("<YOUR_PROJECT_ID>") // Your project ID .setKey("<YOUR_API_KEY>"); // Your secret API key diff --git a/docs/examples/java/health/get-queue-functions.md b/docs/examples/java/health/get-queue-functions.md index 2fcfb8b..720f114 100644 --- a/docs/examples/java/health/get-queue-functions.md +++ b/docs/examples/java/health/get-queue-functions.md @@ -3,7 +3,7 @@ import io.appwrite.coroutines.CoroutineCallback; import io.appwrite.services.Health; Client client = new Client() - .setEndpoint("https://cloud.appwrite.io/v1") // Your API Endpoint + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint .setProject("<YOUR_PROJECT_ID>") // Your project ID .setKey("<YOUR_API_KEY>"); // Your secret API key diff --git a/docs/examples/java/health/get-queue-logs.md b/docs/examples/java/health/get-queue-logs.md index bcf6da2..09b0de4 100644 --- a/docs/examples/java/health/get-queue-logs.md +++ b/docs/examples/java/health/get-queue-logs.md @@ -3,7 +3,7 @@ import io.appwrite.coroutines.CoroutineCallback; import io.appwrite.services.Health; Client client = new Client() - .setEndpoint("https://cloud.appwrite.io/v1") // Your API Endpoint + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint .setProject("<YOUR_PROJECT_ID>") // Your project ID .setKey("<YOUR_API_KEY>"); // Your secret API key diff --git a/docs/examples/java/health/get-queue-mails.md b/docs/examples/java/health/get-queue-mails.md index 7580db6..b1ae357 100644 --- a/docs/examples/java/health/get-queue-mails.md +++ b/docs/examples/java/health/get-queue-mails.md @@ -3,7 +3,7 @@ import io.appwrite.coroutines.CoroutineCallback; import io.appwrite.services.Health; Client client = new Client() - .setEndpoint("https://cloud.appwrite.io/v1") // Your API Endpoint + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint .setProject("<YOUR_PROJECT_ID>") // Your project ID .setKey("<YOUR_API_KEY>"); // Your secret API key diff --git a/docs/examples/java/health/get-queue-messaging.md b/docs/examples/java/health/get-queue-messaging.md index 7b927d0..61c0b8c 100644 --- a/docs/examples/java/health/get-queue-messaging.md +++ b/docs/examples/java/health/get-queue-messaging.md @@ -3,7 +3,7 @@ import io.appwrite.coroutines.CoroutineCallback; import io.appwrite.services.Health; Client client = new Client() - .setEndpoint("https://cloud.appwrite.io/v1") // Your API Endpoint + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint .setProject("<YOUR_PROJECT_ID>") // Your project ID .setKey("<YOUR_API_KEY>"); // Your secret API key diff --git a/docs/examples/java/health/get-queue-migrations.md b/docs/examples/java/health/get-queue-migrations.md index c1a9fad..0e7d669 100644 --- a/docs/examples/java/health/get-queue-migrations.md +++ b/docs/examples/java/health/get-queue-migrations.md @@ -3,7 +3,7 @@ import io.appwrite.coroutines.CoroutineCallback; import io.appwrite.services.Health; Client client = new Client() - .setEndpoint("https://cloud.appwrite.io/v1") // Your API Endpoint + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint .setProject("<YOUR_PROJECT_ID>") // Your project ID .setKey("<YOUR_API_KEY>"); // Your secret API key diff --git a/docs/examples/java/health/get-queue-stats-resources.md b/docs/examples/java/health/get-queue-stats-resources.md index 5a6db4a..e2f8062 100644 --- a/docs/examples/java/health/get-queue-stats-resources.md +++ b/docs/examples/java/health/get-queue-stats-resources.md @@ -3,7 +3,7 @@ import io.appwrite.coroutines.CoroutineCallback; import io.appwrite.services.Health; Client client = new Client() - .setEndpoint("https://cloud.appwrite.io/v1") // Your API Endpoint + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint .setProject("<YOUR_PROJECT_ID>") // Your project ID .setKey("<YOUR_API_KEY>"); // Your secret API key diff --git a/docs/examples/java/health/get-queue-usage.md b/docs/examples/java/health/get-queue-usage.md index 360567a..bfda61a 100644 --- a/docs/examples/java/health/get-queue-usage.md +++ b/docs/examples/java/health/get-queue-usage.md @@ -3,7 +3,7 @@ import io.appwrite.coroutines.CoroutineCallback; import io.appwrite.services.Health; Client client = new Client() - .setEndpoint("https://cloud.appwrite.io/v1") // Your API Endpoint + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint .setProject("<YOUR_PROJECT_ID>") // Your project ID .setKey("<YOUR_API_KEY>"); // Your secret API key diff --git a/docs/examples/java/health/get-queue-webhooks.md b/docs/examples/java/health/get-queue-webhooks.md index 180c0cc..d9aed66 100644 --- a/docs/examples/java/health/get-queue-webhooks.md +++ b/docs/examples/java/health/get-queue-webhooks.md @@ -3,7 +3,7 @@ import io.appwrite.coroutines.CoroutineCallback; import io.appwrite.services.Health; Client client = new Client() - .setEndpoint("https://cloud.appwrite.io/v1") // Your API Endpoint + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint .setProject("<YOUR_PROJECT_ID>") // Your project ID .setKey("<YOUR_API_KEY>"); // Your secret API key diff --git a/docs/examples/java/health/get-storage-local.md b/docs/examples/java/health/get-storage-local.md index 99c7513..65367cc 100644 --- a/docs/examples/java/health/get-storage-local.md +++ b/docs/examples/java/health/get-storage-local.md @@ -3,7 +3,7 @@ import io.appwrite.coroutines.CoroutineCallback; import io.appwrite.services.Health; Client client = new Client() - .setEndpoint("https://cloud.appwrite.io/v1") // Your API Endpoint + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint .setProject("<YOUR_PROJECT_ID>") // Your project ID .setKey("<YOUR_API_KEY>"); // Your secret API key diff --git a/docs/examples/java/health/get-storage.md b/docs/examples/java/health/get-storage.md index 9bd63ca..3a0f0f8 100644 --- a/docs/examples/java/health/get-storage.md +++ b/docs/examples/java/health/get-storage.md @@ -3,7 +3,7 @@ import io.appwrite.coroutines.CoroutineCallback; import io.appwrite.services.Health; Client client = new Client() - .setEndpoint("https://cloud.appwrite.io/v1") // Your API Endpoint + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint .setProject("<YOUR_PROJECT_ID>") // Your project ID .setKey("<YOUR_API_KEY>"); // Your secret API key diff --git a/docs/examples/java/health/get-time.md b/docs/examples/java/health/get-time.md index 89ec655..f0ba668 100644 --- a/docs/examples/java/health/get-time.md +++ b/docs/examples/java/health/get-time.md @@ -3,7 +3,7 @@ import io.appwrite.coroutines.CoroutineCallback; import io.appwrite.services.Health; Client client = new Client() - .setEndpoint("https://cloud.appwrite.io/v1") // Your API Endpoint + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint .setProject("<YOUR_PROJECT_ID>") // Your project ID .setKey("<YOUR_API_KEY>"); // Your secret API key diff --git a/docs/examples/java/health/get.md b/docs/examples/java/health/get.md index e81254e..87a7c0a 100644 --- a/docs/examples/java/health/get.md +++ b/docs/examples/java/health/get.md @@ -3,7 +3,7 @@ import io.appwrite.coroutines.CoroutineCallback; import io.appwrite.services.Health; Client client = new Client() - .setEndpoint("https://cloud.appwrite.io/v1") // Your API Endpoint + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint .setProject("<YOUR_PROJECT_ID>") // Your project ID .setKey("<YOUR_API_KEY>"); // Your secret API key diff --git a/docs/examples/java/locale/get.md b/docs/examples/java/locale/get.md index 8063ce1..2d5e0ac 100644 --- a/docs/examples/java/locale/get.md +++ b/docs/examples/java/locale/get.md @@ -3,7 +3,7 @@ import io.appwrite.coroutines.CoroutineCallback; import io.appwrite.services.Locale; Client client = new Client() - .setEndpoint("https://cloud.appwrite.io/v1") // Your API Endpoint + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint .setProject("<YOUR_PROJECT_ID>") // Your project ID .setSession(""); // The user session to authenticate with diff --git a/docs/examples/java/locale/list-codes.md b/docs/examples/java/locale/list-codes.md index 4bc244a..9f07d1d 100644 --- a/docs/examples/java/locale/list-codes.md +++ b/docs/examples/java/locale/list-codes.md @@ -3,7 +3,7 @@ import io.appwrite.coroutines.CoroutineCallback; import io.appwrite.services.Locale; Client client = new Client() - .setEndpoint("https://cloud.appwrite.io/v1") // Your API Endpoint + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint .setProject("<YOUR_PROJECT_ID>") // Your project ID .setSession(""); // The user session to authenticate with diff --git a/docs/examples/java/locale/list-continents.md b/docs/examples/java/locale/list-continents.md index 03b9122..5d9e4b0 100644 --- a/docs/examples/java/locale/list-continents.md +++ b/docs/examples/java/locale/list-continents.md @@ -3,7 +3,7 @@ import io.appwrite.coroutines.CoroutineCallback; import io.appwrite.services.Locale; Client client = new Client() - .setEndpoint("https://cloud.appwrite.io/v1") // Your API Endpoint + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint .setProject("<YOUR_PROJECT_ID>") // Your project ID .setSession(""); // The user session to authenticate with diff --git a/docs/examples/java/locale/list-countries-e-u.md b/docs/examples/java/locale/list-countries-e-u.md index 9a6ee54..232a0ef 100644 --- a/docs/examples/java/locale/list-countries-e-u.md +++ b/docs/examples/java/locale/list-countries-e-u.md @@ -3,7 +3,7 @@ import io.appwrite.coroutines.CoroutineCallback; import io.appwrite.services.Locale; Client client = new Client() - .setEndpoint("https://cloud.appwrite.io/v1") // Your API Endpoint + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint .setProject("<YOUR_PROJECT_ID>") // Your project ID .setSession(""); // The user session to authenticate with diff --git a/docs/examples/java/locale/list-countries-phones.md b/docs/examples/java/locale/list-countries-phones.md index cfab3be..a4739a5 100644 --- a/docs/examples/java/locale/list-countries-phones.md +++ b/docs/examples/java/locale/list-countries-phones.md @@ -3,7 +3,7 @@ import io.appwrite.coroutines.CoroutineCallback; import io.appwrite.services.Locale; Client client = new Client() - .setEndpoint("https://cloud.appwrite.io/v1") // Your API Endpoint + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint .setProject("<YOUR_PROJECT_ID>") // Your project ID .setSession(""); // The user session to authenticate with diff --git a/docs/examples/java/locale/list-countries.md b/docs/examples/java/locale/list-countries.md index 079a839..5b8f250 100644 --- a/docs/examples/java/locale/list-countries.md +++ b/docs/examples/java/locale/list-countries.md @@ -3,7 +3,7 @@ import io.appwrite.coroutines.CoroutineCallback; import io.appwrite.services.Locale; Client client = new Client() - .setEndpoint("https://cloud.appwrite.io/v1") // Your API Endpoint + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint .setProject("<YOUR_PROJECT_ID>") // Your project ID .setSession(""); // The user session to authenticate with diff --git a/docs/examples/java/locale/list-currencies.md b/docs/examples/java/locale/list-currencies.md index bab723f..adf1d78 100644 --- a/docs/examples/java/locale/list-currencies.md +++ b/docs/examples/java/locale/list-currencies.md @@ -3,7 +3,7 @@ import io.appwrite.coroutines.CoroutineCallback; import io.appwrite.services.Locale; Client client = new Client() - .setEndpoint("https://cloud.appwrite.io/v1") // Your API Endpoint + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint .setProject("<YOUR_PROJECT_ID>") // Your project ID .setSession(""); // The user session to authenticate with diff --git a/docs/examples/java/locale/list-languages.md b/docs/examples/java/locale/list-languages.md index b0435b7..c92ea52 100644 --- a/docs/examples/java/locale/list-languages.md +++ b/docs/examples/java/locale/list-languages.md @@ -3,7 +3,7 @@ import io.appwrite.coroutines.CoroutineCallback; import io.appwrite.services.Locale; Client client = new Client() - .setEndpoint("https://cloud.appwrite.io/v1") // Your API Endpoint + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint .setProject("<YOUR_PROJECT_ID>") // Your project ID .setSession(""); // The user session to authenticate with diff --git a/docs/examples/java/messaging/create-apns-provider.md b/docs/examples/java/messaging/create-apns-provider.md index 5dde983..0f66180 100644 --- a/docs/examples/java/messaging/create-apns-provider.md +++ b/docs/examples/java/messaging/create-apns-provider.md @@ -3,7 +3,7 @@ import io.appwrite.coroutines.CoroutineCallback; import io.appwrite.services.Messaging; Client client = new Client() - .setEndpoint("https://cloud.appwrite.io/v1") // Your API Endpoint + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint .setProject("<YOUR_PROJECT_ID>") // Your project ID .setKey("<YOUR_API_KEY>"); // Your secret API key diff --git a/docs/examples/java/messaging/create-email.md b/docs/examples/java/messaging/create-email.md index 753a89b..d6ab5ee 100644 --- a/docs/examples/java/messaging/create-email.md +++ b/docs/examples/java/messaging/create-email.md @@ -3,7 +3,7 @@ import io.appwrite.coroutines.CoroutineCallback; import io.appwrite.services.Messaging; Client client = new Client() - .setEndpoint("https://cloud.appwrite.io/v1") // Your API Endpoint + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint .setProject("<YOUR_PROJECT_ID>") // Your project ID .setKey("<YOUR_API_KEY>"); // Your secret API key diff --git a/docs/examples/java/messaging/create-fcm-provider.md b/docs/examples/java/messaging/create-fcm-provider.md index 1078514..636a1bd 100644 --- a/docs/examples/java/messaging/create-fcm-provider.md +++ b/docs/examples/java/messaging/create-fcm-provider.md @@ -3,7 +3,7 @@ import io.appwrite.coroutines.CoroutineCallback; import io.appwrite.services.Messaging; Client client = new Client() - .setEndpoint("https://cloud.appwrite.io/v1") // Your API Endpoint + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint .setProject("<YOUR_PROJECT_ID>") // Your project ID .setKey("<YOUR_API_KEY>"); // Your secret API key diff --git a/docs/examples/java/messaging/create-mailgun-provider.md b/docs/examples/java/messaging/create-mailgun-provider.md index 4b2a7bd..272f9d2 100644 --- a/docs/examples/java/messaging/create-mailgun-provider.md +++ b/docs/examples/java/messaging/create-mailgun-provider.md @@ -3,7 +3,7 @@ import io.appwrite.coroutines.CoroutineCallback; import io.appwrite.services.Messaging; Client client = new Client() - .setEndpoint("https://cloud.appwrite.io/v1") // Your API Endpoint + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint .setProject("<YOUR_PROJECT_ID>") // Your project ID .setKey("<YOUR_API_KEY>"); // Your secret API key diff --git a/docs/examples/java/messaging/create-msg91provider.md b/docs/examples/java/messaging/create-msg91provider.md index 6cc120c..2100529 100644 --- a/docs/examples/java/messaging/create-msg91provider.md +++ b/docs/examples/java/messaging/create-msg91provider.md @@ -3,7 +3,7 @@ import io.appwrite.coroutines.CoroutineCallback; import io.appwrite.services.Messaging; Client client = new Client() - .setEndpoint("https://cloud.appwrite.io/v1") // Your API Endpoint + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint .setProject("<YOUR_PROJECT_ID>") // Your project ID .setKey("<YOUR_API_KEY>"); // Your secret API key diff --git a/docs/examples/java/messaging/create-push.md b/docs/examples/java/messaging/create-push.md index 56c7a60..277ab96 100644 --- a/docs/examples/java/messaging/create-push.md +++ b/docs/examples/java/messaging/create-push.md @@ -3,7 +3,7 @@ import io.appwrite.coroutines.CoroutineCallback; import io.appwrite.services.Messaging; Client client = new Client() - .setEndpoint("https://cloud.appwrite.io/v1") // Your API Endpoint + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint .setProject("<YOUR_PROJECT_ID>") // Your project ID .setKey("<YOUR_API_KEY>"); // Your secret API key diff --git a/docs/examples/java/messaging/create-sendgrid-provider.md b/docs/examples/java/messaging/create-sendgrid-provider.md index 20e1274..84c5bf4 100644 --- a/docs/examples/java/messaging/create-sendgrid-provider.md +++ b/docs/examples/java/messaging/create-sendgrid-provider.md @@ -3,7 +3,7 @@ import io.appwrite.coroutines.CoroutineCallback; import io.appwrite.services.Messaging; Client client = new Client() - .setEndpoint("https://cloud.appwrite.io/v1") // Your API Endpoint + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint .setProject("<YOUR_PROJECT_ID>") // Your project ID .setKey("<YOUR_API_KEY>"); // Your secret API key diff --git a/docs/examples/java/messaging/create-sms.md b/docs/examples/java/messaging/create-sms.md index 60e1749..9e3e3bd 100644 --- a/docs/examples/java/messaging/create-sms.md +++ b/docs/examples/java/messaging/create-sms.md @@ -3,7 +3,7 @@ import io.appwrite.coroutines.CoroutineCallback; import io.appwrite.services.Messaging; Client client = new Client() - .setEndpoint("https://cloud.appwrite.io/v1") // Your API Endpoint + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint .setProject("<YOUR_PROJECT_ID>") // Your project ID .setKey("<YOUR_API_KEY>"); // Your secret API key diff --git a/docs/examples/java/messaging/create-smtp-provider.md b/docs/examples/java/messaging/create-smtp-provider.md index 3f69f61..ebd153c 100644 --- a/docs/examples/java/messaging/create-smtp-provider.md +++ b/docs/examples/java/messaging/create-smtp-provider.md @@ -3,7 +3,7 @@ import io.appwrite.coroutines.CoroutineCallback; import io.appwrite.services.Messaging; Client client = new Client() - .setEndpoint("https://cloud.appwrite.io/v1") // Your API Endpoint + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint .setProject("<YOUR_PROJECT_ID>") // Your project ID .setKey("<YOUR_API_KEY>"); // Your secret API key diff --git a/docs/examples/java/messaging/create-subscriber.md b/docs/examples/java/messaging/create-subscriber.md index 77ef2d5..1ccb8fe 100644 --- a/docs/examples/java/messaging/create-subscriber.md +++ b/docs/examples/java/messaging/create-subscriber.md @@ -3,7 +3,7 @@ import io.appwrite.coroutines.CoroutineCallback; import io.appwrite.services.Messaging; Client client = new Client() - .setEndpoint("https://cloud.appwrite.io/v1") // Your API Endpoint + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint .setProject("<YOUR_PROJECT_ID>") // Your project ID .setJWT("<YOUR_JWT>"); // Your secret JSON Web Token diff --git a/docs/examples/java/messaging/create-telesign-provider.md b/docs/examples/java/messaging/create-telesign-provider.md index f660814..6b64499 100644 --- a/docs/examples/java/messaging/create-telesign-provider.md +++ b/docs/examples/java/messaging/create-telesign-provider.md @@ -3,7 +3,7 @@ import io.appwrite.coroutines.CoroutineCallback; import io.appwrite.services.Messaging; Client client = new Client() - .setEndpoint("https://cloud.appwrite.io/v1") // Your API Endpoint + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint .setProject("<YOUR_PROJECT_ID>") // Your project ID .setKey("<YOUR_API_KEY>"); // Your secret API key diff --git a/docs/examples/java/messaging/create-textmagic-provider.md b/docs/examples/java/messaging/create-textmagic-provider.md index cda11d5..477d7d8 100644 --- a/docs/examples/java/messaging/create-textmagic-provider.md +++ b/docs/examples/java/messaging/create-textmagic-provider.md @@ -3,7 +3,7 @@ import io.appwrite.coroutines.CoroutineCallback; import io.appwrite.services.Messaging; Client client = new Client() - .setEndpoint("https://cloud.appwrite.io/v1") // Your API Endpoint + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint .setProject("<YOUR_PROJECT_ID>") // Your project ID .setKey("<YOUR_API_KEY>"); // Your secret API key diff --git a/docs/examples/java/messaging/create-topic.md b/docs/examples/java/messaging/create-topic.md index 8fa74d8..63a24b4 100644 --- a/docs/examples/java/messaging/create-topic.md +++ b/docs/examples/java/messaging/create-topic.md @@ -3,7 +3,7 @@ import io.appwrite.coroutines.CoroutineCallback; import io.appwrite.services.Messaging; Client client = new Client() - .setEndpoint("https://cloud.appwrite.io/v1") // Your API Endpoint + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint .setProject("<YOUR_PROJECT_ID>") // Your project ID .setKey("<YOUR_API_KEY>"); // Your secret API key diff --git a/docs/examples/java/messaging/create-twilio-provider.md b/docs/examples/java/messaging/create-twilio-provider.md index a122837..8d1b4da 100644 --- a/docs/examples/java/messaging/create-twilio-provider.md +++ b/docs/examples/java/messaging/create-twilio-provider.md @@ -3,7 +3,7 @@ import io.appwrite.coroutines.CoroutineCallback; import io.appwrite.services.Messaging; Client client = new Client() - .setEndpoint("https://cloud.appwrite.io/v1") // Your API Endpoint + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint .setProject("<YOUR_PROJECT_ID>") // Your project ID .setKey("<YOUR_API_KEY>"); // Your secret API key diff --git a/docs/examples/java/messaging/create-vonage-provider.md b/docs/examples/java/messaging/create-vonage-provider.md index 808ca0c..db1e476 100644 --- a/docs/examples/java/messaging/create-vonage-provider.md +++ b/docs/examples/java/messaging/create-vonage-provider.md @@ -3,7 +3,7 @@ import io.appwrite.coroutines.CoroutineCallback; import io.appwrite.services.Messaging; Client client = new Client() - .setEndpoint("https://cloud.appwrite.io/v1") // Your API Endpoint + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint .setProject("<YOUR_PROJECT_ID>") // Your project ID .setKey("<YOUR_API_KEY>"); // Your secret API key diff --git a/docs/examples/java/messaging/delete-provider.md b/docs/examples/java/messaging/delete-provider.md index e1337dc..b0fa837 100644 --- a/docs/examples/java/messaging/delete-provider.md +++ b/docs/examples/java/messaging/delete-provider.md @@ -3,7 +3,7 @@ import io.appwrite.coroutines.CoroutineCallback; import io.appwrite.services.Messaging; Client client = new Client() - .setEndpoint("https://cloud.appwrite.io/v1") // Your API Endpoint + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint .setProject("<YOUR_PROJECT_ID>") // Your project ID .setKey("<YOUR_API_KEY>"); // Your secret API key diff --git a/docs/examples/java/messaging/delete-subscriber.md b/docs/examples/java/messaging/delete-subscriber.md index c80fc72..a3635b9 100644 --- a/docs/examples/java/messaging/delete-subscriber.md +++ b/docs/examples/java/messaging/delete-subscriber.md @@ -3,7 +3,7 @@ import io.appwrite.coroutines.CoroutineCallback; import io.appwrite.services.Messaging; Client client = new Client() - .setEndpoint("https://cloud.appwrite.io/v1") // Your API Endpoint + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint .setProject("<YOUR_PROJECT_ID>") // Your project ID .setJWT("<YOUR_JWT>"); // Your secret JSON Web Token diff --git a/docs/examples/java/messaging/delete-topic.md b/docs/examples/java/messaging/delete-topic.md index 9c51144..7b598b2 100644 --- a/docs/examples/java/messaging/delete-topic.md +++ b/docs/examples/java/messaging/delete-topic.md @@ -3,7 +3,7 @@ import io.appwrite.coroutines.CoroutineCallback; import io.appwrite.services.Messaging; Client client = new Client() - .setEndpoint("https://cloud.appwrite.io/v1") // Your API Endpoint + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint .setProject("<YOUR_PROJECT_ID>") // Your project ID .setKey("<YOUR_API_KEY>"); // Your secret API key diff --git a/docs/examples/java/messaging/delete.md b/docs/examples/java/messaging/delete.md index f90336a..1395a39 100644 --- a/docs/examples/java/messaging/delete.md +++ b/docs/examples/java/messaging/delete.md @@ -3,7 +3,7 @@ import io.appwrite.coroutines.CoroutineCallback; import io.appwrite.services.Messaging; Client client = new Client() - .setEndpoint("https://cloud.appwrite.io/v1") // Your API Endpoint + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint .setProject("<YOUR_PROJECT_ID>") // Your project ID .setKey("<YOUR_API_KEY>"); // Your secret API key diff --git a/docs/examples/java/messaging/get-message.md b/docs/examples/java/messaging/get-message.md index 5e940cf..3860ff2 100644 --- a/docs/examples/java/messaging/get-message.md +++ b/docs/examples/java/messaging/get-message.md @@ -3,7 +3,7 @@ import io.appwrite.coroutines.CoroutineCallback; import io.appwrite.services.Messaging; Client client = new Client() - .setEndpoint("https://cloud.appwrite.io/v1") // Your API Endpoint + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint .setProject("<YOUR_PROJECT_ID>") // Your project ID .setKey("<YOUR_API_KEY>"); // Your secret API key diff --git a/docs/examples/java/messaging/get-provider.md b/docs/examples/java/messaging/get-provider.md index 74ece13..9717b90 100644 --- a/docs/examples/java/messaging/get-provider.md +++ b/docs/examples/java/messaging/get-provider.md @@ -3,7 +3,7 @@ import io.appwrite.coroutines.CoroutineCallback; import io.appwrite.services.Messaging; Client client = new Client() - .setEndpoint("https://cloud.appwrite.io/v1") // Your API Endpoint + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint .setProject("<YOUR_PROJECT_ID>") // Your project ID .setKey("<YOUR_API_KEY>"); // Your secret API key diff --git a/docs/examples/java/messaging/get-subscriber.md b/docs/examples/java/messaging/get-subscriber.md index 2e6beaa..641a494 100644 --- a/docs/examples/java/messaging/get-subscriber.md +++ b/docs/examples/java/messaging/get-subscriber.md @@ -3,7 +3,7 @@ import io.appwrite.coroutines.CoroutineCallback; import io.appwrite.services.Messaging; Client client = new Client() - .setEndpoint("https://cloud.appwrite.io/v1") // Your API Endpoint + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint .setProject("<YOUR_PROJECT_ID>") // Your project ID .setKey("<YOUR_API_KEY>"); // Your secret API key diff --git a/docs/examples/java/messaging/get-topic.md b/docs/examples/java/messaging/get-topic.md index adf64bb..c9f2eff 100644 --- a/docs/examples/java/messaging/get-topic.md +++ b/docs/examples/java/messaging/get-topic.md @@ -3,7 +3,7 @@ import io.appwrite.coroutines.CoroutineCallback; import io.appwrite.services.Messaging; Client client = new Client() - .setEndpoint("https://cloud.appwrite.io/v1") // Your API Endpoint + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint .setProject("<YOUR_PROJECT_ID>") // Your project ID .setKey("<YOUR_API_KEY>"); // Your secret API key diff --git a/docs/examples/java/messaging/list-message-logs.md b/docs/examples/java/messaging/list-message-logs.md index 70bb49a..0f94e46 100644 --- a/docs/examples/java/messaging/list-message-logs.md +++ b/docs/examples/java/messaging/list-message-logs.md @@ -3,7 +3,7 @@ import io.appwrite.coroutines.CoroutineCallback; import io.appwrite.services.Messaging; Client client = new Client() - .setEndpoint("https://cloud.appwrite.io/v1") // Your API Endpoint + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint .setProject("<YOUR_PROJECT_ID>") // Your project ID .setKey("<YOUR_API_KEY>"); // Your secret API key diff --git a/docs/examples/java/messaging/list-messages.md b/docs/examples/java/messaging/list-messages.md index 847ce73..006ba7c 100644 --- a/docs/examples/java/messaging/list-messages.md +++ b/docs/examples/java/messaging/list-messages.md @@ -3,7 +3,7 @@ import io.appwrite.coroutines.CoroutineCallback; import io.appwrite.services.Messaging; Client client = new Client() - .setEndpoint("https://cloud.appwrite.io/v1") // Your API Endpoint + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint .setProject("<YOUR_PROJECT_ID>") // Your project ID .setKey("<YOUR_API_KEY>"); // Your secret API key diff --git a/docs/examples/java/messaging/list-provider-logs.md b/docs/examples/java/messaging/list-provider-logs.md index be1aba0..5f77f2d 100644 --- a/docs/examples/java/messaging/list-provider-logs.md +++ b/docs/examples/java/messaging/list-provider-logs.md @@ -3,7 +3,7 @@ import io.appwrite.coroutines.CoroutineCallback; import io.appwrite.services.Messaging; Client client = new Client() - .setEndpoint("https://cloud.appwrite.io/v1") // Your API Endpoint + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint .setProject("<YOUR_PROJECT_ID>") // Your project ID .setKey("<YOUR_API_KEY>"); // Your secret API key diff --git a/docs/examples/java/messaging/list-providers.md b/docs/examples/java/messaging/list-providers.md index feda900..b069dda 100644 --- a/docs/examples/java/messaging/list-providers.md +++ b/docs/examples/java/messaging/list-providers.md @@ -3,7 +3,7 @@ import io.appwrite.coroutines.CoroutineCallback; import io.appwrite.services.Messaging; Client client = new Client() - .setEndpoint("https://cloud.appwrite.io/v1") // Your API Endpoint + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint .setProject("<YOUR_PROJECT_ID>") // Your project ID .setKey("<YOUR_API_KEY>"); // Your secret API key diff --git a/docs/examples/java/messaging/list-subscriber-logs.md b/docs/examples/java/messaging/list-subscriber-logs.md index 30250e4..b10e446 100644 --- a/docs/examples/java/messaging/list-subscriber-logs.md +++ b/docs/examples/java/messaging/list-subscriber-logs.md @@ -3,7 +3,7 @@ import io.appwrite.coroutines.CoroutineCallback; import io.appwrite.services.Messaging; Client client = new Client() - .setEndpoint("https://cloud.appwrite.io/v1") // Your API Endpoint + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint .setProject("<YOUR_PROJECT_ID>") // Your project ID .setKey("<YOUR_API_KEY>"); // Your secret API key diff --git a/docs/examples/java/messaging/list-subscribers.md b/docs/examples/java/messaging/list-subscribers.md index d00d492..52ca5b0 100644 --- a/docs/examples/java/messaging/list-subscribers.md +++ b/docs/examples/java/messaging/list-subscribers.md @@ -3,7 +3,7 @@ import io.appwrite.coroutines.CoroutineCallback; import io.appwrite.services.Messaging; Client client = new Client() - .setEndpoint("https://cloud.appwrite.io/v1") // Your API Endpoint + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint .setProject("<YOUR_PROJECT_ID>") // Your project ID .setKey("<YOUR_API_KEY>"); // Your secret API key diff --git a/docs/examples/java/messaging/list-targets.md b/docs/examples/java/messaging/list-targets.md index f1eeac0..5b9f40e 100644 --- a/docs/examples/java/messaging/list-targets.md +++ b/docs/examples/java/messaging/list-targets.md @@ -3,7 +3,7 @@ import io.appwrite.coroutines.CoroutineCallback; import io.appwrite.services.Messaging; Client client = new Client() - .setEndpoint("https://cloud.appwrite.io/v1") // Your API Endpoint + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint .setProject("<YOUR_PROJECT_ID>") // Your project ID .setKey("<YOUR_API_KEY>"); // Your secret API key diff --git a/docs/examples/java/messaging/list-topic-logs.md b/docs/examples/java/messaging/list-topic-logs.md index c7edc92..b2e9444 100644 --- a/docs/examples/java/messaging/list-topic-logs.md +++ b/docs/examples/java/messaging/list-topic-logs.md @@ -3,7 +3,7 @@ import io.appwrite.coroutines.CoroutineCallback; import io.appwrite.services.Messaging; Client client = new Client() - .setEndpoint("https://cloud.appwrite.io/v1") // Your API Endpoint + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint .setProject("<YOUR_PROJECT_ID>") // Your project ID .setKey("<YOUR_API_KEY>"); // Your secret API key diff --git a/docs/examples/java/messaging/list-topics.md b/docs/examples/java/messaging/list-topics.md index 278d0d4..e6408a6 100644 --- a/docs/examples/java/messaging/list-topics.md +++ b/docs/examples/java/messaging/list-topics.md @@ -3,7 +3,7 @@ import io.appwrite.coroutines.CoroutineCallback; import io.appwrite.services.Messaging; Client client = new Client() - .setEndpoint("https://cloud.appwrite.io/v1") // Your API Endpoint + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint .setProject("<YOUR_PROJECT_ID>") // Your project ID .setKey("<YOUR_API_KEY>"); // Your secret API key diff --git a/docs/examples/java/messaging/update-apns-provider.md b/docs/examples/java/messaging/update-apns-provider.md index b9ac1a9..737a142 100644 --- a/docs/examples/java/messaging/update-apns-provider.md +++ b/docs/examples/java/messaging/update-apns-provider.md @@ -3,7 +3,7 @@ import io.appwrite.coroutines.CoroutineCallback; import io.appwrite.services.Messaging; Client client = new Client() - .setEndpoint("https://cloud.appwrite.io/v1") // Your API Endpoint + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint .setProject("<YOUR_PROJECT_ID>") // Your project ID .setKey("<YOUR_API_KEY>"); // Your secret API key diff --git a/docs/examples/java/messaging/update-email.md b/docs/examples/java/messaging/update-email.md index a5d9820..56e9767 100644 --- a/docs/examples/java/messaging/update-email.md +++ b/docs/examples/java/messaging/update-email.md @@ -3,7 +3,7 @@ import io.appwrite.coroutines.CoroutineCallback; import io.appwrite.services.Messaging; Client client = new Client() - .setEndpoint("https://cloud.appwrite.io/v1") // Your API Endpoint + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint .setProject("<YOUR_PROJECT_ID>") // Your project ID .setKey("<YOUR_API_KEY>"); // Your secret API key diff --git a/docs/examples/java/messaging/update-fcm-provider.md b/docs/examples/java/messaging/update-fcm-provider.md index 956900d..68c56ef 100644 --- a/docs/examples/java/messaging/update-fcm-provider.md +++ b/docs/examples/java/messaging/update-fcm-provider.md @@ -3,7 +3,7 @@ import io.appwrite.coroutines.CoroutineCallback; import io.appwrite.services.Messaging; Client client = new Client() - .setEndpoint("https://cloud.appwrite.io/v1") // Your API Endpoint + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint .setProject("<YOUR_PROJECT_ID>") // Your project ID .setKey("<YOUR_API_KEY>"); // Your secret API key diff --git a/docs/examples/java/messaging/update-mailgun-provider.md b/docs/examples/java/messaging/update-mailgun-provider.md index 8512de1..5547ae8 100644 --- a/docs/examples/java/messaging/update-mailgun-provider.md +++ b/docs/examples/java/messaging/update-mailgun-provider.md @@ -3,7 +3,7 @@ import io.appwrite.coroutines.CoroutineCallback; import io.appwrite.services.Messaging; Client client = new Client() - .setEndpoint("https://cloud.appwrite.io/v1") // Your API Endpoint + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint .setProject("<YOUR_PROJECT_ID>") // Your project ID .setKey("<YOUR_API_KEY>"); // Your secret API key diff --git a/docs/examples/java/messaging/update-msg91provider.md b/docs/examples/java/messaging/update-msg91provider.md index 74de7d2..d8e4856 100644 --- a/docs/examples/java/messaging/update-msg91provider.md +++ b/docs/examples/java/messaging/update-msg91provider.md @@ -3,7 +3,7 @@ import io.appwrite.coroutines.CoroutineCallback; import io.appwrite.services.Messaging; Client client = new Client() - .setEndpoint("https://cloud.appwrite.io/v1") // Your API Endpoint + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint .setProject("<YOUR_PROJECT_ID>") // Your project ID .setKey("<YOUR_API_KEY>"); // Your secret API key diff --git a/docs/examples/java/messaging/update-push.md b/docs/examples/java/messaging/update-push.md index bb8c3c8..b7038de 100644 --- a/docs/examples/java/messaging/update-push.md +++ b/docs/examples/java/messaging/update-push.md @@ -3,7 +3,7 @@ import io.appwrite.coroutines.CoroutineCallback; import io.appwrite.services.Messaging; Client client = new Client() - .setEndpoint("https://cloud.appwrite.io/v1") // Your API Endpoint + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint .setProject("<YOUR_PROJECT_ID>") // Your project ID .setKey("<YOUR_API_KEY>"); // Your secret API key diff --git a/docs/examples/java/messaging/update-sendgrid-provider.md b/docs/examples/java/messaging/update-sendgrid-provider.md index 79c89c0..14a4e99 100644 --- a/docs/examples/java/messaging/update-sendgrid-provider.md +++ b/docs/examples/java/messaging/update-sendgrid-provider.md @@ -3,7 +3,7 @@ import io.appwrite.coroutines.CoroutineCallback; import io.appwrite.services.Messaging; Client client = new Client() - .setEndpoint("https://cloud.appwrite.io/v1") // Your API Endpoint + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint .setProject("<YOUR_PROJECT_ID>") // Your project ID .setKey("<YOUR_API_KEY>"); // Your secret API key diff --git a/docs/examples/java/messaging/update-sms.md b/docs/examples/java/messaging/update-sms.md index bfca7d3..c55cfdf 100644 --- a/docs/examples/java/messaging/update-sms.md +++ b/docs/examples/java/messaging/update-sms.md @@ -3,7 +3,7 @@ import io.appwrite.coroutines.CoroutineCallback; import io.appwrite.services.Messaging; Client client = new Client() - .setEndpoint("https://cloud.appwrite.io/v1") // Your API Endpoint + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint .setProject("<YOUR_PROJECT_ID>") // Your project ID .setKey("<YOUR_API_KEY>"); // Your secret API key diff --git a/docs/examples/java/messaging/update-smtp-provider.md b/docs/examples/java/messaging/update-smtp-provider.md index e308381..3f39661 100644 --- a/docs/examples/java/messaging/update-smtp-provider.md +++ b/docs/examples/java/messaging/update-smtp-provider.md @@ -3,7 +3,7 @@ import io.appwrite.coroutines.CoroutineCallback; import io.appwrite.services.Messaging; Client client = new Client() - .setEndpoint("https://cloud.appwrite.io/v1") // Your API Endpoint + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint .setProject("<YOUR_PROJECT_ID>") // Your project ID .setKey("<YOUR_API_KEY>"); // Your secret API key diff --git a/docs/examples/java/messaging/update-telesign-provider.md b/docs/examples/java/messaging/update-telesign-provider.md index 6ffb534..8181bf1 100644 --- a/docs/examples/java/messaging/update-telesign-provider.md +++ b/docs/examples/java/messaging/update-telesign-provider.md @@ -3,7 +3,7 @@ import io.appwrite.coroutines.CoroutineCallback; import io.appwrite.services.Messaging; Client client = new Client() - .setEndpoint("https://cloud.appwrite.io/v1") // Your API Endpoint + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint .setProject("<YOUR_PROJECT_ID>") // Your project ID .setKey("<YOUR_API_KEY>"); // Your secret API key diff --git a/docs/examples/java/messaging/update-textmagic-provider.md b/docs/examples/java/messaging/update-textmagic-provider.md index d80b5ae..bc156b7 100644 --- a/docs/examples/java/messaging/update-textmagic-provider.md +++ b/docs/examples/java/messaging/update-textmagic-provider.md @@ -3,7 +3,7 @@ import io.appwrite.coroutines.CoroutineCallback; import io.appwrite.services.Messaging; Client client = new Client() - .setEndpoint("https://cloud.appwrite.io/v1") // Your API Endpoint + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint .setProject("<YOUR_PROJECT_ID>") // Your project ID .setKey("<YOUR_API_KEY>"); // Your secret API key diff --git a/docs/examples/java/messaging/update-topic.md b/docs/examples/java/messaging/update-topic.md index 1013fba..be9c44d 100644 --- a/docs/examples/java/messaging/update-topic.md +++ b/docs/examples/java/messaging/update-topic.md @@ -3,7 +3,7 @@ import io.appwrite.coroutines.CoroutineCallback; import io.appwrite.services.Messaging; Client client = new Client() - .setEndpoint("https://cloud.appwrite.io/v1") // Your API Endpoint + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint .setProject("<YOUR_PROJECT_ID>") // Your project ID .setKey("<YOUR_API_KEY>"); // Your secret API key diff --git a/docs/examples/java/messaging/update-twilio-provider.md b/docs/examples/java/messaging/update-twilio-provider.md index 65fb0fc..ed58ee9 100644 --- a/docs/examples/java/messaging/update-twilio-provider.md +++ b/docs/examples/java/messaging/update-twilio-provider.md @@ -3,7 +3,7 @@ import io.appwrite.coroutines.CoroutineCallback; import io.appwrite.services.Messaging; Client client = new Client() - .setEndpoint("https://cloud.appwrite.io/v1") // Your API Endpoint + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint .setProject("<YOUR_PROJECT_ID>") // Your project ID .setKey("<YOUR_API_KEY>"); // Your secret API key diff --git a/docs/examples/java/messaging/update-vonage-provider.md b/docs/examples/java/messaging/update-vonage-provider.md index 6548d17..d5bfe36 100644 --- a/docs/examples/java/messaging/update-vonage-provider.md +++ b/docs/examples/java/messaging/update-vonage-provider.md @@ -3,7 +3,7 @@ import io.appwrite.coroutines.CoroutineCallback; import io.appwrite.services.Messaging; Client client = new Client() - .setEndpoint("https://cloud.appwrite.io/v1") // Your API Endpoint + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint .setProject("<YOUR_PROJECT_ID>") // Your project ID .setKey("<YOUR_API_KEY>"); // Your secret API key diff --git a/docs/examples/java/storage/create-bucket.md b/docs/examples/java/storage/create-bucket.md index ccb9961..a3a3308 100644 --- a/docs/examples/java/storage/create-bucket.md +++ b/docs/examples/java/storage/create-bucket.md @@ -3,7 +3,7 @@ import io.appwrite.coroutines.CoroutineCallback; import io.appwrite.services.Storage; Client client = new Client() - .setEndpoint("https://cloud.appwrite.io/v1") // Your API Endpoint + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint .setProject("<YOUR_PROJECT_ID>") // Your project ID .setKey("<YOUR_API_KEY>"); // Your secret API key diff --git a/docs/examples/java/storage/create-file.md b/docs/examples/java/storage/create-file.md index 92907fc..583f856 100644 --- a/docs/examples/java/storage/create-file.md +++ b/docs/examples/java/storage/create-file.md @@ -4,7 +4,7 @@ import io.appwrite.models.InputFile; import io.appwrite.services.Storage; Client client = new Client() - .setEndpoint("https://cloud.appwrite.io/v1") // Your API Endpoint + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint .setProject("<YOUR_PROJECT_ID>") // Your project ID .setSession(""); // The user session to authenticate with diff --git a/docs/examples/java/storage/delete-bucket.md b/docs/examples/java/storage/delete-bucket.md index 8c46ba9..eb77754 100644 --- a/docs/examples/java/storage/delete-bucket.md +++ b/docs/examples/java/storage/delete-bucket.md @@ -3,7 +3,7 @@ import io.appwrite.coroutines.CoroutineCallback; import io.appwrite.services.Storage; Client client = new Client() - .setEndpoint("https://cloud.appwrite.io/v1") // Your API Endpoint + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint .setProject("<YOUR_PROJECT_ID>") // Your project ID .setKey("<YOUR_API_KEY>"); // Your secret API key diff --git a/docs/examples/java/storage/delete-file.md b/docs/examples/java/storage/delete-file.md index 01d423d..8976fd1 100644 --- a/docs/examples/java/storage/delete-file.md +++ b/docs/examples/java/storage/delete-file.md @@ -3,7 +3,7 @@ import io.appwrite.coroutines.CoroutineCallback; import io.appwrite.services.Storage; Client client = new Client() - .setEndpoint("https://cloud.appwrite.io/v1") // Your API Endpoint + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint .setProject("<YOUR_PROJECT_ID>") // Your project ID .setSession(""); // The user session to authenticate with diff --git a/docs/examples/java/storage/get-bucket.md b/docs/examples/java/storage/get-bucket.md index 63c847f..a099f33 100644 --- a/docs/examples/java/storage/get-bucket.md +++ b/docs/examples/java/storage/get-bucket.md @@ -3,7 +3,7 @@ import io.appwrite.coroutines.CoroutineCallback; import io.appwrite.services.Storage; Client client = new Client() - .setEndpoint("https://cloud.appwrite.io/v1") // Your API Endpoint + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint .setProject("<YOUR_PROJECT_ID>") // Your project ID .setKey("<YOUR_API_KEY>"); // Your secret API key diff --git a/docs/examples/java/storage/get-file-download.md b/docs/examples/java/storage/get-file-download.md index 32bff0b..d0399f9 100644 --- a/docs/examples/java/storage/get-file-download.md +++ b/docs/examples/java/storage/get-file-download.md @@ -3,7 +3,7 @@ import io.appwrite.coroutines.CoroutineCallback; import io.appwrite.services.Storage; Client client = new Client() - .setEndpoint("https://cloud.appwrite.io/v1") // Your API Endpoint + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint .setProject("<YOUR_PROJECT_ID>") // Your project ID .setSession(""); // The user session to authenticate with diff --git a/docs/examples/java/storage/get-file-preview.md b/docs/examples/java/storage/get-file-preview.md index 650ea4d..dd7c09d 100644 --- a/docs/examples/java/storage/get-file-preview.md +++ b/docs/examples/java/storage/get-file-preview.md @@ -3,7 +3,7 @@ import io.appwrite.coroutines.CoroutineCallback; import io.appwrite.services.Storage; Client client = new Client() - .setEndpoint("https://cloud.appwrite.io/v1") // Your API Endpoint + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint .setProject("<YOUR_PROJECT_ID>") // Your project ID .setSession(""); // The user session to authenticate with diff --git a/docs/examples/java/storage/get-file-view.md b/docs/examples/java/storage/get-file-view.md index 5a81eba..1de4ae0 100644 --- a/docs/examples/java/storage/get-file-view.md +++ b/docs/examples/java/storage/get-file-view.md @@ -3,7 +3,7 @@ import io.appwrite.coroutines.CoroutineCallback; import io.appwrite.services.Storage; Client client = new Client() - .setEndpoint("https://cloud.appwrite.io/v1") // Your API Endpoint + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint .setProject("<YOUR_PROJECT_ID>") // Your project ID .setSession(""); // The user session to authenticate with diff --git a/docs/examples/java/storage/get-file.md b/docs/examples/java/storage/get-file.md index 004dc01..7a04c80 100644 --- a/docs/examples/java/storage/get-file.md +++ b/docs/examples/java/storage/get-file.md @@ -3,7 +3,7 @@ import io.appwrite.coroutines.CoroutineCallback; import io.appwrite.services.Storage; Client client = new Client() - .setEndpoint("https://cloud.appwrite.io/v1") // Your API Endpoint + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint .setProject("<YOUR_PROJECT_ID>") // Your project ID .setSession(""); // The user session to authenticate with diff --git a/docs/examples/java/storage/list-buckets.md b/docs/examples/java/storage/list-buckets.md index 8ab56e3..9d85957 100644 --- a/docs/examples/java/storage/list-buckets.md +++ b/docs/examples/java/storage/list-buckets.md @@ -3,7 +3,7 @@ import io.appwrite.coroutines.CoroutineCallback; import io.appwrite.services.Storage; Client client = new Client() - .setEndpoint("https://cloud.appwrite.io/v1") // Your API Endpoint + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint .setProject("<YOUR_PROJECT_ID>") // Your project ID .setKey("<YOUR_API_KEY>"); // Your secret API key diff --git a/docs/examples/java/storage/list-files.md b/docs/examples/java/storage/list-files.md index 6fbd2c3..f002754 100644 --- a/docs/examples/java/storage/list-files.md +++ b/docs/examples/java/storage/list-files.md @@ -3,7 +3,7 @@ import io.appwrite.coroutines.CoroutineCallback; import io.appwrite.services.Storage; Client client = new Client() - .setEndpoint("https://cloud.appwrite.io/v1") // Your API Endpoint + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint .setProject("<YOUR_PROJECT_ID>") // Your project ID .setSession(""); // The user session to authenticate with diff --git a/docs/examples/java/storage/update-bucket.md b/docs/examples/java/storage/update-bucket.md index 342174e..2d80e26 100644 --- a/docs/examples/java/storage/update-bucket.md +++ b/docs/examples/java/storage/update-bucket.md @@ -3,7 +3,7 @@ import io.appwrite.coroutines.CoroutineCallback; import io.appwrite.services.Storage; Client client = new Client() - .setEndpoint("https://cloud.appwrite.io/v1") // Your API Endpoint + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint .setProject("<YOUR_PROJECT_ID>") // Your project ID .setKey("<YOUR_API_KEY>"); // Your secret API key diff --git a/docs/examples/java/storage/update-file.md b/docs/examples/java/storage/update-file.md index 3578bcd..7f325f9 100644 --- a/docs/examples/java/storage/update-file.md +++ b/docs/examples/java/storage/update-file.md @@ -3,7 +3,7 @@ import io.appwrite.coroutines.CoroutineCallback; import io.appwrite.services.Storage; Client client = new Client() - .setEndpoint("https://cloud.appwrite.io/v1") // Your API Endpoint + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint .setProject("<YOUR_PROJECT_ID>") // Your project ID .setSession(""); // The user session to authenticate with diff --git a/docs/examples/java/teams/create-membership.md b/docs/examples/java/teams/create-membership.md index f7a4ecb..89e9d96 100644 --- a/docs/examples/java/teams/create-membership.md +++ b/docs/examples/java/teams/create-membership.md @@ -3,7 +3,7 @@ import io.appwrite.coroutines.CoroutineCallback; import io.appwrite.services.Teams; Client client = new Client() - .setEndpoint("https://cloud.appwrite.io/v1") // Your API Endpoint + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint .setProject("<YOUR_PROJECT_ID>") // Your project ID .setSession(""); // The user session to authenticate with diff --git a/docs/examples/java/teams/create.md b/docs/examples/java/teams/create.md index e8fb127..28cc3da 100644 --- a/docs/examples/java/teams/create.md +++ b/docs/examples/java/teams/create.md @@ -3,7 +3,7 @@ import io.appwrite.coroutines.CoroutineCallback; import io.appwrite.services.Teams; Client client = new Client() - .setEndpoint("https://cloud.appwrite.io/v1") // Your API Endpoint + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint .setProject("<YOUR_PROJECT_ID>") // Your project ID .setSession(""); // The user session to authenticate with diff --git a/docs/examples/java/teams/delete-membership.md b/docs/examples/java/teams/delete-membership.md index 0fe1e17..3b414be 100644 --- a/docs/examples/java/teams/delete-membership.md +++ b/docs/examples/java/teams/delete-membership.md @@ -3,7 +3,7 @@ import io.appwrite.coroutines.CoroutineCallback; import io.appwrite.services.Teams; Client client = new Client() - .setEndpoint("https://cloud.appwrite.io/v1") // Your API Endpoint + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint .setProject("<YOUR_PROJECT_ID>") // Your project ID .setSession(""); // The user session to authenticate with diff --git a/docs/examples/java/teams/delete.md b/docs/examples/java/teams/delete.md index 74f5a7c..07f5c12 100644 --- a/docs/examples/java/teams/delete.md +++ b/docs/examples/java/teams/delete.md @@ -3,7 +3,7 @@ import io.appwrite.coroutines.CoroutineCallback; import io.appwrite.services.Teams; Client client = new Client() - .setEndpoint("https://cloud.appwrite.io/v1") // Your API Endpoint + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint .setProject("<YOUR_PROJECT_ID>") // Your project ID .setSession(""); // The user session to authenticate with diff --git a/docs/examples/java/teams/get-membership.md b/docs/examples/java/teams/get-membership.md index d013d91..e7c1571 100644 --- a/docs/examples/java/teams/get-membership.md +++ b/docs/examples/java/teams/get-membership.md @@ -3,7 +3,7 @@ import io.appwrite.coroutines.CoroutineCallback; import io.appwrite.services.Teams; Client client = new Client() - .setEndpoint("https://cloud.appwrite.io/v1") // Your API Endpoint + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint .setProject("<YOUR_PROJECT_ID>") // Your project ID .setSession(""); // The user session to authenticate with diff --git a/docs/examples/java/teams/get-prefs.md b/docs/examples/java/teams/get-prefs.md index 27cd6f9..6d30814 100644 --- a/docs/examples/java/teams/get-prefs.md +++ b/docs/examples/java/teams/get-prefs.md @@ -3,7 +3,7 @@ import io.appwrite.coroutines.CoroutineCallback; import io.appwrite.services.Teams; Client client = new Client() - .setEndpoint("https://cloud.appwrite.io/v1") // Your API Endpoint + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint .setProject("<YOUR_PROJECT_ID>") // Your project ID .setSession(""); // The user session to authenticate with diff --git a/docs/examples/java/teams/get.md b/docs/examples/java/teams/get.md index 0416602..a479e9a 100644 --- a/docs/examples/java/teams/get.md +++ b/docs/examples/java/teams/get.md @@ -3,7 +3,7 @@ import io.appwrite.coroutines.CoroutineCallback; import io.appwrite.services.Teams; Client client = new Client() - .setEndpoint("https://cloud.appwrite.io/v1") // Your API Endpoint + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint .setProject("<YOUR_PROJECT_ID>") // Your project ID .setSession(""); // The user session to authenticate with diff --git a/docs/examples/java/teams/list-memberships.md b/docs/examples/java/teams/list-memberships.md index 0260673..9694482 100644 --- a/docs/examples/java/teams/list-memberships.md +++ b/docs/examples/java/teams/list-memberships.md @@ -3,7 +3,7 @@ import io.appwrite.coroutines.CoroutineCallback; import io.appwrite.services.Teams; Client client = new Client() - .setEndpoint("https://cloud.appwrite.io/v1") // Your API Endpoint + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint .setProject("<YOUR_PROJECT_ID>") // Your project ID .setSession(""); // The user session to authenticate with diff --git a/docs/examples/java/teams/list.md b/docs/examples/java/teams/list.md index a4e85ac..d0855ba 100644 --- a/docs/examples/java/teams/list.md +++ b/docs/examples/java/teams/list.md @@ -3,7 +3,7 @@ import io.appwrite.coroutines.CoroutineCallback; import io.appwrite.services.Teams; Client client = new Client() - .setEndpoint("https://cloud.appwrite.io/v1") // Your API Endpoint + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint .setProject("<YOUR_PROJECT_ID>") // Your project ID .setSession(""); // The user session to authenticate with diff --git a/docs/examples/java/teams/update-membership-status.md b/docs/examples/java/teams/update-membership-status.md index 8ca3398..461cf4c 100644 --- a/docs/examples/java/teams/update-membership-status.md +++ b/docs/examples/java/teams/update-membership-status.md @@ -3,7 +3,7 @@ import io.appwrite.coroutines.CoroutineCallback; import io.appwrite.services.Teams; Client client = new Client() - .setEndpoint("https://cloud.appwrite.io/v1") // Your API Endpoint + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint .setProject("<YOUR_PROJECT_ID>") // Your project ID .setSession(""); // The user session to authenticate with diff --git a/docs/examples/java/teams/update-membership.md b/docs/examples/java/teams/update-membership.md index 60be82c..d4816c5 100644 --- a/docs/examples/java/teams/update-membership.md +++ b/docs/examples/java/teams/update-membership.md @@ -3,7 +3,7 @@ import io.appwrite.coroutines.CoroutineCallback; import io.appwrite.services.Teams; Client client = new Client() - .setEndpoint("https://cloud.appwrite.io/v1") // Your API Endpoint + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint .setProject("<YOUR_PROJECT_ID>") // Your project ID .setSession(""); // The user session to authenticate with diff --git a/docs/examples/java/teams/update-name.md b/docs/examples/java/teams/update-name.md index 8db6f04..f2f1b02 100644 --- a/docs/examples/java/teams/update-name.md +++ b/docs/examples/java/teams/update-name.md @@ -3,7 +3,7 @@ import io.appwrite.coroutines.CoroutineCallback; import io.appwrite.services.Teams; Client client = new Client() - .setEndpoint("https://cloud.appwrite.io/v1") // Your API Endpoint + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint .setProject("<YOUR_PROJECT_ID>") // Your project ID .setSession(""); // The user session to authenticate with diff --git a/docs/examples/java/teams/update-prefs.md b/docs/examples/java/teams/update-prefs.md index 91f1492..2ef0522 100644 --- a/docs/examples/java/teams/update-prefs.md +++ b/docs/examples/java/teams/update-prefs.md @@ -3,7 +3,7 @@ import io.appwrite.coroutines.CoroutineCallback; import io.appwrite.services.Teams; Client client = new Client() - .setEndpoint("https://cloud.appwrite.io/v1") // Your API Endpoint + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint .setProject("<YOUR_PROJECT_ID>") // Your project ID .setSession(""); // The user session to authenticate with diff --git a/docs/examples/java/users/create-argon2user.md b/docs/examples/java/users/create-argon2user.md index 0127526..c78f236 100644 --- a/docs/examples/java/users/create-argon2user.md +++ b/docs/examples/java/users/create-argon2user.md @@ -3,7 +3,7 @@ import io.appwrite.coroutines.CoroutineCallback; import io.appwrite.services.Users; Client client = new Client() - .setEndpoint("https://cloud.appwrite.io/v1") // Your API Endpoint + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint .setProject("<YOUR_PROJECT_ID>") // Your project ID .setKey("<YOUR_API_KEY>"); // Your secret API key diff --git a/docs/examples/java/users/create-bcrypt-user.md b/docs/examples/java/users/create-bcrypt-user.md index c98939b..7b85f96 100644 --- a/docs/examples/java/users/create-bcrypt-user.md +++ b/docs/examples/java/users/create-bcrypt-user.md @@ -3,7 +3,7 @@ import io.appwrite.coroutines.CoroutineCallback; import io.appwrite.services.Users; Client client = new Client() - .setEndpoint("https://cloud.appwrite.io/v1") // Your API Endpoint + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint .setProject("<YOUR_PROJECT_ID>") // Your project ID .setKey("<YOUR_API_KEY>"); // Your secret API key diff --git a/docs/examples/java/users/create-j-w-t.md b/docs/examples/java/users/create-j-w-t.md index c4538b7..2b4d7e9 100644 --- a/docs/examples/java/users/create-j-w-t.md +++ b/docs/examples/java/users/create-j-w-t.md @@ -3,7 +3,7 @@ import io.appwrite.coroutines.CoroutineCallback; import io.appwrite.services.Users; Client client = new Client() - .setEndpoint("https://cloud.appwrite.io/v1") // Your API Endpoint + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint .setProject("<YOUR_PROJECT_ID>") // Your project ID .setKey("<YOUR_API_KEY>"); // Your secret API key diff --git a/docs/examples/java/users/create-m-d5user.md b/docs/examples/java/users/create-m-d5user.md index 0456a77..666e107 100644 --- a/docs/examples/java/users/create-m-d5user.md +++ b/docs/examples/java/users/create-m-d5user.md @@ -3,7 +3,7 @@ import io.appwrite.coroutines.CoroutineCallback; import io.appwrite.services.Users; Client client = new Client() - .setEndpoint("https://cloud.appwrite.io/v1") // Your API Endpoint + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint .setProject("<YOUR_PROJECT_ID>") // Your project ID .setKey("<YOUR_API_KEY>"); // Your secret API key diff --git a/docs/examples/java/users/create-mfa-recovery-codes.md b/docs/examples/java/users/create-mfa-recovery-codes.md index f9dfbe8..62afec2 100644 --- a/docs/examples/java/users/create-mfa-recovery-codes.md +++ b/docs/examples/java/users/create-mfa-recovery-codes.md @@ -3,7 +3,7 @@ import io.appwrite.coroutines.CoroutineCallback; import io.appwrite.services.Users; Client client = new Client() - .setEndpoint("https://cloud.appwrite.io/v1") // Your API Endpoint + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint .setProject("<YOUR_PROJECT_ID>") // Your project ID .setKey("<YOUR_API_KEY>"); // Your secret API key diff --git a/docs/examples/java/users/create-p-h-pass-user.md b/docs/examples/java/users/create-p-h-pass-user.md index e977678..048ba39 100644 --- a/docs/examples/java/users/create-p-h-pass-user.md +++ b/docs/examples/java/users/create-p-h-pass-user.md @@ -3,7 +3,7 @@ import io.appwrite.coroutines.CoroutineCallback; import io.appwrite.services.Users; Client client = new Client() - .setEndpoint("https://cloud.appwrite.io/v1") // Your API Endpoint + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint .setProject("<YOUR_PROJECT_ID>") // Your project ID .setKey("<YOUR_API_KEY>"); // Your secret API key diff --git a/docs/examples/java/users/create-s-h-a-user.md b/docs/examples/java/users/create-s-h-a-user.md index 6a3869c..ad72907 100644 --- a/docs/examples/java/users/create-s-h-a-user.md +++ b/docs/examples/java/users/create-s-h-a-user.md @@ -3,7 +3,7 @@ import io.appwrite.coroutines.CoroutineCallback; import io.appwrite.services.Users; Client client = new Client() - .setEndpoint("https://cloud.appwrite.io/v1") // Your API Endpoint + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint .setProject("<YOUR_PROJECT_ID>") // Your project ID .setKey("<YOUR_API_KEY>"); // Your secret API key diff --git a/docs/examples/java/users/create-scrypt-modified-user.md b/docs/examples/java/users/create-scrypt-modified-user.md index 28d5881..77a7d5f 100644 --- a/docs/examples/java/users/create-scrypt-modified-user.md +++ b/docs/examples/java/users/create-scrypt-modified-user.md @@ -3,7 +3,7 @@ import io.appwrite.coroutines.CoroutineCallback; import io.appwrite.services.Users; Client client = new Client() - .setEndpoint("https://cloud.appwrite.io/v1") // Your API Endpoint + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint .setProject("<YOUR_PROJECT_ID>") // Your project ID .setKey("<YOUR_API_KEY>"); // Your secret API key diff --git a/docs/examples/java/users/create-scrypt-user.md b/docs/examples/java/users/create-scrypt-user.md index 43e1ad8..0e81237 100644 --- a/docs/examples/java/users/create-scrypt-user.md +++ b/docs/examples/java/users/create-scrypt-user.md @@ -3,7 +3,7 @@ import io.appwrite.coroutines.CoroutineCallback; import io.appwrite.services.Users; Client client = new Client() - .setEndpoint("https://cloud.appwrite.io/v1") // Your API Endpoint + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint .setProject("<YOUR_PROJECT_ID>") // Your project ID .setKey("<YOUR_API_KEY>"); // Your secret API key diff --git a/docs/examples/java/users/create-session.md b/docs/examples/java/users/create-session.md index bc7dfb0..8d9ce03 100644 --- a/docs/examples/java/users/create-session.md +++ b/docs/examples/java/users/create-session.md @@ -3,7 +3,7 @@ import io.appwrite.coroutines.CoroutineCallback; import io.appwrite.services.Users; Client client = new Client() - .setEndpoint("https://cloud.appwrite.io/v1") // Your API Endpoint + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint .setProject("<YOUR_PROJECT_ID>") // Your project ID .setKey("<YOUR_API_KEY>"); // Your secret API key diff --git a/docs/examples/java/users/create-target.md b/docs/examples/java/users/create-target.md index 6bad1ce..6681b17 100644 --- a/docs/examples/java/users/create-target.md +++ b/docs/examples/java/users/create-target.md @@ -4,7 +4,7 @@ import io.appwrite.services.Users; import io.appwrite.enums.MessagingProviderType; Client client = new Client() - .setEndpoint("https://cloud.appwrite.io/v1") // Your API Endpoint + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint .setProject("<YOUR_PROJECT_ID>") // Your project ID .setKey("<YOUR_API_KEY>"); // Your secret API key diff --git a/docs/examples/java/users/create-token.md b/docs/examples/java/users/create-token.md index 9389e0e..330b344 100644 --- a/docs/examples/java/users/create-token.md +++ b/docs/examples/java/users/create-token.md @@ -3,7 +3,7 @@ import io.appwrite.coroutines.CoroutineCallback; import io.appwrite.services.Users; Client client = new Client() - .setEndpoint("https://cloud.appwrite.io/v1") // Your API Endpoint + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint .setProject("<YOUR_PROJECT_ID>") // Your project ID .setKey("<YOUR_API_KEY>"); // Your secret API key diff --git a/docs/examples/java/users/create.md b/docs/examples/java/users/create.md index 9889129..95a72bf 100644 --- a/docs/examples/java/users/create.md +++ b/docs/examples/java/users/create.md @@ -3,7 +3,7 @@ import io.appwrite.coroutines.CoroutineCallback; import io.appwrite.services.Users; Client client = new Client() - .setEndpoint("https://cloud.appwrite.io/v1") // Your API Endpoint + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint .setProject("<YOUR_PROJECT_ID>") // Your project ID .setKey("<YOUR_API_KEY>"); // Your secret API key diff --git a/docs/examples/java/users/delete-identity.md b/docs/examples/java/users/delete-identity.md index 063a91d..40c410d 100644 --- a/docs/examples/java/users/delete-identity.md +++ b/docs/examples/java/users/delete-identity.md @@ -3,7 +3,7 @@ import io.appwrite.coroutines.CoroutineCallback; import io.appwrite.services.Users; Client client = new Client() - .setEndpoint("https://cloud.appwrite.io/v1") // Your API Endpoint + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint .setProject("<YOUR_PROJECT_ID>") // Your project ID .setKey("<YOUR_API_KEY>"); // Your secret API key diff --git a/docs/examples/java/users/delete-mfa-authenticator.md b/docs/examples/java/users/delete-mfa-authenticator.md index cd5d9ab..7ed33d6 100644 --- a/docs/examples/java/users/delete-mfa-authenticator.md +++ b/docs/examples/java/users/delete-mfa-authenticator.md @@ -4,7 +4,7 @@ import io.appwrite.services.Users; import io.appwrite.enums.AuthenticatorType; Client client = new Client() - .setEndpoint("https://cloud.appwrite.io/v1") // Your API Endpoint + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint .setProject("<YOUR_PROJECT_ID>") // Your project ID .setKey("<YOUR_API_KEY>"); // Your secret API key diff --git a/docs/examples/java/users/delete-session.md b/docs/examples/java/users/delete-session.md index 4ed2713..0e0a52b 100644 --- a/docs/examples/java/users/delete-session.md +++ b/docs/examples/java/users/delete-session.md @@ -3,7 +3,7 @@ import io.appwrite.coroutines.CoroutineCallback; import io.appwrite.services.Users; Client client = new Client() - .setEndpoint("https://cloud.appwrite.io/v1") // Your API Endpoint + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint .setProject("<YOUR_PROJECT_ID>") // Your project ID .setKey("<YOUR_API_KEY>"); // Your secret API key diff --git a/docs/examples/java/users/delete-sessions.md b/docs/examples/java/users/delete-sessions.md index f0da6e0..6a3bbbf 100644 --- a/docs/examples/java/users/delete-sessions.md +++ b/docs/examples/java/users/delete-sessions.md @@ -3,7 +3,7 @@ import io.appwrite.coroutines.CoroutineCallback; import io.appwrite.services.Users; Client client = new Client() - .setEndpoint("https://cloud.appwrite.io/v1") // Your API Endpoint + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint .setProject("<YOUR_PROJECT_ID>") // Your project ID .setKey("<YOUR_API_KEY>"); // Your secret API key diff --git a/docs/examples/java/users/delete-target.md b/docs/examples/java/users/delete-target.md index ddd0460..e38ee1d 100644 --- a/docs/examples/java/users/delete-target.md +++ b/docs/examples/java/users/delete-target.md @@ -3,7 +3,7 @@ import io.appwrite.coroutines.CoroutineCallback; import io.appwrite.services.Users; Client client = new Client() - .setEndpoint("https://cloud.appwrite.io/v1") // Your API Endpoint + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint .setProject("<YOUR_PROJECT_ID>") // Your project ID .setKey("<YOUR_API_KEY>"); // Your secret API key diff --git a/docs/examples/java/users/delete.md b/docs/examples/java/users/delete.md index 6a256f8..d207f9a 100644 --- a/docs/examples/java/users/delete.md +++ b/docs/examples/java/users/delete.md @@ -3,7 +3,7 @@ import io.appwrite.coroutines.CoroutineCallback; import io.appwrite.services.Users; Client client = new Client() - .setEndpoint("https://cloud.appwrite.io/v1") // Your API Endpoint + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint .setProject("<YOUR_PROJECT_ID>") // Your project ID .setKey("<YOUR_API_KEY>"); // Your secret API key diff --git a/docs/examples/java/users/get-mfa-recovery-codes.md b/docs/examples/java/users/get-mfa-recovery-codes.md index be33d20..940dafe 100644 --- a/docs/examples/java/users/get-mfa-recovery-codes.md +++ b/docs/examples/java/users/get-mfa-recovery-codes.md @@ -3,7 +3,7 @@ import io.appwrite.coroutines.CoroutineCallback; import io.appwrite.services.Users; Client client = new Client() - .setEndpoint("https://cloud.appwrite.io/v1") // Your API Endpoint + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint .setProject("<YOUR_PROJECT_ID>") // Your project ID .setKey("<YOUR_API_KEY>"); // Your secret API key diff --git a/docs/examples/java/users/get-prefs.md b/docs/examples/java/users/get-prefs.md index 3e36f16..9ff3e4b 100644 --- a/docs/examples/java/users/get-prefs.md +++ b/docs/examples/java/users/get-prefs.md @@ -3,7 +3,7 @@ import io.appwrite.coroutines.CoroutineCallback; import io.appwrite.services.Users; Client client = new Client() - .setEndpoint("https://cloud.appwrite.io/v1") // Your API Endpoint + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint .setProject("<YOUR_PROJECT_ID>") // Your project ID .setKey("<YOUR_API_KEY>"); // Your secret API key diff --git a/docs/examples/java/users/get-target.md b/docs/examples/java/users/get-target.md index 2ee5b4a..05c8028 100644 --- a/docs/examples/java/users/get-target.md +++ b/docs/examples/java/users/get-target.md @@ -3,7 +3,7 @@ import io.appwrite.coroutines.CoroutineCallback; import io.appwrite.services.Users; Client client = new Client() - .setEndpoint("https://cloud.appwrite.io/v1") // Your API Endpoint + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint .setProject("<YOUR_PROJECT_ID>") // Your project ID .setKey("<YOUR_API_KEY>"); // Your secret API key diff --git a/docs/examples/java/users/get.md b/docs/examples/java/users/get.md index 8c34eba..d8cd707 100644 --- a/docs/examples/java/users/get.md +++ b/docs/examples/java/users/get.md @@ -3,7 +3,7 @@ import io.appwrite.coroutines.CoroutineCallback; import io.appwrite.services.Users; Client client = new Client() - .setEndpoint("https://cloud.appwrite.io/v1") // Your API Endpoint + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint .setProject("<YOUR_PROJECT_ID>") // Your project ID .setKey("<YOUR_API_KEY>"); // Your secret API key diff --git a/docs/examples/java/users/list-identities.md b/docs/examples/java/users/list-identities.md index 169b414..e0fc9d1 100644 --- a/docs/examples/java/users/list-identities.md +++ b/docs/examples/java/users/list-identities.md @@ -3,7 +3,7 @@ import io.appwrite.coroutines.CoroutineCallback; import io.appwrite.services.Users; Client client = new Client() - .setEndpoint("https://cloud.appwrite.io/v1") // Your API Endpoint + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint .setProject("<YOUR_PROJECT_ID>") // Your project ID .setKey("<YOUR_API_KEY>"); // Your secret API key diff --git a/docs/examples/java/users/list-logs.md b/docs/examples/java/users/list-logs.md index f3d2701..86c94ee 100644 --- a/docs/examples/java/users/list-logs.md +++ b/docs/examples/java/users/list-logs.md @@ -3,7 +3,7 @@ import io.appwrite.coroutines.CoroutineCallback; import io.appwrite.services.Users; Client client = new Client() - .setEndpoint("https://cloud.appwrite.io/v1") // Your API Endpoint + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint .setProject("<YOUR_PROJECT_ID>") // Your project ID .setKey("<YOUR_API_KEY>"); // Your secret API key diff --git a/docs/examples/java/users/list-memberships.md b/docs/examples/java/users/list-memberships.md index 4f3cfd8..dc03be2 100644 --- a/docs/examples/java/users/list-memberships.md +++ b/docs/examples/java/users/list-memberships.md @@ -3,7 +3,7 @@ import io.appwrite.coroutines.CoroutineCallback; import io.appwrite.services.Users; Client client = new Client() - .setEndpoint("https://cloud.appwrite.io/v1") // Your API Endpoint + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint .setProject("<YOUR_PROJECT_ID>") // Your project ID .setKey("<YOUR_API_KEY>"); // Your secret API key diff --git a/docs/examples/java/users/list-mfa-factors.md b/docs/examples/java/users/list-mfa-factors.md index 4d51ece..a377214 100644 --- a/docs/examples/java/users/list-mfa-factors.md +++ b/docs/examples/java/users/list-mfa-factors.md @@ -3,7 +3,7 @@ import io.appwrite.coroutines.CoroutineCallback; import io.appwrite.services.Users; Client client = new Client() - .setEndpoint("https://cloud.appwrite.io/v1") // Your API Endpoint + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint .setProject("<YOUR_PROJECT_ID>") // Your project ID .setKey("<YOUR_API_KEY>"); // Your secret API key diff --git a/docs/examples/java/users/list-sessions.md b/docs/examples/java/users/list-sessions.md index a1d3a3a..7e13cb3 100644 --- a/docs/examples/java/users/list-sessions.md +++ b/docs/examples/java/users/list-sessions.md @@ -3,7 +3,7 @@ import io.appwrite.coroutines.CoroutineCallback; import io.appwrite.services.Users; Client client = new Client() - .setEndpoint("https://cloud.appwrite.io/v1") // Your API Endpoint + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint .setProject("<YOUR_PROJECT_ID>") // Your project ID .setKey("<YOUR_API_KEY>"); // Your secret API key diff --git a/docs/examples/java/users/list-targets.md b/docs/examples/java/users/list-targets.md index ab04577..efa7542 100644 --- a/docs/examples/java/users/list-targets.md +++ b/docs/examples/java/users/list-targets.md @@ -3,7 +3,7 @@ import io.appwrite.coroutines.CoroutineCallback; import io.appwrite.services.Users; Client client = new Client() - .setEndpoint("https://cloud.appwrite.io/v1") // Your API Endpoint + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint .setProject("<YOUR_PROJECT_ID>") // Your project ID .setKey("<YOUR_API_KEY>"); // Your secret API key diff --git a/docs/examples/java/users/list.md b/docs/examples/java/users/list.md index a854ba0..d587eaf 100644 --- a/docs/examples/java/users/list.md +++ b/docs/examples/java/users/list.md @@ -3,7 +3,7 @@ import io.appwrite.coroutines.CoroutineCallback; import io.appwrite.services.Users; Client client = new Client() - .setEndpoint("https://cloud.appwrite.io/v1") // Your API Endpoint + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint .setProject("<YOUR_PROJECT_ID>") // Your project ID .setKey("<YOUR_API_KEY>"); // Your secret API key diff --git a/docs/examples/java/users/update-email-verification.md b/docs/examples/java/users/update-email-verification.md index 7423f77..a79c87b 100644 --- a/docs/examples/java/users/update-email-verification.md +++ b/docs/examples/java/users/update-email-verification.md @@ -3,7 +3,7 @@ import io.appwrite.coroutines.CoroutineCallback; import io.appwrite.services.Users; Client client = new Client() - .setEndpoint("https://cloud.appwrite.io/v1") // Your API Endpoint + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint .setProject("<YOUR_PROJECT_ID>") // Your project ID .setKey("<YOUR_API_KEY>"); // Your secret API key diff --git a/docs/examples/java/users/update-email.md b/docs/examples/java/users/update-email.md index 23e3977..24cdb00 100644 --- a/docs/examples/java/users/update-email.md +++ b/docs/examples/java/users/update-email.md @@ -3,7 +3,7 @@ import io.appwrite.coroutines.CoroutineCallback; import io.appwrite.services.Users; Client client = new Client() - .setEndpoint("https://cloud.appwrite.io/v1") // Your API Endpoint + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint .setProject("<YOUR_PROJECT_ID>") // Your project ID .setKey("<YOUR_API_KEY>"); // Your secret API key diff --git a/docs/examples/java/users/update-labels.md b/docs/examples/java/users/update-labels.md index acc3d1b..379200a 100644 --- a/docs/examples/java/users/update-labels.md +++ b/docs/examples/java/users/update-labels.md @@ -3,7 +3,7 @@ import io.appwrite.coroutines.CoroutineCallback; import io.appwrite.services.Users; Client client = new Client() - .setEndpoint("https://cloud.appwrite.io/v1") // Your API Endpoint + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint .setProject("<YOUR_PROJECT_ID>") // Your project ID .setKey("<YOUR_API_KEY>"); // Your secret API key diff --git a/docs/examples/java/users/update-mfa-recovery-codes.md b/docs/examples/java/users/update-mfa-recovery-codes.md index eb560e7..4395610 100644 --- a/docs/examples/java/users/update-mfa-recovery-codes.md +++ b/docs/examples/java/users/update-mfa-recovery-codes.md @@ -3,7 +3,7 @@ import io.appwrite.coroutines.CoroutineCallback; import io.appwrite.services.Users; Client client = new Client() - .setEndpoint("https://cloud.appwrite.io/v1") // Your API Endpoint + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint .setProject("<YOUR_PROJECT_ID>") // Your project ID .setKey("<YOUR_API_KEY>"); // Your secret API key diff --git a/docs/examples/java/users/update-mfa.md b/docs/examples/java/users/update-mfa.md index e1fc96f..76a198f 100644 --- a/docs/examples/java/users/update-mfa.md +++ b/docs/examples/java/users/update-mfa.md @@ -3,7 +3,7 @@ import io.appwrite.coroutines.CoroutineCallback; import io.appwrite.services.Users; Client client = new Client() - .setEndpoint("https://cloud.appwrite.io/v1") // Your API Endpoint + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint .setProject("<YOUR_PROJECT_ID>") // Your project ID .setKey("<YOUR_API_KEY>"); // Your secret API key diff --git a/docs/examples/java/users/update-name.md b/docs/examples/java/users/update-name.md index e8bfe56..b4f889c 100644 --- a/docs/examples/java/users/update-name.md +++ b/docs/examples/java/users/update-name.md @@ -3,7 +3,7 @@ import io.appwrite.coroutines.CoroutineCallback; import io.appwrite.services.Users; Client client = new Client() - .setEndpoint("https://cloud.appwrite.io/v1") // Your API Endpoint + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint .setProject("<YOUR_PROJECT_ID>") // Your project ID .setKey("<YOUR_API_KEY>"); // Your secret API key diff --git a/docs/examples/java/users/update-password.md b/docs/examples/java/users/update-password.md index bdf31a7..94e24da 100644 --- a/docs/examples/java/users/update-password.md +++ b/docs/examples/java/users/update-password.md @@ -3,7 +3,7 @@ import io.appwrite.coroutines.CoroutineCallback; import io.appwrite.services.Users; Client client = new Client() - .setEndpoint("https://cloud.appwrite.io/v1") // Your API Endpoint + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint .setProject("<YOUR_PROJECT_ID>") // Your project ID .setKey("<YOUR_API_KEY>"); // Your secret API key diff --git a/docs/examples/java/users/update-phone-verification.md b/docs/examples/java/users/update-phone-verification.md index ce2377b..4a1d5a2 100644 --- a/docs/examples/java/users/update-phone-verification.md +++ b/docs/examples/java/users/update-phone-verification.md @@ -3,7 +3,7 @@ import io.appwrite.coroutines.CoroutineCallback; import io.appwrite.services.Users; Client client = new Client() - .setEndpoint("https://cloud.appwrite.io/v1") // Your API Endpoint + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint .setProject("<YOUR_PROJECT_ID>") // Your project ID .setKey("<YOUR_API_KEY>"); // Your secret API key diff --git a/docs/examples/java/users/update-phone.md b/docs/examples/java/users/update-phone.md index e0a0a49..49477fa 100644 --- a/docs/examples/java/users/update-phone.md +++ b/docs/examples/java/users/update-phone.md @@ -3,7 +3,7 @@ import io.appwrite.coroutines.CoroutineCallback; import io.appwrite.services.Users; Client client = new Client() - .setEndpoint("https://cloud.appwrite.io/v1") // Your API Endpoint + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint .setProject("<YOUR_PROJECT_ID>") // Your project ID .setKey("<YOUR_API_KEY>"); // Your secret API key diff --git a/docs/examples/java/users/update-prefs.md b/docs/examples/java/users/update-prefs.md index 1d1cc7c..c5a9677 100644 --- a/docs/examples/java/users/update-prefs.md +++ b/docs/examples/java/users/update-prefs.md @@ -3,7 +3,7 @@ import io.appwrite.coroutines.CoroutineCallback; import io.appwrite.services.Users; Client client = new Client() - .setEndpoint("https://cloud.appwrite.io/v1") // Your API Endpoint + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint .setProject("<YOUR_PROJECT_ID>") // Your project ID .setKey("<YOUR_API_KEY>"); // Your secret API key diff --git a/docs/examples/java/users/update-status.md b/docs/examples/java/users/update-status.md index e757ece..6e875b9 100644 --- a/docs/examples/java/users/update-status.md +++ b/docs/examples/java/users/update-status.md @@ -3,7 +3,7 @@ import io.appwrite.coroutines.CoroutineCallback; import io.appwrite.services.Users; Client client = new Client() - .setEndpoint("https://cloud.appwrite.io/v1") // Your API Endpoint + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint .setProject("<YOUR_PROJECT_ID>") // Your project ID .setKey("<YOUR_API_KEY>"); // Your secret API key diff --git a/docs/examples/java/users/update-target.md b/docs/examples/java/users/update-target.md index 23ca8d0..67b90bf 100644 --- a/docs/examples/java/users/update-target.md +++ b/docs/examples/java/users/update-target.md @@ -3,7 +3,7 @@ import io.appwrite.coroutines.CoroutineCallback; import io.appwrite.services.Users; Client client = new Client() - .setEndpoint("https://cloud.appwrite.io/v1") // Your API Endpoint + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint .setProject("<YOUR_PROJECT_ID>") // Your project ID .setKey("<YOUR_API_KEY>"); // Your secret API key diff --git a/docs/examples/kotlin/account/create-anonymous-session.md b/docs/examples/kotlin/account/create-anonymous-session.md index 932b8a7..0ddc383 100644 --- a/docs/examples/kotlin/account/create-anonymous-session.md +++ b/docs/examples/kotlin/account/create-anonymous-session.md @@ -3,7 +3,7 @@ import io.appwrite.coroutines.CoroutineCallback import io.appwrite.services.Account val client = Client() - .setEndpoint("https://cloud.appwrite.io/v1") // Your API Endpoint + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint .setProject("<YOUR_PROJECT_ID>") // Your project ID val account = Account(client) diff --git a/docs/examples/kotlin/account/create-email-password-session.md b/docs/examples/kotlin/account/create-email-password-session.md index cc3b8cb..9c7af95 100644 --- a/docs/examples/kotlin/account/create-email-password-session.md +++ b/docs/examples/kotlin/account/create-email-password-session.md @@ -3,7 +3,7 @@ import io.appwrite.coroutines.CoroutineCallback import io.appwrite.services.Account val client = Client() - .setEndpoint("https://cloud.appwrite.io/v1") // Your API Endpoint + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint .setProject("<YOUR_PROJECT_ID>") // Your project ID val account = Account(client) diff --git a/docs/examples/kotlin/account/create-email-token.md b/docs/examples/kotlin/account/create-email-token.md index b56e489..84acd78 100644 --- a/docs/examples/kotlin/account/create-email-token.md +++ b/docs/examples/kotlin/account/create-email-token.md @@ -3,7 +3,7 @@ import io.appwrite.coroutines.CoroutineCallback import io.appwrite.services.Account val client = Client() - .setEndpoint("https://cloud.appwrite.io/v1") // Your API Endpoint + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint .setProject("<YOUR_PROJECT_ID>") // Your project ID val account = Account(client) diff --git a/docs/examples/kotlin/account/create-j-w-t.md b/docs/examples/kotlin/account/create-j-w-t.md index a0208cb..4c04aa1 100644 --- a/docs/examples/kotlin/account/create-j-w-t.md +++ b/docs/examples/kotlin/account/create-j-w-t.md @@ -3,7 +3,7 @@ import io.appwrite.coroutines.CoroutineCallback import io.appwrite.services.Account val client = Client() - .setEndpoint("https://cloud.appwrite.io/v1") // Your API Endpoint + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint .setProject("<YOUR_PROJECT_ID>") // Your project ID val account = Account(client) diff --git a/docs/examples/kotlin/account/create-magic-u-r-l-token.md b/docs/examples/kotlin/account/create-magic-u-r-l-token.md index ba66695..c1d8cba 100644 --- a/docs/examples/kotlin/account/create-magic-u-r-l-token.md +++ b/docs/examples/kotlin/account/create-magic-u-r-l-token.md @@ -3,7 +3,7 @@ import io.appwrite.coroutines.CoroutineCallback import io.appwrite.services.Account val client = Client() - .setEndpoint("https://cloud.appwrite.io/v1") // Your API Endpoint + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint .setProject("<YOUR_PROJECT_ID>") // Your project ID val account = Account(client) diff --git a/docs/examples/kotlin/account/create-mfa-authenticator.md b/docs/examples/kotlin/account/create-mfa-authenticator.md index 0afd790..803579d 100644 --- a/docs/examples/kotlin/account/create-mfa-authenticator.md +++ b/docs/examples/kotlin/account/create-mfa-authenticator.md @@ -4,7 +4,7 @@ import io.appwrite.services.Account import io.appwrite.enums.AuthenticatorType val client = Client() - .setEndpoint("https://cloud.appwrite.io/v1") // Your API Endpoint + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint .setProject("<YOUR_PROJECT_ID>") // Your project ID .setSession("") // The user session to authenticate with diff --git a/docs/examples/kotlin/account/create-mfa-challenge.md b/docs/examples/kotlin/account/create-mfa-challenge.md index 921e791..a3fbe25 100644 --- a/docs/examples/kotlin/account/create-mfa-challenge.md +++ b/docs/examples/kotlin/account/create-mfa-challenge.md @@ -4,7 +4,7 @@ import io.appwrite.services.Account import io.appwrite.enums.AuthenticationFactor val client = Client() - .setEndpoint("https://cloud.appwrite.io/v1") // Your API Endpoint + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint .setProject("<YOUR_PROJECT_ID>") // Your project ID val account = Account(client) diff --git a/docs/examples/kotlin/account/create-mfa-recovery-codes.md b/docs/examples/kotlin/account/create-mfa-recovery-codes.md index 270feda..c21a382 100644 --- a/docs/examples/kotlin/account/create-mfa-recovery-codes.md +++ b/docs/examples/kotlin/account/create-mfa-recovery-codes.md @@ -3,7 +3,7 @@ import io.appwrite.coroutines.CoroutineCallback import io.appwrite.services.Account val client = Client() - .setEndpoint("https://cloud.appwrite.io/v1") // Your API Endpoint + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint .setProject("<YOUR_PROJECT_ID>") // Your project ID .setSession("") // The user session to authenticate with diff --git a/docs/examples/kotlin/account/create-o-auth2token.md b/docs/examples/kotlin/account/create-o-auth2token.md index 62d176d..1a8c118 100644 --- a/docs/examples/kotlin/account/create-o-auth2token.md +++ b/docs/examples/kotlin/account/create-o-auth2token.md @@ -4,7 +4,7 @@ import io.appwrite.services.Account import io.appwrite.enums.OAuthProvider val client = Client() - .setEndpoint("https://cloud.appwrite.io/v1") // Your API Endpoint + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint .setProject("<YOUR_PROJECT_ID>") // Your project ID val account = Account(client) diff --git a/docs/examples/kotlin/account/create-phone-token.md b/docs/examples/kotlin/account/create-phone-token.md index b9633e7..be03e06 100644 --- a/docs/examples/kotlin/account/create-phone-token.md +++ b/docs/examples/kotlin/account/create-phone-token.md @@ -3,7 +3,7 @@ import io.appwrite.coroutines.CoroutineCallback import io.appwrite.services.Account val client = Client() - .setEndpoint("https://cloud.appwrite.io/v1") // Your API Endpoint + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint .setProject("<YOUR_PROJECT_ID>") // Your project ID val account = Account(client) diff --git a/docs/examples/kotlin/account/create-phone-verification.md b/docs/examples/kotlin/account/create-phone-verification.md index 038d72e..3ae45b3 100644 --- a/docs/examples/kotlin/account/create-phone-verification.md +++ b/docs/examples/kotlin/account/create-phone-verification.md @@ -3,7 +3,7 @@ import io.appwrite.coroutines.CoroutineCallback import io.appwrite.services.Account val client = Client() - .setEndpoint("https://cloud.appwrite.io/v1") // Your API Endpoint + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint .setProject("<YOUR_PROJECT_ID>") // Your project ID .setSession("") // The user session to authenticate with diff --git a/docs/examples/kotlin/account/create-recovery.md b/docs/examples/kotlin/account/create-recovery.md index 27c6af5..949219c 100644 --- a/docs/examples/kotlin/account/create-recovery.md +++ b/docs/examples/kotlin/account/create-recovery.md @@ -3,7 +3,7 @@ import io.appwrite.coroutines.CoroutineCallback import io.appwrite.services.Account val client = Client() - .setEndpoint("https://cloud.appwrite.io/v1") // Your API Endpoint + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint .setProject("<YOUR_PROJECT_ID>") // Your project ID .setSession("") // The user session to authenticate with diff --git a/docs/examples/kotlin/account/create-session.md b/docs/examples/kotlin/account/create-session.md index 5e6c47c..5afb219 100644 --- a/docs/examples/kotlin/account/create-session.md +++ b/docs/examples/kotlin/account/create-session.md @@ -3,7 +3,7 @@ import io.appwrite.coroutines.CoroutineCallback import io.appwrite.services.Account val client = Client() - .setEndpoint("https://cloud.appwrite.io/v1") // Your API Endpoint + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint .setProject("<YOUR_PROJECT_ID>") // Your project ID val account = Account(client) diff --git a/docs/examples/kotlin/account/create-verification.md b/docs/examples/kotlin/account/create-verification.md index 0d42f8a..f3441c9 100644 --- a/docs/examples/kotlin/account/create-verification.md +++ b/docs/examples/kotlin/account/create-verification.md @@ -3,7 +3,7 @@ import io.appwrite.coroutines.CoroutineCallback import io.appwrite.services.Account val client = Client() - .setEndpoint("https://cloud.appwrite.io/v1") // Your API Endpoint + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint .setProject("<YOUR_PROJECT_ID>") // Your project ID .setSession("") // The user session to authenticate with diff --git a/docs/examples/kotlin/account/create.md b/docs/examples/kotlin/account/create.md index 19d7c12..80640ba 100644 --- a/docs/examples/kotlin/account/create.md +++ b/docs/examples/kotlin/account/create.md @@ -3,7 +3,7 @@ import io.appwrite.coroutines.CoroutineCallback import io.appwrite.services.Account val client = Client() - .setEndpoint("https://cloud.appwrite.io/v1") // Your API Endpoint + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint .setProject("<YOUR_PROJECT_ID>") // Your project ID val account = Account(client) diff --git a/docs/examples/kotlin/account/delete-identity.md b/docs/examples/kotlin/account/delete-identity.md index f6ede24..f9a5ce0 100644 --- a/docs/examples/kotlin/account/delete-identity.md +++ b/docs/examples/kotlin/account/delete-identity.md @@ -3,7 +3,7 @@ import io.appwrite.coroutines.CoroutineCallback import io.appwrite.services.Account val client = Client() - .setEndpoint("https://cloud.appwrite.io/v1") // Your API Endpoint + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint .setProject("<YOUR_PROJECT_ID>") // Your project ID .setSession("") // The user session to authenticate with diff --git a/docs/examples/kotlin/account/delete-mfa-authenticator.md b/docs/examples/kotlin/account/delete-mfa-authenticator.md index ffa853f..2068077 100644 --- a/docs/examples/kotlin/account/delete-mfa-authenticator.md +++ b/docs/examples/kotlin/account/delete-mfa-authenticator.md @@ -4,7 +4,7 @@ import io.appwrite.services.Account import io.appwrite.enums.AuthenticatorType val client = Client() - .setEndpoint("https://cloud.appwrite.io/v1") // Your API Endpoint + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint .setProject("<YOUR_PROJECT_ID>") // Your project ID .setSession("") // The user session to authenticate with diff --git a/docs/examples/kotlin/account/delete-session.md b/docs/examples/kotlin/account/delete-session.md index 47b80d7..31096cc 100644 --- a/docs/examples/kotlin/account/delete-session.md +++ b/docs/examples/kotlin/account/delete-session.md @@ -3,7 +3,7 @@ import io.appwrite.coroutines.CoroutineCallback import io.appwrite.services.Account val client = Client() - .setEndpoint("https://cloud.appwrite.io/v1") // Your API Endpoint + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint .setProject("<YOUR_PROJECT_ID>") // Your project ID .setSession("") // The user session to authenticate with diff --git a/docs/examples/kotlin/account/delete-sessions.md b/docs/examples/kotlin/account/delete-sessions.md index b2571de..dc29fb8 100644 --- a/docs/examples/kotlin/account/delete-sessions.md +++ b/docs/examples/kotlin/account/delete-sessions.md @@ -3,7 +3,7 @@ import io.appwrite.coroutines.CoroutineCallback import io.appwrite.services.Account val client = Client() - .setEndpoint("https://cloud.appwrite.io/v1") // Your API Endpoint + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint .setProject("<YOUR_PROJECT_ID>") // Your project ID .setSession("") // The user session to authenticate with diff --git a/docs/examples/kotlin/account/get-mfa-recovery-codes.md b/docs/examples/kotlin/account/get-mfa-recovery-codes.md index 5335a0d..027c211 100644 --- a/docs/examples/kotlin/account/get-mfa-recovery-codes.md +++ b/docs/examples/kotlin/account/get-mfa-recovery-codes.md @@ -3,7 +3,7 @@ import io.appwrite.coroutines.CoroutineCallback import io.appwrite.services.Account val client = Client() - .setEndpoint("https://cloud.appwrite.io/v1") // Your API Endpoint + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint .setProject("<YOUR_PROJECT_ID>") // Your project ID .setSession("") // The user session to authenticate with diff --git a/docs/examples/kotlin/account/get-prefs.md b/docs/examples/kotlin/account/get-prefs.md index 3705645..299abbd 100644 --- a/docs/examples/kotlin/account/get-prefs.md +++ b/docs/examples/kotlin/account/get-prefs.md @@ -3,7 +3,7 @@ import io.appwrite.coroutines.CoroutineCallback import io.appwrite.services.Account val client = Client() - .setEndpoint("https://cloud.appwrite.io/v1") // Your API Endpoint + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint .setProject("<YOUR_PROJECT_ID>") // Your project ID .setSession("") // The user session to authenticate with diff --git a/docs/examples/kotlin/account/get-session.md b/docs/examples/kotlin/account/get-session.md index 78478e1..e40297e 100644 --- a/docs/examples/kotlin/account/get-session.md +++ b/docs/examples/kotlin/account/get-session.md @@ -3,7 +3,7 @@ import io.appwrite.coroutines.CoroutineCallback import io.appwrite.services.Account val client = Client() - .setEndpoint("https://cloud.appwrite.io/v1") // Your API Endpoint + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint .setProject("<YOUR_PROJECT_ID>") // Your project ID .setSession("") // The user session to authenticate with diff --git a/docs/examples/kotlin/account/get.md b/docs/examples/kotlin/account/get.md index 84f9bc3..f65f4fd 100644 --- a/docs/examples/kotlin/account/get.md +++ b/docs/examples/kotlin/account/get.md @@ -3,7 +3,7 @@ import io.appwrite.coroutines.CoroutineCallback import io.appwrite.services.Account val client = Client() - .setEndpoint("https://cloud.appwrite.io/v1") // Your API Endpoint + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint .setProject("<YOUR_PROJECT_ID>") // Your project ID .setSession("") // The user session to authenticate with diff --git a/docs/examples/kotlin/account/list-identities.md b/docs/examples/kotlin/account/list-identities.md index f947de3..32eb86c 100644 --- a/docs/examples/kotlin/account/list-identities.md +++ b/docs/examples/kotlin/account/list-identities.md @@ -3,7 +3,7 @@ import io.appwrite.coroutines.CoroutineCallback import io.appwrite.services.Account val client = Client() - .setEndpoint("https://cloud.appwrite.io/v1") // Your API Endpoint + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint .setProject("<YOUR_PROJECT_ID>") // Your project ID .setSession("") // The user session to authenticate with diff --git a/docs/examples/kotlin/account/list-logs.md b/docs/examples/kotlin/account/list-logs.md index ba926ae..345b2f1 100644 --- a/docs/examples/kotlin/account/list-logs.md +++ b/docs/examples/kotlin/account/list-logs.md @@ -3,7 +3,7 @@ import io.appwrite.coroutines.CoroutineCallback import io.appwrite.services.Account val client = Client() - .setEndpoint("https://cloud.appwrite.io/v1") // Your API Endpoint + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint .setProject("<YOUR_PROJECT_ID>") // Your project ID .setSession("") // The user session to authenticate with diff --git a/docs/examples/kotlin/account/list-mfa-factors.md b/docs/examples/kotlin/account/list-mfa-factors.md index ee07a48..ce47dcd 100644 --- a/docs/examples/kotlin/account/list-mfa-factors.md +++ b/docs/examples/kotlin/account/list-mfa-factors.md @@ -3,7 +3,7 @@ import io.appwrite.coroutines.CoroutineCallback import io.appwrite.services.Account val client = Client() - .setEndpoint("https://cloud.appwrite.io/v1") // Your API Endpoint + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint .setProject("<YOUR_PROJECT_ID>") // Your project ID .setSession("") // The user session to authenticate with diff --git a/docs/examples/kotlin/account/list-sessions.md b/docs/examples/kotlin/account/list-sessions.md index 7f23ad3..899260c 100644 --- a/docs/examples/kotlin/account/list-sessions.md +++ b/docs/examples/kotlin/account/list-sessions.md @@ -3,7 +3,7 @@ import io.appwrite.coroutines.CoroutineCallback import io.appwrite.services.Account val client = Client() - .setEndpoint("https://cloud.appwrite.io/v1") // Your API Endpoint + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint .setProject("<YOUR_PROJECT_ID>") // Your project ID .setSession("") // The user session to authenticate with diff --git a/docs/examples/kotlin/account/update-email.md b/docs/examples/kotlin/account/update-email.md index c10c25e..6ebe5e7 100644 --- a/docs/examples/kotlin/account/update-email.md +++ b/docs/examples/kotlin/account/update-email.md @@ -3,7 +3,7 @@ import io.appwrite.coroutines.CoroutineCallback import io.appwrite.services.Account val client = Client() - .setEndpoint("https://cloud.appwrite.io/v1") // Your API Endpoint + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint .setProject("<YOUR_PROJECT_ID>") // Your project ID .setSession("") // The user session to authenticate with diff --git a/docs/examples/kotlin/account/update-m-f-a.md b/docs/examples/kotlin/account/update-m-f-a.md index 516f14d..e12e8e0 100644 --- a/docs/examples/kotlin/account/update-m-f-a.md +++ b/docs/examples/kotlin/account/update-m-f-a.md @@ -3,7 +3,7 @@ import io.appwrite.coroutines.CoroutineCallback import io.appwrite.services.Account val client = Client() - .setEndpoint("https://cloud.appwrite.io/v1") // Your API Endpoint + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint .setProject("<YOUR_PROJECT_ID>") // Your project ID .setSession("") // The user session to authenticate with diff --git a/docs/examples/kotlin/account/update-magic-u-r-l-session.md b/docs/examples/kotlin/account/update-magic-u-r-l-session.md index 99b65eb..d4fe7f4 100644 --- a/docs/examples/kotlin/account/update-magic-u-r-l-session.md +++ b/docs/examples/kotlin/account/update-magic-u-r-l-session.md @@ -3,7 +3,7 @@ import io.appwrite.coroutines.CoroutineCallback import io.appwrite.services.Account val client = Client() - .setEndpoint("https://cloud.appwrite.io/v1") // Your API Endpoint + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint .setProject("<YOUR_PROJECT_ID>") // Your project ID val account = Account(client) diff --git a/docs/examples/kotlin/account/update-mfa-authenticator.md b/docs/examples/kotlin/account/update-mfa-authenticator.md index 482dfb3..521d133 100644 --- a/docs/examples/kotlin/account/update-mfa-authenticator.md +++ b/docs/examples/kotlin/account/update-mfa-authenticator.md @@ -4,7 +4,7 @@ import io.appwrite.services.Account import io.appwrite.enums.AuthenticatorType val client = Client() - .setEndpoint("https://cloud.appwrite.io/v1") // Your API Endpoint + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint .setProject("<YOUR_PROJECT_ID>") // Your project ID .setSession("") // The user session to authenticate with diff --git a/docs/examples/kotlin/account/update-mfa-challenge.md b/docs/examples/kotlin/account/update-mfa-challenge.md index 2a9a1a4..6b978b7 100644 --- a/docs/examples/kotlin/account/update-mfa-challenge.md +++ b/docs/examples/kotlin/account/update-mfa-challenge.md @@ -3,7 +3,7 @@ import io.appwrite.coroutines.CoroutineCallback import io.appwrite.services.Account val client = Client() - .setEndpoint("https://cloud.appwrite.io/v1") // Your API Endpoint + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint .setProject("<YOUR_PROJECT_ID>") // Your project ID .setSession("") // The user session to authenticate with diff --git a/docs/examples/kotlin/account/update-mfa-recovery-codes.md b/docs/examples/kotlin/account/update-mfa-recovery-codes.md index ebc6d71..31da824 100644 --- a/docs/examples/kotlin/account/update-mfa-recovery-codes.md +++ b/docs/examples/kotlin/account/update-mfa-recovery-codes.md @@ -3,7 +3,7 @@ import io.appwrite.coroutines.CoroutineCallback import io.appwrite.services.Account val client = Client() - .setEndpoint("https://cloud.appwrite.io/v1") // Your API Endpoint + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint .setProject("<YOUR_PROJECT_ID>") // Your project ID .setSession("") // The user session to authenticate with diff --git a/docs/examples/kotlin/account/update-name.md b/docs/examples/kotlin/account/update-name.md index 13f9019..ecb7a2b 100644 --- a/docs/examples/kotlin/account/update-name.md +++ b/docs/examples/kotlin/account/update-name.md @@ -3,7 +3,7 @@ import io.appwrite.coroutines.CoroutineCallback import io.appwrite.services.Account val client = Client() - .setEndpoint("https://cloud.appwrite.io/v1") // Your API Endpoint + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint .setProject("<YOUR_PROJECT_ID>") // Your project ID .setSession("") // The user session to authenticate with diff --git a/docs/examples/kotlin/account/update-password.md b/docs/examples/kotlin/account/update-password.md index fbb6796..159aa79 100644 --- a/docs/examples/kotlin/account/update-password.md +++ b/docs/examples/kotlin/account/update-password.md @@ -3,7 +3,7 @@ import io.appwrite.coroutines.CoroutineCallback import io.appwrite.services.Account val client = Client() - .setEndpoint("https://cloud.appwrite.io/v1") // Your API Endpoint + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint .setProject("<YOUR_PROJECT_ID>") // Your project ID .setSession("") // The user session to authenticate with diff --git a/docs/examples/kotlin/account/update-phone-session.md b/docs/examples/kotlin/account/update-phone-session.md index 1f6aa40..1bcc4c0 100644 --- a/docs/examples/kotlin/account/update-phone-session.md +++ b/docs/examples/kotlin/account/update-phone-session.md @@ -3,7 +3,7 @@ import io.appwrite.coroutines.CoroutineCallback import io.appwrite.services.Account val client = Client() - .setEndpoint("https://cloud.appwrite.io/v1") // Your API Endpoint + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint .setProject("<YOUR_PROJECT_ID>") // Your project ID val account = Account(client) diff --git a/docs/examples/kotlin/account/update-phone-verification.md b/docs/examples/kotlin/account/update-phone-verification.md index 87cd3ff..36a2d9c 100644 --- a/docs/examples/kotlin/account/update-phone-verification.md +++ b/docs/examples/kotlin/account/update-phone-verification.md @@ -3,7 +3,7 @@ import io.appwrite.coroutines.CoroutineCallback import io.appwrite.services.Account val client = Client() - .setEndpoint("https://cloud.appwrite.io/v1") // Your API Endpoint + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint .setProject("<YOUR_PROJECT_ID>") // Your project ID .setSession("") // The user session to authenticate with diff --git a/docs/examples/kotlin/account/update-phone.md b/docs/examples/kotlin/account/update-phone.md index 1a2600c..1ee4cbd 100644 --- a/docs/examples/kotlin/account/update-phone.md +++ b/docs/examples/kotlin/account/update-phone.md @@ -3,7 +3,7 @@ import io.appwrite.coroutines.CoroutineCallback import io.appwrite.services.Account val client = Client() - .setEndpoint("https://cloud.appwrite.io/v1") // Your API Endpoint + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint .setProject("<YOUR_PROJECT_ID>") // Your project ID .setSession("") // The user session to authenticate with diff --git a/docs/examples/kotlin/account/update-prefs.md b/docs/examples/kotlin/account/update-prefs.md index 32d083b..dafee7c 100644 --- a/docs/examples/kotlin/account/update-prefs.md +++ b/docs/examples/kotlin/account/update-prefs.md @@ -3,7 +3,7 @@ import io.appwrite.coroutines.CoroutineCallback import io.appwrite.services.Account val client = Client() - .setEndpoint("https://cloud.appwrite.io/v1") // Your API Endpoint + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint .setProject("<YOUR_PROJECT_ID>") // Your project ID .setSession("") // The user session to authenticate with diff --git a/docs/examples/kotlin/account/update-recovery.md b/docs/examples/kotlin/account/update-recovery.md index 8626e97..e563813 100644 --- a/docs/examples/kotlin/account/update-recovery.md +++ b/docs/examples/kotlin/account/update-recovery.md @@ -3,7 +3,7 @@ import io.appwrite.coroutines.CoroutineCallback import io.appwrite.services.Account val client = Client() - .setEndpoint("https://cloud.appwrite.io/v1") // Your API Endpoint + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint .setProject("<YOUR_PROJECT_ID>") // Your project ID .setSession("") // The user session to authenticate with diff --git a/docs/examples/kotlin/account/update-session.md b/docs/examples/kotlin/account/update-session.md index 5f83a2b..ab3730a 100644 --- a/docs/examples/kotlin/account/update-session.md +++ b/docs/examples/kotlin/account/update-session.md @@ -3,7 +3,7 @@ import io.appwrite.coroutines.CoroutineCallback import io.appwrite.services.Account val client = Client() - .setEndpoint("https://cloud.appwrite.io/v1") // Your API Endpoint + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint .setProject("<YOUR_PROJECT_ID>") // Your project ID .setSession("") // The user session to authenticate with diff --git a/docs/examples/kotlin/account/update-status.md b/docs/examples/kotlin/account/update-status.md index aa94ade..021f614 100644 --- a/docs/examples/kotlin/account/update-status.md +++ b/docs/examples/kotlin/account/update-status.md @@ -3,7 +3,7 @@ import io.appwrite.coroutines.CoroutineCallback import io.appwrite.services.Account val client = Client() - .setEndpoint("https://cloud.appwrite.io/v1") // Your API Endpoint + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint .setProject("<YOUR_PROJECT_ID>") // Your project ID .setSession("") // The user session to authenticate with diff --git a/docs/examples/kotlin/account/update-verification.md b/docs/examples/kotlin/account/update-verification.md index 2f8cc25..6402093 100644 --- a/docs/examples/kotlin/account/update-verification.md +++ b/docs/examples/kotlin/account/update-verification.md @@ -3,7 +3,7 @@ import io.appwrite.coroutines.CoroutineCallback import io.appwrite.services.Account val client = Client() - .setEndpoint("https://cloud.appwrite.io/v1") // Your API Endpoint + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint .setProject("<YOUR_PROJECT_ID>") // Your project ID .setSession("") // The user session to authenticate with diff --git a/docs/examples/kotlin/avatars/get-browser.md b/docs/examples/kotlin/avatars/get-browser.md index 0e29e11..e9b95c9 100644 --- a/docs/examples/kotlin/avatars/get-browser.md +++ b/docs/examples/kotlin/avatars/get-browser.md @@ -4,7 +4,7 @@ import io.appwrite.services.Avatars import io.appwrite.enums.Browser val client = Client() - .setEndpoint("https://cloud.appwrite.io/v1") // Your API Endpoint + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint .setProject("<YOUR_PROJECT_ID>") // Your project ID .setSession("") // The user session to authenticate with diff --git a/docs/examples/kotlin/avatars/get-credit-card.md b/docs/examples/kotlin/avatars/get-credit-card.md index 9929e76..8554dbd 100644 --- a/docs/examples/kotlin/avatars/get-credit-card.md +++ b/docs/examples/kotlin/avatars/get-credit-card.md @@ -4,7 +4,7 @@ import io.appwrite.services.Avatars import io.appwrite.enums.CreditCard val client = Client() - .setEndpoint("https://cloud.appwrite.io/v1") // Your API Endpoint + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint .setProject("<YOUR_PROJECT_ID>") // Your project ID .setSession("") // The user session to authenticate with diff --git a/docs/examples/kotlin/avatars/get-favicon.md b/docs/examples/kotlin/avatars/get-favicon.md index 8cf4af2..d1f5d9b 100644 --- a/docs/examples/kotlin/avatars/get-favicon.md +++ b/docs/examples/kotlin/avatars/get-favicon.md @@ -3,7 +3,7 @@ import io.appwrite.coroutines.CoroutineCallback import io.appwrite.services.Avatars val client = Client() - .setEndpoint("https://cloud.appwrite.io/v1") // Your API Endpoint + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint .setProject("<YOUR_PROJECT_ID>") // Your project ID .setSession("") // The user session to authenticate with diff --git a/docs/examples/kotlin/avatars/get-flag.md b/docs/examples/kotlin/avatars/get-flag.md index 73f3fef..011a729 100644 --- a/docs/examples/kotlin/avatars/get-flag.md +++ b/docs/examples/kotlin/avatars/get-flag.md @@ -4,7 +4,7 @@ import io.appwrite.services.Avatars import io.appwrite.enums.Flag val client = Client() - .setEndpoint("https://cloud.appwrite.io/v1") // Your API Endpoint + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint .setProject("<YOUR_PROJECT_ID>") // Your project ID .setSession("") // The user session to authenticate with diff --git a/docs/examples/kotlin/avatars/get-image.md b/docs/examples/kotlin/avatars/get-image.md index 1369000..98b9c07 100644 --- a/docs/examples/kotlin/avatars/get-image.md +++ b/docs/examples/kotlin/avatars/get-image.md @@ -3,7 +3,7 @@ import io.appwrite.coroutines.CoroutineCallback import io.appwrite.services.Avatars val client = Client() - .setEndpoint("https://cloud.appwrite.io/v1") // Your API Endpoint + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint .setProject("<YOUR_PROJECT_ID>") // Your project ID .setSession("") // The user session to authenticate with diff --git a/docs/examples/kotlin/avatars/get-initials.md b/docs/examples/kotlin/avatars/get-initials.md index 9549924..2aa165c 100644 --- a/docs/examples/kotlin/avatars/get-initials.md +++ b/docs/examples/kotlin/avatars/get-initials.md @@ -3,7 +3,7 @@ import io.appwrite.coroutines.CoroutineCallback import io.appwrite.services.Avatars val client = Client() - .setEndpoint("https://cloud.appwrite.io/v1") // Your API Endpoint + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint .setProject("<YOUR_PROJECT_ID>") // Your project ID .setSession("") // The user session to authenticate with diff --git a/docs/examples/kotlin/avatars/get-q-r.md b/docs/examples/kotlin/avatars/get-q-r.md index cea667b..abcf488 100644 --- a/docs/examples/kotlin/avatars/get-q-r.md +++ b/docs/examples/kotlin/avatars/get-q-r.md @@ -3,7 +3,7 @@ import io.appwrite.coroutines.CoroutineCallback import io.appwrite.services.Avatars val client = Client() - .setEndpoint("https://cloud.appwrite.io/v1") // Your API Endpoint + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint .setProject("<YOUR_PROJECT_ID>") // Your project ID .setSession("") // The user session to authenticate with diff --git a/docs/examples/kotlin/databases/create-boolean-attribute.md b/docs/examples/kotlin/databases/create-boolean-attribute.md index 64ac210..b80bd94 100644 --- a/docs/examples/kotlin/databases/create-boolean-attribute.md +++ b/docs/examples/kotlin/databases/create-boolean-attribute.md @@ -3,7 +3,7 @@ import io.appwrite.coroutines.CoroutineCallback import io.appwrite.services.Databases val client = Client() - .setEndpoint("https://cloud.appwrite.io/v1") // Your API Endpoint + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint .setProject("<YOUR_PROJECT_ID>") // Your project ID .setKey("<YOUR_API_KEY>") // Your secret API key diff --git a/docs/examples/kotlin/databases/create-collection.md b/docs/examples/kotlin/databases/create-collection.md index 03ca6a4..de9679f 100644 --- a/docs/examples/kotlin/databases/create-collection.md +++ b/docs/examples/kotlin/databases/create-collection.md @@ -3,7 +3,7 @@ import io.appwrite.coroutines.CoroutineCallback import io.appwrite.services.Databases val client = Client() - .setEndpoint("https://cloud.appwrite.io/v1") // Your API Endpoint + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint .setProject("<YOUR_PROJECT_ID>") // Your project ID .setKey("<YOUR_API_KEY>") // Your secret API key diff --git a/docs/examples/kotlin/databases/create-datetime-attribute.md b/docs/examples/kotlin/databases/create-datetime-attribute.md index d9e0771..2d73056 100644 --- a/docs/examples/kotlin/databases/create-datetime-attribute.md +++ b/docs/examples/kotlin/databases/create-datetime-attribute.md @@ -3,7 +3,7 @@ import io.appwrite.coroutines.CoroutineCallback import io.appwrite.services.Databases val client = Client() - .setEndpoint("https://cloud.appwrite.io/v1") // Your API Endpoint + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint .setProject("<YOUR_PROJECT_ID>") // Your project ID .setKey("<YOUR_API_KEY>") // Your secret API key diff --git a/docs/examples/kotlin/databases/create-document.md b/docs/examples/kotlin/databases/create-document.md index 873e2ed..695fdbd 100644 --- a/docs/examples/kotlin/databases/create-document.md +++ b/docs/examples/kotlin/databases/create-document.md @@ -3,7 +3,7 @@ import io.appwrite.coroutines.CoroutineCallback import io.appwrite.services.Databases val client = Client() - .setEndpoint("https://cloud.appwrite.io/v1") // Your API Endpoint + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint .setProject("<YOUR_PROJECT_ID>") // Your project ID .setSession("") // The user session to authenticate with diff --git a/docs/examples/kotlin/databases/create-email-attribute.md b/docs/examples/kotlin/databases/create-email-attribute.md index 5e5091b..2a5a9c2 100644 --- a/docs/examples/kotlin/databases/create-email-attribute.md +++ b/docs/examples/kotlin/databases/create-email-attribute.md @@ -3,7 +3,7 @@ import io.appwrite.coroutines.CoroutineCallback import io.appwrite.services.Databases val client = Client() - .setEndpoint("https://cloud.appwrite.io/v1") // Your API Endpoint + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint .setProject("<YOUR_PROJECT_ID>") // Your project ID .setKey("<YOUR_API_KEY>") // Your secret API key diff --git a/docs/examples/kotlin/databases/create-enum-attribute.md b/docs/examples/kotlin/databases/create-enum-attribute.md index 733fbad..d9decde 100644 --- a/docs/examples/kotlin/databases/create-enum-attribute.md +++ b/docs/examples/kotlin/databases/create-enum-attribute.md @@ -3,7 +3,7 @@ import io.appwrite.coroutines.CoroutineCallback import io.appwrite.services.Databases val client = Client() - .setEndpoint("https://cloud.appwrite.io/v1") // Your API Endpoint + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint .setProject("<YOUR_PROJECT_ID>") // Your project ID .setKey("<YOUR_API_KEY>") // Your secret API key diff --git a/docs/examples/kotlin/databases/create-float-attribute.md b/docs/examples/kotlin/databases/create-float-attribute.md index 04e9bfa..5ca86a6 100644 --- a/docs/examples/kotlin/databases/create-float-attribute.md +++ b/docs/examples/kotlin/databases/create-float-attribute.md @@ -3,7 +3,7 @@ import io.appwrite.coroutines.CoroutineCallback import io.appwrite.services.Databases val client = Client() - .setEndpoint("https://cloud.appwrite.io/v1") // Your API Endpoint + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint .setProject("<YOUR_PROJECT_ID>") // Your project ID .setKey("<YOUR_API_KEY>") // Your secret API key diff --git a/docs/examples/kotlin/databases/create-index.md b/docs/examples/kotlin/databases/create-index.md index 6dab46f..7ada0f7 100644 --- a/docs/examples/kotlin/databases/create-index.md +++ b/docs/examples/kotlin/databases/create-index.md @@ -4,7 +4,7 @@ import io.appwrite.services.Databases import io.appwrite.enums.IndexType val client = Client() - .setEndpoint("https://cloud.appwrite.io/v1") // Your API Endpoint + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint .setProject("<YOUR_PROJECT_ID>") // Your project ID .setKey("<YOUR_API_KEY>") // Your secret API key diff --git a/docs/examples/kotlin/databases/create-integer-attribute.md b/docs/examples/kotlin/databases/create-integer-attribute.md index 6c483bb..748d01a 100644 --- a/docs/examples/kotlin/databases/create-integer-attribute.md +++ b/docs/examples/kotlin/databases/create-integer-attribute.md @@ -3,7 +3,7 @@ import io.appwrite.coroutines.CoroutineCallback import io.appwrite.services.Databases val client = Client() - .setEndpoint("https://cloud.appwrite.io/v1") // Your API Endpoint + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint .setProject("<YOUR_PROJECT_ID>") // Your project ID .setKey("<YOUR_API_KEY>") // Your secret API key diff --git a/docs/examples/kotlin/databases/create-ip-attribute.md b/docs/examples/kotlin/databases/create-ip-attribute.md index 76dd82d..bfc6105 100644 --- a/docs/examples/kotlin/databases/create-ip-attribute.md +++ b/docs/examples/kotlin/databases/create-ip-attribute.md @@ -3,7 +3,7 @@ import io.appwrite.coroutines.CoroutineCallback import io.appwrite.services.Databases val client = Client() - .setEndpoint("https://cloud.appwrite.io/v1") // Your API Endpoint + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint .setProject("<YOUR_PROJECT_ID>") // Your project ID .setKey("<YOUR_API_KEY>") // Your secret API key diff --git a/docs/examples/kotlin/databases/create-relationship-attribute.md b/docs/examples/kotlin/databases/create-relationship-attribute.md index 4797b94..1bf6103 100644 --- a/docs/examples/kotlin/databases/create-relationship-attribute.md +++ b/docs/examples/kotlin/databases/create-relationship-attribute.md @@ -4,7 +4,7 @@ import io.appwrite.services.Databases import io.appwrite.enums.RelationshipType val client = Client() - .setEndpoint("https://cloud.appwrite.io/v1") // Your API Endpoint + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint .setProject("<YOUR_PROJECT_ID>") // Your project ID .setKey("<YOUR_API_KEY>") // Your secret API key diff --git a/docs/examples/kotlin/databases/create-string-attribute.md b/docs/examples/kotlin/databases/create-string-attribute.md index 06781f2..333cb76 100644 --- a/docs/examples/kotlin/databases/create-string-attribute.md +++ b/docs/examples/kotlin/databases/create-string-attribute.md @@ -3,7 +3,7 @@ import io.appwrite.coroutines.CoroutineCallback import io.appwrite.services.Databases val client = Client() - .setEndpoint("https://cloud.appwrite.io/v1") // Your API Endpoint + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint .setProject("<YOUR_PROJECT_ID>") // Your project ID .setKey("<YOUR_API_KEY>") // Your secret API key diff --git a/docs/examples/kotlin/databases/create-url-attribute.md b/docs/examples/kotlin/databases/create-url-attribute.md index 33cadc7..06057d4 100644 --- a/docs/examples/kotlin/databases/create-url-attribute.md +++ b/docs/examples/kotlin/databases/create-url-attribute.md @@ -3,7 +3,7 @@ import io.appwrite.coroutines.CoroutineCallback import io.appwrite.services.Databases val client = Client() - .setEndpoint("https://cloud.appwrite.io/v1") // Your API Endpoint + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint .setProject("<YOUR_PROJECT_ID>") // Your project ID .setKey("<YOUR_API_KEY>") // Your secret API key diff --git a/docs/examples/kotlin/databases/create.md b/docs/examples/kotlin/databases/create.md index c17246f..04c6480 100644 --- a/docs/examples/kotlin/databases/create.md +++ b/docs/examples/kotlin/databases/create.md @@ -3,7 +3,7 @@ import io.appwrite.coroutines.CoroutineCallback import io.appwrite.services.Databases val client = Client() - .setEndpoint("https://cloud.appwrite.io/v1") // Your API Endpoint + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint .setProject("<YOUR_PROJECT_ID>") // Your project ID .setKey("<YOUR_API_KEY>") // Your secret API key diff --git a/docs/examples/kotlin/databases/delete-attribute.md b/docs/examples/kotlin/databases/delete-attribute.md index 8fed2d8..9a25155 100644 --- a/docs/examples/kotlin/databases/delete-attribute.md +++ b/docs/examples/kotlin/databases/delete-attribute.md @@ -3,7 +3,7 @@ import io.appwrite.coroutines.CoroutineCallback import io.appwrite.services.Databases val client = Client() - .setEndpoint("https://cloud.appwrite.io/v1") // Your API Endpoint + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint .setProject("<YOUR_PROJECT_ID>") // Your project ID .setKey("<YOUR_API_KEY>") // Your secret API key diff --git a/docs/examples/kotlin/databases/delete-collection.md b/docs/examples/kotlin/databases/delete-collection.md index 2c85947..c46ca08 100644 --- a/docs/examples/kotlin/databases/delete-collection.md +++ b/docs/examples/kotlin/databases/delete-collection.md @@ -3,7 +3,7 @@ import io.appwrite.coroutines.CoroutineCallback import io.appwrite.services.Databases val client = Client() - .setEndpoint("https://cloud.appwrite.io/v1") // Your API Endpoint + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint .setProject("<YOUR_PROJECT_ID>") // Your project ID .setKey("<YOUR_API_KEY>") // Your secret API key diff --git a/docs/examples/kotlin/databases/delete-document.md b/docs/examples/kotlin/databases/delete-document.md index e920841..a9eea6b 100644 --- a/docs/examples/kotlin/databases/delete-document.md +++ b/docs/examples/kotlin/databases/delete-document.md @@ -3,7 +3,7 @@ import io.appwrite.coroutines.CoroutineCallback import io.appwrite.services.Databases val client = Client() - .setEndpoint("https://cloud.appwrite.io/v1") // Your API Endpoint + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint .setProject("<YOUR_PROJECT_ID>") // Your project ID .setSession("") // The user session to authenticate with diff --git a/docs/examples/kotlin/databases/delete-index.md b/docs/examples/kotlin/databases/delete-index.md index 8655b6b..37c75dc 100644 --- a/docs/examples/kotlin/databases/delete-index.md +++ b/docs/examples/kotlin/databases/delete-index.md @@ -3,7 +3,7 @@ import io.appwrite.coroutines.CoroutineCallback import io.appwrite.services.Databases val client = Client() - .setEndpoint("https://cloud.appwrite.io/v1") // Your API Endpoint + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint .setProject("<YOUR_PROJECT_ID>") // Your project ID .setKey("<YOUR_API_KEY>") // Your secret API key diff --git a/docs/examples/kotlin/databases/delete.md b/docs/examples/kotlin/databases/delete.md index 13c5660..0722569 100644 --- a/docs/examples/kotlin/databases/delete.md +++ b/docs/examples/kotlin/databases/delete.md @@ -3,7 +3,7 @@ import io.appwrite.coroutines.CoroutineCallback import io.appwrite.services.Databases val client = Client() - .setEndpoint("https://cloud.appwrite.io/v1") // Your API Endpoint + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint .setProject("<YOUR_PROJECT_ID>") // Your project ID .setKey("<YOUR_API_KEY>") // Your secret API key diff --git a/docs/examples/kotlin/databases/get-attribute.md b/docs/examples/kotlin/databases/get-attribute.md index 6a7ceb2..a59facd 100644 --- a/docs/examples/kotlin/databases/get-attribute.md +++ b/docs/examples/kotlin/databases/get-attribute.md @@ -3,7 +3,7 @@ import io.appwrite.coroutines.CoroutineCallback import io.appwrite.services.Databases val client = Client() - .setEndpoint("https://cloud.appwrite.io/v1") // Your API Endpoint + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint .setProject("<YOUR_PROJECT_ID>") // Your project ID .setKey("<YOUR_API_KEY>") // Your secret API key diff --git a/docs/examples/kotlin/databases/get-collection.md b/docs/examples/kotlin/databases/get-collection.md index 79980c5..7f6e578 100644 --- a/docs/examples/kotlin/databases/get-collection.md +++ b/docs/examples/kotlin/databases/get-collection.md @@ -3,7 +3,7 @@ import io.appwrite.coroutines.CoroutineCallback import io.appwrite.services.Databases val client = Client() - .setEndpoint("https://cloud.appwrite.io/v1") // Your API Endpoint + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint .setProject("<YOUR_PROJECT_ID>") // Your project ID .setKey("<YOUR_API_KEY>") // Your secret API key diff --git a/docs/examples/kotlin/databases/get-document.md b/docs/examples/kotlin/databases/get-document.md index 508e0da..d21a198 100644 --- a/docs/examples/kotlin/databases/get-document.md +++ b/docs/examples/kotlin/databases/get-document.md @@ -3,7 +3,7 @@ import io.appwrite.coroutines.CoroutineCallback import io.appwrite.services.Databases val client = Client() - .setEndpoint("https://cloud.appwrite.io/v1") // Your API Endpoint + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint .setProject("<YOUR_PROJECT_ID>") // Your project ID .setSession("") // The user session to authenticate with diff --git a/docs/examples/kotlin/databases/get-index.md b/docs/examples/kotlin/databases/get-index.md index 3935c38..39ac7af 100644 --- a/docs/examples/kotlin/databases/get-index.md +++ b/docs/examples/kotlin/databases/get-index.md @@ -3,7 +3,7 @@ import io.appwrite.coroutines.CoroutineCallback import io.appwrite.services.Databases val client = Client() - .setEndpoint("https://cloud.appwrite.io/v1") // Your API Endpoint + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint .setProject("<YOUR_PROJECT_ID>") // Your project ID .setKey("<YOUR_API_KEY>") // Your secret API key diff --git a/docs/examples/kotlin/databases/get.md b/docs/examples/kotlin/databases/get.md index bb6b17c..6ebb0c1 100644 --- a/docs/examples/kotlin/databases/get.md +++ b/docs/examples/kotlin/databases/get.md @@ -3,7 +3,7 @@ import io.appwrite.coroutines.CoroutineCallback import io.appwrite.services.Databases val client = Client() - .setEndpoint("https://cloud.appwrite.io/v1") // Your API Endpoint + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint .setProject("<YOUR_PROJECT_ID>") // Your project ID .setKey("<YOUR_API_KEY>") // Your secret API key diff --git a/docs/examples/kotlin/databases/list-attributes.md b/docs/examples/kotlin/databases/list-attributes.md index b3f26a2..5ddb0a6 100644 --- a/docs/examples/kotlin/databases/list-attributes.md +++ b/docs/examples/kotlin/databases/list-attributes.md @@ -3,7 +3,7 @@ import io.appwrite.coroutines.CoroutineCallback import io.appwrite.services.Databases val client = Client() - .setEndpoint("https://cloud.appwrite.io/v1") // Your API Endpoint + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint .setProject("<YOUR_PROJECT_ID>") // Your project ID .setKey("<YOUR_API_KEY>") // Your secret API key diff --git a/docs/examples/kotlin/databases/list-collections.md b/docs/examples/kotlin/databases/list-collections.md index 9bdfa6e..5340903 100644 --- a/docs/examples/kotlin/databases/list-collections.md +++ b/docs/examples/kotlin/databases/list-collections.md @@ -3,7 +3,7 @@ import io.appwrite.coroutines.CoroutineCallback import io.appwrite.services.Databases val client = Client() - .setEndpoint("https://cloud.appwrite.io/v1") // Your API Endpoint + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint .setProject("<YOUR_PROJECT_ID>") // Your project ID .setKey("<YOUR_API_KEY>") // Your secret API key diff --git a/docs/examples/kotlin/databases/list-documents.md b/docs/examples/kotlin/databases/list-documents.md index 90cef39..ed9cb31 100644 --- a/docs/examples/kotlin/databases/list-documents.md +++ b/docs/examples/kotlin/databases/list-documents.md @@ -3,7 +3,7 @@ import io.appwrite.coroutines.CoroutineCallback import io.appwrite.services.Databases val client = Client() - .setEndpoint("https://cloud.appwrite.io/v1") // Your API Endpoint + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint .setProject("<YOUR_PROJECT_ID>") // Your project ID .setSession("") // The user session to authenticate with diff --git a/docs/examples/kotlin/databases/list-indexes.md b/docs/examples/kotlin/databases/list-indexes.md index 6dd29ba..2ab2e6a 100644 --- a/docs/examples/kotlin/databases/list-indexes.md +++ b/docs/examples/kotlin/databases/list-indexes.md @@ -3,7 +3,7 @@ import io.appwrite.coroutines.CoroutineCallback import io.appwrite.services.Databases val client = Client() - .setEndpoint("https://cloud.appwrite.io/v1") // Your API Endpoint + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint .setProject("<YOUR_PROJECT_ID>") // Your project ID .setKey("<YOUR_API_KEY>") // Your secret API key diff --git a/docs/examples/kotlin/databases/list.md b/docs/examples/kotlin/databases/list.md index f7f332b..cd61a0e 100644 --- a/docs/examples/kotlin/databases/list.md +++ b/docs/examples/kotlin/databases/list.md @@ -3,7 +3,7 @@ import io.appwrite.coroutines.CoroutineCallback import io.appwrite.services.Databases val client = Client() - .setEndpoint("https://cloud.appwrite.io/v1") // Your API Endpoint + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint .setProject("<YOUR_PROJECT_ID>") // Your project ID .setKey("<YOUR_API_KEY>") // Your secret API key diff --git a/docs/examples/kotlin/databases/update-boolean-attribute.md b/docs/examples/kotlin/databases/update-boolean-attribute.md index ebffab7..4c9fd91 100644 --- a/docs/examples/kotlin/databases/update-boolean-attribute.md +++ b/docs/examples/kotlin/databases/update-boolean-attribute.md @@ -3,7 +3,7 @@ import io.appwrite.coroutines.CoroutineCallback import io.appwrite.services.Databases val client = Client() - .setEndpoint("https://cloud.appwrite.io/v1") // Your API Endpoint + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint .setProject("<YOUR_PROJECT_ID>") // Your project ID .setKey("<YOUR_API_KEY>") // Your secret API key diff --git a/docs/examples/kotlin/databases/update-collection.md b/docs/examples/kotlin/databases/update-collection.md index 7ceef84..bd42ba0 100644 --- a/docs/examples/kotlin/databases/update-collection.md +++ b/docs/examples/kotlin/databases/update-collection.md @@ -3,7 +3,7 @@ import io.appwrite.coroutines.CoroutineCallback import io.appwrite.services.Databases val client = Client() - .setEndpoint("https://cloud.appwrite.io/v1") // Your API Endpoint + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint .setProject("<YOUR_PROJECT_ID>") // Your project ID .setKey("<YOUR_API_KEY>") // Your secret API key diff --git a/docs/examples/kotlin/databases/update-datetime-attribute.md b/docs/examples/kotlin/databases/update-datetime-attribute.md index 676c779..082ae1c 100644 --- a/docs/examples/kotlin/databases/update-datetime-attribute.md +++ b/docs/examples/kotlin/databases/update-datetime-attribute.md @@ -3,7 +3,7 @@ import io.appwrite.coroutines.CoroutineCallback import io.appwrite.services.Databases val client = Client() - .setEndpoint("https://cloud.appwrite.io/v1") // Your API Endpoint + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint .setProject("<YOUR_PROJECT_ID>") // Your project ID .setKey("<YOUR_API_KEY>") // Your secret API key diff --git a/docs/examples/kotlin/databases/update-document.md b/docs/examples/kotlin/databases/update-document.md index 1737be1..4dd0349 100644 --- a/docs/examples/kotlin/databases/update-document.md +++ b/docs/examples/kotlin/databases/update-document.md @@ -3,7 +3,7 @@ import io.appwrite.coroutines.CoroutineCallback import io.appwrite.services.Databases val client = Client() - .setEndpoint("https://cloud.appwrite.io/v1") // Your API Endpoint + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint .setProject("<YOUR_PROJECT_ID>") // Your project ID .setSession("") // The user session to authenticate with diff --git a/docs/examples/kotlin/databases/update-email-attribute.md b/docs/examples/kotlin/databases/update-email-attribute.md index 2f1cbd2..026bd64 100644 --- a/docs/examples/kotlin/databases/update-email-attribute.md +++ b/docs/examples/kotlin/databases/update-email-attribute.md @@ -3,7 +3,7 @@ import io.appwrite.coroutines.CoroutineCallback import io.appwrite.services.Databases val client = Client() - .setEndpoint("https://cloud.appwrite.io/v1") // Your API Endpoint + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint .setProject("<YOUR_PROJECT_ID>") // Your project ID .setKey("<YOUR_API_KEY>") // Your secret API key diff --git a/docs/examples/kotlin/databases/update-enum-attribute.md b/docs/examples/kotlin/databases/update-enum-attribute.md index 7c0c92f..e68a29c 100644 --- a/docs/examples/kotlin/databases/update-enum-attribute.md +++ b/docs/examples/kotlin/databases/update-enum-attribute.md @@ -3,7 +3,7 @@ import io.appwrite.coroutines.CoroutineCallback import io.appwrite.services.Databases val client = Client() - .setEndpoint("https://cloud.appwrite.io/v1") // Your API Endpoint + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint .setProject("<YOUR_PROJECT_ID>") // Your project ID .setKey("<YOUR_API_KEY>") // Your secret API key diff --git a/docs/examples/kotlin/databases/update-float-attribute.md b/docs/examples/kotlin/databases/update-float-attribute.md index 3d0485f..58b1107 100644 --- a/docs/examples/kotlin/databases/update-float-attribute.md +++ b/docs/examples/kotlin/databases/update-float-attribute.md @@ -3,7 +3,7 @@ import io.appwrite.coroutines.CoroutineCallback import io.appwrite.services.Databases val client = Client() - .setEndpoint("https://cloud.appwrite.io/v1") // Your API Endpoint + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint .setProject("<YOUR_PROJECT_ID>") // Your project ID .setKey("<YOUR_API_KEY>") // Your secret API key diff --git a/docs/examples/kotlin/databases/update-integer-attribute.md b/docs/examples/kotlin/databases/update-integer-attribute.md index 249972d..a00dcf9 100644 --- a/docs/examples/kotlin/databases/update-integer-attribute.md +++ b/docs/examples/kotlin/databases/update-integer-attribute.md @@ -3,7 +3,7 @@ import io.appwrite.coroutines.CoroutineCallback import io.appwrite.services.Databases val client = Client() - .setEndpoint("https://cloud.appwrite.io/v1") // Your API Endpoint + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint .setProject("<YOUR_PROJECT_ID>") // Your project ID .setKey("<YOUR_API_KEY>") // Your secret API key diff --git a/docs/examples/kotlin/databases/update-ip-attribute.md b/docs/examples/kotlin/databases/update-ip-attribute.md index bfc0cdd..505e5ea 100644 --- a/docs/examples/kotlin/databases/update-ip-attribute.md +++ b/docs/examples/kotlin/databases/update-ip-attribute.md @@ -3,7 +3,7 @@ import io.appwrite.coroutines.CoroutineCallback import io.appwrite.services.Databases val client = Client() - .setEndpoint("https://cloud.appwrite.io/v1") // Your API Endpoint + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint .setProject("<YOUR_PROJECT_ID>") // Your project ID .setKey("<YOUR_API_KEY>") // Your secret API key diff --git a/docs/examples/kotlin/databases/update-relationship-attribute.md b/docs/examples/kotlin/databases/update-relationship-attribute.md index ab12195..001dd1a 100644 --- a/docs/examples/kotlin/databases/update-relationship-attribute.md +++ b/docs/examples/kotlin/databases/update-relationship-attribute.md @@ -3,7 +3,7 @@ import io.appwrite.coroutines.CoroutineCallback import io.appwrite.services.Databases val client = Client() - .setEndpoint("https://cloud.appwrite.io/v1") // Your API Endpoint + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint .setProject("<YOUR_PROJECT_ID>") // Your project ID .setKey("<YOUR_API_KEY>") // Your secret API key diff --git a/docs/examples/kotlin/databases/update-string-attribute.md b/docs/examples/kotlin/databases/update-string-attribute.md index 32e17be..364a6b5 100644 --- a/docs/examples/kotlin/databases/update-string-attribute.md +++ b/docs/examples/kotlin/databases/update-string-attribute.md @@ -3,7 +3,7 @@ import io.appwrite.coroutines.CoroutineCallback import io.appwrite.services.Databases val client = Client() - .setEndpoint("https://cloud.appwrite.io/v1") // Your API Endpoint + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint .setProject("<YOUR_PROJECT_ID>") // Your project ID .setKey("<YOUR_API_KEY>") // Your secret API key diff --git a/docs/examples/kotlin/databases/update-url-attribute.md b/docs/examples/kotlin/databases/update-url-attribute.md index 7835113..a628cc5 100644 --- a/docs/examples/kotlin/databases/update-url-attribute.md +++ b/docs/examples/kotlin/databases/update-url-attribute.md @@ -3,7 +3,7 @@ import io.appwrite.coroutines.CoroutineCallback import io.appwrite.services.Databases val client = Client() - .setEndpoint("https://cloud.appwrite.io/v1") // Your API Endpoint + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint .setProject("<YOUR_PROJECT_ID>") // Your project ID .setKey("<YOUR_API_KEY>") // Your secret API key diff --git a/docs/examples/kotlin/databases/update.md b/docs/examples/kotlin/databases/update.md index 7da795c..05f8327 100644 --- a/docs/examples/kotlin/databases/update.md +++ b/docs/examples/kotlin/databases/update.md @@ -3,7 +3,7 @@ import io.appwrite.coroutines.CoroutineCallback import io.appwrite.services.Databases val client = Client() - .setEndpoint("https://cloud.appwrite.io/v1") // Your API Endpoint + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint .setProject("<YOUR_PROJECT_ID>") // Your project ID .setKey("<YOUR_API_KEY>") // Your secret API key diff --git a/docs/examples/kotlin/functions/create-build.md b/docs/examples/kotlin/functions/create-build.md index 6d20586..f835d93 100644 --- a/docs/examples/kotlin/functions/create-build.md +++ b/docs/examples/kotlin/functions/create-build.md @@ -3,7 +3,7 @@ import io.appwrite.coroutines.CoroutineCallback import io.appwrite.services.Functions val client = Client() - .setEndpoint("https://cloud.appwrite.io/v1") // Your API Endpoint + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint .setProject("<YOUR_PROJECT_ID>") // Your project ID .setKey("<YOUR_API_KEY>") // Your secret API key diff --git a/docs/examples/kotlin/functions/create-deployment.md b/docs/examples/kotlin/functions/create-deployment.md index aba8f0c..ddc6e8b 100644 --- a/docs/examples/kotlin/functions/create-deployment.md +++ b/docs/examples/kotlin/functions/create-deployment.md @@ -4,7 +4,7 @@ import io.appwrite.models.InputFile import io.appwrite.services.Functions val client = Client() - .setEndpoint("https://cloud.appwrite.io/v1") // Your API Endpoint + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint .setProject("<YOUR_PROJECT_ID>") // Your project ID .setKey("<YOUR_API_KEY>") // Your secret API key diff --git a/docs/examples/kotlin/functions/create-execution.md b/docs/examples/kotlin/functions/create-execution.md index 4226745..94bfa23 100644 --- a/docs/examples/kotlin/functions/create-execution.md +++ b/docs/examples/kotlin/functions/create-execution.md @@ -3,7 +3,7 @@ import io.appwrite.coroutines.CoroutineCallback import io.appwrite.services.Functions val client = Client() - .setEndpoint("https://cloud.appwrite.io/v1") // Your API Endpoint + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint .setProject("<YOUR_PROJECT_ID>") // Your project ID .setSession("") // The user session to authenticate with diff --git a/docs/examples/kotlin/functions/create-variable.md b/docs/examples/kotlin/functions/create-variable.md index e5d33b4..5dff26f 100644 --- a/docs/examples/kotlin/functions/create-variable.md +++ b/docs/examples/kotlin/functions/create-variable.md @@ -3,7 +3,7 @@ import io.appwrite.coroutines.CoroutineCallback import io.appwrite.services.Functions val client = Client() - .setEndpoint("https://cloud.appwrite.io/v1") // Your API Endpoint + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint .setProject("<YOUR_PROJECT_ID>") // Your project ID .setKey("<YOUR_API_KEY>") // Your secret API key diff --git a/docs/examples/kotlin/functions/create.md b/docs/examples/kotlin/functions/create.md index d94bdf6..7278878 100644 --- a/docs/examples/kotlin/functions/create.md +++ b/docs/examples/kotlin/functions/create.md @@ -4,7 +4,7 @@ import io.appwrite.services.Functions import io.appwrite.enums.Runtime val client = Client() - .setEndpoint("https://cloud.appwrite.io/v1") // Your API Endpoint + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint .setProject("<YOUR_PROJECT_ID>") // Your project ID .setKey("<YOUR_API_KEY>") // Your secret API key diff --git a/docs/examples/kotlin/functions/delete-deployment.md b/docs/examples/kotlin/functions/delete-deployment.md index 9e4e476..937fc96 100644 --- a/docs/examples/kotlin/functions/delete-deployment.md +++ b/docs/examples/kotlin/functions/delete-deployment.md @@ -3,7 +3,7 @@ import io.appwrite.coroutines.CoroutineCallback import io.appwrite.services.Functions val client = Client() - .setEndpoint("https://cloud.appwrite.io/v1") // Your API Endpoint + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint .setProject("<YOUR_PROJECT_ID>") // Your project ID .setKey("<YOUR_API_KEY>") // Your secret API key diff --git a/docs/examples/kotlin/functions/delete-execution.md b/docs/examples/kotlin/functions/delete-execution.md index eb1f59e..95994f8 100644 --- a/docs/examples/kotlin/functions/delete-execution.md +++ b/docs/examples/kotlin/functions/delete-execution.md @@ -3,7 +3,7 @@ import io.appwrite.coroutines.CoroutineCallback import io.appwrite.services.Functions val client = Client() - .setEndpoint("https://cloud.appwrite.io/v1") // Your API Endpoint + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint .setProject("<YOUR_PROJECT_ID>") // Your project ID .setKey("<YOUR_API_KEY>") // Your secret API key diff --git a/docs/examples/kotlin/functions/delete-variable.md b/docs/examples/kotlin/functions/delete-variable.md index 912e769..e179367 100644 --- a/docs/examples/kotlin/functions/delete-variable.md +++ b/docs/examples/kotlin/functions/delete-variable.md @@ -3,7 +3,7 @@ import io.appwrite.coroutines.CoroutineCallback import io.appwrite.services.Functions val client = Client() - .setEndpoint("https://cloud.appwrite.io/v1") // Your API Endpoint + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint .setProject("<YOUR_PROJECT_ID>") // Your project ID .setKey("<YOUR_API_KEY>") // Your secret API key diff --git a/docs/examples/kotlin/functions/delete.md b/docs/examples/kotlin/functions/delete.md index 97f0b00..9651744 100644 --- a/docs/examples/kotlin/functions/delete.md +++ b/docs/examples/kotlin/functions/delete.md @@ -3,7 +3,7 @@ import io.appwrite.coroutines.CoroutineCallback import io.appwrite.services.Functions val client = Client() - .setEndpoint("https://cloud.appwrite.io/v1") // Your API Endpoint + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint .setProject("<YOUR_PROJECT_ID>") // Your project ID .setKey("<YOUR_API_KEY>") // Your secret API key diff --git a/docs/examples/kotlin/functions/get-deployment-download.md b/docs/examples/kotlin/functions/get-deployment-download.md index 13dec6a..5e9558e 100644 --- a/docs/examples/kotlin/functions/get-deployment-download.md +++ b/docs/examples/kotlin/functions/get-deployment-download.md @@ -3,7 +3,7 @@ import io.appwrite.coroutines.CoroutineCallback import io.appwrite.services.Functions val client = Client() - .setEndpoint("https://cloud.appwrite.io/v1") // Your API Endpoint + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint .setProject("<YOUR_PROJECT_ID>") // Your project ID .setKey("<YOUR_API_KEY>") // Your secret API key diff --git a/docs/examples/kotlin/functions/get-deployment.md b/docs/examples/kotlin/functions/get-deployment.md index e844328..eba4abb 100644 --- a/docs/examples/kotlin/functions/get-deployment.md +++ b/docs/examples/kotlin/functions/get-deployment.md @@ -3,7 +3,7 @@ import io.appwrite.coroutines.CoroutineCallback import io.appwrite.services.Functions val client = Client() - .setEndpoint("https://cloud.appwrite.io/v1") // Your API Endpoint + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint .setProject("<YOUR_PROJECT_ID>") // Your project ID .setKey("<YOUR_API_KEY>") // Your secret API key diff --git a/docs/examples/kotlin/functions/get-execution.md b/docs/examples/kotlin/functions/get-execution.md index 5f981bf..480dbb7 100644 --- a/docs/examples/kotlin/functions/get-execution.md +++ b/docs/examples/kotlin/functions/get-execution.md @@ -3,7 +3,7 @@ import io.appwrite.coroutines.CoroutineCallback import io.appwrite.services.Functions val client = Client() - .setEndpoint("https://cloud.appwrite.io/v1") // Your API Endpoint + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint .setProject("<YOUR_PROJECT_ID>") // Your project ID .setSession("") // The user session to authenticate with diff --git a/docs/examples/kotlin/functions/get-variable.md b/docs/examples/kotlin/functions/get-variable.md index 8d6ee38..95359ef 100644 --- a/docs/examples/kotlin/functions/get-variable.md +++ b/docs/examples/kotlin/functions/get-variable.md @@ -3,7 +3,7 @@ import io.appwrite.coroutines.CoroutineCallback import io.appwrite.services.Functions val client = Client() - .setEndpoint("https://cloud.appwrite.io/v1") // Your API Endpoint + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint .setProject("<YOUR_PROJECT_ID>") // Your project ID .setKey("<YOUR_API_KEY>") // Your secret API key diff --git a/docs/examples/kotlin/functions/get.md b/docs/examples/kotlin/functions/get.md index f56d8b9..162fa22 100644 --- a/docs/examples/kotlin/functions/get.md +++ b/docs/examples/kotlin/functions/get.md @@ -3,7 +3,7 @@ import io.appwrite.coroutines.CoroutineCallback import io.appwrite.services.Functions val client = Client() - .setEndpoint("https://cloud.appwrite.io/v1") // Your API Endpoint + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint .setProject("<YOUR_PROJECT_ID>") // Your project ID .setKey("<YOUR_API_KEY>") // Your secret API key diff --git a/docs/examples/kotlin/functions/list-deployments.md b/docs/examples/kotlin/functions/list-deployments.md index cf7deff..9318442 100644 --- a/docs/examples/kotlin/functions/list-deployments.md +++ b/docs/examples/kotlin/functions/list-deployments.md @@ -3,7 +3,7 @@ import io.appwrite.coroutines.CoroutineCallback import io.appwrite.services.Functions val client = Client() - .setEndpoint("https://cloud.appwrite.io/v1") // Your API Endpoint + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint .setProject("<YOUR_PROJECT_ID>") // Your project ID .setKey("<YOUR_API_KEY>") // Your secret API key diff --git a/docs/examples/kotlin/functions/list-executions.md b/docs/examples/kotlin/functions/list-executions.md index 8f4546c..9f85f67 100644 --- a/docs/examples/kotlin/functions/list-executions.md +++ b/docs/examples/kotlin/functions/list-executions.md @@ -3,7 +3,7 @@ import io.appwrite.coroutines.CoroutineCallback import io.appwrite.services.Functions val client = Client() - .setEndpoint("https://cloud.appwrite.io/v1") // Your API Endpoint + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint .setProject("<YOUR_PROJECT_ID>") // Your project ID .setSession("") // The user session to authenticate with diff --git a/docs/examples/kotlin/functions/list-runtimes.md b/docs/examples/kotlin/functions/list-runtimes.md index a464156..5b3673b 100644 --- a/docs/examples/kotlin/functions/list-runtimes.md +++ b/docs/examples/kotlin/functions/list-runtimes.md @@ -3,7 +3,7 @@ import io.appwrite.coroutines.CoroutineCallback import io.appwrite.services.Functions val client = Client() - .setEndpoint("https://cloud.appwrite.io/v1") // Your API Endpoint + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint .setProject("<YOUR_PROJECT_ID>") // Your project ID .setKey("<YOUR_API_KEY>") // Your secret API key diff --git a/docs/examples/kotlin/functions/list-specifications.md b/docs/examples/kotlin/functions/list-specifications.md index 8d86aa6..0b2fb46 100644 --- a/docs/examples/kotlin/functions/list-specifications.md +++ b/docs/examples/kotlin/functions/list-specifications.md @@ -3,7 +3,7 @@ import io.appwrite.coroutines.CoroutineCallback import io.appwrite.services.Functions val client = Client() - .setEndpoint("https://cloud.appwrite.io/v1") // Your API Endpoint + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint .setProject("<YOUR_PROJECT_ID>") // Your project ID .setKey("<YOUR_API_KEY>") // Your secret API key diff --git a/docs/examples/kotlin/functions/list-variables.md b/docs/examples/kotlin/functions/list-variables.md index 4876517..7f576e8 100644 --- a/docs/examples/kotlin/functions/list-variables.md +++ b/docs/examples/kotlin/functions/list-variables.md @@ -3,7 +3,7 @@ import io.appwrite.coroutines.CoroutineCallback import io.appwrite.services.Functions val client = Client() - .setEndpoint("https://cloud.appwrite.io/v1") // Your API Endpoint + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint .setProject("<YOUR_PROJECT_ID>") // Your project ID .setKey("<YOUR_API_KEY>") // Your secret API key diff --git a/docs/examples/kotlin/functions/list.md b/docs/examples/kotlin/functions/list.md index 9a58501..b10fdff 100644 --- a/docs/examples/kotlin/functions/list.md +++ b/docs/examples/kotlin/functions/list.md @@ -3,7 +3,7 @@ import io.appwrite.coroutines.CoroutineCallback import io.appwrite.services.Functions val client = Client() - .setEndpoint("https://cloud.appwrite.io/v1") // Your API Endpoint + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint .setProject("<YOUR_PROJECT_ID>") // Your project ID .setKey("<YOUR_API_KEY>") // Your secret API key diff --git a/docs/examples/kotlin/functions/update-deployment-build.md b/docs/examples/kotlin/functions/update-deployment-build.md index 6adb07a..839bbe6 100644 --- a/docs/examples/kotlin/functions/update-deployment-build.md +++ b/docs/examples/kotlin/functions/update-deployment-build.md @@ -3,7 +3,7 @@ import io.appwrite.coroutines.CoroutineCallback import io.appwrite.services.Functions val client = Client() - .setEndpoint("https://cloud.appwrite.io/v1") // Your API Endpoint + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint .setProject("<YOUR_PROJECT_ID>") // Your project ID .setKey("<YOUR_API_KEY>") // Your secret API key diff --git a/docs/examples/kotlin/functions/update-deployment.md b/docs/examples/kotlin/functions/update-deployment.md index fb95b08..cf020d6 100644 --- a/docs/examples/kotlin/functions/update-deployment.md +++ b/docs/examples/kotlin/functions/update-deployment.md @@ -3,7 +3,7 @@ import io.appwrite.coroutines.CoroutineCallback import io.appwrite.services.Functions val client = Client() - .setEndpoint("https://cloud.appwrite.io/v1") // Your API Endpoint + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint .setProject("<YOUR_PROJECT_ID>") // Your project ID .setKey("<YOUR_API_KEY>") // Your secret API key diff --git a/docs/examples/kotlin/functions/update-variable.md b/docs/examples/kotlin/functions/update-variable.md index db9438c..ed6e4ff 100644 --- a/docs/examples/kotlin/functions/update-variable.md +++ b/docs/examples/kotlin/functions/update-variable.md @@ -3,7 +3,7 @@ import io.appwrite.coroutines.CoroutineCallback import io.appwrite.services.Functions val client = Client() - .setEndpoint("https://cloud.appwrite.io/v1") // Your API Endpoint + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint .setProject("<YOUR_PROJECT_ID>") // Your project ID .setKey("<YOUR_API_KEY>") // Your secret API key diff --git a/docs/examples/kotlin/functions/update.md b/docs/examples/kotlin/functions/update.md index d36c761..7f0b33e 100644 --- a/docs/examples/kotlin/functions/update.md +++ b/docs/examples/kotlin/functions/update.md @@ -3,7 +3,7 @@ import io.appwrite.coroutines.CoroutineCallback import io.appwrite.services.Functions val client = Client() - .setEndpoint("https://cloud.appwrite.io/v1") // Your API Endpoint + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint .setProject("<YOUR_PROJECT_ID>") // Your project ID .setKey("<YOUR_API_KEY>") // Your secret API key diff --git a/docs/examples/kotlin/graphql/mutation.md b/docs/examples/kotlin/graphql/mutation.md index d4d2fd2..98081ab 100644 --- a/docs/examples/kotlin/graphql/mutation.md +++ b/docs/examples/kotlin/graphql/mutation.md @@ -3,7 +3,7 @@ import io.appwrite.coroutines.CoroutineCallback import io.appwrite.services.Graphql val client = Client() - .setEndpoint("https://cloud.appwrite.io/v1") // Your API Endpoint + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint .setProject("<YOUR_PROJECT_ID>") // Your project ID .setKey("<YOUR_API_KEY>") // Your secret API key diff --git a/docs/examples/kotlin/graphql/query.md b/docs/examples/kotlin/graphql/query.md index 79457c1..dec8dd3 100644 --- a/docs/examples/kotlin/graphql/query.md +++ b/docs/examples/kotlin/graphql/query.md @@ -3,7 +3,7 @@ import io.appwrite.coroutines.CoroutineCallback import io.appwrite.services.Graphql val client = Client() - .setEndpoint("https://cloud.appwrite.io/v1") // Your API Endpoint + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint .setProject("<YOUR_PROJECT_ID>") // Your project ID .setKey("<YOUR_API_KEY>") // Your secret API key diff --git a/docs/examples/kotlin/health/get-antivirus.md b/docs/examples/kotlin/health/get-antivirus.md index c840725..869b4c4 100644 --- a/docs/examples/kotlin/health/get-antivirus.md +++ b/docs/examples/kotlin/health/get-antivirus.md @@ -3,7 +3,7 @@ import io.appwrite.coroutines.CoroutineCallback import io.appwrite.services.Health val client = Client() - .setEndpoint("https://cloud.appwrite.io/v1") // Your API Endpoint + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint .setProject("<YOUR_PROJECT_ID>") // Your project ID .setKey("<YOUR_API_KEY>") // Your secret API key diff --git a/docs/examples/kotlin/health/get-cache.md b/docs/examples/kotlin/health/get-cache.md index 20ddb89..8b72ec4 100644 --- a/docs/examples/kotlin/health/get-cache.md +++ b/docs/examples/kotlin/health/get-cache.md @@ -3,7 +3,7 @@ import io.appwrite.coroutines.CoroutineCallback import io.appwrite.services.Health val client = Client() - .setEndpoint("https://cloud.appwrite.io/v1") // Your API Endpoint + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint .setProject("<YOUR_PROJECT_ID>") // Your project ID .setKey("<YOUR_API_KEY>") // Your secret API key diff --git a/docs/examples/kotlin/health/get-certificate.md b/docs/examples/kotlin/health/get-certificate.md index 714a270..74bf618 100644 --- a/docs/examples/kotlin/health/get-certificate.md +++ b/docs/examples/kotlin/health/get-certificate.md @@ -3,7 +3,7 @@ import io.appwrite.coroutines.CoroutineCallback import io.appwrite.services.Health val client = Client() - .setEndpoint("https://cloud.appwrite.io/v1") // Your API Endpoint + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint .setProject("<YOUR_PROJECT_ID>") // Your project ID .setKey("<YOUR_API_KEY>") // Your secret API key diff --git a/docs/examples/kotlin/health/get-d-b.md b/docs/examples/kotlin/health/get-d-b.md index c707be3..a55a114 100644 --- a/docs/examples/kotlin/health/get-d-b.md +++ b/docs/examples/kotlin/health/get-d-b.md @@ -3,7 +3,7 @@ import io.appwrite.coroutines.CoroutineCallback import io.appwrite.services.Health val client = Client() - .setEndpoint("https://cloud.appwrite.io/v1") // Your API Endpoint + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint .setProject("<YOUR_PROJECT_ID>") // Your project ID .setKey("<YOUR_API_KEY>") // Your secret API key diff --git a/docs/examples/kotlin/health/get-failed-jobs.md b/docs/examples/kotlin/health/get-failed-jobs.md index 5c5497a..027df12 100644 --- a/docs/examples/kotlin/health/get-failed-jobs.md +++ b/docs/examples/kotlin/health/get-failed-jobs.md @@ -4,7 +4,7 @@ import io.appwrite.services.Health import io.appwrite.enums.Name val client = Client() - .setEndpoint("https://cloud.appwrite.io/v1") // Your API Endpoint + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint .setProject("<YOUR_PROJECT_ID>") // Your project ID .setKey("<YOUR_API_KEY>") // Your secret API key diff --git a/docs/examples/kotlin/health/get-pub-sub.md b/docs/examples/kotlin/health/get-pub-sub.md index 8a69bc7..53c3820 100644 --- a/docs/examples/kotlin/health/get-pub-sub.md +++ b/docs/examples/kotlin/health/get-pub-sub.md @@ -3,7 +3,7 @@ import io.appwrite.coroutines.CoroutineCallback import io.appwrite.services.Health val client = Client() - .setEndpoint("https://cloud.appwrite.io/v1") // Your API Endpoint + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint .setProject("<YOUR_PROJECT_ID>") // Your project ID .setKey("<YOUR_API_KEY>") // Your secret API key diff --git a/docs/examples/kotlin/health/get-queue-builds.md b/docs/examples/kotlin/health/get-queue-builds.md index 4d0cb3a..371aad9 100644 --- a/docs/examples/kotlin/health/get-queue-builds.md +++ b/docs/examples/kotlin/health/get-queue-builds.md @@ -3,7 +3,7 @@ import io.appwrite.coroutines.CoroutineCallback import io.appwrite.services.Health val client = Client() - .setEndpoint("https://cloud.appwrite.io/v1") // Your API Endpoint + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint .setProject("<YOUR_PROJECT_ID>") // Your project ID .setKey("<YOUR_API_KEY>") // Your secret API key diff --git a/docs/examples/kotlin/health/get-queue-certificates.md b/docs/examples/kotlin/health/get-queue-certificates.md index 1b07df6..5c6adee 100644 --- a/docs/examples/kotlin/health/get-queue-certificates.md +++ b/docs/examples/kotlin/health/get-queue-certificates.md @@ -3,7 +3,7 @@ import io.appwrite.coroutines.CoroutineCallback import io.appwrite.services.Health val client = Client() - .setEndpoint("https://cloud.appwrite.io/v1") // Your API Endpoint + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint .setProject("<YOUR_PROJECT_ID>") // Your project ID .setKey("<YOUR_API_KEY>") // Your secret API key diff --git a/docs/examples/kotlin/health/get-queue-databases.md b/docs/examples/kotlin/health/get-queue-databases.md index fb1dce6..3a34058 100644 --- a/docs/examples/kotlin/health/get-queue-databases.md +++ b/docs/examples/kotlin/health/get-queue-databases.md @@ -3,7 +3,7 @@ import io.appwrite.coroutines.CoroutineCallback import io.appwrite.services.Health val client = Client() - .setEndpoint("https://cloud.appwrite.io/v1") // Your API Endpoint + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint .setProject("<YOUR_PROJECT_ID>") // Your project ID .setKey("<YOUR_API_KEY>") // Your secret API key diff --git a/docs/examples/kotlin/health/get-queue-deletes.md b/docs/examples/kotlin/health/get-queue-deletes.md index d3f1186..5d0b8a3 100644 --- a/docs/examples/kotlin/health/get-queue-deletes.md +++ b/docs/examples/kotlin/health/get-queue-deletes.md @@ -3,7 +3,7 @@ import io.appwrite.coroutines.CoroutineCallback import io.appwrite.services.Health val client = Client() - .setEndpoint("https://cloud.appwrite.io/v1") // Your API Endpoint + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint .setProject("<YOUR_PROJECT_ID>") // Your project ID .setKey("<YOUR_API_KEY>") // Your secret API key diff --git a/docs/examples/kotlin/health/get-queue-functions.md b/docs/examples/kotlin/health/get-queue-functions.md index 2a04595..7a42b61 100644 --- a/docs/examples/kotlin/health/get-queue-functions.md +++ b/docs/examples/kotlin/health/get-queue-functions.md @@ -3,7 +3,7 @@ import io.appwrite.coroutines.CoroutineCallback import io.appwrite.services.Health val client = Client() - .setEndpoint("https://cloud.appwrite.io/v1") // Your API Endpoint + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint .setProject("<YOUR_PROJECT_ID>") // Your project ID .setKey("<YOUR_API_KEY>") // Your secret API key diff --git a/docs/examples/kotlin/health/get-queue-logs.md b/docs/examples/kotlin/health/get-queue-logs.md index 6467a39..151025b 100644 --- a/docs/examples/kotlin/health/get-queue-logs.md +++ b/docs/examples/kotlin/health/get-queue-logs.md @@ -3,7 +3,7 @@ import io.appwrite.coroutines.CoroutineCallback import io.appwrite.services.Health val client = Client() - .setEndpoint("https://cloud.appwrite.io/v1") // Your API Endpoint + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint .setProject("<YOUR_PROJECT_ID>") // Your project ID .setKey("<YOUR_API_KEY>") // Your secret API key diff --git a/docs/examples/kotlin/health/get-queue-mails.md b/docs/examples/kotlin/health/get-queue-mails.md index 143dc40..f5a905d 100644 --- a/docs/examples/kotlin/health/get-queue-mails.md +++ b/docs/examples/kotlin/health/get-queue-mails.md @@ -3,7 +3,7 @@ import io.appwrite.coroutines.CoroutineCallback import io.appwrite.services.Health val client = Client() - .setEndpoint("https://cloud.appwrite.io/v1") // Your API Endpoint + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint .setProject("<YOUR_PROJECT_ID>") // Your project ID .setKey("<YOUR_API_KEY>") // Your secret API key diff --git a/docs/examples/kotlin/health/get-queue-messaging.md b/docs/examples/kotlin/health/get-queue-messaging.md index e85e425..4a83792 100644 --- a/docs/examples/kotlin/health/get-queue-messaging.md +++ b/docs/examples/kotlin/health/get-queue-messaging.md @@ -3,7 +3,7 @@ import io.appwrite.coroutines.CoroutineCallback import io.appwrite.services.Health val client = Client() - .setEndpoint("https://cloud.appwrite.io/v1") // Your API Endpoint + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint .setProject("<YOUR_PROJECT_ID>") // Your project ID .setKey("<YOUR_API_KEY>") // Your secret API key diff --git a/docs/examples/kotlin/health/get-queue-migrations.md b/docs/examples/kotlin/health/get-queue-migrations.md index f287e78..853d294 100644 --- a/docs/examples/kotlin/health/get-queue-migrations.md +++ b/docs/examples/kotlin/health/get-queue-migrations.md @@ -3,7 +3,7 @@ import io.appwrite.coroutines.CoroutineCallback import io.appwrite.services.Health val client = Client() - .setEndpoint("https://cloud.appwrite.io/v1") // Your API Endpoint + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint .setProject("<YOUR_PROJECT_ID>") // Your project ID .setKey("<YOUR_API_KEY>") // Your secret API key diff --git a/docs/examples/kotlin/health/get-queue-stats-resources.md b/docs/examples/kotlin/health/get-queue-stats-resources.md index ac95abc..6a76f52 100644 --- a/docs/examples/kotlin/health/get-queue-stats-resources.md +++ b/docs/examples/kotlin/health/get-queue-stats-resources.md @@ -3,7 +3,7 @@ import io.appwrite.coroutines.CoroutineCallback import io.appwrite.services.Health val client = Client() - .setEndpoint("https://cloud.appwrite.io/v1") // Your API Endpoint + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint .setProject("<YOUR_PROJECT_ID>") // Your project ID .setKey("<YOUR_API_KEY>") // Your secret API key diff --git a/docs/examples/kotlin/health/get-queue-usage.md b/docs/examples/kotlin/health/get-queue-usage.md index fcfcf10..e344b9e 100644 --- a/docs/examples/kotlin/health/get-queue-usage.md +++ b/docs/examples/kotlin/health/get-queue-usage.md @@ -3,7 +3,7 @@ import io.appwrite.coroutines.CoroutineCallback import io.appwrite.services.Health val client = Client() - .setEndpoint("https://cloud.appwrite.io/v1") // Your API Endpoint + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint .setProject("<YOUR_PROJECT_ID>") // Your project ID .setKey("<YOUR_API_KEY>") // Your secret API key diff --git a/docs/examples/kotlin/health/get-queue-webhooks.md b/docs/examples/kotlin/health/get-queue-webhooks.md index 6452f1a..f5ffc58 100644 --- a/docs/examples/kotlin/health/get-queue-webhooks.md +++ b/docs/examples/kotlin/health/get-queue-webhooks.md @@ -3,7 +3,7 @@ import io.appwrite.coroutines.CoroutineCallback import io.appwrite.services.Health val client = Client() - .setEndpoint("https://cloud.appwrite.io/v1") // Your API Endpoint + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint .setProject("<YOUR_PROJECT_ID>") // Your project ID .setKey("<YOUR_API_KEY>") // Your secret API key diff --git a/docs/examples/kotlin/health/get-storage-local.md b/docs/examples/kotlin/health/get-storage-local.md index b2c9987..32a21ae 100644 --- a/docs/examples/kotlin/health/get-storage-local.md +++ b/docs/examples/kotlin/health/get-storage-local.md @@ -3,7 +3,7 @@ import io.appwrite.coroutines.CoroutineCallback import io.appwrite.services.Health val client = Client() - .setEndpoint("https://cloud.appwrite.io/v1") // Your API Endpoint + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint .setProject("<YOUR_PROJECT_ID>") // Your project ID .setKey("<YOUR_API_KEY>") // Your secret API key diff --git a/docs/examples/kotlin/health/get-storage.md b/docs/examples/kotlin/health/get-storage.md index 7038ee2..8af609a 100644 --- a/docs/examples/kotlin/health/get-storage.md +++ b/docs/examples/kotlin/health/get-storage.md @@ -3,7 +3,7 @@ import io.appwrite.coroutines.CoroutineCallback import io.appwrite.services.Health val client = Client() - .setEndpoint("https://cloud.appwrite.io/v1") // Your API Endpoint + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint .setProject("<YOUR_PROJECT_ID>") // Your project ID .setKey("<YOUR_API_KEY>") // Your secret API key diff --git a/docs/examples/kotlin/health/get-time.md b/docs/examples/kotlin/health/get-time.md index 7c50ae4..8054ed7 100644 --- a/docs/examples/kotlin/health/get-time.md +++ b/docs/examples/kotlin/health/get-time.md @@ -3,7 +3,7 @@ import io.appwrite.coroutines.CoroutineCallback import io.appwrite.services.Health val client = Client() - .setEndpoint("https://cloud.appwrite.io/v1") // Your API Endpoint + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint .setProject("<YOUR_PROJECT_ID>") // Your project ID .setKey("<YOUR_API_KEY>") // Your secret API key diff --git a/docs/examples/kotlin/health/get.md b/docs/examples/kotlin/health/get.md index c53445f..0845320 100644 --- a/docs/examples/kotlin/health/get.md +++ b/docs/examples/kotlin/health/get.md @@ -3,7 +3,7 @@ import io.appwrite.coroutines.CoroutineCallback import io.appwrite.services.Health val client = Client() - .setEndpoint("https://cloud.appwrite.io/v1") // Your API Endpoint + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint .setProject("<YOUR_PROJECT_ID>") // Your project ID .setKey("<YOUR_API_KEY>") // Your secret API key diff --git a/docs/examples/kotlin/locale/get.md b/docs/examples/kotlin/locale/get.md index b8dc768..6840259 100644 --- a/docs/examples/kotlin/locale/get.md +++ b/docs/examples/kotlin/locale/get.md @@ -3,7 +3,7 @@ import io.appwrite.coroutines.CoroutineCallback import io.appwrite.services.Locale val client = Client() - .setEndpoint("https://cloud.appwrite.io/v1") // Your API Endpoint + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint .setProject("<YOUR_PROJECT_ID>") // Your project ID .setSession("") // The user session to authenticate with diff --git a/docs/examples/kotlin/locale/list-codes.md b/docs/examples/kotlin/locale/list-codes.md index 784e688..fd0c4e4 100644 --- a/docs/examples/kotlin/locale/list-codes.md +++ b/docs/examples/kotlin/locale/list-codes.md @@ -3,7 +3,7 @@ import io.appwrite.coroutines.CoroutineCallback import io.appwrite.services.Locale val client = Client() - .setEndpoint("https://cloud.appwrite.io/v1") // Your API Endpoint + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint .setProject("<YOUR_PROJECT_ID>") // Your project ID .setSession("") // The user session to authenticate with diff --git a/docs/examples/kotlin/locale/list-continents.md b/docs/examples/kotlin/locale/list-continents.md index 6cad16e..699d599 100644 --- a/docs/examples/kotlin/locale/list-continents.md +++ b/docs/examples/kotlin/locale/list-continents.md @@ -3,7 +3,7 @@ import io.appwrite.coroutines.CoroutineCallback import io.appwrite.services.Locale val client = Client() - .setEndpoint("https://cloud.appwrite.io/v1") // Your API Endpoint + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint .setProject("<YOUR_PROJECT_ID>") // Your project ID .setSession("") // The user session to authenticate with diff --git a/docs/examples/kotlin/locale/list-countries-e-u.md b/docs/examples/kotlin/locale/list-countries-e-u.md index cfec468..13e86f3 100644 --- a/docs/examples/kotlin/locale/list-countries-e-u.md +++ b/docs/examples/kotlin/locale/list-countries-e-u.md @@ -3,7 +3,7 @@ import io.appwrite.coroutines.CoroutineCallback import io.appwrite.services.Locale val client = Client() - .setEndpoint("https://cloud.appwrite.io/v1") // Your API Endpoint + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint .setProject("<YOUR_PROJECT_ID>") // Your project ID .setSession("") // The user session to authenticate with diff --git a/docs/examples/kotlin/locale/list-countries-phones.md b/docs/examples/kotlin/locale/list-countries-phones.md index 06585ad..b660ccf 100644 --- a/docs/examples/kotlin/locale/list-countries-phones.md +++ b/docs/examples/kotlin/locale/list-countries-phones.md @@ -3,7 +3,7 @@ import io.appwrite.coroutines.CoroutineCallback import io.appwrite.services.Locale val client = Client() - .setEndpoint("https://cloud.appwrite.io/v1") // Your API Endpoint + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint .setProject("<YOUR_PROJECT_ID>") // Your project ID .setSession("") // The user session to authenticate with diff --git a/docs/examples/kotlin/locale/list-countries.md b/docs/examples/kotlin/locale/list-countries.md index 7789bbe..3457ceb 100644 --- a/docs/examples/kotlin/locale/list-countries.md +++ b/docs/examples/kotlin/locale/list-countries.md @@ -3,7 +3,7 @@ import io.appwrite.coroutines.CoroutineCallback import io.appwrite.services.Locale val client = Client() - .setEndpoint("https://cloud.appwrite.io/v1") // Your API Endpoint + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint .setProject("<YOUR_PROJECT_ID>") // Your project ID .setSession("") // The user session to authenticate with diff --git a/docs/examples/kotlin/locale/list-currencies.md b/docs/examples/kotlin/locale/list-currencies.md index 6c7f709..80b2cc7 100644 --- a/docs/examples/kotlin/locale/list-currencies.md +++ b/docs/examples/kotlin/locale/list-currencies.md @@ -3,7 +3,7 @@ import io.appwrite.coroutines.CoroutineCallback import io.appwrite.services.Locale val client = Client() - .setEndpoint("https://cloud.appwrite.io/v1") // Your API Endpoint + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint .setProject("<YOUR_PROJECT_ID>") // Your project ID .setSession("") // The user session to authenticate with diff --git a/docs/examples/kotlin/locale/list-languages.md b/docs/examples/kotlin/locale/list-languages.md index a20096e..b36c138 100644 --- a/docs/examples/kotlin/locale/list-languages.md +++ b/docs/examples/kotlin/locale/list-languages.md @@ -3,7 +3,7 @@ import io.appwrite.coroutines.CoroutineCallback import io.appwrite.services.Locale val client = Client() - .setEndpoint("https://cloud.appwrite.io/v1") // Your API Endpoint + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint .setProject("<YOUR_PROJECT_ID>") // Your project ID .setSession("") // The user session to authenticate with diff --git a/docs/examples/kotlin/messaging/create-apns-provider.md b/docs/examples/kotlin/messaging/create-apns-provider.md index 8a58fe8..a19cbe2 100644 --- a/docs/examples/kotlin/messaging/create-apns-provider.md +++ b/docs/examples/kotlin/messaging/create-apns-provider.md @@ -3,7 +3,7 @@ import io.appwrite.coroutines.CoroutineCallback import io.appwrite.services.Messaging val client = Client() - .setEndpoint("https://cloud.appwrite.io/v1") // Your API Endpoint + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint .setProject("<YOUR_PROJECT_ID>") // Your project ID .setKey("<YOUR_API_KEY>") // Your secret API key diff --git a/docs/examples/kotlin/messaging/create-email.md b/docs/examples/kotlin/messaging/create-email.md index 02b0651..f0f41e9 100644 --- a/docs/examples/kotlin/messaging/create-email.md +++ b/docs/examples/kotlin/messaging/create-email.md @@ -3,7 +3,7 @@ import io.appwrite.coroutines.CoroutineCallback import io.appwrite.services.Messaging val client = Client() - .setEndpoint("https://cloud.appwrite.io/v1") // Your API Endpoint + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint .setProject("<YOUR_PROJECT_ID>") // Your project ID .setKey("<YOUR_API_KEY>") // Your secret API key diff --git a/docs/examples/kotlin/messaging/create-fcm-provider.md b/docs/examples/kotlin/messaging/create-fcm-provider.md index 779596c..c1a077c 100644 --- a/docs/examples/kotlin/messaging/create-fcm-provider.md +++ b/docs/examples/kotlin/messaging/create-fcm-provider.md @@ -3,7 +3,7 @@ import io.appwrite.coroutines.CoroutineCallback import io.appwrite.services.Messaging val client = Client() - .setEndpoint("https://cloud.appwrite.io/v1") // Your API Endpoint + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint .setProject("<YOUR_PROJECT_ID>") // Your project ID .setKey("<YOUR_API_KEY>") // Your secret API key diff --git a/docs/examples/kotlin/messaging/create-mailgun-provider.md b/docs/examples/kotlin/messaging/create-mailgun-provider.md index a73a27f..d205171 100644 --- a/docs/examples/kotlin/messaging/create-mailgun-provider.md +++ b/docs/examples/kotlin/messaging/create-mailgun-provider.md @@ -3,7 +3,7 @@ import io.appwrite.coroutines.CoroutineCallback import io.appwrite.services.Messaging val client = Client() - .setEndpoint("https://cloud.appwrite.io/v1") // Your API Endpoint + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint .setProject("<YOUR_PROJECT_ID>") // Your project ID .setKey("<YOUR_API_KEY>") // Your secret API key diff --git a/docs/examples/kotlin/messaging/create-msg91provider.md b/docs/examples/kotlin/messaging/create-msg91provider.md index 31eb606..5ea3d22 100644 --- a/docs/examples/kotlin/messaging/create-msg91provider.md +++ b/docs/examples/kotlin/messaging/create-msg91provider.md @@ -3,7 +3,7 @@ import io.appwrite.coroutines.CoroutineCallback import io.appwrite.services.Messaging val client = Client() - .setEndpoint("https://cloud.appwrite.io/v1") // Your API Endpoint + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint .setProject("<YOUR_PROJECT_ID>") // Your project ID .setKey("<YOUR_API_KEY>") // Your secret API key diff --git a/docs/examples/kotlin/messaging/create-push.md b/docs/examples/kotlin/messaging/create-push.md index f92a49d..5b07f53 100644 --- a/docs/examples/kotlin/messaging/create-push.md +++ b/docs/examples/kotlin/messaging/create-push.md @@ -3,7 +3,7 @@ import io.appwrite.coroutines.CoroutineCallback import io.appwrite.services.Messaging val client = Client() - .setEndpoint("https://cloud.appwrite.io/v1") // Your API Endpoint + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint .setProject("<YOUR_PROJECT_ID>") // Your project ID .setKey("<YOUR_API_KEY>") // Your secret API key diff --git a/docs/examples/kotlin/messaging/create-sendgrid-provider.md b/docs/examples/kotlin/messaging/create-sendgrid-provider.md index 34f61c9..e96a052 100644 --- a/docs/examples/kotlin/messaging/create-sendgrid-provider.md +++ b/docs/examples/kotlin/messaging/create-sendgrid-provider.md @@ -3,7 +3,7 @@ import io.appwrite.coroutines.CoroutineCallback import io.appwrite.services.Messaging val client = Client() - .setEndpoint("https://cloud.appwrite.io/v1") // Your API Endpoint + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint .setProject("<YOUR_PROJECT_ID>") // Your project ID .setKey("<YOUR_API_KEY>") // Your secret API key diff --git a/docs/examples/kotlin/messaging/create-sms.md b/docs/examples/kotlin/messaging/create-sms.md index 6fbcffb..4918529 100644 --- a/docs/examples/kotlin/messaging/create-sms.md +++ b/docs/examples/kotlin/messaging/create-sms.md @@ -3,7 +3,7 @@ import io.appwrite.coroutines.CoroutineCallback import io.appwrite.services.Messaging val client = Client() - .setEndpoint("https://cloud.appwrite.io/v1") // Your API Endpoint + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint .setProject("<YOUR_PROJECT_ID>") // Your project ID .setKey("<YOUR_API_KEY>") // Your secret API key diff --git a/docs/examples/kotlin/messaging/create-smtp-provider.md b/docs/examples/kotlin/messaging/create-smtp-provider.md index 17643dc..ae3b667 100644 --- a/docs/examples/kotlin/messaging/create-smtp-provider.md +++ b/docs/examples/kotlin/messaging/create-smtp-provider.md @@ -3,7 +3,7 @@ import io.appwrite.coroutines.CoroutineCallback import io.appwrite.services.Messaging val client = Client() - .setEndpoint("https://cloud.appwrite.io/v1") // Your API Endpoint + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint .setProject("<YOUR_PROJECT_ID>") // Your project ID .setKey("<YOUR_API_KEY>") // Your secret API key diff --git a/docs/examples/kotlin/messaging/create-subscriber.md b/docs/examples/kotlin/messaging/create-subscriber.md index 805cd58..44e3a72 100644 --- a/docs/examples/kotlin/messaging/create-subscriber.md +++ b/docs/examples/kotlin/messaging/create-subscriber.md @@ -3,7 +3,7 @@ import io.appwrite.coroutines.CoroutineCallback import io.appwrite.services.Messaging val client = Client() - .setEndpoint("https://cloud.appwrite.io/v1") // Your API Endpoint + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint .setProject("<YOUR_PROJECT_ID>") // Your project ID .setJWT("<YOUR_JWT>") // Your secret JSON Web Token diff --git a/docs/examples/kotlin/messaging/create-telesign-provider.md b/docs/examples/kotlin/messaging/create-telesign-provider.md index 1d44fca..cddd6d8 100644 --- a/docs/examples/kotlin/messaging/create-telesign-provider.md +++ b/docs/examples/kotlin/messaging/create-telesign-provider.md @@ -3,7 +3,7 @@ import io.appwrite.coroutines.CoroutineCallback import io.appwrite.services.Messaging val client = Client() - .setEndpoint("https://cloud.appwrite.io/v1") // Your API Endpoint + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint .setProject("<YOUR_PROJECT_ID>") // Your project ID .setKey("<YOUR_API_KEY>") // Your secret API key diff --git a/docs/examples/kotlin/messaging/create-textmagic-provider.md b/docs/examples/kotlin/messaging/create-textmagic-provider.md index d88b9bb..12eb62d 100644 --- a/docs/examples/kotlin/messaging/create-textmagic-provider.md +++ b/docs/examples/kotlin/messaging/create-textmagic-provider.md @@ -3,7 +3,7 @@ import io.appwrite.coroutines.CoroutineCallback import io.appwrite.services.Messaging val client = Client() - .setEndpoint("https://cloud.appwrite.io/v1") // Your API Endpoint + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint .setProject("<YOUR_PROJECT_ID>") // Your project ID .setKey("<YOUR_API_KEY>") // Your secret API key diff --git a/docs/examples/kotlin/messaging/create-topic.md b/docs/examples/kotlin/messaging/create-topic.md index 6a6b9bd..570be33 100644 --- a/docs/examples/kotlin/messaging/create-topic.md +++ b/docs/examples/kotlin/messaging/create-topic.md @@ -3,7 +3,7 @@ import io.appwrite.coroutines.CoroutineCallback import io.appwrite.services.Messaging val client = Client() - .setEndpoint("https://cloud.appwrite.io/v1") // Your API Endpoint + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint .setProject("<YOUR_PROJECT_ID>") // Your project ID .setKey("<YOUR_API_KEY>") // Your secret API key diff --git a/docs/examples/kotlin/messaging/create-twilio-provider.md b/docs/examples/kotlin/messaging/create-twilio-provider.md index 3df99e9..c05b835 100644 --- a/docs/examples/kotlin/messaging/create-twilio-provider.md +++ b/docs/examples/kotlin/messaging/create-twilio-provider.md @@ -3,7 +3,7 @@ import io.appwrite.coroutines.CoroutineCallback import io.appwrite.services.Messaging val client = Client() - .setEndpoint("https://cloud.appwrite.io/v1") // Your API Endpoint + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint .setProject("<YOUR_PROJECT_ID>") // Your project ID .setKey("<YOUR_API_KEY>") // Your secret API key diff --git a/docs/examples/kotlin/messaging/create-vonage-provider.md b/docs/examples/kotlin/messaging/create-vonage-provider.md index 59e5d14..7e049d8 100644 --- a/docs/examples/kotlin/messaging/create-vonage-provider.md +++ b/docs/examples/kotlin/messaging/create-vonage-provider.md @@ -3,7 +3,7 @@ import io.appwrite.coroutines.CoroutineCallback import io.appwrite.services.Messaging val client = Client() - .setEndpoint("https://cloud.appwrite.io/v1") // Your API Endpoint + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint .setProject("<YOUR_PROJECT_ID>") // Your project ID .setKey("<YOUR_API_KEY>") // Your secret API key diff --git a/docs/examples/kotlin/messaging/delete-provider.md b/docs/examples/kotlin/messaging/delete-provider.md index 3ecd64d..4989da8 100644 --- a/docs/examples/kotlin/messaging/delete-provider.md +++ b/docs/examples/kotlin/messaging/delete-provider.md @@ -3,7 +3,7 @@ import io.appwrite.coroutines.CoroutineCallback import io.appwrite.services.Messaging val client = Client() - .setEndpoint("https://cloud.appwrite.io/v1") // Your API Endpoint + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint .setProject("<YOUR_PROJECT_ID>") // Your project ID .setKey("<YOUR_API_KEY>") // Your secret API key diff --git a/docs/examples/kotlin/messaging/delete-subscriber.md b/docs/examples/kotlin/messaging/delete-subscriber.md index 4a7c18f..0f99f25 100644 --- a/docs/examples/kotlin/messaging/delete-subscriber.md +++ b/docs/examples/kotlin/messaging/delete-subscriber.md @@ -3,7 +3,7 @@ import io.appwrite.coroutines.CoroutineCallback import io.appwrite.services.Messaging val client = Client() - .setEndpoint("https://cloud.appwrite.io/v1") // Your API Endpoint + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint .setProject("<YOUR_PROJECT_ID>") // Your project ID .setJWT("<YOUR_JWT>") // Your secret JSON Web Token diff --git a/docs/examples/kotlin/messaging/delete-topic.md b/docs/examples/kotlin/messaging/delete-topic.md index 4859c0a..8a52c9f 100644 --- a/docs/examples/kotlin/messaging/delete-topic.md +++ b/docs/examples/kotlin/messaging/delete-topic.md @@ -3,7 +3,7 @@ import io.appwrite.coroutines.CoroutineCallback import io.appwrite.services.Messaging val client = Client() - .setEndpoint("https://cloud.appwrite.io/v1") // Your API Endpoint + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint .setProject("<YOUR_PROJECT_ID>") // Your project ID .setKey("<YOUR_API_KEY>") // Your secret API key diff --git a/docs/examples/kotlin/messaging/delete.md b/docs/examples/kotlin/messaging/delete.md index 0b925ca..7e4ec51 100644 --- a/docs/examples/kotlin/messaging/delete.md +++ b/docs/examples/kotlin/messaging/delete.md @@ -3,7 +3,7 @@ import io.appwrite.coroutines.CoroutineCallback import io.appwrite.services.Messaging val client = Client() - .setEndpoint("https://cloud.appwrite.io/v1") // Your API Endpoint + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint .setProject("<YOUR_PROJECT_ID>") // Your project ID .setKey("<YOUR_API_KEY>") // Your secret API key diff --git a/docs/examples/kotlin/messaging/get-message.md b/docs/examples/kotlin/messaging/get-message.md index 01db389..710d356 100644 --- a/docs/examples/kotlin/messaging/get-message.md +++ b/docs/examples/kotlin/messaging/get-message.md @@ -3,7 +3,7 @@ import io.appwrite.coroutines.CoroutineCallback import io.appwrite.services.Messaging val client = Client() - .setEndpoint("https://cloud.appwrite.io/v1") // Your API Endpoint + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint .setProject("<YOUR_PROJECT_ID>") // Your project ID .setKey("<YOUR_API_KEY>") // Your secret API key diff --git a/docs/examples/kotlin/messaging/get-provider.md b/docs/examples/kotlin/messaging/get-provider.md index 53e5cf3..c678d4d 100644 --- a/docs/examples/kotlin/messaging/get-provider.md +++ b/docs/examples/kotlin/messaging/get-provider.md @@ -3,7 +3,7 @@ import io.appwrite.coroutines.CoroutineCallback import io.appwrite.services.Messaging val client = Client() - .setEndpoint("https://cloud.appwrite.io/v1") // Your API Endpoint + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint .setProject("<YOUR_PROJECT_ID>") // Your project ID .setKey("<YOUR_API_KEY>") // Your secret API key diff --git a/docs/examples/kotlin/messaging/get-subscriber.md b/docs/examples/kotlin/messaging/get-subscriber.md index 036f17f..59b335a 100644 --- a/docs/examples/kotlin/messaging/get-subscriber.md +++ b/docs/examples/kotlin/messaging/get-subscriber.md @@ -3,7 +3,7 @@ import io.appwrite.coroutines.CoroutineCallback import io.appwrite.services.Messaging val client = Client() - .setEndpoint("https://cloud.appwrite.io/v1") // Your API Endpoint + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint .setProject("<YOUR_PROJECT_ID>") // Your project ID .setKey("<YOUR_API_KEY>") // Your secret API key diff --git a/docs/examples/kotlin/messaging/get-topic.md b/docs/examples/kotlin/messaging/get-topic.md index 09d3688..c189898 100644 --- a/docs/examples/kotlin/messaging/get-topic.md +++ b/docs/examples/kotlin/messaging/get-topic.md @@ -3,7 +3,7 @@ import io.appwrite.coroutines.CoroutineCallback import io.appwrite.services.Messaging val client = Client() - .setEndpoint("https://cloud.appwrite.io/v1") // Your API Endpoint + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint .setProject("<YOUR_PROJECT_ID>") // Your project ID .setKey("<YOUR_API_KEY>") // Your secret API key diff --git a/docs/examples/kotlin/messaging/list-message-logs.md b/docs/examples/kotlin/messaging/list-message-logs.md index 3048904..e1463f8 100644 --- a/docs/examples/kotlin/messaging/list-message-logs.md +++ b/docs/examples/kotlin/messaging/list-message-logs.md @@ -3,7 +3,7 @@ import io.appwrite.coroutines.CoroutineCallback import io.appwrite.services.Messaging val client = Client() - .setEndpoint("https://cloud.appwrite.io/v1") // Your API Endpoint + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint .setProject("<YOUR_PROJECT_ID>") // Your project ID .setKey("<YOUR_API_KEY>") // Your secret API key diff --git a/docs/examples/kotlin/messaging/list-messages.md b/docs/examples/kotlin/messaging/list-messages.md index e9e509e..618f8c4 100644 --- a/docs/examples/kotlin/messaging/list-messages.md +++ b/docs/examples/kotlin/messaging/list-messages.md @@ -3,7 +3,7 @@ import io.appwrite.coroutines.CoroutineCallback import io.appwrite.services.Messaging val client = Client() - .setEndpoint("https://cloud.appwrite.io/v1") // Your API Endpoint + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint .setProject("<YOUR_PROJECT_ID>") // Your project ID .setKey("<YOUR_API_KEY>") // Your secret API key diff --git a/docs/examples/kotlin/messaging/list-provider-logs.md b/docs/examples/kotlin/messaging/list-provider-logs.md index e0a52cb..ab0a9f1 100644 --- a/docs/examples/kotlin/messaging/list-provider-logs.md +++ b/docs/examples/kotlin/messaging/list-provider-logs.md @@ -3,7 +3,7 @@ import io.appwrite.coroutines.CoroutineCallback import io.appwrite.services.Messaging val client = Client() - .setEndpoint("https://cloud.appwrite.io/v1") // Your API Endpoint + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint .setProject("<YOUR_PROJECT_ID>") // Your project ID .setKey("<YOUR_API_KEY>") // Your secret API key diff --git a/docs/examples/kotlin/messaging/list-providers.md b/docs/examples/kotlin/messaging/list-providers.md index 66439e2..34c70a9 100644 --- a/docs/examples/kotlin/messaging/list-providers.md +++ b/docs/examples/kotlin/messaging/list-providers.md @@ -3,7 +3,7 @@ import io.appwrite.coroutines.CoroutineCallback import io.appwrite.services.Messaging val client = Client() - .setEndpoint("https://cloud.appwrite.io/v1") // Your API Endpoint + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint .setProject("<YOUR_PROJECT_ID>") // Your project ID .setKey("<YOUR_API_KEY>") // Your secret API key diff --git a/docs/examples/kotlin/messaging/list-subscriber-logs.md b/docs/examples/kotlin/messaging/list-subscriber-logs.md index 5472d5f..8a82af8 100644 --- a/docs/examples/kotlin/messaging/list-subscriber-logs.md +++ b/docs/examples/kotlin/messaging/list-subscriber-logs.md @@ -3,7 +3,7 @@ import io.appwrite.coroutines.CoroutineCallback import io.appwrite.services.Messaging val client = Client() - .setEndpoint("https://cloud.appwrite.io/v1") // Your API Endpoint + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint .setProject("<YOUR_PROJECT_ID>") // Your project ID .setKey("<YOUR_API_KEY>") // Your secret API key diff --git a/docs/examples/kotlin/messaging/list-subscribers.md b/docs/examples/kotlin/messaging/list-subscribers.md index a95e854..acf5249 100644 --- a/docs/examples/kotlin/messaging/list-subscribers.md +++ b/docs/examples/kotlin/messaging/list-subscribers.md @@ -3,7 +3,7 @@ import io.appwrite.coroutines.CoroutineCallback import io.appwrite.services.Messaging val client = Client() - .setEndpoint("https://cloud.appwrite.io/v1") // Your API Endpoint + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint .setProject("<YOUR_PROJECT_ID>") // Your project ID .setKey("<YOUR_API_KEY>") // Your secret API key diff --git a/docs/examples/kotlin/messaging/list-targets.md b/docs/examples/kotlin/messaging/list-targets.md index a99e822..ad500f0 100644 --- a/docs/examples/kotlin/messaging/list-targets.md +++ b/docs/examples/kotlin/messaging/list-targets.md @@ -3,7 +3,7 @@ import io.appwrite.coroutines.CoroutineCallback import io.appwrite.services.Messaging val client = Client() - .setEndpoint("https://cloud.appwrite.io/v1") // Your API Endpoint + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint .setProject("<YOUR_PROJECT_ID>") // Your project ID .setKey("<YOUR_API_KEY>") // Your secret API key diff --git a/docs/examples/kotlin/messaging/list-topic-logs.md b/docs/examples/kotlin/messaging/list-topic-logs.md index 7b7d2f0..683b418 100644 --- a/docs/examples/kotlin/messaging/list-topic-logs.md +++ b/docs/examples/kotlin/messaging/list-topic-logs.md @@ -3,7 +3,7 @@ import io.appwrite.coroutines.CoroutineCallback import io.appwrite.services.Messaging val client = Client() - .setEndpoint("https://cloud.appwrite.io/v1") // Your API Endpoint + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint .setProject("<YOUR_PROJECT_ID>") // Your project ID .setKey("<YOUR_API_KEY>") // Your secret API key diff --git a/docs/examples/kotlin/messaging/list-topics.md b/docs/examples/kotlin/messaging/list-topics.md index 4550f1e..125c6ff 100644 --- a/docs/examples/kotlin/messaging/list-topics.md +++ b/docs/examples/kotlin/messaging/list-topics.md @@ -3,7 +3,7 @@ import io.appwrite.coroutines.CoroutineCallback import io.appwrite.services.Messaging val client = Client() - .setEndpoint("https://cloud.appwrite.io/v1") // Your API Endpoint + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint .setProject("<YOUR_PROJECT_ID>") // Your project ID .setKey("<YOUR_API_KEY>") // Your secret API key diff --git a/docs/examples/kotlin/messaging/update-apns-provider.md b/docs/examples/kotlin/messaging/update-apns-provider.md index 83a6083..d0d5a07 100644 --- a/docs/examples/kotlin/messaging/update-apns-provider.md +++ b/docs/examples/kotlin/messaging/update-apns-provider.md @@ -3,7 +3,7 @@ import io.appwrite.coroutines.CoroutineCallback import io.appwrite.services.Messaging val client = Client() - .setEndpoint("https://cloud.appwrite.io/v1") // Your API Endpoint + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint .setProject("<YOUR_PROJECT_ID>") // Your project ID .setKey("<YOUR_API_KEY>") // Your secret API key diff --git a/docs/examples/kotlin/messaging/update-email.md b/docs/examples/kotlin/messaging/update-email.md index 29baf18..cd74bb4 100644 --- a/docs/examples/kotlin/messaging/update-email.md +++ b/docs/examples/kotlin/messaging/update-email.md @@ -3,7 +3,7 @@ import io.appwrite.coroutines.CoroutineCallback import io.appwrite.services.Messaging val client = Client() - .setEndpoint("https://cloud.appwrite.io/v1") // Your API Endpoint + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint .setProject("<YOUR_PROJECT_ID>") // Your project ID .setKey("<YOUR_API_KEY>") // Your secret API key diff --git a/docs/examples/kotlin/messaging/update-fcm-provider.md b/docs/examples/kotlin/messaging/update-fcm-provider.md index 4d8534c..477e718 100644 --- a/docs/examples/kotlin/messaging/update-fcm-provider.md +++ b/docs/examples/kotlin/messaging/update-fcm-provider.md @@ -3,7 +3,7 @@ import io.appwrite.coroutines.CoroutineCallback import io.appwrite.services.Messaging val client = Client() - .setEndpoint("https://cloud.appwrite.io/v1") // Your API Endpoint + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint .setProject("<YOUR_PROJECT_ID>") // Your project ID .setKey("<YOUR_API_KEY>") // Your secret API key diff --git a/docs/examples/kotlin/messaging/update-mailgun-provider.md b/docs/examples/kotlin/messaging/update-mailgun-provider.md index 9caff42..4bec8d2 100644 --- a/docs/examples/kotlin/messaging/update-mailgun-provider.md +++ b/docs/examples/kotlin/messaging/update-mailgun-provider.md @@ -3,7 +3,7 @@ import io.appwrite.coroutines.CoroutineCallback import io.appwrite.services.Messaging val client = Client() - .setEndpoint("https://cloud.appwrite.io/v1") // Your API Endpoint + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint .setProject("<YOUR_PROJECT_ID>") // Your project ID .setKey("<YOUR_API_KEY>") // Your secret API key diff --git a/docs/examples/kotlin/messaging/update-msg91provider.md b/docs/examples/kotlin/messaging/update-msg91provider.md index 1a6a0b4..3abaca7 100644 --- a/docs/examples/kotlin/messaging/update-msg91provider.md +++ b/docs/examples/kotlin/messaging/update-msg91provider.md @@ -3,7 +3,7 @@ import io.appwrite.coroutines.CoroutineCallback import io.appwrite.services.Messaging val client = Client() - .setEndpoint("https://cloud.appwrite.io/v1") // Your API Endpoint + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint .setProject("<YOUR_PROJECT_ID>") // Your project ID .setKey("<YOUR_API_KEY>") // Your secret API key diff --git a/docs/examples/kotlin/messaging/update-push.md b/docs/examples/kotlin/messaging/update-push.md index 0ba72c4..710a37e 100644 --- a/docs/examples/kotlin/messaging/update-push.md +++ b/docs/examples/kotlin/messaging/update-push.md @@ -3,7 +3,7 @@ import io.appwrite.coroutines.CoroutineCallback import io.appwrite.services.Messaging val client = Client() - .setEndpoint("https://cloud.appwrite.io/v1") // Your API Endpoint + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint .setProject("<YOUR_PROJECT_ID>") // Your project ID .setKey("<YOUR_API_KEY>") // Your secret API key diff --git a/docs/examples/kotlin/messaging/update-sendgrid-provider.md b/docs/examples/kotlin/messaging/update-sendgrid-provider.md index 353cbd0..962aa69 100644 --- a/docs/examples/kotlin/messaging/update-sendgrid-provider.md +++ b/docs/examples/kotlin/messaging/update-sendgrid-provider.md @@ -3,7 +3,7 @@ import io.appwrite.coroutines.CoroutineCallback import io.appwrite.services.Messaging val client = Client() - .setEndpoint("https://cloud.appwrite.io/v1") // Your API Endpoint + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint .setProject("<YOUR_PROJECT_ID>") // Your project ID .setKey("<YOUR_API_KEY>") // Your secret API key diff --git a/docs/examples/kotlin/messaging/update-sms.md b/docs/examples/kotlin/messaging/update-sms.md index 7f008e8..3d08b8a 100644 --- a/docs/examples/kotlin/messaging/update-sms.md +++ b/docs/examples/kotlin/messaging/update-sms.md @@ -3,7 +3,7 @@ import io.appwrite.coroutines.CoroutineCallback import io.appwrite.services.Messaging val client = Client() - .setEndpoint("https://cloud.appwrite.io/v1") // Your API Endpoint + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint .setProject("<YOUR_PROJECT_ID>") // Your project ID .setKey("<YOUR_API_KEY>") // Your secret API key diff --git a/docs/examples/kotlin/messaging/update-smtp-provider.md b/docs/examples/kotlin/messaging/update-smtp-provider.md index 465d76b..cb74586 100644 --- a/docs/examples/kotlin/messaging/update-smtp-provider.md +++ b/docs/examples/kotlin/messaging/update-smtp-provider.md @@ -3,7 +3,7 @@ import io.appwrite.coroutines.CoroutineCallback import io.appwrite.services.Messaging val client = Client() - .setEndpoint("https://cloud.appwrite.io/v1") // Your API Endpoint + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint .setProject("<YOUR_PROJECT_ID>") // Your project ID .setKey("<YOUR_API_KEY>") // Your secret API key diff --git a/docs/examples/kotlin/messaging/update-telesign-provider.md b/docs/examples/kotlin/messaging/update-telesign-provider.md index 9a4d93e..83fb11a 100644 --- a/docs/examples/kotlin/messaging/update-telesign-provider.md +++ b/docs/examples/kotlin/messaging/update-telesign-provider.md @@ -3,7 +3,7 @@ import io.appwrite.coroutines.CoroutineCallback import io.appwrite.services.Messaging val client = Client() - .setEndpoint("https://cloud.appwrite.io/v1") // Your API Endpoint + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint .setProject("<YOUR_PROJECT_ID>") // Your project ID .setKey("<YOUR_API_KEY>") // Your secret API key diff --git a/docs/examples/kotlin/messaging/update-textmagic-provider.md b/docs/examples/kotlin/messaging/update-textmagic-provider.md index 14e8ac5..1e2ee1e 100644 --- a/docs/examples/kotlin/messaging/update-textmagic-provider.md +++ b/docs/examples/kotlin/messaging/update-textmagic-provider.md @@ -3,7 +3,7 @@ import io.appwrite.coroutines.CoroutineCallback import io.appwrite.services.Messaging val client = Client() - .setEndpoint("https://cloud.appwrite.io/v1") // Your API Endpoint + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint .setProject("<YOUR_PROJECT_ID>") // Your project ID .setKey("<YOUR_API_KEY>") // Your secret API key diff --git a/docs/examples/kotlin/messaging/update-topic.md b/docs/examples/kotlin/messaging/update-topic.md index 68e8949..0991fd0 100644 --- a/docs/examples/kotlin/messaging/update-topic.md +++ b/docs/examples/kotlin/messaging/update-topic.md @@ -3,7 +3,7 @@ import io.appwrite.coroutines.CoroutineCallback import io.appwrite.services.Messaging val client = Client() - .setEndpoint("https://cloud.appwrite.io/v1") // Your API Endpoint + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint .setProject("<YOUR_PROJECT_ID>") // Your project ID .setKey("<YOUR_API_KEY>") // Your secret API key diff --git a/docs/examples/kotlin/messaging/update-twilio-provider.md b/docs/examples/kotlin/messaging/update-twilio-provider.md index 2c7a5e8..1c86f9e 100644 --- a/docs/examples/kotlin/messaging/update-twilio-provider.md +++ b/docs/examples/kotlin/messaging/update-twilio-provider.md @@ -3,7 +3,7 @@ import io.appwrite.coroutines.CoroutineCallback import io.appwrite.services.Messaging val client = Client() - .setEndpoint("https://cloud.appwrite.io/v1") // Your API Endpoint + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint .setProject("<YOUR_PROJECT_ID>") // Your project ID .setKey("<YOUR_API_KEY>") // Your secret API key diff --git a/docs/examples/kotlin/messaging/update-vonage-provider.md b/docs/examples/kotlin/messaging/update-vonage-provider.md index 4d432f7..bf0ee2b 100644 --- a/docs/examples/kotlin/messaging/update-vonage-provider.md +++ b/docs/examples/kotlin/messaging/update-vonage-provider.md @@ -3,7 +3,7 @@ import io.appwrite.coroutines.CoroutineCallback import io.appwrite.services.Messaging val client = Client() - .setEndpoint("https://cloud.appwrite.io/v1") // Your API Endpoint + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint .setProject("<YOUR_PROJECT_ID>") // Your project ID .setKey("<YOUR_API_KEY>") // Your secret API key diff --git a/docs/examples/kotlin/storage/create-bucket.md b/docs/examples/kotlin/storage/create-bucket.md index 0c0119e..0bca827 100644 --- a/docs/examples/kotlin/storage/create-bucket.md +++ b/docs/examples/kotlin/storage/create-bucket.md @@ -3,7 +3,7 @@ import io.appwrite.coroutines.CoroutineCallback import io.appwrite.services.Storage val client = Client() - .setEndpoint("https://cloud.appwrite.io/v1") // Your API Endpoint + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint .setProject("<YOUR_PROJECT_ID>") // Your project ID .setKey("<YOUR_API_KEY>") // Your secret API key diff --git a/docs/examples/kotlin/storage/create-file.md b/docs/examples/kotlin/storage/create-file.md index a2203ff..b22b32a 100644 --- a/docs/examples/kotlin/storage/create-file.md +++ b/docs/examples/kotlin/storage/create-file.md @@ -4,7 +4,7 @@ import io.appwrite.models.InputFile import io.appwrite.services.Storage val client = Client() - .setEndpoint("https://cloud.appwrite.io/v1") // Your API Endpoint + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint .setProject("<YOUR_PROJECT_ID>") // Your project ID .setSession("") // The user session to authenticate with diff --git a/docs/examples/kotlin/storage/delete-bucket.md b/docs/examples/kotlin/storage/delete-bucket.md index 2298103..4a0904e 100644 --- a/docs/examples/kotlin/storage/delete-bucket.md +++ b/docs/examples/kotlin/storage/delete-bucket.md @@ -3,7 +3,7 @@ import io.appwrite.coroutines.CoroutineCallback import io.appwrite.services.Storage val client = Client() - .setEndpoint("https://cloud.appwrite.io/v1") // Your API Endpoint + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint .setProject("<YOUR_PROJECT_ID>") // Your project ID .setKey("<YOUR_API_KEY>") // Your secret API key diff --git a/docs/examples/kotlin/storage/delete-file.md b/docs/examples/kotlin/storage/delete-file.md index 5b17c5c..cf5e285 100644 --- a/docs/examples/kotlin/storage/delete-file.md +++ b/docs/examples/kotlin/storage/delete-file.md @@ -3,7 +3,7 @@ import io.appwrite.coroutines.CoroutineCallback import io.appwrite.services.Storage val client = Client() - .setEndpoint("https://cloud.appwrite.io/v1") // Your API Endpoint + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint .setProject("<YOUR_PROJECT_ID>") // Your project ID .setSession("") // The user session to authenticate with diff --git a/docs/examples/kotlin/storage/get-bucket.md b/docs/examples/kotlin/storage/get-bucket.md index 604ec05..e2a6a8f 100644 --- a/docs/examples/kotlin/storage/get-bucket.md +++ b/docs/examples/kotlin/storage/get-bucket.md @@ -3,7 +3,7 @@ import io.appwrite.coroutines.CoroutineCallback import io.appwrite.services.Storage val client = Client() - .setEndpoint("https://cloud.appwrite.io/v1") // Your API Endpoint + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint .setProject("<YOUR_PROJECT_ID>") // Your project ID .setKey("<YOUR_API_KEY>") // Your secret API key diff --git a/docs/examples/kotlin/storage/get-file-download.md b/docs/examples/kotlin/storage/get-file-download.md index 46b02e7..f3422f9 100644 --- a/docs/examples/kotlin/storage/get-file-download.md +++ b/docs/examples/kotlin/storage/get-file-download.md @@ -3,7 +3,7 @@ import io.appwrite.coroutines.CoroutineCallback import io.appwrite.services.Storage val client = Client() - .setEndpoint("https://cloud.appwrite.io/v1") // Your API Endpoint + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint .setProject("<YOUR_PROJECT_ID>") // Your project ID .setSession("") // The user session to authenticate with diff --git a/docs/examples/kotlin/storage/get-file-preview.md b/docs/examples/kotlin/storage/get-file-preview.md index 88be42f..8c37ce8 100644 --- a/docs/examples/kotlin/storage/get-file-preview.md +++ b/docs/examples/kotlin/storage/get-file-preview.md @@ -3,7 +3,7 @@ import io.appwrite.coroutines.CoroutineCallback import io.appwrite.services.Storage val client = Client() - .setEndpoint("https://cloud.appwrite.io/v1") // Your API Endpoint + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint .setProject("<YOUR_PROJECT_ID>") // Your project ID .setSession("") // The user session to authenticate with diff --git a/docs/examples/kotlin/storage/get-file-view.md b/docs/examples/kotlin/storage/get-file-view.md index b4ad81f..cf8cde3 100644 --- a/docs/examples/kotlin/storage/get-file-view.md +++ b/docs/examples/kotlin/storage/get-file-view.md @@ -3,7 +3,7 @@ import io.appwrite.coroutines.CoroutineCallback import io.appwrite.services.Storage val client = Client() - .setEndpoint("https://cloud.appwrite.io/v1") // Your API Endpoint + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint .setProject("<YOUR_PROJECT_ID>") // Your project ID .setSession("") // The user session to authenticate with diff --git a/docs/examples/kotlin/storage/get-file.md b/docs/examples/kotlin/storage/get-file.md index a6d2d3d..a807177 100644 --- a/docs/examples/kotlin/storage/get-file.md +++ b/docs/examples/kotlin/storage/get-file.md @@ -3,7 +3,7 @@ import io.appwrite.coroutines.CoroutineCallback import io.appwrite.services.Storage val client = Client() - .setEndpoint("https://cloud.appwrite.io/v1") // Your API Endpoint + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint .setProject("<YOUR_PROJECT_ID>") // Your project ID .setSession("") // The user session to authenticate with diff --git a/docs/examples/kotlin/storage/list-buckets.md b/docs/examples/kotlin/storage/list-buckets.md index 4b22970..a8a066d 100644 --- a/docs/examples/kotlin/storage/list-buckets.md +++ b/docs/examples/kotlin/storage/list-buckets.md @@ -3,7 +3,7 @@ import io.appwrite.coroutines.CoroutineCallback import io.appwrite.services.Storage val client = Client() - .setEndpoint("https://cloud.appwrite.io/v1") // Your API Endpoint + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint .setProject("<YOUR_PROJECT_ID>") // Your project ID .setKey("<YOUR_API_KEY>") // Your secret API key diff --git a/docs/examples/kotlin/storage/list-files.md b/docs/examples/kotlin/storage/list-files.md index e7c3d66..cb9a776 100644 --- a/docs/examples/kotlin/storage/list-files.md +++ b/docs/examples/kotlin/storage/list-files.md @@ -3,7 +3,7 @@ import io.appwrite.coroutines.CoroutineCallback import io.appwrite.services.Storage val client = Client() - .setEndpoint("https://cloud.appwrite.io/v1") // Your API Endpoint + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint .setProject("<YOUR_PROJECT_ID>") // Your project ID .setSession("") // The user session to authenticate with diff --git a/docs/examples/kotlin/storage/update-bucket.md b/docs/examples/kotlin/storage/update-bucket.md index 4040dfb..d475a6e 100644 --- a/docs/examples/kotlin/storage/update-bucket.md +++ b/docs/examples/kotlin/storage/update-bucket.md @@ -3,7 +3,7 @@ import io.appwrite.coroutines.CoroutineCallback import io.appwrite.services.Storage val client = Client() - .setEndpoint("https://cloud.appwrite.io/v1") // Your API Endpoint + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint .setProject("<YOUR_PROJECT_ID>") // Your project ID .setKey("<YOUR_API_KEY>") // Your secret API key diff --git a/docs/examples/kotlin/storage/update-file.md b/docs/examples/kotlin/storage/update-file.md index 96d4b08..e82ea81 100644 --- a/docs/examples/kotlin/storage/update-file.md +++ b/docs/examples/kotlin/storage/update-file.md @@ -3,7 +3,7 @@ import io.appwrite.coroutines.CoroutineCallback import io.appwrite.services.Storage val client = Client() - .setEndpoint("https://cloud.appwrite.io/v1") // Your API Endpoint + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint .setProject("<YOUR_PROJECT_ID>") // Your project ID .setSession("") // The user session to authenticate with diff --git a/docs/examples/kotlin/teams/create-membership.md b/docs/examples/kotlin/teams/create-membership.md index 250502e..33eb165 100644 --- a/docs/examples/kotlin/teams/create-membership.md +++ b/docs/examples/kotlin/teams/create-membership.md @@ -3,7 +3,7 @@ import io.appwrite.coroutines.CoroutineCallback import io.appwrite.services.Teams val client = Client() - .setEndpoint("https://cloud.appwrite.io/v1") // Your API Endpoint + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint .setProject("<YOUR_PROJECT_ID>") // Your project ID .setSession("") // The user session to authenticate with diff --git a/docs/examples/kotlin/teams/create.md b/docs/examples/kotlin/teams/create.md index b66029f..6ec7e53 100644 --- a/docs/examples/kotlin/teams/create.md +++ b/docs/examples/kotlin/teams/create.md @@ -3,7 +3,7 @@ import io.appwrite.coroutines.CoroutineCallback import io.appwrite.services.Teams val client = Client() - .setEndpoint("https://cloud.appwrite.io/v1") // Your API Endpoint + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint .setProject("<YOUR_PROJECT_ID>") // Your project ID .setSession("") // The user session to authenticate with diff --git a/docs/examples/kotlin/teams/delete-membership.md b/docs/examples/kotlin/teams/delete-membership.md index 0dff545..48c924f 100644 --- a/docs/examples/kotlin/teams/delete-membership.md +++ b/docs/examples/kotlin/teams/delete-membership.md @@ -3,7 +3,7 @@ import io.appwrite.coroutines.CoroutineCallback import io.appwrite.services.Teams val client = Client() - .setEndpoint("https://cloud.appwrite.io/v1") // Your API Endpoint + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint .setProject("<YOUR_PROJECT_ID>") // Your project ID .setSession("") // The user session to authenticate with diff --git a/docs/examples/kotlin/teams/delete.md b/docs/examples/kotlin/teams/delete.md index 9a75b2a..4b70ff2 100644 --- a/docs/examples/kotlin/teams/delete.md +++ b/docs/examples/kotlin/teams/delete.md @@ -3,7 +3,7 @@ import io.appwrite.coroutines.CoroutineCallback import io.appwrite.services.Teams val client = Client() - .setEndpoint("https://cloud.appwrite.io/v1") // Your API Endpoint + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint .setProject("<YOUR_PROJECT_ID>") // Your project ID .setSession("") // The user session to authenticate with diff --git a/docs/examples/kotlin/teams/get-membership.md b/docs/examples/kotlin/teams/get-membership.md index 77c6ae5..a636c21 100644 --- a/docs/examples/kotlin/teams/get-membership.md +++ b/docs/examples/kotlin/teams/get-membership.md @@ -3,7 +3,7 @@ import io.appwrite.coroutines.CoroutineCallback import io.appwrite.services.Teams val client = Client() - .setEndpoint("https://cloud.appwrite.io/v1") // Your API Endpoint + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint .setProject("<YOUR_PROJECT_ID>") // Your project ID .setSession("") // The user session to authenticate with diff --git a/docs/examples/kotlin/teams/get-prefs.md b/docs/examples/kotlin/teams/get-prefs.md index 2700c89..2b73432 100644 --- a/docs/examples/kotlin/teams/get-prefs.md +++ b/docs/examples/kotlin/teams/get-prefs.md @@ -3,7 +3,7 @@ import io.appwrite.coroutines.CoroutineCallback import io.appwrite.services.Teams val client = Client() - .setEndpoint("https://cloud.appwrite.io/v1") // Your API Endpoint + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint .setProject("<YOUR_PROJECT_ID>") // Your project ID .setSession("") // The user session to authenticate with diff --git a/docs/examples/kotlin/teams/get.md b/docs/examples/kotlin/teams/get.md index a7be374..72b6677 100644 --- a/docs/examples/kotlin/teams/get.md +++ b/docs/examples/kotlin/teams/get.md @@ -3,7 +3,7 @@ import io.appwrite.coroutines.CoroutineCallback import io.appwrite.services.Teams val client = Client() - .setEndpoint("https://cloud.appwrite.io/v1") // Your API Endpoint + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint .setProject("<YOUR_PROJECT_ID>") // Your project ID .setSession("") // The user session to authenticate with diff --git a/docs/examples/kotlin/teams/list-memberships.md b/docs/examples/kotlin/teams/list-memberships.md index 916252d..2870873 100644 --- a/docs/examples/kotlin/teams/list-memberships.md +++ b/docs/examples/kotlin/teams/list-memberships.md @@ -3,7 +3,7 @@ import io.appwrite.coroutines.CoroutineCallback import io.appwrite.services.Teams val client = Client() - .setEndpoint("https://cloud.appwrite.io/v1") // Your API Endpoint + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint .setProject("<YOUR_PROJECT_ID>") // Your project ID .setSession("") // The user session to authenticate with diff --git a/docs/examples/kotlin/teams/list.md b/docs/examples/kotlin/teams/list.md index 5af95db..ee3e3e4 100644 --- a/docs/examples/kotlin/teams/list.md +++ b/docs/examples/kotlin/teams/list.md @@ -3,7 +3,7 @@ import io.appwrite.coroutines.CoroutineCallback import io.appwrite.services.Teams val client = Client() - .setEndpoint("https://cloud.appwrite.io/v1") // Your API Endpoint + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint .setProject("<YOUR_PROJECT_ID>") // Your project ID .setSession("") // The user session to authenticate with diff --git a/docs/examples/kotlin/teams/update-membership-status.md b/docs/examples/kotlin/teams/update-membership-status.md index 75c4a73..b7a0d51 100644 --- a/docs/examples/kotlin/teams/update-membership-status.md +++ b/docs/examples/kotlin/teams/update-membership-status.md @@ -3,7 +3,7 @@ import io.appwrite.coroutines.CoroutineCallback import io.appwrite.services.Teams val client = Client() - .setEndpoint("https://cloud.appwrite.io/v1") // Your API Endpoint + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint .setProject("<YOUR_PROJECT_ID>") // Your project ID .setSession("") // The user session to authenticate with diff --git a/docs/examples/kotlin/teams/update-membership.md b/docs/examples/kotlin/teams/update-membership.md index 556e0a3..7a4377f 100644 --- a/docs/examples/kotlin/teams/update-membership.md +++ b/docs/examples/kotlin/teams/update-membership.md @@ -3,7 +3,7 @@ import io.appwrite.coroutines.CoroutineCallback import io.appwrite.services.Teams val client = Client() - .setEndpoint("https://cloud.appwrite.io/v1") // Your API Endpoint + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint .setProject("<YOUR_PROJECT_ID>") // Your project ID .setSession("") // The user session to authenticate with diff --git a/docs/examples/kotlin/teams/update-name.md b/docs/examples/kotlin/teams/update-name.md index 8e6a2a2..2f13d7c 100644 --- a/docs/examples/kotlin/teams/update-name.md +++ b/docs/examples/kotlin/teams/update-name.md @@ -3,7 +3,7 @@ import io.appwrite.coroutines.CoroutineCallback import io.appwrite.services.Teams val client = Client() - .setEndpoint("https://cloud.appwrite.io/v1") // Your API Endpoint + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint .setProject("<YOUR_PROJECT_ID>") // Your project ID .setSession("") // The user session to authenticate with diff --git a/docs/examples/kotlin/teams/update-prefs.md b/docs/examples/kotlin/teams/update-prefs.md index c9153d3..62c7f01 100644 --- a/docs/examples/kotlin/teams/update-prefs.md +++ b/docs/examples/kotlin/teams/update-prefs.md @@ -3,7 +3,7 @@ import io.appwrite.coroutines.CoroutineCallback import io.appwrite.services.Teams val client = Client() - .setEndpoint("https://cloud.appwrite.io/v1") // Your API Endpoint + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint .setProject("<YOUR_PROJECT_ID>") // Your project ID .setSession("") // The user session to authenticate with diff --git a/docs/examples/kotlin/users/create-argon2user.md b/docs/examples/kotlin/users/create-argon2user.md index a01f6d5..27008a0 100644 --- a/docs/examples/kotlin/users/create-argon2user.md +++ b/docs/examples/kotlin/users/create-argon2user.md @@ -3,7 +3,7 @@ import io.appwrite.coroutines.CoroutineCallback import io.appwrite.services.Users val client = Client() - .setEndpoint("https://cloud.appwrite.io/v1") // Your API Endpoint + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint .setProject("<YOUR_PROJECT_ID>") // Your project ID .setKey("<YOUR_API_KEY>") // Your secret API key diff --git a/docs/examples/kotlin/users/create-bcrypt-user.md b/docs/examples/kotlin/users/create-bcrypt-user.md index b4758e4..c723130 100644 --- a/docs/examples/kotlin/users/create-bcrypt-user.md +++ b/docs/examples/kotlin/users/create-bcrypt-user.md @@ -3,7 +3,7 @@ import io.appwrite.coroutines.CoroutineCallback import io.appwrite.services.Users val client = Client() - .setEndpoint("https://cloud.appwrite.io/v1") // Your API Endpoint + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint .setProject("<YOUR_PROJECT_ID>") // Your project ID .setKey("<YOUR_API_KEY>") // Your secret API key diff --git a/docs/examples/kotlin/users/create-j-w-t.md b/docs/examples/kotlin/users/create-j-w-t.md index 137847d..a556a90 100644 --- a/docs/examples/kotlin/users/create-j-w-t.md +++ b/docs/examples/kotlin/users/create-j-w-t.md @@ -3,7 +3,7 @@ import io.appwrite.coroutines.CoroutineCallback import io.appwrite.services.Users val client = Client() - .setEndpoint("https://cloud.appwrite.io/v1") // Your API Endpoint + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint .setProject("<YOUR_PROJECT_ID>") // Your project ID .setKey("<YOUR_API_KEY>") // Your secret API key diff --git a/docs/examples/kotlin/users/create-m-d5user.md b/docs/examples/kotlin/users/create-m-d5user.md index f9d7cb2..27b9859 100644 --- a/docs/examples/kotlin/users/create-m-d5user.md +++ b/docs/examples/kotlin/users/create-m-d5user.md @@ -3,7 +3,7 @@ import io.appwrite.coroutines.CoroutineCallback import io.appwrite.services.Users val client = Client() - .setEndpoint("https://cloud.appwrite.io/v1") // Your API Endpoint + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint .setProject("<YOUR_PROJECT_ID>") // Your project ID .setKey("<YOUR_API_KEY>") // Your secret API key diff --git a/docs/examples/kotlin/users/create-mfa-recovery-codes.md b/docs/examples/kotlin/users/create-mfa-recovery-codes.md index b3a3950..2d1dbf0 100644 --- a/docs/examples/kotlin/users/create-mfa-recovery-codes.md +++ b/docs/examples/kotlin/users/create-mfa-recovery-codes.md @@ -3,7 +3,7 @@ import io.appwrite.coroutines.CoroutineCallback import io.appwrite.services.Users val client = Client() - .setEndpoint("https://cloud.appwrite.io/v1") // Your API Endpoint + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint .setProject("<YOUR_PROJECT_ID>") // Your project ID .setKey("<YOUR_API_KEY>") // Your secret API key diff --git a/docs/examples/kotlin/users/create-p-h-pass-user.md b/docs/examples/kotlin/users/create-p-h-pass-user.md index 87d74aa..5441e49 100644 --- a/docs/examples/kotlin/users/create-p-h-pass-user.md +++ b/docs/examples/kotlin/users/create-p-h-pass-user.md @@ -3,7 +3,7 @@ import io.appwrite.coroutines.CoroutineCallback import io.appwrite.services.Users val client = Client() - .setEndpoint("https://cloud.appwrite.io/v1") // Your API Endpoint + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint .setProject("<YOUR_PROJECT_ID>") // Your project ID .setKey("<YOUR_API_KEY>") // Your secret API key diff --git a/docs/examples/kotlin/users/create-s-h-a-user.md b/docs/examples/kotlin/users/create-s-h-a-user.md index 0be03bf..17a157b 100644 --- a/docs/examples/kotlin/users/create-s-h-a-user.md +++ b/docs/examples/kotlin/users/create-s-h-a-user.md @@ -3,7 +3,7 @@ import io.appwrite.coroutines.CoroutineCallback import io.appwrite.services.Users val client = Client() - .setEndpoint("https://cloud.appwrite.io/v1") // Your API Endpoint + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint .setProject("<YOUR_PROJECT_ID>") // Your project ID .setKey("<YOUR_API_KEY>") // Your secret API key diff --git a/docs/examples/kotlin/users/create-scrypt-modified-user.md b/docs/examples/kotlin/users/create-scrypt-modified-user.md index f651d3f..814883c 100644 --- a/docs/examples/kotlin/users/create-scrypt-modified-user.md +++ b/docs/examples/kotlin/users/create-scrypt-modified-user.md @@ -3,7 +3,7 @@ import io.appwrite.coroutines.CoroutineCallback import io.appwrite.services.Users val client = Client() - .setEndpoint("https://cloud.appwrite.io/v1") // Your API Endpoint + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint .setProject("<YOUR_PROJECT_ID>") // Your project ID .setKey("<YOUR_API_KEY>") // Your secret API key diff --git a/docs/examples/kotlin/users/create-scrypt-user.md b/docs/examples/kotlin/users/create-scrypt-user.md index 2502312..619525a 100644 --- a/docs/examples/kotlin/users/create-scrypt-user.md +++ b/docs/examples/kotlin/users/create-scrypt-user.md @@ -3,7 +3,7 @@ import io.appwrite.coroutines.CoroutineCallback import io.appwrite.services.Users val client = Client() - .setEndpoint("https://cloud.appwrite.io/v1") // Your API Endpoint + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint .setProject("<YOUR_PROJECT_ID>") // Your project ID .setKey("<YOUR_API_KEY>") // Your secret API key diff --git a/docs/examples/kotlin/users/create-session.md b/docs/examples/kotlin/users/create-session.md index 4b0e5dc..a67e605 100644 --- a/docs/examples/kotlin/users/create-session.md +++ b/docs/examples/kotlin/users/create-session.md @@ -3,7 +3,7 @@ import io.appwrite.coroutines.CoroutineCallback import io.appwrite.services.Users val client = Client() - .setEndpoint("https://cloud.appwrite.io/v1") // Your API Endpoint + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint .setProject("<YOUR_PROJECT_ID>") // Your project ID .setKey("<YOUR_API_KEY>") // Your secret API key diff --git a/docs/examples/kotlin/users/create-target.md b/docs/examples/kotlin/users/create-target.md index 4a7856b..139c6ff 100644 --- a/docs/examples/kotlin/users/create-target.md +++ b/docs/examples/kotlin/users/create-target.md @@ -4,7 +4,7 @@ import io.appwrite.services.Users import io.appwrite.enums.MessagingProviderType val client = Client() - .setEndpoint("https://cloud.appwrite.io/v1") // Your API Endpoint + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint .setProject("<YOUR_PROJECT_ID>") // Your project ID .setKey("<YOUR_API_KEY>") // Your secret API key diff --git a/docs/examples/kotlin/users/create-token.md b/docs/examples/kotlin/users/create-token.md index bd8f76d..43492f4 100644 --- a/docs/examples/kotlin/users/create-token.md +++ b/docs/examples/kotlin/users/create-token.md @@ -3,7 +3,7 @@ import io.appwrite.coroutines.CoroutineCallback import io.appwrite.services.Users val client = Client() - .setEndpoint("https://cloud.appwrite.io/v1") // Your API Endpoint + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint .setProject("<YOUR_PROJECT_ID>") // Your project ID .setKey("<YOUR_API_KEY>") // Your secret API key diff --git a/docs/examples/kotlin/users/create.md b/docs/examples/kotlin/users/create.md index b5bcee9..27ae85a 100644 --- a/docs/examples/kotlin/users/create.md +++ b/docs/examples/kotlin/users/create.md @@ -3,7 +3,7 @@ import io.appwrite.coroutines.CoroutineCallback import io.appwrite.services.Users val client = Client() - .setEndpoint("https://cloud.appwrite.io/v1") // Your API Endpoint + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint .setProject("<YOUR_PROJECT_ID>") // Your project ID .setKey("<YOUR_API_KEY>") // Your secret API key diff --git a/docs/examples/kotlin/users/delete-identity.md b/docs/examples/kotlin/users/delete-identity.md index 2c0bfae..37b4ed2 100644 --- a/docs/examples/kotlin/users/delete-identity.md +++ b/docs/examples/kotlin/users/delete-identity.md @@ -3,7 +3,7 @@ import io.appwrite.coroutines.CoroutineCallback import io.appwrite.services.Users val client = Client() - .setEndpoint("https://cloud.appwrite.io/v1") // Your API Endpoint + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint .setProject("<YOUR_PROJECT_ID>") // Your project ID .setKey("<YOUR_API_KEY>") // Your secret API key diff --git a/docs/examples/kotlin/users/delete-mfa-authenticator.md b/docs/examples/kotlin/users/delete-mfa-authenticator.md index 60989d4..22085b2 100644 --- a/docs/examples/kotlin/users/delete-mfa-authenticator.md +++ b/docs/examples/kotlin/users/delete-mfa-authenticator.md @@ -4,7 +4,7 @@ import io.appwrite.services.Users import io.appwrite.enums.AuthenticatorType val client = Client() - .setEndpoint("https://cloud.appwrite.io/v1") // Your API Endpoint + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint .setProject("<YOUR_PROJECT_ID>") // Your project ID .setKey("<YOUR_API_KEY>") // Your secret API key diff --git a/docs/examples/kotlin/users/delete-session.md b/docs/examples/kotlin/users/delete-session.md index 0127fa3..e9e3c7c 100644 --- a/docs/examples/kotlin/users/delete-session.md +++ b/docs/examples/kotlin/users/delete-session.md @@ -3,7 +3,7 @@ import io.appwrite.coroutines.CoroutineCallback import io.appwrite.services.Users val client = Client() - .setEndpoint("https://cloud.appwrite.io/v1") // Your API Endpoint + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint .setProject("<YOUR_PROJECT_ID>") // Your project ID .setKey("<YOUR_API_KEY>") // Your secret API key diff --git a/docs/examples/kotlin/users/delete-sessions.md b/docs/examples/kotlin/users/delete-sessions.md index 26d7c70..6288e1b 100644 --- a/docs/examples/kotlin/users/delete-sessions.md +++ b/docs/examples/kotlin/users/delete-sessions.md @@ -3,7 +3,7 @@ import io.appwrite.coroutines.CoroutineCallback import io.appwrite.services.Users val client = Client() - .setEndpoint("https://cloud.appwrite.io/v1") // Your API Endpoint + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint .setProject("<YOUR_PROJECT_ID>") // Your project ID .setKey("<YOUR_API_KEY>") // Your secret API key diff --git a/docs/examples/kotlin/users/delete-target.md b/docs/examples/kotlin/users/delete-target.md index 6be6652..f93be06 100644 --- a/docs/examples/kotlin/users/delete-target.md +++ b/docs/examples/kotlin/users/delete-target.md @@ -3,7 +3,7 @@ import io.appwrite.coroutines.CoroutineCallback import io.appwrite.services.Users val client = Client() - .setEndpoint("https://cloud.appwrite.io/v1") // Your API Endpoint + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint .setProject("<YOUR_PROJECT_ID>") // Your project ID .setKey("<YOUR_API_KEY>") // Your secret API key diff --git a/docs/examples/kotlin/users/delete.md b/docs/examples/kotlin/users/delete.md index e250c44..b938ac7 100644 --- a/docs/examples/kotlin/users/delete.md +++ b/docs/examples/kotlin/users/delete.md @@ -3,7 +3,7 @@ import io.appwrite.coroutines.CoroutineCallback import io.appwrite.services.Users val client = Client() - .setEndpoint("https://cloud.appwrite.io/v1") // Your API Endpoint + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint .setProject("<YOUR_PROJECT_ID>") // Your project ID .setKey("<YOUR_API_KEY>") // Your secret API key diff --git a/docs/examples/kotlin/users/get-mfa-recovery-codes.md b/docs/examples/kotlin/users/get-mfa-recovery-codes.md index 5860b4c..e0c45dc 100644 --- a/docs/examples/kotlin/users/get-mfa-recovery-codes.md +++ b/docs/examples/kotlin/users/get-mfa-recovery-codes.md @@ -3,7 +3,7 @@ import io.appwrite.coroutines.CoroutineCallback import io.appwrite.services.Users val client = Client() - .setEndpoint("https://cloud.appwrite.io/v1") // Your API Endpoint + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint .setProject("<YOUR_PROJECT_ID>") // Your project ID .setKey("<YOUR_API_KEY>") // Your secret API key diff --git a/docs/examples/kotlin/users/get-prefs.md b/docs/examples/kotlin/users/get-prefs.md index 7654537..927a4a4 100644 --- a/docs/examples/kotlin/users/get-prefs.md +++ b/docs/examples/kotlin/users/get-prefs.md @@ -3,7 +3,7 @@ import io.appwrite.coroutines.CoroutineCallback import io.appwrite.services.Users val client = Client() - .setEndpoint("https://cloud.appwrite.io/v1") // Your API Endpoint + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint .setProject("<YOUR_PROJECT_ID>") // Your project ID .setKey("<YOUR_API_KEY>") // Your secret API key diff --git a/docs/examples/kotlin/users/get-target.md b/docs/examples/kotlin/users/get-target.md index be8bbe8..556349c 100644 --- a/docs/examples/kotlin/users/get-target.md +++ b/docs/examples/kotlin/users/get-target.md @@ -3,7 +3,7 @@ import io.appwrite.coroutines.CoroutineCallback import io.appwrite.services.Users val client = Client() - .setEndpoint("https://cloud.appwrite.io/v1") // Your API Endpoint + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint .setProject("<YOUR_PROJECT_ID>") // Your project ID .setKey("<YOUR_API_KEY>") // Your secret API key diff --git a/docs/examples/kotlin/users/get.md b/docs/examples/kotlin/users/get.md index 8298430..70f0ee9 100644 --- a/docs/examples/kotlin/users/get.md +++ b/docs/examples/kotlin/users/get.md @@ -3,7 +3,7 @@ import io.appwrite.coroutines.CoroutineCallback import io.appwrite.services.Users val client = Client() - .setEndpoint("https://cloud.appwrite.io/v1") // Your API Endpoint + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint .setProject("<YOUR_PROJECT_ID>") // Your project ID .setKey("<YOUR_API_KEY>") // Your secret API key diff --git a/docs/examples/kotlin/users/list-identities.md b/docs/examples/kotlin/users/list-identities.md index 05156db..1ac0e5b 100644 --- a/docs/examples/kotlin/users/list-identities.md +++ b/docs/examples/kotlin/users/list-identities.md @@ -3,7 +3,7 @@ import io.appwrite.coroutines.CoroutineCallback import io.appwrite.services.Users val client = Client() - .setEndpoint("https://cloud.appwrite.io/v1") // Your API Endpoint + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint .setProject("<YOUR_PROJECT_ID>") // Your project ID .setKey("<YOUR_API_KEY>") // Your secret API key diff --git a/docs/examples/kotlin/users/list-logs.md b/docs/examples/kotlin/users/list-logs.md index 8868d0d..a263293 100644 --- a/docs/examples/kotlin/users/list-logs.md +++ b/docs/examples/kotlin/users/list-logs.md @@ -3,7 +3,7 @@ import io.appwrite.coroutines.CoroutineCallback import io.appwrite.services.Users val client = Client() - .setEndpoint("https://cloud.appwrite.io/v1") // Your API Endpoint + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint .setProject("<YOUR_PROJECT_ID>") // Your project ID .setKey("<YOUR_API_KEY>") // Your secret API key diff --git a/docs/examples/kotlin/users/list-memberships.md b/docs/examples/kotlin/users/list-memberships.md index 5a3d2ea..528b69c 100644 --- a/docs/examples/kotlin/users/list-memberships.md +++ b/docs/examples/kotlin/users/list-memberships.md @@ -3,7 +3,7 @@ import io.appwrite.coroutines.CoroutineCallback import io.appwrite.services.Users val client = Client() - .setEndpoint("https://cloud.appwrite.io/v1") // Your API Endpoint + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint .setProject("<YOUR_PROJECT_ID>") // Your project ID .setKey("<YOUR_API_KEY>") // Your secret API key diff --git a/docs/examples/kotlin/users/list-mfa-factors.md b/docs/examples/kotlin/users/list-mfa-factors.md index 25d9a4a..4eb6721 100644 --- a/docs/examples/kotlin/users/list-mfa-factors.md +++ b/docs/examples/kotlin/users/list-mfa-factors.md @@ -3,7 +3,7 @@ import io.appwrite.coroutines.CoroutineCallback import io.appwrite.services.Users val client = Client() - .setEndpoint("https://cloud.appwrite.io/v1") // Your API Endpoint + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint .setProject("<YOUR_PROJECT_ID>") // Your project ID .setKey("<YOUR_API_KEY>") // Your secret API key diff --git a/docs/examples/kotlin/users/list-sessions.md b/docs/examples/kotlin/users/list-sessions.md index c14ebd7..4ff34dd 100644 --- a/docs/examples/kotlin/users/list-sessions.md +++ b/docs/examples/kotlin/users/list-sessions.md @@ -3,7 +3,7 @@ import io.appwrite.coroutines.CoroutineCallback import io.appwrite.services.Users val client = Client() - .setEndpoint("https://cloud.appwrite.io/v1") // Your API Endpoint + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint .setProject("<YOUR_PROJECT_ID>") // Your project ID .setKey("<YOUR_API_KEY>") // Your secret API key diff --git a/docs/examples/kotlin/users/list-targets.md b/docs/examples/kotlin/users/list-targets.md index d017592..0824acf 100644 --- a/docs/examples/kotlin/users/list-targets.md +++ b/docs/examples/kotlin/users/list-targets.md @@ -3,7 +3,7 @@ import io.appwrite.coroutines.CoroutineCallback import io.appwrite.services.Users val client = Client() - .setEndpoint("https://cloud.appwrite.io/v1") // Your API Endpoint + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint .setProject("<YOUR_PROJECT_ID>") // Your project ID .setKey("<YOUR_API_KEY>") // Your secret API key diff --git a/docs/examples/kotlin/users/list.md b/docs/examples/kotlin/users/list.md index e86ac0d..23dd217 100644 --- a/docs/examples/kotlin/users/list.md +++ b/docs/examples/kotlin/users/list.md @@ -3,7 +3,7 @@ import io.appwrite.coroutines.CoroutineCallback import io.appwrite.services.Users val client = Client() - .setEndpoint("https://cloud.appwrite.io/v1") // Your API Endpoint + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint .setProject("<YOUR_PROJECT_ID>") // Your project ID .setKey("<YOUR_API_KEY>") // Your secret API key diff --git a/docs/examples/kotlin/users/update-email-verification.md b/docs/examples/kotlin/users/update-email-verification.md index 3f5f293..ebf2232 100644 --- a/docs/examples/kotlin/users/update-email-verification.md +++ b/docs/examples/kotlin/users/update-email-verification.md @@ -3,7 +3,7 @@ import io.appwrite.coroutines.CoroutineCallback import io.appwrite.services.Users val client = Client() - .setEndpoint("https://cloud.appwrite.io/v1") // Your API Endpoint + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint .setProject("<YOUR_PROJECT_ID>") // Your project ID .setKey("<YOUR_API_KEY>") // Your secret API key diff --git a/docs/examples/kotlin/users/update-email.md b/docs/examples/kotlin/users/update-email.md index b7a0644..a617705 100644 --- a/docs/examples/kotlin/users/update-email.md +++ b/docs/examples/kotlin/users/update-email.md @@ -3,7 +3,7 @@ import io.appwrite.coroutines.CoroutineCallback import io.appwrite.services.Users val client = Client() - .setEndpoint("https://cloud.appwrite.io/v1") // Your API Endpoint + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint .setProject("<YOUR_PROJECT_ID>") // Your project ID .setKey("<YOUR_API_KEY>") // Your secret API key diff --git a/docs/examples/kotlin/users/update-labels.md b/docs/examples/kotlin/users/update-labels.md index ecc2948..86f536f 100644 --- a/docs/examples/kotlin/users/update-labels.md +++ b/docs/examples/kotlin/users/update-labels.md @@ -3,7 +3,7 @@ import io.appwrite.coroutines.CoroutineCallback import io.appwrite.services.Users val client = Client() - .setEndpoint("https://cloud.appwrite.io/v1") // Your API Endpoint + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint .setProject("<YOUR_PROJECT_ID>") // Your project ID .setKey("<YOUR_API_KEY>") // Your secret API key diff --git a/docs/examples/kotlin/users/update-mfa-recovery-codes.md b/docs/examples/kotlin/users/update-mfa-recovery-codes.md index b8fa2c5..74602c0 100644 --- a/docs/examples/kotlin/users/update-mfa-recovery-codes.md +++ b/docs/examples/kotlin/users/update-mfa-recovery-codes.md @@ -3,7 +3,7 @@ import io.appwrite.coroutines.CoroutineCallback import io.appwrite.services.Users val client = Client() - .setEndpoint("https://cloud.appwrite.io/v1") // Your API Endpoint + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint .setProject("<YOUR_PROJECT_ID>") // Your project ID .setKey("<YOUR_API_KEY>") // Your secret API key diff --git a/docs/examples/kotlin/users/update-mfa.md b/docs/examples/kotlin/users/update-mfa.md index a169f3d..0148d58 100644 --- a/docs/examples/kotlin/users/update-mfa.md +++ b/docs/examples/kotlin/users/update-mfa.md @@ -3,7 +3,7 @@ import io.appwrite.coroutines.CoroutineCallback import io.appwrite.services.Users val client = Client() - .setEndpoint("https://cloud.appwrite.io/v1") // Your API Endpoint + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint .setProject("<YOUR_PROJECT_ID>") // Your project ID .setKey("<YOUR_API_KEY>") // Your secret API key diff --git a/docs/examples/kotlin/users/update-name.md b/docs/examples/kotlin/users/update-name.md index 32d164d..fedfce3 100644 --- a/docs/examples/kotlin/users/update-name.md +++ b/docs/examples/kotlin/users/update-name.md @@ -3,7 +3,7 @@ import io.appwrite.coroutines.CoroutineCallback import io.appwrite.services.Users val client = Client() - .setEndpoint("https://cloud.appwrite.io/v1") // Your API Endpoint + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint .setProject("<YOUR_PROJECT_ID>") // Your project ID .setKey("<YOUR_API_KEY>") // Your secret API key diff --git a/docs/examples/kotlin/users/update-password.md b/docs/examples/kotlin/users/update-password.md index 1522267..4a0ad57 100644 --- a/docs/examples/kotlin/users/update-password.md +++ b/docs/examples/kotlin/users/update-password.md @@ -3,7 +3,7 @@ import io.appwrite.coroutines.CoroutineCallback import io.appwrite.services.Users val client = Client() - .setEndpoint("https://cloud.appwrite.io/v1") // Your API Endpoint + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint .setProject("<YOUR_PROJECT_ID>") // Your project ID .setKey("<YOUR_API_KEY>") // Your secret API key diff --git a/docs/examples/kotlin/users/update-phone-verification.md b/docs/examples/kotlin/users/update-phone-verification.md index bc8f4c6..6520ef4 100644 --- a/docs/examples/kotlin/users/update-phone-verification.md +++ b/docs/examples/kotlin/users/update-phone-verification.md @@ -3,7 +3,7 @@ import io.appwrite.coroutines.CoroutineCallback import io.appwrite.services.Users val client = Client() - .setEndpoint("https://cloud.appwrite.io/v1") // Your API Endpoint + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint .setProject("<YOUR_PROJECT_ID>") // Your project ID .setKey("<YOUR_API_KEY>") // Your secret API key diff --git a/docs/examples/kotlin/users/update-phone.md b/docs/examples/kotlin/users/update-phone.md index f00a15d..7261f95 100644 --- a/docs/examples/kotlin/users/update-phone.md +++ b/docs/examples/kotlin/users/update-phone.md @@ -3,7 +3,7 @@ import io.appwrite.coroutines.CoroutineCallback import io.appwrite.services.Users val client = Client() - .setEndpoint("https://cloud.appwrite.io/v1") // Your API Endpoint + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint .setProject("<YOUR_PROJECT_ID>") // Your project ID .setKey("<YOUR_API_KEY>") // Your secret API key diff --git a/docs/examples/kotlin/users/update-prefs.md b/docs/examples/kotlin/users/update-prefs.md index cc8dcf6..451f4ff 100644 --- a/docs/examples/kotlin/users/update-prefs.md +++ b/docs/examples/kotlin/users/update-prefs.md @@ -3,7 +3,7 @@ import io.appwrite.coroutines.CoroutineCallback import io.appwrite.services.Users val client = Client() - .setEndpoint("https://cloud.appwrite.io/v1") // Your API Endpoint + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint .setProject("<YOUR_PROJECT_ID>") // Your project ID .setKey("<YOUR_API_KEY>") // Your secret API key diff --git a/docs/examples/kotlin/users/update-status.md b/docs/examples/kotlin/users/update-status.md index e546ba5..a69ae30 100644 --- a/docs/examples/kotlin/users/update-status.md +++ b/docs/examples/kotlin/users/update-status.md @@ -3,7 +3,7 @@ import io.appwrite.coroutines.CoroutineCallback import io.appwrite.services.Users val client = Client() - .setEndpoint("https://cloud.appwrite.io/v1") // Your API Endpoint + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint .setProject("<YOUR_PROJECT_ID>") // Your project ID .setKey("<YOUR_API_KEY>") // Your secret API key diff --git a/docs/examples/kotlin/users/update-target.md b/docs/examples/kotlin/users/update-target.md index 1827c6a..a18fc63 100644 --- a/docs/examples/kotlin/users/update-target.md +++ b/docs/examples/kotlin/users/update-target.md @@ -3,7 +3,7 @@ import io.appwrite.coroutines.CoroutineCallback import io.appwrite.services.Users val client = Client() - .setEndpoint("https://cloud.appwrite.io/v1") // Your API Endpoint + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint .setProject("<YOUR_PROJECT_ID>") // Your project ID .setKey("<YOUR_API_KEY>") // Your secret API key diff --git a/src/main/kotlin/io/appwrite/services/Account.kt b/src/main/kotlin/io/appwrite/services/Account.kt index e631719..26494eb 100644 --- a/src/main/kotlin/io/appwrite/services/Account.kt +++ b/src/main/kotlin/io/appwrite/services/Account.kt @@ -26,7 +26,7 @@ class Account(client: Client) : Service(client) { val apiParams = mutableMapOf<String, Any?>( ) - val apiHeaders = mutableMapOf( + val apiHeaders = mutableMapOf<String, String>( ) val converter: (Any) -> io.appwrite.models.User<T> = { io.appwrite.models.User.from(map = it as Map<String, Any>, nestedType) @@ -78,7 +78,7 @@ class Account(client: Client) : Service(client) { "password" to password, "name" to name, ) - val apiHeaders = mutableMapOf( + val apiHeaders = mutableMapOf<String, String>( "content-type" to "application/json", ) val converter: (Any) -> io.appwrite.models.User<T> = { @@ -137,7 +137,7 @@ class Account(client: Client) : Service(client) { "email" to email, "password" to password, ) - val apiHeaders = mutableMapOf( + val apiHeaders = mutableMapOf<String, String>( "content-type" to "application/json", ) val converter: (Any) -> io.appwrite.models.User<T> = { @@ -186,7 +186,7 @@ class Account(client: Client) : Service(client) { val apiParams = mutableMapOf<String, Any?>( "queries" to queries, ) - val apiHeaders = mutableMapOf( + val apiHeaders = mutableMapOf<String, String>( ) val converter: (Any) -> io.appwrite.models.IdentityList = { io.appwrite.models.IdentityList.from(map = it as Map<String, Any>) @@ -216,7 +216,7 @@ class Account(client: Client) : Service(client) { val apiParams = mutableMapOf<String, Any?>( ) - val apiHeaders = mutableMapOf( + val apiHeaders = mutableMapOf<String, String>( "content-type" to "application/json", ) return client.call( @@ -240,7 +240,7 @@ class Account(client: Client) : Service(client) { val apiParams = mutableMapOf<String, Any?>( ) - val apiHeaders = mutableMapOf( + val apiHeaders = mutableMapOf<String, String>( "content-type" to "application/json", ) val converter: (Any) -> io.appwrite.models.Jwt = { @@ -272,7 +272,7 @@ class Account(client: Client) : Service(client) { val apiParams = mutableMapOf<String, Any?>( "queries" to queries, ) - val apiHeaders = mutableMapOf( + val apiHeaders = mutableMapOf<String, String>( ) val converter: (Any) -> io.appwrite.models.LogList = { io.appwrite.models.LogList.from(map = it as Map<String, Any>) @@ -303,7 +303,7 @@ class Account(client: Client) : Service(client) { val apiParams = mutableMapOf<String, Any?>( "mfa" to mfa, ) - val apiHeaders = mutableMapOf( + val apiHeaders = mutableMapOf<String, String>( "content-type" to "application/json", ) val converter: (Any) -> io.appwrite.models.User<T> = { @@ -348,7 +348,7 @@ class Account(client: Client) : Service(client) { val apiParams = mutableMapOf<String, Any?>( ) - val apiHeaders = mutableMapOf( + val apiHeaders = mutableMapOf<String, String>( "content-type" to "application/json", ) val converter: (Any) -> io.appwrite.models.MfaType = { @@ -383,7 +383,7 @@ class Account(client: Client) : Service(client) { val apiParams = mutableMapOf<String, Any?>( "otp" to otp, ) - val apiHeaders = mutableMapOf( + val apiHeaders = mutableMapOf<String, String>( "content-type" to "application/json", ) val converter: (Any) -> io.appwrite.models.User<T> = { @@ -431,7 +431,7 @@ class Account(client: Client) : Service(client) { val apiParams = mutableMapOf<String, Any?>( ) - val apiHeaders = mutableMapOf( + val apiHeaders = mutableMapOf<String, String>( "content-type" to "application/json", ) return client.call( @@ -458,7 +458,7 @@ class Account(client: Client) : Service(client) { val apiParams = mutableMapOf<String, Any?>( "factor" to factor, ) - val apiHeaders = mutableMapOf( + val apiHeaders = mutableMapOf<String, String>( "content-type" to "application/json", ) val converter: (Any) -> io.appwrite.models.MfaChallenge = { @@ -492,7 +492,7 @@ class Account(client: Client) : Service(client) { "challengeId" to challengeId, "otp" to otp, ) - val apiHeaders = mutableMapOf( + val apiHeaders = mutableMapOf<String, String>( "content-type" to "application/json", ) val converter: (Any) -> io.appwrite.models.Session = { @@ -520,7 +520,7 @@ class Account(client: Client) : Service(client) { val apiParams = mutableMapOf<String, Any?>( ) - val apiHeaders = mutableMapOf( + val apiHeaders = mutableMapOf<String, String>( ) val converter: (Any) -> io.appwrite.models.MfaFactors = { io.appwrite.models.MfaFactors.from(map = it as Map<String, Any>) @@ -547,7 +547,7 @@ class Account(client: Client) : Service(client) { val apiParams = mutableMapOf<String, Any?>( ) - val apiHeaders = mutableMapOf( + val apiHeaders = mutableMapOf<String, String>( ) val converter: (Any) -> io.appwrite.models.MfaRecoveryCodes = { io.appwrite.models.MfaRecoveryCodes.from(map = it as Map<String, Any>) @@ -574,7 +574,7 @@ class Account(client: Client) : Service(client) { val apiParams = mutableMapOf<String, Any?>( ) - val apiHeaders = mutableMapOf( + val apiHeaders = mutableMapOf<String, String>( "content-type" to "application/json", ) val converter: (Any) -> io.appwrite.models.MfaRecoveryCodes = { @@ -602,7 +602,7 @@ class Account(client: Client) : Service(client) { val apiParams = mutableMapOf<String, Any?>( ) - val apiHeaders = mutableMapOf( + val apiHeaders = mutableMapOf<String, String>( "content-type" to "application/json", ) val converter: (Any) -> io.appwrite.models.MfaRecoveryCodes = { @@ -634,7 +634,7 @@ class Account(client: Client) : Service(client) { val apiParams = mutableMapOf<String, Any?>( "name" to name, ) - val apiHeaders = mutableMapOf( + val apiHeaders = mutableMapOf<String, String>( "content-type" to "application/json", ) val converter: (Any) -> io.appwrite.models.User<T> = { @@ -684,7 +684,7 @@ class Account(client: Client) : Service(client) { "password" to password, "oldPassword" to oldPassword, ) - val apiHeaders = mutableMapOf( + val apiHeaders = mutableMapOf<String, String>( "content-type" to "application/json", ) val converter: (Any) -> io.appwrite.models.User<T> = { @@ -737,7 +737,7 @@ class Account(client: Client) : Service(client) { "phone" to phone, "password" to password, ) - val apiHeaders = mutableMapOf( + val apiHeaders = mutableMapOf<String, String>( "content-type" to "application/json", ) val converter: (Any) -> io.appwrite.models.User<T> = { @@ -783,7 +783,7 @@ class Account(client: Client) : Service(client) { val apiParams = mutableMapOf<String, Any?>( ) - val apiHeaders = mutableMapOf( + val apiHeaders = mutableMapOf<String, String>( ) val converter: (Any) -> io.appwrite.models.Preferences<T> = { io.appwrite.models.Preferences.from(map = it as Map<String, Any>, nestedType) @@ -825,7 +825,7 @@ class Account(client: Client) : Service(client) { val apiParams = mutableMapOf<String, Any?>( "prefs" to prefs, ) - val apiHeaders = mutableMapOf( + val apiHeaders = mutableMapOf<String, String>( "content-type" to "application/json", ) val converter: (Any) -> io.appwrite.models.User<T> = { @@ -873,7 +873,7 @@ class Account(client: Client) : Service(client) { "email" to email, "url" to url, ) - val apiHeaders = mutableMapOf( + val apiHeaders = mutableMapOf<String, String>( "content-type" to "application/json", ) val converter: (Any) -> io.appwrite.models.Token = { @@ -910,7 +910,7 @@ class Account(client: Client) : Service(client) { "secret" to secret, "password" to password, ) - val apiHeaders = mutableMapOf( + val apiHeaders = mutableMapOf<String, String>( "content-type" to "application/json", ) val converter: (Any) -> io.appwrite.models.Token = { @@ -938,7 +938,7 @@ class Account(client: Client) : Service(client) { val apiParams = mutableMapOf<String, Any?>( ) - val apiHeaders = mutableMapOf( + val apiHeaders = mutableMapOf<String, String>( ) val converter: (Any) -> io.appwrite.models.SessionList = { io.appwrite.models.SessionList.from(map = it as Map<String, Any>) @@ -965,7 +965,7 @@ class Account(client: Client) : Service(client) { val apiParams = mutableMapOf<String, Any?>( ) - val apiHeaders = mutableMapOf( + val apiHeaders = mutableMapOf<String, String>( "content-type" to "application/json", ) return client.call( @@ -989,7 +989,7 @@ class Account(client: Client) : Service(client) { val apiParams = mutableMapOf<String, Any?>( ) - val apiHeaders = mutableMapOf( + val apiHeaders = mutableMapOf<String, String>( "content-type" to "application/json", ) val converter: (Any) -> io.appwrite.models.Session = { @@ -1023,7 +1023,7 @@ class Account(client: Client) : Service(client) { "email" to email, "password" to password, ) - val apiHeaders = mutableMapOf( + val apiHeaders = mutableMapOf<String, String>( "content-type" to "application/json", ) val converter: (Any) -> io.appwrite.models.Session = { @@ -1057,7 +1057,7 @@ class Account(client: Client) : Service(client) { "userId" to userId, "secret" to secret, ) - val apiHeaders = mutableMapOf( + val apiHeaders = mutableMapOf<String, String>( "content-type" to "application/json", ) val converter: (Any) -> io.appwrite.models.Session = { @@ -1091,7 +1091,7 @@ class Account(client: Client) : Service(client) { "userId" to userId, "secret" to secret, ) - val apiHeaders = mutableMapOf( + val apiHeaders = mutableMapOf<String, String>( "content-type" to "application/json", ) val converter: (Any) -> io.appwrite.models.Session = { @@ -1125,7 +1125,7 @@ class Account(client: Client) : Service(client) { "userId" to userId, "secret" to secret, ) - val apiHeaders = mutableMapOf( + val apiHeaders = mutableMapOf<String, String>( "content-type" to "application/json", ) val converter: (Any) -> io.appwrite.models.Session = { @@ -1156,7 +1156,7 @@ class Account(client: Client) : Service(client) { val apiParams = mutableMapOf<String, Any?>( ) - val apiHeaders = mutableMapOf( + val apiHeaders = mutableMapOf<String, String>( ) val converter: (Any) -> io.appwrite.models.Session = { io.appwrite.models.Session.from(map = it as Map<String, Any>) @@ -1186,7 +1186,7 @@ class Account(client: Client) : Service(client) { val apiParams = mutableMapOf<String, Any?>( ) - val apiHeaders = mutableMapOf( + val apiHeaders = mutableMapOf<String, String>( "content-type" to "application/json", ) val converter: (Any) -> io.appwrite.models.Session = { @@ -1217,7 +1217,7 @@ class Account(client: Client) : Service(client) { val apiParams = mutableMapOf<String, Any?>( ) - val apiHeaders = mutableMapOf( + val apiHeaders = mutableMapOf<String, String>( "content-type" to "application/json", ) return client.call( @@ -1242,7 +1242,7 @@ class Account(client: Client) : Service(client) { val apiParams = mutableMapOf<String, Any?>( ) - val apiHeaders = mutableMapOf( + val apiHeaders = mutableMapOf<String, String>( "content-type" to "application/json", ) val converter: (Any) -> io.appwrite.models.User<T> = { @@ -1291,7 +1291,7 @@ class Account(client: Client) : Service(client) { "email" to email, "phrase" to phrase, ) - val apiHeaders = mutableMapOf( + val apiHeaders = mutableMapOf<String, String>( "content-type" to "application/json", ) val converter: (Any) -> io.appwrite.models.Token = { @@ -1332,7 +1332,7 @@ class Account(client: Client) : Service(client) { "url" to url, "phrase" to phrase, ) - val apiHeaders = mutableMapOf( + val apiHeaders = mutableMapOf<String, String>( "content-type" to "application/json", ) val converter: (Any) -> io.appwrite.models.Token = { @@ -1373,7 +1373,7 @@ class Account(client: Client) : Service(client) { "failure" to failure, "scopes" to scopes, ) - val apiHeaders = mutableMapOf( + val apiHeaders = mutableMapOf<String, String>( ) return client.redirect( "GET", @@ -1401,7 +1401,7 @@ class Account(client: Client) : Service(client) { "userId" to userId, "phone" to phone, ) - val apiHeaders = mutableMapOf( + val apiHeaders = mutableMapOf<String, String>( "content-type" to "application/json", ) val converter: (Any) -> io.appwrite.models.Token = { @@ -1432,7 +1432,7 @@ class Account(client: Client) : Service(client) { val apiParams = mutableMapOf<String, Any?>( "url" to url, ) - val apiHeaders = mutableMapOf( + val apiHeaders = mutableMapOf<String, String>( "content-type" to "application/json", ) val converter: (Any) -> io.appwrite.models.Token = { @@ -1466,7 +1466,7 @@ class Account(client: Client) : Service(client) { "userId" to userId, "secret" to secret, ) - val apiHeaders = mutableMapOf( + val apiHeaders = mutableMapOf<String, String>( "content-type" to "application/json", ) val converter: (Any) -> io.appwrite.models.Token = { @@ -1494,7 +1494,7 @@ class Account(client: Client) : Service(client) { val apiParams = mutableMapOf<String, Any?>( ) - val apiHeaders = mutableMapOf( + val apiHeaders = mutableMapOf<String, String>( "content-type" to "application/json", ) val converter: (Any) -> io.appwrite.models.Token = { @@ -1528,7 +1528,7 @@ class Account(client: Client) : Service(client) { "userId" to userId, "secret" to secret, ) - val apiHeaders = mutableMapOf( + val apiHeaders = mutableMapOf<String, String>( "content-type" to "application/json", ) val converter: (Any) -> io.appwrite.models.Token = { diff --git a/src/main/kotlin/io/appwrite/services/Avatars.kt b/src/main/kotlin/io/appwrite/services/Avatars.kt index 7427e65..1739600 100644 --- a/src/main/kotlin/io/appwrite/services/Avatars.kt +++ b/src/main/kotlin/io/appwrite/services/Avatars.kt @@ -40,7 +40,7 @@ class Avatars(client: Client) : Service(client) { "height" to height, "quality" to quality, ) - val apiHeaders = mutableMapOf( + val apiHeaders = mutableMapOf<String, String>( ) return client.call( "GET", @@ -75,7 +75,7 @@ class Avatars(client: Client) : Service(client) { "height" to height, "quality" to quality, ) - val apiHeaders = mutableMapOf( + val apiHeaders = mutableMapOf<String, String>( ) return client.call( "GET", @@ -100,7 +100,7 @@ class Avatars(client: Client) : Service(client) { val apiParams = mutableMapOf<String, Any?>( "url" to url, ) - val apiHeaders = mutableMapOf( + val apiHeaders = mutableMapOf<String, String>( ) return client.call( "GET", @@ -135,7 +135,7 @@ class Avatars(client: Client) : Service(client) { "height" to height, "quality" to quality, ) - val apiHeaders = mutableMapOf( + val apiHeaders = mutableMapOf<String, String>( ) return client.call( "GET", @@ -167,7 +167,7 @@ class Avatars(client: Client) : Service(client) { "width" to width, "height" to height, ) - val apiHeaders = mutableMapOf( + val apiHeaders = mutableMapOf<String, String>( ) return client.call( "GET", @@ -202,7 +202,7 @@ class Avatars(client: Client) : Service(client) { "height" to height, "background" to background, ) - val apiHeaders = mutableMapOf( + val apiHeaders = mutableMapOf<String, String>( ) return client.call( "GET", @@ -237,7 +237,7 @@ class Avatars(client: Client) : Service(client) { "margin" to margin, "download" to download, ) - val apiHeaders = mutableMapOf( + val apiHeaders = mutableMapOf<String, String>( ) return client.call( "GET", diff --git a/src/main/kotlin/io/appwrite/services/Databases.kt b/src/main/kotlin/io/appwrite/services/Databases.kt index d24e014..32685cc 100644 --- a/src/main/kotlin/io/appwrite/services/Databases.kt +++ b/src/main/kotlin/io/appwrite/services/Databases.kt @@ -32,7 +32,7 @@ class Databases(client: Client) : Service(client) { "queries" to queries, "search" to search, ) - val apiHeaders = mutableMapOf( + val apiHeaders = mutableMapOf<String, String>( ) val converter: (Any) -> io.appwrite.models.DatabaseList = { io.appwrite.models.DatabaseList.from(map = it as Map<String, Any>) @@ -69,7 +69,7 @@ class Databases(client: Client) : Service(client) { "name" to name, "enabled" to enabled, ) - val apiHeaders = mutableMapOf( + val apiHeaders = mutableMapOf<String, String>( "content-type" to "application/json", ) val converter: (Any) -> io.appwrite.models.Database = { @@ -100,7 +100,7 @@ class Databases(client: Client) : Service(client) { val apiParams = mutableMapOf<String, Any?>( ) - val apiHeaders = mutableMapOf( + val apiHeaders = mutableMapOf<String, String>( ) val converter: (Any) -> io.appwrite.models.Database = { io.appwrite.models.Database.from(map = it as Map<String, Any>) @@ -137,7 +137,7 @@ class Databases(client: Client) : Service(client) { "name" to name, "enabled" to enabled, ) - val apiHeaders = mutableMapOf( + val apiHeaders = mutableMapOf<String, String>( "content-type" to "application/json", ) val converter: (Any) -> io.appwrite.models.Database = { @@ -168,7 +168,7 @@ class Databases(client: Client) : Service(client) { val apiParams = mutableMapOf<String, Any?>( ) - val apiHeaders = mutableMapOf( + val apiHeaders = mutableMapOf<String, String>( "content-type" to "application/json", ) return client.call( @@ -202,7 +202,7 @@ class Databases(client: Client) : Service(client) { "queries" to queries, "search" to search, ) - val apiHeaders = mutableMapOf( + val apiHeaders = mutableMapOf<String, String>( ) val converter: (Any) -> io.appwrite.models.CollectionList = { io.appwrite.models.CollectionList.from(map = it as Map<String, Any>) @@ -248,7 +248,7 @@ class Databases(client: Client) : Service(client) { "documentSecurity" to documentSecurity, "enabled" to enabled, ) - val apiHeaders = mutableMapOf( + val apiHeaders = mutableMapOf<String, String>( "content-type" to "application/json", ) val converter: (Any) -> io.appwrite.models.Collection = { @@ -282,7 +282,7 @@ class Databases(client: Client) : Service(client) { val apiParams = mutableMapOf<String, Any?>( ) - val apiHeaders = mutableMapOf( + val apiHeaders = mutableMapOf<String, String>( ) val converter: (Any) -> io.appwrite.models.Collection = { io.appwrite.models.Collection.from(map = it as Map<String, Any>) @@ -328,7 +328,7 @@ class Databases(client: Client) : Service(client) { "documentSecurity" to documentSecurity, "enabled" to enabled, ) - val apiHeaders = mutableMapOf( + val apiHeaders = mutableMapOf<String, String>( "content-type" to "application/json", ) val converter: (Any) -> io.appwrite.models.Collection = { @@ -362,7 +362,7 @@ class Databases(client: Client) : Service(client) { val apiParams = mutableMapOf<String, Any?>( ) - val apiHeaders = mutableMapOf( + val apiHeaders = mutableMapOf<String, String>( "content-type" to "application/json", ) return client.call( @@ -396,7 +396,7 @@ class Databases(client: Client) : Service(client) { val apiParams = mutableMapOf<String, Any?>( "queries" to queries, ) - val apiHeaders = mutableMapOf( + val apiHeaders = mutableMapOf<String, String>( ) val converter: (Any) -> io.appwrite.models.AttributeList = { io.appwrite.models.AttributeList.from(map = it as Map<String, Any>) @@ -442,7 +442,7 @@ class Databases(client: Client) : Service(client) { "default" to default, "array" to array, ) - val apiHeaders = mutableMapOf( + val apiHeaders = mutableMapOf<String, String>( "content-type" to "application/json", ) val converter: (Any) -> io.appwrite.models.AttributeBoolean = { @@ -489,7 +489,7 @@ class Databases(client: Client) : Service(client) { "default" to default, "newKey" to newKey, ) - val apiHeaders = mutableMapOf( + val apiHeaders = mutableMapOf<String, String>( "content-type" to "application/json", ) val converter: (Any) -> io.appwrite.models.AttributeBoolean = { @@ -536,7 +536,7 @@ class Databases(client: Client) : Service(client) { "default" to default, "array" to array, ) - val apiHeaders = mutableMapOf( + val apiHeaders = mutableMapOf<String, String>( "content-type" to "application/json", ) val converter: (Any) -> io.appwrite.models.AttributeDatetime = { @@ -583,7 +583,7 @@ class Databases(client: Client) : Service(client) { "default" to default, "newKey" to newKey, ) - val apiHeaders = mutableMapOf( + val apiHeaders = mutableMapOf<String, String>( "content-type" to "application/json", ) val converter: (Any) -> io.appwrite.models.AttributeDatetime = { @@ -630,7 +630,7 @@ class Databases(client: Client) : Service(client) { "default" to default, "array" to array, ) - val apiHeaders = mutableMapOf( + val apiHeaders = mutableMapOf<String, String>( "content-type" to "application/json", ) val converter: (Any) -> io.appwrite.models.AttributeEmail = { @@ -677,7 +677,7 @@ class Databases(client: Client) : Service(client) { "default" to default, "newKey" to newKey, ) - val apiHeaders = mutableMapOf( + val apiHeaders = mutableMapOf<String, String>( "content-type" to "application/json", ) val converter: (Any) -> io.appwrite.models.AttributeEmail = { @@ -727,7 +727,7 @@ class Databases(client: Client) : Service(client) { "default" to default, "array" to array, ) - val apiHeaders = mutableMapOf( + val apiHeaders = mutableMapOf<String, String>( "content-type" to "application/json", ) val converter: (Any) -> io.appwrite.models.AttributeEnum = { @@ -777,7 +777,7 @@ class Databases(client: Client) : Service(client) { "default" to default, "newKey" to newKey, ) - val apiHeaders = mutableMapOf( + val apiHeaders = mutableMapOf<String, String>( "content-type" to "application/json", ) val converter: (Any) -> io.appwrite.models.AttributeEnum = { @@ -830,7 +830,7 @@ class Databases(client: Client) : Service(client) { "default" to default, "array" to array, ) - val apiHeaders = mutableMapOf( + val apiHeaders = mutableMapOf<String, String>( "content-type" to "application/json", ) val converter: (Any) -> io.appwrite.models.AttributeFloat = { @@ -883,7 +883,7 @@ class Databases(client: Client) : Service(client) { "default" to default, "newKey" to newKey, ) - val apiHeaders = mutableMapOf( + val apiHeaders = mutableMapOf<String, String>( "content-type" to "application/json", ) val converter: (Any) -> io.appwrite.models.AttributeFloat = { @@ -936,7 +936,7 @@ class Databases(client: Client) : Service(client) { "default" to default, "array" to array, ) - val apiHeaders = mutableMapOf( + val apiHeaders = mutableMapOf<String, String>( "content-type" to "application/json", ) val converter: (Any) -> io.appwrite.models.AttributeInteger = { @@ -989,7 +989,7 @@ class Databases(client: Client) : Service(client) { "default" to default, "newKey" to newKey, ) - val apiHeaders = mutableMapOf( + val apiHeaders = mutableMapOf<String, String>( "content-type" to "application/json", ) val converter: (Any) -> io.appwrite.models.AttributeInteger = { @@ -1036,7 +1036,7 @@ class Databases(client: Client) : Service(client) { "default" to default, "array" to array, ) - val apiHeaders = mutableMapOf( + val apiHeaders = mutableMapOf<String, String>( "content-type" to "application/json", ) val converter: (Any) -> io.appwrite.models.AttributeIp = { @@ -1083,7 +1083,7 @@ class Databases(client: Client) : Service(client) { "default" to default, "newKey" to newKey, ) - val apiHeaders = mutableMapOf( + val apiHeaders = mutableMapOf<String, String>( "content-type" to "application/json", ) val converter: (Any) -> io.appwrite.models.AttributeIp = { @@ -1136,7 +1136,7 @@ class Databases(client: Client) : Service(client) { "twoWayKey" to twoWayKey, "onDelete" to onDelete, ) - val apiHeaders = mutableMapOf( + val apiHeaders = mutableMapOf<String, String>( "content-type" to "application/json", ) val converter: (Any) -> io.appwrite.models.AttributeRelationship = { @@ -1189,7 +1189,7 @@ class Databases(client: Client) : Service(client) { "array" to array, "encrypt" to encrypt, ) - val apiHeaders = mutableMapOf( + val apiHeaders = mutableMapOf<String, String>( "content-type" to "application/json", ) val converter: (Any) -> io.appwrite.models.AttributeString = { @@ -1239,7 +1239,7 @@ class Databases(client: Client) : Service(client) { "size" to size, "newKey" to newKey, ) - val apiHeaders = mutableMapOf( + val apiHeaders = mutableMapOf<String, String>( "content-type" to "application/json", ) val converter: (Any) -> io.appwrite.models.AttributeString = { @@ -1286,7 +1286,7 @@ class Databases(client: Client) : Service(client) { "default" to default, "array" to array, ) - val apiHeaders = mutableMapOf( + val apiHeaders = mutableMapOf<String, String>( "content-type" to "application/json", ) val converter: (Any) -> io.appwrite.models.AttributeUrl = { @@ -1333,7 +1333,7 @@ class Databases(client: Client) : Service(client) { "default" to default, "newKey" to newKey, ) - val apiHeaders = mutableMapOf( + val apiHeaders = mutableMapOf<String, String>( "content-type" to "application/json", ) val converter: (Any) -> io.appwrite.models.AttributeUrl = { @@ -1370,7 +1370,7 @@ class Databases(client: Client) : Service(client) { val apiParams = mutableMapOf<String, Any?>( ) - val apiHeaders = mutableMapOf( + val apiHeaders = mutableMapOf<String, String>( ) return client.call( "GET", @@ -1402,7 +1402,7 @@ class Databases(client: Client) : Service(client) { val apiParams = mutableMapOf<String, Any?>( ) - val apiHeaders = mutableMapOf( + val apiHeaders = mutableMapOf<String, String>( "content-type" to "application/json", ) return client.call( @@ -1442,7 +1442,7 @@ class Databases(client: Client) : Service(client) { "onDelete" to onDelete, "newKey" to newKey, ) - val apiHeaders = mutableMapOf( + val apiHeaders = mutableMapOf<String, String>( "content-type" to "application/json", ) val converter: (Any) -> io.appwrite.models.AttributeRelationship = { @@ -1481,7 +1481,7 @@ class Databases(client: Client) : Service(client) { val apiParams = mutableMapOf<String, Any?>( "queries" to queries, ) - val apiHeaders = mutableMapOf( + val apiHeaders = mutableMapOf<String, String>( ) val converter: (Any) -> io.appwrite.models.DocumentList<T> = { io.appwrite.models.DocumentList.from(map = it as Map<String, Any>, nestedType) @@ -1546,7 +1546,7 @@ class Databases(client: Client) : Service(client) { "data" to data, "permissions" to permissions, ) - val apiHeaders = mutableMapOf( + val apiHeaders = mutableMapOf<String, String>( "content-type" to "application/json", ) val converter: (Any) -> io.appwrite.models.Document<T> = { @@ -1615,7 +1615,7 @@ class Databases(client: Client) : Service(client) { val apiParams = mutableMapOf<String, Any?>( "queries" to queries, ) - val apiHeaders = mutableMapOf( + val apiHeaders = mutableMapOf<String, String>( ) val converter: (Any) -> io.appwrite.models.Document<T> = { io.appwrite.models.Document.from(map = it as Map<String, Any>, nestedType) @@ -1683,7 +1683,7 @@ class Databases(client: Client) : Service(client) { "data" to data, "permissions" to permissions, ) - val apiHeaders = mutableMapOf( + val apiHeaders = mutableMapOf<String, String>( "content-type" to "application/json", ) val converter: (Any) -> io.appwrite.models.Document<T> = { @@ -1747,7 +1747,7 @@ class Databases(client: Client) : Service(client) { val apiParams = mutableMapOf<String, Any?>( ) - val apiHeaders = mutableMapOf( + val apiHeaders = mutableMapOf<String, String>( "content-type" to "application/json", ) return client.call( @@ -1781,7 +1781,7 @@ class Databases(client: Client) : Service(client) { val apiParams = mutableMapOf<String, Any?>( "queries" to queries, ) - val apiHeaders = mutableMapOf( + val apiHeaders = mutableMapOf<String, String>( ) val converter: (Any) -> io.appwrite.models.IndexList = { io.appwrite.models.IndexList.from(map = it as Map<String, Any>) @@ -1827,7 +1827,7 @@ class Databases(client: Client) : Service(client) { "attributes" to attributes, "orders" to orders, ) - val apiHeaders = mutableMapOf( + val apiHeaders = mutableMapOf<String, String>( "content-type" to "application/json", ) val converter: (Any) -> io.appwrite.models.Index = { @@ -1864,7 +1864,7 @@ class Databases(client: Client) : Service(client) { val apiParams = mutableMapOf<String, Any?>( ) - val apiHeaders = mutableMapOf( + val apiHeaders = mutableMapOf<String, String>( ) val converter: (Any) -> io.appwrite.models.Index = { io.appwrite.models.Index.from(map = it as Map<String, Any>) @@ -1900,7 +1900,7 @@ class Databases(client: Client) : Service(client) { val apiParams = mutableMapOf<String, Any?>( ) - val apiHeaders = mutableMapOf( + val apiHeaders = mutableMapOf<String, String>( "content-type" to "application/json", ) return client.call( diff --git a/src/main/kotlin/io/appwrite/services/Functions.kt b/src/main/kotlin/io/appwrite/services/Functions.kt index e445cbe..124d410 100644 --- a/src/main/kotlin/io/appwrite/services/Functions.kt +++ b/src/main/kotlin/io/appwrite/services/Functions.kt @@ -34,7 +34,7 @@ class Functions(client: Client) : Service(client) { "queries" to queries, "search" to search, ) - val apiHeaders = mutableMapOf( + val apiHeaders = mutableMapOf<String, String>( ) val converter: (Any) -> io.appwrite.models.FunctionList = { io.appwrite.models.FunctionList.from(map = it as Map<String, Any>) @@ -128,7 +128,7 @@ class Functions(client: Client) : Service(client) { "templateVersion" to templateVersion, "specification" to specification, ) - val apiHeaders = mutableMapOf( + val apiHeaders = mutableMapOf<String, String>( "content-type" to "application/json", ) val converter: (Any) -> io.appwrite.models.Function = { @@ -156,7 +156,7 @@ class Functions(client: Client) : Service(client) { val apiParams = mutableMapOf<String, Any?>( ) - val apiHeaders = mutableMapOf( + val apiHeaders = mutableMapOf<String, String>( ) val converter: (Any) -> io.appwrite.models.RuntimeList = { io.appwrite.models.RuntimeList.from(map = it as Map<String, Any>) @@ -183,7 +183,7 @@ class Functions(client: Client) : Service(client) { val apiParams = mutableMapOf<String, Any?>( ) - val apiHeaders = mutableMapOf( + val apiHeaders = mutableMapOf<String, String>( ) val converter: (Any) -> io.appwrite.models.SpecificationList = { io.appwrite.models.SpecificationList.from(map = it as Map<String, Any>) @@ -213,7 +213,7 @@ class Functions(client: Client) : Service(client) { val apiParams = mutableMapOf<String, Any?>( ) - val apiHeaders = mutableMapOf( + val apiHeaders = mutableMapOf<String, String>( ) val converter: (Any) -> io.appwrite.models.Function = { io.appwrite.models.Function.from(map = it as Map<String, Any>) @@ -295,7 +295,7 @@ class Functions(client: Client) : Service(client) { "providerRootDirectory" to providerRootDirectory, "specification" to specification, ) - val apiHeaders = mutableMapOf( + val apiHeaders = mutableMapOf<String, String>( "content-type" to "application/json", ) val converter: (Any) -> io.appwrite.models.Function = { @@ -326,7 +326,7 @@ class Functions(client: Client) : Service(client) { val apiParams = mutableMapOf<String, Any?>( ) - val apiHeaders = mutableMapOf( + val apiHeaders = mutableMapOf<String, String>( "content-type" to "application/json", ) return client.call( @@ -360,7 +360,7 @@ class Functions(client: Client) : Service(client) { "queries" to queries, "search" to search, ) - val apiHeaders = mutableMapOf( + val apiHeaders = mutableMapOf<String, String>( ) val converter: (Any) -> io.appwrite.models.DeploymentList = { io.appwrite.models.DeploymentList.from(map = it as Map<String, Any>) @@ -404,7 +404,7 @@ class Functions(client: Client) : Service(client) { "code" to code, "activate" to activate, ) - val apiHeaders = mutableMapOf( + val apiHeaders = mutableMapOf<String, String>( "content-type" to "multipart/form-data", ) val converter: (Any) -> io.appwrite.models.Deployment = { @@ -442,7 +442,7 @@ class Functions(client: Client) : Service(client) { val apiParams = mutableMapOf<String, Any?>( ) - val apiHeaders = mutableMapOf( + val apiHeaders = mutableMapOf<String, String>( ) val converter: (Any) -> io.appwrite.models.Deployment = { io.appwrite.models.Deployment.from(map = it as Map<String, Any>) @@ -475,7 +475,7 @@ class Functions(client: Client) : Service(client) { val apiParams = mutableMapOf<String, Any?>( ) - val apiHeaders = mutableMapOf( + val apiHeaders = mutableMapOf<String, String>( "content-type" to "application/json", ) val converter: (Any) -> io.appwrite.models.Function = { @@ -509,7 +509,7 @@ class Functions(client: Client) : Service(client) { val apiParams = mutableMapOf<String, Any?>( ) - val apiHeaders = mutableMapOf( + val apiHeaders = mutableMapOf<String, String>( "content-type" to "application/json", ) return client.call( @@ -543,7 +543,7 @@ class Functions(client: Client) : Service(client) { val apiParams = mutableMapOf<String, Any?>( "buildId" to buildId, ) - val apiHeaders = mutableMapOf( + val apiHeaders = mutableMapOf<String, String>( "content-type" to "application/json", ) return client.call( @@ -573,7 +573,7 @@ class Functions(client: Client) : Service(client) { val apiParams = mutableMapOf<String, Any?>( ) - val apiHeaders = mutableMapOf( + val apiHeaders = mutableMapOf<String, String>( "content-type" to "application/json", ) val converter: (Any) -> io.appwrite.models.Build = { @@ -607,7 +607,7 @@ class Functions(client: Client) : Service(client) { val apiParams = mutableMapOf<String, Any?>( ) - val apiHeaders = mutableMapOf( + val apiHeaders = mutableMapOf<String, String>( ) return client.call( "GET", @@ -639,7 +639,7 @@ class Functions(client: Client) : Service(client) { "queries" to queries, "search" to search, ) - val apiHeaders = mutableMapOf( + val apiHeaders = mutableMapOf<String, String>( ) val converter: (Any) -> io.appwrite.models.ExecutionList = { io.appwrite.models.ExecutionList.from(map = it as Map<String, Any>) @@ -688,7 +688,7 @@ class Functions(client: Client) : Service(client) { "headers" to headers, "scheduledAt" to scheduledAt, ) - val apiHeaders = mutableMapOf( + val apiHeaders = mutableMapOf<String, String>( "content-type" to "application/json", ) val converter: (Any) -> io.appwrite.models.Execution = { @@ -722,7 +722,7 @@ class Functions(client: Client) : Service(client) { val apiParams = mutableMapOf<String, Any?>( ) - val apiHeaders = mutableMapOf( + val apiHeaders = mutableMapOf<String, String>( ) val converter: (Any) -> io.appwrite.models.Execution = { io.appwrite.models.Execution.from(map = it as Map<String, Any>) @@ -755,7 +755,7 @@ class Functions(client: Client) : Service(client) { val apiParams = mutableMapOf<String, Any?>( ) - val apiHeaders = mutableMapOf( + val apiHeaders = mutableMapOf<String, String>( "content-type" to "application/json", ) return client.call( @@ -782,7 +782,7 @@ class Functions(client: Client) : Service(client) { val apiParams = mutableMapOf<String, Any?>( ) - val apiHeaders = mutableMapOf( + val apiHeaders = mutableMapOf<String, String>( ) val converter: (Any) -> io.appwrite.models.VariableList = { io.appwrite.models.VariableList.from(map = it as Map<String, Any>) @@ -818,7 +818,7 @@ class Functions(client: Client) : Service(client) { "key" to key, "value" to value, ) - val apiHeaders = mutableMapOf( + val apiHeaders = mutableMapOf<String, String>( "content-type" to "application/json", ) val converter: (Any) -> io.appwrite.models.Variable = { @@ -852,7 +852,7 @@ class Functions(client: Client) : Service(client) { val apiParams = mutableMapOf<String, Any?>( ) - val apiHeaders = mutableMapOf( + val apiHeaders = mutableMapOf<String, String>( ) val converter: (Any) -> io.appwrite.models.Variable = { io.appwrite.models.Variable.from(map = it as Map<String, Any>) @@ -892,7 +892,7 @@ class Functions(client: Client) : Service(client) { "key" to key, "value" to value, ) - val apiHeaders = mutableMapOf( + val apiHeaders = mutableMapOf<String, String>( "content-type" to "application/json", ) val converter: (Any) -> io.appwrite.models.Variable = { @@ -926,7 +926,7 @@ class Functions(client: Client) : Service(client) { val apiParams = mutableMapOf<String, Any?>( ) - val apiHeaders = mutableMapOf( + val apiHeaders = mutableMapOf<String, String>( "content-type" to "application/json", ) return client.call( diff --git a/src/main/kotlin/io/appwrite/services/Graphql.kt b/src/main/kotlin/io/appwrite/services/Graphql.kt index 1e72cd4..c32b546 100644 --- a/src/main/kotlin/io/appwrite/services/Graphql.kt +++ b/src/main/kotlin/io/appwrite/services/Graphql.kt @@ -28,7 +28,7 @@ class Graphql(client: Client) : Service(client) { val apiParams = mutableMapOf<String, Any?>( "query" to query, ) - val apiHeaders = mutableMapOf( + val apiHeaders = mutableMapOf<String, String>( "x-sdk-graphql" to "true", "content-type" to "application/json", ) @@ -60,7 +60,7 @@ class Graphql(client: Client) : Service(client) { val apiParams = mutableMapOf<String, Any?>( "query" to query, ) - val apiHeaders = mutableMapOf( + val apiHeaders = mutableMapOf<String, String>( "x-sdk-graphql" to "true", "content-type" to "application/json", ) diff --git a/src/main/kotlin/io/appwrite/services/Health.kt b/src/main/kotlin/io/appwrite/services/Health.kt index 9302782..af44ef1 100644 --- a/src/main/kotlin/io/appwrite/services/Health.kt +++ b/src/main/kotlin/io/appwrite/services/Health.kt @@ -25,7 +25,7 @@ class Health(client: Client) : Service(client) { val apiParams = mutableMapOf<String, Any?>( ) - val apiHeaders = mutableMapOf( + val apiHeaders = mutableMapOf<String, String>( ) val converter: (Any) -> io.appwrite.models.HealthStatus = { io.appwrite.models.HealthStatus.from(map = it as Map<String, Any>) @@ -52,7 +52,7 @@ class Health(client: Client) : Service(client) { val apiParams = mutableMapOf<String, Any?>( ) - val apiHeaders = mutableMapOf( + val apiHeaders = mutableMapOf<String, String>( ) val converter: (Any) -> io.appwrite.models.HealthAntivirus = { io.appwrite.models.HealthAntivirus.from(map = it as Map<String, Any>) @@ -79,7 +79,7 @@ class Health(client: Client) : Service(client) { val apiParams = mutableMapOf<String, Any?>( ) - val apiHeaders = mutableMapOf( + val apiHeaders = mutableMapOf<String, String>( ) val converter: (Any) -> io.appwrite.models.HealthStatus = { io.appwrite.models.HealthStatus.from(map = it as Map<String, Any>) @@ -110,7 +110,7 @@ class Health(client: Client) : Service(client) { val apiParams = mutableMapOf<String, Any?>( "domain" to domain, ) - val apiHeaders = mutableMapOf( + val apiHeaders = mutableMapOf<String, String>( ) val converter: (Any) -> io.appwrite.models.HealthCertificate = { io.appwrite.models.HealthCertificate.from(map = it as Map<String, Any>) @@ -137,7 +137,7 @@ class Health(client: Client) : Service(client) { val apiParams = mutableMapOf<String, Any?>( ) - val apiHeaders = mutableMapOf( + val apiHeaders = mutableMapOf<String, String>( ) val converter: (Any) -> io.appwrite.models.HealthStatus = { io.appwrite.models.HealthStatus.from(map = it as Map<String, Any>) @@ -164,7 +164,7 @@ class Health(client: Client) : Service(client) { val apiParams = mutableMapOf<String, Any?>( ) - val apiHeaders = mutableMapOf( + val apiHeaders = mutableMapOf<String, String>( ) val converter: (Any) -> io.appwrite.models.HealthStatus = { io.appwrite.models.HealthStatus.from(map = it as Map<String, Any>) @@ -195,7 +195,7 @@ class Health(client: Client) : Service(client) { val apiParams = mutableMapOf<String, Any?>( "threshold" to threshold, ) - val apiHeaders = mutableMapOf( + val apiHeaders = mutableMapOf<String, String>( ) val converter: (Any) -> io.appwrite.models.HealthQueue = { io.appwrite.models.HealthQueue.from(map = it as Map<String, Any>) @@ -226,7 +226,7 @@ class Health(client: Client) : Service(client) { val apiParams = mutableMapOf<String, Any?>( "threshold" to threshold, ) - val apiHeaders = mutableMapOf( + val apiHeaders = mutableMapOf<String, String>( ) val converter: (Any) -> io.appwrite.models.HealthQueue = { io.appwrite.models.HealthQueue.from(map = it as Map<String, Any>) @@ -260,7 +260,7 @@ class Health(client: Client) : Service(client) { "name" to name, "threshold" to threshold, ) - val apiHeaders = mutableMapOf( + val apiHeaders = mutableMapOf<String, String>( ) val converter: (Any) -> io.appwrite.models.HealthQueue = { io.appwrite.models.HealthQueue.from(map = it as Map<String, Any>) @@ -291,7 +291,7 @@ class Health(client: Client) : Service(client) { val apiParams = mutableMapOf<String, Any?>( "threshold" to threshold, ) - val apiHeaders = mutableMapOf( + val apiHeaders = mutableMapOf<String, String>( ) val converter: (Any) -> io.appwrite.models.HealthQueue = { io.appwrite.models.HealthQueue.from(map = it as Map<String, Any>) @@ -325,7 +325,7 @@ class Health(client: Client) : Service(client) { val apiParams = mutableMapOf<String, Any?>( "threshold" to threshold, ) - val apiHeaders = mutableMapOf( + val apiHeaders = mutableMapOf<String, String>( ) val converter: (Any) -> io.appwrite.models.HealthQueue = { io.appwrite.models.HealthQueue.from(map = it as Map<String, Any>) @@ -356,7 +356,7 @@ class Health(client: Client) : Service(client) { val apiParams = mutableMapOf<String, Any?>( "threshold" to threshold, ) - val apiHeaders = mutableMapOf( + val apiHeaders = mutableMapOf<String, String>( ) val converter: (Any) -> io.appwrite.models.HealthQueue = { io.appwrite.models.HealthQueue.from(map = it as Map<String, Any>) @@ -387,7 +387,7 @@ class Health(client: Client) : Service(client) { val apiParams = mutableMapOf<String, Any?>( "threshold" to threshold, ) - val apiHeaders = mutableMapOf( + val apiHeaders = mutableMapOf<String, String>( ) val converter: (Any) -> io.appwrite.models.HealthQueue = { io.appwrite.models.HealthQueue.from(map = it as Map<String, Any>) @@ -418,7 +418,7 @@ class Health(client: Client) : Service(client) { val apiParams = mutableMapOf<String, Any?>( "threshold" to threshold, ) - val apiHeaders = mutableMapOf( + val apiHeaders = mutableMapOf<String, String>( ) val converter: (Any) -> io.appwrite.models.HealthQueue = { io.appwrite.models.HealthQueue.from(map = it as Map<String, Any>) @@ -449,7 +449,7 @@ class Health(client: Client) : Service(client) { val apiParams = mutableMapOf<String, Any?>( "threshold" to threshold, ) - val apiHeaders = mutableMapOf( + val apiHeaders = mutableMapOf<String, String>( ) val converter: (Any) -> io.appwrite.models.HealthQueue = { io.appwrite.models.HealthQueue.from(map = it as Map<String, Any>) @@ -480,7 +480,7 @@ class Health(client: Client) : Service(client) { val apiParams = mutableMapOf<String, Any?>( "threshold" to threshold, ) - val apiHeaders = mutableMapOf( + val apiHeaders = mutableMapOf<String, String>( ) val converter: (Any) -> io.appwrite.models.HealthQueue = { io.appwrite.models.HealthQueue.from(map = it as Map<String, Any>) @@ -511,7 +511,7 @@ class Health(client: Client) : Service(client) { val apiParams = mutableMapOf<String, Any?>( "threshold" to threshold, ) - val apiHeaders = mutableMapOf( + val apiHeaders = mutableMapOf<String, String>( ) val converter: (Any) -> io.appwrite.models.HealthQueue = { io.appwrite.models.HealthQueue.from(map = it as Map<String, Any>) @@ -542,7 +542,7 @@ class Health(client: Client) : Service(client) { val apiParams = mutableMapOf<String, Any?>( "threshold" to threshold, ) - val apiHeaders = mutableMapOf( + val apiHeaders = mutableMapOf<String, String>( ) val converter: (Any) -> io.appwrite.models.HealthQueue = { io.appwrite.models.HealthQueue.from(map = it as Map<String, Any>) @@ -573,7 +573,7 @@ class Health(client: Client) : Service(client) { val apiParams = mutableMapOf<String, Any?>( "threshold" to threshold, ) - val apiHeaders = mutableMapOf( + val apiHeaders = mutableMapOf<String, String>( ) val converter: (Any) -> io.appwrite.models.HealthQueue = { io.appwrite.models.HealthQueue.from(map = it as Map<String, Any>) @@ -600,7 +600,7 @@ class Health(client: Client) : Service(client) { val apiParams = mutableMapOf<String, Any?>( ) - val apiHeaders = mutableMapOf( + val apiHeaders = mutableMapOf<String, String>( ) val converter: (Any) -> io.appwrite.models.HealthStatus = { io.appwrite.models.HealthStatus.from(map = it as Map<String, Any>) @@ -627,7 +627,7 @@ class Health(client: Client) : Service(client) { val apiParams = mutableMapOf<String, Any?>( ) - val apiHeaders = mutableMapOf( + val apiHeaders = mutableMapOf<String, String>( ) val converter: (Any) -> io.appwrite.models.HealthStatus = { io.appwrite.models.HealthStatus.from(map = it as Map<String, Any>) @@ -654,7 +654,7 @@ class Health(client: Client) : Service(client) { val apiParams = mutableMapOf<String, Any?>( ) - val apiHeaders = mutableMapOf( + val apiHeaders = mutableMapOf<String, String>( ) val converter: (Any) -> io.appwrite.models.HealthTime = { io.appwrite.models.HealthTime.from(map = it as Map<String, Any>) diff --git a/src/main/kotlin/io/appwrite/services/Locale.kt b/src/main/kotlin/io/appwrite/services/Locale.kt index 28049e4..e598c0b 100644 --- a/src/main/kotlin/io/appwrite/services/Locale.kt +++ b/src/main/kotlin/io/appwrite/services/Locale.kt @@ -25,7 +25,7 @@ class Locale(client: Client) : Service(client) { val apiParams = mutableMapOf<String, Any?>( ) - val apiHeaders = mutableMapOf( + val apiHeaders = mutableMapOf<String, String>( ) val converter: (Any) -> io.appwrite.models.Locale = { io.appwrite.models.Locale.from(map = it as Map<String, Any>) @@ -52,7 +52,7 @@ class Locale(client: Client) : Service(client) { val apiParams = mutableMapOf<String, Any?>( ) - val apiHeaders = mutableMapOf( + val apiHeaders = mutableMapOf<String, String>( ) val converter: (Any) -> io.appwrite.models.LocaleCodeList = { io.appwrite.models.LocaleCodeList.from(map = it as Map<String, Any>) @@ -79,7 +79,7 @@ class Locale(client: Client) : Service(client) { val apiParams = mutableMapOf<String, Any?>( ) - val apiHeaders = mutableMapOf( + val apiHeaders = mutableMapOf<String, String>( ) val converter: (Any) -> io.appwrite.models.ContinentList = { io.appwrite.models.ContinentList.from(map = it as Map<String, Any>) @@ -106,7 +106,7 @@ class Locale(client: Client) : Service(client) { val apiParams = mutableMapOf<String, Any?>( ) - val apiHeaders = mutableMapOf( + val apiHeaders = mutableMapOf<String, String>( ) val converter: (Any) -> io.appwrite.models.CountryList = { io.appwrite.models.CountryList.from(map = it as Map<String, Any>) @@ -133,7 +133,7 @@ class Locale(client: Client) : Service(client) { val apiParams = mutableMapOf<String, Any?>( ) - val apiHeaders = mutableMapOf( + val apiHeaders = mutableMapOf<String, String>( ) val converter: (Any) -> io.appwrite.models.CountryList = { io.appwrite.models.CountryList.from(map = it as Map<String, Any>) @@ -160,7 +160,7 @@ class Locale(client: Client) : Service(client) { val apiParams = mutableMapOf<String, Any?>( ) - val apiHeaders = mutableMapOf( + val apiHeaders = mutableMapOf<String, String>( ) val converter: (Any) -> io.appwrite.models.PhoneList = { io.appwrite.models.PhoneList.from(map = it as Map<String, Any>) @@ -187,7 +187,7 @@ class Locale(client: Client) : Service(client) { val apiParams = mutableMapOf<String, Any?>( ) - val apiHeaders = mutableMapOf( + val apiHeaders = mutableMapOf<String, String>( ) val converter: (Any) -> io.appwrite.models.CurrencyList = { io.appwrite.models.CurrencyList.from(map = it as Map<String, Any>) @@ -214,7 +214,7 @@ class Locale(client: Client) : Service(client) { val apiParams = mutableMapOf<String, Any?>( ) - val apiHeaders = mutableMapOf( + val apiHeaders = mutableMapOf<String, String>( ) val converter: (Any) -> io.appwrite.models.LanguageList = { io.appwrite.models.LanguageList.from(map = it as Map<String, Any>) diff --git a/src/main/kotlin/io/appwrite/services/Messaging.kt b/src/main/kotlin/io/appwrite/services/Messaging.kt index f8e19d5..f8cfcff 100644 --- a/src/main/kotlin/io/appwrite/services/Messaging.kt +++ b/src/main/kotlin/io/appwrite/services/Messaging.kt @@ -32,7 +32,7 @@ class Messaging(client: Client) : Service(client) { "queries" to queries, "search" to search, ) - val apiHeaders = mutableMapOf( + val apiHeaders = mutableMapOf<String, String>( ) val converter: (Any) -> io.appwrite.models.MessageList = { io.appwrite.models.MessageList.from(map = it as Map<String, Any>) @@ -96,7 +96,7 @@ class Messaging(client: Client) : Service(client) { "html" to html, "scheduledAt" to scheduledAt, ) - val apiHeaders = mutableMapOf( + val apiHeaders = mutableMapOf<String, String>( "content-type" to "application/json", ) val converter: (Any) -> io.appwrite.models.Message = { @@ -161,7 +161,7 @@ class Messaging(client: Client) : Service(client) { "scheduledAt" to scheduledAt, "attachments" to attachments, ) - val apiHeaders = mutableMapOf( + val apiHeaders = mutableMapOf<String, String>( "content-type" to "application/json", ) val converter: (Any) -> io.appwrite.models.Message = { @@ -247,7 +247,7 @@ class Messaging(client: Client) : Service(client) { "critical" to critical, "priority" to priority, ) - val apiHeaders = mutableMapOf( + val apiHeaders = mutableMapOf<String, String>( "content-type" to "application/json", ) val converter: (Any) -> io.appwrite.models.Message = { @@ -333,7 +333,7 @@ class Messaging(client: Client) : Service(client) { "critical" to critical, "priority" to priority, ) - val apiHeaders = mutableMapOf( + val apiHeaders = mutableMapOf<String, String>( "content-type" to "application/json", ) val converter: (Any) -> io.appwrite.models.Message = { @@ -383,7 +383,7 @@ class Messaging(client: Client) : Service(client) { "draft" to draft, "scheduledAt" to scheduledAt, ) - val apiHeaders = mutableMapOf( + val apiHeaders = mutableMapOf<String, String>( "content-type" to "application/json", ) val converter: (Any) -> io.appwrite.models.Message = { @@ -433,7 +433,7 @@ class Messaging(client: Client) : Service(client) { "draft" to draft, "scheduledAt" to scheduledAt, ) - val apiHeaders = mutableMapOf( + val apiHeaders = mutableMapOf<String, String>( "content-type" to "application/json", ) val converter: (Any) -> io.appwrite.models.Message = { @@ -464,7 +464,7 @@ class Messaging(client: Client) : Service(client) { val apiParams = mutableMapOf<String, Any?>( ) - val apiHeaders = mutableMapOf( + val apiHeaders = mutableMapOf<String, String>( ) val converter: (Any) -> io.appwrite.models.Message = { io.appwrite.models.Message.from(map = it as Map<String, Any>) @@ -494,7 +494,7 @@ class Messaging(client: Client) : Service(client) { val apiParams = mutableMapOf<String, Any?>( ) - val apiHeaders = mutableMapOf( + val apiHeaders = mutableMapOf<String, String>( "content-type" to "application/json", ) return client.call( @@ -525,7 +525,7 @@ class Messaging(client: Client) : Service(client) { val apiParams = mutableMapOf<String, Any?>( "queries" to queries, ) - val apiHeaders = mutableMapOf( + val apiHeaders = mutableMapOf<String, String>( ) val converter: (Any) -> io.appwrite.models.LogList = { io.appwrite.models.LogList.from(map = it as Map<String, Any>) @@ -559,7 +559,7 @@ class Messaging(client: Client) : Service(client) { val apiParams = mutableMapOf<String, Any?>( "queries" to queries, ) - val apiHeaders = mutableMapOf( + val apiHeaders = mutableMapOf<String, String>( ) val converter: (Any) -> io.appwrite.models.TargetList = { io.appwrite.models.TargetList.from(map = it as Map<String, Any>) @@ -593,7 +593,7 @@ class Messaging(client: Client) : Service(client) { "queries" to queries, "search" to search, ) - val apiHeaders = mutableMapOf( + val apiHeaders = mutableMapOf<String, String>( ) val converter: (Any) -> io.appwrite.models.ProviderList = { io.appwrite.models.ProviderList.from(map = it as Map<String, Any>) @@ -645,7 +645,7 @@ class Messaging(client: Client) : Service(client) { "sandbox" to sandbox, "enabled" to enabled, ) - val apiHeaders = mutableMapOf( + val apiHeaders = mutableMapOf<String, String>( "content-type" to "application/json", ) val converter: (Any) -> io.appwrite.models.Provider = { @@ -698,7 +698,7 @@ class Messaging(client: Client) : Service(client) { "bundleId" to bundleId, "sandbox" to sandbox, ) - val apiHeaders = mutableMapOf( + val apiHeaders = mutableMapOf<String, String>( "content-type" to "application/json", ) val converter: (Any) -> io.appwrite.models.Provider = { @@ -739,7 +739,7 @@ class Messaging(client: Client) : Service(client) { "serviceAccountJSON" to serviceAccountJSON, "enabled" to enabled, ) - val apiHeaders = mutableMapOf( + val apiHeaders = mutableMapOf<String, String>( "content-type" to "application/json", ) val converter: (Any) -> io.appwrite.models.Provider = { @@ -780,7 +780,7 @@ class Messaging(client: Client) : Service(client) { "enabled" to enabled, "serviceAccountJSON" to serviceAccountJSON, ) - val apiHeaders = mutableMapOf( + val apiHeaders = mutableMapOf<String, String>( "content-type" to "application/json", ) val converter: (Any) -> io.appwrite.models.Provider = { @@ -839,7 +839,7 @@ class Messaging(client: Client) : Service(client) { "replyToEmail" to replyToEmail, "enabled" to enabled, ) - val apiHeaders = mutableMapOf( + val apiHeaders = mutableMapOf<String, String>( "content-type" to "application/json", ) val converter: (Any) -> io.appwrite.models.Provider = { @@ -898,7 +898,7 @@ class Messaging(client: Client) : Service(client) { "replyToName" to replyToName, "replyToEmail" to replyToEmail, ) - val apiHeaders = mutableMapOf( + val apiHeaders = mutableMapOf<String, String>( "content-type" to "application/json", ) val converter: (Any) -> io.appwrite.models.Provider = { @@ -945,7 +945,7 @@ class Messaging(client: Client) : Service(client) { "authKey" to authKey, "enabled" to enabled, ) - val apiHeaders = mutableMapOf( + val apiHeaders = mutableMapOf<String, String>( "content-type" to "application/json", ) val converter: (Any) -> io.appwrite.models.Provider = { @@ -992,7 +992,7 @@ class Messaging(client: Client) : Service(client) { "senderId" to senderId, "authKey" to authKey, ) - val apiHeaders = mutableMapOf( + val apiHeaders = mutableMapOf<String, String>( "content-type" to "application/json", ) val converter: (Any) -> io.appwrite.models.Provider = { @@ -1045,7 +1045,7 @@ class Messaging(client: Client) : Service(client) { "replyToEmail" to replyToEmail, "enabled" to enabled, ) - val apiHeaders = mutableMapOf( + val apiHeaders = mutableMapOf<String, String>( "content-type" to "application/json", ) val converter: (Any) -> io.appwrite.models.Provider = { @@ -1098,7 +1098,7 @@ class Messaging(client: Client) : Service(client) { "replyToName" to replyToName, "replyToEmail" to replyToEmail, ) - val apiHeaders = mutableMapOf( + val apiHeaders = mutableMapOf<String, String>( "content-type" to "application/json", ) val converter: (Any) -> io.appwrite.models.Provider = { @@ -1169,7 +1169,7 @@ class Messaging(client: Client) : Service(client) { "replyToEmail" to replyToEmail, "enabled" to enabled, ) - val apiHeaders = mutableMapOf( + val apiHeaders = mutableMapOf<String, String>( "content-type" to "application/json", ) val converter: (Any) -> io.appwrite.models.Provider = { @@ -1240,7 +1240,7 @@ class Messaging(client: Client) : Service(client) { "replyToEmail" to replyToEmail, "enabled" to enabled, ) - val apiHeaders = mutableMapOf( + val apiHeaders = mutableMapOf<String, String>( "content-type" to "application/json", ) val converter: (Any) -> io.appwrite.models.Provider = { @@ -1287,7 +1287,7 @@ class Messaging(client: Client) : Service(client) { "apiKey" to apiKey, "enabled" to enabled, ) - val apiHeaders = mutableMapOf( + val apiHeaders = mutableMapOf<String, String>( "content-type" to "application/json", ) val converter: (Any) -> io.appwrite.models.Provider = { @@ -1334,7 +1334,7 @@ class Messaging(client: Client) : Service(client) { "apiKey" to apiKey, "from" to from, ) - val apiHeaders = mutableMapOf( + val apiHeaders = mutableMapOf<String, String>( "content-type" to "application/json", ) val converter: (Any) -> io.appwrite.models.Provider = { @@ -1381,7 +1381,7 @@ class Messaging(client: Client) : Service(client) { "apiKey" to apiKey, "enabled" to enabled, ) - val apiHeaders = mutableMapOf( + val apiHeaders = mutableMapOf<String, String>( "content-type" to "application/json", ) val converter: (Any) -> io.appwrite.models.Provider = { @@ -1428,7 +1428,7 @@ class Messaging(client: Client) : Service(client) { "apiKey" to apiKey, "from" to from, ) - val apiHeaders = mutableMapOf( + val apiHeaders = mutableMapOf<String, String>( "content-type" to "application/json", ) val converter: (Any) -> io.appwrite.models.Provider = { @@ -1475,7 +1475,7 @@ class Messaging(client: Client) : Service(client) { "authToken" to authToken, "enabled" to enabled, ) - val apiHeaders = mutableMapOf( + val apiHeaders = mutableMapOf<String, String>( "content-type" to "application/json", ) val converter: (Any) -> io.appwrite.models.Provider = { @@ -1522,7 +1522,7 @@ class Messaging(client: Client) : Service(client) { "authToken" to authToken, "from" to from, ) - val apiHeaders = mutableMapOf( + val apiHeaders = mutableMapOf<String, String>( "content-type" to "application/json", ) val converter: (Any) -> io.appwrite.models.Provider = { @@ -1569,7 +1569,7 @@ class Messaging(client: Client) : Service(client) { "apiSecret" to apiSecret, "enabled" to enabled, ) - val apiHeaders = mutableMapOf( + val apiHeaders = mutableMapOf<String, String>( "content-type" to "application/json", ) val converter: (Any) -> io.appwrite.models.Provider = { @@ -1616,7 +1616,7 @@ class Messaging(client: Client) : Service(client) { "apiSecret" to apiSecret, "from" to from, ) - val apiHeaders = mutableMapOf( + val apiHeaders = mutableMapOf<String, String>( "content-type" to "application/json", ) val converter: (Any) -> io.appwrite.models.Provider = { @@ -1647,7 +1647,7 @@ class Messaging(client: Client) : Service(client) { val apiParams = mutableMapOf<String, Any?>( ) - val apiHeaders = mutableMapOf( + val apiHeaders = mutableMapOf<String, String>( ) val converter: (Any) -> io.appwrite.models.Provider = { io.appwrite.models.Provider.from(map = it as Map<String, Any>) @@ -1677,7 +1677,7 @@ class Messaging(client: Client) : Service(client) { val apiParams = mutableMapOf<String, Any?>( ) - val apiHeaders = mutableMapOf( + val apiHeaders = mutableMapOf<String, String>( "content-type" to "application/json", ) return client.call( @@ -1708,7 +1708,7 @@ class Messaging(client: Client) : Service(client) { val apiParams = mutableMapOf<String, Any?>( "queries" to queries, ) - val apiHeaders = mutableMapOf( + val apiHeaders = mutableMapOf<String, String>( ) val converter: (Any) -> io.appwrite.models.LogList = { io.appwrite.models.LogList.from(map = it as Map<String, Any>) @@ -1742,7 +1742,7 @@ class Messaging(client: Client) : Service(client) { val apiParams = mutableMapOf<String, Any?>( "queries" to queries, ) - val apiHeaders = mutableMapOf( + val apiHeaders = mutableMapOf<String, String>( ) val converter: (Any) -> io.appwrite.models.LogList = { io.appwrite.models.LogList.from(map = it as Map<String, Any>) @@ -1776,7 +1776,7 @@ class Messaging(client: Client) : Service(client) { "queries" to queries, "search" to search, ) - val apiHeaders = mutableMapOf( + val apiHeaders = mutableMapOf<String, String>( ) val converter: (Any) -> io.appwrite.models.TopicList = { io.appwrite.models.TopicList.from(map = it as Map<String, Any>) @@ -1813,7 +1813,7 @@ class Messaging(client: Client) : Service(client) { "name" to name, "subscribe" to subscribe, ) - val apiHeaders = mutableMapOf( + val apiHeaders = mutableMapOf<String, String>( "content-type" to "application/json", ) val converter: (Any) -> io.appwrite.models.Topic = { @@ -1844,7 +1844,7 @@ class Messaging(client: Client) : Service(client) { val apiParams = mutableMapOf<String, Any?>( ) - val apiHeaders = mutableMapOf( + val apiHeaders = mutableMapOf<String, String>( ) val converter: (Any) -> io.appwrite.models.Topic = { io.appwrite.models.Topic.from(map = it as Map<String, Any>) @@ -1881,7 +1881,7 @@ class Messaging(client: Client) : Service(client) { "name" to name, "subscribe" to subscribe, ) - val apiHeaders = mutableMapOf( + val apiHeaders = mutableMapOf<String, String>( "content-type" to "application/json", ) val converter: (Any) -> io.appwrite.models.Topic = { @@ -1912,7 +1912,7 @@ class Messaging(client: Client) : Service(client) { val apiParams = mutableMapOf<String, Any?>( ) - val apiHeaders = mutableMapOf( + val apiHeaders = mutableMapOf<String, String>( "content-type" to "application/json", ) return client.call( @@ -1943,7 +1943,7 @@ class Messaging(client: Client) : Service(client) { val apiParams = mutableMapOf<String, Any?>( "queries" to queries, ) - val apiHeaders = mutableMapOf( + val apiHeaders = mutableMapOf<String, String>( ) val converter: (Any) -> io.appwrite.models.LogList = { io.appwrite.models.LogList.from(map = it as Map<String, Any>) @@ -1980,7 +1980,7 @@ class Messaging(client: Client) : Service(client) { "queries" to queries, "search" to search, ) - val apiHeaders = mutableMapOf( + val apiHeaders = mutableMapOf<String, String>( ) val converter: (Any) -> io.appwrite.models.SubscriberList = { io.appwrite.models.SubscriberList.from(map = it as Map<String, Any>) @@ -2016,7 +2016,7 @@ class Messaging(client: Client) : Service(client) { "subscriberId" to subscriberId, "targetId" to targetId, ) - val apiHeaders = mutableMapOf( + val apiHeaders = mutableMapOf<String, String>( "content-type" to "application/json", ) val converter: (Any) -> io.appwrite.models.Subscriber = { @@ -2050,7 +2050,7 @@ class Messaging(client: Client) : Service(client) { val apiParams = mutableMapOf<String, Any?>( ) - val apiHeaders = mutableMapOf( + val apiHeaders = mutableMapOf<String, String>( ) val converter: (Any) -> io.appwrite.models.Subscriber = { io.appwrite.models.Subscriber.from(map = it as Map<String, Any>) @@ -2083,7 +2083,7 @@ class Messaging(client: Client) : Service(client) { val apiParams = mutableMapOf<String, Any?>( ) - val apiHeaders = mutableMapOf( + val apiHeaders = mutableMapOf<String, String>( "content-type" to "application/json", ) return client.call( diff --git a/src/main/kotlin/io/appwrite/services/Storage.kt b/src/main/kotlin/io/appwrite/services/Storage.kt index 560378a..825e9f4 100644 --- a/src/main/kotlin/io/appwrite/services/Storage.kt +++ b/src/main/kotlin/io/appwrite/services/Storage.kt @@ -34,7 +34,7 @@ class Storage(client: Client) : Service(client) { "queries" to queries, "search" to search, ) - val apiHeaders = mutableMapOf( + val apiHeaders = mutableMapOf<String, String>( ) val converter: (Any) -> io.appwrite.models.BucketList = { io.appwrite.models.BucketList.from(map = it as Map<String, Any>) @@ -92,7 +92,7 @@ class Storage(client: Client) : Service(client) { "encryption" to encryption, "antivirus" to antivirus, ) - val apiHeaders = mutableMapOf( + val apiHeaders = mutableMapOf<String, String>( "content-type" to "application/json", ) val converter: (Any) -> io.appwrite.models.Bucket = { @@ -123,7 +123,7 @@ class Storage(client: Client) : Service(client) { val apiParams = mutableMapOf<String, Any?>( ) - val apiHeaders = mutableMapOf( + val apiHeaders = mutableMapOf<String, String>( ) val converter: (Any) -> io.appwrite.models.Bucket = { io.appwrite.models.Bucket.from(map = it as Map<String, Any>) @@ -181,7 +181,7 @@ class Storage(client: Client) : Service(client) { "encryption" to encryption, "antivirus" to antivirus, ) - val apiHeaders = mutableMapOf( + val apiHeaders = mutableMapOf<String, String>( "content-type" to "application/json", ) val converter: (Any) -> io.appwrite.models.Bucket = { @@ -212,7 +212,7 @@ class Storage(client: Client) : Service(client) { val apiParams = mutableMapOf<String, Any?>( ) - val apiHeaders = mutableMapOf( + val apiHeaders = mutableMapOf<String, String>( "content-type" to "application/json", ) return client.call( @@ -246,7 +246,7 @@ class Storage(client: Client) : Service(client) { "queries" to queries, "search" to search, ) - val apiHeaders = mutableMapOf( + val apiHeaders = mutableMapOf<String, String>( ) val converter: (Any) -> io.appwrite.models.FileList = { io.appwrite.models.FileList.from(map = it as Map<String, Any>) @@ -287,7 +287,7 @@ class Storage(client: Client) : Service(client) { "file" to file, "permissions" to permissions, ) - val apiHeaders = mutableMapOf( + val apiHeaders = mutableMapOf<String, String>( "content-type" to "multipart/form-data", ) val converter: (Any) -> io.appwrite.models.File = { @@ -325,7 +325,7 @@ class Storage(client: Client) : Service(client) { val apiParams = mutableMapOf<String, Any?>( ) - val apiHeaders = mutableMapOf( + val apiHeaders = mutableMapOf<String, String>( ) val converter: (Any) -> io.appwrite.models.File = { io.appwrite.models.File.from(map = it as Map<String, Any>) @@ -365,7 +365,7 @@ class Storage(client: Client) : Service(client) { "name" to name, "permissions" to permissions, ) - val apiHeaders = mutableMapOf( + val apiHeaders = mutableMapOf<String, String>( "content-type" to "application/json", ) val converter: (Any) -> io.appwrite.models.File = { @@ -399,7 +399,7 @@ class Storage(client: Client) : Service(client) { val apiParams = mutableMapOf<String, Any?>( ) - val apiHeaders = mutableMapOf( + val apiHeaders = mutableMapOf<String, String>( "content-type" to "application/json", ) return client.call( @@ -429,7 +429,7 @@ class Storage(client: Client) : Service(client) { val apiParams = mutableMapOf<String, Any?>( ) - val apiHeaders = mutableMapOf( + val apiHeaders = mutableMapOf<String, String>( ) return client.call( "GET", @@ -491,7 +491,7 @@ class Storage(client: Client) : Service(client) { "background" to background, "output" to output, ) - val apiHeaders = mutableMapOf( + val apiHeaders = mutableMapOf<String, String>( ) return client.call( "GET", @@ -519,7 +519,7 @@ class Storage(client: Client) : Service(client) { val apiParams = mutableMapOf<String, Any?>( ) - val apiHeaders = mutableMapOf( + val apiHeaders = mutableMapOf<String, String>( ) return client.call( "GET", diff --git a/src/main/kotlin/io/appwrite/services/Teams.kt b/src/main/kotlin/io/appwrite/services/Teams.kt index 6349dcb..4762622 100644 --- a/src/main/kotlin/io/appwrite/services/Teams.kt +++ b/src/main/kotlin/io/appwrite/services/Teams.kt @@ -33,7 +33,7 @@ class Teams(client: Client) : Service(client) { "queries" to queries, "search" to search, ) - val apiHeaders = mutableMapOf( + val apiHeaders = mutableMapOf<String, String>( ) val converter: (Any) -> io.appwrite.models.TeamList<T> = { io.appwrite.models.TeamList.from(map = it as Map<String, Any>, nestedType) @@ -89,7 +89,7 @@ class Teams(client: Client) : Service(client) { "name" to name, "roles" to roles, ) - val apiHeaders = mutableMapOf( + val apiHeaders = mutableMapOf<String, String>( "content-type" to "application/json", ) val converter: (Any) -> io.appwrite.models.Team<T> = { @@ -142,7 +142,7 @@ class Teams(client: Client) : Service(client) { val apiParams = mutableMapOf<String, Any?>( ) - val apiHeaders = mutableMapOf( + val apiHeaders = mutableMapOf<String, String>( ) val converter: (Any) -> io.appwrite.models.Team<T> = { io.appwrite.models.Team.from(map = it as Map<String, Any>, nestedType) @@ -190,7 +190,7 @@ class Teams(client: Client) : Service(client) { val apiParams = mutableMapOf<String, Any?>( "name" to name, ) - val apiHeaders = mutableMapOf( + val apiHeaders = mutableMapOf<String, String>( "content-type" to "application/json", ) val converter: (Any) -> io.appwrite.models.Team<T> = { @@ -238,7 +238,7 @@ class Teams(client: Client) : Service(client) { val apiParams = mutableMapOf<String, Any?>( ) - val apiHeaders = mutableMapOf( + val apiHeaders = mutableMapOf<String, String>( "content-type" to "application/json", ) return client.call( @@ -272,7 +272,7 @@ class Teams(client: Client) : Service(client) { "queries" to queries, "search" to search, ) - val apiHeaders = mutableMapOf( + val apiHeaders = mutableMapOf<String, String>( ) val converter: (Any) -> io.appwrite.models.MembershipList = { io.appwrite.models.MembershipList.from(map = it as Map<String, Any>) @@ -321,7 +321,7 @@ class Teams(client: Client) : Service(client) { "url" to url, "name" to name, ) - val apiHeaders = mutableMapOf( + val apiHeaders = mutableMapOf<String, String>( "content-type" to "application/json", ) val converter: (Any) -> io.appwrite.models.Membership = { @@ -355,7 +355,7 @@ class Teams(client: Client) : Service(client) { val apiParams = mutableMapOf<String, Any?>( ) - val apiHeaders = mutableMapOf( + val apiHeaders = mutableMapOf<String, String>( ) val converter: (Any) -> io.appwrite.models.Membership = { io.appwrite.models.Membership.from(map = it as Map<String, Any>) @@ -391,7 +391,7 @@ class Teams(client: Client) : Service(client) { val apiParams = mutableMapOf<String, Any?>( "roles" to roles, ) - val apiHeaders = mutableMapOf( + val apiHeaders = mutableMapOf<String, String>( "content-type" to "application/json", ) val converter: (Any) -> io.appwrite.models.Membership = { @@ -425,7 +425,7 @@ class Teams(client: Client) : Service(client) { val apiParams = mutableMapOf<String, Any?>( ) - val apiHeaders = mutableMapOf( + val apiHeaders = mutableMapOf<String, String>( "content-type" to "application/json", ) return client.call( @@ -461,7 +461,7 @@ class Teams(client: Client) : Service(client) { "userId" to userId, "secret" to secret, ) - val apiHeaders = mutableMapOf( + val apiHeaders = mutableMapOf<String, String>( "content-type" to "application/json", ) val converter: (Any) -> io.appwrite.models.Membership = { @@ -493,7 +493,7 @@ class Teams(client: Client) : Service(client) { val apiParams = mutableMapOf<String, Any?>( ) - val apiHeaders = mutableMapOf( + val apiHeaders = mutableMapOf<String, String>( ) val converter: (Any) -> io.appwrite.models.Preferences<T> = { io.appwrite.models.Preferences.from(map = it as Map<String, Any>, nestedType) @@ -541,7 +541,7 @@ class Teams(client: Client) : Service(client) { val apiParams = mutableMapOf<String, Any?>( "prefs" to prefs, ) - val apiHeaders = mutableMapOf( + val apiHeaders = mutableMapOf<String, String>( "content-type" to "application/json", ) val converter: (Any) -> io.appwrite.models.Preferences<T> = { diff --git a/src/main/kotlin/io/appwrite/services/Users.kt b/src/main/kotlin/io/appwrite/services/Users.kt index 600b182..d2005af 100644 --- a/src/main/kotlin/io/appwrite/services/Users.kt +++ b/src/main/kotlin/io/appwrite/services/Users.kt @@ -33,7 +33,7 @@ class Users(client: Client) : Service(client) { "queries" to queries, "search" to search, ) - val apiHeaders = mutableMapOf( + val apiHeaders = mutableMapOf<String, String>( ) val converter: (Any) -> io.appwrite.models.UserList<T> = { io.appwrite.models.UserList.from(map = it as Map<String, Any>, nestedType) @@ -95,7 +95,7 @@ class Users(client: Client) : Service(client) { "password" to password, "name" to name, ) - val apiHeaders = mutableMapOf( + val apiHeaders = mutableMapOf<String, String>( "content-type" to "application/json", ) val converter: (Any) -> io.appwrite.models.User<T> = { @@ -164,7 +164,7 @@ class Users(client: Client) : Service(client) { "password" to password, "name" to name, ) - val apiHeaders = mutableMapOf( + val apiHeaders = mutableMapOf<String, String>( "content-type" to "application/json", ) val converter: (Any) -> io.appwrite.models.User<T> = { @@ -230,7 +230,7 @@ class Users(client: Client) : Service(client) { "password" to password, "name" to name, ) - val apiHeaders = mutableMapOf( + val apiHeaders = mutableMapOf<String, String>( "content-type" to "application/json", ) val converter: (Any) -> io.appwrite.models.User<T> = { @@ -289,7 +289,7 @@ class Users(client: Client) : Service(client) { "queries" to queries, "search" to search, ) - val apiHeaders = mutableMapOf( + val apiHeaders = mutableMapOf<String, String>( ) val converter: (Any) -> io.appwrite.models.IdentityList = { io.appwrite.models.IdentityList.from(map = it as Map<String, Any>) @@ -319,7 +319,7 @@ class Users(client: Client) : Service(client) { val apiParams = mutableMapOf<String, Any?>( ) - val apiHeaders = mutableMapOf( + val apiHeaders = mutableMapOf<String, String>( "content-type" to "application/json", ) return client.call( @@ -357,7 +357,7 @@ class Users(client: Client) : Service(client) { "password" to password, "name" to name, ) - val apiHeaders = mutableMapOf( + val apiHeaders = mutableMapOf<String, String>( "content-type" to "application/json", ) val converter: (Any) -> io.appwrite.models.User<T> = { @@ -423,7 +423,7 @@ class Users(client: Client) : Service(client) { "password" to password, "name" to name, ) - val apiHeaders = mutableMapOf( + val apiHeaders = mutableMapOf<String, String>( "content-type" to "application/json", ) val converter: (Any) -> io.appwrite.models.User<T> = { @@ -504,7 +504,7 @@ class Users(client: Client) : Service(client) { "passwordLength" to passwordLength, "name" to name, ) - val apiHeaders = mutableMapOf( + val apiHeaders = mutableMapOf<String, String>( "content-type" to "application/json", ) val converter: (Any) -> io.appwrite.models.User<T> = { @@ -594,7 +594,7 @@ class Users(client: Client) : Service(client) { "passwordSignerKey" to passwordSignerKey, "name" to name, ) - val apiHeaders = mutableMapOf( + val apiHeaders = mutableMapOf<String, String>( "content-type" to "application/json", ) val converter: (Any) -> io.appwrite.models.User<T> = { @@ -672,7 +672,7 @@ class Users(client: Client) : Service(client) { "passwordVersion" to passwordVersion, "name" to name, ) - val apiHeaders = mutableMapOf( + val apiHeaders = mutableMapOf<String, String>( "content-type" to "application/json", ) val converter: (Any) -> io.appwrite.models.User<T> = { @@ -731,7 +731,7 @@ class Users(client: Client) : Service(client) { val apiParams = mutableMapOf<String, Any?>( ) - val apiHeaders = mutableMapOf( + val apiHeaders = mutableMapOf<String, String>( ) val converter: (Any) -> io.appwrite.models.User<T> = { io.appwrite.models.User.from(map = it as Map<String, Any>, nestedType) @@ -775,7 +775,7 @@ class Users(client: Client) : Service(client) { val apiParams = mutableMapOf<String, Any?>( ) - val apiHeaders = mutableMapOf( + val apiHeaders = mutableMapOf<String, String>( "content-type" to "application/json", ) return client.call( @@ -806,7 +806,7 @@ class Users(client: Client) : Service(client) { val apiParams = mutableMapOf<String, Any?>( "email" to email, ) - val apiHeaders = mutableMapOf( + val apiHeaders = mutableMapOf<String, String>( "content-type" to "application/json", ) val converter: (Any) -> io.appwrite.models.User<T> = { @@ -861,7 +861,7 @@ class Users(client: Client) : Service(client) { "sessionId" to sessionId, "duration" to duration, ) - val apiHeaders = mutableMapOf( + val apiHeaders = mutableMapOf<String, String>( "content-type" to "application/json", ) val converter: (Any) -> io.appwrite.models.Jwt = { @@ -896,7 +896,7 @@ class Users(client: Client) : Service(client) { val apiParams = mutableMapOf<String, Any?>( "labels" to labels, ) - val apiHeaders = mutableMapOf( + val apiHeaders = mutableMapOf<String, String>( "content-type" to "application/json", ) val converter: (Any) -> io.appwrite.models.User<T> = { @@ -948,7 +948,7 @@ class Users(client: Client) : Service(client) { val apiParams = mutableMapOf<String, Any?>( "queries" to queries, ) - val apiHeaders = mutableMapOf( + val apiHeaders = mutableMapOf<String, String>( ) val converter: (Any) -> io.appwrite.models.LogList = { io.appwrite.models.LogList.from(map = it as Map<String, Any>) @@ -978,7 +978,7 @@ class Users(client: Client) : Service(client) { val apiParams = mutableMapOf<String, Any?>( ) - val apiHeaders = mutableMapOf( + val apiHeaders = mutableMapOf<String, String>( ) val converter: (Any) -> io.appwrite.models.MembershipList = { io.appwrite.models.MembershipList.from(map = it as Map<String, Any>) @@ -1012,7 +1012,7 @@ class Users(client: Client) : Service(client) { val apiParams = mutableMapOf<String, Any?>( "mfa" to mfa, ) - val apiHeaders = mutableMapOf( + val apiHeaders = mutableMapOf<String, String>( "content-type" to "application/json", ) val converter: (Any) -> io.appwrite.models.User<T> = { @@ -1063,7 +1063,7 @@ class Users(client: Client) : Service(client) { val apiParams = mutableMapOf<String, Any?>( ) - val apiHeaders = mutableMapOf( + val apiHeaders = mutableMapOf<String, String>( "content-type" to "application/json", ) return client.call( @@ -1090,7 +1090,7 @@ class Users(client: Client) : Service(client) { val apiParams = mutableMapOf<String, Any?>( ) - val apiHeaders = mutableMapOf( + val apiHeaders = mutableMapOf<String, String>( ) val converter: (Any) -> io.appwrite.models.MfaFactors = { io.appwrite.models.MfaFactors.from(map = it as Map<String, Any>) @@ -1120,7 +1120,7 @@ class Users(client: Client) : Service(client) { val apiParams = mutableMapOf<String, Any?>( ) - val apiHeaders = mutableMapOf( + val apiHeaders = mutableMapOf<String, String>( ) val converter: (Any) -> io.appwrite.models.MfaRecoveryCodes = { io.appwrite.models.MfaRecoveryCodes.from(map = it as Map<String, Any>) @@ -1150,7 +1150,7 @@ class Users(client: Client) : Service(client) { val apiParams = mutableMapOf<String, Any?>( ) - val apiHeaders = mutableMapOf( + val apiHeaders = mutableMapOf<String, String>( "content-type" to "application/json", ) val converter: (Any) -> io.appwrite.models.MfaRecoveryCodes = { @@ -1181,7 +1181,7 @@ class Users(client: Client) : Service(client) { val apiParams = mutableMapOf<String, Any?>( ) - val apiHeaders = mutableMapOf( + val apiHeaders = mutableMapOf<String, String>( "content-type" to "application/json", ) val converter: (Any) -> io.appwrite.models.MfaRecoveryCodes = { @@ -1216,7 +1216,7 @@ class Users(client: Client) : Service(client) { val apiParams = mutableMapOf<String, Any?>( "name" to name, ) - val apiHeaders = mutableMapOf( + val apiHeaders = mutableMapOf<String, String>( "content-type" to "application/json", ) val converter: (Any) -> io.appwrite.models.User<T> = { @@ -1268,7 +1268,7 @@ class Users(client: Client) : Service(client) { val apiParams = mutableMapOf<String, Any?>( "password" to password, ) - val apiHeaders = mutableMapOf( + val apiHeaders = mutableMapOf<String, String>( "content-type" to "application/json", ) val converter: (Any) -> io.appwrite.models.User<T> = { @@ -1320,7 +1320,7 @@ class Users(client: Client) : Service(client) { val apiParams = mutableMapOf<String, Any?>( "number" to number, ) - val apiHeaders = mutableMapOf( + val apiHeaders = mutableMapOf<String, String>( "content-type" to "application/json", ) val converter: (Any) -> io.appwrite.models.User<T> = { @@ -1369,7 +1369,7 @@ class Users(client: Client) : Service(client) { val apiParams = mutableMapOf<String, Any?>( ) - val apiHeaders = mutableMapOf( + val apiHeaders = mutableMapOf<String, String>( ) val converter: (Any) -> io.appwrite.models.Preferences<T> = { io.appwrite.models.Preferences.from(map = it as Map<String, Any>, nestedType) @@ -1417,7 +1417,7 @@ class Users(client: Client) : Service(client) { val apiParams = mutableMapOf<String, Any?>( "prefs" to prefs, ) - val apiHeaders = mutableMapOf( + val apiHeaders = mutableMapOf<String, String>( "content-type" to "application/json", ) val converter: (Any) -> io.appwrite.models.Preferences<T> = { @@ -1465,7 +1465,7 @@ class Users(client: Client) : Service(client) { val apiParams = mutableMapOf<String, Any?>( ) - val apiHeaders = mutableMapOf( + val apiHeaders = mutableMapOf<String, String>( ) val converter: (Any) -> io.appwrite.models.SessionList = { io.appwrite.models.SessionList.from(map = it as Map<String, Any>) @@ -1495,7 +1495,7 @@ class Users(client: Client) : Service(client) { val apiParams = mutableMapOf<String, Any?>( ) - val apiHeaders = mutableMapOf( + val apiHeaders = mutableMapOf<String, String>( "content-type" to "application/json", ) val converter: (Any) -> io.appwrite.models.Session = { @@ -1526,7 +1526,7 @@ class Users(client: Client) : Service(client) { val apiParams = mutableMapOf<String, Any?>( ) - val apiHeaders = mutableMapOf( + val apiHeaders = mutableMapOf<String, String>( "content-type" to "application/json", ) return client.call( @@ -1556,7 +1556,7 @@ class Users(client: Client) : Service(client) { val apiParams = mutableMapOf<String, Any?>( ) - val apiHeaders = mutableMapOf( + val apiHeaders = mutableMapOf<String, String>( "content-type" to "application/json", ) return client.call( @@ -1587,7 +1587,7 @@ class Users(client: Client) : Service(client) { val apiParams = mutableMapOf<String, Any?>( "status" to status, ) - val apiHeaders = mutableMapOf( + val apiHeaders = mutableMapOf<String, String>( "content-type" to "application/json", ) val converter: (Any) -> io.appwrite.models.User<T> = { @@ -1639,7 +1639,7 @@ class Users(client: Client) : Service(client) { val apiParams = mutableMapOf<String, Any?>( "queries" to queries, ) - val apiHeaders = mutableMapOf( + val apiHeaders = mutableMapOf<String, String>( ) val converter: (Any) -> io.appwrite.models.TargetList = { io.appwrite.models.TargetList.from(map = it as Map<String, Any>) @@ -1685,7 +1685,7 @@ class Users(client: Client) : Service(client) { "providerId" to providerId, "name" to name, ) - val apiHeaders = mutableMapOf( + val apiHeaders = mutableMapOf<String, String>( "content-type" to "application/json", ) val converter: (Any) -> io.appwrite.models.Target = { @@ -1719,7 +1719,7 @@ class Users(client: Client) : Service(client) { val apiParams = mutableMapOf<String, Any?>( ) - val apiHeaders = mutableMapOf( + val apiHeaders = mutableMapOf<String, String>( ) val converter: (Any) -> io.appwrite.models.Target = { io.appwrite.models.Target.from(map = it as Map<String, Any>) @@ -1762,7 +1762,7 @@ class Users(client: Client) : Service(client) { "providerId" to providerId, "name" to name, ) - val apiHeaders = mutableMapOf( + val apiHeaders = mutableMapOf<String, String>( "content-type" to "application/json", ) val converter: (Any) -> io.appwrite.models.Target = { @@ -1796,7 +1796,7 @@ class Users(client: Client) : Service(client) { val apiParams = mutableMapOf<String, Any?>( ) - val apiHeaders = mutableMapOf( + val apiHeaders = mutableMapOf<String, String>( "content-type" to "application/json", ) return client.call( @@ -1830,7 +1830,7 @@ class Users(client: Client) : Service(client) { "length" to length, "expire" to expire, ) - val apiHeaders = mutableMapOf( + val apiHeaders = mutableMapOf<String, String>( "content-type" to "application/json", ) val converter: (Any) -> io.appwrite.models.Token = { @@ -1865,7 +1865,7 @@ class Users(client: Client) : Service(client) { val apiParams = mutableMapOf<String, Any?>( "emailVerification" to emailVerification, ) - val apiHeaders = mutableMapOf( + val apiHeaders = mutableMapOf<String, String>( "content-type" to "application/json", ) val converter: (Any) -> io.appwrite.models.User<T> = { @@ -1917,7 +1917,7 @@ class Users(client: Client) : Service(client) { val apiParams = mutableMapOf<String, Any?>( "phoneVerification" to phoneVerification, ) - val apiHeaders = mutableMapOf( + val apiHeaders = mutableMapOf<String, String>( "content-type" to "application/json", ) val converter: (Any) -> io.appwrite.models.User<T> = { From de7c0901b21f6939b938d2e13e50cb9ee0a613c3 Mon Sep 17 00:00:00 2001 From: Jake Barnby <jakeb994@gmail.com> Date: Thu, 8 May 2025 23:29:21 +1200 Subject: [PATCH 09/17] Add bulk API methods --- README.md | 4 +- .../java/databases/create-documents.md | 25 ++ .../java/databases/delete-documents.md | 25 ++ .../java/databases/update-documents.md | 26 ++ .../java/databases/upsert-documents.md | 25 ++ .../kotlin/databases/create-documents.md | 16 ++ .../kotlin/databases/delete-documents.md | 16 ++ .../kotlin/databases/update-documents.md | 17 ++ .../kotlin/databases/upsert-documents.md | 16 ++ src/main/kotlin/io/appwrite/Client.kt | 4 +- .../kotlin/io/appwrite/services/Databases.kt | 244 ++++++++++++++++++ 11 files changed, 414 insertions(+), 4 deletions(-) create mode 100644 docs/examples/java/databases/create-documents.md create mode 100644 docs/examples/java/databases/delete-documents.md create mode 100644 docs/examples/java/databases/update-documents.md create mode 100644 docs/examples/java/databases/upsert-documents.md create mode 100644 docs/examples/kotlin/databases/create-documents.md create mode 100644 docs/examples/kotlin/databases/delete-documents.md create mode 100644 docs/examples/kotlin/databases/update-documents.md create mode 100644 docs/examples/kotlin/databases/upsert-documents.md diff --git a/README.md b/README.md index e0b45f4..5dc7ce9 100644 --- a/README.md +++ b/README.md @@ -39,7 +39,7 @@ repositories { Next, add the dependency to your project's `build.gradle(.kts)` file: ```groovy -implementation("io.appwrite:sdk-for-kotlin:8.0.0") +implementation("io.appwrite:sdk-for-kotlin:8.1.0-rc.1") ``` ### Maven @@ -50,7 +50,7 @@ Add this to your project's `pom.xml` file: <dependency> <groupId>io.appwrite</groupId> <artifactId>sdk-for-kotlin</artifactId> - <version>8.0.0</version> + <version>8.1.0-rc.1</version> </dependency> </dependencies> ``` diff --git a/docs/examples/java/databases/create-documents.md b/docs/examples/java/databases/create-documents.md new file mode 100644 index 0000000..c788fa7 --- /dev/null +++ b/docs/examples/java/databases/create-documents.md @@ -0,0 +1,25 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Databases; + +Client client = new Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setSession(""); // The user session to authenticate with + +Databases databases = new Databases(client); + +databases.createDocuments( + "<DATABASE_ID>", // databaseId + "<COLLECTION_ID>", // collectionId + listOf(), // documents + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); + }) +); + diff --git a/docs/examples/java/databases/delete-documents.md b/docs/examples/java/databases/delete-documents.md new file mode 100644 index 0000000..e8394b1 --- /dev/null +++ b/docs/examples/java/databases/delete-documents.md @@ -0,0 +1,25 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Databases; + +Client client = new Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>"); // Your secret API key + +Databases databases = new Databases(client); + +databases.deleteDocuments( + "<DATABASE_ID>", // databaseId + "<COLLECTION_ID>", // collectionId + listOf(), // queries (optional) + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); + }) +); + diff --git a/docs/examples/java/databases/update-documents.md b/docs/examples/java/databases/update-documents.md new file mode 100644 index 0000000..b4138b4 --- /dev/null +++ b/docs/examples/java/databases/update-documents.md @@ -0,0 +1,26 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Databases; + +Client client = new Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>"); // Your secret API key + +Databases databases = new Databases(client); + +databases.updateDocuments( + "<DATABASE_ID>", // databaseId + "<COLLECTION_ID>", // collectionId + mapOf( "a" to "b" ), // data (optional) + listOf(), // queries (optional) + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); + }) +); + diff --git a/docs/examples/java/databases/upsert-documents.md b/docs/examples/java/databases/upsert-documents.md new file mode 100644 index 0000000..e2f2a46 --- /dev/null +++ b/docs/examples/java/databases/upsert-documents.md @@ -0,0 +1,25 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Databases; + +Client client = new Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>"); // Your secret API key + +Databases databases = new Databases(client); + +databases.upsertDocuments( + "<DATABASE_ID>", // databaseId + "<COLLECTION_ID>", // collectionId + listOf(), // documents (optional) + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); + }) +); + diff --git a/docs/examples/kotlin/databases/create-documents.md b/docs/examples/kotlin/databases/create-documents.md new file mode 100644 index 0000000..d9af7b0 --- /dev/null +++ b/docs/examples/kotlin/databases/create-documents.md @@ -0,0 +1,16 @@ +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Databases + +val client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setSession("") // The user session to authenticate with + +val databases = Databases(client) + +val response = databases.createDocuments( + databaseId = "<DATABASE_ID>", + collectionId = "<COLLECTION_ID>", + documents = listOf() +) diff --git a/docs/examples/kotlin/databases/delete-documents.md b/docs/examples/kotlin/databases/delete-documents.md new file mode 100644 index 0000000..c4caa63 --- /dev/null +++ b/docs/examples/kotlin/databases/delete-documents.md @@ -0,0 +1,16 @@ +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Databases + +val client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +val databases = Databases(client) + +val response = databases.deleteDocuments( + databaseId = "<DATABASE_ID>", + collectionId = "<COLLECTION_ID>", + queries = listOf() // optional +) diff --git a/docs/examples/kotlin/databases/update-documents.md b/docs/examples/kotlin/databases/update-documents.md new file mode 100644 index 0000000..9d6c2b5 --- /dev/null +++ b/docs/examples/kotlin/databases/update-documents.md @@ -0,0 +1,17 @@ +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Databases + +val client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +val databases = Databases(client) + +val response = databases.updateDocuments( + databaseId = "<DATABASE_ID>", + collectionId = "<COLLECTION_ID>", + data = mapOf( "a" to "b" ), // optional + queries = listOf() // optional +) diff --git a/docs/examples/kotlin/databases/upsert-documents.md b/docs/examples/kotlin/databases/upsert-documents.md new file mode 100644 index 0000000..7459b38 --- /dev/null +++ b/docs/examples/kotlin/databases/upsert-documents.md @@ -0,0 +1,16 @@ +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Databases + +val client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +val databases = Databases(client) + +val response = databases.upsertDocuments( + databaseId = "<DATABASE_ID>", + collectionId = "<COLLECTION_ID>", + documents = listOf() // optional +) diff --git a/src/main/kotlin/io/appwrite/Client.kt b/src/main/kotlin/io/appwrite/Client.kt index 2f5a476..72f53e7 100644 --- a/src/main/kotlin/io/appwrite/Client.kt +++ b/src/main/kotlin/io/appwrite/Client.kt @@ -58,11 +58,11 @@ class Client @JvmOverloads constructor( init { headers = mutableMapOf( "content-type" to "application/json", - "user-agent" to "AppwriteKotlinSDK/8.0.0 ${System.getProperty("http.agent")}", + "user-agent" to "AppwriteKotlinSDK/8.1.0-rc.1 ${System.getProperty("http.agent")}", "x-sdk-name" to "Kotlin", "x-sdk-platform" to "server", "x-sdk-language" to "kotlin", - "x-sdk-version" to "8.0.0", + "x-sdk-version" to "8.1.0-rc.1", "x-appwrite-response-format" to "1.6.0", ) diff --git a/src/main/kotlin/io/appwrite/services/Databases.kt b/src/main/kotlin/io/appwrite/services/Databases.kt index 32685cc..23cd0af 100644 --- a/src/main/kotlin/io/appwrite/services/Databases.kt +++ b/src/main/kotlin/io/appwrite/services/Databases.kt @@ -1589,6 +1589,250 @@ class Databases(client: Client) : Service(client) { nestedType = classOf(), ) + /** + * Create new Documents. Before using this route, you should create a new collection resource using either a [server integration](https://appwrite.io/docs/server/databases#databasesCreateCollection) API or directly from your database console. + * + * @param databaseId Database ID. + * @param collectionId Collection ID. You can create a new collection using the Database service [server integration](https://appwrite.io/docs/server/databases#databasesCreateCollection). Make sure to define attributes before creating documents. + * @param documents Array of documents data as JSON objects. + * @return [io.appwrite.models.DocumentList<T>] + */ + @Throws(AppwriteException::class) + suspend fun <T> createDocuments( + databaseId: String, + collectionId: String, + documents: List<Any>, + nestedType: Class<T>, + ): io.appwrite.models.DocumentList<T> { + val apiPath = "/databases/{databaseId}/collections/{collectionId}/documents" + .replace("{databaseId}", databaseId) + .replace("{collectionId}", collectionId) + + val apiParams = mutableMapOf<String, Any?>( + "documents" to documents, + ) + val apiHeaders = mutableMapOf<String, String>( + "content-type" to "application/json", + ) + val converter: (Any) -> io.appwrite.models.DocumentList<T> = { + io.appwrite.models.DocumentList.from(map = it as Map<String, Any>, nestedType) + } + return client.call( + "POST", + apiPath, + apiHeaders, + apiParams, + responseType = classOf(), + converter, + ) + } + + /** + * Create new Documents. Before using this route, you should create a new collection resource using either a [server integration](https://appwrite.io/docs/server/databases#databasesCreateCollection) API or directly from your database console. + * + * @param databaseId Database ID. + * @param collectionId Collection ID. You can create a new collection using the Database service [server integration](https://appwrite.io/docs/server/databases#databasesCreateCollection). Make sure to define attributes before creating documents. + * @param documents Array of documents data as JSON objects. + * @return [io.appwrite.models.DocumentList<T>] + */ + @Throws(AppwriteException::class) + suspend fun createDocuments( + databaseId: String, + collectionId: String, + documents: List<Any>, + ): io.appwrite.models.DocumentList<Map<String, Any>> = createDocuments( + databaseId, + collectionId, + documents, + nestedType = classOf(), + ) + + /** + * Create or update Documents. Before using this route, you should create a new collection resource using either a [server integration](https://appwrite.io/docs/server/databases#databasesCreateCollection) API or directly from your database console. + * + * @param databaseId Database ID. + * @param collectionId Collection ID. + * @param documents Array of document data as JSON objects. May contain partial documents. + * @return [io.appwrite.models.DocumentList<T>] + */ + @JvmOverloads + @Throws(AppwriteException::class) + suspend fun <T> upsertDocuments( + databaseId: String, + collectionId: String, + documents: List<Any>? = null, + nestedType: Class<T>, + ): io.appwrite.models.DocumentList<T> { + val apiPath = "/databases/{databaseId}/collections/{collectionId}/documents" + .replace("{databaseId}", databaseId) + .replace("{collectionId}", collectionId) + + val apiParams = mutableMapOf<String, Any?>( + "documents" to documents, + ) + val apiHeaders = mutableMapOf<String, String>( + "content-type" to "application/json", + ) + val converter: (Any) -> io.appwrite.models.DocumentList<T> = { + io.appwrite.models.DocumentList.from(map = it as Map<String, Any>, nestedType) + } + return client.call( + "PUT", + apiPath, + apiHeaders, + apiParams, + responseType = classOf(), + converter, + ) + } + + /** + * Create or update Documents. Before using this route, you should create a new collection resource using either a [server integration](https://appwrite.io/docs/server/databases#databasesCreateCollection) API or directly from your database console. + * + * @param databaseId Database ID. + * @param collectionId Collection ID. + * @param documents Array of document data as JSON objects. May contain partial documents. + * @return [io.appwrite.models.DocumentList<T>] + */ + @JvmOverloads + @Throws(AppwriteException::class) + suspend fun upsertDocuments( + databaseId: String, + collectionId: String, + documents: List<Any>? = null, + ): io.appwrite.models.DocumentList<Map<String, Any>> = upsertDocuments( + databaseId, + collectionId, + documents, + nestedType = classOf(), + ) + + /** + * Update all documents that match your queries, if no queries are submitted then all documents are updated. You can pass only specific fields to be updated. + * + * @param databaseId Database ID. + * @param collectionId Collection ID. + * @param data Document data as JSON object. Include only attribute and value pairs to be updated. + * @param queries 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. + * @return [io.appwrite.models.DocumentList<T>] + */ + @JvmOverloads + @Throws(AppwriteException::class) + suspend fun <T> updateDocuments( + databaseId: String, + collectionId: String, + data: Any? = null, + queries: List<String>? = null, + nestedType: Class<T>, + ): io.appwrite.models.DocumentList<T> { + val apiPath = "/databases/{databaseId}/collections/{collectionId}/documents" + .replace("{databaseId}", databaseId) + .replace("{collectionId}", collectionId) + + val apiParams = mutableMapOf<String, Any?>( + "data" to data, + "queries" to queries, + ) + val apiHeaders = mutableMapOf<String, String>( + "content-type" to "application/json", + ) + val converter: (Any) -> io.appwrite.models.DocumentList<T> = { + io.appwrite.models.DocumentList.from(map = it as Map<String, Any>, nestedType) + } + return client.call( + "PATCH", + apiPath, + apiHeaders, + apiParams, + responseType = classOf(), + converter, + ) + } + + /** + * Update all documents that match your queries, if no queries are submitted then all documents are updated. You can pass only specific fields to be updated. + * + * @param databaseId Database ID. + * @param collectionId Collection ID. + * @param data Document data as JSON object. Include only attribute and value pairs to be updated. + * @param queries 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. + * @return [io.appwrite.models.DocumentList<T>] + */ + @JvmOverloads + @Throws(AppwriteException::class) + suspend fun updateDocuments( + databaseId: String, + collectionId: String, + data: Any? = null, + queries: List<String>? = null, + ): io.appwrite.models.DocumentList<Map<String, Any>> = updateDocuments( + databaseId, + collectionId, + data, + queries, + nestedType = classOf(), + ) + + /** + * Bulk delete documents using queries, if no queries are passed then all documents are deleted. + * + * @param databaseId Database ID. + * @param collectionId Collection ID. You can create a new collection using the Database service [server integration](https://appwrite.io/docs/server/databases#databasesCreateCollection). + * @param queries 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. + * @return [io.appwrite.models.DocumentList<T>] + */ + @JvmOverloads + @Throws(AppwriteException::class) + suspend fun <T> deleteDocuments( + databaseId: String, + collectionId: String, + queries: List<String>? = null, + nestedType: Class<T>, + ): io.appwrite.models.DocumentList<T> { + val apiPath = "/databases/{databaseId}/collections/{collectionId}/documents" + .replace("{databaseId}", databaseId) + .replace("{collectionId}", collectionId) + + val apiParams = mutableMapOf<String, Any?>( + "queries" to queries, + ) + val apiHeaders = mutableMapOf<String, String>( + "content-type" to "application/json", + ) + val converter: (Any) -> io.appwrite.models.DocumentList<T> = { + io.appwrite.models.DocumentList.from(map = it as Map<String, Any>, nestedType) + } + return client.call( + "DELETE", + apiPath, + apiHeaders, + apiParams, + responseType = classOf(), + converter, + ) + } + + /** + * Bulk delete documents using queries, if no queries are passed then all documents are deleted. + * + * @param databaseId Database ID. + * @param collectionId Collection ID. You can create a new collection using the Database service [server integration](https://appwrite.io/docs/server/databases#databasesCreateCollection). + * @param queries 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. + * @return [io.appwrite.models.DocumentList<T>] + */ + @JvmOverloads + @Throws(AppwriteException::class) + suspend fun deleteDocuments( + databaseId: String, + collectionId: String, + queries: List<String>? = null, + ): io.appwrite.models.DocumentList<Map<String, Any>> = deleteDocuments( + databaseId, + collectionId, + queries, + nestedType = classOf(), + ) + /** * Get a document by its unique ID. This endpoint response returns a JSON object with the document data. * From c3287c80d35f453936c4e9be1e6a4b29ea5bf3f4 Mon Sep 17 00:00:00 2001 From: Jake Barnby <jakeb994@gmail.com> Date: Sun, 18 May 2025 00:06:26 +1200 Subject: [PATCH 10/17] Add support for 1.7 --- README.md | 8 +- docs/examples/java/avatars/get-browser.md | 2 +- docs/examples/java/avatars/get-credit-card.md | 2 +- docs/examples/java/avatars/get-flag.md | 2 +- .../java/databases/create-document.md | 5 +- .../java/databases/create-documents.md | 3 +- docs/examples/java/databases/create-index.md | 1 + ...uild.md => create-duplicate-deployment.md} | 2 +- .../functions/create-template-deployment.md | 28 + .../java/functions/create-variable.md | 1 + .../java/functions/create-vcs-deployment.md | 27 + docs/examples/java/functions/create.md | 4 - .../java/functions/get-deployment-download.md | 1 + .../java/functions/list-executions.md | 1 - ...t-build.md => update-deployment-status.md} | 2 +- ...yment.md => update-function-deployment.md} | 2 +- .../java/functions/update-variable.md | 1 + docs/examples/java/sites/create-deployment.md | 29 + .../java/sites/create-duplicate-deployment.md | 24 + .../java/sites/create-template-deployment.md | 28 + docs/examples/java/sites/create-variable.md | 26 + .../java/sites/create-vcs-deployment.md | 27 + docs/examples/java/sites/create.md | 42 + docs/examples/java/sites/delete-deployment.md | 24 + docs/examples/java/sites/delete-log.md | 24 + docs/examples/java/sites/delete-variable.md | 24 + docs/examples/java/sites/delete.md | 23 + .../java/sites/get-deployment-download.md | 25 + docs/examples/java/sites/get-deployment.md | 24 + docs/examples/java/sites/get-log.md | 24 + docs/examples/java/sites/get-variable.md | 24 + docs/examples/java/sites/get.md | 23 + docs/examples/java/sites/list-deployments.md | 25 + docs/examples/java/sites/list-frameworks.md | 19 + docs/examples/java/sites/list-logs.md | 24 + .../java/sites/list-specifications.md | 19 + docs/examples/java/sites/list-variables.md | 23 + docs/examples/java/sites/list.md | 24 + .../java/sites/update-deployment-status.md | 24 + .../java/sites/update-site-deployment.md | 24 + docs/examples/java/sites/update-variable.md | 27 + docs/examples/java/sites/update.md | 41 + .../java/storage/get-file-download.md | 1 + .../examples/java/storage/get-file-preview.md | 3 +- docs/examples/java/storage/get-file-view.md | 1 + .../examples/java/tokens/create-file-token.md | 25 + docs/examples/java/tokens/delete.md | 23 + docs/examples/java/tokens/get.md | 23 + docs/examples/java/tokens/list.md | 25 + docs/examples/java/tokens/update.md | 24 + docs/examples/java/users/list-memberships.md | 2 + docs/examples/kotlin/avatars/get-browser.md | 2 +- .../kotlin/avatars/get-credit-card.md | 2 +- docs/examples/kotlin/avatars/get-flag.md | 2 +- .../kotlin/databases/create-document.md | 3 +- .../kotlin/databases/create-documents.md | 3 +- .../examples/kotlin/databases/create-index.md | 3 +- ...uild.md => create-duplicate-deployment.md} | 2 +- .../functions/create-template-deployment.md | 19 + .../kotlin/functions/create-variable.md | 3 +- .../kotlin/functions/create-vcs-deployment.md | 18 + docs/examples/kotlin/functions/create.md | 4 - .../functions/get-deployment-download.md | 3 +- .../kotlin/functions/list-executions.md | 3 +- ...t-build.md => update-deployment-status.md} | 2 +- ...yment.md => update-function-deployment.md} | 2 +- .../kotlin/functions/update-variable.md | 3 +- .../kotlin/sites/create-deployment.md | 20 + .../sites/create-duplicate-deployment.md | 15 + .../sites/create-template-deployment.md | 19 + docs/examples/kotlin/sites/create-variable.md | 17 + .../kotlin/sites/create-vcs-deployment.md | 18 + docs/examples/kotlin/sites/create.md | 33 + .../kotlin/sites/delete-deployment.md | 15 + docs/examples/kotlin/sites/delete-log.md | 15 + docs/examples/kotlin/sites/delete-variable.md | 15 + docs/examples/kotlin/sites/delete.md | 14 + .../kotlin/sites/get-deployment-download.md | 16 + docs/examples/kotlin/sites/get-deployment.md | 15 + docs/examples/kotlin/sites/get-log.md | 15 + docs/examples/kotlin/sites/get-variable.md | 15 + docs/examples/kotlin/sites/get.md | 14 + .../examples/kotlin/sites/list-deployments.md | 16 + docs/examples/kotlin/sites/list-frameworks.md | 12 + docs/examples/kotlin/sites/list-logs.md | 15 + .../kotlin/sites/list-specifications.md | 12 + docs/examples/kotlin/sites/list-variables.md | 14 + docs/examples/kotlin/sites/list.md | 15 + .../kotlin/sites/update-deployment-status.md | 15 + .../kotlin/sites/update-site-deployment.md | 15 + docs/examples/kotlin/sites/update-variable.md | 18 + docs/examples/kotlin/sites/update.md | 32 + .../kotlin/storage/get-file-download.md | 3 +- .../kotlin/storage/get-file-preview.md | 5 +- docs/examples/kotlin/storage/get-file-view.md | 3 +- .../kotlin/tokens/create-file-token.md | 16 + docs/examples/kotlin/tokens/delete.md | 14 + docs/examples/kotlin/tokens/get.md | 14 + docs/examples/kotlin/tokens/list.md | 16 + docs/examples/kotlin/tokens/update.md | 15 + .../examples/kotlin/users/list-memberships.md | 4 +- src/main/kotlin/io/appwrite/Client.kt | 6 +- src/main/kotlin/io/appwrite/enums/Adapter.kt | 12 + .../kotlin/io/appwrite/enums/BuildRuntime.kt | 134 +++ .../appwrite/enums/DeploymentDownloadType.kt | 12 + .../kotlin/io/appwrite/enums/Framework.kt | 36 + .../kotlin/io/appwrite/enums/ImageFormat.kt | 2 - src/main/kotlin/io/appwrite/enums/Runtime.kt | 10 +- .../io/appwrite/enums/VCSDeploymentType.kt | 14 + src/main/kotlin/io/appwrite/models/Build.kt | 94 -- .../kotlin/io/appwrite/models/Deployment.kt | 42 +- .../kotlin/io/appwrite/models/Execution.kt | 2 +- .../kotlin/io/appwrite/models/Framework.kt | 62 ++ .../io/appwrite/models/FrameworkAdapter.kt | 62 ++ .../io/appwrite/models/FrameworkList.kt | 38 + .../kotlin/io/appwrite/models/Function.kt | 44 +- src/main/kotlin/io/appwrite/models/Index.kt | 8 + .../io/appwrite/models/ResourceToken.kt | 78 ++ .../io/appwrite/models/ResourceTokenList.kt | 38 + src/main/kotlin/io/appwrite/models/Site.kt | 254 +++++ .../kotlin/io/appwrite/models/SiteList.kt | 38 + .../kotlin/io/appwrite/models/Variable.kt | 8 + .../kotlin/io/appwrite/services/Avatars.kt | 6 +- .../kotlin/io/appwrite/services/Databases.kt | 3 + .../kotlin/io/appwrite/services/Functions.kt | 230 ++-- src/main/kotlin/io/appwrite/services/Sites.kt | 978 ++++++++++++++++++ .../kotlin/io/appwrite/services/Storage.kt | 13 +- src/main/kotlin/io/appwrite/services/Teams.kt | 2 +- .../kotlin/io/appwrite/services/Tokens.kt | 183 ++++ src/main/kotlin/io/appwrite/services/Users.kt | 7 + 130 files changed, 3624 insertions(+), 236 deletions(-) rename docs/examples/java/functions/{create-build.md => create-duplicate-deployment.md} (94%) create mode 100644 docs/examples/java/functions/create-template-deployment.md create mode 100644 docs/examples/java/functions/create-vcs-deployment.md rename docs/examples/java/functions/{update-deployment-build.md => update-deployment-status.md} (95%) rename docs/examples/java/functions/{update-deployment.md => update-function-deployment.md} (94%) create mode 100644 docs/examples/java/sites/create-deployment.md create mode 100644 docs/examples/java/sites/create-duplicate-deployment.md create mode 100644 docs/examples/java/sites/create-template-deployment.md create mode 100644 docs/examples/java/sites/create-variable.md create mode 100644 docs/examples/java/sites/create-vcs-deployment.md create mode 100644 docs/examples/java/sites/create.md create mode 100644 docs/examples/java/sites/delete-deployment.md create mode 100644 docs/examples/java/sites/delete-log.md create mode 100644 docs/examples/java/sites/delete-variable.md create mode 100644 docs/examples/java/sites/delete.md create mode 100644 docs/examples/java/sites/get-deployment-download.md create mode 100644 docs/examples/java/sites/get-deployment.md create mode 100644 docs/examples/java/sites/get-log.md create mode 100644 docs/examples/java/sites/get-variable.md create mode 100644 docs/examples/java/sites/get.md create mode 100644 docs/examples/java/sites/list-deployments.md create mode 100644 docs/examples/java/sites/list-frameworks.md create mode 100644 docs/examples/java/sites/list-logs.md create mode 100644 docs/examples/java/sites/list-specifications.md create mode 100644 docs/examples/java/sites/list-variables.md create mode 100644 docs/examples/java/sites/list.md create mode 100644 docs/examples/java/sites/update-deployment-status.md create mode 100644 docs/examples/java/sites/update-site-deployment.md create mode 100644 docs/examples/java/sites/update-variable.md create mode 100644 docs/examples/java/sites/update.md create mode 100644 docs/examples/java/tokens/create-file-token.md create mode 100644 docs/examples/java/tokens/delete.md create mode 100644 docs/examples/java/tokens/get.md create mode 100644 docs/examples/java/tokens/list.md create mode 100644 docs/examples/java/tokens/update.md rename docs/examples/kotlin/functions/{create-build.md => create-duplicate-deployment.md} (90%) create mode 100644 docs/examples/kotlin/functions/create-template-deployment.md create mode 100644 docs/examples/kotlin/functions/create-vcs-deployment.md rename docs/examples/kotlin/functions/{update-deployment-build.md => update-deployment-status.md} (89%) rename docs/examples/kotlin/functions/{update-deployment.md => update-function-deployment.md} (89%) create mode 100644 docs/examples/kotlin/sites/create-deployment.md create mode 100644 docs/examples/kotlin/sites/create-duplicate-deployment.md create mode 100644 docs/examples/kotlin/sites/create-template-deployment.md create mode 100644 docs/examples/kotlin/sites/create-variable.md create mode 100644 docs/examples/kotlin/sites/create-vcs-deployment.md create mode 100644 docs/examples/kotlin/sites/create.md create mode 100644 docs/examples/kotlin/sites/delete-deployment.md create mode 100644 docs/examples/kotlin/sites/delete-log.md create mode 100644 docs/examples/kotlin/sites/delete-variable.md create mode 100644 docs/examples/kotlin/sites/delete.md create mode 100644 docs/examples/kotlin/sites/get-deployment-download.md create mode 100644 docs/examples/kotlin/sites/get-deployment.md create mode 100644 docs/examples/kotlin/sites/get-log.md create mode 100644 docs/examples/kotlin/sites/get-variable.md create mode 100644 docs/examples/kotlin/sites/get.md create mode 100644 docs/examples/kotlin/sites/list-deployments.md create mode 100644 docs/examples/kotlin/sites/list-frameworks.md create mode 100644 docs/examples/kotlin/sites/list-logs.md create mode 100644 docs/examples/kotlin/sites/list-specifications.md create mode 100644 docs/examples/kotlin/sites/list-variables.md create mode 100644 docs/examples/kotlin/sites/list.md create mode 100644 docs/examples/kotlin/sites/update-deployment-status.md create mode 100644 docs/examples/kotlin/sites/update-site-deployment.md create mode 100644 docs/examples/kotlin/sites/update-variable.md create mode 100644 docs/examples/kotlin/sites/update.md create mode 100644 docs/examples/kotlin/tokens/create-file-token.md create mode 100644 docs/examples/kotlin/tokens/delete.md create mode 100644 docs/examples/kotlin/tokens/get.md create mode 100644 docs/examples/kotlin/tokens/list.md create mode 100644 docs/examples/kotlin/tokens/update.md create mode 100644 src/main/kotlin/io/appwrite/enums/Adapter.kt create mode 100644 src/main/kotlin/io/appwrite/enums/BuildRuntime.kt create mode 100644 src/main/kotlin/io/appwrite/enums/DeploymentDownloadType.kt create mode 100644 src/main/kotlin/io/appwrite/enums/Framework.kt create mode 100644 src/main/kotlin/io/appwrite/enums/VCSDeploymentType.kt delete mode 100644 src/main/kotlin/io/appwrite/models/Build.kt create mode 100644 src/main/kotlin/io/appwrite/models/Framework.kt create mode 100644 src/main/kotlin/io/appwrite/models/FrameworkAdapter.kt create mode 100644 src/main/kotlin/io/appwrite/models/FrameworkList.kt create mode 100644 src/main/kotlin/io/appwrite/models/ResourceToken.kt create mode 100644 src/main/kotlin/io/appwrite/models/ResourceTokenList.kt create mode 100644 src/main/kotlin/io/appwrite/models/Site.kt create mode 100644 src/main/kotlin/io/appwrite/models/SiteList.kt create mode 100644 src/main/kotlin/io/appwrite/services/Sites.kt create mode 100644 src/main/kotlin/io/appwrite/services/Tokens.kt diff --git a/README.md b/README.md index 5dc7ce9..bc183d8 100644 --- a/README.md +++ b/README.md @@ -2,11 +2,11 @@ ![Maven Central](https://img.shields.io/maven-central/v/io.appwrite/sdk-for-kotlin.svg?color=green&style=flat-square) ![License](https://img.shields.io/github/license/appwrite/sdk-for-kotlin.svg?style=flat-square) -![Version](https://img.shields.io/badge/api%20version-1.6.2-blue.svg?style=flat-square) +![Version](https://img.shields.io/badge/api%20version-1.7.0-blue.svg?style=flat-square) [![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.6.x. For older versions, please check [previous releases](https://github.com/appwrite/sdk-for-kotlin/releases).** +**This SDK is compatible with Appwrite server version 1.7.x. For older versions, please check [previous releases](https://github.com/appwrite/sdk-for-kotlin/releases).** > This is the Kotlin SDK for integrating with Appwrite from your Kotlin server-side code. If you're looking for the Android SDK you should check [appwrite/sdk-for-android](https://github.com/appwrite/sdk-for-android) @@ -39,7 +39,7 @@ repositories { Next, add the dependency to your project's `build.gradle(.kts)` file: ```groovy -implementation("io.appwrite:sdk-for-kotlin:8.1.0-rc.1") +implementation("io.appwrite:sdk-for-kotlin:8.2.0") ``` ### Maven @@ -50,7 +50,7 @@ Add this to your project's `pom.xml` file: <dependency> <groupId>io.appwrite</groupId> <artifactId>sdk-for-kotlin</artifactId> - <version>8.1.0-rc.1</version> + <version>8.2.0</version> </dependency> </dependencies> ``` diff --git a/docs/examples/java/avatars/get-browser.md b/docs/examples/java/avatars/get-browser.md index c87d5e9..9c3433e 100644 --- a/docs/examples/java/avatars/get-browser.md +++ b/docs/examples/java/avatars/get-browser.md @@ -14,7 +14,7 @@ avatars.getBrowser( Browser.AVANT_BROWSER, // code 0, // width (optional) 0, // height (optional) - 0, // quality (optional) + -1, // quality (optional) new CoroutineCallback<>((result, error) -> { if (error != null) { error.printStackTrace(); diff --git a/docs/examples/java/avatars/get-credit-card.md b/docs/examples/java/avatars/get-credit-card.md index ddb53a6..6904638 100644 --- a/docs/examples/java/avatars/get-credit-card.md +++ b/docs/examples/java/avatars/get-credit-card.md @@ -14,7 +14,7 @@ avatars.getCreditCard( CreditCard.AMERICAN_EXPRESS, // code 0, // width (optional) 0, // height (optional) - 0, // quality (optional) + -1, // quality (optional) new CoroutineCallback<>((result, error) -> { if (error != null) { error.printStackTrace(); diff --git a/docs/examples/java/avatars/get-flag.md b/docs/examples/java/avatars/get-flag.md index aadf426..159dcdc 100644 --- a/docs/examples/java/avatars/get-flag.md +++ b/docs/examples/java/avatars/get-flag.md @@ -14,7 +14,7 @@ avatars.getFlag( Flag.AFGHANISTAN, // code 0, // width (optional) 0, // height (optional) - 0, // quality (optional) + -1, // quality (optional) new CoroutineCallback<>((result, error) -> { if (error != null) { error.printStackTrace(); diff --git a/docs/examples/java/databases/create-document.md b/docs/examples/java/databases/create-document.md index 5231be3..368b816 100644 --- a/docs/examples/java/databases/create-document.md +++ b/docs/examples/java/databases/create-document.md @@ -4,8 +4,9 @@ import io.appwrite.services.Databases; Client client = new Client() .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint - .setProject("<YOUR_PROJECT_ID>") // Your project ID - .setSession(""); // The user session to authenticate with + .setSession("") // The user session to authenticate with + .setKey("<YOUR_API_KEY>") // Your secret API key + .setJWT("<YOUR_JWT>"); // Your secret JSON Web Token Databases databases = new Databases(client); diff --git a/docs/examples/java/databases/create-documents.md b/docs/examples/java/databases/create-documents.md index c788fa7..d816af3 100644 --- a/docs/examples/java/databases/create-documents.md +++ b/docs/examples/java/databases/create-documents.md @@ -4,8 +4,7 @@ import io.appwrite.services.Databases; Client client = new Client() .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint - .setProject("<YOUR_PROJECT_ID>") // Your project ID - .setSession(""); // The user session to authenticate with + .setKey("<YOUR_API_KEY>"); // Your secret API key Databases databases = new Databases(client); diff --git a/docs/examples/java/databases/create-index.md b/docs/examples/java/databases/create-index.md index f3faec7..fe2d9bf 100644 --- a/docs/examples/java/databases/create-index.md +++ b/docs/examples/java/databases/create-index.md @@ -17,6 +17,7 @@ databases.createIndex( IndexType.KEY, // type listOf(), // attributes listOf(), // orders (optional) + listOf(), // lengths (optional) new CoroutineCallback<>((result, error) -> { if (error != null) { error.printStackTrace(); diff --git a/docs/examples/java/functions/create-build.md b/docs/examples/java/functions/create-duplicate-deployment.md similarity index 94% rename from docs/examples/java/functions/create-build.md rename to docs/examples/java/functions/create-duplicate-deployment.md index a3f6cc5..6b9d9a1 100644 --- a/docs/examples/java/functions/create-build.md +++ b/docs/examples/java/functions/create-duplicate-deployment.md @@ -9,7 +9,7 @@ Client client = new Client() Functions functions = new Functions(client); -functions.createBuild( +functions.createDuplicateDeployment( "<FUNCTION_ID>", // functionId "<DEPLOYMENT_ID>", // deploymentId "<BUILD_ID>", // buildId (optional) diff --git a/docs/examples/java/functions/create-template-deployment.md b/docs/examples/java/functions/create-template-deployment.md new file mode 100644 index 0000000..53b5a9a --- /dev/null +++ b/docs/examples/java/functions/create-template-deployment.md @@ -0,0 +1,28 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Functions; + +Client client = new Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>"); // Your secret API key + +Functions functions = new Functions(client); + +functions.createTemplateDeployment( + "<FUNCTION_ID>", // functionId + "<REPOSITORY>", // repository + "<OWNER>", // owner + "<ROOT_DIRECTORY>", // rootDirectory + "<VERSION>", // version + false, // activate (optional) + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); + }) +); + diff --git a/docs/examples/java/functions/create-variable.md b/docs/examples/java/functions/create-variable.md index df2bb8e..70764fb 100644 --- a/docs/examples/java/functions/create-variable.md +++ b/docs/examples/java/functions/create-variable.md @@ -13,6 +13,7 @@ functions.createVariable( "<FUNCTION_ID>", // functionId "<KEY>", // key "<VALUE>", // value + false, // secret (optional) new CoroutineCallback<>((result, error) -> { if (error != null) { error.printStackTrace(); diff --git a/docs/examples/java/functions/create-vcs-deployment.md b/docs/examples/java/functions/create-vcs-deployment.md new file mode 100644 index 0000000..9274cd8 --- /dev/null +++ b/docs/examples/java/functions/create-vcs-deployment.md @@ -0,0 +1,27 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Functions; +import io.appwrite.enums.VCSDeploymentType; + +Client client = new Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>"); // Your secret API key + +Functions functions = new Functions(client); + +functions.createVcsDeployment( + "<FUNCTION_ID>", // functionId + VCSDeploymentType.BRANCH, // type + "<REFERENCE>", // reference + false, // activate (optional) + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); + }) +); + diff --git a/docs/examples/java/functions/create.md b/docs/examples/java/functions/create.md index 7137e40..7187128 100644 --- a/docs/examples/java/functions/create.md +++ b/docs/examples/java/functions/create.md @@ -28,10 +28,6 @@ functions.create( "<PROVIDER_BRANCH>", // providerBranch (optional) false, // providerSilentMode (optional) "<PROVIDER_ROOT_DIRECTORY>", // providerRootDirectory (optional) - "<TEMPLATE_REPOSITORY>", // templateRepository (optional) - "<TEMPLATE_OWNER>", // templateOwner (optional) - "<TEMPLATE_ROOT_DIRECTORY>", // templateRootDirectory (optional) - "<TEMPLATE_VERSION>", // templateVersion (optional) "", // specification (optional) new CoroutineCallback<>((result, error) -> { if (error != null) { diff --git a/docs/examples/java/functions/get-deployment-download.md b/docs/examples/java/functions/get-deployment-download.md index e2a0748..d522b12 100644 --- a/docs/examples/java/functions/get-deployment-download.md +++ b/docs/examples/java/functions/get-deployment-download.md @@ -12,6 +12,7 @@ Functions functions = new Functions(client); functions.getDeploymentDownload( "<FUNCTION_ID>", // functionId "<DEPLOYMENT_ID>", // deploymentId + DeploymentDownloadType.SOURCE, // type (optional) new CoroutineCallback<>((result, error) -> { if (error != null) { error.printStackTrace(); diff --git a/docs/examples/java/functions/list-executions.md b/docs/examples/java/functions/list-executions.md index 7a2ff91..25a9af8 100644 --- a/docs/examples/java/functions/list-executions.md +++ b/docs/examples/java/functions/list-executions.md @@ -12,7 +12,6 @@ Functions functions = new Functions(client); functions.listExecutions( "<FUNCTION_ID>", // functionId listOf(), // queries (optional) - "<SEARCH>", // search (optional) new CoroutineCallback<>((result, error) -> { if (error != null) { error.printStackTrace(); diff --git a/docs/examples/java/functions/update-deployment-build.md b/docs/examples/java/functions/update-deployment-status.md similarity index 95% rename from docs/examples/java/functions/update-deployment-build.md rename to docs/examples/java/functions/update-deployment-status.md index 5fc416b..8755fd9 100644 --- a/docs/examples/java/functions/update-deployment-build.md +++ b/docs/examples/java/functions/update-deployment-status.md @@ -9,7 +9,7 @@ Client client = new Client() Functions functions = new Functions(client); -functions.updateDeploymentBuild( +functions.updateDeploymentStatus( "<FUNCTION_ID>", // functionId "<DEPLOYMENT_ID>", // deploymentId new CoroutineCallback<>((result, error) -> { diff --git a/docs/examples/java/functions/update-deployment.md b/docs/examples/java/functions/update-function-deployment.md similarity index 94% rename from docs/examples/java/functions/update-deployment.md rename to docs/examples/java/functions/update-function-deployment.md index b83e001..b88e87c 100644 --- a/docs/examples/java/functions/update-deployment.md +++ b/docs/examples/java/functions/update-function-deployment.md @@ -9,7 +9,7 @@ Client client = new Client() Functions functions = new Functions(client); -functions.updateDeployment( +functions.updateFunctionDeployment( "<FUNCTION_ID>", // functionId "<DEPLOYMENT_ID>", // deploymentId new CoroutineCallback<>((result, error) -> { diff --git a/docs/examples/java/functions/update-variable.md b/docs/examples/java/functions/update-variable.md index d2bf6db..3a2b281 100644 --- a/docs/examples/java/functions/update-variable.md +++ b/docs/examples/java/functions/update-variable.md @@ -14,6 +14,7 @@ functions.updateVariable( "<VARIABLE_ID>", // variableId "<KEY>", // key "<VALUE>", // value (optional) + false, // secret (optional) new CoroutineCallback<>((result, error) -> { if (error != null) { error.printStackTrace(); diff --git a/docs/examples/java/sites/create-deployment.md b/docs/examples/java/sites/create-deployment.md new file mode 100644 index 0000000..f370f80 --- /dev/null +++ b/docs/examples/java/sites/create-deployment.md @@ -0,0 +1,29 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.models.InputFile; +import io.appwrite.services.Sites; + +Client client = new Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>"); // Your secret API key + +Sites sites = new Sites(client); + +sites.createDeployment( + "<SITE_ID>", // siteId + InputFile.fromPath("file.png"), // code + false, // activate + "<INSTALL_COMMAND>", // installCommand (optional) + "<BUILD_COMMAND>", // buildCommand (optional) + "<OUTPUT_DIRECTORY>", // outputDirectory (optional) + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); + }) +); + diff --git a/docs/examples/java/sites/create-duplicate-deployment.md b/docs/examples/java/sites/create-duplicate-deployment.md new file mode 100644 index 0000000..35e43b8 --- /dev/null +++ b/docs/examples/java/sites/create-duplicate-deployment.md @@ -0,0 +1,24 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Sites; + +Client client = new Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>"); // Your secret API key + +Sites sites = new Sites(client); + +sites.createDuplicateDeployment( + "<SITE_ID>", // siteId + "<DEPLOYMENT_ID>", // deploymentId + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); + }) +); + diff --git a/docs/examples/java/sites/create-template-deployment.md b/docs/examples/java/sites/create-template-deployment.md new file mode 100644 index 0000000..63aba4a --- /dev/null +++ b/docs/examples/java/sites/create-template-deployment.md @@ -0,0 +1,28 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Sites; + +Client client = new Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>"); // Your secret API key + +Sites sites = new Sites(client); + +sites.createTemplateDeployment( + "<SITE_ID>", // siteId + "<REPOSITORY>", // repository + "<OWNER>", // owner + "<ROOT_DIRECTORY>", // rootDirectory + "<VERSION>", // version + false, // activate (optional) + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); + }) +); + diff --git a/docs/examples/java/sites/create-variable.md b/docs/examples/java/sites/create-variable.md new file mode 100644 index 0000000..c77bec3 --- /dev/null +++ b/docs/examples/java/sites/create-variable.md @@ -0,0 +1,26 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Sites; + +Client client = new Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>"); // Your secret API key + +Sites sites = new Sites(client); + +sites.createVariable( + "<SITE_ID>", // siteId + "<KEY>", // key + "<VALUE>", // value + false, // secret (optional) + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); + }) +); + diff --git a/docs/examples/java/sites/create-vcs-deployment.md b/docs/examples/java/sites/create-vcs-deployment.md new file mode 100644 index 0000000..754eb26 --- /dev/null +++ b/docs/examples/java/sites/create-vcs-deployment.md @@ -0,0 +1,27 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Sites; +import io.appwrite.enums.VCSDeploymentType; + +Client client = new Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>"); // Your secret API key + +Sites sites = new Sites(client); + +sites.createVcsDeployment( + "<SITE_ID>", // siteId + VCSDeploymentType.BRANCH, // type + "<REFERENCE>", // reference + false, // activate (optional) + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); + }) +); + diff --git a/docs/examples/java/sites/create.md b/docs/examples/java/sites/create.md new file mode 100644 index 0000000..19664ec --- /dev/null +++ b/docs/examples/java/sites/create.md @@ -0,0 +1,42 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Sites; +import io.appwrite.enums.Framework; +import io.appwrite.enums.BuildRuntime; + +Client client = new Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>"); // Your secret API key + +Sites sites = new Sites(client); + +sites.create( + "<SITE_ID>", // siteId + "<NAME>", // name + .ANALOG, // framework + .NODE_14_5, // buildRuntime + false, // enabled (optional) + false, // logging (optional) + 1, // timeout (optional) + "<INSTALL_COMMAND>", // installCommand (optional) + "<BUILD_COMMAND>", // buildCommand (optional) + "<OUTPUT_DIRECTORY>", // outputDirectory (optional) + .STATIC, // adapter (optional) + "<INSTALLATION_ID>", // installationId (optional) + "<FALLBACK_FILE>", // fallbackFile (optional) + "<PROVIDER_REPOSITORY_ID>", // providerRepositoryId (optional) + "<PROVIDER_BRANCH>", // providerBranch (optional) + false, // providerSilentMode (optional) + "<PROVIDER_ROOT_DIRECTORY>", // providerRootDirectory (optional) + "", // specification (optional) + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); + }) +); + diff --git a/docs/examples/java/sites/delete-deployment.md b/docs/examples/java/sites/delete-deployment.md new file mode 100644 index 0000000..97c08ab --- /dev/null +++ b/docs/examples/java/sites/delete-deployment.md @@ -0,0 +1,24 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Sites; + +Client client = new Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>"); // Your secret API key + +Sites sites = new Sites(client); + +sites.deleteDeployment( + "<SITE_ID>", // siteId + "<DEPLOYMENT_ID>", // deploymentId + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); + }) +); + diff --git a/docs/examples/java/sites/delete-log.md b/docs/examples/java/sites/delete-log.md new file mode 100644 index 0000000..d718937 --- /dev/null +++ b/docs/examples/java/sites/delete-log.md @@ -0,0 +1,24 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Sites; + +Client client = new Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>"); // Your secret API key + +Sites sites = new Sites(client); + +sites.deleteLog( + "<SITE_ID>", // siteId + "<LOG_ID>", // logId + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); + }) +); + diff --git a/docs/examples/java/sites/delete-variable.md b/docs/examples/java/sites/delete-variable.md new file mode 100644 index 0000000..4e2b3ab --- /dev/null +++ b/docs/examples/java/sites/delete-variable.md @@ -0,0 +1,24 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Sites; + +Client client = new Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>"); // Your secret API key + +Sites sites = new Sites(client); + +sites.deleteVariable( + "<SITE_ID>", // siteId + "<VARIABLE_ID>", // variableId + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); + }) +); + diff --git a/docs/examples/java/sites/delete.md b/docs/examples/java/sites/delete.md new file mode 100644 index 0000000..fd07bb2 --- /dev/null +++ b/docs/examples/java/sites/delete.md @@ -0,0 +1,23 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Sites; + +Client client = new Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>"); // Your secret API key + +Sites sites = new Sites(client); + +sites.delete( + "<SITE_ID>", // siteId + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); + }) +); + diff --git a/docs/examples/java/sites/get-deployment-download.md b/docs/examples/java/sites/get-deployment-download.md new file mode 100644 index 0000000..5875c72 --- /dev/null +++ b/docs/examples/java/sites/get-deployment-download.md @@ -0,0 +1,25 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Sites; + +Client client = new Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>"); // Your secret API key + +Sites sites = new Sites(client); + +sites.getDeploymentDownload( + "<SITE_ID>", // siteId + "<DEPLOYMENT_ID>", // deploymentId + DeploymentDownloadType.SOURCE, // type (optional) + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); + }) +); + diff --git a/docs/examples/java/sites/get-deployment.md b/docs/examples/java/sites/get-deployment.md new file mode 100644 index 0000000..6af859b --- /dev/null +++ b/docs/examples/java/sites/get-deployment.md @@ -0,0 +1,24 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Sites; + +Client client = new Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>"); // Your secret API key + +Sites sites = new Sites(client); + +sites.getDeployment( + "<SITE_ID>", // siteId + "<DEPLOYMENT_ID>", // deploymentId + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); + }) +); + diff --git a/docs/examples/java/sites/get-log.md b/docs/examples/java/sites/get-log.md new file mode 100644 index 0000000..d33f2a6 --- /dev/null +++ b/docs/examples/java/sites/get-log.md @@ -0,0 +1,24 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Sites; + +Client client = new Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>"); // Your secret API key + +Sites sites = new Sites(client); + +sites.getLog( + "<SITE_ID>", // siteId + "<LOG_ID>", // logId + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); + }) +); + diff --git a/docs/examples/java/sites/get-variable.md b/docs/examples/java/sites/get-variable.md new file mode 100644 index 0000000..1c8df0c --- /dev/null +++ b/docs/examples/java/sites/get-variable.md @@ -0,0 +1,24 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Sites; + +Client client = new Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>"); // Your secret API key + +Sites sites = new Sites(client); + +sites.getVariable( + "<SITE_ID>", // siteId + "<VARIABLE_ID>", // variableId + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); + }) +); + diff --git a/docs/examples/java/sites/get.md b/docs/examples/java/sites/get.md new file mode 100644 index 0000000..660cad3 --- /dev/null +++ b/docs/examples/java/sites/get.md @@ -0,0 +1,23 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Sites; + +Client client = new Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>"); // Your secret API key + +Sites sites = new Sites(client); + +sites.get( + "<SITE_ID>", // siteId + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); + }) +); + diff --git a/docs/examples/java/sites/list-deployments.md b/docs/examples/java/sites/list-deployments.md new file mode 100644 index 0000000..8bcec54 --- /dev/null +++ b/docs/examples/java/sites/list-deployments.md @@ -0,0 +1,25 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Sites; + +Client client = new Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>"); // Your secret API key + +Sites sites = new Sites(client); + +sites.listDeployments( + "<SITE_ID>", // siteId + listOf(), // queries (optional) + "<SEARCH>", // search (optional) + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); + }) +); + diff --git a/docs/examples/java/sites/list-frameworks.md b/docs/examples/java/sites/list-frameworks.md new file mode 100644 index 0000000..df59717 --- /dev/null +++ b/docs/examples/java/sites/list-frameworks.md @@ -0,0 +1,19 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Sites; + +Client client = new Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>"); // Your secret API key + +Sites sites = new Sites(client); + +sites.listFrameworks(new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); +})); diff --git a/docs/examples/java/sites/list-logs.md b/docs/examples/java/sites/list-logs.md new file mode 100644 index 0000000..3532882 --- /dev/null +++ b/docs/examples/java/sites/list-logs.md @@ -0,0 +1,24 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Sites; + +Client client = new Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>"); // Your secret API key + +Sites sites = new Sites(client); + +sites.listLogs( + "<SITE_ID>", // siteId + listOf(), // queries (optional) + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); + }) +); + diff --git a/docs/examples/java/sites/list-specifications.md b/docs/examples/java/sites/list-specifications.md new file mode 100644 index 0000000..caad732 --- /dev/null +++ b/docs/examples/java/sites/list-specifications.md @@ -0,0 +1,19 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Sites; + +Client client = new Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>"); // Your secret API key + +Sites sites = new Sites(client); + +sites.listSpecifications(new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); +})); diff --git a/docs/examples/java/sites/list-variables.md b/docs/examples/java/sites/list-variables.md new file mode 100644 index 0000000..f2a38b7 --- /dev/null +++ b/docs/examples/java/sites/list-variables.md @@ -0,0 +1,23 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Sites; + +Client client = new Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>"); // Your secret API key + +Sites sites = new Sites(client); + +sites.listVariables( + "<SITE_ID>", // siteId + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); + }) +); + diff --git a/docs/examples/java/sites/list.md b/docs/examples/java/sites/list.md new file mode 100644 index 0000000..39a1c06 --- /dev/null +++ b/docs/examples/java/sites/list.md @@ -0,0 +1,24 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Sites; + +Client client = new Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>"); // Your secret API key + +Sites sites = new Sites(client); + +sites.list( + listOf(), // queries (optional) + "<SEARCH>", // search (optional) + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); + }) +); + diff --git a/docs/examples/java/sites/update-deployment-status.md b/docs/examples/java/sites/update-deployment-status.md new file mode 100644 index 0000000..8dc3041 --- /dev/null +++ b/docs/examples/java/sites/update-deployment-status.md @@ -0,0 +1,24 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Sites; + +Client client = new Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>"); // Your secret API key + +Sites sites = new Sites(client); + +sites.updateDeploymentStatus( + "<SITE_ID>", // siteId + "<DEPLOYMENT_ID>", // deploymentId + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); + }) +); + diff --git a/docs/examples/java/sites/update-site-deployment.md b/docs/examples/java/sites/update-site-deployment.md new file mode 100644 index 0000000..edbda7c --- /dev/null +++ b/docs/examples/java/sites/update-site-deployment.md @@ -0,0 +1,24 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Sites; + +Client client = new Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>"); // Your secret API key + +Sites sites = new Sites(client); + +sites.updateSiteDeployment( + "<SITE_ID>", // siteId + "<DEPLOYMENT_ID>", // deploymentId + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); + }) +); + diff --git a/docs/examples/java/sites/update-variable.md b/docs/examples/java/sites/update-variable.md new file mode 100644 index 0000000..9735ae3 --- /dev/null +++ b/docs/examples/java/sites/update-variable.md @@ -0,0 +1,27 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Sites; + +Client client = new Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>"); // Your secret API key + +Sites sites = new Sites(client); + +sites.updateVariable( + "<SITE_ID>", // siteId + "<VARIABLE_ID>", // variableId + "<KEY>", // key + "<VALUE>", // value (optional) + false, // secret (optional) + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); + }) +); + diff --git a/docs/examples/java/sites/update.md b/docs/examples/java/sites/update.md new file mode 100644 index 0000000..9a8b577 --- /dev/null +++ b/docs/examples/java/sites/update.md @@ -0,0 +1,41 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Sites; +import io.appwrite.enums.Framework; + +Client client = new Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>"); // Your secret API key + +Sites sites = new Sites(client); + +sites.update( + "<SITE_ID>", // siteId + "<NAME>", // name + .ANALOG, // framework + false, // enabled (optional) + false, // logging (optional) + 1, // timeout (optional) + "<INSTALL_COMMAND>", // installCommand (optional) + "<BUILD_COMMAND>", // buildCommand (optional) + "<OUTPUT_DIRECTORY>", // outputDirectory (optional) + .NODE_14_5, // buildRuntime (optional) + .STATIC, // adapter (optional) + "<FALLBACK_FILE>", // fallbackFile (optional) + "<INSTALLATION_ID>", // installationId (optional) + "<PROVIDER_REPOSITORY_ID>", // providerRepositoryId (optional) + "<PROVIDER_BRANCH>", // providerBranch (optional) + false, // providerSilentMode (optional) + "<PROVIDER_ROOT_DIRECTORY>", // providerRootDirectory (optional) + "", // specification (optional) + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); + }) +); + diff --git a/docs/examples/java/storage/get-file-download.md b/docs/examples/java/storage/get-file-download.md index d0399f9..edda260 100644 --- a/docs/examples/java/storage/get-file-download.md +++ b/docs/examples/java/storage/get-file-download.md @@ -12,6 +12,7 @@ Storage storage = new Storage(client); storage.getFileDownload( "<BUCKET_ID>", // bucketId "<FILE_ID>", // fileId + "<TOKEN>", // token (optional) new CoroutineCallback<>((result, error) -> { if (error != null) { error.printStackTrace(); diff --git a/docs/examples/java/storage/get-file-preview.md b/docs/examples/java/storage/get-file-preview.md index dd7c09d..1a0ab59 100644 --- a/docs/examples/java/storage/get-file-preview.md +++ b/docs/examples/java/storage/get-file-preview.md @@ -15,7 +15,7 @@ storage.getFilePreview( 0, // width (optional) 0, // height (optional) ImageGravity.CENTER, // gravity (optional) - 0, // quality (optional) + -1, // quality (optional) 0, // borderWidth (optional) "", // borderColor (optional) 0, // borderRadius (optional) @@ -23,6 +23,7 @@ storage.getFilePreview( -360, // rotation (optional) "", // background (optional) ImageFormat.JPG, // output (optional) + "<TOKEN>", // token (optional) new CoroutineCallback<>((result, error) -> { if (error != null) { error.printStackTrace(); diff --git a/docs/examples/java/storage/get-file-view.md b/docs/examples/java/storage/get-file-view.md index 1de4ae0..178e507 100644 --- a/docs/examples/java/storage/get-file-view.md +++ b/docs/examples/java/storage/get-file-view.md @@ -12,6 +12,7 @@ Storage storage = new Storage(client); storage.getFileView( "<BUCKET_ID>", // bucketId "<FILE_ID>", // fileId + "<TOKEN>", // token (optional) new CoroutineCallback<>((result, error) -> { if (error != null) { error.printStackTrace(); diff --git a/docs/examples/java/tokens/create-file-token.md b/docs/examples/java/tokens/create-file-token.md new file mode 100644 index 0000000..6996641 --- /dev/null +++ b/docs/examples/java/tokens/create-file-token.md @@ -0,0 +1,25 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Tokens; + +Client client = new Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>"); // Your secret API key + +Tokens tokens = new Tokens(client); + +tokens.createFileToken( + "<BUCKET_ID>", // bucketId + "<FILE_ID>", // fileId + "", // expire (optional) + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); + }) +); + diff --git a/docs/examples/java/tokens/delete.md b/docs/examples/java/tokens/delete.md new file mode 100644 index 0000000..bf1874d --- /dev/null +++ b/docs/examples/java/tokens/delete.md @@ -0,0 +1,23 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Tokens; + +Client client = new Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>"); // Your secret API key + +Tokens tokens = new Tokens(client); + +tokens.delete( + "<TOKEN_ID>", // tokenId + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); + }) +); + diff --git a/docs/examples/java/tokens/get.md b/docs/examples/java/tokens/get.md new file mode 100644 index 0000000..c55563c --- /dev/null +++ b/docs/examples/java/tokens/get.md @@ -0,0 +1,23 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Tokens; + +Client client = new Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>"); // Your secret API key + +Tokens tokens = new Tokens(client); + +tokens.get( + "<TOKEN_ID>", // tokenId + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); + }) +); + diff --git a/docs/examples/java/tokens/list.md b/docs/examples/java/tokens/list.md new file mode 100644 index 0000000..a59e9f5 --- /dev/null +++ b/docs/examples/java/tokens/list.md @@ -0,0 +1,25 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Tokens; + +Client client = new Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>"); // Your secret API key + +Tokens tokens = new Tokens(client); + +tokens.list( + "<BUCKET_ID>", // bucketId + "<FILE_ID>", // fileId + listOf(), // queries (optional) + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); + }) +); + diff --git a/docs/examples/java/tokens/update.md b/docs/examples/java/tokens/update.md new file mode 100644 index 0000000..2a44f2d --- /dev/null +++ b/docs/examples/java/tokens/update.md @@ -0,0 +1,24 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Tokens; + +Client client = new Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>"); // Your secret API key + +Tokens tokens = new Tokens(client); + +tokens.update( + "<TOKEN_ID>", // tokenId + "", // expire (optional) + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); + }) +); + diff --git a/docs/examples/java/users/list-memberships.md b/docs/examples/java/users/list-memberships.md index dc03be2..d0cee13 100644 --- a/docs/examples/java/users/list-memberships.md +++ b/docs/examples/java/users/list-memberships.md @@ -11,6 +11,8 @@ Users users = new Users(client); users.listMemberships( "<USER_ID>", // userId + listOf(), // queries (optional) + "<SEARCH>", // search (optional) new CoroutineCallback<>((result, error) -> { if (error != null) { error.printStackTrace(); diff --git a/docs/examples/kotlin/avatars/get-browser.md b/docs/examples/kotlin/avatars/get-browser.md index e9b95c9..f289205 100644 --- a/docs/examples/kotlin/avatars/get-browser.md +++ b/docs/examples/kotlin/avatars/get-browser.md @@ -14,5 +14,5 @@ val result = avatars.getBrowser( code = Browser.AVANT_BROWSER, width = 0, // optional height = 0, // optional - quality = 0 // optional + quality = -1 // optional ) diff --git a/docs/examples/kotlin/avatars/get-credit-card.md b/docs/examples/kotlin/avatars/get-credit-card.md index 8554dbd..1fd00a2 100644 --- a/docs/examples/kotlin/avatars/get-credit-card.md +++ b/docs/examples/kotlin/avatars/get-credit-card.md @@ -14,5 +14,5 @@ val result = avatars.getCreditCard( code = CreditCard.AMERICAN_EXPRESS, width = 0, // optional height = 0, // optional - quality = 0 // optional + quality = -1 // optional ) diff --git a/docs/examples/kotlin/avatars/get-flag.md b/docs/examples/kotlin/avatars/get-flag.md index 011a729..a16aefc 100644 --- a/docs/examples/kotlin/avatars/get-flag.md +++ b/docs/examples/kotlin/avatars/get-flag.md @@ -14,5 +14,5 @@ val result = avatars.getFlag( code = Flag.AFGHANISTAN, width = 0, // optional height = 0, // optional - quality = 0 // optional + quality = -1 // optional ) diff --git a/docs/examples/kotlin/databases/create-document.md b/docs/examples/kotlin/databases/create-document.md index 695fdbd..93da01e 100644 --- a/docs/examples/kotlin/databases/create-document.md +++ b/docs/examples/kotlin/databases/create-document.md @@ -4,8 +4,9 @@ import io.appwrite.services.Databases val client = Client() .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint - .setProject("<YOUR_PROJECT_ID>") // Your project ID .setSession("") // The user session to authenticate with + .setKey("<YOUR_API_KEY>") // Your secret API key + .setJWT("<YOUR_JWT>") // Your secret JSON Web Token val databases = Databases(client) diff --git a/docs/examples/kotlin/databases/create-documents.md b/docs/examples/kotlin/databases/create-documents.md index d9af7b0..01692c6 100644 --- a/docs/examples/kotlin/databases/create-documents.md +++ b/docs/examples/kotlin/databases/create-documents.md @@ -4,8 +4,7 @@ import io.appwrite.services.Databases val client = Client() .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint - .setProject("<YOUR_PROJECT_ID>") // Your project ID - .setSession("") // The user session to authenticate with + .setKey("<YOUR_API_KEY>") // Your secret API key val databases = Databases(client) diff --git a/docs/examples/kotlin/databases/create-index.md b/docs/examples/kotlin/databases/create-index.md index 7ada0f7..da777ac 100644 --- a/docs/examples/kotlin/databases/create-index.md +++ b/docs/examples/kotlin/databases/create-index.md @@ -16,5 +16,6 @@ val response = databases.createIndex( key = "", type = IndexType.KEY, attributes = listOf(), - orders = listOf() // optional + orders = listOf(), // optional + lengths = listOf() // optional ) diff --git a/docs/examples/kotlin/functions/create-build.md b/docs/examples/kotlin/functions/create-duplicate-deployment.md similarity index 90% rename from docs/examples/kotlin/functions/create-build.md rename to docs/examples/kotlin/functions/create-duplicate-deployment.md index f835d93..a3395f1 100644 --- a/docs/examples/kotlin/functions/create-build.md +++ b/docs/examples/kotlin/functions/create-duplicate-deployment.md @@ -9,7 +9,7 @@ val client = Client() val functions = Functions(client) -val response = functions.createBuild( +val response = functions.createDuplicateDeployment( functionId = "<FUNCTION_ID>", deploymentId = "<DEPLOYMENT_ID>", buildId = "<BUILD_ID>" // optional diff --git a/docs/examples/kotlin/functions/create-template-deployment.md b/docs/examples/kotlin/functions/create-template-deployment.md new file mode 100644 index 0000000..90c311e --- /dev/null +++ b/docs/examples/kotlin/functions/create-template-deployment.md @@ -0,0 +1,19 @@ +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Functions + +val client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +val functions = Functions(client) + +val response = functions.createTemplateDeployment( + functionId = "<FUNCTION_ID>", + repository = "<REPOSITORY>", + owner = "<OWNER>", + rootDirectory = "<ROOT_DIRECTORY>", + version = "<VERSION>", + activate = false // optional +) diff --git a/docs/examples/kotlin/functions/create-variable.md b/docs/examples/kotlin/functions/create-variable.md index 5dff26f..061bc20 100644 --- a/docs/examples/kotlin/functions/create-variable.md +++ b/docs/examples/kotlin/functions/create-variable.md @@ -12,5 +12,6 @@ val functions = Functions(client) val response = functions.createVariable( functionId = "<FUNCTION_ID>", key = "<KEY>", - value = "<VALUE>" + value = "<VALUE>", + secret = false // optional ) diff --git a/docs/examples/kotlin/functions/create-vcs-deployment.md b/docs/examples/kotlin/functions/create-vcs-deployment.md new file mode 100644 index 0000000..08bb5a3 --- /dev/null +++ b/docs/examples/kotlin/functions/create-vcs-deployment.md @@ -0,0 +1,18 @@ +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Functions +import io.appwrite.enums.VCSDeploymentType + +val client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +val functions = Functions(client) + +val response = functions.createVcsDeployment( + functionId = "<FUNCTION_ID>", + type = VCSDeploymentType.BRANCH, + reference = "<REFERENCE>", + activate = false // optional +) diff --git a/docs/examples/kotlin/functions/create.md b/docs/examples/kotlin/functions/create.md index 7278878..c0ea4de 100644 --- a/docs/examples/kotlin/functions/create.md +++ b/docs/examples/kotlin/functions/create.md @@ -28,9 +28,5 @@ val response = functions.create( providerBranch = "<PROVIDER_BRANCH>", // optional providerSilentMode = false, // optional providerRootDirectory = "<PROVIDER_ROOT_DIRECTORY>", // optional - templateRepository = "<TEMPLATE_REPOSITORY>", // optional - templateOwner = "<TEMPLATE_OWNER>", // optional - templateRootDirectory = "<TEMPLATE_ROOT_DIRECTORY>", // optional - templateVersion = "<TEMPLATE_VERSION>", // optional specification = "" // optional ) diff --git a/docs/examples/kotlin/functions/get-deployment-download.md b/docs/examples/kotlin/functions/get-deployment-download.md index 5e9558e..634cfae 100644 --- a/docs/examples/kotlin/functions/get-deployment-download.md +++ b/docs/examples/kotlin/functions/get-deployment-download.md @@ -11,5 +11,6 @@ val functions = Functions(client) val result = functions.getDeploymentDownload( functionId = "<FUNCTION_ID>", - deploymentId = "<DEPLOYMENT_ID>" + deploymentId = "<DEPLOYMENT_ID>", + type = "source" // optional ) diff --git a/docs/examples/kotlin/functions/list-executions.md b/docs/examples/kotlin/functions/list-executions.md index 9f85f67..926719c 100644 --- a/docs/examples/kotlin/functions/list-executions.md +++ b/docs/examples/kotlin/functions/list-executions.md @@ -11,6 +11,5 @@ val functions = Functions(client) val response = functions.listExecutions( functionId = "<FUNCTION_ID>", - queries = listOf(), // optional - search = "<SEARCH>" // optional + queries = listOf() // optional ) diff --git a/docs/examples/kotlin/functions/update-deployment-build.md b/docs/examples/kotlin/functions/update-deployment-status.md similarity index 89% rename from docs/examples/kotlin/functions/update-deployment-build.md rename to docs/examples/kotlin/functions/update-deployment-status.md index 839bbe6..0e6e9c0 100644 --- a/docs/examples/kotlin/functions/update-deployment-build.md +++ b/docs/examples/kotlin/functions/update-deployment-status.md @@ -9,7 +9,7 @@ val client = Client() val functions = Functions(client) -val response = functions.updateDeploymentBuild( +val response = functions.updateDeploymentStatus( functionId = "<FUNCTION_ID>", deploymentId = "<DEPLOYMENT_ID>" ) diff --git a/docs/examples/kotlin/functions/update-deployment.md b/docs/examples/kotlin/functions/update-function-deployment.md similarity index 89% rename from docs/examples/kotlin/functions/update-deployment.md rename to docs/examples/kotlin/functions/update-function-deployment.md index cf020d6..a975e07 100644 --- a/docs/examples/kotlin/functions/update-deployment.md +++ b/docs/examples/kotlin/functions/update-function-deployment.md @@ -9,7 +9,7 @@ val client = Client() val functions = Functions(client) -val response = functions.updateDeployment( +val response = functions.updateFunctionDeployment( functionId = "<FUNCTION_ID>", deploymentId = "<DEPLOYMENT_ID>" ) diff --git a/docs/examples/kotlin/functions/update-variable.md b/docs/examples/kotlin/functions/update-variable.md index ed6e4ff..106b340 100644 --- a/docs/examples/kotlin/functions/update-variable.md +++ b/docs/examples/kotlin/functions/update-variable.md @@ -13,5 +13,6 @@ val response = functions.updateVariable( functionId = "<FUNCTION_ID>", variableId = "<VARIABLE_ID>", key = "<KEY>", - value = "<VALUE>" // optional + value = "<VALUE>", // optional + secret = false // optional ) diff --git a/docs/examples/kotlin/sites/create-deployment.md b/docs/examples/kotlin/sites/create-deployment.md new file mode 100644 index 0000000..ba2c24d --- /dev/null +++ b/docs/examples/kotlin/sites/create-deployment.md @@ -0,0 +1,20 @@ +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.models.InputFile +import io.appwrite.services.Sites + +val client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +val sites = Sites(client) + +val response = sites.createDeployment( + siteId = "<SITE_ID>", + code = InputFile.fromPath("file.png"), + activate = false, + installCommand = "<INSTALL_COMMAND>", // optional + buildCommand = "<BUILD_COMMAND>", // optional + outputDirectory = "<OUTPUT_DIRECTORY>" // optional +) diff --git a/docs/examples/kotlin/sites/create-duplicate-deployment.md b/docs/examples/kotlin/sites/create-duplicate-deployment.md new file mode 100644 index 0000000..06a3ce8 --- /dev/null +++ b/docs/examples/kotlin/sites/create-duplicate-deployment.md @@ -0,0 +1,15 @@ +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Sites + +val client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +val sites = Sites(client) + +val response = sites.createDuplicateDeployment( + siteId = "<SITE_ID>", + deploymentId = "<DEPLOYMENT_ID>" +) diff --git a/docs/examples/kotlin/sites/create-template-deployment.md b/docs/examples/kotlin/sites/create-template-deployment.md new file mode 100644 index 0000000..bf246be --- /dev/null +++ b/docs/examples/kotlin/sites/create-template-deployment.md @@ -0,0 +1,19 @@ +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Sites + +val client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +val sites = Sites(client) + +val response = sites.createTemplateDeployment( + siteId = "<SITE_ID>", + repository = "<REPOSITORY>", + owner = "<OWNER>", + rootDirectory = "<ROOT_DIRECTORY>", + version = "<VERSION>", + activate = false // optional +) diff --git a/docs/examples/kotlin/sites/create-variable.md b/docs/examples/kotlin/sites/create-variable.md new file mode 100644 index 0000000..6eb4666 --- /dev/null +++ b/docs/examples/kotlin/sites/create-variable.md @@ -0,0 +1,17 @@ +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Sites + +val client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +val sites = Sites(client) + +val response = sites.createVariable( + siteId = "<SITE_ID>", + key = "<KEY>", + value = "<VALUE>", + secret = false // optional +) diff --git a/docs/examples/kotlin/sites/create-vcs-deployment.md b/docs/examples/kotlin/sites/create-vcs-deployment.md new file mode 100644 index 0000000..141cf3e --- /dev/null +++ b/docs/examples/kotlin/sites/create-vcs-deployment.md @@ -0,0 +1,18 @@ +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Sites +import io.appwrite.enums.VCSDeploymentType + +val client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +val sites = Sites(client) + +val response = sites.createVcsDeployment( + siteId = "<SITE_ID>", + type = VCSDeploymentType.BRANCH, + reference = "<REFERENCE>", + activate = false // optional +) diff --git a/docs/examples/kotlin/sites/create.md b/docs/examples/kotlin/sites/create.md new file mode 100644 index 0000000..a5e9719 --- /dev/null +++ b/docs/examples/kotlin/sites/create.md @@ -0,0 +1,33 @@ +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Sites +import io.appwrite.enums.Framework +import io.appwrite.enums.BuildRuntime + +val client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +val sites = Sites(client) + +val response = sites.create( + siteId = "<SITE_ID>", + name = "<NAME>", + framework = .ANALOG, + buildRuntime = .NODE_14_5, + enabled = false, // optional + logging = false, // optional + timeout = 1, // optional + installCommand = "<INSTALL_COMMAND>", // optional + buildCommand = "<BUILD_COMMAND>", // optional + outputDirectory = "<OUTPUT_DIRECTORY>", // optional + adapter = "static", // optional + installationId = "<INSTALLATION_ID>", // optional + fallbackFile = "<FALLBACK_FILE>", // optional + providerRepositoryId = "<PROVIDER_REPOSITORY_ID>", // optional + providerBranch = "<PROVIDER_BRANCH>", // optional + providerSilentMode = false, // optional + providerRootDirectory = "<PROVIDER_ROOT_DIRECTORY>", // optional + specification = "" // optional +) diff --git a/docs/examples/kotlin/sites/delete-deployment.md b/docs/examples/kotlin/sites/delete-deployment.md new file mode 100644 index 0000000..6d73918 --- /dev/null +++ b/docs/examples/kotlin/sites/delete-deployment.md @@ -0,0 +1,15 @@ +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Sites + +val client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +val sites = Sites(client) + +val response = sites.deleteDeployment( + siteId = "<SITE_ID>", + deploymentId = "<DEPLOYMENT_ID>" +) diff --git a/docs/examples/kotlin/sites/delete-log.md b/docs/examples/kotlin/sites/delete-log.md new file mode 100644 index 0000000..c7d7b77 --- /dev/null +++ b/docs/examples/kotlin/sites/delete-log.md @@ -0,0 +1,15 @@ +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Sites + +val client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +val sites = Sites(client) + +val response = sites.deleteLog( + siteId = "<SITE_ID>", + logId = "<LOG_ID>" +) diff --git a/docs/examples/kotlin/sites/delete-variable.md b/docs/examples/kotlin/sites/delete-variable.md new file mode 100644 index 0000000..7859a8a --- /dev/null +++ b/docs/examples/kotlin/sites/delete-variable.md @@ -0,0 +1,15 @@ +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Sites + +val client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +val sites = Sites(client) + +val response = sites.deleteVariable( + siteId = "<SITE_ID>", + variableId = "<VARIABLE_ID>" +) diff --git a/docs/examples/kotlin/sites/delete.md b/docs/examples/kotlin/sites/delete.md new file mode 100644 index 0000000..369b614 --- /dev/null +++ b/docs/examples/kotlin/sites/delete.md @@ -0,0 +1,14 @@ +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Sites + +val client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +val sites = Sites(client) + +val response = sites.delete( + siteId = "<SITE_ID>" +) diff --git a/docs/examples/kotlin/sites/get-deployment-download.md b/docs/examples/kotlin/sites/get-deployment-download.md new file mode 100644 index 0000000..8432476 --- /dev/null +++ b/docs/examples/kotlin/sites/get-deployment-download.md @@ -0,0 +1,16 @@ +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Sites + +val client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +val sites = Sites(client) + +val result = sites.getDeploymentDownload( + siteId = "<SITE_ID>", + deploymentId = "<DEPLOYMENT_ID>", + type = "source" // optional +) diff --git a/docs/examples/kotlin/sites/get-deployment.md b/docs/examples/kotlin/sites/get-deployment.md new file mode 100644 index 0000000..f2a33a4 --- /dev/null +++ b/docs/examples/kotlin/sites/get-deployment.md @@ -0,0 +1,15 @@ +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Sites + +val client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +val sites = Sites(client) + +val response = sites.getDeployment( + siteId = "<SITE_ID>", + deploymentId = "<DEPLOYMENT_ID>" +) diff --git a/docs/examples/kotlin/sites/get-log.md b/docs/examples/kotlin/sites/get-log.md new file mode 100644 index 0000000..ff46f77 --- /dev/null +++ b/docs/examples/kotlin/sites/get-log.md @@ -0,0 +1,15 @@ +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Sites + +val client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +val sites = Sites(client) + +val response = sites.getLog( + siteId = "<SITE_ID>", + logId = "<LOG_ID>" +) diff --git a/docs/examples/kotlin/sites/get-variable.md b/docs/examples/kotlin/sites/get-variable.md new file mode 100644 index 0000000..ccab666 --- /dev/null +++ b/docs/examples/kotlin/sites/get-variable.md @@ -0,0 +1,15 @@ +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Sites + +val client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +val sites = Sites(client) + +val response = sites.getVariable( + siteId = "<SITE_ID>", + variableId = "<VARIABLE_ID>" +) diff --git a/docs/examples/kotlin/sites/get.md b/docs/examples/kotlin/sites/get.md new file mode 100644 index 0000000..7ced974 --- /dev/null +++ b/docs/examples/kotlin/sites/get.md @@ -0,0 +1,14 @@ +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Sites + +val client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +val sites = Sites(client) + +val response = sites.get( + siteId = "<SITE_ID>" +) diff --git a/docs/examples/kotlin/sites/list-deployments.md b/docs/examples/kotlin/sites/list-deployments.md new file mode 100644 index 0000000..6bc29cc --- /dev/null +++ b/docs/examples/kotlin/sites/list-deployments.md @@ -0,0 +1,16 @@ +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Sites + +val client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +val sites = Sites(client) + +val response = sites.listDeployments( + siteId = "<SITE_ID>", + queries = listOf(), // optional + search = "<SEARCH>" // optional +) diff --git a/docs/examples/kotlin/sites/list-frameworks.md b/docs/examples/kotlin/sites/list-frameworks.md new file mode 100644 index 0000000..cf02b75 --- /dev/null +++ b/docs/examples/kotlin/sites/list-frameworks.md @@ -0,0 +1,12 @@ +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Sites + +val client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +val sites = Sites(client) + +val response = sites.listFrameworks() diff --git a/docs/examples/kotlin/sites/list-logs.md b/docs/examples/kotlin/sites/list-logs.md new file mode 100644 index 0000000..d7979de --- /dev/null +++ b/docs/examples/kotlin/sites/list-logs.md @@ -0,0 +1,15 @@ +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Sites + +val client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +val sites = Sites(client) + +val response = sites.listLogs( + siteId = "<SITE_ID>", + queries = listOf() // optional +) diff --git a/docs/examples/kotlin/sites/list-specifications.md b/docs/examples/kotlin/sites/list-specifications.md new file mode 100644 index 0000000..56e8640 --- /dev/null +++ b/docs/examples/kotlin/sites/list-specifications.md @@ -0,0 +1,12 @@ +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Sites + +val client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +val sites = Sites(client) + +val response = sites.listSpecifications() diff --git a/docs/examples/kotlin/sites/list-variables.md b/docs/examples/kotlin/sites/list-variables.md new file mode 100644 index 0000000..70ec497 --- /dev/null +++ b/docs/examples/kotlin/sites/list-variables.md @@ -0,0 +1,14 @@ +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Sites + +val client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +val sites = Sites(client) + +val response = sites.listVariables( + siteId = "<SITE_ID>" +) diff --git a/docs/examples/kotlin/sites/list.md b/docs/examples/kotlin/sites/list.md new file mode 100644 index 0000000..26e9651 --- /dev/null +++ b/docs/examples/kotlin/sites/list.md @@ -0,0 +1,15 @@ +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Sites + +val client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +val sites = Sites(client) + +val response = sites.list( + queries = listOf(), // optional + search = "<SEARCH>" // optional +) diff --git a/docs/examples/kotlin/sites/update-deployment-status.md b/docs/examples/kotlin/sites/update-deployment-status.md new file mode 100644 index 0000000..585fc32 --- /dev/null +++ b/docs/examples/kotlin/sites/update-deployment-status.md @@ -0,0 +1,15 @@ +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Sites + +val client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +val sites = Sites(client) + +val response = sites.updateDeploymentStatus( + siteId = "<SITE_ID>", + deploymentId = "<DEPLOYMENT_ID>" +) diff --git a/docs/examples/kotlin/sites/update-site-deployment.md b/docs/examples/kotlin/sites/update-site-deployment.md new file mode 100644 index 0000000..fb9bb72 --- /dev/null +++ b/docs/examples/kotlin/sites/update-site-deployment.md @@ -0,0 +1,15 @@ +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Sites + +val client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +val sites = Sites(client) + +val response = sites.updateSiteDeployment( + siteId = "<SITE_ID>", + deploymentId = "<DEPLOYMENT_ID>" +) diff --git a/docs/examples/kotlin/sites/update-variable.md b/docs/examples/kotlin/sites/update-variable.md new file mode 100644 index 0000000..b32c278 --- /dev/null +++ b/docs/examples/kotlin/sites/update-variable.md @@ -0,0 +1,18 @@ +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Sites + +val client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +val sites = Sites(client) + +val response = sites.updateVariable( + siteId = "<SITE_ID>", + variableId = "<VARIABLE_ID>", + key = "<KEY>", + value = "<VALUE>", // optional + secret = false // optional +) diff --git a/docs/examples/kotlin/sites/update.md b/docs/examples/kotlin/sites/update.md new file mode 100644 index 0000000..4b4a938 --- /dev/null +++ b/docs/examples/kotlin/sites/update.md @@ -0,0 +1,32 @@ +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Sites +import io.appwrite.enums.Framework + +val client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +val sites = Sites(client) + +val response = sites.update( + siteId = "<SITE_ID>", + name = "<NAME>", + framework = .ANALOG, + enabled = false, // optional + logging = false, // optional + timeout = 1, // optional + installCommand = "<INSTALL_COMMAND>", // optional + buildCommand = "<BUILD_COMMAND>", // optional + outputDirectory = "<OUTPUT_DIRECTORY>", // optional + buildRuntime = "node-14.5", // optional + adapter = "static", // optional + fallbackFile = "<FALLBACK_FILE>", // optional + installationId = "<INSTALLATION_ID>", // optional + providerRepositoryId = "<PROVIDER_REPOSITORY_ID>", // optional + providerBranch = "<PROVIDER_BRANCH>", // optional + providerSilentMode = false, // optional + providerRootDirectory = "<PROVIDER_ROOT_DIRECTORY>", // optional + specification = "" // optional +) diff --git a/docs/examples/kotlin/storage/get-file-download.md b/docs/examples/kotlin/storage/get-file-download.md index f3422f9..c14c966 100644 --- a/docs/examples/kotlin/storage/get-file-download.md +++ b/docs/examples/kotlin/storage/get-file-download.md @@ -11,5 +11,6 @@ val storage = Storage(client) val result = storage.getFileDownload( bucketId = "<BUCKET_ID>", - fileId = "<FILE_ID>" + fileId = "<FILE_ID>", + token = "<TOKEN>" // optional ) diff --git a/docs/examples/kotlin/storage/get-file-preview.md b/docs/examples/kotlin/storage/get-file-preview.md index 8c37ce8..45122de 100644 --- a/docs/examples/kotlin/storage/get-file-preview.md +++ b/docs/examples/kotlin/storage/get-file-preview.md @@ -15,12 +15,13 @@ val result = storage.getFilePreview( width = 0, // optional height = 0, // optional gravity = "center", // optional - quality = 0, // optional + quality = -1, // optional borderWidth = 0, // optional borderColor = "", // optional borderRadius = 0, // optional opacity = 0, // optional rotation = -360, // optional background = "", // optional - output = "jpg" // optional + output = "jpg", // optional + token = "<TOKEN>" // optional ) diff --git a/docs/examples/kotlin/storage/get-file-view.md b/docs/examples/kotlin/storage/get-file-view.md index cf8cde3..fec1ec7 100644 --- a/docs/examples/kotlin/storage/get-file-view.md +++ b/docs/examples/kotlin/storage/get-file-view.md @@ -11,5 +11,6 @@ val storage = Storage(client) val result = storage.getFileView( bucketId = "<BUCKET_ID>", - fileId = "<FILE_ID>" + fileId = "<FILE_ID>", + token = "<TOKEN>" // optional ) diff --git a/docs/examples/kotlin/tokens/create-file-token.md b/docs/examples/kotlin/tokens/create-file-token.md new file mode 100644 index 0000000..63d8fc3 --- /dev/null +++ b/docs/examples/kotlin/tokens/create-file-token.md @@ -0,0 +1,16 @@ +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Tokens + +val client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +val tokens = Tokens(client) + +val response = tokens.createFileToken( + bucketId = "<BUCKET_ID>", + fileId = "<FILE_ID>", + expire = "" // optional +) diff --git a/docs/examples/kotlin/tokens/delete.md b/docs/examples/kotlin/tokens/delete.md new file mode 100644 index 0000000..1831bc6 --- /dev/null +++ b/docs/examples/kotlin/tokens/delete.md @@ -0,0 +1,14 @@ +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Tokens + +val client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +val tokens = Tokens(client) + +val response = tokens.delete( + tokenId = "<TOKEN_ID>" +) diff --git a/docs/examples/kotlin/tokens/get.md b/docs/examples/kotlin/tokens/get.md new file mode 100644 index 0000000..70a47c2 --- /dev/null +++ b/docs/examples/kotlin/tokens/get.md @@ -0,0 +1,14 @@ +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Tokens + +val client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +val tokens = Tokens(client) + +val response = tokens.get( + tokenId = "<TOKEN_ID>" +) diff --git a/docs/examples/kotlin/tokens/list.md b/docs/examples/kotlin/tokens/list.md new file mode 100644 index 0000000..6975790 --- /dev/null +++ b/docs/examples/kotlin/tokens/list.md @@ -0,0 +1,16 @@ +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Tokens + +val client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +val tokens = Tokens(client) + +val response = tokens.list( + bucketId = "<BUCKET_ID>", + fileId = "<FILE_ID>", + queries = listOf() // optional +) diff --git a/docs/examples/kotlin/tokens/update.md b/docs/examples/kotlin/tokens/update.md new file mode 100644 index 0000000..045ddaa --- /dev/null +++ b/docs/examples/kotlin/tokens/update.md @@ -0,0 +1,15 @@ +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Tokens + +val client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +val tokens = Tokens(client) + +val response = tokens.update( + tokenId = "<TOKEN_ID>", + expire = "" // optional +) diff --git a/docs/examples/kotlin/users/list-memberships.md b/docs/examples/kotlin/users/list-memberships.md index 528b69c..7df13df 100644 --- a/docs/examples/kotlin/users/list-memberships.md +++ b/docs/examples/kotlin/users/list-memberships.md @@ -10,5 +10,7 @@ val client = Client() val users = Users(client) val response = users.listMemberships( - userId = "<USER_ID>" + userId = "<USER_ID>", + queries = listOf(), // optional + search = "<SEARCH>" // optional ) diff --git a/src/main/kotlin/io/appwrite/Client.kt b/src/main/kotlin/io/appwrite/Client.kt index 72f53e7..9647ede 100644 --- a/src/main/kotlin/io/appwrite/Client.kt +++ b/src/main/kotlin/io/appwrite/Client.kt @@ -58,12 +58,12 @@ class Client @JvmOverloads constructor( init { headers = mutableMapOf( "content-type" to "application/json", - "user-agent" to "AppwriteKotlinSDK/8.1.0-rc.1 ${System.getProperty("http.agent")}", + "user-agent" to "AppwriteKotlinSDK/8.2.0 ${System.getProperty("http.agent")}", "x-sdk-name" to "Kotlin", "x-sdk-platform" to "server", "x-sdk-language" to "kotlin", - "x-sdk-version" to "8.1.0-rc.1", - "x-appwrite-response-format" to "1.6.0", + "x-sdk-version" to "8.2.0", + "x-appwrite-response-format" to "1.7.0", ) config = mutableMapOf() diff --git a/src/main/kotlin/io/appwrite/enums/Adapter.kt b/src/main/kotlin/io/appwrite/enums/Adapter.kt new file mode 100644 index 0000000..3f38345 --- /dev/null +++ b/src/main/kotlin/io/appwrite/enums/Adapter.kt @@ -0,0 +1,12 @@ +package io.appwrite.enums + +import com.google.gson.annotations.SerializedName + +enum class Adapter(val value: String) { + @SerializedName("static") + STATIC("static"), + @SerializedName("ssr") + SSR("ssr"); + + override fun toString() = value +} \ No newline at end of file diff --git a/src/main/kotlin/io/appwrite/enums/BuildRuntime.kt b/src/main/kotlin/io/appwrite/enums/BuildRuntime.kt new file mode 100644 index 0000000..71d857d --- /dev/null +++ b/src/main/kotlin/io/appwrite/enums/BuildRuntime.kt @@ -0,0 +1,134 @@ +package io.appwrite.enums + +import com.google.gson.annotations.SerializedName + +enum class BuildRuntime(val value: String) { + @SerializedName("node-14.5") + NODE_14_5("node-14.5"), + @SerializedName("node-16.0") + NODE_16_0("node-16.0"), + @SerializedName("node-18.0") + NODE_18_0("node-18.0"), + @SerializedName("node-19.0") + NODE_19_0("node-19.0"), + @SerializedName("node-20.0") + NODE_20_0("node-20.0"), + @SerializedName("node-21.0") + NODE_21_0("node-21.0"), + @SerializedName("node-22") + NODE_22("node-22"), + @SerializedName("php-8.0") + PHP_8_0("php-8.0"), + @SerializedName("php-8.1") + PHP_8_1("php-8.1"), + @SerializedName("php-8.2") + PHP_8_2("php-8.2"), + @SerializedName("php-8.3") + PHP_8_3("php-8.3"), + @SerializedName("ruby-3.0") + RUBY_3_0("ruby-3.0"), + @SerializedName("ruby-3.1") + RUBY_3_1("ruby-3.1"), + @SerializedName("ruby-3.2") + RUBY_3_2("ruby-3.2"), + @SerializedName("ruby-3.3") + RUBY_3_3("ruby-3.3"), + @SerializedName("python-3.8") + PYTHON_3_8("python-3.8"), + @SerializedName("python-3.9") + PYTHON_3_9("python-3.9"), + @SerializedName("python-3.10") + PYTHON_3_10("python-3.10"), + @SerializedName("python-3.11") + PYTHON_3_11("python-3.11"), + @SerializedName("python-3.12") + PYTHON_3_12("python-3.12"), + @SerializedName("python-ml-3.11") + PYTHON_ML_3_11("python-ml-3.11"), + @SerializedName("python-ml-3.12") + PYTHON_ML_3_12("python-ml-3.12"), + @SerializedName("deno-1.21") + DENO_1_21("deno-1.21"), + @SerializedName("deno-1.24") + DENO_1_24("deno-1.24"), + @SerializedName("deno-1.35") + DENO_1_35("deno-1.35"), + @SerializedName("deno-1.40") + DENO_1_40("deno-1.40"), + @SerializedName("deno-1.46") + DENO_1_46("deno-1.46"), + @SerializedName("deno-2.0") + DENO_2_0("deno-2.0"), + @SerializedName("dart-2.15") + DART_2_15("dart-2.15"), + @SerializedName("dart-2.16") + DART_2_16("dart-2.16"), + @SerializedName("dart-2.17") + DART_2_17("dart-2.17"), + @SerializedName("dart-2.18") + DART_2_18("dart-2.18"), + @SerializedName("dart-2.19") + DART_2_19("dart-2.19"), + @SerializedName("dart-3.0") + DART_3_0("dart-3.0"), + @SerializedName("dart-3.1") + DART_3_1("dart-3.1"), + @SerializedName("dart-3.3") + DART_3_3("dart-3.3"), + @SerializedName("dart-3.5") + DART_3_5("dart-3.5"), + @SerializedName("dotnet-6.0") + DOTNET_6_0("dotnet-6.0"), + @SerializedName("dotnet-7.0") + DOTNET_7_0("dotnet-7.0"), + @SerializedName("dotnet-8.0") + DOTNET_8_0("dotnet-8.0"), + @SerializedName("java-8.0") + JAVA_8_0("java-8.0"), + @SerializedName("java-11.0") + JAVA_11_0("java-11.0"), + @SerializedName("java-17.0") + JAVA_17_0("java-17.0"), + @SerializedName("java-18.0") + JAVA_18_0("java-18.0"), + @SerializedName("java-21.0") + JAVA_21_0("java-21.0"), + @SerializedName("java-22") + JAVA_22("java-22"), + @SerializedName("swift-5.5") + SWIFT_5_5("swift-5.5"), + @SerializedName("swift-5.8") + SWIFT_5_8("swift-5.8"), + @SerializedName("swift-5.9") + SWIFT_5_9("swift-5.9"), + @SerializedName("swift-5.10") + SWIFT_5_10("swift-5.10"), + @SerializedName("kotlin-1.6") + KOTLIN_1_6("kotlin-1.6"), + @SerializedName("kotlin-1.8") + KOTLIN_1_8("kotlin-1.8"), + @SerializedName("kotlin-1.9") + KOTLIN_1_9("kotlin-1.9"), + @SerializedName("kotlin-2.0") + KOTLIN_2_0("kotlin-2.0"), + @SerializedName("cpp-17") + CPP_17("cpp-17"), + @SerializedName("cpp-20") + CPP_20("cpp-20"), + @SerializedName("bun-1.0") + BUN_1_0("bun-1.0"), + @SerializedName("bun-1.1") + BUN_1_1("bun-1.1"), + @SerializedName("go-1.23") + GO_1_23("go-1.23"), + @SerializedName("static-1") + STATIC_1("static-1"), + @SerializedName("flutter-3.24") + FLUTTER_3_24("flutter-3.24"), + @SerializedName("flutter-3.27") + FLUTTER_3_27("flutter-3.27"), + @SerializedName("flutter-3.29") + FLUTTER_3_29("flutter-3.29"); + + override fun toString() = value +} \ No newline at end of file diff --git a/src/main/kotlin/io/appwrite/enums/DeploymentDownloadType.kt b/src/main/kotlin/io/appwrite/enums/DeploymentDownloadType.kt new file mode 100644 index 0000000..ab75880 --- /dev/null +++ b/src/main/kotlin/io/appwrite/enums/DeploymentDownloadType.kt @@ -0,0 +1,12 @@ +package io.appwrite.enums + +import com.google.gson.annotations.SerializedName + +enum class DeploymentDownloadType(val value: String) { + @SerializedName("source") + SOURCE("source"), + @SerializedName("output") + OUTPUT("output"); + + override fun toString() = value +} \ No newline at end of file diff --git a/src/main/kotlin/io/appwrite/enums/Framework.kt b/src/main/kotlin/io/appwrite/enums/Framework.kt new file mode 100644 index 0000000..4087d6b --- /dev/null +++ b/src/main/kotlin/io/appwrite/enums/Framework.kt @@ -0,0 +1,36 @@ +package io.appwrite.enums + +import com.google.gson.annotations.SerializedName + +enum class Framework(val value: String) { + @SerializedName("analog") + ANALOG("analog"), + @SerializedName("angular") + ANGULAR("angular"), + @SerializedName("nextjs") + NEXTJS("nextjs"), + @SerializedName("react") + REACT("react"), + @SerializedName("nuxt") + NUXT("nuxt"), + @SerializedName("vue") + VUE("vue"), + @SerializedName("sveltekit") + SVELTEKIT("sveltekit"), + @SerializedName("astro") + ASTRO("astro"), + @SerializedName("remix") + REMIX("remix"), + @SerializedName("lynx") + LYNX("lynx"), + @SerializedName("flutter") + FLUTTER("flutter"), + @SerializedName("react-native") + REACT_NATIVE("react-native"), + @SerializedName("vite") + VITE("vite"), + @SerializedName("other") + OTHER("other"); + + override fun toString() = value +} \ No newline at end of file diff --git a/src/main/kotlin/io/appwrite/enums/ImageFormat.kt b/src/main/kotlin/io/appwrite/enums/ImageFormat.kt index 7249f2a..c3dea06 100644 --- a/src/main/kotlin/io/appwrite/enums/ImageFormat.kt +++ b/src/main/kotlin/io/appwrite/enums/ImageFormat.kt @@ -7,8 +7,6 @@ enum class ImageFormat(val value: String) { JPG("jpg"), @SerializedName("jpeg") JPEG("jpeg"), - @SerializedName("gif") - GIF("gif"), @SerializedName("png") PNG("png"), @SerializedName("webp") diff --git a/src/main/kotlin/io/appwrite/enums/Runtime.kt b/src/main/kotlin/io/appwrite/enums/Runtime.kt index c19f52b..dd65f3e 100644 --- a/src/main/kotlin/io/appwrite/enums/Runtime.kt +++ b/src/main/kotlin/io/appwrite/enums/Runtime.kt @@ -45,6 +45,8 @@ enum class Runtime(val value: String) { PYTHON_3_12("python-3.12"), @SerializedName("python-ml-3.11") PYTHON_ML_3_11("python-ml-3.11"), + @SerializedName("python-ml-3.12") + PYTHON_ML_3_12("python-ml-3.12"), @SerializedName("deno-1.21") DENO_1_21("deno-1.21"), @SerializedName("deno-1.24") @@ -65,6 +67,8 @@ enum class Runtime(val value: String) { DART_2_17("dart-2.17"), @SerializedName("dart-2.18") DART_2_18("dart-2.18"), + @SerializedName("dart-2.19") + DART_2_19("dart-2.19"), @SerializedName("dart-3.0") DART_3_0("dart-3.0"), @SerializedName("dart-3.1") @@ -120,7 +124,11 @@ enum class Runtime(val value: String) { @SerializedName("static-1") STATIC_1("static-1"), @SerializedName("flutter-3.24") - FLUTTER_3_24("flutter-3.24"); + FLUTTER_3_24("flutter-3.24"), + @SerializedName("flutter-3.27") + FLUTTER_3_27("flutter-3.27"), + @SerializedName("flutter-3.29") + FLUTTER_3_29("flutter-3.29"); override fun toString() = value } \ No newline at end of file diff --git a/src/main/kotlin/io/appwrite/enums/VCSDeploymentType.kt b/src/main/kotlin/io/appwrite/enums/VCSDeploymentType.kt new file mode 100644 index 0000000..ef7147b --- /dev/null +++ b/src/main/kotlin/io/appwrite/enums/VCSDeploymentType.kt @@ -0,0 +1,14 @@ +package io.appwrite.enums + +import com.google.gson.annotations.SerializedName + +enum class VCSDeploymentType(val value: String) { + @SerializedName("branch") + BRANCH("branch"), + @SerializedName("commit") + COMMIT("commit"), + @SerializedName("tag") + TAG("tag"); + + override fun toString() = value +} \ No newline at end of file diff --git a/src/main/kotlin/io/appwrite/models/Build.kt b/src/main/kotlin/io/appwrite/models/Build.kt deleted file mode 100644 index 4f4c470..0000000 --- a/src/main/kotlin/io/appwrite/models/Build.kt +++ /dev/null @@ -1,94 +0,0 @@ -package io.appwrite.models - -import com.google.gson.annotations.SerializedName -import io.appwrite.extensions.jsonCast - -/** - * Build - */ -data class Build( - /** - * Build ID. - */ - @SerializedName("\$id") - val id: String, - - /** - * The deployment that created this build. - */ - @SerializedName("deploymentId") - val deploymentId: String, - - /** - * The build status. There are a few different types and each one means something different. \nFailed - The deployment build has failed. More details can usually be found in buildStderr\nReady - The deployment build was successful and the deployment is ready to be deployed\nProcessing - The deployment is currently waiting to have a build triggered\nBuilding - The deployment is currently being built - */ - @SerializedName("status") - val status: String, - - /** - * The stdout of the build. - */ - @SerializedName("stdout") - val stdout: String, - - /** - * The stderr of the build. - */ - @SerializedName("stderr") - val stderr: String, - - /** - * The deployment creation date in ISO 8601 format. - */ - @SerializedName("startTime") - val startTime: String, - - /** - * The time the build was finished in ISO 8601 format. - */ - @SerializedName("endTime") - val endTime: String, - - /** - * The build duration in seconds. - */ - @SerializedName("duration") - val duration: Long, - - /** - * The code size in bytes. - */ - @SerializedName("size") - val size: Long, - -) { - fun toMap(): Map<String, Any> = mapOf( - "\$id" to id as Any, - "deploymentId" to deploymentId as Any, - "status" to status as Any, - "stdout" to stdout as Any, - "stderr" to stderr as Any, - "startTime" to startTime as Any, - "endTime" to endTime as Any, - "duration" to duration as Any, - "size" to size as Any, - ) - - companion object { - - @Suppress("UNCHECKED_CAST") - fun from( - map: Map<String, Any>, - ) = Build( - id = map["\$id"] as String, - deploymentId = map["deploymentId"] as String, - status = map["status"] as String, - stdout = map["stdout"] as String, - stderr = map["stderr"] as String, - startTime = map["startTime"] as String, - endTime = map["endTime"] as String, - duration = (map["duration"] as Number).toLong(), - size = (map["size"] as Number).toLong(), - ) - } -} \ No newline at end of file diff --git a/src/main/kotlin/io/appwrite/models/Deployment.kt b/src/main/kotlin/io/appwrite/models/Deployment.kt index 20db30b..17ee770 100644 --- a/src/main/kotlin/io/appwrite/models/Deployment.kt +++ b/src/main/kotlin/io/appwrite/models/Deployment.kt @@ -52,8 +52,8 @@ data class Deployment( /** * The code size in bytes. */ - @SerializedName("size") - val size: Long, + @SerializedName("sourceSize") + val sourceSize: Long, /** * The build output size in bytes. @@ -61,6 +61,12 @@ data class Deployment( @SerializedName("buildSize") val buildSize: Long, + /** + * The total size in bytes (source and build output). + */ + @SerializedName("totalSize") + val totalSize: Long, + /** * The current build ID. */ @@ -74,7 +80,19 @@ data class Deployment( val activate: Boolean, /** - * The deployment status. Possible values are "processing", "building", "waiting", "ready", and "failed". + * Screenshot with light theme preference file ID. + */ + @SerializedName("screenshotLight") + val screenshotLight: String, + + /** + * Screenshot with dark theme preference file ID. + */ + @SerializedName("screenshotDark") + val screenshotDark: String, + + /** + * The deployment status. Possible values are "waiting", "processing", "building", "ready", and "failed". */ @SerializedName("status") val status: String, @@ -88,8 +106,8 @@ data class Deployment( /** * The current build time in seconds. */ - @SerializedName("buildTime") - val buildTime: Long, + @SerializedName("buildDuration") + val buildDuration: Long, /** * The name of the vcs provider repository @@ -160,13 +178,16 @@ data class Deployment( "resourceId" to resourceId as Any, "resourceType" to resourceType as Any, "entrypoint" to entrypoint as Any, - "size" to size as Any, + "sourceSize" to sourceSize as Any, "buildSize" to buildSize as Any, + "totalSize" to totalSize as Any, "buildId" to buildId as Any, "activate" to activate as Any, + "screenshotLight" to screenshotLight as Any, + "screenshotDark" to screenshotDark as Any, "status" to status as Any, "buildLogs" to buildLogs as Any, - "buildTime" to buildTime as Any, + "buildDuration" to buildDuration as Any, "providerRepositoryName" to providerRepositoryName as Any, "providerRepositoryOwner" to providerRepositoryOwner as Any, "providerRepositoryUrl" to providerRepositoryUrl as Any, @@ -192,13 +213,16 @@ data class Deployment( resourceId = map["resourceId"] as String, resourceType = map["resourceType"] as String, entrypoint = map["entrypoint"] as String, - size = (map["size"] as Number).toLong(), + sourceSize = (map["sourceSize"] as Number).toLong(), buildSize = (map["buildSize"] as Number).toLong(), + totalSize = (map["totalSize"] as Number).toLong(), buildId = map["buildId"] as String, activate = map["activate"] as Boolean, + screenshotLight = map["screenshotLight"] as String, + screenshotDark = map["screenshotDark"] as String, status = map["status"] as String, buildLogs = map["buildLogs"] as String, - buildTime = (map["buildTime"] as Number).toLong(), + buildDuration = (map["buildDuration"] as Number).toLong(), providerRepositoryName = map["providerRepositoryName"] as String, providerRepositoryOwner = map["providerRepositoryOwner"] as String, providerRepositoryUrl = map["providerRepositoryUrl"] as String, diff --git a/src/main/kotlin/io/appwrite/models/Execution.kt b/src/main/kotlin/io/appwrite/models/Execution.kt index 1b6226a..216e146 100644 --- a/src/main/kotlin/io/appwrite/models/Execution.kt +++ b/src/main/kotlin/io/appwrite/models/Execution.kt @@ -98,7 +98,7 @@ data class Execution( val errors: String, /** - * Function execution duration in seconds. + * Resource(function/site) execution duration in seconds. */ @SerializedName("duration") val duration: Double, diff --git a/src/main/kotlin/io/appwrite/models/Framework.kt b/src/main/kotlin/io/appwrite/models/Framework.kt new file mode 100644 index 0000000..c57b2ae --- /dev/null +++ b/src/main/kotlin/io/appwrite/models/Framework.kt @@ -0,0 +1,62 @@ +package io.appwrite.models + +import com.google.gson.annotations.SerializedName +import io.appwrite.extensions.jsonCast + +/** + * Framework + */ +data class Framework( + /** + * Framework key. + */ + @SerializedName("key") + val key: String, + + /** + * Framework Name. + */ + @SerializedName("name") + val name: String, + + /** + * Default runtime version. + */ + @SerializedName("buildRuntime") + val buildRuntime: String, + + /** + * List of supported runtime versions. + */ + @SerializedName("runtimes") + val runtimes: List<String>, + + /** + * List of supported adapters. + */ + @SerializedName("adapters") + val adapters: List<FrameworkAdapter>, + +) { + fun toMap(): Map<String, Any> = mapOf( + "key" to key as Any, + "name" to name as Any, + "buildRuntime" to buildRuntime as Any, + "runtimes" to runtimes as Any, + "adapters" to adapters.map { it.toMap() } as Any, + ) + + companion object { + + @Suppress("UNCHECKED_CAST") + fun from( + map: Map<String, Any>, + ) = Framework( + key = map["key"] as String, + name = map["name"] as String, + buildRuntime = map["buildRuntime"] as String, + runtimes = map["runtimes"] as List<String>, + adapters = (map["adapters"] as List<Map<String, Any>>).map { FrameworkAdapter.from(map = it) }, + ) + } +} \ No newline at end of file diff --git a/src/main/kotlin/io/appwrite/models/FrameworkAdapter.kt b/src/main/kotlin/io/appwrite/models/FrameworkAdapter.kt new file mode 100644 index 0000000..5f6c688 --- /dev/null +++ b/src/main/kotlin/io/appwrite/models/FrameworkAdapter.kt @@ -0,0 +1,62 @@ +package io.appwrite.models + +import com.google.gson.annotations.SerializedName +import io.appwrite.extensions.jsonCast + +/** + * Framework Adapter + */ +data class FrameworkAdapter( + /** + * Adapter key. + */ + @SerializedName("key") + val key: String, + + /** + * Default command to download dependencies. + */ + @SerializedName("installCommand") + val installCommand: String, + + /** + * Default command to build site into output directory. + */ + @SerializedName("buildCommand") + val buildCommand: String, + + /** + * Default output directory of build. + */ + @SerializedName("outputDirectory") + val outputDirectory: String, + + /** + * Name of fallback file to use instead of 404 page. If null, Appwrite 404 page will be displayed. + */ + @SerializedName("fallbackFile") + val fallbackFile: String, + +) { + fun toMap(): Map<String, Any> = mapOf( + "key" to key as Any, + "installCommand" to installCommand as Any, + "buildCommand" to buildCommand as Any, + "outputDirectory" to outputDirectory as Any, + "fallbackFile" to fallbackFile as Any, + ) + + companion object { + + @Suppress("UNCHECKED_CAST") + fun from( + map: Map<String, Any>, + ) = FrameworkAdapter( + key = map["key"] as String, + installCommand = map["installCommand"] as String, + buildCommand = map["buildCommand"] as String, + outputDirectory = map["outputDirectory"] as String, + fallbackFile = map["fallbackFile"] as String, + ) + } +} \ No newline at end of file diff --git a/src/main/kotlin/io/appwrite/models/FrameworkList.kt b/src/main/kotlin/io/appwrite/models/FrameworkList.kt new file mode 100644 index 0000000..41532c8 --- /dev/null +++ b/src/main/kotlin/io/appwrite/models/FrameworkList.kt @@ -0,0 +1,38 @@ +package io.appwrite.models + +import com.google.gson.annotations.SerializedName +import io.appwrite.extensions.jsonCast + +/** + * Frameworks List + */ +data class FrameworkList( + /** + * Total number of frameworks documents that matched your query. + */ + @SerializedName("total") + val total: Long, + + /** + * List of frameworks. + */ + @SerializedName("frameworks") + val frameworks: List<Framework>, + +) { + fun toMap(): Map<String, Any> = mapOf( + "total" to total as Any, + "frameworks" to frameworks.map { it.toMap() } as Any, + ) + + companion object { + + @Suppress("UNCHECKED_CAST") + fun from( + map: Map<String, Any>, + ) = FrameworkList( + total = (map["total"] as Number).toLong(), + frameworks = (map["frameworks"] as List<Map<String, Any>>).map { Framework.from(map = it) }, + ) + } +} \ No newline at end of file diff --git a/src/main/kotlin/io/appwrite/models/Function.kt b/src/main/kotlin/io/appwrite/models/Function.kt index bb1b50e..f6c20e4 100644 --- a/src/main/kotlin/io/appwrite/models/Function.kt +++ b/src/main/kotlin/io/appwrite/models/Function.kt @@ -50,13 +50,13 @@ data class Function( val live: Boolean, /** - * Whether executions will be logged. When set to false, executions will not be logged, but will reduce resource used by your Appwrite project. + * When disabled, executions will exclude logs and errors, and will be slightly faster. */ @SerializedName("logging") val logging: Boolean, /** - * Function execution runtime. + * Function execution and build runtime. */ @SerializedName("runtime") val runtime: String, @@ -64,8 +64,32 @@ data class Function( /** * Function's active deployment ID. */ - @SerializedName("deployment") - val deployment: String, + @SerializedName("deploymentId") + val deploymentId: String, + + /** + * Active deployment creation date in ISO 8601 format. + */ + @SerializedName("deploymentCreatedAt") + val deploymentCreatedAt: String, + + /** + * Function's latest deployment ID. + */ + @SerializedName("latestDeploymentId") + val latestDeploymentId: String, + + /** + * Latest deployment creation date in ISO 8601 format. + */ + @SerializedName("latestDeploymentCreatedAt") + val latestDeploymentCreatedAt: String, + + /** + * Status of latest deployment. Possible values are "waiting", "processing", "building", "ready", and "failed". + */ + @SerializedName("latestDeploymentStatus") + val latestDeploymentStatus: String, /** * Allowed permission scopes. @@ -162,7 +186,11 @@ data class Function( "live" to live as Any, "logging" to logging as Any, "runtime" to runtime as Any, - "deployment" to deployment as Any, + "deploymentId" to deploymentId as Any, + "deploymentCreatedAt" to deploymentCreatedAt as Any, + "latestDeploymentId" to latestDeploymentId as Any, + "latestDeploymentCreatedAt" to latestDeploymentCreatedAt as Any, + "latestDeploymentStatus" to latestDeploymentStatus as Any, "scopes" to scopes as Any, "vars" to vars.map { it.toMap() } as Any, "events" to events as Any, @@ -194,7 +222,11 @@ data class Function( live = map["live"] as Boolean, logging = map["logging"] as Boolean, runtime = map["runtime"] as String, - deployment = map["deployment"] as String, + deploymentId = map["deploymentId"] as String, + deploymentCreatedAt = map["deploymentCreatedAt"] as String, + latestDeploymentId = map["latestDeploymentId"] as String, + latestDeploymentCreatedAt = map["latestDeploymentCreatedAt"] as String, + latestDeploymentStatus = map["latestDeploymentStatus"] as String, scopes = map["scopes"] as List<String>, vars = (map["vars"] as List<Map<String, Any>>).map { Variable.from(map = it) }, events = map["events"] as List<String>, diff --git a/src/main/kotlin/io/appwrite/models/Index.kt b/src/main/kotlin/io/appwrite/models/Index.kt index c45e25f..a368c13 100644 --- a/src/main/kotlin/io/appwrite/models/Index.kt +++ b/src/main/kotlin/io/appwrite/models/Index.kt @@ -37,6 +37,12 @@ data class Index( @SerializedName("attributes") val attributes: List<String>, + /** + * Index attributes length. + */ + @SerializedName("lengths") + val lengths: List<Long>, + /** * Index orders. */ @@ -62,6 +68,7 @@ data class Index( "status" to status as Any, "error" to error as Any, "attributes" to attributes as Any, + "lengths" to lengths as Any, "orders" to orders as Any, "\$createdAt" to createdAt as Any, "\$updatedAt" to updatedAt as Any, @@ -78,6 +85,7 @@ data class Index( status = map["status"] as String, error = map["error"] as String, attributes = map["attributes"] as List<String>, + lengths = map["lengths"] as List<Long>, orders = map["orders"] as? List<String>?, createdAt = map["\$createdAt"] as String, updatedAt = map["\$updatedAt"] as String, diff --git a/src/main/kotlin/io/appwrite/models/ResourceToken.kt b/src/main/kotlin/io/appwrite/models/ResourceToken.kt new file mode 100644 index 0000000..06466a1 --- /dev/null +++ b/src/main/kotlin/io/appwrite/models/ResourceToken.kt @@ -0,0 +1,78 @@ +package io.appwrite.models + +import com.google.gson.annotations.SerializedName +import io.appwrite.extensions.jsonCast + +/** + * ResourceToken + */ +data class ResourceToken( + /** + * Token ID. + */ + @SerializedName("\$id") + val id: String, + + /** + * Token creation date in ISO 8601 format. + */ + @SerializedName("\$createdAt") + val createdAt: String, + + /** + * Resource ID. + */ + @SerializedName("resourceId") + val resourceId: String, + + /** + * Resource type. + */ + @SerializedName("resourceType") + val resourceType: String, + + /** + * Token expiration date in ISO 8601 format. + */ + @SerializedName("expire") + val expire: String, + + /** + * JWT encoded string. + */ + @SerializedName("secret") + val secret: String, + + /** + * Most recent access date in ISO 8601 format. This attribute is only updated again after 24 hours. + */ + @SerializedName("accessedAt") + val accessedAt: String, + +) { + fun toMap(): Map<String, Any> = mapOf( + "\$id" to id as Any, + "\$createdAt" to createdAt as Any, + "resourceId" to resourceId as Any, + "resourceType" to resourceType as Any, + "expire" to expire as Any, + "secret" to secret as Any, + "accessedAt" to accessedAt as Any, + ) + + companion object { + + @Suppress("UNCHECKED_CAST") + fun from( + map: Map<String, Any>, + ) = ResourceToken( + id = map["\$id"] as String, + createdAt = map["\$createdAt"] as String, + resourceId = map["resourceId"] as String, + resourceType = map["resourceType"] as String, + expire = map["expire"] as String, + secret = map["secret"] as String, + accessedAt = map["accessedAt"] as String, + ) + } +} \ No newline at end of file diff --git a/src/main/kotlin/io/appwrite/models/ResourceTokenList.kt b/src/main/kotlin/io/appwrite/models/ResourceTokenList.kt new file mode 100644 index 0000000..bb9e6d7 --- /dev/null +++ b/src/main/kotlin/io/appwrite/models/ResourceTokenList.kt @@ -0,0 +1,38 @@ +package io.appwrite.models + +import com.google.gson.annotations.SerializedName +import io.appwrite.extensions.jsonCast + +/** + * Resource Tokens List + */ +data class ResourceTokenList( + /** + * Total number of tokens documents that matched your query. + */ + @SerializedName("total") + val total: Long, + + /** + * List of tokens. + */ + @SerializedName("tokens") + val tokens: List<ResourceToken>, + +) { + fun toMap(): Map<String, Any> = mapOf( + "total" to total as Any, + "tokens" to tokens.map { it.toMap() } as Any, + ) + + companion object { + + @Suppress("UNCHECKED_CAST") + fun from( + map: Map<String, Any>, + ) = ResourceTokenList( + total = (map["total"] as Number).toLong(), + tokens = (map["tokens"] as List<Map<String, Any>>).map { ResourceToken.from(map = it) }, + ) + } +} \ No newline at end of file diff --git a/src/main/kotlin/io/appwrite/models/Site.kt b/src/main/kotlin/io/appwrite/models/Site.kt new file mode 100644 index 0000000..d3de7b0 --- /dev/null +++ b/src/main/kotlin/io/appwrite/models/Site.kt @@ -0,0 +1,254 @@ +package io.appwrite.models + +import com.google.gson.annotations.SerializedName +import io.appwrite.extensions.jsonCast + +/** + * Site + */ +data class Site( + /** + * Site ID. + */ + @SerializedName("\$id") + val id: String, + + /** + * Site creation date in ISO 8601 format. + */ + @SerializedName("\$createdAt") + val createdAt: String, + + /** + * Site update date in ISO 8601 format. + */ + @SerializedName("\$updatedAt") + val updatedAt: String, + + /** + * Site name. + */ + @SerializedName("name") + val name: String, + + /** + * Site enabled. + */ + @SerializedName("enabled") + val enabled: Boolean, + + /** + * Is the site deployed with the latest configuration? This is set to false if you've changed an environment variables, entrypoint, commands, or other settings that needs redeploy to be applied. When the value is false, redeploy the site to update it with the latest configuration. + */ + @SerializedName("live") + val live: Boolean, + + /** + * When disabled, request logs will exclude logs and errors, and site responses will be slightly faster. + */ + @SerializedName("logging") + val logging: Boolean, + + /** + * Site framework. + */ + @SerializedName("framework") + val framework: String, + + /** + * Site's active deployment ID. + */ + @SerializedName("deploymentId") + val deploymentId: String, + + /** + * Active deployment creation date in ISO 8601 format. + */ + @SerializedName("deploymentCreatedAt") + val deploymentCreatedAt: String, + + /** + * Screenshot of active deployment with light theme preference file ID. + */ + @SerializedName("deploymentScreenshotLight") + val deploymentScreenshotLight: String, + + /** + * Screenshot of active deployment with dark theme preference file ID. + */ + @SerializedName("deploymentScreenshotDark") + val deploymentScreenshotDark: String, + + /** + * Site's latest deployment ID. + */ + @SerializedName("latestDeploymentId") + val latestDeploymentId: String, + + /** + * Latest deployment creation date in ISO 8601 format. + */ + @SerializedName("latestDeploymentCreatedAt") + val latestDeploymentCreatedAt: String, + + /** + * Status of latest deployment. Possible values are "waiting", "processing", "building", "ready", and "failed". + */ + @SerializedName("latestDeploymentStatus") + val latestDeploymentStatus: String, + + /** + * Site variables. + */ + @SerializedName("vars") + val vars: List<Variable>, + + /** + * Site request timeout in seconds. + */ + @SerializedName("timeout") + val timeout: Long, + + /** + * The install command used to install the site dependencies. + */ + @SerializedName("installCommand") + val installCommand: String, + + /** + * The build command used to build the site. + */ + @SerializedName("buildCommand") + val buildCommand: String, + + /** + * The directory where the site build output is located. + */ + @SerializedName("outputDirectory") + val outputDirectory: String, + + /** + * Site VCS (Version Control System) installation id. + */ + @SerializedName("installationId") + val installationId: String, + + /** + * VCS (Version Control System) Repository ID + */ + @SerializedName("providerRepositoryId") + val providerRepositoryId: String, + + /** + * VCS (Version Control System) branch name + */ + @SerializedName("providerBranch") + val providerBranch: String, + + /** + * Path to site in VCS (Version Control System) repository + */ + @SerializedName("providerRootDirectory") + val providerRootDirectory: String, + + /** + * Is VCS (Version Control System) connection is in silent mode? When in silence mode, no comments will be posted on the repository pull or merge requests + */ + @SerializedName("providerSilentMode") + val providerSilentMode: Boolean, + + /** + * Machine specification for builds and executions. + */ + @SerializedName("specification") + val specification: String, + + /** + * Site build runtime. + */ + @SerializedName("buildRuntime") + val buildRuntime: String, + + /** + * Site framework adapter. + */ + @SerializedName("adapter") + val adapter: String, + + /** + * Name of fallback file to use instead of 404 page. If null, Appwrite 404 page will be displayed. + */ + @SerializedName("fallbackFile") + val fallbackFile: String, + +) { + fun toMap(): Map<String, Any> = mapOf( + "\$id" to id as Any, + "\$createdAt" to createdAt as Any, + "\$updatedAt" to updatedAt as Any, + "name" to name as Any, + "enabled" to enabled as Any, + "live" to live as Any, + "logging" to logging as Any, + "framework" to framework as Any, + "deploymentId" to deploymentId as Any, + "deploymentCreatedAt" to deploymentCreatedAt as Any, + "deploymentScreenshotLight" to deploymentScreenshotLight as Any, + "deploymentScreenshotDark" to deploymentScreenshotDark as Any, + "latestDeploymentId" to latestDeploymentId as Any, + "latestDeploymentCreatedAt" to latestDeploymentCreatedAt as Any, + "latestDeploymentStatus" to latestDeploymentStatus as Any, + "vars" to vars.map { it.toMap() } as Any, + "timeout" to timeout as Any, + "installCommand" to installCommand as Any, + "buildCommand" to buildCommand as Any, + "outputDirectory" to outputDirectory as Any, + "installationId" to installationId as Any, + "providerRepositoryId" to providerRepositoryId as Any, + "providerBranch" to providerBranch as Any, + "providerRootDirectory" to providerRootDirectory as Any, + "providerSilentMode" to providerSilentMode as Any, + "specification" to specification as Any, + "buildRuntime" to buildRuntime as Any, + "adapter" to adapter as Any, + "fallbackFile" to fallbackFile as Any, + ) + + companion object { + + @Suppress("UNCHECKED_CAST") + fun from( + map: Map<String, Any>, + ) = Site( + id = map["\$id"] as String, + createdAt = map["\$createdAt"] as String, + updatedAt = map["\$updatedAt"] as String, + name = map["name"] as String, + enabled = map["enabled"] as Boolean, + live = map["live"] as Boolean, + logging = map["logging"] as Boolean, + framework = map["framework"] as String, + deploymentId = map["deploymentId"] as String, + deploymentCreatedAt = map["deploymentCreatedAt"] as String, + deploymentScreenshotLight = map["deploymentScreenshotLight"] as String, + deploymentScreenshotDark = map["deploymentScreenshotDark"] as String, + latestDeploymentId = map["latestDeploymentId"] as String, + latestDeploymentCreatedAt = map["latestDeploymentCreatedAt"] as String, + latestDeploymentStatus = map["latestDeploymentStatus"] as String, + vars = (map["vars"] as List<Map<String, Any>>).map { Variable.from(map = it) }, + timeout = (map["timeout"] as Number).toLong(), + installCommand = map["installCommand"] as String, + buildCommand = map["buildCommand"] as String, + outputDirectory = map["outputDirectory"] as String, + installationId = map["installationId"] as String, + providerRepositoryId = map["providerRepositoryId"] as String, + providerBranch = map["providerBranch"] as String, + providerRootDirectory = map["providerRootDirectory"] as String, + providerSilentMode = map["providerSilentMode"] as Boolean, + specification = map["specification"] as String, + buildRuntime = map["buildRuntime"] as String, + adapter = map["adapter"] as String, + fallbackFile = map["fallbackFile"] as String, + ) + } +} \ No newline at end of file diff --git a/src/main/kotlin/io/appwrite/models/SiteList.kt b/src/main/kotlin/io/appwrite/models/SiteList.kt new file mode 100644 index 0000000..15ecc7f --- /dev/null +++ b/src/main/kotlin/io/appwrite/models/SiteList.kt @@ -0,0 +1,38 @@ +package io.appwrite.models + +import com.google.gson.annotations.SerializedName +import io.appwrite.extensions.jsonCast + +/** + * Sites List + */ +data class SiteList( + /** + * Total number of sites documents that matched your query. + */ + @SerializedName("total") + val total: Long, + + /** + * List of sites. + */ + @SerializedName("sites") + val sites: List<Site>, + +) { + fun toMap(): Map<String, Any> = mapOf( + "total" to total as Any, + "sites" to sites.map { it.toMap() } as Any, + ) + + companion object { + + @Suppress("UNCHECKED_CAST") + fun from( + map: Map<String, Any>, + ) = SiteList( + total = (map["total"] as Number).toLong(), + sites = (map["sites"] as List<Map<String, Any>>).map { Site.from(map = it) }, + ) + } +} \ No newline at end of file diff --git a/src/main/kotlin/io/appwrite/models/Variable.kt b/src/main/kotlin/io/appwrite/models/Variable.kt index 99a7696..47518f1 100644 --- a/src/main/kotlin/io/appwrite/models/Variable.kt +++ b/src/main/kotlin/io/appwrite/models/Variable.kt @@ -37,6 +37,12 @@ data class Variable( @SerializedName("value") val value: String, + /** + * Variable secret flag. Secret variables can only be updated or deleted, but never read. + */ + @SerializedName("secret") + val secret: Boolean, + /** * Service to which the variable belongs. Possible values are "project", "function" */ @@ -56,6 +62,7 @@ data class Variable( "\$updatedAt" to updatedAt as Any, "key" to key as Any, "value" to value as Any, + "secret" to secret as Any, "resourceType" to resourceType as Any, "resourceId" to resourceId as Any, ) @@ -71,6 +78,7 @@ data class Variable( updatedAt = map["\$updatedAt"] as String, key = map["key"] as String, value = map["value"] as String, + secret = map["secret"] as Boolean, resourceType = map["resourceType"] as String, resourceId = map["resourceId"] as String, ) diff --git a/src/main/kotlin/io/appwrite/services/Avatars.kt b/src/main/kotlin/io/appwrite/services/Avatars.kt index 1739600..e6f4673 100644 --- a/src/main/kotlin/io/appwrite/services/Avatars.kt +++ b/src/main/kotlin/io/appwrite/services/Avatars.kt @@ -21,7 +21,7 @@ class Avatars(client: Client) : Service(client) { * @param code Browser Code. * @param width Image width. Pass an integer between 0 to 2000. Defaults to 100. * @param height Image height. Pass an integer between 0 to 2000. Defaults to 100. - * @param quality Image quality. Pass an integer between 0 to 100. Defaults to 100. + * @param quality Image quality. Pass an integer between 0 to 100. Defaults to keep existing image quality. * @return [ByteArray] */ @JvmOverloads @@ -56,7 +56,7 @@ class Avatars(client: Client) : Service(client) { * @param code Credit Card Code. Possible values: amex, argencard, cabal, cencosud, diners, discover, elo, hipercard, jcb, mastercard, naranja, targeta-shopping, union-china-pay, visa, mir, maestro, rupay. * @param width Image width. Pass an integer between 0 to 2000. Defaults to 100. * @param height Image height. Pass an integer between 0 to 2000. Defaults to 100. - * @param quality Image quality. Pass an integer between 0 to 100. Defaults to 100. + * @param quality Image quality. Pass an integer between 0 to 100. Defaults to keep existing image quality. * @return [ByteArray] */ @JvmOverloads @@ -116,7 +116,7 @@ class Avatars(client: Client) : Service(client) { * @param code Country Code. ISO Alpha-2 country code format. * @param width Image width. Pass an integer between 0 to 2000. Defaults to 100. * @param height Image height. Pass an integer between 0 to 2000. Defaults to 100. - * @param quality Image quality. Pass an integer between 0 to 100. Defaults to 100. + * @param quality Image quality. Pass an integer between 0 to 100. Defaults to keep existing image quality. * @return [ByteArray] */ @JvmOverloads diff --git a/src/main/kotlin/io/appwrite/services/Databases.kt b/src/main/kotlin/io/appwrite/services/Databases.kt index 23cd0af..143e829 100644 --- a/src/main/kotlin/io/appwrite/services/Databases.kt +++ b/src/main/kotlin/io/appwrite/services/Databases.kt @@ -2049,6 +2049,7 @@ class Databases(client: Client) : Service(client) { * @param type Index type. * @param attributes Array of attributes to index. Maximum of 100 attributes are allowed, each 32 characters long. * @param orders Array of index orders. Maximum of 100 orders are allowed. + * @param lengths Length of index. Maximum of 100 * @return [io.appwrite.models.Index] */ @JvmOverloads @@ -2060,6 +2061,7 @@ class Databases(client: Client) : Service(client) { type: io.appwrite.enums.IndexType, attributes: List<String>, orders: List<String>? = null, + lengths: List<Long>? = null, ): io.appwrite.models.Index { val apiPath = "/databases/{databaseId}/collections/{collectionId}/indexes" .replace("{databaseId}", databaseId) @@ -2070,6 +2072,7 @@ class Databases(client: Client) : Service(client) { "type" to type, "attributes" to attributes, "orders" to orders, + "lengths" to lengths, ) val apiHeaders = mutableMapOf<String, String>( "content-type" to "application/json", diff --git a/src/main/kotlin/io/appwrite/services/Functions.kt b/src/main/kotlin/io/appwrite/services/Functions.kt index 124d410..8e09dc9 100644 --- a/src/main/kotlin/io/appwrite/services/Functions.kt +++ b/src/main/kotlin/io/appwrite/services/Functions.kt @@ -18,7 +18,7 @@ class Functions(client: Client) : Service(client) { /** * Get a list of all the project's functions. You can use the query params to filter your results. * - * @param queries Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https://appwrite.io/docs/queries). Maximum of 100 queries are allowed, each 4096 characters long. You may filter on the following attributes: name, enabled, runtime, deployment, schedule, scheduleNext, schedulePrevious, timeout, entrypoint, commands, installationId + * @param queries Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https://appwrite.io/docs/queries). Maximum of 100 queries are allowed, each 4096 characters long. You may filter on the following attributes: name, enabled, runtime, deploymentId, schedule, scheduleNext, schedulePrevious, timeout, entrypoint, commands, installationId * @param search Search term to filter your list results. Max length: 256 chars. * @return [io.appwrite.models.FunctionList] */ @@ -60,7 +60,7 @@ class Functions(client: Client) : Service(client) { * @param schedule Schedule CRON syntax. * @param timeout Function maximum execution time in seconds. * @param enabled Is function enabled? When set to 'disabled', users cannot access the function but Server SDKs with and API key can still access the function. No data is lost when this is toggled. - * @param logging Whether executions will be logged. When set to false, executions will not be logged, but will reduce resource used by your Appwrite project. + * @param logging When disabled, executions will exclude logs and errors, and will be slightly faster. * @param entrypoint Entrypoint File. This path is relative to the "providerRootDirectory". * @param commands Build Commands. * @param scopes List of scopes allowed for API key auto-generated for every execution. Maximum of 100 scopes are allowed. @@ -69,10 +69,6 @@ class Functions(client: Client) : Service(client) { * @param providerBranch Production branch for the repo linked to the function. * @param providerSilentMode Is the VCS (Version Control System) connection in silent mode for the repo linked to the function? In silent mode, comments will not be made on commits and pull requests. * @param providerRootDirectory Path to function code in the linked repo. - * @param templateRepository Repository name of the template. - * @param templateOwner The name of the owner of the template. - * @param templateRootDirectory Path to function code in the template repo. - * @param templateVersion Version (tag) for the repo linked to the function template. * @param specification Runtime specification for the function and builds. * @return [io.appwrite.models.Function] */ @@ -96,10 +92,6 @@ class Functions(client: Client) : Service(client) { providerBranch: String? = null, providerSilentMode: Boolean? = null, providerRootDirectory: String? = null, - templateRepository: String? = null, - templateOwner: String? = null, - templateRootDirectory: String? = null, - templateVersion: String? = null, specification: String? = null, ): io.appwrite.models.Function { val apiPath = "/functions" @@ -122,10 +114,6 @@ class Functions(client: Client) : Service(client) { "providerBranch" to providerBranch, "providerSilentMode" to providerSilentMode, "providerRootDirectory" to providerRootDirectory, - "templateRepository" to templateRepository, - "templateOwner" to templateOwner, - "templateRootDirectory" to templateRootDirectory, - "templateVersion" to templateVersion, "specification" to specification, ) val apiHeaders = mutableMapOf<String, String>( @@ -239,7 +227,7 @@ class Functions(client: Client) : Service(client) { * @param schedule Schedule CRON syntax. * @param timeout Maximum execution time in seconds. * @param enabled Is function enabled? When set to 'disabled', users cannot access the function but Server SDKs with and API key can still access the function. No data is lost when this is toggled. - * @param logging Whether executions will be logged. When set to false, executions will not be logged, but will reduce resource used by your Appwrite project. + * @param logging When disabled, executions will exclude logs and errors, and will be slightly faster. * @param entrypoint Entrypoint File. This path is relative to the "providerRootDirectory". * @param commands Build Commands. * @param scopes List of scopes allowed for API Key auto-generated for every execution. Maximum of 100 scopes are allowed. @@ -339,10 +327,44 @@ class Functions(client: Client) : Service(client) { } /** - * Get a list of all the project's code deployments. You can use the query params to filter your results. + * Update the function active deployment. Use this endpoint to switch the code deployment that should be used when visitor opens your function. * * @param functionId Function ID. - * @param queries Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https://appwrite.io/docs/queries). Maximum of 100 queries are allowed, each 4096 characters long. You may filter on the following attributes: size, buildId, activate, entrypoint, commands, type, size + * @param deploymentId Deployment ID. + * @return [io.appwrite.models.Function] + */ + @Throws(AppwriteException::class) + suspend fun updateFunctionDeployment( + functionId: String, + deploymentId: String, + ): io.appwrite.models.Function { + val apiPath = "/functions/{functionId}/deployment" + .replace("{functionId}", functionId) + + val apiParams = mutableMapOf<String, Any?>( + "deploymentId" to deploymentId, + ) + val apiHeaders = mutableMapOf<String, String>( + "content-type" to "application/json", + ) + val converter: (Any) -> io.appwrite.models.Function = { + io.appwrite.models.Function.from(map = it as Map<String, Any>) + } + return client.call( + "PATCH", + apiPath, + apiHeaders, + apiParams, + responseType = io.appwrite.models.Function::class.java, + converter, + ) + } + + /** + * Get a list of all the function's code deployments. You can use the query params to filter your results. + * + * @param functionId Function ID. + * @param queries Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https://appwrite.io/docs/queries). Maximum of 100 queries are allowed, each 4096 characters long. You may filter on the following attributes: buildSize, sourceSize, totalSize, buildDuration, status, activate, type * @param search Search term to filter your list results. Max length: 256 chars. * @return [io.appwrite.models.DeploymentList] */ @@ -425,30 +447,35 @@ class Functions(client: Client) : Service(client) { } /** - * Get a code deployment by its unique ID. + * Create a new build for an existing function deployment. This endpoint allows you to rebuild a deployment with the updated function configuration, including its entrypoint and build commands if they have been modified. The build process will be queued and executed asynchronously. The original deployment's code will be preserved and used for the new build. * * @param functionId Function ID. * @param deploymentId Deployment ID. + * @param buildId Build unique ID. * @return [io.appwrite.models.Deployment] */ + @JvmOverloads @Throws(AppwriteException::class) - suspend fun getDeployment( + suspend fun createDuplicateDeployment( functionId: String, deploymentId: String, + buildId: String? = null, ): io.appwrite.models.Deployment { - val apiPath = "/functions/{functionId}/deployments/{deploymentId}" + val apiPath = "/functions/{functionId}/deployments/duplicate" .replace("{functionId}", functionId) - .replace("{deploymentId}", deploymentId) val apiParams = mutableMapOf<String, Any?>( + "deploymentId" to deploymentId, + "buildId" to buildId, ) val apiHeaders = mutableMapOf<String, String>( + "content-type" to "application/json", ) val converter: (Any) -> io.appwrite.models.Deployment = { io.appwrite.models.Deployment.from(map = it as Map<String, Any>) } return client.call( - "GET", + "POST", apiPath, apiHeaders, apiParams, @@ -458,116 +485,139 @@ class Functions(client: Client) : Service(client) { } /** - * Update the function code deployment ID using the unique function ID. Use this endpoint to switch the code deployment that should be executed by the execution endpoint. + * Create a deployment based on a template.Use this endpoint with combination of [listTemplates](https://appwrite.io/docs/server/functions#listTemplates) to find the template details. * * @param functionId Function ID. - * @param deploymentId Deployment ID. - * @return [io.appwrite.models.Function] + * @param repository Repository name of the template. + * @param owner The name of the owner of the template. + * @param rootDirectory Path to function code in the template repo. + * @param version Version (tag) for the repo linked to the function template. + * @param activate Automatically activate the deployment when it is finished building. + * @return [io.appwrite.models.Deployment] */ + @JvmOverloads @Throws(AppwriteException::class) - suspend fun updateDeployment( + suspend fun createTemplateDeployment( functionId: String, - deploymentId: String, - ): io.appwrite.models.Function { - val apiPath = "/functions/{functionId}/deployments/{deploymentId}" + repository: String, + owner: String, + rootDirectory: String, + version: String, + activate: Boolean? = null, + ): io.appwrite.models.Deployment { + val apiPath = "/functions/{functionId}/deployments/template" .replace("{functionId}", functionId) - .replace("{deploymentId}", deploymentId) val apiParams = mutableMapOf<String, Any?>( + "repository" to repository, + "owner" to owner, + "rootDirectory" to rootDirectory, + "version" to version, + "activate" to activate, ) val apiHeaders = mutableMapOf<String, String>( "content-type" to "application/json", ) - val converter: (Any) -> io.appwrite.models.Function = { - io.appwrite.models.Function.from(map = it as Map<String, Any>) + val converter: (Any) -> io.appwrite.models.Deployment = { + io.appwrite.models.Deployment.from(map = it as Map<String, Any>) } return client.call( - "PATCH", + "POST", apiPath, apiHeaders, apiParams, - responseType = io.appwrite.models.Function::class.java, + responseType = io.appwrite.models.Deployment::class.java, converter, ) } /** - * Delete a code deployment by its unique ID. + * Create a deployment when a function is connected to VCS.This endpoint lets you create deployment from a branch, commit, or a tag. * * @param functionId Function ID. - * @param deploymentId Deployment ID. - * @return [Any] + * @param type Type of reference passed. Allowed values are: branch, commit + * @param reference VCS reference to create deployment from. Depending on type this can be: branch name, commit hash + * @param activate Automatically activate the deployment when it is finished building. + * @return [io.appwrite.models.Deployment] */ + @JvmOverloads @Throws(AppwriteException::class) - suspend fun deleteDeployment( + suspend fun createVcsDeployment( functionId: String, - deploymentId: String, - ): Any { - val apiPath = "/functions/{functionId}/deployments/{deploymentId}" + type: io.appwrite.enums.VCSDeploymentType, + reference: String, + activate: Boolean? = null, + ): io.appwrite.models.Deployment { + val apiPath = "/functions/{functionId}/deployments/vcs" .replace("{functionId}", functionId) - .replace("{deploymentId}", deploymentId) val apiParams = mutableMapOf<String, Any?>( + "type" to type, + "reference" to reference, + "activate" to activate, ) val apiHeaders = mutableMapOf<String, String>( "content-type" to "application/json", ) + val converter: (Any) -> io.appwrite.models.Deployment = { + io.appwrite.models.Deployment.from(map = it as Map<String, Any>) + } return client.call( - "DELETE", + "POST", apiPath, apiHeaders, apiParams, - responseType = Any::class.java, + responseType = io.appwrite.models.Deployment::class.java, + converter, ) } /** - * Create a new build for an existing function deployment. This endpoint allows you to rebuild a deployment with the updated function configuration, including its entrypoint and build commands if they have been modified The build process will be queued and executed asynchronously. The original deployment's code will be preserved and used for the new build. + * Get a function deployment by its unique ID. * * @param functionId Function ID. * @param deploymentId Deployment ID. - * @param buildId Build unique ID. - * @return [Any] + * @return [io.appwrite.models.Deployment] */ - @JvmOverloads @Throws(AppwriteException::class) - suspend fun createBuild( + suspend fun getDeployment( functionId: String, deploymentId: String, - buildId: String? = null, - ): Any { - val apiPath = "/functions/{functionId}/deployments/{deploymentId}/build" + ): io.appwrite.models.Deployment { + val apiPath = "/functions/{functionId}/deployments/{deploymentId}" .replace("{functionId}", functionId) .replace("{deploymentId}", deploymentId) val apiParams = mutableMapOf<String, Any?>( - "buildId" to buildId, ) val apiHeaders = mutableMapOf<String, String>( - "content-type" to "application/json", ) + val converter: (Any) -> io.appwrite.models.Deployment = { + io.appwrite.models.Deployment.from(map = it as Map<String, Any>) + } return client.call( - "POST", + "GET", apiPath, apiHeaders, apiParams, - responseType = Any::class.java, + responseType = io.appwrite.models.Deployment::class.java, + converter, ) } /** - * Cancel an ongoing function deployment build. If the build is already in progress, it will be stopped and marked as canceled. If the build hasn't started yet, it will be marked as canceled without executing. You cannot cancel builds that have already completed (status 'ready') or failed. The response includes the final build status and details. + * Delete a code deployment by its unique ID. * * @param functionId Function ID. * @param deploymentId Deployment ID. - * @return [io.appwrite.models.Build] + * @return [Any] */ @Throws(AppwriteException::class) - suspend fun updateDeploymentBuild( + suspend fun deleteDeployment( functionId: String, deploymentId: String, - ): io.appwrite.models.Build { - val apiPath = "/functions/{functionId}/deployments/{deploymentId}/build" + ): Any { + val apiPath = "/functions/{functionId}/deployments/{deploymentId}" .replace("{functionId}", functionId) .replace("{deploymentId}", deploymentId) @@ -576,36 +626,36 @@ class Functions(client: Client) : Service(client) { val apiHeaders = mutableMapOf<String, String>( "content-type" to "application/json", ) - val converter: (Any) -> io.appwrite.models.Build = { - io.appwrite.models.Build.from(map = it as Map<String, Any>) - } return client.call( - "PATCH", + "DELETE", apiPath, apiHeaders, apiParams, - responseType = io.appwrite.models.Build::class.java, - converter, + responseType = Any::class.java, ) } /** - * Get a Deployment's contents by its unique ID. This endpoint supports range requests for partial or streaming file download. + * Get a function deployment content by its unique ID. The endpoint response return with a 'Content-Disposition: attachment' header that tells the browser to start downloading the file to user downloads directory. * * @param functionId Function ID. * @param deploymentId Deployment ID. + * @param type Deployment file to download. Can be: "source", "output". * @return [ByteArray] */ + @JvmOverloads @Throws(AppwriteException::class) suspend fun getDeploymentDownload( functionId: String, deploymentId: String, + type: io.appwrite.enums.DeploymentDownloadType? = null, ): ByteArray { val apiPath = "/functions/{functionId}/deployments/{deploymentId}/download" .replace("{functionId}", functionId) .replace("{deploymentId}", deploymentId) val apiParams = mutableMapOf<String, Any?>( + "type" to type, ) val apiHeaders = mutableMapOf<String, String>( ) @@ -617,12 +667,45 @@ class Functions(client: Client) : Service(client) { ) } + /** + * Cancel an ongoing function deployment build. If the build is already in progress, it will be stopped and marked as canceled. If the build hasn't started yet, it will be marked as canceled without executing. You cannot cancel builds that have already completed (status 'ready') or failed. The response includes the final build status and details. + * + * @param functionId Function ID. + * @param deploymentId Deployment ID. + * @return [io.appwrite.models.Deployment] + */ + @Throws(AppwriteException::class) + suspend fun updateDeploymentStatus( + functionId: String, + deploymentId: String, + ): io.appwrite.models.Deployment { + val apiPath = "/functions/{functionId}/deployments/{deploymentId}/status" + .replace("{functionId}", functionId) + .replace("{deploymentId}", deploymentId) + + val apiParams = mutableMapOf<String, Any?>( + ) + val apiHeaders = mutableMapOf<String, String>( + "content-type" to "application/json", + ) + val converter: (Any) -> io.appwrite.models.Deployment = { + io.appwrite.models.Deployment.from(map = it as Map<String, Any>) + } + return client.call( + "PATCH", + apiPath, + apiHeaders, + apiParams, + responseType = io.appwrite.models.Deployment::class.java, + converter, + ) + } + /** * Get a list of all the current user function execution logs. You can use the query params to filter your results. * * @param functionId Function ID. * @param queries Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https://appwrite.io/docs/queries). Maximum of 100 queries are allowed, each 4096 characters long. You may filter on the following attributes: trigger, status, responseStatusCode, duration, requestMethod, requestPath, deploymentId - * @param search Search term to filter your list results. Max length: 256 chars. * @return [io.appwrite.models.ExecutionList] */ @JvmOverloads @@ -630,14 +713,12 @@ class Functions(client: Client) : Service(client) { suspend fun listExecutions( functionId: String, queries: List<String>? = null, - search: String? = null, ): io.appwrite.models.ExecutionList { val apiPath = "/functions/{functionId}/executions" .replace("{functionId}", functionId) val apiParams = mutableMapOf<String, Any?>( "queries" to queries, - "search" to search, ) val apiHeaders = mutableMapOf<String, String>( ) @@ -803,13 +884,16 @@ class Functions(client: Client) : Service(client) { * @param functionId Function unique ID. * @param key Variable key. Max length: 255 chars. * @param value Variable value. Max length: 8192 chars. + * @param secret Secret variables can be updated or deleted, but only functions can read them during build and runtime. * @return [io.appwrite.models.Variable] */ + @JvmOverloads @Throws(AppwriteException::class) suspend fun createVariable( functionId: String, key: String, value: String, + secret: Boolean? = null, ): io.appwrite.models.Variable { val apiPath = "/functions/{functionId}/variables" .replace("{functionId}", functionId) @@ -817,6 +901,7 @@ class Functions(client: Client) : Service(client) { val apiParams = mutableMapOf<String, Any?>( "key" to key, "value" to value, + "secret" to secret, ) val apiHeaders = mutableMapOf<String, String>( "content-type" to "application/json", @@ -874,6 +959,7 @@ class Functions(client: Client) : Service(client) { * @param variableId Variable unique ID. * @param key Variable key. Max length: 255 chars. * @param value Variable value. Max length: 8192 chars. + * @param secret Secret variables can be updated or deleted, but only functions can read them during build and runtime. * @return [io.appwrite.models.Variable] */ @JvmOverloads @@ -883,6 +969,7 @@ class Functions(client: Client) : Service(client) { variableId: String, key: String, value: String? = null, + secret: Boolean? = null, ): io.appwrite.models.Variable { val apiPath = "/functions/{functionId}/variables/{variableId}" .replace("{functionId}", functionId) @@ -891,6 +978,7 @@ class Functions(client: Client) : Service(client) { val apiParams = mutableMapOf<String, Any?>( "key" to key, "value" to value, + "secret" to secret, ) val apiHeaders = mutableMapOf<String, String>( "content-type" to "application/json", diff --git a/src/main/kotlin/io/appwrite/services/Sites.kt b/src/main/kotlin/io/appwrite/services/Sites.kt new file mode 100644 index 0000000..07aff05 --- /dev/null +++ b/src/main/kotlin/io/appwrite/services/Sites.kt @@ -0,0 +1,978 @@ +package io.appwrite.services + +import io.appwrite.Client +import io.appwrite.models.* +import io.appwrite.enums.* +import io.appwrite.exceptions.AppwriteException +import io.appwrite.extensions.classOf +import okhttp3.Cookie +import okhttp3.HttpUrl +import okhttp3.HttpUrl.Companion.toHttpUrl +import java.io.File + +/** + * The Sites Service allows you view, create and manage your web applications. +**/ +class Sites(client: Client) : Service(client) { + + /** + * Get a list of all the project's sites. You can use the query params to filter your results. + * + * @param queries Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https://appwrite.io/docs/queries). Maximum of 100 queries are allowed, each 4096 characters long. You may filter on the following attributes: name, enabled, framework, deploymentId, buildCommand, installCommand, outputDirectory, installationId + * @param search Search term to filter your list results. Max length: 256 chars. + * @return [io.appwrite.models.SiteList] + */ + @JvmOverloads + @Throws(AppwriteException::class) + suspend fun list( + queries: List<String>? = null, + search: String? = null, + ): io.appwrite.models.SiteList { + val apiPath = "/sites" + + val apiParams = mutableMapOf<String, Any?>( + "queries" to queries, + "search" to search, + ) + val apiHeaders = mutableMapOf<String, String>( + ) + val converter: (Any) -> io.appwrite.models.SiteList = { + io.appwrite.models.SiteList.from(map = it as Map<String, Any>) + } + return client.call( + "GET", + apiPath, + apiHeaders, + apiParams, + responseType = io.appwrite.models.SiteList::class.java, + converter, + ) + } + + /** + * Create a new site. + * + * @param siteId Site 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. + * @param name Site name. Max length: 128 chars. + * @param framework Sites framework. + * @param buildRuntime Runtime to use during build step. + * @param enabled Is site enabled? When set to 'disabled', users cannot access the site but Server SDKs with and API key can still access the site. No data is lost when this is toggled. + * @param logging When disabled, request logs will exclude logs and errors, and site responses will be slightly faster. + * @param timeout Maximum request time in seconds. + * @param installCommand Install Command. + * @param buildCommand Build Command. + * @param outputDirectory Output Directory for site. + * @param adapter Framework adapter defining rendering strategy. Allowed values are: static, ssr + * @param installationId Appwrite Installation ID for VCS (Version Control System) deployment. + * @param fallbackFile Fallback file for single page application sites. + * @param providerRepositoryId Repository ID of the repo linked to the site. + * @param providerBranch Production branch for the repo linked to the site. + * @param providerSilentMode Is the VCS (Version Control System) connection in silent mode for the repo linked to the site? In silent mode, comments will not be made on commits and pull requests. + * @param providerRootDirectory Path to site code in the linked repo. + * @param specification Framework specification for the site and builds. + * @return [io.appwrite.models.Site] + */ + @JvmOverloads + @Throws(AppwriteException::class) + suspend fun create( + siteId: String, + name: String, + framework: io.appwrite.enums.Framework, + buildRuntime: io.appwrite.enums.BuildRuntime, + enabled: Boolean? = null, + logging: Boolean? = null, + timeout: Long? = null, + installCommand: String? = null, + buildCommand: String? = null, + outputDirectory: String? = null, + adapter: io.appwrite.enums.Adapter? = null, + installationId: String? = null, + fallbackFile: String? = null, + providerRepositoryId: String? = null, + providerBranch: String? = null, + providerSilentMode: Boolean? = null, + providerRootDirectory: String? = null, + specification: String? = null, + ): io.appwrite.models.Site { + val apiPath = "/sites" + + val apiParams = mutableMapOf<String, Any?>( + "siteId" to siteId, + "name" to name, + "framework" to framework, + "enabled" to enabled, + "logging" to logging, + "timeout" to timeout, + "installCommand" to installCommand, + "buildCommand" to buildCommand, + "outputDirectory" to outputDirectory, + "buildRuntime" to buildRuntime, + "adapter" to adapter, + "installationId" to installationId, + "fallbackFile" to fallbackFile, + "providerRepositoryId" to providerRepositoryId, + "providerBranch" to providerBranch, + "providerSilentMode" to providerSilentMode, + "providerRootDirectory" to providerRootDirectory, + "specification" to specification, + ) + val apiHeaders = mutableMapOf<String, String>( + "content-type" to "application/json", + ) + val converter: (Any) -> io.appwrite.models.Site = { + io.appwrite.models.Site.from(map = it as Map<String, Any>) + } + return client.call( + "POST", + apiPath, + apiHeaders, + apiParams, + responseType = io.appwrite.models.Site::class.java, + converter, + ) + } + + /** + * Get a list of all frameworks that are currently available on the server instance. + * + * @return [io.appwrite.models.FrameworkList] + */ + @Throws(AppwriteException::class) + suspend fun listFrameworks( + ): io.appwrite.models.FrameworkList { + val apiPath = "/sites/frameworks" + + val apiParams = mutableMapOf<String, Any?>( + ) + val apiHeaders = mutableMapOf<String, String>( + ) + val converter: (Any) -> io.appwrite.models.FrameworkList = { + io.appwrite.models.FrameworkList.from(map = it as Map<String, Any>) + } + return client.call( + "GET", + apiPath, + apiHeaders, + apiParams, + responseType = io.appwrite.models.FrameworkList::class.java, + converter, + ) + } + + /** + * List allowed site specifications for this instance. + * + * @return [io.appwrite.models.SpecificationList] + */ + @Throws(AppwriteException::class) + suspend fun listSpecifications( + ): io.appwrite.models.SpecificationList { + val apiPath = "/sites/specifications" + + val apiParams = mutableMapOf<String, Any?>( + ) + val apiHeaders = mutableMapOf<String, String>( + ) + val converter: (Any) -> io.appwrite.models.SpecificationList = { + io.appwrite.models.SpecificationList.from(map = it as Map<String, Any>) + } + return client.call( + "GET", + apiPath, + apiHeaders, + apiParams, + responseType = io.appwrite.models.SpecificationList::class.java, + converter, + ) + } + + /** + * Get a site by its unique ID. + * + * @param siteId Site ID. + * @return [io.appwrite.models.Site] + */ + @Throws(AppwriteException::class) + suspend fun get( + siteId: String, + ): io.appwrite.models.Site { + val apiPath = "/sites/{siteId}" + .replace("{siteId}", siteId) + + val apiParams = mutableMapOf<String, Any?>( + ) + val apiHeaders = mutableMapOf<String, String>( + ) + val converter: (Any) -> io.appwrite.models.Site = { + io.appwrite.models.Site.from(map = it as Map<String, Any>) + } + return client.call( + "GET", + apiPath, + apiHeaders, + apiParams, + responseType = io.appwrite.models.Site::class.java, + converter, + ) + } + + /** + * Update site by its unique ID. + * + * @param siteId Site ID. + * @param name Site name. Max length: 128 chars. + * @param framework Sites framework. + * @param enabled Is site enabled? When set to 'disabled', users cannot access the site but Server SDKs with and API key can still access the site. No data is lost when this is toggled. + * @param logging When disabled, request logs will exclude logs and errors, and site responses will be slightly faster. + * @param timeout Maximum request time in seconds. + * @param installCommand Install Command. + * @param buildCommand Build Command. + * @param outputDirectory Output Directory for site. + * @param buildRuntime Runtime to use during build step. + * @param adapter Framework adapter defining rendering strategy. Allowed values are: static, ssr + * @param fallbackFile Fallback file for single page application sites. + * @param installationId Appwrite Installation ID for VCS (Version Control System) deployment. + * @param providerRepositoryId Repository ID of the repo linked to the site. + * @param providerBranch Production branch for the repo linked to the site. + * @param providerSilentMode Is the VCS (Version Control System) connection in silent mode for the repo linked to the site? In silent mode, comments will not be made on commits and pull requests. + * @param providerRootDirectory Path to site code in the linked repo. + * @param specification Framework specification for the site and builds. + * @return [io.appwrite.models.Site] + */ + @JvmOverloads + @Throws(AppwriteException::class) + suspend fun update( + siteId: String, + name: String, + framework: io.appwrite.enums.Framework, + enabled: Boolean? = null, + logging: Boolean? = null, + timeout: Long? = null, + installCommand: String? = null, + buildCommand: String? = null, + outputDirectory: String? = null, + buildRuntime: io.appwrite.enums.BuildRuntime? = null, + adapter: io.appwrite.enums.Adapter? = null, + fallbackFile: String? = null, + installationId: String? = null, + providerRepositoryId: String? = null, + providerBranch: String? = null, + providerSilentMode: Boolean? = null, + providerRootDirectory: String? = null, + specification: String? = null, + ): io.appwrite.models.Site { + val apiPath = "/sites/{siteId}" + .replace("{siteId}", siteId) + + val apiParams = mutableMapOf<String, Any?>( + "name" to name, + "framework" to framework, + "enabled" to enabled, + "logging" to logging, + "timeout" to timeout, + "installCommand" to installCommand, + "buildCommand" to buildCommand, + "outputDirectory" to outputDirectory, + "buildRuntime" to buildRuntime, + "adapter" to adapter, + "fallbackFile" to fallbackFile, + "installationId" to installationId, + "providerRepositoryId" to providerRepositoryId, + "providerBranch" to providerBranch, + "providerSilentMode" to providerSilentMode, + "providerRootDirectory" to providerRootDirectory, + "specification" to specification, + ) + val apiHeaders = mutableMapOf<String, String>( + "content-type" to "application/json", + ) + val converter: (Any) -> io.appwrite.models.Site = { + io.appwrite.models.Site.from(map = it as Map<String, Any>) + } + return client.call( + "PUT", + apiPath, + apiHeaders, + apiParams, + responseType = io.appwrite.models.Site::class.java, + converter, + ) + } + + /** + * Delete a site by its unique ID. + * + * @param siteId Site ID. + * @return [Any] + */ + @Throws(AppwriteException::class) + suspend fun delete( + siteId: String, + ): Any { + val apiPath = "/sites/{siteId}" + .replace("{siteId}", siteId) + + val apiParams = mutableMapOf<String, Any?>( + ) + val apiHeaders = mutableMapOf<String, String>( + "content-type" to "application/json", + ) + return client.call( + "DELETE", + apiPath, + apiHeaders, + apiParams, + responseType = Any::class.java, + ) + } + + /** + * Update the site active deployment. Use this endpoint to switch the code deployment that should be used when visitor opens your site. + * + * @param siteId Site ID. + * @param deploymentId Deployment ID. + * @return [io.appwrite.models.Site] + */ + @Throws(AppwriteException::class) + suspend fun updateSiteDeployment( + siteId: String, + deploymentId: String, + ): io.appwrite.models.Site { + val apiPath = "/sites/{siteId}/deployment" + .replace("{siteId}", siteId) + + val apiParams = mutableMapOf<String, Any?>( + "deploymentId" to deploymentId, + ) + val apiHeaders = mutableMapOf<String, String>( + "content-type" to "application/json", + ) + val converter: (Any) -> io.appwrite.models.Site = { + io.appwrite.models.Site.from(map = it as Map<String, Any>) + } + return client.call( + "PATCH", + apiPath, + apiHeaders, + apiParams, + responseType = io.appwrite.models.Site::class.java, + converter, + ) + } + + /** + * Get a list of all the site's code deployments. You can use the query params to filter your results. + * + * @param siteId Site ID. + * @param queries Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https://appwrite.io/docs/queries). Maximum of 100 queries are allowed, each 4096 characters long. You may filter on the following attributes: buildSize, sourceSize, totalSize, buildDuration, status, activate, type + * @param search Search term to filter your list results. Max length: 256 chars. + * @return [io.appwrite.models.DeploymentList] + */ + @JvmOverloads + @Throws(AppwriteException::class) + suspend fun listDeployments( + siteId: String, + queries: List<String>? = null, + search: String? = null, + ): io.appwrite.models.DeploymentList { + val apiPath = "/sites/{siteId}/deployments" + .replace("{siteId}", siteId) + + val apiParams = mutableMapOf<String, Any?>( + "queries" to queries, + "search" to search, + ) + val apiHeaders = mutableMapOf<String, String>( + ) + val converter: (Any) -> io.appwrite.models.DeploymentList = { + io.appwrite.models.DeploymentList.from(map = it as Map<String, Any>) + } + return client.call( + "GET", + apiPath, + apiHeaders, + apiParams, + responseType = io.appwrite.models.DeploymentList::class.java, + converter, + ) + } + + /** + * Create a new site code deployment. Use this endpoint to upload a new version of your site code. To activate your newly uploaded code, you'll need to update the function's deployment to use your new deployment ID. + * + * @param siteId Site ID. + * @param code Gzip file with your code package. When used with the Appwrite CLI, pass the path to your code directory, and the CLI will automatically package your code. Use a path that is within the current directory. + * @param activate Automatically activate the deployment when it is finished building. + * @param installCommand Install Commands. + * @param buildCommand Build Commands. + * @param outputDirectory Output Directory. + * @return [io.appwrite.models.Deployment] + */ + @JvmOverloads + @Throws(AppwriteException::class) + suspend fun createDeployment( + siteId: String, + code: InputFile, + activate: Boolean, + installCommand: String? = null, + buildCommand: String? = null, + outputDirectory: String? = null, + onProgress: ((UploadProgress) -> Unit)? = null + ): io.appwrite.models.Deployment { + val apiPath = "/sites/{siteId}/deployments" + .replace("{siteId}", siteId) + + val apiParams = mutableMapOf<String, Any?>( + "installCommand" to installCommand, + "buildCommand" to buildCommand, + "outputDirectory" to outputDirectory, + "code" to code, + "activate" to activate, + ) + val apiHeaders = mutableMapOf<String, String>( + "content-type" to "multipart/form-data", + ) + val converter: (Any) -> io.appwrite.models.Deployment = { + io.appwrite.models.Deployment.from(map = it as Map<String, Any>) + } + val idParamName: String? = null + val paramName = "code" + return client.chunkedUpload( + apiPath, + apiHeaders, + apiParams, + responseType = io.appwrite.models.Deployment::class.java, + converter, + paramName, + idParamName, + onProgress, + ) + } + + /** + * Create a new build for an existing site deployment. This endpoint allows you to rebuild a deployment with the updated site configuration, including its commands and output directory if they have been modified. The build process will be queued and executed asynchronously. The original deployment's code will be preserved and used for the new build. + * + * @param siteId Site ID. + * @param deploymentId Deployment ID. + * @return [io.appwrite.models.Deployment] + */ + @Throws(AppwriteException::class) + suspend fun createDuplicateDeployment( + siteId: String, + deploymentId: String, + ): io.appwrite.models.Deployment { + val apiPath = "/sites/{siteId}/deployments/duplicate" + .replace("{siteId}", siteId) + + val apiParams = mutableMapOf<String, Any?>( + "deploymentId" to deploymentId, + ) + val apiHeaders = mutableMapOf<String, String>( + "content-type" to "application/json", + ) + val converter: (Any) -> io.appwrite.models.Deployment = { + io.appwrite.models.Deployment.from(map = it as Map<String, Any>) + } + return client.call( + "POST", + apiPath, + apiHeaders, + apiParams, + responseType = io.appwrite.models.Deployment::class.java, + converter, + ) + } + + /** + * Create a deployment based on a template.Use this endpoint with combination of [listTemplates](https://appwrite.io/docs/server/sites#listTemplates) to find the template details. + * + * @param siteId Site ID. + * @param repository Repository name of the template. + * @param owner The name of the owner of the template. + * @param rootDirectory Path to site code in the template repo. + * @param version Version (tag) for the repo linked to the site template. + * @param activate Automatically activate the deployment when it is finished building. + * @return [io.appwrite.models.Deployment] + */ + @JvmOverloads + @Throws(AppwriteException::class) + suspend fun createTemplateDeployment( + siteId: String, + repository: String, + owner: String, + rootDirectory: String, + version: String, + activate: Boolean? = null, + ): io.appwrite.models.Deployment { + val apiPath = "/sites/{siteId}/deployments/template" + .replace("{siteId}", siteId) + + val apiParams = mutableMapOf<String, Any?>( + "repository" to repository, + "owner" to owner, + "rootDirectory" to rootDirectory, + "version" to version, + "activate" to activate, + ) + val apiHeaders = mutableMapOf<String, String>( + "content-type" to "application/json", + ) + val converter: (Any) -> io.appwrite.models.Deployment = { + io.appwrite.models.Deployment.from(map = it as Map<String, Any>) + } + return client.call( + "POST", + apiPath, + apiHeaders, + apiParams, + responseType = io.appwrite.models.Deployment::class.java, + converter, + ) + } + + /** + * Create a deployment when a site is connected to VCS.This endpoint lets you create deployment from a branch, commit, or a tag. + * + * @param siteId Site ID. + * @param type Type of reference passed. Allowed values are: branch, commit + * @param reference VCS reference to create deployment from. Depending on type this can be: branch name, commit hash + * @param activate Automatically activate the deployment when it is finished building. + * @return [io.appwrite.models.Deployment] + */ + @JvmOverloads + @Throws(AppwriteException::class) + suspend fun createVcsDeployment( + siteId: String, + type: io.appwrite.enums.VCSDeploymentType, + reference: String, + activate: Boolean? = null, + ): io.appwrite.models.Deployment { + val apiPath = "/sites/{siteId}/deployments/vcs" + .replace("{siteId}", siteId) + + val apiParams = mutableMapOf<String, Any?>( + "type" to type, + "reference" to reference, + "activate" to activate, + ) + val apiHeaders = mutableMapOf<String, String>( + "content-type" to "application/json", + ) + val converter: (Any) -> io.appwrite.models.Deployment = { + io.appwrite.models.Deployment.from(map = it as Map<String, Any>) + } + return client.call( + "POST", + apiPath, + apiHeaders, + apiParams, + responseType = io.appwrite.models.Deployment::class.java, + converter, + ) + } + + /** + * Get a site deployment by its unique ID. + * + * @param siteId Site ID. + * @param deploymentId Deployment ID. + * @return [io.appwrite.models.Deployment] + */ + @Throws(AppwriteException::class) + suspend fun getDeployment( + siteId: String, + deploymentId: String, + ): io.appwrite.models.Deployment { + val apiPath = "/sites/{siteId}/deployments/{deploymentId}" + .replace("{siteId}", siteId) + .replace("{deploymentId}", deploymentId) + + val apiParams = mutableMapOf<String, Any?>( + ) + val apiHeaders = mutableMapOf<String, String>( + ) + val converter: (Any) -> io.appwrite.models.Deployment = { + io.appwrite.models.Deployment.from(map = it as Map<String, Any>) + } + return client.call( + "GET", + apiPath, + apiHeaders, + apiParams, + responseType = io.appwrite.models.Deployment::class.java, + converter, + ) + } + + /** + * Delete a site deployment by its unique ID. + * + * @param siteId Site ID. + * @param deploymentId Deployment ID. + * @return [Any] + */ + @Throws(AppwriteException::class) + suspend fun deleteDeployment( + siteId: String, + deploymentId: String, + ): Any { + val apiPath = "/sites/{siteId}/deployments/{deploymentId}" + .replace("{siteId}", siteId) + .replace("{deploymentId}", deploymentId) + + val apiParams = mutableMapOf<String, Any?>( + ) + val apiHeaders = mutableMapOf<String, String>( + "content-type" to "application/json", + ) + return client.call( + "DELETE", + apiPath, + apiHeaders, + apiParams, + responseType = Any::class.java, + ) + } + + /** + * Get a site deployment content by its unique ID. The endpoint response return with a 'Content-Disposition: attachment' header that tells the browser to start downloading the file to user downloads directory. + * + * @param siteId Site ID. + * @param deploymentId Deployment ID. + * @param type Deployment file to download. Can be: "source", "output". + * @return [ByteArray] + */ + @JvmOverloads + @Throws(AppwriteException::class) + suspend fun getDeploymentDownload( + siteId: String, + deploymentId: String, + type: io.appwrite.enums.DeploymentDownloadType? = null, + ): ByteArray { + val apiPath = "/sites/{siteId}/deployments/{deploymentId}/download" + .replace("{siteId}", siteId) + .replace("{deploymentId}", deploymentId) + + val apiParams = mutableMapOf<String, Any?>( + "type" to type, + ) + val apiHeaders = mutableMapOf<String, String>( + ) + return client.call( + "GET", + apiPath, + params = apiParams, + responseType = ByteArray::class.java + ) + } + + /** + * Cancel an ongoing site deployment build. If the build is already in progress, it will be stopped and marked as canceled. If the build hasn't started yet, it will be marked as canceled without executing. You cannot cancel builds that have already completed (status 'ready') or failed. The response includes the final build status and details. + * + * @param siteId Site ID. + * @param deploymentId Deployment ID. + * @return [io.appwrite.models.Deployment] + */ + @Throws(AppwriteException::class) + suspend fun updateDeploymentStatus( + siteId: String, + deploymentId: String, + ): io.appwrite.models.Deployment { + val apiPath = "/sites/{siteId}/deployments/{deploymentId}/status" + .replace("{siteId}", siteId) + .replace("{deploymentId}", deploymentId) + + val apiParams = mutableMapOf<String, Any?>( + ) + val apiHeaders = mutableMapOf<String, String>( + "content-type" to "application/json", + ) + val converter: (Any) -> io.appwrite.models.Deployment = { + io.appwrite.models.Deployment.from(map = it as Map<String, Any>) + } + return client.call( + "PATCH", + apiPath, + apiHeaders, + apiParams, + responseType = io.appwrite.models.Deployment::class.java, + converter, + ) + } + + /** + * Get a list of all site logs. You can use the query params to filter your results. + * + * @param siteId Site ID. + * @param queries Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https://appwrite.io/docs/queries). Maximum of 100 queries are allowed, each 4096 characters long. You may filter on the following attributes: trigger, status, responseStatusCode, duration, requestMethod, requestPath, deploymentId + * @return [io.appwrite.models.ExecutionList] + */ + @JvmOverloads + @Throws(AppwriteException::class) + suspend fun listLogs( + siteId: String, + queries: List<String>? = null, + ): io.appwrite.models.ExecutionList { + val apiPath = "/sites/{siteId}/logs" + .replace("{siteId}", siteId) + + val apiParams = mutableMapOf<String, Any?>( + "queries" to queries, + ) + val apiHeaders = mutableMapOf<String, String>( + ) + val converter: (Any) -> io.appwrite.models.ExecutionList = { + io.appwrite.models.ExecutionList.from(map = it as Map<String, Any>) + } + return client.call( + "GET", + apiPath, + apiHeaders, + apiParams, + responseType = io.appwrite.models.ExecutionList::class.java, + converter, + ) + } + + /** + * Get a site request log by its unique ID. + * + * @param siteId Site ID. + * @param logId Log ID. + * @return [io.appwrite.models.Execution] + */ + @Throws(AppwriteException::class) + suspend fun getLog( + siteId: String, + logId: String, + ): io.appwrite.models.Execution { + val apiPath = "/sites/{siteId}/logs/{logId}" + .replace("{siteId}", siteId) + .replace("{logId}", logId) + + val apiParams = mutableMapOf<String, Any?>( + ) + val apiHeaders = mutableMapOf<String, String>( + ) + val converter: (Any) -> io.appwrite.models.Execution = { + io.appwrite.models.Execution.from(map = it as Map<String, Any>) + } + return client.call( + "GET", + apiPath, + apiHeaders, + apiParams, + responseType = io.appwrite.models.Execution::class.java, + converter, + ) + } + + /** + * Delete a site log by its unique ID. + * + * @param siteId Site ID. + * @param logId Log ID. + * @return [Any] + */ + @Throws(AppwriteException::class) + suspend fun deleteLog( + siteId: String, + logId: String, + ): Any { + val apiPath = "/sites/{siteId}/logs/{logId}" + .replace("{siteId}", siteId) + .replace("{logId}", logId) + + val apiParams = mutableMapOf<String, Any?>( + ) + val apiHeaders = mutableMapOf<String, String>( + "content-type" to "application/json", + ) + return client.call( + "DELETE", + apiPath, + apiHeaders, + apiParams, + responseType = Any::class.java, + ) + } + + /** + * Get a list of all variables of a specific site. + * + * @param siteId Site unique ID. + * @return [io.appwrite.models.VariableList] + */ + @Throws(AppwriteException::class) + suspend fun listVariables( + siteId: String, + ): io.appwrite.models.VariableList { + val apiPath = "/sites/{siteId}/variables" + .replace("{siteId}", siteId) + + val apiParams = mutableMapOf<String, Any?>( + ) + val apiHeaders = mutableMapOf<String, String>( + ) + val converter: (Any) -> io.appwrite.models.VariableList = { + io.appwrite.models.VariableList.from(map = it as Map<String, Any>) + } + return client.call( + "GET", + apiPath, + apiHeaders, + apiParams, + responseType = io.appwrite.models.VariableList::class.java, + converter, + ) + } + + /** + * Create a new site variable. These variables can be accessed during build and runtime (server-side rendering) as environment variables. + * + * @param siteId Site unique ID. + * @param key Variable key. Max length: 255 chars. + * @param value Variable value. Max length: 8192 chars. + * @param secret Secret variables can be updated or deleted, but only sites can read them during build and runtime. + * @return [io.appwrite.models.Variable] + */ + @JvmOverloads + @Throws(AppwriteException::class) + suspend fun createVariable( + siteId: String, + key: String, + value: String, + secret: Boolean? = null, + ): io.appwrite.models.Variable { + val apiPath = "/sites/{siteId}/variables" + .replace("{siteId}", siteId) + + val apiParams = mutableMapOf<String, Any?>( + "key" to key, + "value" to value, + "secret" to secret, + ) + val apiHeaders = mutableMapOf<String, String>( + "content-type" to "application/json", + ) + val converter: (Any) -> io.appwrite.models.Variable = { + io.appwrite.models.Variable.from(map = it as Map<String, Any>) + } + return client.call( + "POST", + apiPath, + apiHeaders, + apiParams, + responseType = io.appwrite.models.Variable::class.java, + converter, + ) + } + + /** + * Get a variable by its unique ID. + * + * @param siteId Site unique ID. + * @param variableId Variable unique ID. + * @return [io.appwrite.models.Variable] + */ + @Throws(AppwriteException::class) + suspend fun getVariable( + siteId: String, + variableId: String, + ): io.appwrite.models.Variable { + val apiPath = "/sites/{siteId}/variables/{variableId}" + .replace("{siteId}", siteId) + .replace("{variableId}", variableId) + + val apiParams = mutableMapOf<String, Any?>( + ) + val apiHeaders = mutableMapOf<String, String>( + ) + val converter: (Any) -> io.appwrite.models.Variable = { + io.appwrite.models.Variable.from(map = it as Map<String, Any>) + } + return client.call( + "GET", + apiPath, + apiHeaders, + apiParams, + responseType = io.appwrite.models.Variable::class.java, + converter, + ) + } + + /** + * Update variable by its unique ID. + * + * @param siteId Site unique ID. + * @param variableId Variable unique ID. + * @param key Variable key. Max length: 255 chars. + * @param value Variable value. Max length: 8192 chars. + * @param secret Secret variables can be updated or deleted, but only sites can read them during build and runtime. + * @return [io.appwrite.models.Variable] + */ + @JvmOverloads + @Throws(AppwriteException::class) + suspend fun updateVariable( + siteId: String, + variableId: String, + key: String, + value: String? = null, + secret: Boolean? = null, + ): io.appwrite.models.Variable { + val apiPath = "/sites/{siteId}/variables/{variableId}" + .replace("{siteId}", siteId) + .replace("{variableId}", variableId) + + val apiParams = mutableMapOf<String, Any?>( + "key" to key, + "value" to value, + "secret" to secret, + ) + val apiHeaders = mutableMapOf<String, String>( + "content-type" to "application/json", + ) + val converter: (Any) -> io.appwrite.models.Variable = { + io.appwrite.models.Variable.from(map = it as Map<String, Any>) + } + return client.call( + "PUT", + apiPath, + apiHeaders, + apiParams, + responseType = io.appwrite.models.Variable::class.java, + converter, + ) + } + + /** + * Delete a variable by its unique ID. + * + * @param siteId Site unique ID. + * @param variableId Variable unique ID. + * @return [Any] + */ + @Throws(AppwriteException::class) + suspend fun deleteVariable( + siteId: String, + variableId: String, + ): Any { + val apiPath = "/sites/{siteId}/variables/{variableId}" + .replace("{siteId}", siteId) + .replace("{variableId}", variableId) + + val apiParams = mutableMapOf<String, Any?>( + ) + val apiHeaders = mutableMapOf<String, String>( + "content-type" to "application/json", + ) + return client.call( + "DELETE", + apiPath, + apiHeaders, + apiParams, + responseType = Any::class.java, + ) + } + +} \ No newline at end of file diff --git a/src/main/kotlin/io/appwrite/services/Storage.kt b/src/main/kotlin/io/appwrite/services/Storage.kt index 825e9f4..f319359 100644 --- a/src/main/kotlin/io/appwrite/services/Storage.kt +++ b/src/main/kotlin/io/appwrite/services/Storage.kt @@ -416,18 +416,22 @@ class Storage(client: Client) : Service(client) { * * @param bucketId Storage bucket ID. You can create a new storage bucket using the Storage service [server integration](https://appwrite.io/docs/server/storage#createBucket). * @param fileId File ID. + * @param token File token for accessing this file. * @return [ByteArray] */ + @JvmOverloads @Throws(AppwriteException::class) suspend fun getFileDownload( bucketId: String, fileId: String, + token: String? = null, ): ByteArray { val apiPath = "/storage/buckets/{bucketId}/files/{fileId}/download" .replace("{bucketId}", bucketId) .replace("{fileId}", fileId) val apiParams = mutableMapOf<String, Any?>( + "token" to token, ) val apiHeaders = mutableMapOf<String, String>( ) @@ -447,7 +451,7 @@ class Storage(client: Client) : Service(client) { * @param width Resize preview image width, Pass an integer between 0 to 4000. * @param height Resize preview image height, Pass an integer between 0 to 4000. * @param gravity Image crop gravity. Can be one of center,top-left,top,top-right,left,right,bottom-left,bottom,bottom-right - * @param quality Preview image quality. Pass an integer between 0 to 100. Defaults to 100. + * @param quality Preview image quality. Pass an integer between 0 to 100. Defaults to keep existing image quality. * @param borderWidth Preview image border in pixels. Pass an integer between 0 to 100. Defaults to 0. * @param borderColor Preview image border color. Use a valid HEX color, no # is needed for prefix. * @param borderRadius Preview image border radius in pixels. Pass an integer between 0 to 4000. @@ -455,6 +459,7 @@ class Storage(client: Client) : Service(client) { * @param rotation Preview image rotation in degrees. Pass an integer between -360 and 360. * @param background Preview image background color. Only works with transparent images (png). Use a valid HEX color, no # is needed for prefix. * @param output Output format type (jpeg, jpg, png, gif and webp). + * @param token File token for accessing this file. * @return [ByteArray] */ @JvmOverloads @@ -473,6 +478,7 @@ class Storage(client: Client) : Service(client) { rotation: Long? = null, background: String? = null, output: io.appwrite.enums.ImageFormat? = null, + token: String? = null, ): ByteArray { val apiPath = "/storage/buckets/{bucketId}/files/{fileId}/preview" .replace("{bucketId}", bucketId) @@ -490,6 +496,7 @@ class Storage(client: Client) : Service(client) { "rotation" to rotation, "background" to background, "output" to output, + "token" to token, ) val apiHeaders = mutableMapOf<String, String>( ) @@ -506,18 +513,22 @@ class Storage(client: Client) : Service(client) { * * @param bucketId Storage bucket unique ID. You can create a new storage bucket using the Storage service [server integration](https://appwrite.io/docs/server/storage#createBucket). * @param fileId File ID. + * @param token File token for accessing this file. * @return [ByteArray] */ + @JvmOverloads @Throws(AppwriteException::class) suspend fun getFileView( bucketId: String, fileId: String, + token: String? = null, ): ByteArray { val apiPath = "/storage/buckets/{bucketId}/files/{fileId}/view" .replace("{bucketId}", bucketId) .replace("{fileId}", fileId) val apiParams = mutableMapOf<String, Any?>( + "token" to token, ) val apiHeaders = mutableMapOf<String, String>( ) diff --git a/src/main/kotlin/io/appwrite/services/Teams.kt b/src/main/kotlin/io/appwrite/services/Teams.kt index 4762622..9d601ab 100644 --- a/src/main/kotlin/io/appwrite/services/Teams.kt +++ b/src/main/kotlin/io/appwrite/services/Teams.kt @@ -254,7 +254,7 @@ class Teams(client: Client) : Service(client) { * Use this endpoint to list a team's members using the team's ID. All team members have read access to this endpoint. Hide sensitive attributes from the response by toggling membership privacy in the Console. * * @param teamId Team ID. - * @param queries Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https://appwrite.io/docs/queries). Maximum of 100 queries are allowed, each 4096 characters long. You may filter on the following attributes: userId, teamId, invited, joined, confirm + * @param queries Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https://appwrite.io/docs/queries). Maximum of 100 queries are allowed, each 4096 characters long. You may filter on the following attributes: userId, teamId, invited, joined, confirm, roles * @param search Search term to filter your list results. Max length: 256 chars. * @return [io.appwrite.models.MembershipList] */ diff --git a/src/main/kotlin/io/appwrite/services/Tokens.kt b/src/main/kotlin/io/appwrite/services/Tokens.kt new file mode 100644 index 0000000..059595a --- /dev/null +++ b/src/main/kotlin/io/appwrite/services/Tokens.kt @@ -0,0 +1,183 @@ +package io.appwrite.services + +import io.appwrite.Client +import io.appwrite.models.* +import io.appwrite.enums.* +import io.appwrite.exceptions.AppwriteException +import io.appwrite.extensions.classOf +import okhttp3.Cookie +import java.io.File + +/** + * +**/ +class Tokens(client: Client) : Service(client) { + + /** + * List all the tokens created for a specific file or bucket. You can use the query params to filter your results. + * + * @param bucketId Storage bucket unique ID. You can create a new storage bucket using the Storage service [server integration](https://appwrite.io/docs/server/storage#createBucket). + * @param fileId File unique ID. + * @param queries Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https://appwrite.io/docs/queries). Maximum of 100 queries are allowed, each 4096 characters long. You may filter on the following attributes: expire + * @return [io.appwrite.models.ResourceTokenList] + */ + @JvmOverloads + @Throws(AppwriteException::class) + suspend fun list( + bucketId: String, + fileId: String, + queries: List<String>? = null, + ): io.appwrite.models.ResourceTokenList { + val apiPath = "/tokens/buckets/{bucketId}/files/{fileId}" + .replace("{bucketId}", bucketId) + .replace("{fileId}", fileId) + + val apiParams = mutableMapOf<String, Any?>( + "queries" to queries, + ) + val apiHeaders = mutableMapOf<String, String>( + ) + val converter: (Any) -> io.appwrite.models.ResourceTokenList = { + io.appwrite.models.ResourceTokenList.from(map = it as Map<String, Any>) + } + return client.call( + "GET", + apiPath, + apiHeaders, + apiParams, + responseType = io.appwrite.models.ResourceTokenList::class.java, + converter, + ) + } + + /** + * Create a new token. A token is linked to a file. Token can be passed as a header or request get parameter. + * + * @param bucketId Storage bucket unique ID. You can create a new storage bucket using the Storage service [server integration](https://appwrite.io/docs/server/storage#createBucket). + * @param fileId File unique ID. + * @param expire Token expiry date + * @return [io.appwrite.models.ResourceToken] + */ + @JvmOverloads + @Throws(AppwriteException::class) + suspend fun createFileToken( + bucketId: String, + fileId: String, + expire: String? = null, + ): io.appwrite.models.ResourceToken { + val apiPath = "/tokens/buckets/{bucketId}/files/{fileId}" + .replace("{bucketId}", bucketId) + .replace("{fileId}", fileId) + + val apiParams = mutableMapOf<String, Any?>( + "expire" to expire, + ) + val apiHeaders = mutableMapOf<String, String>( + "content-type" to "application/json", + ) + val converter: (Any) -> io.appwrite.models.ResourceToken = { + io.appwrite.models.ResourceToken.from(map = it as Map<String, Any>) + } + return client.call( + "POST", + apiPath, + apiHeaders, + apiParams, + responseType = io.appwrite.models.ResourceToken::class.java, + converter, + ) + } + + /** + * Get a token by its unique ID. + * + * @param tokenId Token ID. + * @return [io.appwrite.models.ResourceToken] + */ + @Throws(AppwriteException::class) + suspend fun get( + tokenId: String, + ): io.appwrite.models.ResourceToken { + val apiPath = "/tokens/{tokenId}" + .replace("{tokenId}", tokenId) + + val apiParams = mutableMapOf<String, Any?>( + ) + val apiHeaders = mutableMapOf<String, String>( + ) + val converter: (Any) -> io.appwrite.models.ResourceToken = { + io.appwrite.models.ResourceToken.from(map = it as Map<String, Any>) + } + return client.call( + "GET", + apiPath, + apiHeaders, + apiParams, + responseType = io.appwrite.models.ResourceToken::class.java, + converter, + ) + } + + /** + * Update a token by its unique ID. Use this endpoint to update a token's expiry date. + * + * @param tokenId Token unique ID. + * @param expire File token expiry date + * @return [io.appwrite.models.ResourceToken] + */ + @JvmOverloads + @Throws(AppwriteException::class) + suspend fun update( + tokenId: String, + expire: String? = null, + ): io.appwrite.models.ResourceToken { + val apiPath = "/tokens/{tokenId}" + .replace("{tokenId}", tokenId) + + val apiParams = mutableMapOf<String, Any?>( + "expire" to expire, + ) + val apiHeaders = mutableMapOf<String, String>( + "content-type" to "application/json", + ) + val converter: (Any) -> io.appwrite.models.ResourceToken = { + io.appwrite.models.ResourceToken.from(map = it as Map<String, Any>) + } + return client.call( + "PATCH", + apiPath, + apiHeaders, + apiParams, + responseType = io.appwrite.models.ResourceToken::class.java, + converter, + ) + } + + /** + * Delete a token by its unique ID. + * + * @param tokenId Token ID. + * @return [Any] + */ + @Throws(AppwriteException::class) + suspend fun delete( + tokenId: String, + ): Any { + val apiPath = "/tokens/{tokenId}" + .replace("{tokenId}", tokenId) + + val apiParams = mutableMapOf<String, Any?>( + ) + val apiHeaders = mutableMapOf<String, String>( + "content-type" to "application/json", + ) + return client.call( + "DELETE", + apiPath, + apiHeaders, + apiParams, + responseType = Any::class.java, + ) + } + +} \ No newline at end of file diff --git a/src/main/kotlin/io/appwrite/services/Users.kt b/src/main/kotlin/io/appwrite/services/Users.kt index d2005af..c98fd79 100644 --- a/src/main/kotlin/io/appwrite/services/Users.kt +++ b/src/main/kotlin/io/appwrite/services/Users.kt @@ -967,16 +967,23 @@ class Users(client: Client) : Service(client) { * Get the user membership list by its unique ID. * * @param userId User ID. + * @param queries Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https://appwrite.io/docs/queries). Maximum of 100 queries are allowed, each 4096 characters long. You may filter on the following attributes: userId, teamId, invited, joined, confirm, roles + * @param search Search term to filter your list results. Max length: 256 chars. * @return [io.appwrite.models.MembershipList] */ + @JvmOverloads @Throws(AppwriteException::class) suspend fun listMemberships( userId: String, + queries: List<String>? = null, + search: String? = null, ): io.appwrite.models.MembershipList { val apiPath = "/users/{userId}/memberships" .replace("{userId}", userId) val apiParams = mutableMapOf<String, Any?>( + "queries" to queries, + "search" to search, ) val apiHeaders = mutableMapOf<String, String>( ) From 3ea72af7c7d38273ac6fb7e8d56d6dc77bcd7fe6 Mon Sep 17 00:00:00 2001 From: root <chiragaggarwal5k@gmail.com> Date: Sun, 18 May 2025 07:37:42 +0000 Subject: [PATCH 11/17] chore: bump to next major versions --- README.md | 4 ++-- src/main/kotlin/io/appwrite/Client.kt | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/README.md b/README.md index bc183d8..b9997e1 100644 --- a/README.md +++ b/README.md @@ -39,7 +39,7 @@ repositories { Next, add the dependency to your project's `build.gradle(.kts)` file: ```groovy -implementation("io.appwrite:sdk-for-kotlin:8.2.0") +implementation("io.appwrite:sdk-for-kotlin:9.0.0") ``` ### Maven @@ -50,7 +50,7 @@ Add this to your project's `pom.xml` file: <dependency> <groupId>io.appwrite</groupId> <artifactId>sdk-for-kotlin</artifactId> - <version>8.2.0</version> + <version>9.0.0</version> </dependency> </dependencies> ``` diff --git a/src/main/kotlin/io/appwrite/Client.kt b/src/main/kotlin/io/appwrite/Client.kt index 9647ede..c7824ef 100644 --- a/src/main/kotlin/io/appwrite/Client.kt +++ b/src/main/kotlin/io/appwrite/Client.kt @@ -58,11 +58,11 @@ class Client @JvmOverloads constructor( init { headers = mutableMapOf( "content-type" to "application/json", - "user-agent" to "AppwriteKotlinSDK/8.2.0 ${System.getProperty("http.agent")}", + "user-agent" to "AppwriteKotlinSDK/9.0.0 ${System.getProperty("http.agent")}", "x-sdk-name" to "Kotlin", "x-sdk-platform" to "server", "x-sdk-language" to "kotlin", - "x-sdk-version" to "8.2.0", + "x-sdk-version" to "9.0.0", "x-appwrite-response-format" to "1.7.0", ) From 928d9cedc8c1ec71b6d9cfffc3c20ad85a0c33ed Mon Sep 17 00:00:00 2001 From: Jake Barnby <jakeb994@gmail.com> Date: Fri, 18 Jul 2025 12:51:55 +1200 Subject: [PATCH 12/17] Add inc/dec --- README.md | 6 +- .../java/databases/create-document.md | 1 + .../databases/decrement-document-attribute.md | 28 ++ .../databases/increment-document-attribute.md | 28 ++ .../java/databases/upsert-document.md | 27 ++ .../java/databases/upsert-documents.md | 2 +- .../kotlin/databases/create-document.md | 1 + .../databases/decrement-document-attribute.md | 19 ++ .../databases/increment-document-attribute.md | 19 ++ .../kotlin/databases/upsert-document.md | 18 ++ .../kotlin/databases/upsert-documents.md | 2 +- src/main/kotlin/io/appwrite/Client.kt | 4 +- .../kotlin/io/appwrite/enums/BuildRuntime.kt | 6 +- .../kotlin/io/appwrite/enums/ImageFormat.kt | 4 +- src/main/kotlin/io/appwrite/enums/Runtime.kt | 6 +- .../io/appwrite/models/AttributeString.kt | 8 + .../kotlin/io/appwrite/models/Document.kt | 10 + .../kotlin/io/appwrite/services/Databases.kt | 250 +++++++++++++++++- .../kotlin/io/appwrite/services/Tokens.kt | 2 +- src/main/kotlin/io/appwrite/services/Users.kt | 2 +- 20 files changed, 419 insertions(+), 24 deletions(-) create mode 100644 docs/examples/java/databases/decrement-document-attribute.md create mode 100644 docs/examples/java/databases/increment-document-attribute.md create mode 100644 docs/examples/java/databases/upsert-document.md create mode 100644 docs/examples/kotlin/databases/decrement-document-attribute.md create mode 100644 docs/examples/kotlin/databases/increment-document-attribute.md create mode 100644 docs/examples/kotlin/databases/upsert-document.md diff --git a/README.md b/README.md index b9997e1..126160d 100644 --- a/README.md +++ b/README.md @@ -2,7 +2,7 @@ ![Maven Central](https://img.shields.io/maven-central/v/io.appwrite/sdk-for-kotlin.svg?color=green&style=flat-square) ![License](https://img.shields.io/github/license/appwrite/sdk-for-kotlin.svg?style=flat-square) -![Version](https://img.shields.io/badge/api%20version-1.7.0-blue.svg?style=flat-square) +![Version](https://img.shields.io/badge/api%20version-1.7.4-blue.svg?style=flat-square) [![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) @@ -39,7 +39,7 @@ repositories { Next, add the dependency to your project's `build.gradle(.kts)` file: ```groovy -implementation("io.appwrite:sdk-for-kotlin:9.0.0") +implementation("io.appwrite:sdk-for-kotlin:9.1.0") ``` ### Maven @@ -50,7 +50,7 @@ Add this to your project's `pom.xml` file: <dependency> <groupId>io.appwrite</groupId> <artifactId>sdk-for-kotlin</artifactId> - <version>9.0.0</version> + <version>9.1.0</version> </dependency> </dependencies> ``` diff --git a/docs/examples/java/databases/create-document.md b/docs/examples/java/databases/create-document.md index 368b816..c71bc61 100644 --- a/docs/examples/java/databases/create-document.md +++ b/docs/examples/java/databases/create-document.md @@ -4,6 +4,7 @@ import io.appwrite.services.Databases; Client client = new Client() .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setAdmin("") // .setSession("") // The user session to authenticate with .setKey("<YOUR_API_KEY>") // Your secret API key .setJWT("<YOUR_JWT>"); // Your secret JSON Web Token diff --git a/docs/examples/java/databases/decrement-document-attribute.md b/docs/examples/java/databases/decrement-document-attribute.md new file mode 100644 index 0000000..34b7472 --- /dev/null +++ b/docs/examples/java/databases/decrement-document-attribute.md @@ -0,0 +1,28 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Databases; + +Client client = new Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>"); // Your secret API key + +Databases databases = new Databases(client); + +databases.decrementDocumentAttribute( + "<DATABASE_ID>", // databaseId + "<COLLECTION_ID>", // collectionId + "<DOCUMENT_ID>", // documentId + "", // attribute + 0, // value (optional) + 0, // min (optional) + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); + }) +); + diff --git a/docs/examples/java/databases/increment-document-attribute.md b/docs/examples/java/databases/increment-document-attribute.md new file mode 100644 index 0000000..ca9c357 --- /dev/null +++ b/docs/examples/java/databases/increment-document-attribute.md @@ -0,0 +1,28 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Databases; + +Client client = new Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>"); // Your secret API key + +Databases databases = new Databases(client); + +databases.incrementDocumentAttribute( + "<DATABASE_ID>", // databaseId + "<COLLECTION_ID>", // collectionId + "<DOCUMENT_ID>", // documentId + "", // attribute + 0, // value (optional) + 0, // max (optional) + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); + }) +); + diff --git a/docs/examples/java/databases/upsert-document.md b/docs/examples/java/databases/upsert-document.md new file mode 100644 index 0000000..daa4414 --- /dev/null +++ b/docs/examples/java/databases/upsert-document.md @@ -0,0 +1,27 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Databases; + +Client client = new Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setSession(""); // The user session to authenticate with + +Databases databases = new Databases(client); + +databases.upsertDocument( + "<DATABASE_ID>", // databaseId + "<COLLECTION_ID>", // collectionId + "<DOCUMENT_ID>", // documentId + mapOf( "a" to "b" ), // data + listOf("read("any")"), // permissions (optional) + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); + }) +); + diff --git a/docs/examples/java/databases/upsert-documents.md b/docs/examples/java/databases/upsert-documents.md index e2f2a46..95e9a33 100644 --- a/docs/examples/java/databases/upsert-documents.md +++ b/docs/examples/java/databases/upsert-documents.md @@ -12,7 +12,7 @@ Databases databases = new Databases(client); databases.upsertDocuments( "<DATABASE_ID>", // databaseId "<COLLECTION_ID>", // collectionId - listOf(), // documents (optional) + listOf(), // documents new CoroutineCallback<>((result, error) -> { if (error != null) { error.printStackTrace(); diff --git a/docs/examples/kotlin/databases/create-document.md b/docs/examples/kotlin/databases/create-document.md index 93da01e..4c6d737 100644 --- a/docs/examples/kotlin/databases/create-document.md +++ b/docs/examples/kotlin/databases/create-document.md @@ -4,6 +4,7 @@ import io.appwrite.services.Databases val client = Client() .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setAdmin("") // .setSession("") // The user session to authenticate with .setKey("<YOUR_API_KEY>") // Your secret API key .setJWT("<YOUR_JWT>") // Your secret JSON Web Token diff --git a/docs/examples/kotlin/databases/decrement-document-attribute.md b/docs/examples/kotlin/databases/decrement-document-attribute.md new file mode 100644 index 0000000..05204d7 --- /dev/null +++ b/docs/examples/kotlin/databases/decrement-document-attribute.md @@ -0,0 +1,19 @@ +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Databases + +val client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +val databases = Databases(client) + +val response = databases.decrementDocumentAttribute( + databaseId = "<DATABASE_ID>", + collectionId = "<COLLECTION_ID>", + documentId = "<DOCUMENT_ID>", + attribute = "", + value = 0, // optional + min = 0 // optional +) diff --git a/docs/examples/kotlin/databases/increment-document-attribute.md b/docs/examples/kotlin/databases/increment-document-attribute.md new file mode 100644 index 0000000..40c1224 --- /dev/null +++ b/docs/examples/kotlin/databases/increment-document-attribute.md @@ -0,0 +1,19 @@ +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Databases + +val client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +val databases = Databases(client) + +val response = databases.incrementDocumentAttribute( + databaseId = "<DATABASE_ID>", + collectionId = "<COLLECTION_ID>", + documentId = "<DOCUMENT_ID>", + attribute = "", + value = 0, // optional + max = 0 // optional +) diff --git a/docs/examples/kotlin/databases/upsert-document.md b/docs/examples/kotlin/databases/upsert-document.md new file mode 100644 index 0000000..d8be0e1 --- /dev/null +++ b/docs/examples/kotlin/databases/upsert-document.md @@ -0,0 +1,18 @@ +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Databases + +val client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setSession("") // The user session to authenticate with + +val databases = Databases(client) + +val response = databases.upsertDocument( + databaseId = "<DATABASE_ID>", + collectionId = "<COLLECTION_ID>", + documentId = "<DOCUMENT_ID>", + data = mapOf( "a" to "b" ), + permissions = listOf("read("any")") // optional +) diff --git a/docs/examples/kotlin/databases/upsert-documents.md b/docs/examples/kotlin/databases/upsert-documents.md index 7459b38..ca861c6 100644 --- a/docs/examples/kotlin/databases/upsert-documents.md +++ b/docs/examples/kotlin/databases/upsert-documents.md @@ -12,5 +12,5 @@ val databases = Databases(client) val response = databases.upsertDocuments( databaseId = "<DATABASE_ID>", collectionId = "<COLLECTION_ID>", - documents = listOf() // optional + documents = listOf() ) diff --git a/src/main/kotlin/io/appwrite/Client.kt b/src/main/kotlin/io/appwrite/Client.kt index c7824ef..429131e 100644 --- a/src/main/kotlin/io/appwrite/Client.kt +++ b/src/main/kotlin/io/appwrite/Client.kt @@ -58,11 +58,11 @@ class Client @JvmOverloads constructor( init { headers = mutableMapOf( "content-type" to "application/json", - "user-agent" to "AppwriteKotlinSDK/9.0.0 ${System.getProperty("http.agent")}", + "user-agent" to "AppwriteKotlinSDK/9.1.0 ${System.getProperty("http.agent")}", "x-sdk-name" to "Kotlin", "x-sdk-platform" to "server", "x-sdk-language" to "kotlin", - "x-sdk-version" to "9.0.0", + "x-sdk-version" to "9.1.0", "x-appwrite-response-format" to "1.7.0", ) diff --git a/src/main/kotlin/io/appwrite/enums/BuildRuntime.kt b/src/main/kotlin/io/appwrite/enums/BuildRuntime.kt index 71d857d..daa1589 100644 --- a/src/main/kotlin/io/appwrite/enums/BuildRuntime.kt +++ b/src/main/kotlin/io/appwrite/enums/BuildRuntime.kt @@ -77,6 +77,8 @@ enum class BuildRuntime(val value: String) { DART_3_3("dart-3.3"), @SerializedName("dart-3.5") DART_3_5("dart-3.5"), + @SerializedName("dart-3.8") + DART_3_8("dart-3.8"), @SerializedName("dotnet-6.0") DOTNET_6_0("dotnet-6.0"), @SerializedName("dotnet-7.0") @@ -128,7 +130,9 @@ enum class BuildRuntime(val value: String) { @SerializedName("flutter-3.27") FLUTTER_3_27("flutter-3.27"), @SerializedName("flutter-3.29") - FLUTTER_3_29("flutter-3.29"); + FLUTTER_3_29("flutter-3.29"), + @SerializedName("flutter-3.32") + FLUTTER_3_32("flutter-3.32"); override fun toString() = value } \ No newline at end of file diff --git a/src/main/kotlin/io/appwrite/enums/ImageFormat.kt b/src/main/kotlin/io/appwrite/enums/ImageFormat.kt index c3dea06..8e74806 100644 --- a/src/main/kotlin/io/appwrite/enums/ImageFormat.kt +++ b/src/main/kotlin/io/appwrite/enums/ImageFormat.kt @@ -14,7 +14,9 @@ enum class ImageFormat(val value: String) { @SerializedName("heic") HEIC("heic"), @SerializedName("avif") - AVIF("avif"); + AVIF("avif"), + @SerializedName("gif") + GIF("gif"); override fun toString() = value } \ No newline at end of file diff --git a/src/main/kotlin/io/appwrite/enums/Runtime.kt b/src/main/kotlin/io/appwrite/enums/Runtime.kt index dd65f3e..084811e 100644 --- a/src/main/kotlin/io/appwrite/enums/Runtime.kt +++ b/src/main/kotlin/io/appwrite/enums/Runtime.kt @@ -77,6 +77,8 @@ enum class Runtime(val value: String) { DART_3_3("dart-3.3"), @SerializedName("dart-3.5") DART_3_5("dart-3.5"), + @SerializedName("dart-3.8") + DART_3_8("dart-3.8"), @SerializedName("dotnet-6.0") DOTNET_6_0("dotnet-6.0"), @SerializedName("dotnet-7.0") @@ -128,7 +130,9 @@ enum class Runtime(val value: String) { @SerializedName("flutter-3.27") FLUTTER_3_27("flutter-3.27"), @SerializedName("flutter-3.29") - FLUTTER_3_29("flutter-3.29"); + FLUTTER_3_29("flutter-3.29"), + @SerializedName("flutter-3.32") + FLUTTER_3_32("flutter-3.32"); override fun toString() = value } \ No newline at end of file diff --git a/src/main/kotlin/io/appwrite/models/AttributeString.kt b/src/main/kotlin/io/appwrite/models/AttributeString.kt index efae2ba..161d7b8 100644 --- a/src/main/kotlin/io/appwrite/models/AttributeString.kt +++ b/src/main/kotlin/io/appwrite/models/AttributeString.kt @@ -67,6 +67,12 @@ data class AttributeString( @SerializedName("default") var default: String?, + /** + * Defines whether this attribute is encrypted or not. + */ + @SerializedName("encrypt") + var encrypt: Boolean?, + ) { fun toMap(): Map<String, Any> = mapOf( "key" to key as Any, @@ -79,6 +85,7 @@ data class AttributeString( "\$updatedAt" to updatedAt as Any, "size" to size as Any, "default" to default as Any, + "encrypt" to encrypt as Any, ) companion object { @@ -97,6 +104,7 @@ data class AttributeString( updatedAt = map["\$updatedAt"] as String, size = (map["size"] as Number).toLong(), default = map["default"] as? String?, + encrypt = map["encrypt"] as? Boolean?, ) } } \ No newline at end of file diff --git a/src/main/kotlin/io/appwrite/models/Document.kt b/src/main/kotlin/io/appwrite/models/Document.kt index 01204de..c0dfe61 100644 --- a/src/main/kotlin/io/appwrite/models/Document.kt +++ b/src/main/kotlin/io/appwrite/models/Document.kt @@ -13,6 +13,12 @@ data class Document<T>( @SerializedName("\$id") val id: String, + /** + * Document automatically incrementing ID. + */ + @SerializedName("\$sequence") + val sequence: Long, + /** * Collection ID. */ @@ -51,6 +57,7 @@ data class Document<T>( ) { fun toMap(): Map<String, Any> = mapOf( "\$id" to id as Any, + "\$sequence" to sequence as Any, "\$collectionId" to collectionId as Any, "\$databaseId" to databaseId as Any, "\$createdAt" to createdAt as Any, @@ -62,6 +69,7 @@ data class Document<T>( companion object { operator fun invoke( id: String, + sequence: Long, collectionId: String, databaseId: String, createdAt: String, @@ -70,6 +78,7 @@ data class Document<T>( data: Map<String, Any> ) = Document<Map<String, Any>>( id, + sequence, collectionId, databaseId, createdAt, @@ -84,6 +93,7 @@ data class Document<T>( nestedType: Class<T> ) = Document<T>( id = map["\$id"] as String, + sequence = (map["\$sequence"] as Number).toLong(), collectionId = map["\$collectionId"] as String, databaseId = map["\$databaseId"] as String, createdAt = map["\$createdAt"] as String, diff --git a/src/main/kotlin/io/appwrite/services/Databases.kt b/src/main/kotlin/io/appwrite/services/Databases.kt index 143e829..6c57ede 100644 --- a/src/main/kotlin/io/appwrite/services/Databases.kt +++ b/src/main/kotlin/io/appwrite/services/Databases.kt @@ -1590,7 +1590,7 @@ class Databases(client: Client) : Service(client) { ) /** - * Create new Documents. Before using this route, you should create a new collection resource using either a [server integration](https://appwrite.io/docs/server/databases#databasesCreateCollection) API or directly from your database console. + * **WARNING: Experimental Feature** - This endpoint is experimental and not yet officially supported. It may be subject to breaking changes or removal in future versions.Create new Documents. Before using this route, you should create a new collection resource using either a [server integration](https://appwrite.io/docs/server/databases#databasesCreateCollection) API or directly from your database console. * * @param databaseId Database ID. * @param collectionId Collection ID. You can create a new collection using the Database service [server integration](https://appwrite.io/docs/server/databases#databasesCreateCollection). Make sure to define attributes before creating documents. @@ -1628,7 +1628,7 @@ class Databases(client: Client) : Service(client) { } /** - * Create new Documents. Before using this route, you should create a new collection resource using either a [server integration](https://appwrite.io/docs/server/databases#databasesCreateCollection) API or directly from your database console. + * **WARNING: Experimental Feature** - This endpoint is experimental and not yet officially supported. It may be subject to breaking changes or removal in future versions.Create new Documents. Before using this route, you should create a new collection resource using either a [server integration](https://appwrite.io/docs/server/databases#databasesCreateCollection) API or directly from your database console. * * @param databaseId Database ID. * @param collectionId Collection ID. You can create a new collection using the Database service [server integration](https://appwrite.io/docs/server/databases#databasesCreateCollection). Make sure to define attributes before creating documents. @@ -1648,19 +1648,18 @@ class Databases(client: Client) : Service(client) { ) /** - * Create or update Documents. Before using this route, you should create a new collection resource using either a [server integration](https://appwrite.io/docs/server/databases#databasesCreateCollection) API or directly from your database console. + * **WARNING: Experimental Feature** - This endpoint is experimental and not yet officially supported. It may be subject to breaking changes or removal in future versions.Create or update Documents. Before using this route, you should create a new collection resource using either a [server integration](https://appwrite.io/docs/server/databases#databasesCreateCollection) API or directly from your database console. * * @param databaseId Database ID. * @param collectionId Collection ID. * @param documents Array of document data as JSON objects. May contain partial documents. * @return [io.appwrite.models.DocumentList<T>] */ - @JvmOverloads @Throws(AppwriteException::class) suspend fun <T> upsertDocuments( databaseId: String, collectionId: String, - documents: List<Any>? = null, + documents: List<Any>, nestedType: Class<T>, ): io.appwrite.models.DocumentList<T> { val apiPath = "/databases/{databaseId}/collections/{collectionId}/documents" @@ -1687,19 +1686,18 @@ class Databases(client: Client) : Service(client) { } /** - * Create or update Documents. Before using this route, you should create a new collection resource using either a [server integration](https://appwrite.io/docs/server/databases#databasesCreateCollection) API or directly from your database console. + * **WARNING: Experimental Feature** - This endpoint is experimental and not yet officially supported. It may be subject to breaking changes or removal in future versions.Create or update Documents. Before using this route, you should create a new collection resource using either a [server integration](https://appwrite.io/docs/server/databases#databasesCreateCollection) API or directly from your database console. * * @param databaseId Database ID. * @param collectionId Collection ID. * @param documents Array of document data as JSON objects. May contain partial documents. * @return [io.appwrite.models.DocumentList<T>] */ - @JvmOverloads @Throws(AppwriteException::class) suspend fun upsertDocuments( databaseId: String, collectionId: String, - documents: List<Any>? = null, + documents: List<Any>, ): io.appwrite.models.DocumentList<Map<String, Any>> = upsertDocuments( databaseId, collectionId, @@ -1708,7 +1706,7 @@ class Databases(client: Client) : Service(client) { ) /** - * Update all documents that match your queries, if no queries are submitted then all documents are updated. You can pass only specific fields to be updated. + * **WARNING: Experimental Feature** - This endpoint is experimental and not yet officially supported. It may be subject to breaking changes or removal in future versions.Update all documents that match your queries, if no queries are submitted then all documents are updated. You can pass only specific fields to be updated. * * @param databaseId Database ID. * @param collectionId Collection ID. @@ -1750,7 +1748,7 @@ class Databases(client: Client) : Service(client) { } /** - * Update all documents that match your queries, if no queries are submitted then all documents are updated. You can pass only specific fields to be updated. + * **WARNING: Experimental Feature** - This endpoint is experimental and not yet officially supported. It may be subject to breaking changes or removal in future versions.Update all documents that match your queries, if no queries are submitted then all documents are updated. You can pass only specific fields to be updated. * * @param databaseId Database ID. * @param collectionId Collection ID. @@ -1774,7 +1772,7 @@ class Databases(client: Client) : Service(client) { ) /** - * Bulk delete documents using queries, if no queries are passed then all documents are deleted. + * **WARNING: Experimental Feature** - This endpoint is experimental and not yet officially supported. It may be subject to breaking changes or removal in future versions.Bulk delete documents using queries, if no queries are passed then all documents are deleted. * * @param databaseId Database ID. * @param collectionId Collection ID. You can create a new collection using the Database service [server integration](https://appwrite.io/docs/server/databases#databasesCreateCollection). @@ -1813,7 +1811,7 @@ class Databases(client: Client) : Service(client) { } /** - * Bulk delete documents using queries, if no queries are passed then all documents are deleted. + * **WARNING: Experimental Feature** - This endpoint is experimental and not yet officially supported. It may be subject to breaking changes or removal in future versions.Bulk delete documents using queries, if no queries are passed then all documents are deleted. * * @param databaseId Database ID. * @param collectionId Collection ID. You can create a new collection using the Database service [server integration](https://appwrite.io/docs/server/databases#databasesCreateCollection). @@ -1898,6 +1896,78 @@ class Databases(client: Client) : Service(client) { nestedType = classOf(), ) + /** + * **WARNING: Experimental Feature** - This endpoint is experimental and not yet officially supported. It may be subject to breaking changes or removal in future versions.Create or update a Document. Before using this route, you should create a new collection resource using either a [server integration](https://appwrite.io/docs/server/databases#databasesCreateCollection) API or directly from your database console. + * + * @param databaseId Database ID. + * @param collectionId Collection ID. + * @param documentId Document ID. + * @param data Document data as JSON object. Include all required attributes of the document to be created or updated. + * @param permissions An array of permissions strings. By default, the current permissions are inherited. [Learn more about permissions](https://appwrite.io/docs/permissions). + * @return [io.appwrite.models.Document<T>] + */ + @JvmOverloads + @Throws(AppwriteException::class) + suspend fun <T> upsertDocument( + databaseId: String, + collectionId: String, + documentId: String, + data: Any, + permissions: List<String>? = null, + nestedType: Class<T>, + ): io.appwrite.models.Document<T> { + val apiPath = "/databases/{databaseId}/collections/{collectionId}/documents/{documentId}" + .replace("{databaseId}", databaseId) + .replace("{collectionId}", collectionId) + .replace("{documentId}", documentId) + + val apiParams = mutableMapOf<String, Any?>( + "data" to data, + "permissions" to permissions, + ) + val apiHeaders = mutableMapOf<String, String>( + "content-type" to "application/json", + ) + val converter: (Any) -> io.appwrite.models.Document<T> = { + io.appwrite.models.Document.from(map = it as Map<String, Any>, nestedType) + } + return client.call( + "PUT", + apiPath, + apiHeaders, + apiParams, + responseType = classOf(), + converter, + ) + } + + /** + * **WARNING: Experimental Feature** - This endpoint is experimental and not yet officially supported. It may be subject to breaking changes or removal in future versions.Create or update a Document. Before using this route, you should create a new collection resource using either a [server integration](https://appwrite.io/docs/server/databases#databasesCreateCollection) API or directly from your database console. + * + * @param databaseId Database ID. + * @param collectionId Collection ID. + * @param documentId Document ID. + * @param data Document data as JSON object. Include all required attributes of the document to be created or updated. + * @param permissions An array of permissions strings. By default, the current permissions are inherited. [Learn more about permissions](https://appwrite.io/docs/permissions). + * @return [io.appwrite.models.Document<T>] + */ + @JvmOverloads + @Throws(AppwriteException::class) + suspend fun upsertDocument( + databaseId: String, + collectionId: String, + documentId: String, + data: Any, + permissions: List<String>? = null, + ): io.appwrite.models.Document<Map<String, Any>> = upsertDocument( + databaseId, + collectionId, + documentId, + data, + permissions, + nestedType = classOf(), + ) + /** * Update a document by its unique ID. Using the patch method you can pass only specific fields that will get updated. * @@ -2003,6 +2073,162 @@ class Databases(client: Client) : Service(client) { ) } + /** + * Decrement a specific attribute of a document by a given value. + * + * @param databaseId Database ID. + * @param collectionId Collection ID. + * @param documentId Document ID. + * @param attribute Attribute key. + * @param value Value to decrement the attribute by. The value must be a number. + * @param min Minimum value for the attribute. If the current value is lesser than this value, an exception will be thrown. + * @return [io.appwrite.models.Document<T>] + */ + @JvmOverloads + @Throws(AppwriteException::class) + suspend fun <T> decrementDocumentAttribute( + databaseId: String, + collectionId: String, + documentId: String, + attribute: String, + value: Double? = null, + min: Double? = null, + nestedType: Class<T>, + ): io.appwrite.models.Document<T> { + val apiPath = "/databases/{databaseId}/collections/{collectionId}/documents/{documentId}/{attribute}/decrement" + .replace("{databaseId}", databaseId) + .replace("{collectionId}", collectionId) + .replace("{documentId}", documentId) + .replace("{attribute}", attribute) + + val apiParams = mutableMapOf<String, Any?>( + "value" to value, + "min" to min, + ) + val apiHeaders = mutableMapOf<String, String>( + "content-type" to "application/json", + ) + val converter: (Any) -> io.appwrite.models.Document<T> = { + io.appwrite.models.Document.from(map = it as Map<String, Any>, nestedType) + } + return client.call( + "PATCH", + apiPath, + apiHeaders, + apiParams, + responseType = classOf(), + converter, + ) + } + + /** + * Decrement a specific attribute of a document by a given value. + * + * @param databaseId Database ID. + * @param collectionId Collection ID. + * @param documentId Document ID. + * @param attribute Attribute key. + * @param value Value to decrement the attribute by. The value must be a number. + * @param min Minimum value for the attribute. If the current value is lesser than this value, an exception will be thrown. + * @return [io.appwrite.models.Document<T>] + */ + @JvmOverloads + @Throws(AppwriteException::class) + suspend fun decrementDocumentAttribute( + databaseId: String, + collectionId: String, + documentId: String, + attribute: String, + value: Double? = null, + min: Double? = null, + ): io.appwrite.models.Document<Map<String, Any>> = decrementDocumentAttribute( + databaseId, + collectionId, + documentId, + attribute, + value, + min, + nestedType = classOf(), + ) + + /** + * Increment a specific attribute of a document by a given value. + * + * @param databaseId Database ID. + * @param collectionId Collection ID. + * @param documentId Document ID. + * @param attribute Attribute key. + * @param value Value to increment the attribute by. The value must be a number. + * @param max Maximum value for the attribute. If the current value is greater than this value, an error will be thrown. + * @return [io.appwrite.models.Document<T>] + */ + @JvmOverloads + @Throws(AppwriteException::class) + suspend fun <T> incrementDocumentAttribute( + databaseId: String, + collectionId: String, + documentId: String, + attribute: String, + value: Double? = null, + max: Double? = null, + nestedType: Class<T>, + ): io.appwrite.models.Document<T> { + val apiPath = "/databases/{databaseId}/collections/{collectionId}/documents/{documentId}/{attribute}/increment" + .replace("{databaseId}", databaseId) + .replace("{collectionId}", collectionId) + .replace("{documentId}", documentId) + .replace("{attribute}", attribute) + + val apiParams = mutableMapOf<String, Any?>( + "value" to value, + "max" to max, + ) + val apiHeaders = mutableMapOf<String, String>( + "content-type" to "application/json", + ) + val converter: (Any) -> io.appwrite.models.Document<T> = { + io.appwrite.models.Document.from(map = it as Map<String, Any>, nestedType) + } + return client.call( + "PATCH", + apiPath, + apiHeaders, + apiParams, + responseType = classOf(), + converter, + ) + } + + /** + * Increment a specific attribute of a document by a given value. + * + * @param databaseId Database ID. + * @param collectionId Collection ID. + * @param documentId Document ID. + * @param attribute Attribute key. + * @param value Value to increment the attribute by. The value must be a number. + * @param max Maximum value for the attribute. If the current value is greater than this value, an error will be thrown. + * @return [io.appwrite.models.Document<T>] + */ + @JvmOverloads + @Throws(AppwriteException::class) + suspend fun incrementDocumentAttribute( + databaseId: String, + collectionId: String, + documentId: String, + attribute: String, + value: Double? = null, + max: Double? = null, + ): io.appwrite.models.Document<Map<String, Any>> = incrementDocumentAttribute( + databaseId, + collectionId, + documentId, + attribute, + value, + max, + nestedType = classOf(), + ) + /** * List indexes in the collection. * diff --git a/src/main/kotlin/io/appwrite/services/Tokens.kt b/src/main/kotlin/io/appwrite/services/Tokens.kt index 059595a..7e485bd 100644 --- a/src/main/kotlin/io/appwrite/services/Tokens.kt +++ b/src/main/kotlin/io/appwrite/services/Tokens.kt @@ -51,7 +51,7 @@ class Tokens(client: Client) : Service(client) { } /** - * Create a new token. A token is linked to a file. Token can be passed as a header or request get parameter. + * Create a new token. A token is linked to a file. Token can be passed as a request URL search parameter. * * @param bucketId Storage bucket unique ID. You can create a new storage bucket using the Storage service [server integration](https://appwrite.io/docs/server/storage#createBucket). * @param fileId File unique ID. diff --git a/src/main/kotlin/io/appwrite/services/Users.kt b/src/main/kotlin/io/appwrite/services/Users.kt index c98fd79..549e858 100644 --- a/src/main/kotlin/io/appwrite/services/Users.kt +++ b/src/main/kotlin/io/appwrite/services/Users.kt @@ -1631,7 +1631,7 @@ class Users(client: Client) : Service(client) { * List the messaging targets that are associated with a user. * * @param userId User ID. - * @param queries Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https://appwrite.io/docs/queries). Maximum of 100 queries are allowed, each 4096 characters long. You may filter on the following attributes: name, email, phone, status, passwordUpdate, registration, emailVerification, phoneVerification, labels + * @param queries Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https://appwrite.io/docs/queries). Maximum of 100 queries are allowed, each 4096 characters long. You may filter on the following attributes: userId, providerId, identifier, providerType * @return [io.appwrite.models.TargetList] */ @JvmOverloads From 6f0f887c3b3716db74f129b11709493827258f84 Mon Sep 17 00:00:00 2001 From: root <chiragaggarwal5k@gmail.com> Date: Tue, 22 Jul 2025 16:18:10 +0000 Subject: [PATCH 13/17] chore: regenerate --- README.md | 8 +- .../java/databases/create-document.md | 1 - .../java/databases/create-documents.md | 1 + .../java/databases/upsert-document.md | 7 +- .../java/databases/upsert-documents.md | 3 +- .../java/tables/create-boolean-column.md | 28 + .../java/tables/create-datetime-column.md | 28 + .../java/tables/create-email-column.md | 28 + .../java/tables/create-enum-column.md | 29 + .../java/tables/create-float-column.md | 30 + docs/examples/java/tables/create-index.md | 30 + .../java/tables/create-integer-column.md | 30 + docs/examples/java/tables/create-ip-column.md | 28 + .../java/tables/create-relationship-column.md | 31 + docs/examples/java/tables/create-row.md | 28 + docs/examples/java/tables/create-rows.md | 25 + .../java/tables/create-string-column.md | 30 + .../examples/java/tables/create-url-column.md | 28 + docs/examples/java/tables/create.md | 28 + .../java/tables/decrement-row-column.md | 28 + docs/examples/java/tables/delete-column.md | 25 + docs/examples/java/tables/delete-index.md | 25 + docs/examples/java/tables/delete-row.md | 25 + docs/examples/java/tables/delete-rows.md | 25 + docs/examples/java/tables/delete.md | 24 + docs/examples/java/tables/get-column.md | 25 + docs/examples/java/tables/get-index.md | 25 + docs/examples/java/tables/get-row.md | 26 + docs/examples/java/tables/get.md | 24 + .../java/tables/increment-row-column.md | 28 + docs/examples/java/tables/list-columns.md | 25 + docs/examples/java/tables/list-indexes.md | 25 + docs/examples/java/tables/list-rows.md | 25 + docs/examples/java/tables/list.md | 25 + .../java/tables/update-boolean-column.md | 28 + .../java/tables/update-datetime-column.md | 28 + .../java/tables/update-email-column.md | 28 + .../java/tables/update-enum-column.md | 29 + .../java/tables/update-float-column.md | 30 + .../java/tables/update-integer-column.md | 30 + docs/examples/java/tables/update-ip-column.md | 28 + .../java/tables/update-relationship-column.md | 27 + docs/examples/java/tables/update-row.md | 27 + docs/examples/java/tables/update-rows.md | 26 + .../java/tables/update-string-column.md | 29 + .../examples/java/tables/update-url-column.md | 28 + docs/examples/java/tables/update.md | 28 + docs/examples/java/tables/upsert-row.md | 26 + docs/examples/java/tables/upsert-rows.md | 24 + .../kotlin/databases/create-document.md | 1 - .../kotlin/databases/create-documents.md | 1 + .../kotlin/databases/upsert-document.md | 7 +- .../kotlin/databases/upsert-documents.md | 5 +- .../kotlin/tables/create-boolean-column.md | 19 + .../kotlin/tables/create-datetime-column.md | 19 + .../kotlin/tables/create-email-column.md | 19 + .../kotlin/tables/create-enum-column.md | 20 + .../kotlin/tables/create-float-column.md | 21 + docs/examples/kotlin/tables/create-index.md | 21 + .../kotlin/tables/create-integer-column.md | 21 + .../kotlin/tables/create-ip-column.md | 19 + .../tables/create-relationship-column.md | 22 + docs/examples/kotlin/tables/create-row.md | 19 + docs/examples/kotlin/tables/create-rows.md | 16 + .../kotlin/tables/create-string-column.md | 21 + .../kotlin/tables/create-url-column.md | 19 + docs/examples/kotlin/tables/create.md | 19 + .../kotlin/tables/decrement-row-column.md | 19 + docs/examples/kotlin/tables/delete-column.md | 16 + docs/examples/kotlin/tables/delete-index.md | 16 + docs/examples/kotlin/tables/delete-row.md | 16 + docs/examples/kotlin/tables/delete-rows.md | 16 + docs/examples/kotlin/tables/delete.md | 15 + docs/examples/kotlin/tables/get-column.md | 16 + docs/examples/kotlin/tables/get-index.md | 16 + docs/examples/kotlin/tables/get-row.md | 17 + docs/examples/kotlin/tables/get.md | 15 + .../kotlin/tables/increment-row-column.md | 19 + docs/examples/kotlin/tables/list-columns.md | 16 + docs/examples/kotlin/tables/list-indexes.md | 16 + docs/examples/kotlin/tables/list-rows.md | 16 + docs/examples/kotlin/tables/list.md | 16 + .../kotlin/tables/update-boolean-column.md | 19 + .../kotlin/tables/update-datetime-column.md | 19 + .../kotlin/tables/update-email-column.md | 19 + .../kotlin/tables/update-enum-column.md | 20 + .../kotlin/tables/update-float-column.md | 21 + .../kotlin/tables/update-integer-column.md | 21 + .../kotlin/tables/update-ip-column.md | 19 + .../tables/update-relationship-column.md | 18 + docs/examples/kotlin/tables/update-row.md | 18 + docs/examples/kotlin/tables/update-rows.md | 17 + .../kotlin/tables/update-string-column.md | 20 + .../kotlin/tables/update-url-column.md | 19 + docs/examples/kotlin/tables/update.md | 19 + docs/examples/kotlin/tables/upsert-row.md | 17 + docs/examples/kotlin/tables/upsert-rows.md | 15 + src/main/kotlin/io/appwrite/Client.kt | 6 +- .../kotlin/io/appwrite/models/BucketList.kt | 2 +- .../io/appwrite/models/CollectionList.kt | 2 +- .../io/appwrite/models/ColumnBoolean.kt | 94 + .../io/appwrite/models/ColumnDatetime.kt | 102 + .../kotlin/io/appwrite/models/ColumnEmail.kt | 102 + .../kotlin/io/appwrite/models/ColumnEnum.kt | 110 + .../kotlin/io/appwrite/models/ColumnFloat.kt | 110 + .../kotlin/io/appwrite/models/ColumnIndex.kt | 94 + .../io/appwrite/models/ColumnIndexList.kt | 38 + .../io/appwrite/models/ColumnInteger.kt | 110 + .../kotlin/io/appwrite/models/ColumnIp.kt | 102 + .../kotlin/io/appwrite/models/ColumnList.kt | 38 + .../io/appwrite/models/ColumnRelationship.kt | 134 + .../kotlin/io/appwrite/models/ColumnString.kt | 110 + .../kotlin/io/appwrite/models/ColumnUrl.kt | 102 + .../io/appwrite/models/ContinentList.kt | 2 +- .../kotlin/io/appwrite/models/CountryList.kt | 2 +- .../kotlin/io/appwrite/models/CurrencyList.kt | 2 +- .../kotlin/io/appwrite/models/DatabaseList.kt | 2 +- .../io/appwrite/models/DeploymentList.kt | 2 +- .../kotlin/io/appwrite/models/DocumentList.kt | 2 +- .../io/appwrite/models/ExecutionList.kt | 2 +- .../kotlin/io/appwrite/models/FileList.kt | 2 +- .../io/appwrite/models/FrameworkList.kt | 2 +- .../kotlin/io/appwrite/models/FunctionList.kt | 2 +- .../kotlin/io/appwrite/models/IdentityList.kt | 2 +- .../kotlin/io/appwrite/models/IndexList.kt | 2 +- .../kotlin/io/appwrite/models/LanguageList.kt | 2 +- .../io/appwrite/models/LocaleCodeList.kt | 2 +- src/main/kotlin/io/appwrite/models/LogList.kt | 2 +- .../io/appwrite/models/MembershipList.kt | 2 +- .../kotlin/io/appwrite/models/MessageList.kt | 2 +- .../kotlin/io/appwrite/models/PhoneList.kt | 2 +- .../kotlin/io/appwrite/models/ProviderList.kt | 2 +- .../io/appwrite/models/ResourceTokenList.kt | 2 +- src/main/kotlin/io/appwrite/models/Row.kt | 105 + src/main/kotlin/io/appwrite/models/RowList.kt | 46 + .../kotlin/io/appwrite/models/RuntimeList.kt | 2 +- .../kotlin/io/appwrite/models/SessionList.kt | 2 +- .../kotlin/io/appwrite/models/SiteList.kt | 2 +- .../io/appwrite/models/SpecificationList.kt | 2 +- .../io/appwrite/models/SubscriberList.kt | 2 +- src/main/kotlin/io/appwrite/models/Table.kt | 102 + .../kotlin/io/appwrite/models/TableList.kt | 38 + .../kotlin/io/appwrite/models/TargetList.kt | 2 +- .../kotlin/io/appwrite/models/TeamList.kt | 2 +- .../kotlin/io/appwrite/models/TopicList.kt | 2 +- .../kotlin/io/appwrite/models/UserList.kt | 2 +- .../kotlin/io/appwrite/models/VariableList.kt | 2 +- .../kotlin/io/appwrite/services/Account.kt | 6 + .../kotlin/io/appwrite/services/Databases.kt | 397 ++- .../kotlin/io/appwrite/services/Tables.kt | 2201 +++++++++++++++++ 150 files changed, 6118 insertions(+), 125 deletions(-) create mode 100644 docs/examples/java/tables/create-boolean-column.md create mode 100644 docs/examples/java/tables/create-datetime-column.md create mode 100644 docs/examples/java/tables/create-email-column.md create mode 100644 docs/examples/java/tables/create-enum-column.md create mode 100644 docs/examples/java/tables/create-float-column.md create mode 100644 docs/examples/java/tables/create-index.md create mode 100644 docs/examples/java/tables/create-integer-column.md create mode 100644 docs/examples/java/tables/create-ip-column.md create mode 100644 docs/examples/java/tables/create-relationship-column.md create mode 100644 docs/examples/java/tables/create-row.md create mode 100644 docs/examples/java/tables/create-rows.md create mode 100644 docs/examples/java/tables/create-string-column.md create mode 100644 docs/examples/java/tables/create-url-column.md create mode 100644 docs/examples/java/tables/create.md create mode 100644 docs/examples/java/tables/decrement-row-column.md create mode 100644 docs/examples/java/tables/delete-column.md create mode 100644 docs/examples/java/tables/delete-index.md create mode 100644 docs/examples/java/tables/delete-row.md create mode 100644 docs/examples/java/tables/delete-rows.md create mode 100644 docs/examples/java/tables/delete.md create mode 100644 docs/examples/java/tables/get-column.md create mode 100644 docs/examples/java/tables/get-index.md create mode 100644 docs/examples/java/tables/get-row.md create mode 100644 docs/examples/java/tables/get.md create mode 100644 docs/examples/java/tables/increment-row-column.md create mode 100644 docs/examples/java/tables/list-columns.md create mode 100644 docs/examples/java/tables/list-indexes.md create mode 100644 docs/examples/java/tables/list-rows.md create mode 100644 docs/examples/java/tables/list.md create mode 100644 docs/examples/java/tables/update-boolean-column.md create mode 100644 docs/examples/java/tables/update-datetime-column.md create mode 100644 docs/examples/java/tables/update-email-column.md create mode 100644 docs/examples/java/tables/update-enum-column.md create mode 100644 docs/examples/java/tables/update-float-column.md create mode 100644 docs/examples/java/tables/update-integer-column.md create mode 100644 docs/examples/java/tables/update-ip-column.md create mode 100644 docs/examples/java/tables/update-relationship-column.md create mode 100644 docs/examples/java/tables/update-row.md create mode 100644 docs/examples/java/tables/update-rows.md create mode 100644 docs/examples/java/tables/update-string-column.md create mode 100644 docs/examples/java/tables/update-url-column.md create mode 100644 docs/examples/java/tables/update.md create mode 100644 docs/examples/java/tables/upsert-row.md create mode 100644 docs/examples/java/tables/upsert-rows.md create mode 100644 docs/examples/kotlin/tables/create-boolean-column.md create mode 100644 docs/examples/kotlin/tables/create-datetime-column.md create mode 100644 docs/examples/kotlin/tables/create-email-column.md create mode 100644 docs/examples/kotlin/tables/create-enum-column.md create mode 100644 docs/examples/kotlin/tables/create-float-column.md create mode 100644 docs/examples/kotlin/tables/create-index.md create mode 100644 docs/examples/kotlin/tables/create-integer-column.md create mode 100644 docs/examples/kotlin/tables/create-ip-column.md create mode 100644 docs/examples/kotlin/tables/create-relationship-column.md create mode 100644 docs/examples/kotlin/tables/create-row.md create mode 100644 docs/examples/kotlin/tables/create-rows.md create mode 100644 docs/examples/kotlin/tables/create-string-column.md create mode 100644 docs/examples/kotlin/tables/create-url-column.md create mode 100644 docs/examples/kotlin/tables/create.md create mode 100644 docs/examples/kotlin/tables/decrement-row-column.md create mode 100644 docs/examples/kotlin/tables/delete-column.md create mode 100644 docs/examples/kotlin/tables/delete-index.md create mode 100644 docs/examples/kotlin/tables/delete-row.md create mode 100644 docs/examples/kotlin/tables/delete-rows.md create mode 100644 docs/examples/kotlin/tables/delete.md create mode 100644 docs/examples/kotlin/tables/get-column.md create mode 100644 docs/examples/kotlin/tables/get-index.md create mode 100644 docs/examples/kotlin/tables/get-row.md create mode 100644 docs/examples/kotlin/tables/get.md create mode 100644 docs/examples/kotlin/tables/increment-row-column.md create mode 100644 docs/examples/kotlin/tables/list-columns.md create mode 100644 docs/examples/kotlin/tables/list-indexes.md create mode 100644 docs/examples/kotlin/tables/list-rows.md create mode 100644 docs/examples/kotlin/tables/list.md create mode 100644 docs/examples/kotlin/tables/update-boolean-column.md create mode 100644 docs/examples/kotlin/tables/update-datetime-column.md create mode 100644 docs/examples/kotlin/tables/update-email-column.md create mode 100644 docs/examples/kotlin/tables/update-enum-column.md create mode 100644 docs/examples/kotlin/tables/update-float-column.md create mode 100644 docs/examples/kotlin/tables/update-integer-column.md create mode 100644 docs/examples/kotlin/tables/update-ip-column.md create mode 100644 docs/examples/kotlin/tables/update-relationship-column.md create mode 100644 docs/examples/kotlin/tables/update-row.md create mode 100644 docs/examples/kotlin/tables/update-rows.md create mode 100644 docs/examples/kotlin/tables/update-string-column.md create mode 100644 docs/examples/kotlin/tables/update-url-column.md create mode 100644 docs/examples/kotlin/tables/update.md create mode 100644 docs/examples/kotlin/tables/upsert-row.md create mode 100644 docs/examples/kotlin/tables/upsert-rows.md create mode 100644 src/main/kotlin/io/appwrite/models/ColumnBoolean.kt create mode 100644 src/main/kotlin/io/appwrite/models/ColumnDatetime.kt create mode 100644 src/main/kotlin/io/appwrite/models/ColumnEmail.kt create mode 100644 src/main/kotlin/io/appwrite/models/ColumnEnum.kt create mode 100644 src/main/kotlin/io/appwrite/models/ColumnFloat.kt create mode 100644 src/main/kotlin/io/appwrite/models/ColumnIndex.kt create mode 100644 src/main/kotlin/io/appwrite/models/ColumnIndexList.kt create mode 100644 src/main/kotlin/io/appwrite/models/ColumnInteger.kt create mode 100644 src/main/kotlin/io/appwrite/models/ColumnIp.kt create mode 100644 src/main/kotlin/io/appwrite/models/ColumnList.kt create mode 100644 src/main/kotlin/io/appwrite/models/ColumnRelationship.kt create mode 100644 src/main/kotlin/io/appwrite/models/ColumnString.kt create mode 100644 src/main/kotlin/io/appwrite/models/ColumnUrl.kt create mode 100644 src/main/kotlin/io/appwrite/models/Row.kt create mode 100644 src/main/kotlin/io/appwrite/models/RowList.kt create mode 100644 src/main/kotlin/io/appwrite/models/Table.kt create mode 100644 src/main/kotlin/io/appwrite/models/TableList.kt create mode 100644 src/main/kotlin/io/appwrite/services/Tables.kt diff --git a/README.md b/README.md index 126160d..72c5530 100644 --- a/README.md +++ b/README.md @@ -2,11 +2,11 @@ ![Maven Central](https://img.shields.io/maven-central/v/io.appwrite/sdk-for-kotlin.svg?color=green&style=flat-square) ![License](https://img.shields.io/github/license/appwrite/sdk-for-kotlin.svg?style=flat-square) -![Version](https://img.shields.io/badge/api%20version-1.7.4-blue.svg?style=flat-square) +![Version](https://img.shields.io/badge/api%20version-1.8.0-blue.svg?style=flat-square) [![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.7.x. For older versions, please check [previous releases](https://github.com/appwrite/sdk-for-kotlin/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-kotlin/releases).** > This is the Kotlin SDK for integrating with Appwrite from your Kotlin server-side code. If you're looking for the Android SDK you should check [appwrite/sdk-for-android](https://github.com/appwrite/sdk-for-android) @@ -39,7 +39,7 @@ repositories { Next, add the dependency to your project's `build.gradle(.kts)` file: ```groovy -implementation("io.appwrite:sdk-for-kotlin:9.1.0") +implementation("io.appwrite:sdk-for-kotlin:10.0.0") ``` ### Maven @@ -50,7 +50,7 @@ Add this to your project's `pom.xml` file: <dependency> <groupId>io.appwrite</groupId> <artifactId>sdk-for-kotlin</artifactId> - <version>9.1.0</version> + <version>10.0.0</version> </dependency> </dependencies> ``` diff --git a/docs/examples/java/databases/create-document.md b/docs/examples/java/databases/create-document.md index c71bc61..368b816 100644 --- a/docs/examples/java/databases/create-document.md +++ b/docs/examples/java/databases/create-document.md @@ -4,7 +4,6 @@ import io.appwrite.services.Databases; Client client = new Client() .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint - .setAdmin("") // .setSession("") // The user session to authenticate with .setKey("<YOUR_API_KEY>") // Your secret API key .setJWT("<YOUR_JWT>"); // Your secret JSON Web Token diff --git a/docs/examples/java/databases/create-documents.md b/docs/examples/java/databases/create-documents.md index d816af3..77d7981 100644 --- a/docs/examples/java/databases/create-documents.md +++ b/docs/examples/java/databases/create-documents.md @@ -4,6 +4,7 @@ import io.appwrite.services.Databases; Client client = new Client() .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setAdmin("") // .setKey("<YOUR_API_KEY>"); // Your secret API key Databases databases = new Databases(client); diff --git a/docs/examples/java/databases/upsert-document.md b/docs/examples/java/databases/upsert-document.md index daa4414..b1b4de4 100644 --- a/docs/examples/java/databases/upsert-document.md +++ b/docs/examples/java/databases/upsert-document.md @@ -4,8 +4,9 @@ import io.appwrite.services.Databases; Client client = new Client() .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint - .setProject("<YOUR_PROJECT_ID>") // Your project ID - .setSession(""); // The user session to authenticate with + .setSession("") // The user session to authenticate with + .setKey("<YOUR_API_KEY>") // Your secret API key + .setJWT("<YOUR_JWT>"); // Your secret JSON Web Token Databases databases = new Databases(client); @@ -13,8 +14,6 @@ databases.upsertDocument( "<DATABASE_ID>", // databaseId "<COLLECTION_ID>", // collectionId "<DOCUMENT_ID>", // documentId - mapOf( "a" to "b" ), // data - listOf("read("any")"), // permissions (optional) new CoroutineCallback<>((result, error) -> { if (error != null) { error.printStackTrace(); diff --git a/docs/examples/java/databases/upsert-documents.md b/docs/examples/java/databases/upsert-documents.md index 95e9a33..0bf0c17 100644 --- a/docs/examples/java/databases/upsert-documents.md +++ b/docs/examples/java/databases/upsert-documents.md @@ -4,7 +4,7 @@ import io.appwrite.services.Databases; Client client = new Client() .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint - .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setAdmin("") // .setKey("<YOUR_API_KEY>"); // Your secret API key Databases databases = new Databases(client); @@ -12,7 +12,6 @@ Databases databases = new Databases(client); databases.upsertDocuments( "<DATABASE_ID>", // databaseId "<COLLECTION_ID>", // collectionId - listOf(), // documents new CoroutineCallback<>((result, error) -> { if (error != null) { error.printStackTrace(); diff --git a/docs/examples/java/tables/create-boolean-column.md b/docs/examples/java/tables/create-boolean-column.md new file mode 100644 index 0000000..2336ee9 --- /dev/null +++ b/docs/examples/java/tables/create-boolean-column.md @@ -0,0 +1,28 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Tables; + +Client client = new Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>"); // Your secret API key + +Tables tables = new Tables(client); + +tables.createBooleanColumn( + "<DATABASE_ID>", // databaseId + "<TABLE_ID>", // tableId + "", // key + false, // required + false, // default (optional) + false, // array (optional) + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); + }) +); + diff --git a/docs/examples/java/tables/create-datetime-column.md b/docs/examples/java/tables/create-datetime-column.md new file mode 100644 index 0000000..dd3df83 --- /dev/null +++ b/docs/examples/java/tables/create-datetime-column.md @@ -0,0 +1,28 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Tables; + +Client client = new Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>"); // Your secret API key + +Tables tables = new Tables(client); + +tables.createDatetimeColumn( + "<DATABASE_ID>", // databaseId + "<TABLE_ID>", // tableId + "", // key + false, // required + "", // default (optional) + false, // array (optional) + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); + }) +); + diff --git a/docs/examples/java/tables/create-email-column.md b/docs/examples/java/tables/create-email-column.md new file mode 100644 index 0000000..3b130d1 --- /dev/null +++ b/docs/examples/java/tables/create-email-column.md @@ -0,0 +1,28 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Tables; + +Client client = new Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>"); // Your secret API key + +Tables tables = new Tables(client); + +tables.createEmailColumn( + "<DATABASE_ID>", // databaseId + "<TABLE_ID>", // tableId + "", // key + false, // required + "email@example.com", // default (optional) + false, // array (optional) + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); + }) +); + diff --git a/docs/examples/java/tables/create-enum-column.md b/docs/examples/java/tables/create-enum-column.md new file mode 100644 index 0000000..73c6e1c --- /dev/null +++ b/docs/examples/java/tables/create-enum-column.md @@ -0,0 +1,29 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Tables; + +Client client = new Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>"); // Your secret API key + +Tables tables = new Tables(client); + +tables.createEnumColumn( + "<DATABASE_ID>", // databaseId + "<TABLE_ID>", // tableId + "", // key + listOf(), // elements + false, // required + "<DEFAULT>", // default (optional) + false, // array (optional) + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); + }) +); + diff --git a/docs/examples/java/tables/create-float-column.md b/docs/examples/java/tables/create-float-column.md new file mode 100644 index 0000000..dd6f207 --- /dev/null +++ b/docs/examples/java/tables/create-float-column.md @@ -0,0 +1,30 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Tables; + +Client client = new Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>"); // Your secret API key + +Tables tables = new Tables(client); + +tables.createFloatColumn( + "<DATABASE_ID>", // databaseId + "<TABLE_ID>", // tableId + "", // key + false, // required + 0, // min (optional) + 0, // max (optional) + 0, // default (optional) + false, // array (optional) + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); + }) +); + diff --git a/docs/examples/java/tables/create-index.md b/docs/examples/java/tables/create-index.md new file mode 100644 index 0000000..2a4df00 --- /dev/null +++ b/docs/examples/java/tables/create-index.md @@ -0,0 +1,30 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Tables; +import io.appwrite.enums.IndexType; + +Client client = new Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>"); // Your secret API key + +Tables tables = new Tables(client); + +tables.createIndex( + "<DATABASE_ID>", // databaseId + "<TABLE_ID>", // tableId + "", // key + IndexType.KEY, // type + listOf(), // columns + listOf(), // orders (optional) + listOf(), // lengths (optional) + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); + }) +); + diff --git a/docs/examples/java/tables/create-integer-column.md b/docs/examples/java/tables/create-integer-column.md new file mode 100644 index 0000000..3546ac8 --- /dev/null +++ b/docs/examples/java/tables/create-integer-column.md @@ -0,0 +1,30 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Tables; + +Client client = new Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>"); // Your secret API key + +Tables tables = new Tables(client); + +tables.createIntegerColumn( + "<DATABASE_ID>", // databaseId + "<TABLE_ID>", // tableId + "", // key + false, // required + 0, // min (optional) + 0, // max (optional) + 0, // default (optional) + false, // array (optional) + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); + }) +); + diff --git a/docs/examples/java/tables/create-ip-column.md b/docs/examples/java/tables/create-ip-column.md new file mode 100644 index 0000000..825d8b0 --- /dev/null +++ b/docs/examples/java/tables/create-ip-column.md @@ -0,0 +1,28 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Tables; + +Client client = new Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>"); // Your secret API key + +Tables tables = new Tables(client); + +tables.createIpColumn( + "<DATABASE_ID>", // databaseId + "<TABLE_ID>", // tableId + "", // key + false, // required + "", // default (optional) + false, // array (optional) + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); + }) +); + diff --git a/docs/examples/java/tables/create-relationship-column.md b/docs/examples/java/tables/create-relationship-column.md new file mode 100644 index 0000000..7a0b50a --- /dev/null +++ b/docs/examples/java/tables/create-relationship-column.md @@ -0,0 +1,31 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Tables; +import io.appwrite.enums.RelationshipType; + +Client client = new Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>"); // Your secret API key + +Tables tables = new Tables(client); + +tables.createRelationshipColumn( + "<DATABASE_ID>", // databaseId + "<TABLE_ID>", // tableId + "<RELATED_TABLE_ID>", // relatedTableId + RelationshipType.ONETOONE, // type + false, // twoWay (optional) + "", // key (optional) + "", // twoWayKey (optional) + RelationMutate.CASCADE, // onDelete (optional) + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); + }) +); + diff --git a/docs/examples/java/tables/create-row.md b/docs/examples/java/tables/create-row.md new file mode 100644 index 0000000..7ba3678 --- /dev/null +++ b/docs/examples/java/tables/create-row.md @@ -0,0 +1,28 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Tables; + +Client client = new Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setSession("") // The user session to authenticate with + .setKey("<YOUR_API_KEY>") // Your secret API key + .setJWT("<YOUR_JWT>"); // Your secret JSON Web Token + +Tables tables = new Tables(client); + +tables.createRow( + "<DATABASE_ID>", // databaseId + "<TABLE_ID>", // tableId + "<ROW_ID>", // rowId + mapOf( "a" to "b" ), // data + listOf("read("any")"), // permissions (optional) + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); + }) +); + diff --git a/docs/examples/java/tables/create-rows.md b/docs/examples/java/tables/create-rows.md new file mode 100644 index 0000000..c20aa2c --- /dev/null +++ b/docs/examples/java/tables/create-rows.md @@ -0,0 +1,25 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Tables; + +Client client = new Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setAdmin("") // + .setKey("<YOUR_API_KEY>"); // Your secret API key + +Tables tables = new Tables(client); + +tables.createRows( + "<DATABASE_ID>", // databaseId + "<TABLE_ID>", // tableId + listOf(), // rows + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); + }) +); + diff --git a/docs/examples/java/tables/create-string-column.md b/docs/examples/java/tables/create-string-column.md new file mode 100644 index 0000000..b8cb626 --- /dev/null +++ b/docs/examples/java/tables/create-string-column.md @@ -0,0 +1,30 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Tables; + +Client client = new Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>"); // Your secret API key + +Tables tables = new Tables(client); + +tables.createStringColumn( + "<DATABASE_ID>", // databaseId + "<TABLE_ID>", // tableId + "", // key + 1, // size + false, // required + "<DEFAULT>", // default (optional) + false, // array (optional) + false, // encrypt (optional) + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); + }) +); + diff --git a/docs/examples/java/tables/create-url-column.md b/docs/examples/java/tables/create-url-column.md new file mode 100644 index 0000000..91e90c8 --- /dev/null +++ b/docs/examples/java/tables/create-url-column.md @@ -0,0 +1,28 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Tables; + +Client client = new Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>"); // Your secret API key + +Tables tables = new Tables(client); + +tables.createUrlColumn( + "<DATABASE_ID>", // databaseId + "<TABLE_ID>", // tableId + "", // key + false, // required + "https://example.com", // default (optional) + false, // array (optional) + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); + }) +); + diff --git a/docs/examples/java/tables/create.md b/docs/examples/java/tables/create.md new file mode 100644 index 0000000..6a9faf0 --- /dev/null +++ b/docs/examples/java/tables/create.md @@ -0,0 +1,28 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Tables; + +Client client = new Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>"); // Your secret API key + +Tables tables = new Tables(client); + +tables.create( + "<DATABASE_ID>", // databaseId + "<TABLE_ID>", // tableId + "<NAME>", // name + listOf("read("any")"), // permissions (optional) + false, // rowSecurity (optional) + false, // enabled (optional) + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); + }) +); + diff --git a/docs/examples/java/tables/decrement-row-column.md b/docs/examples/java/tables/decrement-row-column.md new file mode 100644 index 0000000..9e79f36 --- /dev/null +++ b/docs/examples/java/tables/decrement-row-column.md @@ -0,0 +1,28 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Tables; + +Client client = new Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>"); // Your secret API key + +Tables tables = new Tables(client); + +tables.decrementRowColumn( + "<DATABASE_ID>", // databaseId + "<TABLE_ID>", // tableId + "<ROW_ID>", // rowId + "", // column + 0, // value (optional) + 0, // min (optional) + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); + }) +); + diff --git a/docs/examples/java/tables/delete-column.md b/docs/examples/java/tables/delete-column.md new file mode 100644 index 0000000..f14390c --- /dev/null +++ b/docs/examples/java/tables/delete-column.md @@ -0,0 +1,25 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Tables; + +Client client = new Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>"); // Your secret API key + +Tables tables = new Tables(client); + +tables.deleteColumn( + "<DATABASE_ID>", // databaseId + "<TABLE_ID>", // tableId + "", // key + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); + }) +); + diff --git a/docs/examples/java/tables/delete-index.md b/docs/examples/java/tables/delete-index.md new file mode 100644 index 0000000..1b22eb0 --- /dev/null +++ b/docs/examples/java/tables/delete-index.md @@ -0,0 +1,25 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Tables; + +Client client = new Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>"); // Your secret API key + +Tables tables = new Tables(client); + +tables.deleteIndex( + "<DATABASE_ID>", // databaseId + "<TABLE_ID>", // tableId + "", // key + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); + }) +); + diff --git a/docs/examples/java/tables/delete-row.md b/docs/examples/java/tables/delete-row.md new file mode 100644 index 0000000..a48745a --- /dev/null +++ b/docs/examples/java/tables/delete-row.md @@ -0,0 +1,25 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Tables; + +Client client = new Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setSession(""); // The user session to authenticate with + +Tables tables = new Tables(client); + +tables.deleteRow( + "<DATABASE_ID>", // databaseId + "<TABLE_ID>", // tableId + "<ROW_ID>", // rowId + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); + }) +); + diff --git a/docs/examples/java/tables/delete-rows.md b/docs/examples/java/tables/delete-rows.md new file mode 100644 index 0000000..6a86321 --- /dev/null +++ b/docs/examples/java/tables/delete-rows.md @@ -0,0 +1,25 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Tables; + +Client client = new Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>"); // Your secret API key + +Tables tables = new Tables(client); + +tables.deleteRows( + "<DATABASE_ID>", // databaseId + "<TABLE_ID>", // tableId + listOf(), // queries (optional) + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); + }) +); + diff --git a/docs/examples/java/tables/delete.md b/docs/examples/java/tables/delete.md new file mode 100644 index 0000000..e777c72 --- /dev/null +++ b/docs/examples/java/tables/delete.md @@ -0,0 +1,24 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Tables; + +Client client = new Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>"); // Your secret API key + +Tables tables = new Tables(client); + +tables.delete( + "<DATABASE_ID>", // databaseId + "<TABLE_ID>", // tableId + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); + }) +); + diff --git a/docs/examples/java/tables/get-column.md b/docs/examples/java/tables/get-column.md new file mode 100644 index 0000000..b4f7e12 --- /dev/null +++ b/docs/examples/java/tables/get-column.md @@ -0,0 +1,25 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Tables; + +Client client = new Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>"); // Your secret API key + +Tables tables = new Tables(client); + +tables.getColumn( + "<DATABASE_ID>", // databaseId + "<TABLE_ID>", // tableId + "", // key + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); + }) +); + diff --git a/docs/examples/java/tables/get-index.md b/docs/examples/java/tables/get-index.md new file mode 100644 index 0000000..5bcd59d --- /dev/null +++ b/docs/examples/java/tables/get-index.md @@ -0,0 +1,25 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Tables; + +Client client = new Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>"); // Your secret API key + +Tables tables = new Tables(client); + +tables.getIndex( + "<DATABASE_ID>", // databaseId + "<TABLE_ID>", // tableId + "", // key + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); + }) +); + diff --git a/docs/examples/java/tables/get-row.md b/docs/examples/java/tables/get-row.md new file mode 100644 index 0000000..7f72c25 --- /dev/null +++ b/docs/examples/java/tables/get-row.md @@ -0,0 +1,26 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Tables; + +Client client = new Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setSession(""); // The user session to authenticate with + +Tables tables = new Tables(client); + +tables.getRow( + "<DATABASE_ID>", // databaseId + "<TABLE_ID>", // tableId + "<ROW_ID>", // rowId + listOf(), // queries (optional) + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); + }) +); + diff --git a/docs/examples/java/tables/get.md b/docs/examples/java/tables/get.md new file mode 100644 index 0000000..6f3c639 --- /dev/null +++ b/docs/examples/java/tables/get.md @@ -0,0 +1,24 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Tables; + +Client client = new Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>"); // Your secret API key + +Tables tables = new Tables(client); + +tables.get( + "<DATABASE_ID>", // databaseId + "<TABLE_ID>", // tableId + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); + }) +); + diff --git a/docs/examples/java/tables/increment-row-column.md b/docs/examples/java/tables/increment-row-column.md new file mode 100644 index 0000000..f9c8283 --- /dev/null +++ b/docs/examples/java/tables/increment-row-column.md @@ -0,0 +1,28 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Tables; + +Client client = new Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>"); // Your secret API key + +Tables tables = new Tables(client); + +tables.incrementRowColumn( + "<DATABASE_ID>", // databaseId + "<TABLE_ID>", // tableId + "<ROW_ID>", // rowId + "", // column + 0, // value (optional) + 0, // max (optional) + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); + }) +); + diff --git a/docs/examples/java/tables/list-columns.md b/docs/examples/java/tables/list-columns.md new file mode 100644 index 0000000..05e1960 --- /dev/null +++ b/docs/examples/java/tables/list-columns.md @@ -0,0 +1,25 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Tables; + +Client client = new Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>"); // Your secret API key + +Tables tables = new Tables(client); + +tables.listColumns( + "<DATABASE_ID>", // databaseId + "<TABLE_ID>", // tableId + listOf(), // queries (optional) + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); + }) +); + diff --git a/docs/examples/java/tables/list-indexes.md b/docs/examples/java/tables/list-indexes.md new file mode 100644 index 0000000..c9bd445 --- /dev/null +++ b/docs/examples/java/tables/list-indexes.md @@ -0,0 +1,25 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Tables; + +Client client = new Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>"); // Your secret API key + +Tables tables = new Tables(client); + +tables.listIndexes( + "<DATABASE_ID>", // databaseId + "<TABLE_ID>", // tableId + listOf(), // queries (optional) + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); + }) +); + diff --git a/docs/examples/java/tables/list-rows.md b/docs/examples/java/tables/list-rows.md new file mode 100644 index 0000000..8cbc356 --- /dev/null +++ b/docs/examples/java/tables/list-rows.md @@ -0,0 +1,25 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Tables; + +Client client = new Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setSession(""); // The user session to authenticate with + +Tables tables = new Tables(client); + +tables.listRows( + "<DATABASE_ID>", // databaseId + "<TABLE_ID>", // tableId + listOf(), // queries (optional) + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); + }) +); + diff --git a/docs/examples/java/tables/list.md b/docs/examples/java/tables/list.md new file mode 100644 index 0000000..c3e0c55 --- /dev/null +++ b/docs/examples/java/tables/list.md @@ -0,0 +1,25 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Tables; + +Client client = new Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>"); // Your secret API key + +Tables tables = new Tables(client); + +tables.list( + "<DATABASE_ID>", // databaseId + listOf(), // queries (optional) + "<SEARCH>", // search (optional) + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); + }) +); + diff --git a/docs/examples/java/tables/update-boolean-column.md b/docs/examples/java/tables/update-boolean-column.md new file mode 100644 index 0000000..647190e --- /dev/null +++ b/docs/examples/java/tables/update-boolean-column.md @@ -0,0 +1,28 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Tables; + +Client client = new Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>"); // Your secret API key + +Tables tables = new Tables(client); + +tables.updateBooleanColumn( + "<DATABASE_ID>", // databaseId + "<TABLE_ID>", // tableId + "", // key + false, // required + false, // default + "", // newKey (optional) + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); + }) +); + diff --git a/docs/examples/java/tables/update-datetime-column.md b/docs/examples/java/tables/update-datetime-column.md new file mode 100644 index 0000000..38e0e60 --- /dev/null +++ b/docs/examples/java/tables/update-datetime-column.md @@ -0,0 +1,28 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Tables; + +Client client = new Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>"); // Your secret API key + +Tables tables = new Tables(client); + +tables.updateDatetimeColumn( + "<DATABASE_ID>", // databaseId + "<TABLE_ID>", // tableId + "", // key + false, // required + "", // default + "", // newKey (optional) + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); + }) +); + diff --git a/docs/examples/java/tables/update-email-column.md b/docs/examples/java/tables/update-email-column.md new file mode 100644 index 0000000..918884e --- /dev/null +++ b/docs/examples/java/tables/update-email-column.md @@ -0,0 +1,28 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Tables; + +Client client = new Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>"); // Your secret API key + +Tables tables = new Tables(client); + +tables.updateEmailColumn( + "<DATABASE_ID>", // databaseId + "<TABLE_ID>", // tableId + "", // key + false, // required + "email@example.com", // default + "", // newKey (optional) + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); + }) +); + diff --git a/docs/examples/java/tables/update-enum-column.md b/docs/examples/java/tables/update-enum-column.md new file mode 100644 index 0000000..b1bbc83 --- /dev/null +++ b/docs/examples/java/tables/update-enum-column.md @@ -0,0 +1,29 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Tables; + +Client client = new Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>"); // Your secret API key + +Tables tables = new Tables(client); + +tables.updateEnumColumn( + "<DATABASE_ID>", // databaseId + "<TABLE_ID>", // tableId + "", // key + listOf(), // elements + false, // required + "<DEFAULT>", // default + "", // newKey (optional) + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); + }) +); + diff --git a/docs/examples/java/tables/update-float-column.md b/docs/examples/java/tables/update-float-column.md new file mode 100644 index 0000000..977c237 --- /dev/null +++ b/docs/examples/java/tables/update-float-column.md @@ -0,0 +1,30 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Tables; + +Client client = new Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>"); // Your secret API key + +Tables tables = new Tables(client); + +tables.updateFloatColumn( + "<DATABASE_ID>", // databaseId + "<TABLE_ID>", // tableId + "", // key + false, // required + 0, // default + 0, // min (optional) + 0, // max (optional) + "", // newKey (optional) + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); + }) +); + diff --git a/docs/examples/java/tables/update-integer-column.md b/docs/examples/java/tables/update-integer-column.md new file mode 100644 index 0000000..d2ad81d --- /dev/null +++ b/docs/examples/java/tables/update-integer-column.md @@ -0,0 +1,30 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Tables; + +Client client = new Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>"); // Your secret API key + +Tables tables = new Tables(client); + +tables.updateIntegerColumn( + "<DATABASE_ID>", // databaseId + "<TABLE_ID>", // tableId + "", // key + false, // required + 0, // default + 0, // min (optional) + 0, // max (optional) + "", // newKey (optional) + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); + }) +); + diff --git a/docs/examples/java/tables/update-ip-column.md b/docs/examples/java/tables/update-ip-column.md new file mode 100644 index 0000000..cd6e67b --- /dev/null +++ b/docs/examples/java/tables/update-ip-column.md @@ -0,0 +1,28 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Tables; + +Client client = new Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>"); // Your secret API key + +Tables tables = new Tables(client); + +tables.updateIpColumn( + "<DATABASE_ID>", // databaseId + "<TABLE_ID>", // tableId + "", // key + false, // required + "", // default + "", // newKey (optional) + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); + }) +); + diff --git a/docs/examples/java/tables/update-relationship-column.md b/docs/examples/java/tables/update-relationship-column.md new file mode 100644 index 0000000..e0dc185 --- /dev/null +++ b/docs/examples/java/tables/update-relationship-column.md @@ -0,0 +1,27 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Tables; + +Client client = new Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>"); // Your secret API key + +Tables tables = new Tables(client); + +tables.updateRelationshipColumn( + "<DATABASE_ID>", // databaseId + "<TABLE_ID>", // tableId + "", // key + RelationMutate.CASCADE, // onDelete (optional) + "", // newKey (optional) + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); + }) +); + diff --git a/docs/examples/java/tables/update-row.md b/docs/examples/java/tables/update-row.md new file mode 100644 index 0000000..8270c3f --- /dev/null +++ b/docs/examples/java/tables/update-row.md @@ -0,0 +1,27 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Tables; + +Client client = new Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setSession(""); // The user session to authenticate with + +Tables tables = new Tables(client); + +tables.updateRow( + "<DATABASE_ID>", // databaseId + "<TABLE_ID>", // tableId + "<ROW_ID>", // rowId + mapOf( "a" to "b" ), // data (optional) + listOf("read("any")"), // permissions (optional) + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); + }) +); + diff --git a/docs/examples/java/tables/update-rows.md b/docs/examples/java/tables/update-rows.md new file mode 100644 index 0000000..a518785 --- /dev/null +++ b/docs/examples/java/tables/update-rows.md @@ -0,0 +1,26 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Tables; + +Client client = new Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>"); // Your secret API key + +Tables tables = new Tables(client); + +tables.updateRows( + "<DATABASE_ID>", // databaseId + "<TABLE_ID>", // tableId + mapOf( "a" to "b" ), // data (optional) + listOf(), // queries (optional) + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); + }) +); + diff --git a/docs/examples/java/tables/update-string-column.md b/docs/examples/java/tables/update-string-column.md new file mode 100644 index 0000000..31e279d --- /dev/null +++ b/docs/examples/java/tables/update-string-column.md @@ -0,0 +1,29 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Tables; + +Client client = new Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>"); // Your secret API key + +Tables tables = new Tables(client); + +tables.updateStringColumn( + "<DATABASE_ID>", // databaseId + "<TABLE_ID>", // tableId + "", // key + false, // required + "<DEFAULT>", // default + 1, // size (optional) + "", // newKey (optional) + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); + }) +); + diff --git a/docs/examples/java/tables/update-url-column.md b/docs/examples/java/tables/update-url-column.md new file mode 100644 index 0000000..201e578 --- /dev/null +++ b/docs/examples/java/tables/update-url-column.md @@ -0,0 +1,28 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Tables; + +Client client = new Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>"); // Your secret API key + +Tables tables = new Tables(client); + +tables.updateUrlColumn( + "<DATABASE_ID>", // databaseId + "<TABLE_ID>", // tableId + "", // key + false, // required + "https://example.com", // default + "", // newKey (optional) + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); + }) +); + diff --git a/docs/examples/java/tables/update.md b/docs/examples/java/tables/update.md new file mode 100644 index 0000000..cf560cb --- /dev/null +++ b/docs/examples/java/tables/update.md @@ -0,0 +1,28 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Tables; + +Client client = new Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>"); // Your secret API key + +Tables tables = new Tables(client); + +tables.update( + "<DATABASE_ID>", // databaseId + "<TABLE_ID>", // tableId + "<NAME>", // name + listOf("read("any")"), // permissions (optional) + false, // rowSecurity (optional) + false, // enabled (optional) + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); + }) +); + diff --git a/docs/examples/java/tables/upsert-row.md b/docs/examples/java/tables/upsert-row.md new file mode 100644 index 0000000..11127c5 --- /dev/null +++ b/docs/examples/java/tables/upsert-row.md @@ -0,0 +1,26 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Tables; + +Client client = new Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setSession("") // The user session to authenticate with + .setKey("<YOUR_API_KEY>") // Your secret API key + .setJWT("<YOUR_JWT>"); // Your secret JSON Web Token + +Tables tables = new Tables(client); + +tables.upsertRow( + "<DATABASE_ID>", // databaseId + "<TABLE_ID>", // tableId + "<ROW_ID>", // rowId + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); + }) +); + diff --git a/docs/examples/java/tables/upsert-rows.md b/docs/examples/java/tables/upsert-rows.md new file mode 100644 index 0000000..14b3822 --- /dev/null +++ b/docs/examples/java/tables/upsert-rows.md @@ -0,0 +1,24 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Tables; + +Client client = new Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setAdmin("") // + .setKey("<YOUR_API_KEY>"); // Your secret API key + +Tables tables = new Tables(client); + +tables.upsertRows( + "<DATABASE_ID>", // databaseId + "<TABLE_ID>", // tableId + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); + }) +); + diff --git a/docs/examples/kotlin/databases/create-document.md b/docs/examples/kotlin/databases/create-document.md index 4c6d737..93da01e 100644 --- a/docs/examples/kotlin/databases/create-document.md +++ b/docs/examples/kotlin/databases/create-document.md @@ -4,7 +4,6 @@ import io.appwrite.services.Databases val client = Client() .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint - .setAdmin("") // .setSession("") // The user session to authenticate with .setKey("<YOUR_API_KEY>") // Your secret API key .setJWT("<YOUR_JWT>") // Your secret JSON Web Token diff --git a/docs/examples/kotlin/databases/create-documents.md b/docs/examples/kotlin/databases/create-documents.md index 01692c6..ddce31c 100644 --- a/docs/examples/kotlin/databases/create-documents.md +++ b/docs/examples/kotlin/databases/create-documents.md @@ -4,6 +4,7 @@ import io.appwrite.services.Databases val client = Client() .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setAdmin("") // .setKey("<YOUR_API_KEY>") // Your secret API key val databases = Databases(client) diff --git a/docs/examples/kotlin/databases/upsert-document.md b/docs/examples/kotlin/databases/upsert-document.md index d8be0e1..df261db 100644 --- a/docs/examples/kotlin/databases/upsert-document.md +++ b/docs/examples/kotlin/databases/upsert-document.md @@ -4,15 +4,14 @@ import io.appwrite.services.Databases val client = Client() .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint - .setProject("<YOUR_PROJECT_ID>") // Your project ID .setSession("") // The user session to authenticate with + .setKey("<YOUR_API_KEY>") // Your secret API key + .setJWT("<YOUR_JWT>") // Your secret JSON Web Token val databases = Databases(client) val response = databases.upsertDocument( databaseId = "<DATABASE_ID>", collectionId = "<COLLECTION_ID>", - documentId = "<DOCUMENT_ID>", - data = mapOf( "a" to "b" ), - permissions = listOf("read("any")") // optional + documentId = "<DOCUMENT_ID>" ) diff --git a/docs/examples/kotlin/databases/upsert-documents.md b/docs/examples/kotlin/databases/upsert-documents.md index ca861c6..1cb376f 100644 --- a/docs/examples/kotlin/databases/upsert-documents.md +++ b/docs/examples/kotlin/databases/upsert-documents.md @@ -4,13 +4,12 @@ import io.appwrite.services.Databases val client = Client() .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint - .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setAdmin("") // .setKey("<YOUR_API_KEY>") // Your secret API key val databases = Databases(client) val response = databases.upsertDocuments( databaseId = "<DATABASE_ID>", - collectionId = "<COLLECTION_ID>", - documents = listOf() + collectionId = "<COLLECTION_ID>" ) diff --git a/docs/examples/kotlin/tables/create-boolean-column.md b/docs/examples/kotlin/tables/create-boolean-column.md new file mode 100644 index 0000000..68b8dc5 --- /dev/null +++ b/docs/examples/kotlin/tables/create-boolean-column.md @@ -0,0 +1,19 @@ +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Tables + +val client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +val tables = Tables(client) + +val response = tables.createBooleanColumn( + databaseId = "<DATABASE_ID>", + tableId = "<TABLE_ID>", + key = "", + required = false, + default = false, // optional + array = false // optional +) diff --git a/docs/examples/kotlin/tables/create-datetime-column.md b/docs/examples/kotlin/tables/create-datetime-column.md new file mode 100644 index 0000000..8740a71 --- /dev/null +++ b/docs/examples/kotlin/tables/create-datetime-column.md @@ -0,0 +1,19 @@ +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Tables + +val client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +val tables = Tables(client) + +val response = tables.createDatetimeColumn( + databaseId = "<DATABASE_ID>", + tableId = "<TABLE_ID>", + key = "", + required = false, + default = "", // optional + array = false // optional +) diff --git a/docs/examples/kotlin/tables/create-email-column.md b/docs/examples/kotlin/tables/create-email-column.md new file mode 100644 index 0000000..34a6cb6 --- /dev/null +++ b/docs/examples/kotlin/tables/create-email-column.md @@ -0,0 +1,19 @@ +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Tables + +val client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +val tables = Tables(client) + +val response = tables.createEmailColumn( + databaseId = "<DATABASE_ID>", + tableId = "<TABLE_ID>", + key = "", + required = false, + default = "email@example.com", // optional + array = false // optional +) diff --git a/docs/examples/kotlin/tables/create-enum-column.md b/docs/examples/kotlin/tables/create-enum-column.md new file mode 100644 index 0000000..d3d2fc9 --- /dev/null +++ b/docs/examples/kotlin/tables/create-enum-column.md @@ -0,0 +1,20 @@ +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Tables + +val client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +val tables = Tables(client) + +val response = tables.createEnumColumn( + databaseId = "<DATABASE_ID>", + tableId = "<TABLE_ID>", + key = "", + elements = listOf(), + required = false, + default = "<DEFAULT>", // optional + array = false // optional +) diff --git a/docs/examples/kotlin/tables/create-float-column.md b/docs/examples/kotlin/tables/create-float-column.md new file mode 100644 index 0000000..8540430 --- /dev/null +++ b/docs/examples/kotlin/tables/create-float-column.md @@ -0,0 +1,21 @@ +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Tables + +val client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +val tables = Tables(client) + +val response = tables.createFloatColumn( + databaseId = "<DATABASE_ID>", + tableId = "<TABLE_ID>", + key = "", + required = false, + min = 0, // optional + max = 0, // optional + default = 0, // optional + array = false // optional +) diff --git a/docs/examples/kotlin/tables/create-index.md b/docs/examples/kotlin/tables/create-index.md new file mode 100644 index 0000000..053c88a --- /dev/null +++ b/docs/examples/kotlin/tables/create-index.md @@ -0,0 +1,21 @@ +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Tables +import io.appwrite.enums.IndexType + +val client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +val tables = Tables(client) + +val response = tables.createIndex( + databaseId = "<DATABASE_ID>", + tableId = "<TABLE_ID>", + key = "", + type = IndexType.KEY, + columns = listOf(), + orders = listOf(), // optional + lengths = listOf() // optional +) diff --git a/docs/examples/kotlin/tables/create-integer-column.md b/docs/examples/kotlin/tables/create-integer-column.md new file mode 100644 index 0000000..1222746 --- /dev/null +++ b/docs/examples/kotlin/tables/create-integer-column.md @@ -0,0 +1,21 @@ +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Tables + +val client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +val tables = Tables(client) + +val response = tables.createIntegerColumn( + databaseId = "<DATABASE_ID>", + tableId = "<TABLE_ID>", + key = "", + required = false, + min = 0, // optional + max = 0, // optional + default = 0, // optional + array = false // optional +) diff --git a/docs/examples/kotlin/tables/create-ip-column.md b/docs/examples/kotlin/tables/create-ip-column.md new file mode 100644 index 0000000..277c756 --- /dev/null +++ b/docs/examples/kotlin/tables/create-ip-column.md @@ -0,0 +1,19 @@ +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Tables + +val client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +val tables = Tables(client) + +val response = tables.createIpColumn( + databaseId = "<DATABASE_ID>", + tableId = "<TABLE_ID>", + key = "", + required = false, + default = "", // optional + array = false // optional +) diff --git a/docs/examples/kotlin/tables/create-relationship-column.md b/docs/examples/kotlin/tables/create-relationship-column.md new file mode 100644 index 0000000..aa07fac --- /dev/null +++ b/docs/examples/kotlin/tables/create-relationship-column.md @@ -0,0 +1,22 @@ +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Tables +import io.appwrite.enums.RelationshipType + +val client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +val tables = Tables(client) + +val response = tables.createRelationshipColumn( + databaseId = "<DATABASE_ID>", + tableId = "<TABLE_ID>", + relatedTableId = "<RELATED_TABLE_ID>", + type = RelationshipType.ONETOONE, + twoWay = false, // optional + key = "", // optional + twoWayKey = "", // optional + onDelete = "cascade" // optional +) diff --git a/docs/examples/kotlin/tables/create-row.md b/docs/examples/kotlin/tables/create-row.md new file mode 100644 index 0000000..5df0890 --- /dev/null +++ b/docs/examples/kotlin/tables/create-row.md @@ -0,0 +1,19 @@ +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Tables + +val client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setSession("") // The user session to authenticate with + .setKey("<YOUR_API_KEY>") // Your secret API key + .setJWT("<YOUR_JWT>") // Your secret JSON Web Token + +val tables = Tables(client) + +val response = tables.createRow( + databaseId = "<DATABASE_ID>", + tableId = "<TABLE_ID>", + rowId = "<ROW_ID>", + data = mapOf( "a" to "b" ), + permissions = listOf("read("any")") // optional +) diff --git a/docs/examples/kotlin/tables/create-rows.md b/docs/examples/kotlin/tables/create-rows.md new file mode 100644 index 0000000..f549d6f --- /dev/null +++ b/docs/examples/kotlin/tables/create-rows.md @@ -0,0 +1,16 @@ +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Tables + +val client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setAdmin("") // + .setKey("<YOUR_API_KEY>") // Your secret API key + +val tables = Tables(client) + +val response = tables.createRows( + databaseId = "<DATABASE_ID>", + tableId = "<TABLE_ID>", + rows = listOf() +) diff --git a/docs/examples/kotlin/tables/create-string-column.md b/docs/examples/kotlin/tables/create-string-column.md new file mode 100644 index 0000000..d82026c --- /dev/null +++ b/docs/examples/kotlin/tables/create-string-column.md @@ -0,0 +1,21 @@ +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Tables + +val client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +val tables = Tables(client) + +val response = tables.createStringColumn( + databaseId = "<DATABASE_ID>", + tableId = "<TABLE_ID>", + key = "", + size = 1, + required = false, + default = "<DEFAULT>", // optional + array = false, // optional + encrypt = false // optional +) diff --git a/docs/examples/kotlin/tables/create-url-column.md b/docs/examples/kotlin/tables/create-url-column.md new file mode 100644 index 0000000..42f50e9 --- /dev/null +++ b/docs/examples/kotlin/tables/create-url-column.md @@ -0,0 +1,19 @@ +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Tables + +val client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +val tables = Tables(client) + +val response = tables.createUrlColumn( + databaseId = "<DATABASE_ID>", + tableId = "<TABLE_ID>", + key = "", + required = false, + default = "https://example.com", // optional + array = false // optional +) diff --git a/docs/examples/kotlin/tables/create.md b/docs/examples/kotlin/tables/create.md new file mode 100644 index 0000000..3dc1d1a --- /dev/null +++ b/docs/examples/kotlin/tables/create.md @@ -0,0 +1,19 @@ +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Tables + +val client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +val tables = Tables(client) + +val response = tables.create( + databaseId = "<DATABASE_ID>", + tableId = "<TABLE_ID>", + name = "<NAME>", + permissions = listOf("read("any")"), // optional + rowSecurity = false, // optional + enabled = false // optional +) diff --git a/docs/examples/kotlin/tables/decrement-row-column.md b/docs/examples/kotlin/tables/decrement-row-column.md new file mode 100644 index 0000000..f78f7bb --- /dev/null +++ b/docs/examples/kotlin/tables/decrement-row-column.md @@ -0,0 +1,19 @@ +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Tables + +val client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +val tables = Tables(client) + +val response = tables.decrementRowColumn( + databaseId = "<DATABASE_ID>", + tableId = "<TABLE_ID>", + rowId = "<ROW_ID>", + column = "", + value = 0, // optional + min = 0 // optional +) diff --git a/docs/examples/kotlin/tables/delete-column.md b/docs/examples/kotlin/tables/delete-column.md new file mode 100644 index 0000000..d41f2ce --- /dev/null +++ b/docs/examples/kotlin/tables/delete-column.md @@ -0,0 +1,16 @@ +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Tables + +val client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +val tables = Tables(client) + +val response = tables.deleteColumn( + databaseId = "<DATABASE_ID>", + tableId = "<TABLE_ID>", + key = "" +) diff --git a/docs/examples/kotlin/tables/delete-index.md b/docs/examples/kotlin/tables/delete-index.md new file mode 100644 index 0000000..7af6648 --- /dev/null +++ b/docs/examples/kotlin/tables/delete-index.md @@ -0,0 +1,16 @@ +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Tables + +val client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +val tables = Tables(client) + +val response = tables.deleteIndex( + databaseId = "<DATABASE_ID>", + tableId = "<TABLE_ID>", + key = "" +) diff --git a/docs/examples/kotlin/tables/delete-row.md b/docs/examples/kotlin/tables/delete-row.md new file mode 100644 index 0000000..d182ccf --- /dev/null +++ b/docs/examples/kotlin/tables/delete-row.md @@ -0,0 +1,16 @@ +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Tables + +val client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setSession("") // The user session to authenticate with + +val tables = Tables(client) + +val response = tables.deleteRow( + databaseId = "<DATABASE_ID>", + tableId = "<TABLE_ID>", + rowId = "<ROW_ID>" +) diff --git a/docs/examples/kotlin/tables/delete-rows.md b/docs/examples/kotlin/tables/delete-rows.md new file mode 100644 index 0000000..54ff6b6 --- /dev/null +++ b/docs/examples/kotlin/tables/delete-rows.md @@ -0,0 +1,16 @@ +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Tables + +val client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +val tables = Tables(client) + +val response = tables.deleteRows( + databaseId = "<DATABASE_ID>", + tableId = "<TABLE_ID>", + queries = listOf() // optional +) diff --git a/docs/examples/kotlin/tables/delete.md b/docs/examples/kotlin/tables/delete.md new file mode 100644 index 0000000..5cbd032 --- /dev/null +++ b/docs/examples/kotlin/tables/delete.md @@ -0,0 +1,15 @@ +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Tables + +val client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +val tables = Tables(client) + +val response = tables.delete( + databaseId = "<DATABASE_ID>", + tableId = "<TABLE_ID>" +) diff --git a/docs/examples/kotlin/tables/get-column.md b/docs/examples/kotlin/tables/get-column.md new file mode 100644 index 0000000..6f4d65b --- /dev/null +++ b/docs/examples/kotlin/tables/get-column.md @@ -0,0 +1,16 @@ +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Tables + +val client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +val tables = Tables(client) + +val response = tables.getColumn( + databaseId = "<DATABASE_ID>", + tableId = "<TABLE_ID>", + key = "" +) diff --git a/docs/examples/kotlin/tables/get-index.md b/docs/examples/kotlin/tables/get-index.md new file mode 100644 index 0000000..660502f --- /dev/null +++ b/docs/examples/kotlin/tables/get-index.md @@ -0,0 +1,16 @@ +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Tables + +val client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +val tables = Tables(client) + +val response = tables.getIndex( + databaseId = "<DATABASE_ID>", + tableId = "<TABLE_ID>", + key = "" +) diff --git a/docs/examples/kotlin/tables/get-row.md b/docs/examples/kotlin/tables/get-row.md new file mode 100644 index 0000000..cbaaa6c --- /dev/null +++ b/docs/examples/kotlin/tables/get-row.md @@ -0,0 +1,17 @@ +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Tables + +val client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setSession("") // The user session to authenticate with + +val tables = Tables(client) + +val response = tables.getRow( + databaseId = "<DATABASE_ID>", + tableId = "<TABLE_ID>", + rowId = "<ROW_ID>", + queries = listOf() // optional +) diff --git a/docs/examples/kotlin/tables/get.md b/docs/examples/kotlin/tables/get.md new file mode 100644 index 0000000..ff6d354 --- /dev/null +++ b/docs/examples/kotlin/tables/get.md @@ -0,0 +1,15 @@ +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Tables + +val client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +val tables = Tables(client) + +val response = tables.get( + databaseId = "<DATABASE_ID>", + tableId = "<TABLE_ID>" +) diff --git a/docs/examples/kotlin/tables/increment-row-column.md b/docs/examples/kotlin/tables/increment-row-column.md new file mode 100644 index 0000000..7917b7f --- /dev/null +++ b/docs/examples/kotlin/tables/increment-row-column.md @@ -0,0 +1,19 @@ +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Tables + +val client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +val tables = Tables(client) + +val response = tables.incrementRowColumn( + databaseId = "<DATABASE_ID>", + tableId = "<TABLE_ID>", + rowId = "<ROW_ID>", + column = "", + value = 0, // optional + max = 0 // optional +) diff --git a/docs/examples/kotlin/tables/list-columns.md b/docs/examples/kotlin/tables/list-columns.md new file mode 100644 index 0000000..4c17651 --- /dev/null +++ b/docs/examples/kotlin/tables/list-columns.md @@ -0,0 +1,16 @@ +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Tables + +val client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +val tables = Tables(client) + +val response = tables.listColumns( + databaseId = "<DATABASE_ID>", + tableId = "<TABLE_ID>", + queries = listOf() // optional +) diff --git a/docs/examples/kotlin/tables/list-indexes.md b/docs/examples/kotlin/tables/list-indexes.md new file mode 100644 index 0000000..bcd1fe7 --- /dev/null +++ b/docs/examples/kotlin/tables/list-indexes.md @@ -0,0 +1,16 @@ +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Tables + +val client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +val tables = Tables(client) + +val response = tables.listIndexes( + databaseId = "<DATABASE_ID>", + tableId = "<TABLE_ID>", + queries = listOf() // optional +) diff --git a/docs/examples/kotlin/tables/list-rows.md b/docs/examples/kotlin/tables/list-rows.md new file mode 100644 index 0000000..38b776a --- /dev/null +++ b/docs/examples/kotlin/tables/list-rows.md @@ -0,0 +1,16 @@ +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Tables + +val client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setSession("") // The user session to authenticate with + +val tables = Tables(client) + +val response = tables.listRows( + databaseId = "<DATABASE_ID>", + tableId = "<TABLE_ID>", + queries = listOf() // optional +) diff --git a/docs/examples/kotlin/tables/list.md b/docs/examples/kotlin/tables/list.md new file mode 100644 index 0000000..37b0344 --- /dev/null +++ b/docs/examples/kotlin/tables/list.md @@ -0,0 +1,16 @@ +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Tables + +val client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +val tables = Tables(client) + +val response = tables.list( + databaseId = "<DATABASE_ID>", + queries = listOf(), // optional + search = "<SEARCH>" // optional +) diff --git a/docs/examples/kotlin/tables/update-boolean-column.md b/docs/examples/kotlin/tables/update-boolean-column.md new file mode 100644 index 0000000..10a0422 --- /dev/null +++ b/docs/examples/kotlin/tables/update-boolean-column.md @@ -0,0 +1,19 @@ +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Tables + +val client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +val tables = Tables(client) + +val response = tables.updateBooleanColumn( + databaseId = "<DATABASE_ID>", + tableId = "<TABLE_ID>", + key = "", + required = false, + default = false, + newKey = "" // optional +) diff --git a/docs/examples/kotlin/tables/update-datetime-column.md b/docs/examples/kotlin/tables/update-datetime-column.md new file mode 100644 index 0000000..69ccf03 --- /dev/null +++ b/docs/examples/kotlin/tables/update-datetime-column.md @@ -0,0 +1,19 @@ +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Tables + +val client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +val tables = Tables(client) + +val response = tables.updateDatetimeColumn( + databaseId = "<DATABASE_ID>", + tableId = "<TABLE_ID>", + key = "", + required = false, + default = "", + newKey = "" // optional +) diff --git a/docs/examples/kotlin/tables/update-email-column.md b/docs/examples/kotlin/tables/update-email-column.md new file mode 100644 index 0000000..593a89b --- /dev/null +++ b/docs/examples/kotlin/tables/update-email-column.md @@ -0,0 +1,19 @@ +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Tables + +val client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +val tables = Tables(client) + +val response = tables.updateEmailColumn( + databaseId = "<DATABASE_ID>", + tableId = "<TABLE_ID>", + key = "", + required = false, + default = "email@example.com", + newKey = "" // optional +) diff --git a/docs/examples/kotlin/tables/update-enum-column.md b/docs/examples/kotlin/tables/update-enum-column.md new file mode 100644 index 0000000..b672e3e --- /dev/null +++ b/docs/examples/kotlin/tables/update-enum-column.md @@ -0,0 +1,20 @@ +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Tables + +val client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +val tables = Tables(client) + +val response = tables.updateEnumColumn( + databaseId = "<DATABASE_ID>", + tableId = "<TABLE_ID>", + key = "", + elements = listOf(), + required = false, + default = "<DEFAULT>", + newKey = "" // optional +) diff --git a/docs/examples/kotlin/tables/update-float-column.md b/docs/examples/kotlin/tables/update-float-column.md new file mode 100644 index 0000000..005c4e6 --- /dev/null +++ b/docs/examples/kotlin/tables/update-float-column.md @@ -0,0 +1,21 @@ +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Tables + +val client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +val tables = Tables(client) + +val response = tables.updateFloatColumn( + databaseId = "<DATABASE_ID>", + tableId = "<TABLE_ID>", + key = "", + required = false, + default = 0, + min = 0, // optional + max = 0, // optional + newKey = "" // optional +) diff --git a/docs/examples/kotlin/tables/update-integer-column.md b/docs/examples/kotlin/tables/update-integer-column.md new file mode 100644 index 0000000..39da19d --- /dev/null +++ b/docs/examples/kotlin/tables/update-integer-column.md @@ -0,0 +1,21 @@ +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Tables + +val client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +val tables = Tables(client) + +val response = tables.updateIntegerColumn( + databaseId = "<DATABASE_ID>", + tableId = "<TABLE_ID>", + key = "", + required = false, + default = 0, + min = 0, // optional + max = 0, // optional + newKey = "" // optional +) diff --git a/docs/examples/kotlin/tables/update-ip-column.md b/docs/examples/kotlin/tables/update-ip-column.md new file mode 100644 index 0000000..40e54bc --- /dev/null +++ b/docs/examples/kotlin/tables/update-ip-column.md @@ -0,0 +1,19 @@ +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Tables + +val client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +val tables = Tables(client) + +val response = tables.updateIpColumn( + databaseId = "<DATABASE_ID>", + tableId = "<TABLE_ID>", + key = "", + required = false, + default = "", + newKey = "" // optional +) diff --git a/docs/examples/kotlin/tables/update-relationship-column.md b/docs/examples/kotlin/tables/update-relationship-column.md new file mode 100644 index 0000000..d4c36e8 --- /dev/null +++ b/docs/examples/kotlin/tables/update-relationship-column.md @@ -0,0 +1,18 @@ +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Tables + +val client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +val tables = Tables(client) + +val response = tables.updateRelationshipColumn( + databaseId = "<DATABASE_ID>", + tableId = "<TABLE_ID>", + key = "", + onDelete = "cascade", // optional + newKey = "" // optional +) diff --git a/docs/examples/kotlin/tables/update-row.md b/docs/examples/kotlin/tables/update-row.md new file mode 100644 index 0000000..6d3d9a4 --- /dev/null +++ b/docs/examples/kotlin/tables/update-row.md @@ -0,0 +1,18 @@ +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Tables + +val client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setSession("") // The user session to authenticate with + +val tables = Tables(client) + +val response = tables.updateRow( + databaseId = "<DATABASE_ID>", + tableId = "<TABLE_ID>", + rowId = "<ROW_ID>", + data = mapOf( "a" to "b" ), // optional + permissions = listOf("read("any")") // optional +) diff --git a/docs/examples/kotlin/tables/update-rows.md b/docs/examples/kotlin/tables/update-rows.md new file mode 100644 index 0000000..aac87c1 --- /dev/null +++ b/docs/examples/kotlin/tables/update-rows.md @@ -0,0 +1,17 @@ +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Tables + +val client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +val tables = Tables(client) + +val response = tables.updateRows( + databaseId = "<DATABASE_ID>", + tableId = "<TABLE_ID>", + data = mapOf( "a" to "b" ), // optional + queries = listOf() // optional +) diff --git a/docs/examples/kotlin/tables/update-string-column.md b/docs/examples/kotlin/tables/update-string-column.md new file mode 100644 index 0000000..bb5b1f4 --- /dev/null +++ b/docs/examples/kotlin/tables/update-string-column.md @@ -0,0 +1,20 @@ +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Tables + +val client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +val tables = Tables(client) + +val response = tables.updateStringColumn( + databaseId = "<DATABASE_ID>", + tableId = "<TABLE_ID>", + key = "", + required = false, + default = "<DEFAULT>", + size = 1, // optional + newKey = "" // optional +) diff --git a/docs/examples/kotlin/tables/update-url-column.md b/docs/examples/kotlin/tables/update-url-column.md new file mode 100644 index 0000000..07f43e3 --- /dev/null +++ b/docs/examples/kotlin/tables/update-url-column.md @@ -0,0 +1,19 @@ +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Tables + +val client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +val tables = Tables(client) + +val response = tables.updateUrlColumn( + databaseId = "<DATABASE_ID>", + tableId = "<TABLE_ID>", + key = "", + required = false, + default = "https://example.com", + newKey = "" // optional +) diff --git a/docs/examples/kotlin/tables/update.md b/docs/examples/kotlin/tables/update.md new file mode 100644 index 0000000..3815323 --- /dev/null +++ b/docs/examples/kotlin/tables/update.md @@ -0,0 +1,19 @@ +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Tables + +val client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +val tables = Tables(client) + +val response = tables.update( + databaseId = "<DATABASE_ID>", + tableId = "<TABLE_ID>", + name = "<NAME>", + permissions = listOf("read("any")"), // optional + rowSecurity = false, // optional + enabled = false // optional +) diff --git a/docs/examples/kotlin/tables/upsert-row.md b/docs/examples/kotlin/tables/upsert-row.md new file mode 100644 index 0000000..6e02b3a --- /dev/null +++ b/docs/examples/kotlin/tables/upsert-row.md @@ -0,0 +1,17 @@ +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Tables + +val client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setSession("") // The user session to authenticate with + .setKey("<YOUR_API_KEY>") // Your secret API key + .setJWT("<YOUR_JWT>") // Your secret JSON Web Token + +val tables = Tables(client) + +val response = tables.upsertRow( + databaseId = "<DATABASE_ID>", + tableId = "<TABLE_ID>", + rowId = "<ROW_ID>" +) diff --git a/docs/examples/kotlin/tables/upsert-rows.md b/docs/examples/kotlin/tables/upsert-rows.md new file mode 100644 index 0000000..d639e3d --- /dev/null +++ b/docs/examples/kotlin/tables/upsert-rows.md @@ -0,0 +1,15 @@ +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Tables + +val client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setAdmin("") // + .setKey("<YOUR_API_KEY>") // Your secret API key + +val tables = Tables(client) + +val response = tables.upsertRows( + databaseId = "<DATABASE_ID>", + tableId = "<TABLE_ID>" +) diff --git a/src/main/kotlin/io/appwrite/Client.kt b/src/main/kotlin/io/appwrite/Client.kt index 429131e..41a6878 100644 --- a/src/main/kotlin/io/appwrite/Client.kt +++ b/src/main/kotlin/io/appwrite/Client.kt @@ -58,12 +58,12 @@ class Client @JvmOverloads constructor( init { headers = mutableMapOf( "content-type" to "application/json", - "user-agent" to "AppwriteKotlinSDK/9.1.0 ${System.getProperty("http.agent")}", + "user-agent" to "AppwriteKotlinSDK/10.0.0 ${System.getProperty("http.agent")}", "x-sdk-name" to "Kotlin", "x-sdk-platform" to "server", "x-sdk-language" to "kotlin", - "x-sdk-version" to "9.1.0", - "x-appwrite-response-format" to "1.7.0", + "x-sdk-version" to "10.0.0", + "x-appwrite-response-format" to "1.8.0", ) config = mutableMapOf() diff --git a/src/main/kotlin/io/appwrite/models/BucketList.kt b/src/main/kotlin/io/appwrite/models/BucketList.kt index 91e331f..58cce61 100644 --- a/src/main/kotlin/io/appwrite/models/BucketList.kt +++ b/src/main/kotlin/io/appwrite/models/BucketList.kt @@ -8,7 +8,7 @@ import io.appwrite.extensions.jsonCast */ data class BucketList( /** - * Total number of buckets documents that matched your query. + * Total number of buckets rows that matched your query. */ @SerializedName("total") val total: Long, diff --git a/src/main/kotlin/io/appwrite/models/CollectionList.kt b/src/main/kotlin/io/appwrite/models/CollectionList.kt index b171ae8..6cd040a 100644 --- a/src/main/kotlin/io/appwrite/models/CollectionList.kt +++ b/src/main/kotlin/io/appwrite/models/CollectionList.kt @@ -8,7 +8,7 @@ import io.appwrite.extensions.jsonCast */ data class CollectionList( /** - * Total number of collections documents that matched your query. + * Total number of collections rows that matched your query. */ @SerializedName("total") val total: Long, diff --git a/src/main/kotlin/io/appwrite/models/ColumnBoolean.kt b/src/main/kotlin/io/appwrite/models/ColumnBoolean.kt new file mode 100644 index 0000000..fc5c45e --- /dev/null +++ b/src/main/kotlin/io/appwrite/models/ColumnBoolean.kt @@ -0,0 +1,94 @@ +package io.appwrite.models + +import com.google.gson.annotations.SerializedName +import io.appwrite.extensions.jsonCast + +/** + * ColumnBoolean + */ +data class ColumnBoolean( + /** + * Column Key. + */ + @SerializedName("key") + val key: String, + + /** + * Column type. + */ + @SerializedName("type") + val type: String, + + /** + * Column status. Possible values: `available`, `processing`, `deleting`, `stuck`, or `failed` + */ + @SerializedName("status") + val status: String, + + /** + * Error message. Displays error generated on failure of creating or deleting an column. + */ + @SerializedName("error") + val error: String, + + /** + * Is column required? + */ + @SerializedName("required") + val required: Boolean, + + /** + * Is column an array? + */ + @SerializedName("array") + var array: Boolean?, + + /** + * Column creation date in ISO 8601 format. + */ + @SerializedName("\$createdAt") + val createdAt: String, + + /** + * Column update date in ISO 8601 format. + */ + @SerializedName("\$updatedAt") + val updatedAt: String, + + /** + * Default value for attribute when not provided. Cannot be set when attribute is required. + */ + @SerializedName("default") + var default: Boolean?, + +) { + fun toMap(): Map<String, Any> = mapOf( + "key" to key as Any, + "type" to type as Any, + "status" to status as Any, + "error" to error as Any, + "required" to required as Any, + "array" to array as Any, + "\$createdAt" to createdAt as Any, + "\$updatedAt" to updatedAt as Any, + "default" to default as Any, + ) + + companion object { + + @Suppress("UNCHECKED_CAST") + fun from( + map: Map<String, Any>, + ) = ColumnBoolean( + key = map["key"] as String, + type = map["type"] as String, + status = map["status"] as String, + error = map["error"] as String, + required = map["required"] as Boolean, + array = map["array"] as? Boolean?, + createdAt = map["\$createdAt"] as String, + updatedAt = map["\$updatedAt"] as String, + default = map["default"] as? Boolean?, + ) + } +} \ No newline at end of file diff --git a/src/main/kotlin/io/appwrite/models/ColumnDatetime.kt b/src/main/kotlin/io/appwrite/models/ColumnDatetime.kt new file mode 100644 index 0000000..3c5c446 --- /dev/null +++ b/src/main/kotlin/io/appwrite/models/ColumnDatetime.kt @@ -0,0 +1,102 @@ +package io.appwrite.models + +import com.google.gson.annotations.SerializedName +import io.appwrite.extensions.jsonCast + +/** + * ColumnDatetime + */ +data class ColumnDatetime( + /** + * Column Key. + */ + @SerializedName("key") + val key: String, + + /** + * Column type. + */ + @SerializedName("type") + val type: String, + + /** + * Column status. Possible values: `available`, `processing`, `deleting`, `stuck`, or `failed` + */ + @SerializedName("status") + val status: String, + + /** + * Error message. Displays error generated on failure of creating or deleting an column. + */ + @SerializedName("error") + val error: String, + + /** + * Is column required? + */ + @SerializedName("required") + val required: Boolean, + + /** + * Is column an array? + */ + @SerializedName("array") + var array: Boolean?, + + /** + * Column creation date in ISO 8601 format. + */ + @SerializedName("\$createdAt") + val createdAt: String, + + /** + * Column update date in ISO 8601 format. + */ + @SerializedName("\$updatedAt") + val updatedAt: String, + + /** + * ISO 8601 format. + */ + @SerializedName("format") + val format: String, + + /** + * Default value for attribute when not provided. Only null is optional + */ + @SerializedName("default") + var default: String?, + +) { + fun toMap(): Map<String, Any> = mapOf( + "key" to key as Any, + "type" to type as Any, + "status" to status as Any, + "error" to error as Any, + "required" to required as Any, + "array" to array as Any, + "\$createdAt" to createdAt as Any, + "\$updatedAt" to updatedAt as Any, + "format" to format as Any, + "default" to default as Any, + ) + + companion object { + + @Suppress("UNCHECKED_CAST") + fun from( + map: Map<String, Any>, + ) = ColumnDatetime( + key = map["key"] as String, + type = map["type"] as String, + status = map["status"] as String, + error = map["error"] as String, + required = map["required"] as Boolean, + array = map["array"] as? Boolean?, + createdAt = map["\$createdAt"] as String, + updatedAt = map["\$updatedAt"] as String, + format = map["format"] as String, + default = map["default"] as? String?, + ) + } +} \ No newline at end of file diff --git a/src/main/kotlin/io/appwrite/models/ColumnEmail.kt b/src/main/kotlin/io/appwrite/models/ColumnEmail.kt new file mode 100644 index 0000000..43c9cf2 --- /dev/null +++ b/src/main/kotlin/io/appwrite/models/ColumnEmail.kt @@ -0,0 +1,102 @@ +package io.appwrite.models + +import com.google.gson.annotations.SerializedName +import io.appwrite.extensions.jsonCast + +/** + * ColumnEmail + */ +data class ColumnEmail( + /** + * Column Key. + */ + @SerializedName("key") + val key: String, + + /** + * Column type. + */ + @SerializedName("type") + val type: String, + + /** + * Column status. Possible values: `available`, `processing`, `deleting`, `stuck`, or `failed` + */ + @SerializedName("status") + val status: String, + + /** + * Error message. Displays error generated on failure of creating or deleting an column. + */ + @SerializedName("error") + val error: String, + + /** + * Is column required? + */ + @SerializedName("required") + val required: Boolean, + + /** + * Is column an array? + */ + @SerializedName("array") + var array: Boolean?, + + /** + * Column creation date in ISO 8601 format. + */ + @SerializedName("\$createdAt") + val createdAt: String, + + /** + * Column update date in ISO 8601 format. + */ + @SerializedName("\$updatedAt") + val updatedAt: String, + + /** + * String format. + */ + @SerializedName("format") + val format: String, + + /** + * Default value for attribute when not provided. Cannot be set when attribute is required. + */ + @SerializedName("default") + var default: String?, + +) { + fun toMap(): Map<String, Any> = mapOf( + "key" to key as Any, + "type" to type as Any, + "status" to status as Any, + "error" to error as Any, + "required" to required as Any, + "array" to array as Any, + "\$createdAt" to createdAt as Any, + "\$updatedAt" to updatedAt as Any, + "format" to format as Any, + "default" to default as Any, + ) + + companion object { + + @Suppress("UNCHECKED_CAST") + fun from( + map: Map<String, Any>, + ) = ColumnEmail( + key = map["key"] as String, + type = map["type"] as String, + status = map["status"] as String, + error = map["error"] as String, + required = map["required"] as Boolean, + array = map["array"] as? Boolean?, + createdAt = map["\$createdAt"] as String, + updatedAt = map["\$updatedAt"] as String, + format = map["format"] as String, + default = map["default"] as? String?, + ) + } +} \ No newline at end of file diff --git a/src/main/kotlin/io/appwrite/models/ColumnEnum.kt b/src/main/kotlin/io/appwrite/models/ColumnEnum.kt new file mode 100644 index 0000000..717316b --- /dev/null +++ b/src/main/kotlin/io/appwrite/models/ColumnEnum.kt @@ -0,0 +1,110 @@ +package io.appwrite.models + +import com.google.gson.annotations.SerializedName +import io.appwrite.extensions.jsonCast + +/** + * ColumnEnum + */ +data class ColumnEnum( + /** + * Column Key. + */ + @SerializedName("key") + val key: String, + + /** + * Column type. + */ + @SerializedName("type") + val type: String, + + /** + * Column status. Possible values: `available`, `processing`, `deleting`, `stuck`, or `failed` + */ + @SerializedName("status") + val status: String, + + /** + * Error message. Displays error generated on failure of creating or deleting an column. + */ + @SerializedName("error") + val error: String, + + /** + * Is column required? + */ + @SerializedName("required") + val required: Boolean, + + /** + * Is column an array? + */ + @SerializedName("array") + var array: Boolean?, + + /** + * Column creation date in ISO 8601 format. + */ + @SerializedName("\$createdAt") + val createdAt: String, + + /** + * Column update date in ISO 8601 format. + */ + @SerializedName("\$updatedAt") + val updatedAt: String, + + /** + * Array of elements in enumerated type. + */ + @SerializedName("elements") + val elements: List<String>, + + /** + * String format. + */ + @SerializedName("format") + val format: String, + + /** + * Default value for attribute when not provided. Cannot be set when attribute is required. + */ + @SerializedName("default") + var default: String?, + +) { + fun toMap(): Map<String, Any> = mapOf( + "key" to key as Any, + "type" to type as Any, + "status" to status as Any, + "error" to error as Any, + "required" to required as Any, + "array" to array as Any, + "\$createdAt" to createdAt as Any, + "\$updatedAt" to updatedAt as Any, + "elements" to elements as Any, + "format" to format as Any, + "default" to default as Any, + ) + + companion object { + + @Suppress("UNCHECKED_CAST") + fun from( + map: Map<String, Any>, + ) = ColumnEnum( + key = map["key"] as String, + type = map["type"] as String, + status = map["status"] as String, + error = map["error"] as String, + required = map["required"] as Boolean, + array = map["array"] as? Boolean?, + createdAt = map["\$createdAt"] as String, + updatedAt = map["\$updatedAt"] as String, + elements = map["elements"] as List<String>, + format = map["format"] as String, + default = map["default"] as? String?, + ) + } +} \ No newline at end of file diff --git a/src/main/kotlin/io/appwrite/models/ColumnFloat.kt b/src/main/kotlin/io/appwrite/models/ColumnFloat.kt new file mode 100644 index 0000000..92b7a2f --- /dev/null +++ b/src/main/kotlin/io/appwrite/models/ColumnFloat.kt @@ -0,0 +1,110 @@ +package io.appwrite.models + +import com.google.gson.annotations.SerializedName +import io.appwrite.extensions.jsonCast + +/** + * ColumnFloat + */ +data class ColumnFloat( + /** + * Column Key. + */ + @SerializedName("key") + val key: String, + + /** + * Column type. + */ + @SerializedName("type") + val type: String, + + /** + * Column status. Possible values: `available`, `processing`, `deleting`, `stuck`, or `failed` + */ + @SerializedName("status") + val status: String, + + /** + * Error message. Displays error generated on failure of creating or deleting an column. + */ + @SerializedName("error") + val error: String, + + /** + * Is column required? + */ + @SerializedName("required") + val required: Boolean, + + /** + * Is column an array? + */ + @SerializedName("array") + var array: Boolean?, + + /** + * Column creation date in ISO 8601 format. + */ + @SerializedName("\$createdAt") + val createdAt: String, + + /** + * Column update date in ISO 8601 format. + */ + @SerializedName("\$updatedAt") + val updatedAt: String, + + /** + * Minimum value to enforce for new documents. + */ + @SerializedName("min") + var min: Double?, + + /** + * Maximum value to enforce for new documents. + */ + @SerializedName("max") + var max: Double?, + + /** + * Default value for attribute when not provided. Cannot be set when attribute is required. + */ + @SerializedName("default") + var default: Double?, + +) { + fun toMap(): Map<String, Any> = mapOf( + "key" to key as Any, + "type" to type as Any, + "status" to status as Any, + "error" to error as Any, + "required" to required as Any, + "array" to array as Any, + "\$createdAt" to createdAt as Any, + "\$updatedAt" to updatedAt as Any, + "min" to min as Any, + "max" to max as Any, + "default" to default as Any, + ) + + companion object { + + @Suppress("UNCHECKED_CAST") + fun from( + map: Map<String, Any>, + ) = ColumnFloat( + key = map["key"] as String, + type = map["type"] as String, + status = map["status"] as String, + error = map["error"] as String, + required = map["required"] as Boolean, + array = map["array"] as? Boolean?, + createdAt = map["\$createdAt"] as String, + updatedAt = map["\$updatedAt"] as String, + min = (map["min"] as? Number)?.toDouble(), + max = (map["max"] as? Number)?.toDouble(), + default = (map["default"] as? Number)?.toDouble(), + ) + } +} \ No newline at end of file diff --git a/src/main/kotlin/io/appwrite/models/ColumnIndex.kt b/src/main/kotlin/io/appwrite/models/ColumnIndex.kt new file mode 100644 index 0000000..4912fe9 --- /dev/null +++ b/src/main/kotlin/io/appwrite/models/ColumnIndex.kt @@ -0,0 +1,94 @@ +package io.appwrite.models + +import com.google.gson.annotations.SerializedName +import io.appwrite.extensions.jsonCast + +/** + * Index + */ +data class ColumnIndex( + /** + * Index Key. + */ + @SerializedName("key") + val key: String, + + /** + * Index type. + */ + @SerializedName("type") + val type: String, + + /** + * Index status. Possible values: `available`, `processing`, `deleting`, `stuck`, or `failed` + */ + @SerializedName("status") + val status: String, + + /** + * Error message. Displays error generated on failure of creating or deleting an index. + */ + @SerializedName("error") + val error: String, + + /** + * Index columns. + */ + @SerializedName("columns") + val columns: List<String>, + + /** + * Index columns length. + */ + @SerializedName("lengths") + val lengths: List<Long>, + + /** + * Index orders. + */ + @SerializedName("orders") + var orders: List<String>?, + + /** + * Index creation date in ISO 8601 format. + */ + @SerializedName("\$createdAt") + val createdAt: String, + + /** + * Index update date in ISO 8601 format. + */ + @SerializedName("\$updatedAt") + val updatedAt: String, + +) { + fun toMap(): Map<String, Any> = mapOf( + "key" to key as Any, + "type" to type as Any, + "status" to status as Any, + "error" to error as Any, + "columns" to columns as Any, + "lengths" to lengths as Any, + "orders" to orders as Any, + "\$createdAt" to createdAt as Any, + "\$updatedAt" to updatedAt as Any, + ) + + companion object { + + @Suppress("UNCHECKED_CAST") + fun from( + map: Map<String, Any>, + ) = ColumnIndex( + key = map["key"] as String, + type = map["type"] as String, + status = map["status"] as String, + error = map["error"] as String, + columns = map["columns"] as List<String>, + lengths = map["lengths"] as List<Long>, + orders = map["orders"] as? List<String>?, + createdAt = map["\$createdAt"] as String, + updatedAt = map["\$updatedAt"] as String, + ) + } +} \ No newline at end of file diff --git a/src/main/kotlin/io/appwrite/models/ColumnIndexList.kt b/src/main/kotlin/io/appwrite/models/ColumnIndexList.kt new file mode 100644 index 0000000..fc877a9 --- /dev/null +++ b/src/main/kotlin/io/appwrite/models/ColumnIndexList.kt @@ -0,0 +1,38 @@ +package io.appwrite.models + +import com.google.gson.annotations.SerializedName +import io.appwrite.extensions.jsonCast + +/** + * Column Indexes List + */ +data class ColumnIndexList( + /** + * Total number of indexes rows that matched your query. + */ + @SerializedName("total") + val total: Long, + + /** + * List of indexes. + */ + @SerializedName("indexes") + val indexes: List<ColumnIndex>, + +) { + fun toMap(): Map<String, Any> = mapOf( + "total" to total as Any, + "indexes" to indexes.map { it.toMap() } as Any, + ) + + companion object { + + @Suppress("UNCHECKED_CAST") + fun from( + map: Map<String, Any>, + ) = ColumnIndexList( + total = (map["total"] as Number).toLong(), + indexes = (map["indexes"] as List<Map<String, Any>>).map { ColumnIndex.from(map = it) }, + ) + } +} \ No newline at end of file diff --git a/src/main/kotlin/io/appwrite/models/ColumnInteger.kt b/src/main/kotlin/io/appwrite/models/ColumnInteger.kt new file mode 100644 index 0000000..0545ec5 --- /dev/null +++ b/src/main/kotlin/io/appwrite/models/ColumnInteger.kt @@ -0,0 +1,110 @@ +package io.appwrite.models + +import com.google.gson.annotations.SerializedName +import io.appwrite.extensions.jsonCast + +/** + * ColumnInteger + */ +data class ColumnInteger( + /** + * Column Key. + */ + @SerializedName("key") + val key: String, + + /** + * Column type. + */ + @SerializedName("type") + val type: String, + + /** + * Column status. Possible values: `available`, `processing`, `deleting`, `stuck`, or `failed` + */ + @SerializedName("status") + val status: String, + + /** + * Error message. Displays error generated on failure of creating or deleting an column. + */ + @SerializedName("error") + val error: String, + + /** + * Is column required? + */ + @SerializedName("required") + val required: Boolean, + + /** + * Is column an array? + */ + @SerializedName("array") + var array: Boolean?, + + /** + * Column creation date in ISO 8601 format. + */ + @SerializedName("\$createdAt") + val createdAt: String, + + /** + * Column update date in ISO 8601 format. + */ + @SerializedName("\$updatedAt") + val updatedAt: String, + + /** + * Minimum value to enforce for new documents. + */ + @SerializedName("min") + var min: Long?, + + /** + * Maximum value to enforce for new documents. + */ + @SerializedName("max") + var max: Long?, + + /** + * Default value for attribute when not provided. Cannot be set when attribute is required. + */ + @SerializedName("default") + var default: Long?, + +) { + fun toMap(): Map<String, Any> = mapOf( + "key" to key as Any, + "type" to type as Any, + "status" to status as Any, + "error" to error as Any, + "required" to required as Any, + "array" to array as Any, + "\$createdAt" to createdAt as Any, + "\$updatedAt" to updatedAt as Any, + "min" to min as Any, + "max" to max as Any, + "default" to default as Any, + ) + + companion object { + + @Suppress("UNCHECKED_CAST") + fun from( + map: Map<String, Any>, + ) = ColumnInteger( + key = map["key"] as String, + type = map["type"] as String, + status = map["status"] as String, + error = map["error"] as String, + required = map["required"] as Boolean, + array = map["array"] as? Boolean?, + createdAt = map["\$createdAt"] as String, + updatedAt = map["\$updatedAt"] as String, + min = (map["min"] as? Number)?.toLong(), + max = (map["max"] as? Number)?.toLong(), + default = (map["default"] as? Number)?.toLong(), + ) + } +} \ No newline at end of file diff --git a/src/main/kotlin/io/appwrite/models/ColumnIp.kt b/src/main/kotlin/io/appwrite/models/ColumnIp.kt new file mode 100644 index 0000000..dad7442 --- /dev/null +++ b/src/main/kotlin/io/appwrite/models/ColumnIp.kt @@ -0,0 +1,102 @@ +package io.appwrite.models + +import com.google.gson.annotations.SerializedName +import io.appwrite.extensions.jsonCast + +/** + * ColumnIP + */ +data class ColumnIp( + /** + * Column Key. + */ + @SerializedName("key") + val key: String, + + /** + * Column type. + */ + @SerializedName("type") + val type: String, + + /** + * Column status. Possible values: `available`, `processing`, `deleting`, `stuck`, or `failed` + */ + @SerializedName("status") + val status: String, + + /** + * Error message. Displays error generated on failure of creating or deleting an column. + */ + @SerializedName("error") + val error: String, + + /** + * Is column required? + */ + @SerializedName("required") + val required: Boolean, + + /** + * Is column an array? + */ + @SerializedName("array") + var array: Boolean?, + + /** + * Column creation date in ISO 8601 format. + */ + @SerializedName("\$createdAt") + val createdAt: String, + + /** + * Column update date in ISO 8601 format. + */ + @SerializedName("\$updatedAt") + val updatedAt: String, + + /** + * String format. + */ + @SerializedName("format") + val format: String, + + /** + * Default value for attribute when not provided. Cannot be set when attribute is required. + */ + @SerializedName("default") + var default: String?, + +) { + fun toMap(): Map<String, Any> = mapOf( + "key" to key as Any, + "type" to type as Any, + "status" to status as Any, + "error" to error as Any, + "required" to required as Any, + "array" to array as Any, + "\$createdAt" to createdAt as Any, + "\$updatedAt" to updatedAt as Any, + "format" to format as Any, + "default" to default as Any, + ) + + companion object { + + @Suppress("UNCHECKED_CAST") + fun from( + map: Map<String, Any>, + ) = ColumnIp( + key = map["key"] as String, + type = map["type"] as String, + status = map["status"] as String, + error = map["error"] as String, + required = map["required"] as Boolean, + array = map["array"] as? Boolean?, + createdAt = map["\$createdAt"] as String, + updatedAt = map["\$updatedAt"] as String, + format = map["format"] as String, + default = map["default"] as? String?, + ) + } +} \ No newline at end of file diff --git a/src/main/kotlin/io/appwrite/models/ColumnList.kt b/src/main/kotlin/io/appwrite/models/ColumnList.kt new file mode 100644 index 0000000..06e8bd4 --- /dev/null +++ b/src/main/kotlin/io/appwrite/models/ColumnList.kt @@ -0,0 +1,38 @@ +package io.appwrite.models + +import com.google.gson.annotations.SerializedName +import io.appwrite.extensions.jsonCast + +/** + * Columns List + */ +data class ColumnList( + /** + * Total number of columns in the given table. + */ + @SerializedName("total") + val total: Long, + + /** + * List of columns. + */ + @SerializedName("columns") + val columns: List<Any>, + +) { + fun toMap(): Map<String, Any> = mapOf( + "total" to total as Any, + "columns" to columns as Any, + ) + + companion object { + + @Suppress("UNCHECKED_CAST") + fun from( + map: Map<String, Any>, + ) = ColumnList( + total = (map["total"] as Number).toLong(), + columns = map["columns"] as List<Any>, + ) + } +} \ No newline at end of file diff --git a/src/main/kotlin/io/appwrite/models/ColumnRelationship.kt b/src/main/kotlin/io/appwrite/models/ColumnRelationship.kt new file mode 100644 index 0000000..5524b42 --- /dev/null +++ b/src/main/kotlin/io/appwrite/models/ColumnRelationship.kt @@ -0,0 +1,134 @@ +package io.appwrite.models + +import com.google.gson.annotations.SerializedName +import io.appwrite.extensions.jsonCast + +/** + * ColumnRelationship + */ +data class ColumnRelationship( + /** + * Column Key. + */ + @SerializedName("key") + val key: String, + + /** + * Column type. + */ + @SerializedName("type") + val type: String, + + /** + * Column status. Possible values: `available`, `processing`, `deleting`, `stuck`, or `failed` + */ + @SerializedName("status") + val status: String, + + /** + * Error message. Displays error generated on failure of creating or deleting an column. + */ + @SerializedName("error") + val error: String, + + /** + * Is column required? + */ + @SerializedName("required") + val required: Boolean, + + /** + * Is column an array? + */ + @SerializedName("array") + var array: Boolean?, + + /** + * Column creation date in ISO 8601 format. + */ + @SerializedName("\$createdAt") + val createdAt: String, + + /** + * Column update date in ISO 8601 format. + */ + @SerializedName("\$updatedAt") + val updatedAt: String, + + /** + * The ID of the related table. + */ + @SerializedName("relatedTable") + val relatedTable: String, + + /** + * The type of the relationship. + */ + @SerializedName("relationType") + val relationType: String, + + /** + * Is the relationship two-way? + */ + @SerializedName("twoWay") + val twoWay: Boolean, + + /** + * The key of the two-way relationship. + */ + @SerializedName("twoWayKey") + val twoWayKey: String, + + /** + * How deleting the parent document will propagate to child documents. + */ + @SerializedName("onDelete") + val onDelete: String, + + /** + * Whether this is the parent or child side of the relationship + */ + @SerializedName("side") + val side: String, + +) { + fun toMap(): Map<String, Any> = mapOf( + "key" to key as Any, + "type" to type as Any, + "status" to status as Any, + "error" to error as Any, + "required" to required as Any, + "array" to array as Any, + "\$createdAt" to createdAt as Any, + "\$updatedAt" to updatedAt as Any, + "relatedTable" to relatedTable as Any, + "relationType" to relationType as Any, + "twoWay" to twoWay as Any, + "twoWayKey" to twoWayKey as Any, + "onDelete" to onDelete as Any, + "side" to side as Any, + ) + + companion object { + + @Suppress("UNCHECKED_CAST") + fun from( + map: Map<String, Any>, + ) = ColumnRelationship( + key = map["key"] as String, + type = map["type"] as String, + status = map["status"] as String, + error = map["error"] as String, + required = map["required"] as Boolean, + array = map["array"] as? Boolean?, + createdAt = map["\$createdAt"] as String, + updatedAt = map["\$updatedAt"] as String, + relatedTable = map["relatedTable"] as String, + relationType = map["relationType"] as String, + twoWay = map["twoWay"] as Boolean, + twoWayKey = map["twoWayKey"] as String, + onDelete = map["onDelete"] as String, + side = map["side"] as String, + ) + } +} \ No newline at end of file diff --git a/src/main/kotlin/io/appwrite/models/ColumnString.kt b/src/main/kotlin/io/appwrite/models/ColumnString.kt new file mode 100644 index 0000000..773a8ce --- /dev/null +++ b/src/main/kotlin/io/appwrite/models/ColumnString.kt @@ -0,0 +1,110 @@ +package io.appwrite.models + +import com.google.gson.annotations.SerializedName +import io.appwrite.extensions.jsonCast + +/** + * ColumnString + */ +data class ColumnString( + /** + * Column Key. + */ + @SerializedName("key") + val key: String, + + /** + * Column type. + */ + @SerializedName("type") + val type: String, + + /** + * Column status. Possible values: `available`, `processing`, `deleting`, `stuck`, or `failed` + */ + @SerializedName("status") + val status: String, + + /** + * Error message. Displays error generated on failure of creating or deleting an column. + */ + @SerializedName("error") + val error: String, + + /** + * Is column required? + */ + @SerializedName("required") + val required: Boolean, + + /** + * Is column an array? + */ + @SerializedName("array") + var array: Boolean?, + + /** + * Column creation date in ISO 8601 format. + */ + @SerializedName("\$createdAt") + val createdAt: String, + + /** + * Column update date in ISO 8601 format. + */ + @SerializedName("\$updatedAt") + val updatedAt: String, + + /** + * Column size. + */ + @SerializedName("size") + val size: Long, + + /** + * Default value for column when not provided. Cannot be set when column is required. + */ + @SerializedName("default") + var default: String?, + + /** + * Defines whether this column is encrypted or not. + */ + @SerializedName("encrypt") + var encrypt: Boolean?, + +) { + fun toMap(): Map<String, Any> = mapOf( + "key" to key as Any, + "type" to type as Any, + "status" to status as Any, + "error" to error as Any, + "required" to required as Any, + "array" to array as Any, + "\$createdAt" to createdAt as Any, + "\$updatedAt" to updatedAt as Any, + "size" to size as Any, + "default" to default as Any, + "encrypt" to encrypt as Any, + ) + + companion object { + + @Suppress("UNCHECKED_CAST") + fun from( + map: Map<String, Any>, + ) = ColumnString( + key = map["key"] as String, + type = map["type"] as String, + status = map["status"] as String, + error = map["error"] as String, + required = map["required"] as Boolean, + array = map["array"] as? Boolean?, + createdAt = map["\$createdAt"] as String, + updatedAt = map["\$updatedAt"] as String, + size = (map["size"] as Number).toLong(), + default = map["default"] as? String?, + encrypt = map["encrypt"] as? Boolean?, + ) + } +} \ No newline at end of file diff --git a/src/main/kotlin/io/appwrite/models/ColumnUrl.kt b/src/main/kotlin/io/appwrite/models/ColumnUrl.kt new file mode 100644 index 0000000..10cd5d9 --- /dev/null +++ b/src/main/kotlin/io/appwrite/models/ColumnUrl.kt @@ -0,0 +1,102 @@ +package io.appwrite.models + +import com.google.gson.annotations.SerializedName +import io.appwrite.extensions.jsonCast + +/** + * ColumnURL + */ +data class ColumnUrl( + /** + * Column Key. + */ + @SerializedName("key") + val key: String, + + /** + * Column type. + */ + @SerializedName("type") + val type: String, + + /** + * Column status. Possible values: `available`, `processing`, `deleting`, `stuck`, or `failed` + */ + @SerializedName("status") + val status: String, + + /** + * Error message. Displays error generated on failure of creating or deleting an column. + */ + @SerializedName("error") + val error: String, + + /** + * Is column required? + */ + @SerializedName("required") + val required: Boolean, + + /** + * Is column an array? + */ + @SerializedName("array") + var array: Boolean?, + + /** + * Column creation date in ISO 8601 format. + */ + @SerializedName("\$createdAt") + val createdAt: String, + + /** + * Column update date in ISO 8601 format. + */ + @SerializedName("\$updatedAt") + val updatedAt: String, + + /** + * String format. + */ + @SerializedName("format") + val format: String, + + /** + * Default value for column when not provided. Cannot be set when column is required. + */ + @SerializedName("default") + var default: String?, + +) { + fun toMap(): Map<String, Any> = mapOf( + "key" to key as Any, + "type" to type as Any, + "status" to status as Any, + "error" to error as Any, + "required" to required as Any, + "array" to array as Any, + "\$createdAt" to createdAt as Any, + "\$updatedAt" to updatedAt as Any, + "format" to format as Any, + "default" to default as Any, + ) + + companion object { + + @Suppress("UNCHECKED_CAST") + fun from( + map: Map<String, Any>, + ) = ColumnUrl( + key = map["key"] as String, + type = map["type"] as String, + status = map["status"] as String, + error = map["error"] as String, + required = map["required"] as Boolean, + array = map["array"] as? Boolean?, + createdAt = map["\$createdAt"] as String, + updatedAt = map["\$updatedAt"] as String, + format = map["format"] as String, + default = map["default"] as? String?, + ) + } +} \ No newline at end of file diff --git a/src/main/kotlin/io/appwrite/models/ContinentList.kt b/src/main/kotlin/io/appwrite/models/ContinentList.kt index fdd490a..a6ec310 100644 --- a/src/main/kotlin/io/appwrite/models/ContinentList.kt +++ b/src/main/kotlin/io/appwrite/models/ContinentList.kt @@ -8,7 +8,7 @@ import io.appwrite.extensions.jsonCast */ data class ContinentList( /** - * Total number of continents documents that matched your query. + * Total number of continents rows that matched your query. */ @SerializedName("total") val total: Long, diff --git a/src/main/kotlin/io/appwrite/models/CountryList.kt b/src/main/kotlin/io/appwrite/models/CountryList.kt index 350a894..546cf73 100644 --- a/src/main/kotlin/io/appwrite/models/CountryList.kt +++ b/src/main/kotlin/io/appwrite/models/CountryList.kt @@ -8,7 +8,7 @@ import io.appwrite.extensions.jsonCast */ data class CountryList( /** - * Total number of countries documents that matched your query. + * Total number of countries rows that matched your query. */ @SerializedName("total") val total: Long, diff --git a/src/main/kotlin/io/appwrite/models/CurrencyList.kt b/src/main/kotlin/io/appwrite/models/CurrencyList.kt index fe1e001..95dec92 100644 --- a/src/main/kotlin/io/appwrite/models/CurrencyList.kt +++ b/src/main/kotlin/io/appwrite/models/CurrencyList.kt @@ -8,7 +8,7 @@ import io.appwrite.extensions.jsonCast */ data class CurrencyList( /** - * Total number of currencies documents that matched your query. + * Total number of currencies rows that matched your query. */ @SerializedName("total") val total: Long, diff --git a/src/main/kotlin/io/appwrite/models/DatabaseList.kt b/src/main/kotlin/io/appwrite/models/DatabaseList.kt index 81c91aa..3b98e29 100644 --- a/src/main/kotlin/io/appwrite/models/DatabaseList.kt +++ b/src/main/kotlin/io/appwrite/models/DatabaseList.kt @@ -8,7 +8,7 @@ import io.appwrite.extensions.jsonCast */ data class DatabaseList( /** - * Total number of databases documents that matched your query. + * Total number of databases rows that matched your query. */ @SerializedName("total") val total: Long, diff --git a/src/main/kotlin/io/appwrite/models/DeploymentList.kt b/src/main/kotlin/io/appwrite/models/DeploymentList.kt index 2b7cf64..3bc6f49 100644 --- a/src/main/kotlin/io/appwrite/models/DeploymentList.kt +++ b/src/main/kotlin/io/appwrite/models/DeploymentList.kt @@ -8,7 +8,7 @@ import io.appwrite.extensions.jsonCast */ data class DeploymentList( /** - * Total number of deployments documents that matched your query. + * Total number of deployments rows that matched your query. */ @SerializedName("total") val total: Long, diff --git a/src/main/kotlin/io/appwrite/models/DocumentList.kt b/src/main/kotlin/io/appwrite/models/DocumentList.kt index fa3dd20..6f40579 100644 --- a/src/main/kotlin/io/appwrite/models/DocumentList.kt +++ b/src/main/kotlin/io/appwrite/models/DocumentList.kt @@ -8,7 +8,7 @@ import io.appwrite.extensions.jsonCast */ data class DocumentList<T>( /** - * Total number of documents documents that matched your query. + * Total number of documents rows that matched your query. */ @SerializedName("total") val total: Long, diff --git a/src/main/kotlin/io/appwrite/models/ExecutionList.kt b/src/main/kotlin/io/appwrite/models/ExecutionList.kt index 322aeee..ac11e4f 100644 --- a/src/main/kotlin/io/appwrite/models/ExecutionList.kt +++ b/src/main/kotlin/io/appwrite/models/ExecutionList.kt @@ -8,7 +8,7 @@ import io.appwrite.extensions.jsonCast */ data class ExecutionList( /** - * Total number of executions documents that matched your query. + * Total number of executions rows that matched your query. */ @SerializedName("total") val total: Long, diff --git a/src/main/kotlin/io/appwrite/models/FileList.kt b/src/main/kotlin/io/appwrite/models/FileList.kt index 5af18f1..ba69ea8 100644 --- a/src/main/kotlin/io/appwrite/models/FileList.kt +++ b/src/main/kotlin/io/appwrite/models/FileList.kt @@ -8,7 +8,7 @@ import io.appwrite.extensions.jsonCast */ data class FileList( /** - * Total number of files documents that matched your query. + * Total number of files rows that matched your query. */ @SerializedName("total") val total: Long, diff --git a/src/main/kotlin/io/appwrite/models/FrameworkList.kt b/src/main/kotlin/io/appwrite/models/FrameworkList.kt index 41532c8..243bc0f 100644 --- a/src/main/kotlin/io/appwrite/models/FrameworkList.kt +++ b/src/main/kotlin/io/appwrite/models/FrameworkList.kt @@ -8,7 +8,7 @@ import io.appwrite.extensions.jsonCast */ data class FrameworkList( /** - * Total number of frameworks documents that matched your query. + * Total number of frameworks rows that matched your query. */ @SerializedName("total") val total: Long, diff --git a/src/main/kotlin/io/appwrite/models/FunctionList.kt b/src/main/kotlin/io/appwrite/models/FunctionList.kt index 6aaa86a..7ffe820 100644 --- a/src/main/kotlin/io/appwrite/models/FunctionList.kt +++ b/src/main/kotlin/io/appwrite/models/FunctionList.kt @@ -8,7 +8,7 @@ import io.appwrite.extensions.jsonCast */ data class FunctionList( /** - * Total number of functions documents that matched your query. + * Total number of functions rows that matched your query. */ @SerializedName("total") val total: Long, diff --git a/src/main/kotlin/io/appwrite/models/IdentityList.kt b/src/main/kotlin/io/appwrite/models/IdentityList.kt index 1cbb07d..2e1a33a 100644 --- a/src/main/kotlin/io/appwrite/models/IdentityList.kt +++ b/src/main/kotlin/io/appwrite/models/IdentityList.kt @@ -8,7 +8,7 @@ import io.appwrite.extensions.jsonCast */ data class IdentityList( /** - * Total number of identities documents that matched your query. + * Total number of identities rows that matched your query. */ @SerializedName("total") val total: Long, diff --git a/src/main/kotlin/io/appwrite/models/IndexList.kt b/src/main/kotlin/io/appwrite/models/IndexList.kt index a14167d..1c2120a 100644 --- a/src/main/kotlin/io/appwrite/models/IndexList.kt +++ b/src/main/kotlin/io/appwrite/models/IndexList.kt @@ -8,7 +8,7 @@ import io.appwrite.extensions.jsonCast */ data class IndexList( /** - * Total number of indexes documents that matched your query. + * Total number of indexes rows that matched your query. */ @SerializedName("total") val total: Long, diff --git a/src/main/kotlin/io/appwrite/models/LanguageList.kt b/src/main/kotlin/io/appwrite/models/LanguageList.kt index 07559b9..ab78452 100644 --- a/src/main/kotlin/io/appwrite/models/LanguageList.kt +++ b/src/main/kotlin/io/appwrite/models/LanguageList.kt @@ -8,7 +8,7 @@ import io.appwrite.extensions.jsonCast */ data class LanguageList( /** - * Total number of languages documents that matched your query. + * Total number of languages rows that matched your query. */ @SerializedName("total") val total: Long, diff --git a/src/main/kotlin/io/appwrite/models/LocaleCodeList.kt b/src/main/kotlin/io/appwrite/models/LocaleCodeList.kt index 3973a03..6f47333 100644 --- a/src/main/kotlin/io/appwrite/models/LocaleCodeList.kt +++ b/src/main/kotlin/io/appwrite/models/LocaleCodeList.kt @@ -8,7 +8,7 @@ import io.appwrite.extensions.jsonCast */ data class LocaleCodeList( /** - * Total number of localeCodes documents that matched your query. + * Total number of localeCodes rows that matched your query. */ @SerializedName("total") val total: Long, diff --git a/src/main/kotlin/io/appwrite/models/LogList.kt b/src/main/kotlin/io/appwrite/models/LogList.kt index b9f381c..d2e0b00 100644 --- a/src/main/kotlin/io/appwrite/models/LogList.kt +++ b/src/main/kotlin/io/appwrite/models/LogList.kt @@ -8,7 +8,7 @@ import io.appwrite.extensions.jsonCast */ data class LogList( /** - * Total number of logs documents that matched your query. + * Total number of logs rows that matched your query. */ @SerializedName("total") val total: Long, diff --git a/src/main/kotlin/io/appwrite/models/MembershipList.kt b/src/main/kotlin/io/appwrite/models/MembershipList.kt index 7feaaaa..efcffc4 100644 --- a/src/main/kotlin/io/appwrite/models/MembershipList.kt +++ b/src/main/kotlin/io/appwrite/models/MembershipList.kt @@ -8,7 +8,7 @@ import io.appwrite.extensions.jsonCast */ data class MembershipList( /** - * Total number of memberships documents that matched your query. + * Total number of memberships rows that matched your query. */ @SerializedName("total") val total: Long, diff --git a/src/main/kotlin/io/appwrite/models/MessageList.kt b/src/main/kotlin/io/appwrite/models/MessageList.kt index 85e4a1b..1926541 100644 --- a/src/main/kotlin/io/appwrite/models/MessageList.kt +++ b/src/main/kotlin/io/appwrite/models/MessageList.kt @@ -8,7 +8,7 @@ import io.appwrite.extensions.jsonCast */ data class MessageList( /** - * Total number of messages documents that matched your query. + * Total number of messages rows that matched your query. */ @SerializedName("total") val total: Long, diff --git a/src/main/kotlin/io/appwrite/models/PhoneList.kt b/src/main/kotlin/io/appwrite/models/PhoneList.kt index b17de4f..675295f 100644 --- a/src/main/kotlin/io/appwrite/models/PhoneList.kt +++ b/src/main/kotlin/io/appwrite/models/PhoneList.kt @@ -8,7 +8,7 @@ import io.appwrite.extensions.jsonCast */ data class PhoneList( /** - * Total number of phones documents that matched your query. + * Total number of phones rows that matched your query. */ @SerializedName("total") val total: Long, diff --git a/src/main/kotlin/io/appwrite/models/ProviderList.kt b/src/main/kotlin/io/appwrite/models/ProviderList.kt index 113ba67..4223124 100644 --- a/src/main/kotlin/io/appwrite/models/ProviderList.kt +++ b/src/main/kotlin/io/appwrite/models/ProviderList.kt @@ -8,7 +8,7 @@ import io.appwrite.extensions.jsonCast */ data class ProviderList( /** - * Total number of providers documents that matched your query. + * Total number of providers rows that matched your query. */ @SerializedName("total") val total: Long, diff --git a/src/main/kotlin/io/appwrite/models/ResourceTokenList.kt b/src/main/kotlin/io/appwrite/models/ResourceTokenList.kt index bb9e6d7..aaf22f8 100644 --- a/src/main/kotlin/io/appwrite/models/ResourceTokenList.kt +++ b/src/main/kotlin/io/appwrite/models/ResourceTokenList.kt @@ -8,7 +8,7 @@ import io.appwrite.extensions.jsonCast */ data class ResourceTokenList( /** - * Total number of tokens documents that matched your query. + * Total number of tokens rows that matched your query. */ @SerializedName("total") val total: Long, diff --git a/src/main/kotlin/io/appwrite/models/Row.kt b/src/main/kotlin/io/appwrite/models/Row.kt new file mode 100644 index 0000000..bb5c14f --- /dev/null +++ b/src/main/kotlin/io/appwrite/models/Row.kt @@ -0,0 +1,105 @@ +package io.appwrite.models + +import com.google.gson.annotations.SerializedName +import io.appwrite.extensions.jsonCast + +/** + * Row + */ +data class Row<T>( + /** + * Row ID. + */ + @SerializedName("\$id") + val id: String, + + /** + * Row automatically incrementing ID. + */ + @SerializedName("\$sequence") + val sequence: Long, + + /** + * Table ID. + */ + @SerializedName("\$tableId") + val tableId: String, + + /** + * Database ID. + */ + @SerializedName("\$databaseId") + val databaseId: String, + + /** + * Row creation date in ISO 8601 format. + */ + @SerializedName("\$createdAt") + val createdAt: String, + + /** + * Row update date in ISO 8601 format. + */ + @SerializedName("\$updatedAt") + val updatedAt: String, + + /** + * Row permissions. [Learn more about permissions](https://appwrite.io/docs/permissions). + */ + @SerializedName("\$permissions") + val permissions: List<String>, + + /** + * Additional properties + */ + @SerializedName("data") + val data: T +) { + fun toMap(): Map<String, Any> = mapOf( + "\$id" to id as Any, + "\$sequence" to sequence as Any, + "\$tableId" to tableId as Any, + "\$databaseId" to databaseId as Any, + "\$createdAt" to createdAt as Any, + "\$updatedAt" to updatedAt as Any, + "\$permissions" to permissions as Any, + "data" to data!!.jsonCast(to = Map::class.java) + ) + + companion object { + operator fun invoke( + id: String, + sequence: Long, + tableId: String, + databaseId: String, + createdAt: String, + updatedAt: String, + permissions: List<String>, + data: Map<String, Any> + ) = Row<Map<String, Any>>( + id, + sequence, + tableId, + databaseId, + createdAt, + updatedAt, + permissions, + data + ) + + @Suppress("UNCHECKED_CAST") + fun <T> from( + map: Map<String, Any>, + nestedType: Class<T> + ) = Row<T>( + id = map["\$id"] as String, + sequence = (map["\$sequence"] as Number).toLong(), + tableId = map["\$tableId"] as String, + databaseId = map["\$databaseId"] as String, + createdAt = map["\$createdAt"] as String, + updatedAt = map["\$updatedAt"] as String, + permissions = map["\$permissions"] as List<String>, + data = map.jsonCast(to = nestedType) + ) + } +} \ No newline at end of file diff --git a/src/main/kotlin/io/appwrite/models/RowList.kt b/src/main/kotlin/io/appwrite/models/RowList.kt new file mode 100644 index 0000000..289f39b --- /dev/null +++ b/src/main/kotlin/io/appwrite/models/RowList.kt @@ -0,0 +1,46 @@ +package io.appwrite.models + +import com.google.gson.annotations.SerializedName +import io.appwrite.extensions.jsonCast + +/** + * Rows List + */ +data class RowList<T>( + /** + * Total number of rows rows that matched your query. + */ + @SerializedName("total") + val total: Long, + + /** + * List of rows. + */ + @SerializedName("rows") + val rows: List<Row<T>>, + +) { + fun toMap(): Map<String, Any> = mapOf( + "total" to total as Any, + "rows" to rows.map { it.toMap() } as Any, + ) + + companion object { + operator fun invoke( + total: Long, + rows: List<Row<Map<String, Any>>>, + ) = RowList<Map<String, Any>>( + total, + rows, + ) + + @Suppress("UNCHECKED_CAST") + fun <T> from( + map: Map<String, Any>, + nestedType: Class<T> + ) = RowList<T>( + total = (map["total"] as Number).toLong(), + rows = (map["rows"] as List<Map<String, Any>>).map { Row.from(map = it, nestedType) }, + ) + } +} \ No newline at end of file diff --git a/src/main/kotlin/io/appwrite/models/RuntimeList.kt b/src/main/kotlin/io/appwrite/models/RuntimeList.kt index d08e9a2..55c17d9 100644 --- a/src/main/kotlin/io/appwrite/models/RuntimeList.kt +++ b/src/main/kotlin/io/appwrite/models/RuntimeList.kt @@ -8,7 +8,7 @@ import io.appwrite.extensions.jsonCast */ data class RuntimeList( /** - * Total number of runtimes documents that matched your query. + * Total number of runtimes rows that matched your query. */ @SerializedName("total") val total: Long, diff --git a/src/main/kotlin/io/appwrite/models/SessionList.kt b/src/main/kotlin/io/appwrite/models/SessionList.kt index c7080e6..13e0c36 100644 --- a/src/main/kotlin/io/appwrite/models/SessionList.kt +++ b/src/main/kotlin/io/appwrite/models/SessionList.kt @@ -8,7 +8,7 @@ import io.appwrite.extensions.jsonCast */ data class SessionList( /** - * Total number of sessions documents that matched your query. + * Total number of sessions rows that matched your query. */ @SerializedName("total") val total: Long, diff --git a/src/main/kotlin/io/appwrite/models/SiteList.kt b/src/main/kotlin/io/appwrite/models/SiteList.kt index 15ecc7f..5332571 100644 --- a/src/main/kotlin/io/appwrite/models/SiteList.kt +++ b/src/main/kotlin/io/appwrite/models/SiteList.kt @@ -8,7 +8,7 @@ import io.appwrite.extensions.jsonCast */ data class SiteList( /** - * Total number of sites documents that matched your query. + * Total number of sites rows that matched your query. */ @SerializedName("total") val total: Long, diff --git a/src/main/kotlin/io/appwrite/models/SpecificationList.kt b/src/main/kotlin/io/appwrite/models/SpecificationList.kt index f504577..5ac8cf9 100644 --- a/src/main/kotlin/io/appwrite/models/SpecificationList.kt +++ b/src/main/kotlin/io/appwrite/models/SpecificationList.kt @@ -8,7 +8,7 @@ import io.appwrite.extensions.jsonCast */ data class SpecificationList( /** - * Total number of specifications documents that matched your query. + * Total number of specifications rows that matched your query. */ @SerializedName("total") val total: Long, diff --git a/src/main/kotlin/io/appwrite/models/SubscriberList.kt b/src/main/kotlin/io/appwrite/models/SubscriberList.kt index 87181a3..8f811c7 100644 --- a/src/main/kotlin/io/appwrite/models/SubscriberList.kt +++ b/src/main/kotlin/io/appwrite/models/SubscriberList.kt @@ -8,7 +8,7 @@ import io.appwrite.extensions.jsonCast */ data class SubscriberList( /** - * Total number of subscribers documents that matched your query. + * Total number of subscribers rows that matched your query. */ @SerializedName("total") val total: Long, diff --git a/src/main/kotlin/io/appwrite/models/Table.kt b/src/main/kotlin/io/appwrite/models/Table.kt new file mode 100644 index 0000000..9b43c41 --- /dev/null +++ b/src/main/kotlin/io/appwrite/models/Table.kt @@ -0,0 +1,102 @@ +package io.appwrite.models + +import com.google.gson.annotations.SerializedName +import io.appwrite.extensions.jsonCast + +/** + * Table + */ +data class Table( + /** + * Table ID. + */ + @SerializedName("\$id") + val id: String, + + /** + * Table creation date in ISO 8601 format. + */ + @SerializedName("\$createdAt") + val createdAt: String, + + /** + * Table update date in ISO 8601 format. + */ + @SerializedName("\$updatedAt") + val updatedAt: String, + + /** + * Table permissions. [Learn more about permissions](https://appwrite.io/docs/permissions). + */ + @SerializedName("\$permissions") + val permissions: List<String>, + + /** + * Database ID. + */ + @SerializedName("databaseId") + val databaseId: String, + + /** + * Table name. + */ + @SerializedName("name") + val name: String, + + /** + * Table enabled. Can be 'enabled' or 'disabled'. When disabled, the table is inaccessible to users, but remains accessible to Server SDKs using API keys. + */ + @SerializedName("enabled") + val enabled: Boolean, + + /** + * Whether row-level permissions are enabled. [Learn more about permissions](https://appwrite.io/docs/permissions). + */ + @SerializedName("rowSecurity") + val rowSecurity: Boolean, + + /** + * Table columns. + */ + @SerializedName("columns") + val columns: List<Any>, + + /** + * Table indexes. + */ + @SerializedName("indexes") + val indexes: List<ColumnIndex>, + +) { + fun toMap(): Map<String, Any> = mapOf( + "\$id" to id as Any, + "\$createdAt" to createdAt as Any, + "\$updatedAt" to updatedAt as Any, + "\$permissions" to permissions as Any, + "databaseId" to databaseId as Any, + "name" to name as Any, + "enabled" to enabled as Any, + "rowSecurity" to rowSecurity as Any, + "columns" to columns as Any, + "indexes" to indexes.map { it.toMap() } as Any, + ) + + companion object { + + @Suppress("UNCHECKED_CAST") + fun from( + map: Map<String, Any>, + ) = Table( + id = map["\$id"] as String, + createdAt = map["\$createdAt"] as String, + updatedAt = map["\$updatedAt"] as String, + permissions = map["\$permissions"] as List<String>, + databaseId = map["databaseId"] as String, + name = map["name"] as String, + enabled = map["enabled"] as Boolean, + rowSecurity = map["rowSecurity"] as Boolean, + columns = map["columns"] as List<Any>, + indexes = (map["indexes"] as List<Map<String, Any>>).map { ColumnIndex.from(map = it) }, + ) + } +} \ No newline at end of file diff --git a/src/main/kotlin/io/appwrite/models/TableList.kt b/src/main/kotlin/io/appwrite/models/TableList.kt new file mode 100644 index 0000000..3ee5afb --- /dev/null +++ b/src/main/kotlin/io/appwrite/models/TableList.kt @@ -0,0 +1,38 @@ +package io.appwrite.models + +import com.google.gson.annotations.SerializedName +import io.appwrite.extensions.jsonCast + +/** + * Tables List + */ +data class TableList( + /** + * Total number of tables rows that matched your query. + */ + @SerializedName("total") + val total: Long, + + /** + * List of tables. + */ + @SerializedName("tables") + val tables: List<Table>, + +) { + fun toMap(): Map<String, Any> = mapOf( + "total" to total as Any, + "tables" to tables.map { it.toMap() } as Any, + ) + + companion object { + + @Suppress("UNCHECKED_CAST") + fun from( + map: Map<String, Any>, + ) = TableList( + total = (map["total"] as Number).toLong(), + tables = (map["tables"] as List<Map<String, Any>>).map { Table.from(map = it) }, + ) + } +} \ No newline at end of file diff --git a/src/main/kotlin/io/appwrite/models/TargetList.kt b/src/main/kotlin/io/appwrite/models/TargetList.kt index 01470c8..8b94727 100644 --- a/src/main/kotlin/io/appwrite/models/TargetList.kt +++ b/src/main/kotlin/io/appwrite/models/TargetList.kt @@ -8,7 +8,7 @@ import io.appwrite.extensions.jsonCast */ data class TargetList( /** - * Total number of targets documents that matched your query. + * Total number of targets rows that matched your query. */ @SerializedName("total") val total: Long, diff --git a/src/main/kotlin/io/appwrite/models/TeamList.kt b/src/main/kotlin/io/appwrite/models/TeamList.kt index 17ccd6b..f1a1968 100644 --- a/src/main/kotlin/io/appwrite/models/TeamList.kt +++ b/src/main/kotlin/io/appwrite/models/TeamList.kt @@ -8,7 +8,7 @@ import io.appwrite.extensions.jsonCast */ data class TeamList<T>( /** - * Total number of teams documents that matched your query. + * Total number of teams rows that matched your query. */ @SerializedName("total") val total: Long, diff --git a/src/main/kotlin/io/appwrite/models/TopicList.kt b/src/main/kotlin/io/appwrite/models/TopicList.kt index 7173fec..2a1cc5f 100644 --- a/src/main/kotlin/io/appwrite/models/TopicList.kt +++ b/src/main/kotlin/io/appwrite/models/TopicList.kt @@ -8,7 +8,7 @@ import io.appwrite.extensions.jsonCast */ data class TopicList( /** - * Total number of topics documents that matched your query. + * Total number of topics rows that matched your query. */ @SerializedName("total") val total: Long, diff --git a/src/main/kotlin/io/appwrite/models/UserList.kt b/src/main/kotlin/io/appwrite/models/UserList.kt index efe164f..3bf322e 100644 --- a/src/main/kotlin/io/appwrite/models/UserList.kt +++ b/src/main/kotlin/io/appwrite/models/UserList.kt @@ -8,7 +8,7 @@ import io.appwrite.extensions.jsonCast */ data class UserList<T>( /** - * Total number of users documents that matched your query. + * Total number of users rows that matched your query. */ @SerializedName("total") val total: Long, diff --git a/src/main/kotlin/io/appwrite/models/VariableList.kt b/src/main/kotlin/io/appwrite/models/VariableList.kt index 06004c6..3f7e430 100644 --- a/src/main/kotlin/io/appwrite/models/VariableList.kt +++ b/src/main/kotlin/io/appwrite/models/VariableList.kt @@ -8,7 +8,7 @@ import io.appwrite.extensions.jsonCast */ data class VariableList( /** - * Total number of variables documents that matched your query. + * Total number of variables rows that matched your query. */ @SerializedName("total") val total: Long, diff --git a/src/main/kotlin/io/appwrite/services/Account.kt b/src/main/kotlin/io/appwrite/services/Account.kt index 26494eb..dcfe70d 100644 --- a/src/main/kotlin/io/appwrite/services/Account.kt +++ b/src/main/kotlin/io/appwrite/services/Account.kt @@ -1046,6 +1046,9 @@ class Account(client: Client) : Service(client) { * @param secret Valid verification token. * @return [io.appwrite.models.Session] */ + @Deprecated( + message = "This API has been deprecated." + ) @Throws(AppwriteException::class) suspend fun updateMagicURLSession( userId: String, @@ -1080,6 +1083,9 @@ class Account(client: Client) : Service(client) { * @param secret Valid verification token. * @return [io.appwrite.models.Session] */ + @Deprecated( + message = "This API has been deprecated." + ) @Throws(AppwriteException::class) suspend fun updatePhoneSession( userId: String, diff --git a/src/main/kotlin/io/appwrite/services/Databases.kt b/src/main/kotlin/io/appwrite/services/Databases.kt index 6c57ede..688d372 100644 --- a/src/main/kotlin/io/appwrite/services/Databases.kt +++ b/src/main/kotlin/io/appwrite/services/Databases.kt @@ -188,6 +188,11 @@ class Databases(client: Client) : Service(client) { * @param search Search term to filter your list results. Max length: 256 chars. * @return [io.appwrite.models.CollectionList] */ + @Deprecated( + message = "This API has been deprecated since 1.8.0. Please use `Tables.list` instead.", + replaceWith = ReplaceWith("io.appwrite.services.Tables.list"), + since = "1.8.0" + ) @JvmOverloads @Throws(AppwriteException::class) suspend fun listCollections( @@ -228,6 +233,11 @@ class Databases(client: Client) : Service(client) { * @param enabled Is collection enabled? When set to 'disabled', users cannot access the collection but Server SDKs with and API key can still read and write to the collection. No data is lost when this is toggled. * @return [io.appwrite.models.Collection] */ + @Deprecated( + message = "This API has been deprecated since 1.8.0. Please use `Tables.create` instead.", + replaceWith = ReplaceWith("io.appwrite.services.Tables.create"), + since = "1.8.0" + ) @JvmOverloads @Throws(AppwriteException::class) suspend fun createCollection( @@ -271,6 +281,11 @@ class Databases(client: Client) : Service(client) { * @param collectionId Collection ID. * @return [io.appwrite.models.Collection] */ + @Deprecated( + message = "This API has been deprecated since 1.8.0. Please use `Tables.get` instead.", + replaceWith = ReplaceWith("io.appwrite.services.Tables.get"), + since = "1.8.0" + ) @Throws(AppwriteException::class) suspend fun getCollection( databaseId: String, @@ -308,6 +323,11 @@ class Databases(client: Client) : Service(client) { * @param enabled Is collection enabled? When set to 'disabled', users cannot access the collection but Server SDKs with and API key can still read and write to the collection. No data is lost when this is toggled. * @return [io.appwrite.models.Collection] */ + @Deprecated( + message = "This API has been deprecated since 1.8.0. Please use `Tables.update` instead.", + replaceWith = ReplaceWith("io.appwrite.services.Tables.update"), + since = "1.8.0" + ) @JvmOverloads @Throws(AppwriteException::class) suspend fun updateCollection( @@ -351,6 +371,11 @@ class Databases(client: Client) : Service(client) { * @param collectionId Collection ID. * @return [Any] */ + @Deprecated( + message = "This API has been deprecated since 1.8.0. Please use `Tables.delete` instead.", + replaceWith = ReplaceWith("io.appwrite.services.Tables.delete"), + since = "1.8.0" + ) @Throws(AppwriteException::class) suspend fun deleteCollection( databaseId: String, @@ -378,10 +403,15 @@ class Databases(client: Client) : Service(client) { * List attributes in the collection. * * @param databaseId Database ID. - * @param collectionId Collection ID. You can create a new collection using the Database service [server integration](https://appwrite.io/docs/server/databases#databasesCreateCollection). + * @param collectionId Collection ID. * @param queries Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https://appwrite.io/docs/queries). Maximum of 100 queries are allowed, each 4096 characters long. You may filter on the following attributes: key, type, size, required, array, status, error * @return [io.appwrite.models.AttributeList] */ + @Deprecated( + message = "This API has been deprecated since 1.8.0. Please use `Tables.listColumns` instead.", + replaceWith = ReplaceWith("io.appwrite.services.Tables.listColumns"), + since = "1.8.0" + ) @JvmOverloads @Throws(AppwriteException::class) suspend fun listAttributes( @@ -415,13 +445,18 @@ class Databases(client: Client) : Service(client) { * Create a boolean attribute. * * @param databaseId Database ID. - * @param collectionId Collection ID. You can create a new collection using the Database service [server integration](https://appwrite.io/docs/server/databases#databasesCreateCollection). + * @param collectionId Collection ID. You can create a new table using the Database service [server integration](https://appwrite.io/docs/server/databases#databasesCreateCollection). * @param key Attribute Key. * @param required Is attribute required? * @param default Default value for attribute when not provided. Cannot be set when attribute is required. * @param array Is attribute an array? * @return [io.appwrite.models.AttributeBoolean] */ + @Deprecated( + message = "This API has been deprecated since 1.8.0. Please use `Tables.createBooleanColumn` instead.", + replaceWith = ReplaceWith("io.appwrite.services.Tables.createBooleanColumn"), + since = "1.8.0" + ) @JvmOverloads @Throws(AppwriteException::class) suspend fun createBooleanAttribute( @@ -462,13 +497,18 @@ class Databases(client: Client) : Service(client) { * Update a boolean attribute. Changing the `default` value will not update already existing documents. * * @param databaseId Database ID. - * @param collectionId Collection ID. You can create a new collection using the Database service [server integration](https://appwrite.io/docs/server/databases#databasesCreateCollection). + * @param collectionId Collection ID. You can create a new collection using the Database service [server integration](https://appwrite.io/docs/server/databases#createCollection). * @param key Attribute Key. * @param required Is attribute required? * @param default Default value for attribute when not provided. Cannot be set when attribute is required. * @param newKey New attribute key. * @return [io.appwrite.models.AttributeBoolean] */ + @Deprecated( + message = "This API has been deprecated since 1.8.0. Please use `Tables.updateBooleanColumn` instead.", + replaceWith = ReplaceWith("io.appwrite.services.Tables.updateBooleanColumn"), + since = "1.8.0" + ) @JvmOverloads @Throws(AppwriteException::class) suspend fun updateBooleanAttribute( @@ -509,13 +549,18 @@ class Databases(client: Client) : Service(client) { * Create a date time attribute according to the ISO 8601 standard. * * @param databaseId Database ID. - * @param collectionId Collection ID. You can create a new collection using the Database service [server integration](https://appwrite.io/docs/server/databases#databasesCreateCollection). + * @param collectionId Collection ID. You can create a new collection using the Database service [server integration](https://appwrite.io/docs/server/databases#createCollection). * @param key Attribute Key. * @param required Is attribute required? * @param default Default value for the attribute in [ISO 8601](https://www.iso.org/iso-8601-date-and-time-format.html) format. Cannot be set when attribute is required. * @param array Is attribute an array? * @return [io.appwrite.models.AttributeDatetime] */ + @Deprecated( + message = "This API has been deprecated since 1.8.0. Please use `Tables.createDatetimeColumn` instead.", + replaceWith = ReplaceWith("io.appwrite.services.Tables.createDatetimeColumn"), + since = "1.8.0" + ) @JvmOverloads @Throws(AppwriteException::class) suspend fun createDatetimeAttribute( @@ -556,13 +601,18 @@ class Databases(client: Client) : Service(client) { * Update a date time attribute. Changing the `default` value will not update already existing documents. * * @param databaseId Database ID. - * @param collectionId Collection ID. You can create a new collection using the Database service [server integration](https://appwrite.io/docs/server/databases#databasesCreateCollection). + * @param collectionId Collection ID. * @param key Attribute Key. * @param required Is attribute required? * @param default Default value for attribute when not provided. Cannot be set when attribute is required. * @param newKey New attribute key. * @return [io.appwrite.models.AttributeDatetime] */ + @Deprecated( + message = "This API has been deprecated since 1.8.0. Please use `Tables.updateDatetimeColumn` instead.", + replaceWith = ReplaceWith("io.appwrite.services.Tables.updateDatetimeColumn"), + since = "1.8.0" + ) @JvmOverloads @Throws(AppwriteException::class) suspend fun updateDatetimeAttribute( @@ -603,13 +653,18 @@ class Databases(client: Client) : Service(client) { * Create an email attribute. * * @param databaseId Database ID. - * @param collectionId Collection ID. You can create a new collection using the Database service [server integration](https://appwrite.io/docs/server/databases#databasesCreateCollection). + * @param collectionId Collection ID. * @param key Attribute Key. * @param required Is attribute required? * @param default Default value for attribute when not provided. Cannot be set when attribute is required. * @param array Is attribute an array? * @return [io.appwrite.models.AttributeEmail] */ + @Deprecated( + message = "This API has been deprecated since 1.8.0. Please use `Tables.createEmailColumn` instead.", + replaceWith = ReplaceWith("io.appwrite.services.Tables.createEmailColumn"), + since = "1.8.0" + ) @JvmOverloads @Throws(AppwriteException::class) suspend fun createEmailAttribute( @@ -650,13 +705,18 @@ class Databases(client: Client) : Service(client) { * Update an email attribute. Changing the `default` value will not update already existing documents. * * @param databaseId Database ID. - * @param collectionId Collection ID. You can create a new collection using the Database service [server integration](https://appwrite.io/docs/server/databases#databasesCreateCollection). + * @param collectionId Collection ID. * @param key Attribute Key. * @param required Is attribute required? * @param default Default value for attribute when not provided. Cannot be set when attribute is required. - * @param newKey New attribute key. + * @param newKey New Attribute Key. * @return [io.appwrite.models.AttributeEmail] */ + @Deprecated( + message = "This API has been deprecated since 1.8.0. Please use `Tables.updateEmailColumn` instead.", + replaceWith = ReplaceWith("io.appwrite.services.Tables.updateEmailColumn"), + since = "1.8.0" + ) @JvmOverloads @Throws(AppwriteException::class) suspend fun updateEmailAttribute( @@ -694,17 +754,22 @@ class Databases(client: Client) : Service(client) { } /** - * Create an enumeration attribute. The `elements` param acts as a white-list of accepted values for this attribute. + * Create an enum attribute. The `elements` param acts as a white-list of accepted values for this attribute. * * @param databaseId Database ID. - * @param collectionId Collection ID. You can create a new collection using the Database service [server integration](https://appwrite.io/docs/server/databases#databasesCreateCollection). + * @param collectionId Collection ID. * @param key Attribute Key. - * @param elements Array of elements in enumerated type. Uses length of longest element to determine size. Maximum of 100 elements are allowed, each 255 characters long. + * @param elements Array of enum values. * @param required Is attribute required? * @param default Default value for attribute when not provided. Cannot be set when attribute is required. * @param array Is attribute an array? * @return [io.appwrite.models.AttributeEnum] */ + @Deprecated( + message = "This API has been deprecated since 1.8.0. Please use `Tables.createEnumColumn` instead.", + replaceWith = ReplaceWith("io.appwrite.services.Tables.createEnumColumn"), + since = "1.8.0" + ) @JvmOverloads @Throws(AppwriteException::class) suspend fun createEnumAttribute( @@ -747,14 +812,19 @@ class Databases(client: Client) : Service(client) { * Update an enum attribute. Changing the `default` value will not update already existing documents. * * @param databaseId Database ID. - * @param collectionId Collection ID. You can create a new collection using the Database service [server integration](https://appwrite.io/docs/server/databases#databasesCreateCollection). + * @param collectionId Collection ID. * @param key Attribute Key. - * @param elements Array of elements in enumerated type. Uses length of longest element to determine size. Maximum of 100 elements are allowed, each 255 characters long. + * @param elements Updated list of enum values. * @param required Is attribute required? * @param default Default value for attribute when not provided. Cannot be set when attribute is required. - * @param newKey New attribute key. + * @param newKey New Attribute Key. * @return [io.appwrite.models.AttributeEnum] */ + @Deprecated( + message = "This API has been deprecated since 1.8.0. Please use `Tables.updateEnumColumn` instead.", + replaceWith = ReplaceWith("io.appwrite.services.Tables.updateEnumColumn"), + since = "1.8.0" + ) @JvmOverloads @Throws(AppwriteException::class) suspend fun updateEnumAttribute( @@ -797,15 +867,20 @@ class Databases(client: Client) : Service(client) { * Create a float attribute. Optionally, minimum and maximum values can be provided. * * @param databaseId Database ID. - * @param collectionId Collection ID. You can create a new collection using the Database service [server integration](https://appwrite.io/docs/server/databases#databasesCreateCollection). + * @param collectionId Collection ID. * @param key Attribute Key. * @param required Is attribute required? - * @param min Minimum value to enforce on new documents - * @param max Maximum value to enforce on new documents - * @param default Default value for attribute when not provided. Cannot be set when attribute is required. + * @param min Minimum value. + * @param max Maximum value. + * @param default Default value. Cannot be set when required. * @param array Is attribute an array? * @return [io.appwrite.models.AttributeFloat] */ + @Deprecated( + message = "This API has been deprecated since 1.8.0. Please use `Tables.createFloatColumn` instead.", + replaceWith = ReplaceWith("io.appwrite.services.Tables.createFloatColumn"), + since = "1.8.0" + ) @JvmOverloads @Throws(AppwriteException::class) suspend fun createFloatAttribute( @@ -850,15 +925,20 @@ class Databases(client: Client) : Service(client) { * Update a float attribute. Changing the `default` value will not update already existing documents. * * @param databaseId Database ID. - * @param collectionId Collection ID. You can create a new collection using the Database service [server integration](https://appwrite.io/docs/server/databases#databasesCreateCollection). + * @param collectionId Collection ID. * @param key Attribute Key. * @param required Is attribute required? - * @param default Default value for attribute when not provided. Cannot be set when attribute is required. - * @param min Minimum value to enforce on new documents - * @param max Maximum value to enforce on new documents - * @param newKey New attribute key. + * @param default Default value. Cannot be set when required. + * @param min Minimum value. + * @param max Maximum value. + * @param newKey New Attribute Key. * @return [io.appwrite.models.AttributeFloat] */ + @Deprecated( + message = "This API has been deprecated since 1.8.0. Please use `Tables.updateFloatColumn` instead.", + replaceWith = ReplaceWith("io.appwrite.services.Tables.updateFloatColumn"), + since = "1.8.0" + ) @JvmOverloads @Throws(AppwriteException::class) suspend fun updateFloatAttribute( @@ -903,15 +983,20 @@ class Databases(client: Client) : Service(client) { * Create an integer attribute. Optionally, minimum and maximum values can be provided. * * @param databaseId Database ID. - * @param collectionId Collection ID. You can create a new collection using the Database service [server integration](https://appwrite.io/docs/server/databases#databasesCreateCollection). + * @param collectionId Collection ID. * @param key Attribute Key. * @param required Is attribute required? - * @param min Minimum value to enforce on new documents - * @param max Maximum value to enforce on new documents - * @param default Default value for attribute when not provided. Cannot be set when attribute is required. + * @param min Minimum value + * @param max Maximum value + * @param default Default value. Cannot be set when attribute is required. * @param array Is attribute an array? * @return [io.appwrite.models.AttributeInteger] */ + @Deprecated( + message = "This API has been deprecated since 1.8.0. Please use `Tables.createIntegerColumn` instead.", + replaceWith = ReplaceWith("io.appwrite.services.Tables.createIntegerColumn"), + since = "1.8.0" + ) @JvmOverloads @Throws(AppwriteException::class) suspend fun createIntegerAttribute( @@ -956,15 +1041,20 @@ class Databases(client: Client) : Service(client) { * Update an integer attribute. Changing the `default` value will not update already existing documents. * * @param databaseId Database ID. - * @param collectionId Collection ID. You can create a new collection using the Database service [server integration](https://appwrite.io/docs/server/databases#databasesCreateCollection). + * @param collectionId Collection ID. * @param key Attribute Key. * @param required Is attribute required? - * @param default Default value for attribute when not provided. Cannot be set when attribute is required. - * @param min Minimum value to enforce on new documents - * @param max Maximum value to enforce on new documents - * @param newKey New attribute key. + * @param default Default value. Cannot be set when attribute is required. + * @param min Minimum value + * @param max Maximum value + * @param newKey New Attribute Key. * @return [io.appwrite.models.AttributeInteger] */ + @Deprecated( + message = "This API has been deprecated since 1.8.0. Please use `Tables.updateIntegerColumn` instead.", + replaceWith = ReplaceWith("io.appwrite.services.Tables.updateIntegerColumn"), + since = "1.8.0" + ) @JvmOverloads @Throws(AppwriteException::class) suspend fun updateIntegerAttribute( @@ -1009,13 +1099,18 @@ class Databases(client: Client) : Service(client) { * Create IP address attribute. * * @param databaseId Database ID. - * @param collectionId Collection ID. You can create a new collection using the Database service [server integration](https://appwrite.io/docs/server/databases#databasesCreateCollection). + * @param collectionId Collection ID. * @param key Attribute Key. * @param required Is attribute required? - * @param default Default value for attribute when not provided. Cannot be set when attribute is required. + * @param default Default value. Cannot be set when attribute is required. * @param array Is attribute an array? * @return [io.appwrite.models.AttributeIp] */ + @Deprecated( + message = "This API has been deprecated since 1.8.0. Please use `Tables.createIpColumn` instead.", + replaceWith = ReplaceWith("io.appwrite.services.Tables.createIpColumn"), + since = "1.8.0" + ) @JvmOverloads @Throws(AppwriteException::class) suspend fun createIpAttribute( @@ -1056,13 +1151,18 @@ class Databases(client: Client) : Service(client) { * Update an ip attribute. Changing the `default` value will not update already existing documents. * * @param databaseId Database ID. - * @param collectionId Collection ID. You can create a new collection using the Database service [server integration](https://appwrite.io/docs/server/databases#databasesCreateCollection). + * @param collectionId Collection ID. * @param key Attribute Key. * @param required Is attribute required? - * @param default Default value for attribute when not provided. Cannot be set when attribute is required. - * @param newKey New attribute key. + * @param default Default value. Cannot be set when attribute is required. + * @param newKey New Attribute Key. * @return [io.appwrite.models.AttributeIp] */ + @Deprecated( + message = "This API has been deprecated since 1.8.0. Please use `Tables.updateIpColumn` instead.", + replaceWith = ReplaceWith("io.appwrite.services.Tables.updateIpColumn"), + since = "1.8.0" + ) @JvmOverloads @Throws(AppwriteException::class) suspend fun updateIpAttribute( @@ -1103,8 +1203,8 @@ class Databases(client: Client) : Service(client) { * Create relationship attribute. [Learn more about relationship attributes](https://appwrite.io/docs/databases-relationships#relationship-attributes). * * @param databaseId Database ID. - * @param collectionId Collection ID. You can create a new collection using the Database service [server integration](https://appwrite.io/docs/server/databases#databasesCreateCollection). - * @param relatedCollectionId Related Collection ID. You can create a new collection using the Database service [server integration](https://appwrite.io/docs/server/databases#databasesCreateCollection). + * @param collectionId Collection ID. + * @param relatedCollectionId Related Collection ID. * @param type Relation type * @param twoWay Is Two Way? * @param key Attribute Key. @@ -1112,6 +1212,11 @@ class Databases(client: Client) : Service(client) { * @param onDelete Constraints option * @return [io.appwrite.models.AttributeRelationship] */ + @Deprecated( + message = "This API has been deprecated since 1.8.0. Please use `Tables.createRelationshipColumn` instead.", + replaceWith = ReplaceWith("io.appwrite.services.Tables.createRelationshipColumn"), + since = "1.8.0" + ) @JvmOverloads @Throws(AppwriteException::class) suspend fun createRelationshipAttribute( @@ -1156,7 +1261,7 @@ class Databases(client: Client) : Service(client) { * Create a string attribute. * * @param databaseId Database ID. - * @param collectionId Collection ID. You can create a new collection using the Database service [server integration](https://appwrite.io/docs/server/databases#databasesCreateCollection). + * @param collectionId Collection ID. You can create a new table using the Database service [server integration](https://appwrite.io/docs/server/databases#databasesCreateCollection). * @param key Attribute Key. * @param size Attribute size for text attributes, in number of characters. * @param required Is attribute required? @@ -1165,6 +1270,11 @@ class Databases(client: Client) : Service(client) { * @param encrypt Toggle encryption for the attribute. Encryption enhances security by not storing any plain text values in the database. However, encrypted attributes cannot be queried. * @return [io.appwrite.models.AttributeString] */ + @Deprecated( + message = "This API has been deprecated since 1.8.0. Please use `Tables.createStringColumn` instead.", + replaceWith = ReplaceWith("io.appwrite.services.Tables.createStringColumn"), + since = "1.8.0" + ) @JvmOverloads @Throws(AppwriteException::class) suspend fun createStringAttribute( @@ -1209,14 +1319,19 @@ class Databases(client: Client) : Service(client) { * Update a string attribute. Changing the `default` value will not update already existing documents. * * @param databaseId Database ID. - * @param collectionId Collection ID. You can create a new collection using the Database service [server integration](https://appwrite.io/docs/server/databases#databasesCreateCollection). + * @param collectionId Collection ID. You can create a new table using the Database service [server integration](https://appwrite.io/docs/server/databases#databasesCreateCollection). * @param key Attribute Key. * @param required Is attribute required? * @param default Default value for attribute when not provided. Cannot be set when attribute is required. * @param size Maximum size of the string attribute. - * @param newKey New attribute key. + * @param newKey New Attribute Key. * @return [io.appwrite.models.AttributeString] */ + @Deprecated( + message = "This API has been deprecated since 1.8.0. Please use `Tables.updateStringColumn` instead.", + replaceWith = ReplaceWith("io.appwrite.services.Tables.updateStringColumn"), + since = "1.8.0" + ) @JvmOverloads @Throws(AppwriteException::class) suspend fun updateStringAttribute( @@ -1259,13 +1374,18 @@ class Databases(client: Client) : Service(client) { * Create a URL attribute. * * @param databaseId Database ID. - * @param collectionId Collection ID. You can create a new collection using the Database service [server integration](https://appwrite.io/docs/server/databases#databasesCreateCollection). + * @param collectionId Collection ID. * @param key Attribute Key. * @param required Is attribute required? * @param default Default value for attribute when not provided. Cannot be set when attribute is required. * @param array Is attribute an array? * @return [io.appwrite.models.AttributeUrl] */ + @Deprecated( + message = "This API has been deprecated since 1.8.0. Please use `Tables.createUrlColumn` instead.", + replaceWith = ReplaceWith("io.appwrite.services.Tables.createUrlColumn"), + since = "1.8.0" + ) @JvmOverloads @Throws(AppwriteException::class) suspend fun createUrlAttribute( @@ -1306,13 +1426,18 @@ class Databases(client: Client) : Service(client) { * Update an url attribute. Changing the `default` value will not update already existing documents. * * @param databaseId Database ID. - * @param collectionId Collection ID. You can create a new collection using the Database service [server integration](https://appwrite.io/docs/server/databases#databasesCreateCollection). + * @param collectionId Collection ID. * @param key Attribute Key. * @param required Is attribute required? * @param default Default value for attribute when not provided. Cannot be set when attribute is required. - * @param newKey New attribute key. + * @param newKey New Attribute Key. * @return [io.appwrite.models.AttributeUrl] */ + @Deprecated( + message = "This API has been deprecated since 1.8.0. Please use `Tables.updateUrlColumn` instead.", + replaceWith = ReplaceWith("io.appwrite.services.Tables.updateUrlColumn"), + since = "1.8.0" + ) @JvmOverloads @Throws(AppwriteException::class) suspend fun updateUrlAttribute( @@ -1353,10 +1478,15 @@ class Databases(client: Client) : Service(client) { * Get attribute by ID. * * @param databaseId Database ID. - * @param collectionId Collection ID. You can create a new collection using the Database service [server integration](https://appwrite.io/docs/server/databases#databasesCreateCollection). + * @param collectionId Collection ID. * @param key Attribute Key. * @return [Any] */ + @Deprecated( + message = "This API has been deprecated since 1.8.0. Please use `Tables.getColumn` instead.", + replaceWith = ReplaceWith("io.appwrite.services.Tables.getColumn"), + since = "1.8.0" + ) @Throws(AppwriteException::class) suspend fun getAttribute( databaseId: String, @@ -1385,10 +1515,15 @@ class Databases(client: Client) : Service(client) { * Deletes an attribute. * * @param databaseId Database ID. - * @param collectionId Collection ID. You can create a new collection using the Database service [server integration](https://appwrite.io/docs/server/databases#databasesCreateCollection). + * @param collectionId Collection ID. * @param key Attribute Key. * @return [Any] */ + @Deprecated( + message = "This API has been deprecated since 1.8.0. Please use `Tables.deleteColumn` instead.", + replaceWith = ReplaceWith("io.appwrite.services.Tables.deleteColumn"), + since = "1.8.0" + ) @Throws(AppwriteException::class) suspend fun deleteAttribute( databaseId: String, @@ -1418,12 +1553,17 @@ class Databases(client: Client) : Service(client) { * Update relationship attribute. [Learn more about relationship attributes](https://appwrite.io/docs/databases-relationships#relationship-attributes). * * @param databaseId Database ID. - * @param collectionId Collection ID. You can create a new collection using the Database service [server integration](https://appwrite.io/docs/server/databases#databasesCreateCollection). + * @param collectionId Collection ID. * @param key Attribute Key. * @param onDelete Constraints option - * @param newKey New attribute key. + * @param newKey New Attribute Key. * @return [io.appwrite.models.AttributeRelationship] */ + @Deprecated( + message = "This API has been deprecated since 1.8.0. Please use `Tables.updateRelationshipColumn` instead.", + replaceWith = ReplaceWith("io.appwrite.services.Tables.updateRelationshipColumn"), + since = "1.8.0" + ) @JvmOverloads @Throws(AppwriteException::class) suspend fun updateRelationshipAttribute( @@ -1466,6 +1606,11 @@ class Databases(client: Client) : Service(client) { * @param queries 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. * @return [io.appwrite.models.DocumentList<T>] */ + @Deprecated( + message = "This API has been deprecated since 1.8.0. Please use `Tables.listRows` instead.", + replaceWith = ReplaceWith("io.appwrite.services.Tables.listRows"), + since = "1.8.0" + ) @JvmOverloads @Throws(AppwriteException::class) suspend fun <T> listDocuments( @@ -1504,6 +1649,11 @@ class Databases(client: Client) : Service(client) { * @param queries 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. * @return [io.appwrite.models.DocumentList<T>] */ + @Deprecated( + message = "This API has been deprecated since 1.8.0. Please use `Tables.listRows` instead.", + replaceWith = ReplaceWith("io.appwrite.services.Tables.listRows"), + since = "1.8.0" + ) @JvmOverloads @Throws(AppwriteException::class) suspend fun listDocuments( @@ -1527,6 +1677,11 @@ class Databases(client: Client) : Service(client) { * @param permissions An array of permissions strings. By default, only the current user is granted all permissions. [Learn more about permissions](https://appwrite.io/docs/permissions). * @return [io.appwrite.models.Document<T>] */ + @Deprecated( + message = "This API has been deprecated since 1.8.0. Please use `Tables.createRow` instead.", + replaceWith = ReplaceWith("io.appwrite.services.Tables.createRow"), + since = "1.8.0" + ) @JvmOverloads @Throws(AppwriteException::class) suspend fun <T> createDocument( @@ -1572,6 +1727,11 @@ class Databases(client: Client) : Service(client) { * @param permissions An array of permissions strings. By default, only the current user is granted all permissions. [Learn more about permissions](https://appwrite.io/docs/permissions). * @return [io.appwrite.models.Document<T>] */ + @Deprecated( + message = "This API has been deprecated since 1.8.0. Please use `Tables.createRow` instead.", + replaceWith = ReplaceWith("io.appwrite.services.Tables.createRow"), + since = "1.8.0" + ) @JvmOverloads @Throws(AppwriteException::class) suspend fun createDocument( @@ -1597,6 +1757,11 @@ class Databases(client: Client) : Service(client) { * @param documents Array of documents data as JSON objects. * @return [io.appwrite.models.DocumentList<T>] */ + @Deprecated( + message = "This API has been deprecated since 1.8.0. Please use `Tables.createRow` instead.", + replaceWith = ReplaceWith("io.appwrite.services.Tables.createRow"), + since = "1.8.0" + ) @Throws(AppwriteException::class) suspend fun <T> createDocuments( databaseId: String, @@ -1635,6 +1800,11 @@ class Databases(client: Client) : Service(client) { * @param documents Array of documents data as JSON objects. * @return [io.appwrite.models.DocumentList<T>] */ + @Deprecated( + message = "This API has been deprecated since 1.8.0. Please use `Tables.createRow` instead.", + replaceWith = ReplaceWith("io.appwrite.services.Tables.createRow"), + since = "1.8.0" + ) @Throws(AppwriteException::class) suspend fun createDocuments( databaseId: String, @@ -1652,14 +1822,17 @@ class Databases(client: Client) : Service(client) { * * @param databaseId Database ID. * @param collectionId Collection ID. - * @param documents Array of document data as JSON objects. May contain partial documents. * @return [io.appwrite.models.DocumentList<T>] */ + @Deprecated( + message = "This API has been deprecated since 1.8.0. Please use `Tables.upsertRows` instead.", + replaceWith = ReplaceWith("io.appwrite.services.Tables.upsertRows"), + since = "1.8.0" + ) @Throws(AppwriteException::class) suspend fun <T> upsertDocuments( databaseId: String, collectionId: String, - documents: List<Any>, nestedType: Class<T>, ): io.appwrite.models.DocumentList<T> { val apiPath = "/databases/{databaseId}/collections/{collectionId}/documents" @@ -1667,7 +1840,6 @@ class Databases(client: Client) : Service(client) { .replace("{collectionId}", collectionId) val apiParams = mutableMapOf<String, Any?>( - "documents" to documents, ) val apiHeaders = mutableMapOf<String, String>( "content-type" to "application/json", @@ -1690,18 +1862,20 @@ class Databases(client: Client) : Service(client) { * * @param databaseId Database ID. * @param collectionId Collection ID. - * @param documents Array of document data as JSON objects. May contain partial documents. * @return [io.appwrite.models.DocumentList<T>] */ + @Deprecated( + message = "This API has been deprecated since 1.8.0. Please use `Tables.upsertRows` instead.", + replaceWith = ReplaceWith("io.appwrite.services.Tables.upsertRows"), + since = "1.8.0" + ) @Throws(AppwriteException::class) suspend fun upsertDocuments( databaseId: String, collectionId: String, - documents: List<Any>, ): io.appwrite.models.DocumentList<Map<String, Any>> = upsertDocuments( databaseId, collectionId, - documents, nestedType = classOf(), ) @@ -1714,6 +1888,11 @@ class Databases(client: Client) : Service(client) { * @param queries 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. * @return [io.appwrite.models.DocumentList<T>] */ + @Deprecated( + message = "This API has been deprecated since 1.8.0. Please use `Tables.updateRows` instead.", + replaceWith = ReplaceWith("io.appwrite.services.Tables.updateRows"), + since = "1.8.0" + ) @JvmOverloads @Throws(AppwriteException::class) suspend fun <T> updateDocuments( @@ -1756,6 +1935,11 @@ class Databases(client: Client) : Service(client) { * @param queries 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. * @return [io.appwrite.models.DocumentList<T>] */ + @Deprecated( + message = "This API has been deprecated since 1.8.0. Please use `Tables.updateRows` instead.", + replaceWith = ReplaceWith("io.appwrite.services.Tables.updateRows"), + since = "1.8.0" + ) @JvmOverloads @Throws(AppwriteException::class) suspend fun updateDocuments( @@ -1779,6 +1963,11 @@ class Databases(client: Client) : Service(client) { * @param queries 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. * @return [io.appwrite.models.DocumentList<T>] */ + @Deprecated( + message = "This API has been deprecated since 1.8.0. Please use `Tables.deleteRows` instead.", + replaceWith = ReplaceWith("io.appwrite.services.Tables.deleteRows"), + since = "1.8.0" + ) @JvmOverloads @Throws(AppwriteException::class) suspend fun <T> deleteDocuments( @@ -1818,6 +2007,11 @@ class Databases(client: Client) : Service(client) { * @param queries 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. * @return [io.appwrite.models.DocumentList<T>] */ + @Deprecated( + message = "This API has been deprecated since 1.8.0. Please use `Tables.deleteRows` instead.", + replaceWith = ReplaceWith("io.appwrite.services.Tables.deleteRows"), + since = "1.8.0" + ) @JvmOverloads @Throws(AppwriteException::class) suspend fun deleteDocuments( @@ -1840,6 +2034,11 @@ class Databases(client: Client) : Service(client) { * @param queries 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. * @return [io.appwrite.models.Document<T>] */ + @Deprecated( + message = "This API has been deprecated since 1.8.0. Please use `Tables.getRow` instead.", + replaceWith = ReplaceWith("io.appwrite.services.Tables.getRow"), + since = "1.8.0" + ) @JvmOverloads @Throws(AppwriteException::class) suspend fun <T> getDocument( @@ -1881,6 +2080,11 @@ class Databases(client: Client) : Service(client) { * @param queries 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. * @return [io.appwrite.models.Document<T>] */ + @Deprecated( + message = "This API has been deprecated since 1.8.0. Please use `Tables.getRow` instead.", + replaceWith = ReplaceWith("io.appwrite.services.Tables.getRow"), + since = "1.8.0" + ) @JvmOverloads @Throws(AppwriteException::class) suspend fun getDocument( @@ -1902,18 +2106,18 @@ class Databases(client: Client) : Service(client) { * @param databaseId Database ID. * @param collectionId Collection ID. * @param documentId Document ID. - * @param data Document data as JSON object. Include all required attributes of the document to be created or updated. - * @param permissions An array of permissions strings. By default, the current permissions are inherited. [Learn more about permissions](https://appwrite.io/docs/permissions). * @return [io.appwrite.models.Document<T>] */ - @JvmOverloads + @Deprecated( + message = "This API has been deprecated since 1.8.0. Please use `Tables.upsertRow` instead.", + replaceWith = ReplaceWith("io.appwrite.services.Tables.upsertRow"), + since = "1.8.0" + ) @Throws(AppwriteException::class) suspend fun <T> upsertDocument( databaseId: String, collectionId: String, documentId: String, - data: Any, - permissions: List<String>? = null, nestedType: Class<T>, ): io.appwrite.models.Document<T> { val apiPath = "/databases/{databaseId}/collections/{collectionId}/documents/{documentId}" @@ -1922,8 +2126,6 @@ class Databases(client: Client) : Service(client) { .replace("{documentId}", documentId) val apiParams = mutableMapOf<String, Any?>( - "data" to data, - "permissions" to permissions, ) val apiHeaders = mutableMapOf<String, String>( "content-type" to "application/json", @@ -1947,24 +2149,22 @@ class Databases(client: Client) : Service(client) { * @param databaseId Database ID. * @param collectionId Collection ID. * @param documentId Document ID. - * @param data Document data as JSON object. Include all required attributes of the document to be created or updated. - * @param permissions An array of permissions strings. By default, the current permissions are inherited. [Learn more about permissions](https://appwrite.io/docs/permissions). * @return [io.appwrite.models.Document<T>] */ - @JvmOverloads + @Deprecated( + message = "This API has been deprecated since 1.8.0. Please use `Tables.upsertRow` instead.", + replaceWith = ReplaceWith("io.appwrite.services.Tables.upsertRow"), + since = "1.8.0" + ) @Throws(AppwriteException::class) suspend fun upsertDocument( databaseId: String, collectionId: String, documentId: String, - data: Any, - permissions: List<String>? = null, ): io.appwrite.models.Document<Map<String, Any>> = upsertDocument( databaseId, collectionId, documentId, - data, - permissions, nestedType = classOf(), ) @@ -1978,6 +2178,11 @@ class Databases(client: Client) : Service(client) { * @param permissions An array of permissions strings. By default, the current permissions are inherited. [Learn more about permissions](https://appwrite.io/docs/permissions). * @return [io.appwrite.models.Document<T>] */ + @Deprecated( + message = "This API has been deprecated since 1.8.0. Please use `Tables.updateRow` instead.", + replaceWith = ReplaceWith("io.appwrite.services.Tables.updateRow"), + since = "1.8.0" + ) @JvmOverloads @Throws(AppwriteException::class) suspend fun <T> updateDocument( @@ -2023,6 +2228,11 @@ class Databases(client: Client) : Service(client) { * @param permissions An array of permissions strings. By default, the current permissions are inherited. [Learn more about permissions](https://appwrite.io/docs/permissions). * @return [io.appwrite.models.Document<T>] */ + @Deprecated( + message = "This API has been deprecated since 1.8.0. Please use `Tables.updateRow` instead.", + replaceWith = ReplaceWith("io.appwrite.services.Tables.updateRow"), + since = "1.8.0" + ) @JvmOverloads @Throws(AppwriteException::class) suspend fun updateDocument( @@ -2048,6 +2258,11 @@ class Databases(client: Client) : Service(client) { * @param documentId Document ID. * @return [Any] */ + @Deprecated( + message = "This API has been deprecated since 1.8.0. Please use `Tables.deleteRow` instead.", + replaceWith = ReplaceWith("io.appwrite.services.Tables.deleteRow"), + since = "1.8.0" + ) @Throws(AppwriteException::class) suspend fun deleteDocument( databaseId: String, @@ -2080,10 +2295,15 @@ class Databases(client: Client) : Service(client) { * @param collectionId Collection ID. * @param documentId Document ID. * @param attribute Attribute key. - * @param value Value to decrement the attribute by. The value must be a number. + * @param value Value to increment the attribute by. The value must be a number. * @param min Minimum value for the attribute. If the current value is lesser than this value, an exception will be thrown. * @return [io.appwrite.models.Document<T>] */ + @Deprecated( + message = "This API has been deprecated since 1.8.0. Please use `Tables.decrementRowColumn` instead.", + replaceWith = ReplaceWith("io.appwrite.services.Tables.decrementRowColumn"), + since = "1.8.0" + ) @JvmOverloads @Throws(AppwriteException::class) suspend fun <T> decrementDocumentAttribute( @@ -2128,10 +2348,15 @@ class Databases(client: Client) : Service(client) { * @param collectionId Collection ID. * @param documentId Document ID. * @param attribute Attribute key. - * @param value Value to decrement the attribute by. The value must be a number. + * @param value Value to increment the attribute by. The value must be a number. * @param min Minimum value for the attribute. If the current value is lesser than this value, an exception will be thrown. * @return [io.appwrite.models.Document<T>] */ + @Deprecated( + message = "This API has been deprecated since 1.8.0. Please use `Tables.decrementRowColumn` instead.", + replaceWith = ReplaceWith("io.appwrite.services.Tables.decrementRowColumn"), + since = "1.8.0" + ) @JvmOverloads @Throws(AppwriteException::class) suspend fun decrementDocumentAttribute( @@ -2162,6 +2387,11 @@ class Databases(client: Client) : Service(client) { * @param max Maximum value for the attribute. If the current value is greater than this value, an error will be thrown. * @return [io.appwrite.models.Document<T>] */ + @Deprecated( + message = "This API has been deprecated since 1.8.0. Please use `Tables.incrementRowColumn` instead.", + replaceWith = ReplaceWith("io.appwrite.services.Tables.incrementRowColumn"), + since = "1.8.0" + ) @JvmOverloads @Throws(AppwriteException::class) suspend fun <T> incrementDocumentAttribute( @@ -2210,6 +2440,11 @@ class Databases(client: Client) : Service(client) { * @param max Maximum value for the attribute. If the current value is greater than this value, an error will be thrown. * @return [io.appwrite.models.Document<T>] */ + @Deprecated( + message = "This API has been deprecated since 1.8.0. Please use `Tables.incrementRowColumn` instead.", + replaceWith = ReplaceWith("io.appwrite.services.Tables.incrementRowColumn"), + since = "1.8.0" + ) @JvmOverloads @Throws(AppwriteException::class) suspend fun incrementDocumentAttribute( @@ -2237,6 +2472,11 @@ class Databases(client: Client) : Service(client) { * @param queries Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https://appwrite.io/docs/queries). Maximum of 100 queries are allowed, each 4096 characters long. You may filter on the following attributes: key, type, status, attributes, error * @return [io.appwrite.models.IndexList] */ + @Deprecated( + message = "This API has been deprecated since 1.8.0. Please use `Tables.listIndexes` instead.", + replaceWith = ReplaceWith("io.appwrite.services.Tables.listIndexes"), + since = "1.8.0" + ) @JvmOverloads @Throws(AppwriteException::class) suspend fun listIndexes( @@ -2278,6 +2518,11 @@ class Databases(client: Client) : Service(client) { * @param lengths Length of index. Maximum of 100 * @return [io.appwrite.models.Index] */ + @Deprecated( + message = "This API has been deprecated since 1.8.0. Please use `Tables.createIndex` instead.", + replaceWith = ReplaceWith("io.appwrite.services.Tables.createIndex"), + since = "1.8.0" + ) @JvmOverloads @Throws(AppwriteException::class) suspend fun createIndex( @@ -2324,6 +2569,11 @@ class Databases(client: Client) : Service(client) { * @param key Index Key. * @return [io.appwrite.models.Index] */ + @Deprecated( + message = "This API has been deprecated since 1.8.0. Please use `Tables.getIndex` instead.", + replaceWith = ReplaceWith("io.appwrite.services.Tables.getIndex"), + since = "1.8.0" + ) @Throws(AppwriteException::class) suspend fun getIndex( databaseId: String, @@ -2360,6 +2610,11 @@ class Databases(client: Client) : Service(client) { * @param key Index Key. * @return [Any] */ + @Deprecated( + message = "This API has been deprecated since 1.8.0. Please use `Tables.deleteIndex` instead.", + replaceWith = ReplaceWith("io.appwrite.services.Tables.deleteIndex"), + since = "1.8.0" + ) @Throws(AppwriteException::class) suspend fun deleteIndex( databaseId: String, diff --git a/src/main/kotlin/io/appwrite/services/Tables.kt b/src/main/kotlin/io/appwrite/services/Tables.kt new file mode 100644 index 0000000..027b003 --- /dev/null +++ b/src/main/kotlin/io/appwrite/services/Tables.kt @@ -0,0 +1,2201 @@ +package io.appwrite.services + +import io.appwrite.Client +import io.appwrite.models.* +import io.appwrite.enums.* +import io.appwrite.exceptions.AppwriteException +import io.appwrite.extensions.classOf +import okhttp3.Cookie +import java.io.File + +/** + * The Tables service allows you to create structured tables of rows, query and filter lists of rows +**/ +class Tables(client: Client) : Service(client) { + + /** + * Get a list of all tables that belong to the provided databaseId. You can use the search parameter to filter your results. + * + * @param databaseId Database ID. + * @param queries Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https://appwrite.io/docs/queries). Maximum of 100 queries are allowed, each 4096 characters long. You may filter on the following attributes: name, enabled, rowSecurity + * @param search Search term to filter your list results. Max length: 256 chars. + * @return [io.appwrite.models.TableList] + */ + @JvmOverloads + @Throws(AppwriteException::class) + suspend fun list( + databaseId: String, + queries: List<String>? = null, + search: String? = null, + ): io.appwrite.models.TableList { + val apiPath = "/databases/{databaseId}/tables" + .replace("{databaseId}", databaseId) + + val apiParams = mutableMapOf<String, Any?>( + "queries" to queries, + "search" to search, + ) + val apiHeaders = mutableMapOf<String, String>( + ) + val converter: (Any) -> io.appwrite.models.TableList = { + io.appwrite.models.TableList.from(map = it as Map<String, Any>) + } + return client.call( + "GET", + apiPath, + apiHeaders, + apiParams, + responseType = io.appwrite.models.TableList::class.java, + converter, + ) + } + + /** + * Create a new Table. Before using this route, you should create a new database resource using either a [server integration](https://appwrite.io/docs/server/databases#databasesCreateTable) API or directly from your database console. + * + * @param databaseId Database ID. + * @param tableId 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. + * @param name Table name. Max length: 128 chars. + * @param permissions An array of permissions strings. By default, no user is granted with any permissions. [Learn more about permissions](https://appwrite.io/docs/permissions). + * @param rowSecurity Enables configuring permissions for individual rows. A user needs one of row or table level permissions to access a row. [Learn more about permissions](https://appwrite.io/docs/permissions). + * @param enabled Is table enabled? When set to 'disabled', users cannot access the table but Server SDKs with and API key can still read and write to the table. No data is lost when this is toggled. + * @return [io.appwrite.models.Table] + */ + @JvmOverloads + @Throws(AppwriteException::class) + suspend fun create( + databaseId: String, + tableId: String, + name: String, + permissions: List<String>? = null, + rowSecurity: Boolean? = null, + enabled: Boolean? = null, + ): io.appwrite.models.Table { + val apiPath = "/databases/{databaseId}/tables" + .replace("{databaseId}", databaseId) + + val apiParams = mutableMapOf<String, Any?>( + "tableId" to tableId, + "name" to name, + "permissions" to permissions, + "rowSecurity" to rowSecurity, + "enabled" to enabled, + ) + val apiHeaders = mutableMapOf<String, String>( + "content-type" to "application/json", + ) + val converter: (Any) -> io.appwrite.models.Table = { + io.appwrite.models.Table.from(map = it as Map<String, Any>) + } + return client.call( + "POST", + apiPath, + apiHeaders, + apiParams, + responseType = io.appwrite.models.Table::class.java, + converter, + ) + } + + /** + * Get a table by its unique ID. This endpoint response returns a JSON object with the table metadata. + * + * @param databaseId Database ID. + * @param tableId Table ID. + * @return [io.appwrite.models.Table] + */ + @Throws(AppwriteException::class) + suspend fun get( + databaseId: String, + tableId: String, + ): io.appwrite.models.Table { + val apiPath = "/databases/{databaseId}/tables/{tableId}" + .replace("{databaseId}", databaseId) + .replace("{tableId}", tableId) + + val apiParams = mutableMapOf<String, Any?>( + ) + val apiHeaders = mutableMapOf<String, String>( + ) + val converter: (Any) -> io.appwrite.models.Table = { + io.appwrite.models.Table.from(map = it as Map<String, Any>) + } + return client.call( + "GET", + apiPath, + apiHeaders, + apiParams, + responseType = io.appwrite.models.Table::class.java, + converter, + ) + } + + /** + * Update a table by its unique ID. + * + * @param databaseId Database ID. + * @param tableId Table ID. + * @param name Table name. Max length: 128 chars. + * @param permissions An array of permission strings. By default, the current permissions are inherited. [Learn more about permissions](https://appwrite.io/docs/permissions). + * @param rowSecurity Enables configuring permissions for individual rows. A user needs one of row or table level permissions to access a document. [Learn more about permissions](https://appwrite.io/docs/permissions). + * @param enabled Is table enabled? When set to 'disabled', users cannot access the table but Server SDKs with and API key can still read and write to the table. No data is lost when this is toggled. + * @return [io.appwrite.models.Table] + */ + @JvmOverloads + @Throws(AppwriteException::class) + suspend fun update( + databaseId: String, + tableId: String, + name: String, + permissions: List<String>? = null, + rowSecurity: Boolean? = null, + enabled: Boolean? = null, + ): io.appwrite.models.Table { + val apiPath = "/databases/{databaseId}/tables/{tableId}" + .replace("{databaseId}", databaseId) + .replace("{tableId}", tableId) + + val apiParams = mutableMapOf<String, Any?>( + "name" to name, + "permissions" to permissions, + "rowSecurity" to rowSecurity, + "enabled" to enabled, + ) + val apiHeaders = mutableMapOf<String, String>( + "content-type" to "application/json", + ) + val converter: (Any) -> io.appwrite.models.Table = { + io.appwrite.models.Table.from(map = it as Map<String, Any>) + } + return client.call( + "PUT", + apiPath, + apiHeaders, + apiParams, + responseType = io.appwrite.models.Table::class.java, + converter, + ) + } + + /** + * Delete a table by its unique ID. Only users with write permissions have access to delete this resource. + * + * @param databaseId Database ID. + * @param tableId Table ID. + * @return [Any] + */ + @Throws(AppwriteException::class) + suspend fun delete( + databaseId: String, + tableId: String, + ): Any { + val apiPath = "/databases/{databaseId}/tables/{tableId}" + .replace("{databaseId}", databaseId) + .replace("{tableId}", tableId) + + val apiParams = mutableMapOf<String, Any?>( + ) + val apiHeaders = mutableMapOf<String, String>( + "content-type" to "application/json", + ) + return client.call( + "DELETE", + apiPath, + apiHeaders, + apiParams, + responseType = Any::class.java, + ) + } + + /** + * List attributes in the collection. + * + * @param databaseId Database ID. + * @param tableId Table ID. + * @param queries Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https://appwrite.io/docs/queries). Maximum of 100 queries are allowed, each 4096 characters long. You may filter on the following attributes: key, type, size, required, array, status, error + * @return [io.appwrite.models.ColumnList] + */ + @JvmOverloads + @Throws(AppwriteException::class) + suspend fun listColumns( + databaseId: String, + tableId: String, + queries: List<String>? = null, + ): io.appwrite.models.ColumnList { + val apiPath = "/databases/{databaseId}/tables/{tableId}/columns" + .replace("{databaseId}", databaseId) + .replace("{tableId}", tableId) + + val apiParams = mutableMapOf<String, Any?>( + "queries" to queries, + ) + val apiHeaders = mutableMapOf<String, String>( + ) + val converter: (Any) -> io.appwrite.models.ColumnList = { + io.appwrite.models.ColumnList.from(map = it as Map<String, Any>) + } + return client.call( + "GET", + apiPath, + apiHeaders, + apiParams, + responseType = io.appwrite.models.ColumnList::class.java, + converter, + ) + } + + /** + * Create a boolean column. + * + * @param databaseId Database ID. + * @param tableId Table ID. You can create a new table using the Database service [server integration](https://appwrite.io/docs/server/tables#tablesCreate). + * @param key Column Key. + * @param required Is column required? + * @param default Default value for column when not provided. Cannot be set when column is required. + * @param array Is column an array? + * @return [io.appwrite.models.ColumnBoolean] + */ + @JvmOverloads + @Throws(AppwriteException::class) + suspend fun createBooleanColumn( + databaseId: String, + tableId: String, + key: String, + required: Boolean, + default: Boolean? = null, + array: Boolean? = null, + ): io.appwrite.models.ColumnBoolean { + val apiPath = "/databases/{databaseId}/tables/{tableId}/columns/boolean" + .replace("{databaseId}", databaseId) + .replace("{tableId}", tableId) + + val apiParams = mutableMapOf<String, Any?>( + "key" to key, + "required" to required, + "default" to default, + "array" to array, + ) + val apiHeaders = mutableMapOf<String, String>( + "content-type" to "application/json", + ) + val converter: (Any) -> io.appwrite.models.ColumnBoolean = { + io.appwrite.models.ColumnBoolean.from(map = it as Map<String, Any>) + } + return client.call( + "POST", + apiPath, + apiHeaders, + apiParams, + responseType = io.appwrite.models.ColumnBoolean::class.java, + converter, + ) + } + + /** + * Update a boolean column. Changing the `default` value will not update already existing rows. + * + * @param databaseId Database ID. + * @param tableId Table ID. You can create a new table using the Database service [server integration](https://appwrite.io/docs/server/tables#tablesCreate). + * @param key Column Key. + * @param required Is column required? + * @param default Default value for column when not provided. Cannot be set when column is required. + * @param newKey New Column Key. + * @return [io.appwrite.models.ColumnBoolean] + */ + @JvmOverloads + @Throws(AppwriteException::class) + suspend fun updateBooleanColumn( + databaseId: String, + tableId: String, + key: String, + required: Boolean, + default: Boolean? = null, + newKey: String? = null, + ): io.appwrite.models.ColumnBoolean { + val apiPath = "/databases/{databaseId}/tables/{tableId}/columns/boolean/{key}" + .replace("{databaseId}", databaseId) + .replace("{tableId}", tableId) + .replace("{key}", key) + + val apiParams = mutableMapOf<String, Any?>( + "required" to required, + "default" to default, + "newKey" to newKey, + ) + val apiHeaders = mutableMapOf<String, String>( + "content-type" to "application/json", + ) + val converter: (Any) -> io.appwrite.models.ColumnBoolean = { + io.appwrite.models.ColumnBoolean.from(map = it as Map<String, Any>) + } + return client.call( + "PATCH", + apiPath, + apiHeaders, + apiParams, + responseType = io.appwrite.models.ColumnBoolean::class.java, + converter, + ) + } + + /** + * Create a date time column according to the ISO 8601 standard. + * + * @param databaseId Database ID. + * @param tableId Table ID. + * @param key Column Key. + * @param required Is column required? + * @param default Default value for the column in [ISO 8601](https://www.iso.org/iso-8601-date-and-time-format.html) format. Cannot be set when column is required. + * @param array Is column an array? + * @return [io.appwrite.models.ColumnDatetime] + */ + @JvmOverloads + @Throws(AppwriteException::class) + suspend fun createDatetimeColumn( + databaseId: String, + tableId: String, + key: String, + required: Boolean, + default: String? = null, + array: Boolean? = null, + ): io.appwrite.models.ColumnDatetime { + val apiPath = "/databases/{databaseId}/tables/{tableId}/columns/datetime" + .replace("{databaseId}", databaseId) + .replace("{tableId}", tableId) + + val apiParams = mutableMapOf<String, Any?>( + "key" to key, + "required" to required, + "default" to default, + "array" to array, + ) + val apiHeaders = mutableMapOf<String, String>( + "content-type" to "application/json", + ) + val converter: (Any) -> io.appwrite.models.ColumnDatetime = { + io.appwrite.models.ColumnDatetime.from(map = it as Map<String, Any>) + } + return client.call( + "POST", + apiPath, + apiHeaders, + apiParams, + responseType = io.appwrite.models.ColumnDatetime::class.java, + converter, + ) + } + + /** + * Update a date time column. Changing the `default` value will not update already existing rows. + * + * @param databaseId Database ID. + * @param tableId Table ID. + * @param key Column Key. + * @param required Is column required? + * @param default Default value for column when not provided. Cannot be set when column is required. + * @param newKey New Column Key. + * @return [io.appwrite.models.ColumnDatetime] + */ + @JvmOverloads + @Throws(AppwriteException::class) + suspend fun updateDatetimeColumn( + databaseId: String, + tableId: String, + key: String, + required: Boolean, + default: String? = null, + newKey: String? = null, + ): io.appwrite.models.ColumnDatetime { + val apiPath = "/databases/{databaseId}/tables/{tableId}/columns/datetime/{key}" + .replace("{databaseId}", databaseId) + .replace("{tableId}", tableId) + .replace("{key}", key) + + val apiParams = mutableMapOf<String, Any?>( + "required" to required, + "default" to default, + "newKey" to newKey, + ) + val apiHeaders = mutableMapOf<String, String>( + "content-type" to "application/json", + ) + val converter: (Any) -> io.appwrite.models.ColumnDatetime = { + io.appwrite.models.ColumnDatetime.from(map = it as Map<String, Any>) + } + return client.call( + "PATCH", + apiPath, + apiHeaders, + apiParams, + responseType = io.appwrite.models.ColumnDatetime::class.java, + converter, + ) + } + + /** + * Create an email column. + * + * @param databaseId Database ID. + * @param tableId Table ID. + * @param key Column Key. + * @param required Is column required? + * @param default Default value for column when not provided. Cannot be set when column is required. + * @param array Is column an array? + * @return [io.appwrite.models.ColumnEmail] + */ + @JvmOverloads + @Throws(AppwriteException::class) + suspend fun createEmailColumn( + databaseId: String, + tableId: String, + key: String, + required: Boolean, + default: String? = null, + array: Boolean? = null, + ): io.appwrite.models.ColumnEmail { + val apiPath = "/databases/{databaseId}/tables/{tableId}/columns/email" + .replace("{databaseId}", databaseId) + .replace("{tableId}", tableId) + + val apiParams = mutableMapOf<String, Any?>( + "key" to key, + "required" to required, + "default" to default, + "array" to array, + ) + val apiHeaders = mutableMapOf<String, String>( + "content-type" to "application/json", + ) + val converter: (Any) -> io.appwrite.models.ColumnEmail = { + io.appwrite.models.ColumnEmail.from(map = it as Map<String, Any>) + } + return client.call( + "POST", + apiPath, + apiHeaders, + apiParams, + responseType = io.appwrite.models.ColumnEmail::class.java, + converter, + ) + } + + /** + * Update an email column. Changing the `default` value will not update already existing rows. + * + * @param databaseId Database ID. + * @param tableId Table ID. + * @param key Column Key. + * @param required Is column required? + * @param default Default value for column when not provided. Cannot be set when column is required. + * @param newKey New Column Key. + * @return [io.appwrite.models.ColumnEmail] + */ + @JvmOverloads + @Throws(AppwriteException::class) + suspend fun updateEmailColumn( + databaseId: String, + tableId: String, + key: String, + required: Boolean, + default: String? = null, + newKey: String? = null, + ): io.appwrite.models.ColumnEmail { + val apiPath = "/databases/{databaseId}/tables/{tableId}/columns/email/{key}" + .replace("{databaseId}", databaseId) + .replace("{tableId}", tableId) + .replace("{key}", key) + + val apiParams = mutableMapOf<String, Any?>( + "required" to required, + "default" to default, + "newKey" to newKey, + ) + val apiHeaders = mutableMapOf<String, String>( + "content-type" to "application/json", + ) + val converter: (Any) -> io.appwrite.models.ColumnEmail = { + io.appwrite.models.ColumnEmail.from(map = it as Map<String, Any>) + } + return client.call( + "PATCH", + apiPath, + apiHeaders, + apiParams, + responseType = io.appwrite.models.ColumnEmail::class.java, + converter, + ) + } + + /** + * Create an enumeration column. The `elements` param acts as a white-list of accepted values for this column. + * + * @param databaseId Database ID. + * @param tableId Table ID. + * @param key Column Key. + * @param elements Array of enum values. + * @param required Is column required? + * @param default Default value for column when not provided. Cannot be set when column is required. + * @param array Is column an array? + * @return [io.appwrite.models.ColumnEnum] + */ + @JvmOverloads + @Throws(AppwriteException::class) + suspend fun createEnumColumn( + databaseId: String, + tableId: String, + key: String, + elements: List<String>, + required: Boolean, + default: String? = null, + array: Boolean? = null, + ): io.appwrite.models.ColumnEnum { + val apiPath = "/databases/{databaseId}/tables/{tableId}/columns/enum" + .replace("{databaseId}", databaseId) + .replace("{tableId}", tableId) + + val apiParams = mutableMapOf<String, Any?>( + "key" to key, + "elements" to elements, + "required" to required, + "default" to default, + "array" to array, + ) + val apiHeaders = mutableMapOf<String, String>( + "content-type" to "application/json", + ) + val converter: (Any) -> io.appwrite.models.ColumnEnum = { + io.appwrite.models.ColumnEnum.from(map = it as Map<String, Any>) + } + return client.call( + "POST", + apiPath, + apiHeaders, + apiParams, + responseType = io.appwrite.models.ColumnEnum::class.java, + converter, + ) + } + + /** + * Update an enum column. Changing the `default` value will not update already existing rows. + * + * @param databaseId Database ID. + * @param tableId Table ID. + * @param key Column Key. + * @param elements Updated list of enum values. + * @param required Is column required? + * @param default Default value for column when not provided. Cannot be set when column is required. + * @param newKey New Column Key. + * @return [io.appwrite.models.ColumnEnum] + */ + @JvmOverloads + @Throws(AppwriteException::class) + suspend fun updateEnumColumn( + databaseId: String, + tableId: String, + key: String, + elements: List<String>, + required: Boolean, + default: String? = null, + newKey: String? = null, + ): io.appwrite.models.ColumnEnum { + val apiPath = "/databases/{databaseId}/tables/{tableId}/columns/enum/{key}" + .replace("{databaseId}", databaseId) + .replace("{tableId}", tableId) + .replace("{key}", key) + + val apiParams = mutableMapOf<String, Any?>( + "elements" to elements, + "required" to required, + "default" to default, + "newKey" to newKey, + ) + val apiHeaders = mutableMapOf<String, String>( + "content-type" to "application/json", + ) + val converter: (Any) -> io.appwrite.models.ColumnEnum = { + io.appwrite.models.ColumnEnum.from(map = it as Map<String, Any>) + } + return client.call( + "PATCH", + apiPath, + apiHeaders, + apiParams, + responseType = io.appwrite.models.ColumnEnum::class.java, + converter, + ) + } + + /** + * Create a float column. Optionally, minimum and maximum values can be provided. + * + * @param databaseId Database ID. + * @param tableId Table ID. + * @param key Column Key. + * @param required Is column required? + * @param min Minimum value + * @param max Maximum value + * @param default Default value. Cannot be set when required. + * @param array Is column an array? + * @return [io.appwrite.models.ColumnFloat] + */ + @JvmOverloads + @Throws(AppwriteException::class) + suspend fun createFloatColumn( + databaseId: String, + tableId: String, + key: String, + required: Boolean, + min: Double? = null, + max: Double? = null, + default: Double? = null, + array: Boolean? = null, + ): io.appwrite.models.ColumnFloat { + val apiPath = "/databases/{databaseId}/tables/{tableId}/columns/float" + .replace("{databaseId}", databaseId) + .replace("{tableId}", tableId) + + val apiParams = mutableMapOf<String, Any?>( + "key" to key, + "required" to required, + "min" to min, + "max" to max, + "default" to default, + "array" to array, + ) + val apiHeaders = mutableMapOf<String, String>( + "content-type" to "application/json", + ) + val converter: (Any) -> io.appwrite.models.ColumnFloat = { + io.appwrite.models.ColumnFloat.from(map = it as Map<String, Any>) + } + return client.call( + "POST", + apiPath, + apiHeaders, + apiParams, + responseType = io.appwrite.models.ColumnFloat::class.java, + converter, + ) + } + + /** + * Update a float column. Changing the `default` value will not update already existing rows. + * + * @param databaseId Database ID. + * @param tableId Table ID. + * @param key Column Key. + * @param required Is column required? + * @param default Default value. Cannot be set when required. + * @param min Minimum value + * @param max Maximum value + * @param newKey New Column Key. + * @return [io.appwrite.models.ColumnFloat] + */ + @JvmOverloads + @Throws(AppwriteException::class) + suspend fun updateFloatColumn( + databaseId: String, + tableId: String, + key: String, + required: Boolean, + default: Double? = null, + min: Double? = null, + max: Double? = null, + newKey: String? = null, + ): io.appwrite.models.ColumnFloat { + val apiPath = "/databases/{databaseId}/tables/{tableId}/columns/float/{key}" + .replace("{databaseId}", databaseId) + .replace("{tableId}", tableId) + .replace("{key}", key) + + val apiParams = mutableMapOf<String, Any?>( + "required" to required, + "min" to min, + "max" to max, + "default" to default, + "newKey" to newKey, + ) + val apiHeaders = mutableMapOf<String, String>( + "content-type" to "application/json", + ) + val converter: (Any) -> io.appwrite.models.ColumnFloat = { + io.appwrite.models.ColumnFloat.from(map = it as Map<String, Any>) + } + return client.call( + "PATCH", + apiPath, + apiHeaders, + apiParams, + responseType = io.appwrite.models.ColumnFloat::class.java, + converter, + ) + } + + /** + * Create an integer column. Optionally, minimum and maximum values can be provided. + * + * @param databaseId Database ID. + * @param tableId Table ID. + * @param key Column Key. + * @param required Is column required? + * @param min Minimum value + * @param max Maximum value + * @param default Default value. Cannot be set when column is required. + * @param array Is column an array? + * @return [io.appwrite.models.ColumnInteger] + */ + @JvmOverloads + @Throws(AppwriteException::class) + suspend fun createIntegerColumn( + databaseId: String, + tableId: String, + key: String, + required: Boolean, + min: Long? = null, + max: Long? = null, + default: Long? = null, + array: Boolean? = null, + ): io.appwrite.models.ColumnInteger { + val apiPath = "/databases/{databaseId}/tables/{tableId}/columns/integer" + .replace("{databaseId}", databaseId) + .replace("{tableId}", tableId) + + val apiParams = mutableMapOf<String, Any?>( + "key" to key, + "required" to required, + "min" to min, + "max" to max, + "default" to default, + "array" to array, + ) + val apiHeaders = mutableMapOf<String, String>( + "content-type" to "application/json", + ) + val converter: (Any) -> io.appwrite.models.ColumnInteger = { + io.appwrite.models.ColumnInteger.from(map = it as Map<String, Any>) + } + return client.call( + "POST", + apiPath, + apiHeaders, + apiParams, + responseType = io.appwrite.models.ColumnInteger::class.java, + converter, + ) + } + + /** + * Update an integer column. Changing the `default` value will not update already existing rows. + * + * @param databaseId Database ID. + * @param tableId Table ID. + * @param key Column Key. + * @param required Is column required? + * @param default Default value. Cannot be set when column is required. + * @param min Minimum value + * @param max Maximum value + * @param newKey New Column Key. + * @return [io.appwrite.models.ColumnInteger] + */ + @JvmOverloads + @Throws(AppwriteException::class) + suspend fun updateIntegerColumn( + databaseId: String, + tableId: String, + key: String, + required: Boolean, + default: Long? = null, + min: Long? = null, + max: Long? = null, + newKey: String? = null, + ): io.appwrite.models.ColumnInteger { + val apiPath = "/databases/{databaseId}/tables/{tableId}/columns/integer/{key}" + .replace("{databaseId}", databaseId) + .replace("{tableId}", tableId) + .replace("{key}", key) + + val apiParams = mutableMapOf<String, Any?>( + "required" to required, + "min" to min, + "max" to max, + "default" to default, + "newKey" to newKey, + ) + val apiHeaders = mutableMapOf<String, String>( + "content-type" to "application/json", + ) + val converter: (Any) -> io.appwrite.models.ColumnInteger = { + io.appwrite.models.ColumnInteger.from(map = it as Map<String, Any>) + } + return client.call( + "PATCH", + apiPath, + apiHeaders, + apiParams, + responseType = io.appwrite.models.ColumnInteger::class.java, + converter, + ) + } + + /** + * Create IP address column. + * + * @param databaseId Database ID. + * @param tableId Table ID. + * @param key Column Key. + * @param required Is column required? + * @param default Default value. Cannot be set when column is required. + * @param array Is column an array? + * @return [io.appwrite.models.ColumnIp] + */ + @JvmOverloads + @Throws(AppwriteException::class) + suspend fun createIpColumn( + databaseId: String, + tableId: String, + key: String, + required: Boolean, + default: String? = null, + array: Boolean? = null, + ): io.appwrite.models.ColumnIp { + val apiPath = "/databases/{databaseId}/tables/{tableId}/columns/ip" + .replace("{databaseId}", databaseId) + .replace("{tableId}", tableId) + + val apiParams = mutableMapOf<String, Any?>( + "key" to key, + "required" to required, + "default" to default, + "array" to array, + ) + val apiHeaders = mutableMapOf<String, String>( + "content-type" to "application/json", + ) + val converter: (Any) -> io.appwrite.models.ColumnIp = { + io.appwrite.models.ColumnIp.from(map = it as Map<String, Any>) + } + return client.call( + "POST", + apiPath, + apiHeaders, + apiParams, + responseType = io.appwrite.models.ColumnIp::class.java, + converter, + ) + } + + /** + * Update an ip column. Changing the `default` value will not update already existing rows. + * + * @param databaseId Database ID. + * @param tableId Table ID. + * @param key Column Key. + * @param required Is column required? + * @param default Default value. Cannot be set when column is required. + * @param newKey New Column Key. + * @return [io.appwrite.models.ColumnIp] + */ + @JvmOverloads + @Throws(AppwriteException::class) + suspend fun updateIpColumn( + databaseId: String, + tableId: String, + key: String, + required: Boolean, + default: String? = null, + newKey: String? = null, + ): io.appwrite.models.ColumnIp { + val apiPath = "/databases/{databaseId}/tables/{tableId}/columns/ip/{key}" + .replace("{databaseId}", databaseId) + .replace("{tableId}", tableId) + .replace("{key}", key) + + val apiParams = mutableMapOf<String, Any?>( + "required" to required, + "default" to default, + "newKey" to newKey, + ) + val apiHeaders = mutableMapOf<String, String>( + "content-type" to "application/json", + ) + val converter: (Any) -> io.appwrite.models.ColumnIp = { + io.appwrite.models.ColumnIp.from(map = it as Map<String, Any>) + } + return client.call( + "PATCH", + apiPath, + apiHeaders, + apiParams, + responseType = io.appwrite.models.ColumnIp::class.java, + converter, + ) + } + + /** + * Create relationship column. [Learn more about relationship columns](https://appwrite.io/docs/databases-relationships#relationship-columns). + * + * @param databaseId Database ID. + * @param tableId Table ID. + * @param relatedTableId Related Table ID. + * @param type Relation type + * @param twoWay Is Two Way? + * @param key Column Key. + * @param twoWayKey Two Way Column Key. + * @param onDelete Constraints option + * @return [io.appwrite.models.ColumnRelationship] + */ + @JvmOverloads + @Throws(AppwriteException::class) + suspend fun createRelationshipColumn( + databaseId: String, + tableId: String, + relatedTableId: String, + type: io.appwrite.enums.RelationshipType, + twoWay: Boolean? = null, + key: String? = null, + twoWayKey: String? = null, + onDelete: io.appwrite.enums.RelationMutate? = null, + ): io.appwrite.models.ColumnRelationship { + val apiPath = "/databases/{databaseId}/tables/{tableId}/columns/relationship" + .replace("{databaseId}", databaseId) + .replace("{tableId}", tableId) + + val apiParams = mutableMapOf<String, Any?>( + "relatedTableId" to relatedTableId, + "type" to type, + "twoWay" to twoWay, + "key" to key, + "twoWayKey" to twoWayKey, + "onDelete" to onDelete, + ) + val apiHeaders = mutableMapOf<String, String>( + "content-type" to "application/json", + ) + val converter: (Any) -> io.appwrite.models.ColumnRelationship = { + io.appwrite.models.ColumnRelationship.from(map = it as Map<String, Any>) + } + return client.call( + "POST", + apiPath, + apiHeaders, + apiParams, + responseType = io.appwrite.models.ColumnRelationship::class.java, + converter, + ) + } + + /** + * Create a string column. + * + * @param databaseId Database ID. + * @param tableId Table ID. You can create a new table using the Database service [server integration](https://appwrite.io/docs/server/tables#tablesCreate). + * @param key Column Key. + * @param size Attribute size for text attributes, in number of characters. + * @param required Is column required? + * @param default Default value for column when not provided. Cannot be set when column is required. + * @param array Is column an array? + * @param encrypt Toggle encryption for the column. Encryption enhances security by not storing any plain text values in the database. However, encrypted columns cannot be queried. + * @return [io.appwrite.models.ColumnString] + */ + @JvmOverloads + @Throws(AppwriteException::class) + suspend fun createStringColumn( + databaseId: String, + tableId: String, + key: String, + size: Long, + required: Boolean, + default: String? = null, + array: Boolean? = null, + encrypt: Boolean? = null, + ): io.appwrite.models.ColumnString { + val apiPath = "/databases/{databaseId}/tables/{tableId}/columns/string" + .replace("{databaseId}", databaseId) + .replace("{tableId}", tableId) + + val apiParams = mutableMapOf<String, Any?>( + "key" to key, + "size" to size, + "required" to required, + "default" to default, + "array" to array, + "encrypt" to encrypt, + ) + val apiHeaders = mutableMapOf<String, String>( + "content-type" to "application/json", + ) + val converter: (Any) -> io.appwrite.models.ColumnString = { + io.appwrite.models.ColumnString.from(map = it as Map<String, Any>) + } + return client.call( + "POST", + apiPath, + apiHeaders, + apiParams, + responseType = io.appwrite.models.ColumnString::class.java, + converter, + ) + } + + /** + * Update a string column. Changing the `default` value will not update already existing rows. + * + * @param databaseId Database ID. + * @param tableId Table ID. You can create a new table using the Database service [server integration](https://appwrite.io/docs/server/tables#tablesCreate). + * @param key Column Key. + * @param required Is column required? + * @param default Default value for column when not provided. Cannot be set when column is required. + * @param size Maximum size of the string column. + * @param newKey New Column Key. + * @return [io.appwrite.models.ColumnString] + */ + @JvmOverloads + @Throws(AppwriteException::class) + suspend fun updateStringColumn( + databaseId: String, + tableId: String, + key: String, + required: Boolean, + default: String? = null, + size: Long? = null, + newKey: String? = null, + ): io.appwrite.models.ColumnString { + val apiPath = "/databases/{databaseId}/tables/{tableId}/columns/string/{key}" + .replace("{databaseId}", databaseId) + .replace("{tableId}", tableId) + .replace("{key}", key) + + val apiParams = mutableMapOf<String, Any?>( + "required" to required, + "default" to default, + "size" to size, + "newKey" to newKey, + ) + val apiHeaders = mutableMapOf<String, String>( + "content-type" to "application/json", + ) + val converter: (Any) -> io.appwrite.models.ColumnString = { + io.appwrite.models.ColumnString.from(map = it as Map<String, Any>) + } + return client.call( + "PATCH", + apiPath, + apiHeaders, + apiParams, + responseType = io.appwrite.models.ColumnString::class.java, + converter, + ) + } + + /** + * Create a URL column. + * + * @param databaseId Database ID. + * @param tableId Table ID. + * @param key Column Key. + * @param required Is column required? + * @param default Default value for column when not provided. Cannot be set when column is required. + * @param array Is column an array? + * @return [io.appwrite.models.ColumnUrl] + */ + @JvmOverloads + @Throws(AppwriteException::class) + suspend fun createUrlColumn( + databaseId: String, + tableId: String, + key: String, + required: Boolean, + default: String? = null, + array: Boolean? = null, + ): io.appwrite.models.ColumnUrl { + val apiPath = "/databases/{databaseId}/tables/{tableId}/columns/url" + .replace("{databaseId}", databaseId) + .replace("{tableId}", tableId) + + val apiParams = mutableMapOf<String, Any?>( + "key" to key, + "required" to required, + "default" to default, + "array" to array, + ) + val apiHeaders = mutableMapOf<String, String>( + "content-type" to "application/json", + ) + val converter: (Any) -> io.appwrite.models.ColumnUrl = { + io.appwrite.models.ColumnUrl.from(map = it as Map<String, Any>) + } + return client.call( + "POST", + apiPath, + apiHeaders, + apiParams, + responseType = io.appwrite.models.ColumnUrl::class.java, + converter, + ) + } + + /** + * Update an url column. Changing the `default` value will not update already existing rows. + * + * @param databaseId Database ID. + * @param tableId Table ID. + * @param key Column Key. + * @param required Is column required? + * @param default Default value for column when not provided. Cannot be set when column is required. + * @param newKey New Column Key. + * @return [io.appwrite.models.ColumnUrl] + */ + @JvmOverloads + @Throws(AppwriteException::class) + suspend fun updateUrlColumn( + databaseId: String, + tableId: String, + key: String, + required: Boolean, + default: String? = null, + newKey: String? = null, + ): io.appwrite.models.ColumnUrl { + val apiPath = "/databases/{databaseId}/tables/{tableId}/columns/url/{key}" + .replace("{databaseId}", databaseId) + .replace("{tableId}", tableId) + .replace("{key}", key) + + val apiParams = mutableMapOf<String, Any?>( + "required" to required, + "default" to default, + "newKey" to newKey, + ) + val apiHeaders = mutableMapOf<String, String>( + "content-type" to "application/json", + ) + val converter: (Any) -> io.appwrite.models.ColumnUrl = { + io.appwrite.models.ColumnUrl.from(map = it as Map<String, Any>) + } + return client.call( + "PATCH", + apiPath, + apiHeaders, + apiParams, + responseType = io.appwrite.models.ColumnUrl::class.java, + converter, + ) + } + + /** + * Get column by ID. + * + * @param databaseId Database ID. + * @param tableId Table ID. + * @param key Column Key. + * @return [Any] + */ + @Throws(AppwriteException::class) + suspend fun getColumn( + databaseId: String, + tableId: String, + key: String, + ): Any { + val apiPath = "/databases/{databaseId}/tables/{tableId}/columns/{key}" + .replace("{databaseId}", databaseId) + .replace("{tableId}", tableId) + .replace("{key}", key) + + val apiParams = mutableMapOf<String, Any?>( + ) + val apiHeaders = mutableMapOf<String, String>( + ) + return client.call( + "GET", + apiPath, + apiHeaders, + apiParams, + responseType = Any::class.java, + ) + } + + /** + * Deletes a column. + * + * @param databaseId Database ID. + * @param tableId Table ID. + * @param key Column Key. + * @return [Any] + */ + @Throws(AppwriteException::class) + suspend fun deleteColumn( + databaseId: String, + tableId: String, + key: String, + ): Any { + val apiPath = "/databases/{databaseId}/tables/{tableId}/columns/{key}" + .replace("{databaseId}", databaseId) + .replace("{tableId}", tableId) + .replace("{key}", key) + + val apiParams = mutableMapOf<String, Any?>( + ) + val apiHeaders = mutableMapOf<String, String>( + "content-type" to "application/json", + ) + return client.call( + "DELETE", + apiPath, + apiHeaders, + apiParams, + responseType = Any::class.java, + ) + } + + /** + * Update relationship column. [Learn more about relationship columns](https://appwrite.io/docs/databases-relationships#relationship-columns). + * + * @param databaseId Database ID. + * @param tableId Table ID. + * @param key Column Key. + * @param onDelete Constraints option + * @param newKey New Column Key. + * @return [io.appwrite.models.ColumnRelationship] + */ + @JvmOverloads + @Throws(AppwriteException::class) + suspend fun updateRelationshipColumn( + databaseId: String, + tableId: String, + key: String, + onDelete: io.appwrite.enums.RelationMutate? = null, + newKey: String? = null, + ): io.appwrite.models.ColumnRelationship { + val apiPath = "/databases/{databaseId}/tables/{tableId}/columns/{key}/relationship" + .replace("{databaseId}", databaseId) + .replace("{tableId}", tableId) + .replace("{key}", key) + + val apiParams = mutableMapOf<String, Any?>( + "onDelete" to onDelete, + "newKey" to newKey, + ) + val apiHeaders = mutableMapOf<String, String>( + "content-type" to "application/json", + ) + val converter: (Any) -> io.appwrite.models.ColumnRelationship = { + io.appwrite.models.ColumnRelationship.from(map = it as Map<String, Any>) + } + return client.call( + "PATCH", + apiPath, + apiHeaders, + apiParams, + responseType = io.appwrite.models.ColumnRelationship::class.java, + converter, + ) + } + + /** + * List indexes in the collection. + * + * @param databaseId Database ID. + * @param tableId Table ID. You can create a new table using the Database service [server integration](https://appwrite.io/docs/server/tables#tablesCreate). + * @param queries Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https://appwrite.io/docs/queries). Maximum of 100 queries are allowed, each 4096 characters long. You may filter on the following attributes: key, type, status, attributes, error + * @return [io.appwrite.models.ColumnIndexList] + */ + @JvmOverloads + @Throws(AppwriteException::class) + suspend fun listIndexes( + databaseId: String, + tableId: String, + queries: List<String>? = null, + ): io.appwrite.models.ColumnIndexList { + val apiPath = "/databases/{databaseId}/tables/{tableId}/indexes" + .replace("{databaseId}", databaseId) + .replace("{tableId}", tableId) + + val apiParams = mutableMapOf<String, Any?>( + "queries" to queries, + ) + val apiHeaders = mutableMapOf<String, String>( + ) + val converter: (Any) -> io.appwrite.models.ColumnIndexList = { + io.appwrite.models.ColumnIndexList.from(map = it as Map<String, Any>) + } + return client.call( + "GET", + apiPath, + apiHeaders, + apiParams, + responseType = io.appwrite.models.ColumnIndexList::class.java, + converter, + ) + } + + /** + * Creates an index on the attributes listed. Your index should include all the attributes you will query in a single request.Attributes can be `key`, `fulltext`, and `unique`. + * + * @param databaseId Database ID. + * @param tableId Table ID. You can create a new table using the Database service [server integration](https://appwrite.io/docs/server/tables#tablesCreate). + * @param key Index Key. + * @param type Index type. + * @param columns Array of columns to index. Maximum of 100 columns are allowed, each 32 characters long. + * @param orders Array of index orders. Maximum of 100 orders are allowed. + * @param lengths Length of index. Maximum of 100 + * @return [io.appwrite.models.ColumnIndex] + */ + @JvmOverloads + @Throws(AppwriteException::class) + suspend fun createIndex( + databaseId: String, + tableId: String, + key: String, + type: io.appwrite.enums.IndexType, + columns: List<String>, + orders: List<String>? = null, + lengths: List<Long>? = null, + ): io.appwrite.models.ColumnIndex { + val apiPath = "/databases/{databaseId}/tables/{tableId}/indexes" + .replace("{databaseId}", databaseId) + .replace("{tableId}", tableId) + + val apiParams = mutableMapOf<String, Any?>( + "key" to key, + "type" to type, + "columns" to columns, + "orders" to orders, + "lengths" to lengths, + ) + val apiHeaders = mutableMapOf<String, String>( + "content-type" to "application/json", + ) + val converter: (Any) -> io.appwrite.models.ColumnIndex = { + io.appwrite.models.ColumnIndex.from(map = it as Map<String, Any>) + } + return client.call( + "POST", + apiPath, + apiHeaders, + apiParams, + responseType = io.appwrite.models.ColumnIndex::class.java, + converter, + ) + } + + /** + * Get index by ID. + * + * @param databaseId Database ID. + * @param tableId Table ID. You can create a new table using the Database service [server integration](https://appwrite.io/docs/server/tables#tablesCreate). + * @param key Index Key. + * @return [io.appwrite.models.ColumnIndex] + */ + @Throws(AppwriteException::class) + suspend fun getIndex( + databaseId: String, + tableId: String, + key: String, + ): io.appwrite.models.ColumnIndex { + val apiPath = "/databases/{databaseId}/tables/{tableId}/indexes/{key}" + .replace("{databaseId}", databaseId) + .replace("{tableId}", tableId) + .replace("{key}", key) + + val apiParams = mutableMapOf<String, Any?>( + ) + val apiHeaders = mutableMapOf<String, String>( + ) + val converter: (Any) -> io.appwrite.models.ColumnIndex = { + io.appwrite.models.ColumnIndex.from(map = it as Map<String, Any>) + } + return client.call( + "GET", + apiPath, + apiHeaders, + apiParams, + responseType = io.appwrite.models.ColumnIndex::class.java, + converter, + ) + } + + /** + * Delete an index. + * + * @param databaseId Database ID. + * @param tableId Table ID. You can create a new table using the Database service [server integration](https://appwrite.io/docs/server/tables#tablesCreate). + * @param key Index Key. + * @return [Any] + */ + @Throws(AppwriteException::class) + suspend fun deleteIndex( + databaseId: String, + tableId: String, + key: String, + ): Any { + val apiPath = "/databases/{databaseId}/tables/{tableId}/indexes/{key}" + .replace("{databaseId}", databaseId) + .replace("{tableId}", tableId) + .replace("{key}", key) + + val apiParams = mutableMapOf<String, Any?>( + ) + val apiHeaders = mutableMapOf<String, String>( + "content-type" to "application/json", + ) + return client.call( + "DELETE", + apiPath, + apiHeaders, + apiParams, + responseType = Any::class.java, + ) + } + + /** + * Get a list of all the user's rows in a given table. You can use the query params to filter your results. + * + * @param databaseId Database ID. + * @param tableId Table ID. You can create a new table using the Database service [server integration](https://appwrite.io/docs/server/tables#tablesCreate). + * @param queries 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. + * @return [io.appwrite.models.RowList<T>] + */ + @JvmOverloads + @Throws(AppwriteException::class) + suspend fun <T> listRows( + databaseId: String, + tableId: String, + queries: List<String>? = null, + nestedType: Class<T>, + ): io.appwrite.models.RowList<T> { + val apiPath = "/databases/{databaseId}/tables/{tableId}/rows" + .replace("{databaseId}", databaseId) + .replace("{tableId}", tableId) + + val apiParams = mutableMapOf<String, Any?>( + "queries" to queries, + ) + val apiHeaders = mutableMapOf<String, String>( + ) + val converter: (Any) -> io.appwrite.models.RowList<T> = { + io.appwrite.models.RowList.from(map = it as Map<String, Any>, nestedType) + } + return client.call( + "GET", + apiPath, + apiHeaders, + apiParams, + responseType = classOf(), + converter, + ) + } + + /** + * Get a list of all the user's rows in a given table. You can use the query params to filter your results. + * + * @param databaseId Database ID. + * @param tableId Table ID. You can create a new table using the Database service [server integration](https://appwrite.io/docs/server/tables#tablesCreate). + * @param queries 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. + * @return [io.appwrite.models.RowList<T>] + */ + @JvmOverloads + @Throws(AppwriteException::class) + suspend fun listRows( + databaseId: String, + tableId: String, + queries: List<String>? = null, + ): io.appwrite.models.RowList<Map<String, Any>> = listRows( + databaseId, + tableId, + queries, + nestedType = classOf(), + ) + + /** + * Create a new Row. Before using this route, you should create a new table resource using either a [server integration](https://appwrite.io/docs/server/databases#databasesCreateTable) API or directly from your database console. + * + * @param databaseId Database ID. + * @param tableId Table ID. You can create a new table using the Database service [server integration](https://appwrite.io/docs/server/tables#tablesCreate). Make sure to define columns before creating rows. + * @param rowId Row 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. + * @param data Row data as JSON object. + * @param permissions An array of permissions strings. By default, only the current user is granted all permissions. [Learn more about permissions](https://appwrite.io/docs/permissions). + * @return [io.appwrite.models.Row<T>] + */ + @JvmOverloads + @Throws(AppwriteException::class) + suspend fun <T> createRow( + databaseId: String, + tableId: String, + rowId: String, + data: Any, + permissions: List<String>? = null, + nestedType: Class<T>, + ): io.appwrite.models.Row<T> { + val apiPath = "/databases/{databaseId}/tables/{tableId}/rows" + .replace("{databaseId}", databaseId) + .replace("{tableId}", tableId) + + val apiParams = mutableMapOf<String, Any?>( + "rowId" to rowId, + "data" to data, + "permissions" to permissions, + ) + val apiHeaders = mutableMapOf<String, String>( + "content-type" to "application/json", + ) + val converter: (Any) -> io.appwrite.models.Row<T> = { + io.appwrite.models.Row.from(map = it as Map<String, Any>, nestedType) + } + return client.call( + "POST", + apiPath, + apiHeaders, + apiParams, + responseType = classOf(), + converter, + ) + } + + /** + * Create a new Row. Before using this route, you should create a new table resource using either a [server integration](https://appwrite.io/docs/server/databases#databasesCreateTable) API or directly from your database console. + * + * @param databaseId Database ID. + * @param tableId Table ID. You can create a new table using the Database service [server integration](https://appwrite.io/docs/server/tables#tablesCreate). Make sure to define columns before creating rows. + * @param rowId Row 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. + * @param data Row data as JSON object. + * @param permissions An array of permissions strings. By default, only the current user is granted all permissions. [Learn more about permissions](https://appwrite.io/docs/permissions). + * @return [io.appwrite.models.Row<T>] + */ + @JvmOverloads + @Throws(AppwriteException::class) + suspend fun createRow( + databaseId: String, + tableId: String, + rowId: String, + data: Any, + permissions: List<String>? = null, + ): io.appwrite.models.Row<Map<String, Any>> = createRow( + databaseId, + tableId, + rowId, + data, + permissions, + nestedType = classOf(), + ) + + /** + * Create new Rows. Before using this route, you should create a new table resource using either a [server integration](https://appwrite.io/docs/server/databases#databasesCreateTable) API or directly from your database console. + * + * @param databaseId Database ID. + * @param tableId Table ID. You can create a new table using the Database service [server integration](https://appwrite.io/docs/server/tables#tablesCreate). Make sure to define columns before creating rows. + * @param rows Array of documents data as JSON objects. + * @return [io.appwrite.models.RowList<T>] + */ + @Throws(AppwriteException::class) + suspend fun <T> createRows( + databaseId: String, + tableId: String, + rows: List<Any>, + nestedType: Class<T>, + ): io.appwrite.models.RowList<T> { + val apiPath = "/databases/{databaseId}/tables/{tableId}/rows" + .replace("{databaseId}", databaseId) + .replace("{tableId}", tableId) + + val apiParams = mutableMapOf<String, Any?>( + "rows" to rows, + ) + val apiHeaders = mutableMapOf<String, String>( + "content-type" to "application/json", + ) + val converter: (Any) -> io.appwrite.models.RowList<T> = { + io.appwrite.models.RowList.from(map = it as Map<String, Any>, nestedType) + } + return client.call( + "POST", + apiPath, + apiHeaders, + apiParams, + responseType = classOf(), + converter, + ) + } + + /** + * Create new Rows. Before using this route, you should create a new table resource using either a [server integration](https://appwrite.io/docs/server/databases#databasesCreateTable) API or directly from your database console. + * + * @param databaseId Database ID. + * @param tableId Table ID. You can create a new table using the Database service [server integration](https://appwrite.io/docs/server/tables#tablesCreate). Make sure to define columns before creating rows. + * @param rows Array of documents data as JSON objects. + * @return [io.appwrite.models.RowList<T>] + */ + @Throws(AppwriteException::class) + suspend fun createRows( + databaseId: String, + tableId: String, + rows: List<Any>, + ): io.appwrite.models.RowList<Map<String, Any>> = createRows( + databaseId, + tableId, + rows, + nestedType = classOf(), + ) + + /** + * Create or update Rows. Before using this route, you should create a new table resource using either a [server integration](https://appwrite.io/docs/server/databases#databasesCreateTable) API or directly from your database console. + * + * @param databaseId Database ID. + * @param tableId Table ID. + * @return [io.appwrite.models.RowList<T>] + */ + @Throws(AppwriteException::class) + suspend fun <T> upsertRows( + databaseId: String, + tableId: String, + nestedType: Class<T>, + ): io.appwrite.models.RowList<T> { + val apiPath = "/databases/{databaseId}/tables/{tableId}/rows" + .replace("{databaseId}", databaseId) + .replace("{tableId}", tableId) + + val apiParams = mutableMapOf<String, Any?>( + ) + val apiHeaders = mutableMapOf<String, String>( + "content-type" to "application/json", + ) + val converter: (Any) -> io.appwrite.models.RowList<T> = { + io.appwrite.models.RowList.from(map = it as Map<String, Any>, nestedType) + } + return client.call( + "PUT", + apiPath, + apiHeaders, + apiParams, + responseType = classOf(), + converter, + ) + } + + /** + * Create or update Rows. Before using this route, you should create a new table resource using either a [server integration](https://appwrite.io/docs/server/databases#databasesCreateTable) API or directly from your database console. + * + * @param databaseId Database ID. + * @param tableId Table ID. + * @return [io.appwrite.models.RowList<T>] + */ + @Throws(AppwriteException::class) + suspend fun upsertRows( + databaseId: String, + tableId: String, + ): io.appwrite.models.RowList<Map<String, Any>> = upsertRows( + databaseId, + tableId, + nestedType = classOf(), + ) + + /** + * Update all rows that match your queries, if no queries are submitted then all rows are updated. You can pass only specific fields to be updated. + * + * @param databaseId Database ID. + * @param tableId Table ID. + * @param data Row data as JSON object. Include only column and value pairs to be updated. + * @param queries 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. + * @return [io.appwrite.models.RowList<T>] + */ + @JvmOverloads + @Throws(AppwriteException::class) + suspend fun <T> updateRows( + databaseId: String, + tableId: String, + data: Any? = null, + queries: List<String>? = null, + nestedType: Class<T>, + ): io.appwrite.models.RowList<T> { + val apiPath = "/databases/{databaseId}/tables/{tableId}/rows" + .replace("{databaseId}", databaseId) + .replace("{tableId}", tableId) + + val apiParams = mutableMapOf<String, Any?>( + "data" to data, + "queries" to queries, + ) + val apiHeaders = mutableMapOf<String, String>( + "content-type" to "application/json", + ) + val converter: (Any) -> io.appwrite.models.RowList<T> = { + io.appwrite.models.RowList.from(map = it as Map<String, Any>, nestedType) + } + return client.call( + "PATCH", + apiPath, + apiHeaders, + apiParams, + responseType = classOf(), + converter, + ) + } + + /** + * Update all rows that match your queries, if no queries are submitted then all rows are updated. You can pass only specific fields to be updated. + * + * @param databaseId Database ID. + * @param tableId Table ID. + * @param data Row data as JSON object. Include only column and value pairs to be updated. + * @param queries 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. + * @return [io.appwrite.models.RowList<T>] + */ + @JvmOverloads + @Throws(AppwriteException::class) + suspend fun updateRows( + databaseId: String, + tableId: String, + data: Any? = null, + queries: List<String>? = null, + ): io.appwrite.models.RowList<Map<String, Any>> = updateRows( + databaseId, + tableId, + data, + queries, + nestedType = classOf(), + ) + + /** + * Bulk delete rows using queries, if no queries are passed then all rows are deleted. + * + * @param databaseId Database ID. + * @param tableId Table ID. You can create a new table using the Database service [server integration](https://appwrite.io/docs/server/tables#tablesCreate). + * @param queries 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. + * @return [io.appwrite.models.RowList<T>] + */ + @JvmOverloads + @Throws(AppwriteException::class) + suspend fun <T> deleteRows( + databaseId: String, + tableId: String, + queries: List<String>? = null, + nestedType: Class<T>, + ): io.appwrite.models.RowList<T> { + val apiPath = "/databases/{databaseId}/tables/{tableId}/rows" + .replace("{databaseId}", databaseId) + .replace("{tableId}", tableId) + + val apiParams = mutableMapOf<String, Any?>( + "queries" to queries, + ) + val apiHeaders = mutableMapOf<String, String>( + "content-type" to "application/json", + ) + val converter: (Any) -> io.appwrite.models.RowList<T> = { + io.appwrite.models.RowList.from(map = it as Map<String, Any>, nestedType) + } + return client.call( + "DELETE", + apiPath, + apiHeaders, + apiParams, + responseType = classOf(), + converter, + ) + } + + /** + * Bulk delete rows using queries, if no queries are passed then all rows are deleted. + * + * @param databaseId Database ID. + * @param tableId Table ID. You can create a new table using the Database service [server integration](https://appwrite.io/docs/server/tables#tablesCreate). + * @param queries 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. + * @return [io.appwrite.models.RowList<T>] + */ + @JvmOverloads + @Throws(AppwriteException::class) + suspend fun deleteRows( + databaseId: String, + tableId: String, + queries: List<String>? = null, + ): io.appwrite.models.RowList<Map<String, Any>> = deleteRows( + databaseId, + tableId, + queries, + nestedType = classOf(), + ) + + /** + * Get a row by its unique ID. This endpoint response returns a JSON object with the row data. + * + * @param databaseId Database ID. + * @param tableId Table ID. You can create a new table using the Database service [server integration](https://appwrite.io/docs/server/tables#tablesCreate). + * @param rowId Row ID. + * @param queries 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. + * @return [io.appwrite.models.Row<T>] + */ + @JvmOverloads + @Throws(AppwriteException::class) + suspend fun <T> getRow( + databaseId: String, + tableId: String, + rowId: String, + queries: List<String>? = null, + nestedType: Class<T>, + ): io.appwrite.models.Row<T> { + val apiPath = "/databases/{databaseId}/tables/{tableId}/rows/{rowId}" + .replace("{databaseId}", databaseId) + .replace("{tableId}", tableId) + .replace("{rowId}", rowId) + + val apiParams = mutableMapOf<String, Any?>( + "queries" to queries, + ) + val apiHeaders = mutableMapOf<String, String>( + ) + val converter: (Any) -> io.appwrite.models.Row<T> = { + io.appwrite.models.Row.from(map = it as Map<String, Any>, nestedType) + } + return client.call( + "GET", + apiPath, + apiHeaders, + apiParams, + responseType = classOf(), + converter, + ) + } + + /** + * Get a row by its unique ID. This endpoint response returns a JSON object with the row data. + * + * @param databaseId Database ID. + * @param tableId Table ID. You can create a new table using the Database service [server integration](https://appwrite.io/docs/server/tables#tablesCreate). + * @param rowId Row ID. + * @param queries 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. + * @return [io.appwrite.models.Row<T>] + */ + @JvmOverloads + @Throws(AppwriteException::class) + suspend fun getRow( + databaseId: String, + tableId: String, + rowId: String, + queries: List<String>? = null, + ): io.appwrite.models.Row<Map<String, Any>> = getRow( + databaseId, + tableId, + rowId, + queries, + nestedType = classOf(), + ) + + /** + * Create or update a Row. Before using this route, you should create a new table resource using either a [server integration](https://appwrite.io/docs/server/databases#databasesCreateTable) API or directly from your database console. + * + * @param databaseId Database ID. + * @param tableId Table ID. + * @param rowId Row ID. + * @return [io.appwrite.models.Row<T>] + */ + @Throws(AppwriteException::class) + suspend fun <T> upsertRow( + databaseId: String, + tableId: String, + rowId: String, + nestedType: Class<T>, + ): io.appwrite.models.Row<T> { + val apiPath = "/databases/{databaseId}/tables/{tableId}/rows/{rowId}" + .replace("{databaseId}", databaseId) + .replace("{tableId}", tableId) + .replace("{rowId}", rowId) + + val apiParams = mutableMapOf<String, Any?>( + ) + val apiHeaders = mutableMapOf<String, String>( + "content-type" to "application/json", + ) + val converter: (Any) -> io.appwrite.models.Row<T> = { + io.appwrite.models.Row.from(map = it as Map<String, Any>, nestedType) + } + return client.call( + "PUT", + apiPath, + apiHeaders, + apiParams, + responseType = classOf(), + converter, + ) + } + + /** + * Create or update a Row. Before using this route, you should create a new table resource using either a [server integration](https://appwrite.io/docs/server/databases#databasesCreateTable) API or directly from your database console. + * + * @param databaseId Database ID. + * @param tableId Table ID. + * @param rowId Row ID. + * @return [io.appwrite.models.Row<T>] + */ + @Throws(AppwriteException::class) + suspend fun upsertRow( + databaseId: String, + tableId: String, + rowId: String, + ): io.appwrite.models.Row<Map<String, Any>> = upsertRow( + databaseId, + tableId, + rowId, + nestedType = classOf(), + ) + + /** + * Update a row by its unique ID. Using the patch method you can pass only specific fields that will get updated. + * + * @param databaseId Database ID. + * @param tableId Table ID. + * @param rowId Row ID. + * @param data Row data as JSON object. Include only columns and value pairs to be updated. + * @param permissions An array of permissions strings. By default, the current permissions are inherited. [Learn more about permissions](https://appwrite.io/docs/permissions). + * @return [io.appwrite.models.Row<T>] + */ + @JvmOverloads + @Throws(AppwriteException::class) + suspend fun <T> updateRow( + databaseId: String, + tableId: String, + rowId: String, + data: Any? = null, + permissions: List<String>? = null, + nestedType: Class<T>, + ): io.appwrite.models.Row<T> { + val apiPath = "/databases/{databaseId}/tables/{tableId}/rows/{rowId}" + .replace("{databaseId}", databaseId) + .replace("{tableId}", tableId) + .replace("{rowId}", rowId) + + val apiParams = mutableMapOf<String, Any?>( + "data" to data, + "permissions" to permissions, + ) + val apiHeaders = mutableMapOf<String, String>( + "content-type" to "application/json", + ) + val converter: (Any) -> io.appwrite.models.Row<T> = { + io.appwrite.models.Row.from(map = it as Map<String, Any>, nestedType) + } + return client.call( + "PATCH", + apiPath, + apiHeaders, + apiParams, + responseType = classOf(), + converter, + ) + } + + /** + * Update a row by its unique ID. Using the patch method you can pass only specific fields that will get updated. + * + * @param databaseId Database ID. + * @param tableId Table ID. + * @param rowId Row ID. + * @param data Row data as JSON object. Include only columns and value pairs to be updated. + * @param permissions An array of permissions strings. By default, the current permissions are inherited. [Learn more about permissions](https://appwrite.io/docs/permissions). + * @return [io.appwrite.models.Row<T>] + */ + @JvmOverloads + @Throws(AppwriteException::class) + suspend fun updateRow( + databaseId: String, + tableId: String, + rowId: String, + data: Any? = null, + permissions: List<String>? = null, + ): io.appwrite.models.Row<Map<String, Any>> = updateRow( + databaseId, + tableId, + rowId, + data, + permissions, + nestedType = classOf(), + ) + + /** + * Delete a row by its unique ID. + * + * @param databaseId Database ID. + * @param tableId Table ID. You can create a new table using the Database service [server integration](https://appwrite.io/docs/server/tables#tablesCreate). + * @param rowId Row ID. + * @return [Any] + */ + @Throws(AppwriteException::class) + suspend fun deleteRow( + databaseId: String, + tableId: String, + rowId: String, + ): Any { + val apiPath = "/databases/{databaseId}/tables/{tableId}/rows/{rowId}" + .replace("{databaseId}", databaseId) + .replace("{tableId}", tableId) + .replace("{rowId}", rowId) + + val apiParams = mutableMapOf<String, Any?>( + ) + val apiHeaders = mutableMapOf<String, String>( + "content-type" to "application/json", + ) + return client.call( + "DELETE", + apiPath, + apiHeaders, + apiParams, + responseType = Any::class.java, + ) + } + + /** + * Decrement a specific column of a row by a given value. + * + * @param databaseId Database ID. + * @param tableId Table ID. + * @param rowId Row ID. + * @param column Column key. + * @param value Value to increment the column by. The value must be a number. + * @param min Minimum value for the column. If the current value is lesser than this value, an exception will be thrown. + * @return [io.appwrite.models.Row<T>] + */ + @JvmOverloads + @Throws(AppwriteException::class) + suspend fun <T> decrementRowColumn( + databaseId: String, + tableId: String, + rowId: String, + column: String, + value: Double? = null, + min: Double? = null, + nestedType: Class<T>, + ): io.appwrite.models.Row<T> { + val apiPath = "/databases/{databaseId}/tables/{tableId}/rows/{rowId}/{column}/decrement" + .replace("{databaseId}", databaseId) + .replace("{tableId}", tableId) + .replace("{rowId}", rowId) + .replace("{column}", column) + + val apiParams = mutableMapOf<String, Any?>( + "value" to value, + "min" to min, + ) + val apiHeaders = mutableMapOf<String, String>( + "content-type" to "application/json", + ) + val converter: (Any) -> io.appwrite.models.Row<T> = { + io.appwrite.models.Row.from(map = it as Map<String, Any>, nestedType) + } + return client.call( + "PATCH", + apiPath, + apiHeaders, + apiParams, + responseType = classOf(), + converter, + ) + } + + /** + * Decrement a specific column of a row by a given value. + * + * @param databaseId Database ID. + * @param tableId Table ID. + * @param rowId Row ID. + * @param column Column key. + * @param value Value to increment the column by. The value must be a number. + * @param min Minimum value for the column. If the current value is lesser than this value, an exception will be thrown. + * @return [io.appwrite.models.Row<T>] + */ + @JvmOverloads + @Throws(AppwriteException::class) + suspend fun decrementRowColumn( + databaseId: String, + tableId: String, + rowId: String, + column: String, + value: Double? = null, + min: Double? = null, + ): io.appwrite.models.Row<Map<String, Any>> = decrementRowColumn( + databaseId, + tableId, + rowId, + column, + value, + min, + nestedType = classOf(), + ) + + /** + * Increment a specific column of a row by a given value. + * + * @param databaseId Database ID. + * @param tableId Table ID. + * @param rowId Row ID. + * @param column Column key. + * @param value Value to increment the column by. The value must be a number. + * @param max Maximum value for the column. If the current value is greater than this value, an error will be thrown. + * @return [io.appwrite.models.Row<T>] + */ + @JvmOverloads + @Throws(AppwriteException::class) + suspend fun <T> incrementRowColumn( + databaseId: String, + tableId: String, + rowId: String, + column: String, + value: Double? = null, + max: Double? = null, + nestedType: Class<T>, + ): io.appwrite.models.Row<T> { + val apiPath = "/databases/{databaseId}/tables/{tableId}/rows/{rowId}/{column}/increment" + .replace("{databaseId}", databaseId) + .replace("{tableId}", tableId) + .replace("{rowId}", rowId) + .replace("{column}", column) + + val apiParams = mutableMapOf<String, Any?>( + "value" to value, + "max" to max, + ) + val apiHeaders = mutableMapOf<String, String>( + "content-type" to "application/json", + ) + val converter: (Any) -> io.appwrite.models.Row<T> = { + io.appwrite.models.Row.from(map = it as Map<String, Any>, nestedType) + } + return client.call( + "PATCH", + apiPath, + apiHeaders, + apiParams, + responseType = classOf(), + converter, + ) + } + + /** + * Increment a specific column of a row by a given value. + * + * @param databaseId Database ID. + * @param tableId Table ID. + * @param rowId Row ID. + * @param column Column key. + * @param value Value to increment the column by. The value must be a number. + * @param max Maximum value for the column. If the current value is greater than this value, an error will be thrown. + * @return [io.appwrite.models.Row<T>] + */ + @JvmOverloads + @Throws(AppwriteException::class) + suspend fun incrementRowColumn( + databaseId: String, + tableId: String, + rowId: String, + column: String, + value: Double? = null, + max: Double? = null, + ): io.appwrite.models.Row<Map<String, Any>> = incrementRowColumn( + databaseId, + tableId, + rowId, + column, + value, + max, + nestedType = classOf(), + ) + +} \ No newline at end of file From f6bcf984f3b94dab1ab9973306419bc2fd2bcf7a Mon Sep 17 00:00:00 2001 From: root <chiragaggarwal5k@gmail.com> Date: Thu, 24 Jul 2025 06:44:40 +0000 Subject: [PATCH 14/17] chore: regen to 1.7.x --- README.md | 8 +- .../java/databases/create-document.md | 5 +- .../java/databases/create-documents.md | 2 +- .../java/databases/upsert-document.md | 7 +- .../java/databases/upsert-documents.md | 3 +- .../java/tables/create-boolean-column.md | 28 - .../java/tables/create-datetime-column.md | 28 - .../java/tables/create-email-column.md | 28 - .../java/tables/create-enum-column.md | 29 - .../java/tables/create-float-column.md | 30 - docs/examples/java/tables/create-index.md | 30 - .../java/tables/create-integer-column.md | 30 - docs/examples/java/tables/create-ip-column.md | 28 - .../java/tables/create-relationship-column.md | 31 - docs/examples/java/tables/create-row.md | 28 - docs/examples/java/tables/create-rows.md | 25 - .../java/tables/create-string-column.md | 30 - .../examples/java/tables/create-url-column.md | 28 - docs/examples/java/tables/create.md | 28 - .../java/tables/decrement-row-column.md | 28 - docs/examples/java/tables/delete-column.md | 25 - docs/examples/java/tables/delete-index.md | 25 - docs/examples/java/tables/delete-row.md | 25 - docs/examples/java/tables/delete-rows.md | 25 - docs/examples/java/tables/delete.md | 24 - docs/examples/java/tables/get-column.md | 25 - docs/examples/java/tables/get-index.md | 25 - docs/examples/java/tables/get-row.md | 26 - docs/examples/java/tables/get.md | 24 - .../java/tables/increment-row-column.md | 28 - docs/examples/java/tables/list-columns.md | 25 - docs/examples/java/tables/list-indexes.md | 25 - docs/examples/java/tables/list-rows.md | 25 - docs/examples/java/tables/list.md | 25 - .../java/tables/update-boolean-column.md | 28 - .../java/tables/update-datetime-column.md | 28 - .../java/tables/update-email-column.md | 28 - .../java/tables/update-enum-column.md | 29 - .../java/tables/update-float-column.md | 30 - .../java/tables/update-integer-column.md | 30 - docs/examples/java/tables/update-ip-column.md | 28 - .../java/tables/update-relationship-column.md | 27 - docs/examples/java/tables/update-row.md | 27 - docs/examples/java/tables/update-rows.md | 26 - .../java/tables/update-string-column.md | 29 - .../examples/java/tables/update-url-column.md | 28 - docs/examples/java/tables/update.md | 28 - docs/examples/java/tables/upsert-row.md | 26 - docs/examples/java/tables/upsert-rows.md | 24 - .../kotlin/databases/create-document.md | 3 +- .../kotlin/databases/create-documents.md | 2 +- .../kotlin/databases/upsert-document.md | 7 +- .../kotlin/databases/upsert-documents.md | 5 +- .../kotlin/tables/create-boolean-column.md | 19 - .../kotlin/tables/create-datetime-column.md | 19 - .../kotlin/tables/create-email-column.md | 19 - .../kotlin/tables/create-enum-column.md | 20 - .../kotlin/tables/create-float-column.md | 21 - docs/examples/kotlin/tables/create-index.md | 21 - .../kotlin/tables/create-integer-column.md | 21 - .../kotlin/tables/create-ip-column.md | 19 - .../tables/create-relationship-column.md | 22 - docs/examples/kotlin/tables/create-row.md | 19 - docs/examples/kotlin/tables/create-rows.md | 16 - .../kotlin/tables/create-string-column.md | 21 - .../kotlin/tables/create-url-column.md | 19 - docs/examples/kotlin/tables/create.md | 19 - .../kotlin/tables/decrement-row-column.md | 19 - docs/examples/kotlin/tables/delete-column.md | 16 - docs/examples/kotlin/tables/delete-index.md | 16 - docs/examples/kotlin/tables/delete-row.md | 16 - docs/examples/kotlin/tables/delete-rows.md | 16 - docs/examples/kotlin/tables/delete.md | 15 - docs/examples/kotlin/tables/get-column.md | 16 - docs/examples/kotlin/tables/get-index.md | 16 - docs/examples/kotlin/tables/get-row.md | 17 - docs/examples/kotlin/tables/get.md | 15 - .../kotlin/tables/increment-row-column.md | 19 - docs/examples/kotlin/tables/list-columns.md | 16 - docs/examples/kotlin/tables/list-indexes.md | 16 - docs/examples/kotlin/tables/list-rows.md | 16 - docs/examples/kotlin/tables/list.md | 16 - .../kotlin/tables/update-boolean-column.md | 19 - .../kotlin/tables/update-datetime-column.md | 19 - .../kotlin/tables/update-email-column.md | 19 - .../kotlin/tables/update-enum-column.md | 20 - .../kotlin/tables/update-float-column.md | 21 - .../kotlin/tables/update-integer-column.md | 21 - .../kotlin/tables/update-ip-column.md | 19 - .../tables/update-relationship-column.md | 18 - docs/examples/kotlin/tables/update-row.md | 18 - docs/examples/kotlin/tables/update-rows.md | 17 - .../kotlin/tables/update-string-column.md | 20 - .../kotlin/tables/update-url-column.md | 19 - docs/examples/kotlin/tables/update.md | 19 - docs/examples/kotlin/tables/upsert-row.md | 17 - docs/examples/kotlin/tables/upsert-rows.md | 15 - src/main/kotlin/io/appwrite/Client.kt | 6 +- .../kotlin/io/appwrite/models/BucketList.kt | 2 +- .../io/appwrite/models/CollectionList.kt | 2 +- .../io/appwrite/models/ColumnBoolean.kt | 94 - .../io/appwrite/models/ColumnDatetime.kt | 102 - .../kotlin/io/appwrite/models/ColumnEmail.kt | 102 - .../kotlin/io/appwrite/models/ColumnEnum.kt | 110 - .../kotlin/io/appwrite/models/ColumnFloat.kt | 110 - .../kotlin/io/appwrite/models/ColumnIndex.kt | 94 - .../io/appwrite/models/ColumnIndexList.kt | 38 - .../io/appwrite/models/ColumnInteger.kt | 110 - .../kotlin/io/appwrite/models/ColumnIp.kt | 102 - .../kotlin/io/appwrite/models/ColumnList.kt | 38 - .../io/appwrite/models/ColumnRelationship.kt | 134 - .../kotlin/io/appwrite/models/ColumnString.kt | 110 - .../kotlin/io/appwrite/models/ColumnUrl.kt | 102 - .../io/appwrite/models/ContinentList.kt | 2 +- .../kotlin/io/appwrite/models/CountryList.kt | 2 +- .../kotlin/io/appwrite/models/CurrencyList.kt | 2 +- .../kotlin/io/appwrite/models/DatabaseList.kt | 2 +- .../io/appwrite/models/DeploymentList.kt | 2 +- .../kotlin/io/appwrite/models/DocumentList.kt | 2 +- .../io/appwrite/models/ExecutionList.kt | 2 +- .../kotlin/io/appwrite/models/FileList.kt | 2 +- .../io/appwrite/models/FrameworkList.kt | 2 +- .../kotlin/io/appwrite/models/FunctionList.kt | 2 +- .../kotlin/io/appwrite/models/IdentityList.kt | 2 +- .../kotlin/io/appwrite/models/IndexList.kt | 2 +- .../kotlin/io/appwrite/models/LanguageList.kt | 2 +- .../io/appwrite/models/LocaleCodeList.kt | 2 +- src/main/kotlin/io/appwrite/models/LogList.kt | 2 +- .../io/appwrite/models/MembershipList.kt | 2 +- .../kotlin/io/appwrite/models/MessageList.kt | 2 +- .../kotlin/io/appwrite/models/PhoneList.kt | 2 +- .../kotlin/io/appwrite/models/ProviderList.kt | 2 +- .../io/appwrite/models/ResourceTokenList.kt | 2 +- src/main/kotlin/io/appwrite/models/Row.kt | 105 - src/main/kotlin/io/appwrite/models/RowList.kt | 46 - .../kotlin/io/appwrite/models/RuntimeList.kt | 2 +- .../kotlin/io/appwrite/models/SessionList.kt | 2 +- .../kotlin/io/appwrite/models/SiteList.kt | 2 +- .../io/appwrite/models/SpecificationList.kt | 2 +- .../io/appwrite/models/SubscriberList.kt | 2 +- src/main/kotlin/io/appwrite/models/Table.kt | 102 - .../kotlin/io/appwrite/models/TableList.kt | 38 - .../kotlin/io/appwrite/models/TargetList.kt | 2 +- .../kotlin/io/appwrite/models/TeamList.kt | 2 +- .../kotlin/io/appwrite/models/TopicList.kt | 2 +- .../kotlin/io/appwrite/models/UserList.kt | 2 +- .../kotlin/io/appwrite/models/VariableList.kt | 2 +- .../kotlin/io/appwrite/services/Account.kt | 6 - .../kotlin/io/appwrite/services/Databases.kt | 397 +-- .../kotlin/io/appwrite/services/Tables.kt | 2201 ----------------- 150 files changed, 128 insertions(+), 6123 deletions(-) delete mode 100644 docs/examples/java/tables/create-boolean-column.md delete mode 100644 docs/examples/java/tables/create-datetime-column.md delete mode 100644 docs/examples/java/tables/create-email-column.md delete mode 100644 docs/examples/java/tables/create-enum-column.md delete mode 100644 docs/examples/java/tables/create-float-column.md delete mode 100644 docs/examples/java/tables/create-index.md delete mode 100644 docs/examples/java/tables/create-integer-column.md delete mode 100644 docs/examples/java/tables/create-ip-column.md delete mode 100644 docs/examples/java/tables/create-relationship-column.md delete mode 100644 docs/examples/java/tables/create-row.md delete mode 100644 docs/examples/java/tables/create-rows.md delete mode 100644 docs/examples/java/tables/create-string-column.md delete mode 100644 docs/examples/java/tables/create-url-column.md delete mode 100644 docs/examples/java/tables/create.md delete mode 100644 docs/examples/java/tables/decrement-row-column.md delete mode 100644 docs/examples/java/tables/delete-column.md delete mode 100644 docs/examples/java/tables/delete-index.md delete mode 100644 docs/examples/java/tables/delete-row.md delete mode 100644 docs/examples/java/tables/delete-rows.md delete mode 100644 docs/examples/java/tables/delete.md delete mode 100644 docs/examples/java/tables/get-column.md delete mode 100644 docs/examples/java/tables/get-index.md delete mode 100644 docs/examples/java/tables/get-row.md delete mode 100644 docs/examples/java/tables/get.md delete mode 100644 docs/examples/java/tables/increment-row-column.md delete mode 100644 docs/examples/java/tables/list-columns.md delete mode 100644 docs/examples/java/tables/list-indexes.md delete mode 100644 docs/examples/java/tables/list-rows.md delete mode 100644 docs/examples/java/tables/list.md delete mode 100644 docs/examples/java/tables/update-boolean-column.md delete mode 100644 docs/examples/java/tables/update-datetime-column.md delete mode 100644 docs/examples/java/tables/update-email-column.md delete mode 100644 docs/examples/java/tables/update-enum-column.md delete mode 100644 docs/examples/java/tables/update-float-column.md delete mode 100644 docs/examples/java/tables/update-integer-column.md delete mode 100644 docs/examples/java/tables/update-ip-column.md delete mode 100644 docs/examples/java/tables/update-relationship-column.md delete mode 100644 docs/examples/java/tables/update-row.md delete mode 100644 docs/examples/java/tables/update-rows.md delete mode 100644 docs/examples/java/tables/update-string-column.md delete mode 100644 docs/examples/java/tables/update-url-column.md delete mode 100644 docs/examples/java/tables/update.md delete mode 100644 docs/examples/java/tables/upsert-row.md delete mode 100644 docs/examples/java/tables/upsert-rows.md delete mode 100644 docs/examples/kotlin/tables/create-boolean-column.md delete mode 100644 docs/examples/kotlin/tables/create-datetime-column.md delete mode 100644 docs/examples/kotlin/tables/create-email-column.md delete mode 100644 docs/examples/kotlin/tables/create-enum-column.md delete mode 100644 docs/examples/kotlin/tables/create-float-column.md delete mode 100644 docs/examples/kotlin/tables/create-index.md delete mode 100644 docs/examples/kotlin/tables/create-integer-column.md delete mode 100644 docs/examples/kotlin/tables/create-ip-column.md delete mode 100644 docs/examples/kotlin/tables/create-relationship-column.md delete mode 100644 docs/examples/kotlin/tables/create-row.md delete mode 100644 docs/examples/kotlin/tables/create-rows.md delete mode 100644 docs/examples/kotlin/tables/create-string-column.md delete mode 100644 docs/examples/kotlin/tables/create-url-column.md delete mode 100644 docs/examples/kotlin/tables/create.md delete mode 100644 docs/examples/kotlin/tables/decrement-row-column.md delete mode 100644 docs/examples/kotlin/tables/delete-column.md delete mode 100644 docs/examples/kotlin/tables/delete-index.md delete mode 100644 docs/examples/kotlin/tables/delete-row.md delete mode 100644 docs/examples/kotlin/tables/delete-rows.md delete mode 100644 docs/examples/kotlin/tables/delete.md delete mode 100644 docs/examples/kotlin/tables/get-column.md delete mode 100644 docs/examples/kotlin/tables/get-index.md delete mode 100644 docs/examples/kotlin/tables/get-row.md delete mode 100644 docs/examples/kotlin/tables/get.md delete mode 100644 docs/examples/kotlin/tables/increment-row-column.md delete mode 100644 docs/examples/kotlin/tables/list-columns.md delete mode 100644 docs/examples/kotlin/tables/list-indexes.md delete mode 100644 docs/examples/kotlin/tables/list-rows.md delete mode 100644 docs/examples/kotlin/tables/list.md delete mode 100644 docs/examples/kotlin/tables/update-boolean-column.md delete mode 100644 docs/examples/kotlin/tables/update-datetime-column.md delete mode 100644 docs/examples/kotlin/tables/update-email-column.md delete mode 100644 docs/examples/kotlin/tables/update-enum-column.md delete mode 100644 docs/examples/kotlin/tables/update-float-column.md delete mode 100644 docs/examples/kotlin/tables/update-integer-column.md delete mode 100644 docs/examples/kotlin/tables/update-ip-column.md delete mode 100644 docs/examples/kotlin/tables/update-relationship-column.md delete mode 100644 docs/examples/kotlin/tables/update-row.md delete mode 100644 docs/examples/kotlin/tables/update-rows.md delete mode 100644 docs/examples/kotlin/tables/update-string-column.md delete mode 100644 docs/examples/kotlin/tables/update-url-column.md delete mode 100644 docs/examples/kotlin/tables/update.md delete mode 100644 docs/examples/kotlin/tables/upsert-row.md delete mode 100644 docs/examples/kotlin/tables/upsert-rows.md delete mode 100644 src/main/kotlin/io/appwrite/models/ColumnBoolean.kt delete mode 100644 src/main/kotlin/io/appwrite/models/ColumnDatetime.kt delete mode 100644 src/main/kotlin/io/appwrite/models/ColumnEmail.kt delete mode 100644 src/main/kotlin/io/appwrite/models/ColumnEnum.kt delete mode 100644 src/main/kotlin/io/appwrite/models/ColumnFloat.kt delete mode 100644 src/main/kotlin/io/appwrite/models/ColumnIndex.kt delete mode 100644 src/main/kotlin/io/appwrite/models/ColumnIndexList.kt delete mode 100644 src/main/kotlin/io/appwrite/models/ColumnInteger.kt delete mode 100644 src/main/kotlin/io/appwrite/models/ColumnIp.kt delete mode 100644 src/main/kotlin/io/appwrite/models/ColumnList.kt delete mode 100644 src/main/kotlin/io/appwrite/models/ColumnRelationship.kt delete mode 100644 src/main/kotlin/io/appwrite/models/ColumnString.kt delete mode 100644 src/main/kotlin/io/appwrite/models/ColumnUrl.kt delete mode 100644 src/main/kotlin/io/appwrite/models/Row.kt delete mode 100644 src/main/kotlin/io/appwrite/models/RowList.kt delete mode 100644 src/main/kotlin/io/appwrite/models/Table.kt delete mode 100644 src/main/kotlin/io/appwrite/models/TableList.kt delete mode 100644 src/main/kotlin/io/appwrite/services/Tables.kt diff --git a/README.md b/README.md index 72c5530..52fd0c1 100644 --- a/README.md +++ b/README.md @@ -2,11 +2,11 @@ ![Maven Central](https://img.shields.io/maven-central/v/io.appwrite/sdk-for-kotlin.svg?color=green&style=flat-square) ![License](https://img.shields.io/github/license/appwrite/sdk-for-kotlin.svg?style=flat-square) -![Version](https://img.shields.io/badge/api%20version-1.8.0-blue.svg?style=flat-square) +![Version](https://img.shields.io/badge/api%20version-1.7.4-blue.svg?style=flat-square) [![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-kotlin/releases).** +**This SDK is compatible with Appwrite server version 1.7.x. For older versions, please check [previous releases](https://github.com/appwrite/sdk-for-kotlin/releases).** > This is the Kotlin SDK for integrating with Appwrite from your Kotlin server-side code. If you're looking for the Android SDK you should check [appwrite/sdk-for-android](https://github.com/appwrite/sdk-for-android) @@ -39,7 +39,7 @@ repositories { Next, add the dependency to your project's `build.gradle(.kts)` file: ```groovy -implementation("io.appwrite:sdk-for-kotlin:10.0.0") +implementation("io.appwrite:sdk-for-kotlin:9.0.0") ``` ### Maven @@ -50,7 +50,7 @@ Add this to your project's `pom.xml` file: <dependency> <groupId>io.appwrite</groupId> <artifactId>sdk-for-kotlin</artifactId> - <version>10.0.0</version> + <version>9.0.0</version> </dependency> </dependencies> ``` diff --git a/docs/examples/java/databases/create-document.md b/docs/examples/java/databases/create-document.md index 368b816..5231be3 100644 --- a/docs/examples/java/databases/create-document.md +++ b/docs/examples/java/databases/create-document.md @@ -4,9 +4,8 @@ import io.appwrite.services.Databases; Client client = new Client() .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint - .setSession("") // The user session to authenticate with - .setKey("<YOUR_API_KEY>") // Your secret API key - .setJWT("<YOUR_JWT>"); // Your secret JSON Web Token + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setSession(""); // The user session to authenticate with Databases databases = new Databases(client); diff --git a/docs/examples/java/databases/create-documents.md b/docs/examples/java/databases/create-documents.md index 77d7981..0de0c27 100644 --- a/docs/examples/java/databases/create-documents.md +++ b/docs/examples/java/databases/create-documents.md @@ -4,7 +4,7 @@ import io.appwrite.services.Databases; Client client = new Client() .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint - .setAdmin("") // + .setProject("<YOUR_PROJECT_ID>") // Your project ID .setKey("<YOUR_API_KEY>"); // Your secret API key Databases databases = new Databases(client); diff --git a/docs/examples/java/databases/upsert-document.md b/docs/examples/java/databases/upsert-document.md index b1b4de4..daa4414 100644 --- a/docs/examples/java/databases/upsert-document.md +++ b/docs/examples/java/databases/upsert-document.md @@ -4,9 +4,8 @@ import io.appwrite.services.Databases; Client client = new Client() .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint - .setSession("") // The user session to authenticate with - .setKey("<YOUR_API_KEY>") // Your secret API key - .setJWT("<YOUR_JWT>"); // Your secret JSON Web Token + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setSession(""); // The user session to authenticate with Databases databases = new Databases(client); @@ -14,6 +13,8 @@ databases.upsertDocument( "<DATABASE_ID>", // databaseId "<COLLECTION_ID>", // collectionId "<DOCUMENT_ID>", // documentId + mapOf( "a" to "b" ), // data + listOf("read("any")"), // permissions (optional) new CoroutineCallback<>((result, error) -> { if (error != null) { error.printStackTrace(); diff --git a/docs/examples/java/databases/upsert-documents.md b/docs/examples/java/databases/upsert-documents.md index 0bf0c17..95e9a33 100644 --- a/docs/examples/java/databases/upsert-documents.md +++ b/docs/examples/java/databases/upsert-documents.md @@ -4,7 +4,7 @@ import io.appwrite.services.Databases; Client client = new Client() .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint - .setAdmin("") // + .setProject("<YOUR_PROJECT_ID>") // Your project ID .setKey("<YOUR_API_KEY>"); // Your secret API key Databases databases = new Databases(client); @@ -12,6 +12,7 @@ Databases databases = new Databases(client); databases.upsertDocuments( "<DATABASE_ID>", // databaseId "<COLLECTION_ID>", // collectionId + listOf(), // documents new CoroutineCallback<>((result, error) -> { if (error != null) { error.printStackTrace(); diff --git a/docs/examples/java/tables/create-boolean-column.md b/docs/examples/java/tables/create-boolean-column.md deleted file mode 100644 index 2336ee9..0000000 --- a/docs/examples/java/tables/create-boolean-column.md +++ /dev/null @@ -1,28 +0,0 @@ -import io.appwrite.Client; -import io.appwrite.coroutines.CoroutineCallback; -import io.appwrite.services.Tables; - -Client client = new Client() - .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint - .setProject("<YOUR_PROJECT_ID>") // Your project ID - .setKey("<YOUR_API_KEY>"); // Your secret API key - -Tables tables = new Tables(client); - -tables.createBooleanColumn( - "<DATABASE_ID>", // databaseId - "<TABLE_ID>", // tableId - "", // key - false, // required - false, // default (optional) - false, // array (optional) - new CoroutineCallback<>((result, error) -> { - if (error != null) { - error.printStackTrace(); - return; - } - - System.out.println(result); - }) -); - diff --git a/docs/examples/java/tables/create-datetime-column.md b/docs/examples/java/tables/create-datetime-column.md deleted file mode 100644 index dd3df83..0000000 --- a/docs/examples/java/tables/create-datetime-column.md +++ /dev/null @@ -1,28 +0,0 @@ -import io.appwrite.Client; -import io.appwrite.coroutines.CoroutineCallback; -import io.appwrite.services.Tables; - -Client client = new Client() - .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint - .setProject("<YOUR_PROJECT_ID>") // Your project ID - .setKey("<YOUR_API_KEY>"); // Your secret API key - -Tables tables = new Tables(client); - -tables.createDatetimeColumn( - "<DATABASE_ID>", // databaseId - "<TABLE_ID>", // tableId - "", // key - false, // required - "", // default (optional) - false, // array (optional) - new CoroutineCallback<>((result, error) -> { - if (error != null) { - error.printStackTrace(); - return; - } - - System.out.println(result); - }) -); - diff --git a/docs/examples/java/tables/create-email-column.md b/docs/examples/java/tables/create-email-column.md deleted file mode 100644 index 3b130d1..0000000 --- a/docs/examples/java/tables/create-email-column.md +++ /dev/null @@ -1,28 +0,0 @@ -import io.appwrite.Client; -import io.appwrite.coroutines.CoroutineCallback; -import io.appwrite.services.Tables; - -Client client = new Client() - .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint - .setProject("<YOUR_PROJECT_ID>") // Your project ID - .setKey("<YOUR_API_KEY>"); // Your secret API key - -Tables tables = new Tables(client); - -tables.createEmailColumn( - "<DATABASE_ID>", // databaseId - "<TABLE_ID>", // tableId - "", // key - false, // required - "email@example.com", // default (optional) - false, // array (optional) - new CoroutineCallback<>((result, error) -> { - if (error != null) { - error.printStackTrace(); - return; - } - - System.out.println(result); - }) -); - diff --git a/docs/examples/java/tables/create-enum-column.md b/docs/examples/java/tables/create-enum-column.md deleted file mode 100644 index 73c6e1c..0000000 --- a/docs/examples/java/tables/create-enum-column.md +++ /dev/null @@ -1,29 +0,0 @@ -import io.appwrite.Client; -import io.appwrite.coroutines.CoroutineCallback; -import io.appwrite.services.Tables; - -Client client = new Client() - .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint - .setProject("<YOUR_PROJECT_ID>") // Your project ID - .setKey("<YOUR_API_KEY>"); // Your secret API key - -Tables tables = new Tables(client); - -tables.createEnumColumn( - "<DATABASE_ID>", // databaseId - "<TABLE_ID>", // tableId - "", // key - listOf(), // elements - false, // required - "<DEFAULT>", // default (optional) - false, // array (optional) - new CoroutineCallback<>((result, error) -> { - if (error != null) { - error.printStackTrace(); - return; - } - - System.out.println(result); - }) -); - diff --git a/docs/examples/java/tables/create-float-column.md b/docs/examples/java/tables/create-float-column.md deleted file mode 100644 index dd6f207..0000000 --- a/docs/examples/java/tables/create-float-column.md +++ /dev/null @@ -1,30 +0,0 @@ -import io.appwrite.Client; -import io.appwrite.coroutines.CoroutineCallback; -import io.appwrite.services.Tables; - -Client client = new Client() - .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint - .setProject("<YOUR_PROJECT_ID>") // Your project ID - .setKey("<YOUR_API_KEY>"); // Your secret API key - -Tables tables = new Tables(client); - -tables.createFloatColumn( - "<DATABASE_ID>", // databaseId - "<TABLE_ID>", // tableId - "", // key - false, // required - 0, // min (optional) - 0, // max (optional) - 0, // default (optional) - false, // array (optional) - new CoroutineCallback<>((result, error) -> { - if (error != null) { - error.printStackTrace(); - return; - } - - System.out.println(result); - }) -); - diff --git a/docs/examples/java/tables/create-index.md b/docs/examples/java/tables/create-index.md deleted file mode 100644 index 2a4df00..0000000 --- a/docs/examples/java/tables/create-index.md +++ /dev/null @@ -1,30 +0,0 @@ -import io.appwrite.Client; -import io.appwrite.coroutines.CoroutineCallback; -import io.appwrite.services.Tables; -import io.appwrite.enums.IndexType; - -Client client = new Client() - .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint - .setProject("<YOUR_PROJECT_ID>") // Your project ID - .setKey("<YOUR_API_KEY>"); // Your secret API key - -Tables tables = new Tables(client); - -tables.createIndex( - "<DATABASE_ID>", // databaseId - "<TABLE_ID>", // tableId - "", // key - IndexType.KEY, // type - listOf(), // columns - listOf(), // orders (optional) - listOf(), // lengths (optional) - new CoroutineCallback<>((result, error) -> { - if (error != null) { - error.printStackTrace(); - return; - } - - System.out.println(result); - }) -); - diff --git a/docs/examples/java/tables/create-integer-column.md b/docs/examples/java/tables/create-integer-column.md deleted file mode 100644 index 3546ac8..0000000 --- a/docs/examples/java/tables/create-integer-column.md +++ /dev/null @@ -1,30 +0,0 @@ -import io.appwrite.Client; -import io.appwrite.coroutines.CoroutineCallback; -import io.appwrite.services.Tables; - -Client client = new Client() - .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint - .setProject("<YOUR_PROJECT_ID>") // Your project ID - .setKey("<YOUR_API_KEY>"); // Your secret API key - -Tables tables = new Tables(client); - -tables.createIntegerColumn( - "<DATABASE_ID>", // databaseId - "<TABLE_ID>", // tableId - "", // key - false, // required - 0, // min (optional) - 0, // max (optional) - 0, // default (optional) - false, // array (optional) - new CoroutineCallback<>((result, error) -> { - if (error != null) { - error.printStackTrace(); - return; - } - - System.out.println(result); - }) -); - diff --git a/docs/examples/java/tables/create-ip-column.md b/docs/examples/java/tables/create-ip-column.md deleted file mode 100644 index 825d8b0..0000000 --- a/docs/examples/java/tables/create-ip-column.md +++ /dev/null @@ -1,28 +0,0 @@ -import io.appwrite.Client; -import io.appwrite.coroutines.CoroutineCallback; -import io.appwrite.services.Tables; - -Client client = new Client() - .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint - .setProject("<YOUR_PROJECT_ID>") // Your project ID - .setKey("<YOUR_API_KEY>"); // Your secret API key - -Tables tables = new Tables(client); - -tables.createIpColumn( - "<DATABASE_ID>", // databaseId - "<TABLE_ID>", // tableId - "", // key - false, // required - "", // default (optional) - false, // array (optional) - new CoroutineCallback<>((result, error) -> { - if (error != null) { - error.printStackTrace(); - return; - } - - System.out.println(result); - }) -); - diff --git a/docs/examples/java/tables/create-relationship-column.md b/docs/examples/java/tables/create-relationship-column.md deleted file mode 100644 index 7a0b50a..0000000 --- a/docs/examples/java/tables/create-relationship-column.md +++ /dev/null @@ -1,31 +0,0 @@ -import io.appwrite.Client; -import io.appwrite.coroutines.CoroutineCallback; -import io.appwrite.services.Tables; -import io.appwrite.enums.RelationshipType; - -Client client = new Client() - .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint - .setProject("<YOUR_PROJECT_ID>") // Your project ID - .setKey("<YOUR_API_KEY>"); // Your secret API key - -Tables tables = new Tables(client); - -tables.createRelationshipColumn( - "<DATABASE_ID>", // databaseId - "<TABLE_ID>", // tableId - "<RELATED_TABLE_ID>", // relatedTableId - RelationshipType.ONETOONE, // type - false, // twoWay (optional) - "", // key (optional) - "", // twoWayKey (optional) - RelationMutate.CASCADE, // onDelete (optional) - new CoroutineCallback<>((result, error) -> { - if (error != null) { - error.printStackTrace(); - return; - } - - System.out.println(result); - }) -); - diff --git a/docs/examples/java/tables/create-row.md b/docs/examples/java/tables/create-row.md deleted file mode 100644 index 7ba3678..0000000 --- a/docs/examples/java/tables/create-row.md +++ /dev/null @@ -1,28 +0,0 @@ -import io.appwrite.Client; -import io.appwrite.coroutines.CoroutineCallback; -import io.appwrite.services.Tables; - -Client client = new Client() - .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint - .setSession("") // The user session to authenticate with - .setKey("<YOUR_API_KEY>") // Your secret API key - .setJWT("<YOUR_JWT>"); // Your secret JSON Web Token - -Tables tables = new Tables(client); - -tables.createRow( - "<DATABASE_ID>", // databaseId - "<TABLE_ID>", // tableId - "<ROW_ID>", // rowId - mapOf( "a" to "b" ), // data - listOf("read("any")"), // permissions (optional) - new CoroutineCallback<>((result, error) -> { - if (error != null) { - error.printStackTrace(); - return; - } - - System.out.println(result); - }) -); - diff --git a/docs/examples/java/tables/create-rows.md b/docs/examples/java/tables/create-rows.md deleted file mode 100644 index c20aa2c..0000000 --- a/docs/examples/java/tables/create-rows.md +++ /dev/null @@ -1,25 +0,0 @@ -import io.appwrite.Client; -import io.appwrite.coroutines.CoroutineCallback; -import io.appwrite.services.Tables; - -Client client = new Client() - .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint - .setAdmin("") // - .setKey("<YOUR_API_KEY>"); // Your secret API key - -Tables tables = new Tables(client); - -tables.createRows( - "<DATABASE_ID>", // databaseId - "<TABLE_ID>", // tableId - listOf(), // rows - new CoroutineCallback<>((result, error) -> { - if (error != null) { - error.printStackTrace(); - return; - } - - System.out.println(result); - }) -); - diff --git a/docs/examples/java/tables/create-string-column.md b/docs/examples/java/tables/create-string-column.md deleted file mode 100644 index b8cb626..0000000 --- a/docs/examples/java/tables/create-string-column.md +++ /dev/null @@ -1,30 +0,0 @@ -import io.appwrite.Client; -import io.appwrite.coroutines.CoroutineCallback; -import io.appwrite.services.Tables; - -Client client = new Client() - .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint - .setProject("<YOUR_PROJECT_ID>") // Your project ID - .setKey("<YOUR_API_KEY>"); // Your secret API key - -Tables tables = new Tables(client); - -tables.createStringColumn( - "<DATABASE_ID>", // databaseId - "<TABLE_ID>", // tableId - "", // key - 1, // size - false, // required - "<DEFAULT>", // default (optional) - false, // array (optional) - false, // encrypt (optional) - new CoroutineCallback<>((result, error) -> { - if (error != null) { - error.printStackTrace(); - return; - } - - System.out.println(result); - }) -); - diff --git a/docs/examples/java/tables/create-url-column.md b/docs/examples/java/tables/create-url-column.md deleted file mode 100644 index 91e90c8..0000000 --- a/docs/examples/java/tables/create-url-column.md +++ /dev/null @@ -1,28 +0,0 @@ -import io.appwrite.Client; -import io.appwrite.coroutines.CoroutineCallback; -import io.appwrite.services.Tables; - -Client client = new Client() - .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint - .setProject("<YOUR_PROJECT_ID>") // Your project ID - .setKey("<YOUR_API_KEY>"); // Your secret API key - -Tables tables = new Tables(client); - -tables.createUrlColumn( - "<DATABASE_ID>", // databaseId - "<TABLE_ID>", // tableId - "", // key - false, // required - "https://example.com", // default (optional) - false, // array (optional) - new CoroutineCallback<>((result, error) -> { - if (error != null) { - error.printStackTrace(); - return; - } - - System.out.println(result); - }) -); - diff --git a/docs/examples/java/tables/create.md b/docs/examples/java/tables/create.md deleted file mode 100644 index 6a9faf0..0000000 --- a/docs/examples/java/tables/create.md +++ /dev/null @@ -1,28 +0,0 @@ -import io.appwrite.Client; -import io.appwrite.coroutines.CoroutineCallback; -import io.appwrite.services.Tables; - -Client client = new Client() - .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint - .setProject("<YOUR_PROJECT_ID>") // Your project ID - .setKey("<YOUR_API_KEY>"); // Your secret API key - -Tables tables = new Tables(client); - -tables.create( - "<DATABASE_ID>", // databaseId - "<TABLE_ID>", // tableId - "<NAME>", // name - listOf("read("any")"), // permissions (optional) - false, // rowSecurity (optional) - false, // enabled (optional) - new CoroutineCallback<>((result, error) -> { - if (error != null) { - error.printStackTrace(); - return; - } - - System.out.println(result); - }) -); - diff --git a/docs/examples/java/tables/decrement-row-column.md b/docs/examples/java/tables/decrement-row-column.md deleted file mode 100644 index 9e79f36..0000000 --- a/docs/examples/java/tables/decrement-row-column.md +++ /dev/null @@ -1,28 +0,0 @@ -import io.appwrite.Client; -import io.appwrite.coroutines.CoroutineCallback; -import io.appwrite.services.Tables; - -Client client = new Client() - .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint - .setProject("<YOUR_PROJECT_ID>") // Your project ID - .setKey("<YOUR_API_KEY>"); // Your secret API key - -Tables tables = new Tables(client); - -tables.decrementRowColumn( - "<DATABASE_ID>", // databaseId - "<TABLE_ID>", // tableId - "<ROW_ID>", // rowId - "", // column - 0, // value (optional) - 0, // min (optional) - new CoroutineCallback<>((result, error) -> { - if (error != null) { - error.printStackTrace(); - return; - } - - System.out.println(result); - }) -); - diff --git a/docs/examples/java/tables/delete-column.md b/docs/examples/java/tables/delete-column.md deleted file mode 100644 index f14390c..0000000 --- a/docs/examples/java/tables/delete-column.md +++ /dev/null @@ -1,25 +0,0 @@ -import io.appwrite.Client; -import io.appwrite.coroutines.CoroutineCallback; -import io.appwrite.services.Tables; - -Client client = new Client() - .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint - .setProject("<YOUR_PROJECT_ID>") // Your project ID - .setKey("<YOUR_API_KEY>"); // Your secret API key - -Tables tables = new Tables(client); - -tables.deleteColumn( - "<DATABASE_ID>", // databaseId - "<TABLE_ID>", // tableId - "", // key - new CoroutineCallback<>((result, error) -> { - if (error != null) { - error.printStackTrace(); - return; - } - - System.out.println(result); - }) -); - diff --git a/docs/examples/java/tables/delete-index.md b/docs/examples/java/tables/delete-index.md deleted file mode 100644 index 1b22eb0..0000000 --- a/docs/examples/java/tables/delete-index.md +++ /dev/null @@ -1,25 +0,0 @@ -import io.appwrite.Client; -import io.appwrite.coroutines.CoroutineCallback; -import io.appwrite.services.Tables; - -Client client = new Client() - .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint - .setProject("<YOUR_PROJECT_ID>") // Your project ID - .setKey("<YOUR_API_KEY>"); // Your secret API key - -Tables tables = new Tables(client); - -tables.deleteIndex( - "<DATABASE_ID>", // databaseId - "<TABLE_ID>", // tableId - "", // key - new CoroutineCallback<>((result, error) -> { - if (error != null) { - error.printStackTrace(); - return; - } - - System.out.println(result); - }) -); - diff --git a/docs/examples/java/tables/delete-row.md b/docs/examples/java/tables/delete-row.md deleted file mode 100644 index a48745a..0000000 --- a/docs/examples/java/tables/delete-row.md +++ /dev/null @@ -1,25 +0,0 @@ -import io.appwrite.Client; -import io.appwrite.coroutines.CoroutineCallback; -import io.appwrite.services.Tables; - -Client client = new Client() - .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint - .setProject("<YOUR_PROJECT_ID>") // Your project ID - .setSession(""); // The user session to authenticate with - -Tables tables = new Tables(client); - -tables.deleteRow( - "<DATABASE_ID>", // databaseId - "<TABLE_ID>", // tableId - "<ROW_ID>", // rowId - new CoroutineCallback<>((result, error) -> { - if (error != null) { - error.printStackTrace(); - return; - } - - System.out.println(result); - }) -); - diff --git a/docs/examples/java/tables/delete-rows.md b/docs/examples/java/tables/delete-rows.md deleted file mode 100644 index 6a86321..0000000 --- a/docs/examples/java/tables/delete-rows.md +++ /dev/null @@ -1,25 +0,0 @@ -import io.appwrite.Client; -import io.appwrite.coroutines.CoroutineCallback; -import io.appwrite.services.Tables; - -Client client = new Client() - .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint - .setProject("<YOUR_PROJECT_ID>") // Your project ID - .setKey("<YOUR_API_KEY>"); // Your secret API key - -Tables tables = new Tables(client); - -tables.deleteRows( - "<DATABASE_ID>", // databaseId - "<TABLE_ID>", // tableId - listOf(), // queries (optional) - new CoroutineCallback<>((result, error) -> { - if (error != null) { - error.printStackTrace(); - return; - } - - System.out.println(result); - }) -); - diff --git a/docs/examples/java/tables/delete.md b/docs/examples/java/tables/delete.md deleted file mode 100644 index e777c72..0000000 --- a/docs/examples/java/tables/delete.md +++ /dev/null @@ -1,24 +0,0 @@ -import io.appwrite.Client; -import io.appwrite.coroutines.CoroutineCallback; -import io.appwrite.services.Tables; - -Client client = new Client() - .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint - .setProject("<YOUR_PROJECT_ID>") // Your project ID - .setKey("<YOUR_API_KEY>"); // Your secret API key - -Tables tables = new Tables(client); - -tables.delete( - "<DATABASE_ID>", // databaseId - "<TABLE_ID>", // tableId - new CoroutineCallback<>((result, error) -> { - if (error != null) { - error.printStackTrace(); - return; - } - - System.out.println(result); - }) -); - diff --git a/docs/examples/java/tables/get-column.md b/docs/examples/java/tables/get-column.md deleted file mode 100644 index b4f7e12..0000000 --- a/docs/examples/java/tables/get-column.md +++ /dev/null @@ -1,25 +0,0 @@ -import io.appwrite.Client; -import io.appwrite.coroutines.CoroutineCallback; -import io.appwrite.services.Tables; - -Client client = new Client() - .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint - .setProject("<YOUR_PROJECT_ID>") // Your project ID - .setKey("<YOUR_API_KEY>"); // Your secret API key - -Tables tables = new Tables(client); - -tables.getColumn( - "<DATABASE_ID>", // databaseId - "<TABLE_ID>", // tableId - "", // key - new CoroutineCallback<>((result, error) -> { - if (error != null) { - error.printStackTrace(); - return; - } - - System.out.println(result); - }) -); - diff --git a/docs/examples/java/tables/get-index.md b/docs/examples/java/tables/get-index.md deleted file mode 100644 index 5bcd59d..0000000 --- a/docs/examples/java/tables/get-index.md +++ /dev/null @@ -1,25 +0,0 @@ -import io.appwrite.Client; -import io.appwrite.coroutines.CoroutineCallback; -import io.appwrite.services.Tables; - -Client client = new Client() - .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint - .setProject("<YOUR_PROJECT_ID>") // Your project ID - .setKey("<YOUR_API_KEY>"); // Your secret API key - -Tables tables = new Tables(client); - -tables.getIndex( - "<DATABASE_ID>", // databaseId - "<TABLE_ID>", // tableId - "", // key - new CoroutineCallback<>((result, error) -> { - if (error != null) { - error.printStackTrace(); - return; - } - - System.out.println(result); - }) -); - diff --git a/docs/examples/java/tables/get-row.md b/docs/examples/java/tables/get-row.md deleted file mode 100644 index 7f72c25..0000000 --- a/docs/examples/java/tables/get-row.md +++ /dev/null @@ -1,26 +0,0 @@ -import io.appwrite.Client; -import io.appwrite.coroutines.CoroutineCallback; -import io.appwrite.services.Tables; - -Client client = new Client() - .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint - .setProject("<YOUR_PROJECT_ID>") // Your project ID - .setSession(""); // The user session to authenticate with - -Tables tables = new Tables(client); - -tables.getRow( - "<DATABASE_ID>", // databaseId - "<TABLE_ID>", // tableId - "<ROW_ID>", // rowId - listOf(), // queries (optional) - new CoroutineCallback<>((result, error) -> { - if (error != null) { - error.printStackTrace(); - return; - } - - System.out.println(result); - }) -); - diff --git a/docs/examples/java/tables/get.md b/docs/examples/java/tables/get.md deleted file mode 100644 index 6f3c639..0000000 --- a/docs/examples/java/tables/get.md +++ /dev/null @@ -1,24 +0,0 @@ -import io.appwrite.Client; -import io.appwrite.coroutines.CoroutineCallback; -import io.appwrite.services.Tables; - -Client client = new Client() - .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint - .setProject("<YOUR_PROJECT_ID>") // Your project ID - .setKey("<YOUR_API_KEY>"); // Your secret API key - -Tables tables = new Tables(client); - -tables.get( - "<DATABASE_ID>", // databaseId - "<TABLE_ID>", // tableId - new CoroutineCallback<>((result, error) -> { - if (error != null) { - error.printStackTrace(); - return; - } - - System.out.println(result); - }) -); - diff --git a/docs/examples/java/tables/increment-row-column.md b/docs/examples/java/tables/increment-row-column.md deleted file mode 100644 index f9c8283..0000000 --- a/docs/examples/java/tables/increment-row-column.md +++ /dev/null @@ -1,28 +0,0 @@ -import io.appwrite.Client; -import io.appwrite.coroutines.CoroutineCallback; -import io.appwrite.services.Tables; - -Client client = new Client() - .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint - .setProject("<YOUR_PROJECT_ID>") // Your project ID - .setKey("<YOUR_API_KEY>"); // Your secret API key - -Tables tables = new Tables(client); - -tables.incrementRowColumn( - "<DATABASE_ID>", // databaseId - "<TABLE_ID>", // tableId - "<ROW_ID>", // rowId - "", // column - 0, // value (optional) - 0, // max (optional) - new CoroutineCallback<>((result, error) -> { - if (error != null) { - error.printStackTrace(); - return; - } - - System.out.println(result); - }) -); - diff --git a/docs/examples/java/tables/list-columns.md b/docs/examples/java/tables/list-columns.md deleted file mode 100644 index 05e1960..0000000 --- a/docs/examples/java/tables/list-columns.md +++ /dev/null @@ -1,25 +0,0 @@ -import io.appwrite.Client; -import io.appwrite.coroutines.CoroutineCallback; -import io.appwrite.services.Tables; - -Client client = new Client() - .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint - .setProject("<YOUR_PROJECT_ID>") // Your project ID - .setKey("<YOUR_API_KEY>"); // Your secret API key - -Tables tables = new Tables(client); - -tables.listColumns( - "<DATABASE_ID>", // databaseId - "<TABLE_ID>", // tableId - listOf(), // queries (optional) - new CoroutineCallback<>((result, error) -> { - if (error != null) { - error.printStackTrace(); - return; - } - - System.out.println(result); - }) -); - diff --git a/docs/examples/java/tables/list-indexes.md b/docs/examples/java/tables/list-indexes.md deleted file mode 100644 index c9bd445..0000000 --- a/docs/examples/java/tables/list-indexes.md +++ /dev/null @@ -1,25 +0,0 @@ -import io.appwrite.Client; -import io.appwrite.coroutines.CoroutineCallback; -import io.appwrite.services.Tables; - -Client client = new Client() - .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint - .setProject("<YOUR_PROJECT_ID>") // Your project ID - .setKey("<YOUR_API_KEY>"); // Your secret API key - -Tables tables = new Tables(client); - -tables.listIndexes( - "<DATABASE_ID>", // databaseId - "<TABLE_ID>", // tableId - listOf(), // queries (optional) - new CoroutineCallback<>((result, error) -> { - if (error != null) { - error.printStackTrace(); - return; - } - - System.out.println(result); - }) -); - diff --git a/docs/examples/java/tables/list-rows.md b/docs/examples/java/tables/list-rows.md deleted file mode 100644 index 8cbc356..0000000 --- a/docs/examples/java/tables/list-rows.md +++ /dev/null @@ -1,25 +0,0 @@ -import io.appwrite.Client; -import io.appwrite.coroutines.CoroutineCallback; -import io.appwrite.services.Tables; - -Client client = new Client() - .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint - .setProject("<YOUR_PROJECT_ID>") // Your project ID - .setSession(""); // The user session to authenticate with - -Tables tables = new Tables(client); - -tables.listRows( - "<DATABASE_ID>", // databaseId - "<TABLE_ID>", // tableId - listOf(), // queries (optional) - new CoroutineCallback<>((result, error) -> { - if (error != null) { - error.printStackTrace(); - return; - } - - System.out.println(result); - }) -); - diff --git a/docs/examples/java/tables/list.md b/docs/examples/java/tables/list.md deleted file mode 100644 index c3e0c55..0000000 --- a/docs/examples/java/tables/list.md +++ /dev/null @@ -1,25 +0,0 @@ -import io.appwrite.Client; -import io.appwrite.coroutines.CoroutineCallback; -import io.appwrite.services.Tables; - -Client client = new Client() - .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint - .setProject("<YOUR_PROJECT_ID>") // Your project ID - .setKey("<YOUR_API_KEY>"); // Your secret API key - -Tables tables = new Tables(client); - -tables.list( - "<DATABASE_ID>", // databaseId - listOf(), // queries (optional) - "<SEARCH>", // search (optional) - new CoroutineCallback<>((result, error) -> { - if (error != null) { - error.printStackTrace(); - return; - } - - System.out.println(result); - }) -); - diff --git a/docs/examples/java/tables/update-boolean-column.md b/docs/examples/java/tables/update-boolean-column.md deleted file mode 100644 index 647190e..0000000 --- a/docs/examples/java/tables/update-boolean-column.md +++ /dev/null @@ -1,28 +0,0 @@ -import io.appwrite.Client; -import io.appwrite.coroutines.CoroutineCallback; -import io.appwrite.services.Tables; - -Client client = new Client() - .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint - .setProject("<YOUR_PROJECT_ID>") // Your project ID - .setKey("<YOUR_API_KEY>"); // Your secret API key - -Tables tables = new Tables(client); - -tables.updateBooleanColumn( - "<DATABASE_ID>", // databaseId - "<TABLE_ID>", // tableId - "", // key - false, // required - false, // default - "", // newKey (optional) - new CoroutineCallback<>((result, error) -> { - if (error != null) { - error.printStackTrace(); - return; - } - - System.out.println(result); - }) -); - diff --git a/docs/examples/java/tables/update-datetime-column.md b/docs/examples/java/tables/update-datetime-column.md deleted file mode 100644 index 38e0e60..0000000 --- a/docs/examples/java/tables/update-datetime-column.md +++ /dev/null @@ -1,28 +0,0 @@ -import io.appwrite.Client; -import io.appwrite.coroutines.CoroutineCallback; -import io.appwrite.services.Tables; - -Client client = new Client() - .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint - .setProject("<YOUR_PROJECT_ID>") // Your project ID - .setKey("<YOUR_API_KEY>"); // Your secret API key - -Tables tables = new Tables(client); - -tables.updateDatetimeColumn( - "<DATABASE_ID>", // databaseId - "<TABLE_ID>", // tableId - "", // key - false, // required - "", // default - "", // newKey (optional) - new CoroutineCallback<>((result, error) -> { - if (error != null) { - error.printStackTrace(); - return; - } - - System.out.println(result); - }) -); - diff --git a/docs/examples/java/tables/update-email-column.md b/docs/examples/java/tables/update-email-column.md deleted file mode 100644 index 918884e..0000000 --- a/docs/examples/java/tables/update-email-column.md +++ /dev/null @@ -1,28 +0,0 @@ -import io.appwrite.Client; -import io.appwrite.coroutines.CoroutineCallback; -import io.appwrite.services.Tables; - -Client client = new Client() - .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint - .setProject("<YOUR_PROJECT_ID>") // Your project ID - .setKey("<YOUR_API_KEY>"); // Your secret API key - -Tables tables = new Tables(client); - -tables.updateEmailColumn( - "<DATABASE_ID>", // databaseId - "<TABLE_ID>", // tableId - "", // key - false, // required - "email@example.com", // default - "", // newKey (optional) - new CoroutineCallback<>((result, error) -> { - if (error != null) { - error.printStackTrace(); - return; - } - - System.out.println(result); - }) -); - diff --git a/docs/examples/java/tables/update-enum-column.md b/docs/examples/java/tables/update-enum-column.md deleted file mode 100644 index b1bbc83..0000000 --- a/docs/examples/java/tables/update-enum-column.md +++ /dev/null @@ -1,29 +0,0 @@ -import io.appwrite.Client; -import io.appwrite.coroutines.CoroutineCallback; -import io.appwrite.services.Tables; - -Client client = new Client() - .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint - .setProject("<YOUR_PROJECT_ID>") // Your project ID - .setKey("<YOUR_API_KEY>"); // Your secret API key - -Tables tables = new Tables(client); - -tables.updateEnumColumn( - "<DATABASE_ID>", // databaseId - "<TABLE_ID>", // tableId - "", // key - listOf(), // elements - false, // required - "<DEFAULT>", // default - "", // newKey (optional) - new CoroutineCallback<>((result, error) -> { - if (error != null) { - error.printStackTrace(); - return; - } - - System.out.println(result); - }) -); - diff --git a/docs/examples/java/tables/update-float-column.md b/docs/examples/java/tables/update-float-column.md deleted file mode 100644 index 977c237..0000000 --- a/docs/examples/java/tables/update-float-column.md +++ /dev/null @@ -1,30 +0,0 @@ -import io.appwrite.Client; -import io.appwrite.coroutines.CoroutineCallback; -import io.appwrite.services.Tables; - -Client client = new Client() - .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint - .setProject("<YOUR_PROJECT_ID>") // Your project ID - .setKey("<YOUR_API_KEY>"); // Your secret API key - -Tables tables = new Tables(client); - -tables.updateFloatColumn( - "<DATABASE_ID>", // databaseId - "<TABLE_ID>", // tableId - "", // key - false, // required - 0, // default - 0, // min (optional) - 0, // max (optional) - "", // newKey (optional) - new CoroutineCallback<>((result, error) -> { - if (error != null) { - error.printStackTrace(); - return; - } - - System.out.println(result); - }) -); - diff --git a/docs/examples/java/tables/update-integer-column.md b/docs/examples/java/tables/update-integer-column.md deleted file mode 100644 index d2ad81d..0000000 --- a/docs/examples/java/tables/update-integer-column.md +++ /dev/null @@ -1,30 +0,0 @@ -import io.appwrite.Client; -import io.appwrite.coroutines.CoroutineCallback; -import io.appwrite.services.Tables; - -Client client = new Client() - .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint - .setProject("<YOUR_PROJECT_ID>") // Your project ID - .setKey("<YOUR_API_KEY>"); // Your secret API key - -Tables tables = new Tables(client); - -tables.updateIntegerColumn( - "<DATABASE_ID>", // databaseId - "<TABLE_ID>", // tableId - "", // key - false, // required - 0, // default - 0, // min (optional) - 0, // max (optional) - "", // newKey (optional) - new CoroutineCallback<>((result, error) -> { - if (error != null) { - error.printStackTrace(); - return; - } - - System.out.println(result); - }) -); - diff --git a/docs/examples/java/tables/update-ip-column.md b/docs/examples/java/tables/update-ip-column.md deleted file mode 100644 index cd6e67b..0000000 --- a/docs/examples/java/tables/update-ip-column.md +++ /dev/null @@ -1,28 +0,0 @@ -import io.appwrite.Client; -import io.appwrite.coroutines.CoroutineCallback; -import io.appwrite.services.Tables; - -Client client = new Client() - .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint - .setProject("<YOUR_PROJECT_ID>") // Your project ID - .setKey("<YOUR_API_KEY>"); // Your secret API key - -Tables tables = new Tables(client); - -tables.updateIpColumn( - "<DATABASE_ID>", // databaseId - "<TABLE_ID>", // tableId - "", // key - false, // required - "", // default - "", // newKey (optional) - new CoroutineCallback<>((result, error) -> { - if (error != null) { - error.printStackTrace(); - return; - } - - System.out.println(result); - }) -); - diff --git a/docs/examples/java/tables/update-relationship-column.md b/docs/examples/java/tables/update-relationship-column.md deleted file mode 100644 index e0dc185..0000000 --- a/docs/examples/java/tables/update-relationship-column.md +++ /dev/null @@ -1,27 +0,0 @@ -import io.appwrite.Client; -import io.appwrite.coroutines.CoroutineCallback; -import io.appwrite.services.Tables; - -Client client = new Client() - .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint - .setProject("<YOUR_PROJECT_ID>") // Your project ID - .setKey("<YOUR_API_KEY>"); // Your secret API key - -Tables tables = new Tables(client); - -tables.updateRelationshipColumn( - "<DATABASE_ID>", // databaseId - "<TABLE_ID>", // tableId - "", // key - RelationMutate.CASCADE, // onDelete (optional) - "", // newKey (optional) - new CoroutineCallback<>((result, error) -> { - if (error != null) { - error.printStackTrace(); - return; - } - - System.out.println(result); - }) -); - diff --git a/docs/examples/java/tables/update-row.md b/docs/examples/java/tables/update-row.md deleted file mode 100644 index 8270c3f..0000000 --- a/docs/examples/java/tables/update-row.md +++ /dev/null @@ -1,27 +0,0 @@ -import io.appwrite.Client; -import io.appwrite.coroutines.CoroutineCallback; -import io.appwrite.services.Tables; - -Client client = new Client() - .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint - .setProject("<YOUR_PROJECT_ID>") // Your project ID - .setSession(""); // The user session to authenticate with - -Tables tables = new Tables(client); - -tables.updateRow( - "<DATABASE_ID>", // databaseId - "<TABLE_ID>", // tableId - "<ROW_ID>", // rowId - mapOf( "a" to "b" ), // data (optional) - listOf("read("any")"), // permissions (optional) - new CoroutineCallback<>((result, error) -> { - if (error != null) { - error.printStackTrace(); - return; - } - - System.out.println(result); - }) -); - diff --git a/docs/examples/java/tables/update-rows.md b/docs/examples/java/tables/update-rows.md deleted file mode 100644 index a518785..0000000 --- a/docs/examples/java/tables/update-rows.md +++ /dev/null @@ -1,26 +0,0 @@ -import io.appwrite.Client; -import io.appwrite.coroutines.CoroutineCallback; -import io.appwrite.services.Tables; - -Client client = new Client() - .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint - .setProject("<YOUR_PROJECT_ID>") // Your project ID - .setKey("<YOUR_API_KEY>"); // Your secret API key - -Tables tables = new Tables(client); - -tables.updateRows( - "<DATABASE_ID>", // databaseId - "<TABLE_ID>", // tableId - mapOf( "a" to "b" ), // data (optional) - listOf(), // queries (optional) - new CoroutineCallback<>((result, error) -> { - if (error != null) { - error.printStackTrace(); - return; - } - - System.out.println(result); - }) -); - diff --git a/docs/examples/java/tables/update-string-column.md b/docs/examples/java/tables/update-string-column.md deleted file mode 100644 index 31e279d..0000000 --- a/docs/examples/java/tables/update-string-column.md +++ /dev/null @@ -1,29 +0,0 @@ -import io.appwrite.Client; -import io.appwrite.coroutines.CoroutineCallback; -import io.appwrite.services.Tables; - -Client client = new Client() - .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint - .setProject("<YOUR_PROJECT_ID>") // Your project ID - .setKey("<YOUR_API_KEY>"); // Your secret API key - -Tables tables = new Tables(client); - -tables.updateStringColumn( - "<DATABASE_ID>", // databaseId - "<TABLE_ID>", // tableId - "", // key - false, // required - "<DEFAULT>", // default - 1, // size (optional) - "", // newKey (optional) - new CoroutineCallback<>((result, error) -> { - if (error != null) { - error.printStackTrace(); - return; - } - - System.out.println(result); - }) -); - diff --git a/docs/examples/java/tables/update-url-column.md b/docs/examples/java/tables/update-url-column.md deleted file mode 100644 index 201e578..0000000 --- a/docs/examples/java/tables/update-url-column.md +++ /dev/null @@ -1,28 +0,0 @@ -import io.appwrite.Client; -import io.appwrite.coroutines.CoroutineCallback; -import io.appwrite.services.Tables; - -Client client = new Client() - .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint - .setProject("<YOUR_PROJECT_ID>") // Your project ID - .setKey("<YOUR_API_KEY>"); // Your secret API key - -Tables tables = new Tables(client); - -tables.updateUrlColumn( - "<DATABASE_ID>", // databaseId - "<TABLE_ID>", // tableId - "", // key - false, // required - "https://example.com", // default - "", // newKey (optional) - new CoroutineCallback<>((result, error) -> { - if (error != null) { - error.printStackTrace(); - return; - } - - System.out.println(result); - }) -); - diff --git a/docs/examples/java/tables/update.md b/docs/examples/java/tables/update.md deleted file mode 100644 index cf560cb..0000000 --- a/docs/examples/java/tables/update.md +++ /dev/null @@ -1,28 +0,0 @@ -import io.appwrite.Client; -import io.appwrite.coroutines.CoroutineCallback; -import io.appwrite.services.Tables; - -Client client = new Client() - .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint - .setProject("<YOUR_PROJECT_ID>") // Your project ID - .setKey("<YOUR_API_KEY>"); // Your secret API key - -Tables tables = new Tables(client); - -tables.update( - "<DATABASE_ID>", // databaseId - "<TABLE_ID>", // tableId - "<NAME>", // name - listOf("read("any")"), // permissions (optional) - false, // rowSecurity (optional) - false, // enabled (optional) - new CoroutineCallback<>((result, error) -> { - if (error != null) { - error.printStackTrace(); - return; - } - - System.out.println(result); - }) -); - diff --git a/docs/examples/java/tables/upsert-row.md b/docs/examples/java/tables/upsert-row.md deleted file mode 100644 index 11127c5..0000000 --- a/docs/examples/java/tables/upsert-row.md +++ /dev/null @@ -1,26 +0,0 @@ -import io.appwrite.Client; -import io.appwrite.coroutines.CoroutineCallback; -import io.appwrite.services.Tables; - -Client client = new Client() - .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint - .setSession("") // The user session to authenticate with - .setKey("<YOUR_API_KEY>") // Your secret API key - .setJWT("<YOUR_JWT>"); // Your secret JSON Web Token - -Tables tables = new Tables(client); - -tables.upsertRow( - "<DATABASE_ID>", // databaseId - "<TABLE_ID>", // tableId - "<ROW_ID>", // rowId - new CoroutineCallback<>((result, error) -> { - if (error != null) { - error.printStackTrace(); - return; - } - - System.out.println(result); - }) -); - diff --git a/docs/examples/java/tables/upsert-rows.md b/docs/examples/java/tables/upsert-rows.md deleted file mode 100644 index 14b3822..0000000 --- a/docs/examples/java/tables/upsert-rows.md +++ /dev/null @@ -1,24 +0,0 @@ -import io.appwrite.Client; -import io.appwrite.coroutines.CoroutineCallback; -import io.appwrite.services.Tables; - -Client client = new Client() - .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint - .setAdmin("") // - .setKey("<YOUR_API_KEY>"); // Your secret API key - -Tables tables = new Tables(client); - -tables.upsertRows( - "<DATABASE_ID>", // databaseId - "<TABLE_ID>", // tableId - new CoroutineCallback<>((result, error) -> { - if (error != null) { - error.printStackTrace(); - return; - } - - System.out.println(result); - }) -); - diff --git a/docs/examples/kotlin/databases/create-document.md b/docs/examples/kotlin/databases/create-document.md index 93da01e..695fdbd 100644 --- a/docs/examples/kotlin/databases/create-document.md +++ b/docs/examples/kotlin/databases/create-document.md @@ -4,9 +4,8 @@ import io.appwrite.services.Databases val client = Client() .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID .setSession("") // The user session to authenticate with - .setKey("<YOUR_API_KEY>") // Your secret API key - .setJWT("<YOUR_JWT>") // Your secret JSON Web Token val databases = Databases(client) diff --git a/docs/examples/kotlin/databases/create-documents.md b/docs/examples/kotlin/databases/create-documents.md index ddce31c..41a98dc 100644 --- a/docs/examples/kotlin/databases/create-documents.md +++ b/docs/examples/kotlin/databases/create-documents.md @@ -4,7 +4,7 @@ import io.appwrite.services.Databases val client = Client() .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint - .setAdmin("") // + .setProject("<YOUR_PROJECT_ID>") // Your project ID .setKey("<YOUR_API_KEY>") // Your secret API key val databases = Databases(client) diff --git a/docs/examples/kotlin/databases/upsert-document.md b/docs/examples/kotlin/databases/upsert-document.md index df261db..d8be0e1 100644 --- a/docs/examples/kotlin/databases/upsert-document.md +++ b/docs/examples/kotlin/databases/upsert-document.md @@ -4,14 +4,15 @@ import io.appwrite.services.Databases val client = Client() .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID .setSession("") // The user session to authenticate with - .setKey("<YOUR_API_KEY>") // Your secret API key - .setJWT("<YOUR_JWT>") // Your secret JSON Web Token val databases = Databases(client) val response = databases.upsertDocument( databaseId = "<DATABASE_ID>", collectionId = "<COLLECTION_ID>", - documentId = "<DOCUMENT_ID>" + documentId = "<DOCUMENT_ID>", + data = mapOf( "a" to "b" ), + permissions = listOf("read("any")") // optional ) diff --git a/docs/examples/kotlin/databases/upsert-documents.md b/docs/examples/kotlin/databases/upsert-documents.md index 1cb376f..ca861c6 100644 --- a/docs/examples/kotlin/databases/upsert-documents.md +++ b/docs/examples/kotlin/databases/upsert-documents.md @@ -4,12 +4,13 @@ import io.appwrite.services.Databases val client = Client() .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint - .setAdmin("") // + .setProject("<YOUR_PROJECT_ID>") // Your project ID .setKey("<YOUR_API_KEY>") // Your secret API key val databases = Databases(client) val response = databases.upsertDocuments( databaseId = "<DATABASE_ID>", - collectionId = "<COLLECTION_ID>" + collectionId = "<COLLECTION_ID>", + documents = listOf() ) diff --git a/docs/examples/kotlin/tables/create-boolean-column.md b/docs/examples/kotlin/tables/create-boolean-column.md deleted file mode 100644 index 68b8dc5..0000000 --- a/docs/examples/kotlin/tables/create-boolean-column.md +++ /dev/null @@ -1,19 +0,0 @@ -import io.appwrite.Client -import io.appwrite.coroutines.CoroutineCallback -import io.appwrite.services.Tables - -val client = Client() - .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint - .setProject("<YOUR_PROJECT_ID>") // Your project ID - .setKey("<YOUR_API_KEY>") // Your secret API key - -val tables = Tables(client) - -val response = tables.createBooleanColumn( - databaseId = "<DATABASE_ID>", - tableId = "<TABLE_ID>", - key = "", - required = false, - default = false, // optional - array = false // optional -) diff --git a/docs/examples/kotlin/tables/create-datetime-column.md b/docs/examples/kotlin/tables/create-datetime-column.md deleted file mode 100644 index 8740a71..0000000 --- a/docs/examples/kotlin/tables/create-datetime-column.md +++ /dev/null @@ -1,19 +0,0 @@ -import io.appwrite.Client -import io.appwrite.coroutines.CoroutineCallback -import io.appwrite.services.Tables - -val client = Client() - .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint - .setProject("<YOUR_PROJECT_ID>") // Your project ID - .setKey("<YOUR_API_KEY>") // Your secret API key - -val tables = Tables(client) - -val response = tables.createDatetimeColumn( - databaseId = "<DATABASE_ID>", - tableId = "<TABLE_ID>", - key = "", - required = false, - default = "", // optional - array = false // optional -) diff --git a/docs/examples/kotlin/tables/create-email-column.md b/docs/examples/kotlin/tables/create-email-column.md deleted file mode 100644 index 34a6cb6..0000000 --- a/docs/examples/kotlin/tables/create-email-column.md +++ /dev/null @@ -1,19 +0,0 @@ -import io.appwrite.Client -import io.appwrite.coroutines.CoroutineCallback -import io.appwrite.services.Tables - -val client = Client() - .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint - .setProject("<YOUR_PROJECT_ID>") // Your project ID - .setKey("<YOUR_API_KEY>") // Your secret API key - -val tables = Tables(client) - -val response = tables.createEmailColumn( - databaseId = "<DATABASE_ID>", - tableId = "<TABLE_ID>", - key = "", - required = false, - default = "email@example.com", // optional - array = false // optional -) diff --git a/docs/examples/kotlin/tables/create-enum-column.md b/docs/examples/kotlin/tables/create-enum-column.md deleted file mode 100644 index d3d2fc9..0000000 --- a/docs/examples/kotlin/tables/create-enum-column.md +++ /dev/null @@ -1,20 +0,0 @@ -import io.appwrite.Client -import io.appwrite.coroutines.CoroutineCallback -import io.appwrite.services.Tables - -val client = Client() - .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint - .setProject("<YOUR_PROJECT_ID>") // Your project ID - .setKey("<YOUR_API_KEY>") // Your secret API key - -val tables = Tables(client) - -val response = tables.createEnumColumn( - databaseId = "<DATABASE_ID>", - tableId = "<TABLE_ID>", - key = "", - elements = listOf(), - required = false, - default = "<DEFAULT>", // optional - array = false // optional -) diff --git a/docs/examples/kotlin/tables/create-float-column.md b/docs/examples/kotlin/tables/create-float-column.md deleted file mode 100644 index 8540430..0000000 --- a/docs/examples/kotlin/tables/create-float-column.md +++ /dev/null @@ -1,21 +0,0 @@ -import io.appwrite.Client -import io.appwrite.coroutines.CoroutineCallback -import io.appwrite.services.Tables - -val client = Client() - .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint - .setProject("<YOUR_PROJECT_ID>") // Your project ID - .setKey("<YOUR_API_KEY>") // Your secret API key - -val tables = Tables(client) - -val response = tables.createFloatColumn( - databaseId = "<DATABASE_ID>", - tableId = "<TABLE_ID>", - key = "", - required = false, - min = 0, // optional - max = 0, // optional - default = 0, // optional - array = false // optional -) diff --git a/docs/examples/kotlin/tables/create-index.md b/docs/examples/kotlin/tables/create-index.md deleted file mode 100644 index 053c88a..0000000 --- a/docs/examples/kotlin/tables/create-index.md +++ /dev/null @@ -1,21 +0,0 @@ -import io.appwrite.Client -import io.appwrite.coroutines.CoroutineCallback -import io.appwrite.services.Tables -import io.appwrite.enums.IndexType - -val client = Client() - .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint - .setProject("<YOUR_PROJECT_ID>") // Your project ID - .setKey("<YOUR_API_KEY>") // Your secret API key - -val tables = Tables(client) - -val response = tables.createIndex( - databaseId = "<DATABASE_ID>", - tableId = "<TABLE_ID>", - key = "", - type = IndexType.KEY, - columns = listOf(), - orders = listOf(), // optional - lengths = listOf() // optional -) diff --git a/docs/examples/kotlin/tables/create-integer-column.md b/docs/examples/kotlin/tables/create-integer-column.md deleted file mode 100644 index 1222746..0000000 --- a/docs/examples/kotlin/tables/create-integer-column.md +++ /dev/null @@ -1,21 +0,0 @@ -import io.appwrite.Client -import io.appwrite.coroutines.CoroutineCallback -import io.appwrite.services.Tables - -val client = Client() - .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint - .setProject("<YOUR_PROJECT_ID>") // Your project ID - .setKey("<YOUR_API_KEY>") // Your secret API key - -val tables = Tables(client) - -val response = tables.createIntegerColumn( - databaseId = "<DATABASE_ID>", - tableId = "<TABLE_ID>", - key = "", - required = false, - min = 0, // optional - max = 0, // optional - default = 0, // optional - array = false // optional -) diff --git a/docs/examples/kotlin/tables/create-ip-column.md b/docs/examples/kotlin/tables/create-ip-column.md deleted file mode 100644 index 277c756..0000000 --- a/docs/examples/kotlin/tables/create-ip-column.md +++ /dev/null @@ -1,19 +0,0 @@ -import io.appwrite.Client -import io.appwrite.coroutines.CoroutineCallback -import io.appwrite.services.Tables - -val client = Client() - .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint - .setProject("<YOUR_PROJECT_ID>") // Your project ID - .setKey("<YOUR_API_KEY>") // Your secret API key - -val tables = Tables(client) - -val response = tables.createIpColumn( - databaseId = "<DATABASE_ID>", - tableId = "<TABLE_ID>", - key = "", - required = false, - default = "", // optional - array = false // optional -) diff --git a/docs/examples/kotlin/tables/create-relationship-column.md b/docs/examples/kotlin/tables/create-relationship-column.md deleted file mode 100644 index aa07fac..0000000 --- a/docs/examples/kotlin/tables/create-relationship-column.md +++ /dev/null @@ -1,22 +0,0 @@ -import io.appwrite.Client -import io.appwrite.coroutines.CoroutineCallback -import io.appwrite.services.Tables -import io.appwrite.enums.RelationshipType - -val client = Client() - .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint - .setProject("<YOUR_PROJECT_ID>") // Your project ID - .setKey("<YOUR_API_KEY>") // Your secret API key - -val tables = Tables(client) - -val response = tables.createRelationshipColumn( - databaseId = "<DATABASE_ID>", - tableId = "<TABLE_ID>", - relatedTableId = "<RELATED_TABLE_ID>", - type = RelationshipType.ONETOONE, - twoWay = false, // optional - key = "", // optional - twoWayKey = "", // optional - onDelete = "cascade" // optional -) diff --git a/docs/examples/kotlin/tables/create-row.md b/docs/examples/kotlin/tables/create-row.md deleted file mode 100644 index 5df0890..0000000 --- a/docs/examples/kotlin/tables/create-row.md +++ /dev/null @@ -1,19 +0,0 @@ -import io.appwrite.Client -import io.appwrite.coroutines.CoroutineCallback -import io.appwrite.services.Tables - -val client = Client() - .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint - .setSession("") // The user session to authenticate with - .setKey("<YOUR_API_KEY>") // Your secret API key - .setJWT("<YOUR_JWT>") // Your secret JSON Web Token - -val tables = Tables(client) - -val response = tables.createRow( - databaseId = "<DATABASE_ID>", - tableId = "<TABLE_ID>", - rowId = "<ROW_ID>", - data = mapOf( "a" to "b" ), - permissions = listOf("read("any")") // optional -) diff --git a/docs/examples/kotlin/tables/create-rows.md b/docs/examples/kotlin/tables/create-rows.md deleted file mode 100644 index f549d6f..0000000 --- a/docs/examples/kotlin/tables/create-rows.md +++ /dev/null @@ -1,16 +0,0 @@ -import io.appwrite.Client -import io.appwrite.coroutines.CoroutineCallback -import io.appwrite.services.Tables - -val client = Client() - .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint - .setAdmin("") // - .setKey("<YOUR_API_KEY>") // Your secret API key - -val tables = Tables(client) - -val response = tables.createRows( - databaseId = "<DATABASE_ID>", - tableId = "<TABLE_ID>", - rows = listOf() -) diff --git a/docs/examples/kotlin/tables/create-string-column.md b/docs/examples/kotlin/tables/create-string-column.md deleted file mode 100644 index d82026c..0000000 --- a/docs/examples/kotlin/tables/create-string-column.md +++ /dev/null @@ -1,21 +0,0 @@ -import io.appwrite.Client -import io.appwrite.coroutines.CoroutineCallback -import io.appwrite.services.Tables - -val client = Client() - .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint - .setProject("<YOUR_PROJECT_ID>") // Your project ID - .setKey("<YOUR_API_KEY>") // Your secret API key - -val tables = Tables(client) - -val response = tables.createStringColumn( - databaseId = "<DATABASE_ID>", - tableId = "<TABLE_ID>", - key = "", - size = 1, - required = false, - default = "<DEFAULT>", // optional - array = false, // optional - encrypt = false // optional -) diff --git a/docs/examples/kotlin/tables/create-url-column.md b/docs/examples/kotlin/tables/create-url-column.md deleted file mode 100644 index 42f50e9..0000000 --- a/docs/examples/kotlin/tables/create-url-column.md +++ /dev/null @@ -1,19 +0,0 @@ -import io.appwrite.Client -import io.appwrite.coroutines.CoroutineCallback -import io.appwrite.services.Tables - -val client = Client() - .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint - .setProject("<YOUR_PROJECT_ID>") // Your project ID - .setKey("<YOUR_API_KEY>") // Your secret API key - -val tables = Tables(client) - -val response = tables.createUrlColumn( - databaseId = "<DATABASE_ID>", - tableId = "<TABLE_ID>", - key = "", - required = false, - default = "https://example.com", // optional - array = false // optional -) diff --git a/docs/examples/kotlin/tables/create.md b/docs/examples/kotlin/tables/create.md deleted file mode 100644 index 3dc1d1a..0000000 --- a/docs/examples/kotlin/tables/create.md +++ /dev/null @@ -1,19 +0,0 @@ -import io.appwrite.Client -import io.appwrite.coroutines.CoroutineCallback -import io.appwrite.services.Tables - -val client = Client() - .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint - .setProject("<YOUR_PROJECT_ID>") // Your project ID - .setKey("<YOUR_API_KEY>") // Your secret API key - -val tables = Tables(client) - -val response = tables.create( - databaseId = "<DATABASE_ID>", - tableId = "<TABLE_ID>", - name = "<NAME>", - permissions = listOf("read("any")"), // optional - rowSecurity = false, // optional - enabled = false // optional -) diff --git a/docs/examples/kotlin/tables/decrement-row-column.md b/docs/examples/kotlin/tables/decrement-row-column.md deleted file mode 100644 index f78f7bb..0000000 --- a/docs/examples/kotlin/tables/decrement-row-column.md +++ /dev/null @@ -1,19 +0,0 @@ -import io.appwrite.Client -import io.appwrite.coroutines.CoroutineCallback -import io.appwrite.services.Tables - -val client = Client() - .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint - .setProject("<YOUR_PROJECT_ID>") // Your project ID - .setKey("<YOUR_API_KEY>") // Your secret API key - -val tables = Tables(client) - -val response = tables.decrementRowColumn( - databaseId = "<DATABASE_ID>", - tableId = "<TABLE_ID>", - rowId = "<ROW_ID>", - column = "", - value = 0, // optional - min = 0 // optional -) diff --git a/docs/examples/kotlin/tables/delete-column.md b/docs/examples/kotlin/tables/delete-column.md deleted file mode 100644 index d41f2ce..0000000 --- a/docs/examples/kotlin/tables/delete-column.md +++ /dev/null @@ -1,16 +0,0 @@ -import io.appwrite.Client -import io.appwrite.coroutines.CoroutineCallback -import io.appwrite.services.Tables - -val client = Client() - .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint - .setProject("<YOUR_PROJECT_ID>") // Your project ID - .setKey("<YOUR_API_KEY>") // Your secret API key - -val tables = Tables(client) - -val response = tables.deleteColumn( - databaseId = "<DATABASE_ID>", - tableId = "<TABLE_ID>", - key = "" -) diff --git a/docs/examples/kotlin/tables/delete-index.md b/docs/examples/kotlin/tables/delete-index.md deleted file mode 100644 index 7af6648..0000000 --- a/docs/examples/kotlin/tables/delete-index.md +++ /dev/null @@ -1,16 +0,0 @@ -import io.appwrite.Client -import io.appwrite.coroutines.CoroutineCallback -import io.appwrite.services.Tables - -val client = Client() - .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint - .setProject("<YOUR_PROJECT_ID>") // Your project ID - .setKey("<YOUR_API_KEY>") // Your secret API key - -val tables = Tables(client) - -val response = tables.deleteIndex( - databaseId = "<DATABASE_ID>", - tableId = "<TABLE_ID>", - key = "" -) diff --git a/docs/examples/kotlin/tables/delete-row.md b/docs/examples/kotlin/tables/delete-row.md deleted file mode 100644 index d182ccf..0000000 --- a/docs/examples/kotlin/tables/delete-row.md +++ /dev/null @@ -1,16 +0,0 @@ -import io.appwrite.Client -import io.appwrite.coroutines.CoroutineCallback -import io.appwrite.services.Tables - -val client = Client() - .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint - .setProject("<YOUR_PROJECT_ID>") // Your project ID - .setSession("") // The user session to authenticate with - -val tables = Tables(client) - -val response = tables.deleteRow( - databaseId = "<DATABASE_ID>", - tableId = "<TABLE_ID>", - rowId = "<ROW_ID>" -) diff --git a/docs/examples/kotlin/tables/delete-rows.md b/docs/examples/kotlin/tables/delete-rows.md deleted file mode 100644 index 54ff6b6..0000000 --- a/docs/examples/kotlin/tables/delete-rows.md +++ /dev/null @@ -1,16 +0,0 @@ -import io.appwrite.Client -import io.appwrite.coroutines.CoroutineCallback -import io.appwrite.services.Tables - -val client = Client() - .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint - .setProject("<YOUR_PROJECT_ID>") // Your project ID - .setKey("<YOUR_API_KEY>") // Your secret API key - -val tables = Tables(client) - -val response = tables.deleteRows( - databaseId = "<DATABASE_ID>", - tableId = "<TABLE_ID>", - queries = listOf() // optional -) diff --git a/docs/examples/kotlin/tables/delete.md b/docs/examples/kotlin/tables/delete.md deleted file mode 100644 index 5cbd032..0000000 --- a/docs/examples/kotlin/tables/delete.md +++ /dev/null @@ -1,15 +0,0 @@ -import io.appwrite.Client -import io.appwrite.coroutines.CoroutineCallback -import io.appwrite.services.Tables - -val client = Client() - .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint - .setProject("<YOUR_PROJECT_ID>") // Your project ID - .setKey("<YOUR_API_KEY>") // Your secret API key - -val tables = Tables(client) - -val response = tables.delete( - databaseId = "<DATABASE_ID>", - tableId = "<TABLE_ID>" -) diff --git a/docs/examples/kotlin/tables/get-column.md b/docs/examples/kotlin/tables/get-column.md deleted file mode 100644 index 6f4d65b..0000000 --- a/docs/examples/kotlin/tables/get-column.md +++ /dev/null @@ -1,16 +0,0 @@ -import io.appwrite.Client -import io.appwrite.coroutines.CoroutineCallback -import io.appwrite.services.Tables - -val client = Client() - .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint - .setProject("<YOUR_PROJECT_ID>") // Your project ID - .setKey("<YOUR_API_KEY>") // Your secret API key - -val tables = Tables(client) - -val response = tables.getColumn( - databaseId = "<DATABASE_ID>", - tableId = "<TABLE_ID>", - key = "" -) diff --git a/docs/examples/kotlin/tables/get-index.md b/docs/examples/kotlin/tables/get-index.md deleted file mode 100644 index 660502f..0000000 --- a/docs/examples/kotlin/tables/get-index.md +++ /dev/null @@ -1,16 +0,0 @@ -import io.appwrite.Client -import io.appwrite.coroutines.CoroutineCallback -import io.appwrite.services.Tables - -val client = Client() - .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint - .setProject("<YOUR_PROJECT_ID>") // Your project ID - .setKey("<YOUR_API_KEY>") // Your secret API key - -val tables = Tables(client) - -val response = tables.getIndex( - databaseId = "<DATABASE_ID>", - tableId = "<TABLE_ID>", - key = "" -) diff --git a/docs/examples/kotlin/tables/get-row.md b/docs/examples/kotlin/tables/get-row.md deleted file mode 100644 index cbaaa6c..0000000 --- a/docs/examples/kotlin/tables/get-row.md +++ /dev/null @@ -1,17 +0,0 @@ -import io.appwrite.Client -import io.appwrite.coroutines.CoroutineCallback -import io.appwrite.services.Tables - -val client = Client() - .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint - .setProject("<YOUR_PROJECT_ID>") // Your project ID - .setSession("") // The user session to authenticate with - -val tables = Tables(client) - -val response = tables.getRow( - databaseId = "<DATABASE_ID>", - tableId = "<TABLE_ID>", - rowId = "<ROW_ID>", - queries = listOf() // optional -) diff --git a/docs/examples/kotlin/tables/get.md b/docs/examples/kotlin/tables/get.md deleted file mode 100644 index ff6d354..0000000 --- a/docs/examples/kotlin/tables/get.md +++ /dev/null @@ -1,15 +0,0 @@ -import io.appwrite.Client -import io.appwrite.coroutines.CoroutineCallback -import io.appwrite.services.Tables - -val client = Client() - .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint - .setProject("<YOUR_PROJECT_ID>") // Your project ID - .setKey("<YOUR_API_KEY>") // Your secret API key - -val tables = Tables(client) - -val response = tables.get( - databaseId = "<DATABASE_ID>", - tableId = "<TABLE_ID>" -) diff --git a/docs/examples/kotlin/tables/increment-row-column.md b/docs/examples/kotlin/tables/increment-row-column.md deleted file mode 100644 index 7917b7f..0000000 --- a/docs/examples/kotlin/tables/increment-row-column.md +++ /dev/null @@ -1,19 +0,0 @@ -import io.appwrite.Client -import io.appwrite.coroutines.CoroutineCallback -import io.appwrite.services.Tables - -val client = Client() - .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint - .setProject("<YOUR_PROJECT_ID>") // Your project ID - .setKey("<YOUR_API_KEY>") // Your secret API key - -val tables = Tables(client) - -val response = tables.incrementRowColumn( - databaseId = "<DATABASE_ID>", - tableId = "<TABLE_ID>", - rowId = "<ROW_ID>", - column = "", - value = 0, // optional - max = 0 // optional -) diff --git a/docs/examples/kotlin/tables/list-columns.md b/docs/examples/kotlin/tables/list-columns.md deleted file mode 100644 index 4c17651..0000000 --- a/docs/examples/kotlin/tables/list-columns.md +++ /dev/null @@ -1,16 +0,0 @@ -import io.appwrite.Client -import io.appwrite.coroutines.CoroutineCallback -import io.appwrite.services.Tables - -val client = Client() - .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint - .setProject("<YOUR_PROJECT_ID>") // Your project ID - .setKey("<YOUR_API_KEY>") // Your secret API key - -val tables = Tables(client) - -val response = tables.listColumns( - databaseId = "<DATABASE_ID>", - tableId = "<TABLE_ID>", - queries = listOf() // optional -) diff --git a/docs/examples/kotlin/tables/list-indexes.md b/docs/examples/kotlin/tables/list-indexes.md deleted file mode 100644 index bcd1fe7..0000000 --- a/docs/examples/kotlin/tables/list-indexes.md +++ /dev/null @@ -1,16 +0,0 @@ -import io.appwrite.Client -import io.appwrite.coroutines.CoroutineCallback -import io.appwrite.services.Tables - -val client = Client() - .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint - .setProject("<YOUR_PROJECT_ID>") // Your project ID - .setKey("<YOUR_API_KEY>") // Your secret API key - -val tables = Tables(client) - -val response = tables.listIndexes( - databaseId = "<DATABASE_ID>", - tableId = "<TABLE_ID>", - queries = listOf() // optional -) diff --git a/docs/examples/kotlin/tables/list-rows.md b/docs/examples/kotlin/tables/list-rows.md deleted file mode 100644 index 38b776a..0000000 --- a/docs/examples/kotlin/tables/list-rows.md +++ /dev/null @@ -1,16 +0,0 @@ -import io.appwrite.Client -import io.appwrite.coroutines.CoroutineCallback -import io.appwrite.services.Tables - -val client = Client() - .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint - .setProject("<YOUR_PROJECT_ID>") // Your project ID - .setSession("") // The user session to authenticate with - -val tables = Tables(client) - -val response = tables.listRows( - databaseId = "<DATABASE_ID>", - tableId = "<TABLE_ID>", - queries = listOf() // optional -) diff --git a/docs/examples/kotlin/tables/list.md b/docs/examples/kotlin/tables/list.md deleted file mode 100644 index 37b0344..0000000 --- a/docs/examples/kotlin/tables/list.md +++ /dev/null @@ -1,16 +0,0 @@ -import io.appwrite.Client -import io.appwrite.coroutines.CoroutineCallback -import io.appwrite.services.Tables - -val client = Client() - .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint - .setProject("<YOUR_PROJECT_ID>") // Your project ID - .setKey("<YOUR_API_KEY>") // Your secret API key - -val tables = Tables(client) - -val response = tables.list( - databaseId = "<DATABASE_ID>", - queries = listOf(), // optional - search = "<SEARCH>" // optional -) diff --git a/docs/examples/kotlin/tables/update-boolean-column.md b/docs/examples/kotlin/tables/update-boolean-column.md deleted file mode 100644 index 10a0422..0000000 --- a/docs/examples/kotlin/tables/update-boolean-column.md +++ /dev/null @@ -1,19 +0,0 @@ -import io.appwrite.Client -import io.appwrite.coroutines.CoroutineCallback -import io.appwrite.services.Tables - -val client = Client() - .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint - .setProject("<YOUR_PROJECT_ID>") // Your project ID - .setKey("<YOUR_API_KEY>") // Your secret API key - -val tables = Tables(client) - -val response = tables.updateBooleanColumn( - databaseId = "<DATABASE_ID>", - tableId = "<TABLE_ID>", - key = "", - required = false, - default = false, - newKey = "" // optional -) diff --git a/docs/examples/kotlin/tables/update-datetime-column.md b/docs/examples/kotlin/tables/update-datetime-column.md deleted file mode 100644 index 69ccf03..0000000 --- a/docs/examples/kotlin/tables/update-datetime-column.md +++ /dev/null @@ -1,19 +0,0 @@ -import io.appwrite.Client -import io.appwrite.coroutines.CoroutineCallback -import io.appwrite.services.Tables - -val client = Client() - .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint - .setProject("<YOUR_PROJECT_ID>") // Your project ID - .setKey("<YOUR_API_KEY>") // Your secret API key - -val tables = Tables(client) - -val response = tables.updateDatetimeColumn( - databaseId = "<DATABASE_ID>", - tableId = "<TABLE_ID>", - key = "", - required = false, - default = "", - newKey = "" // optional -) diff --git a/docs/examples/kotlin/tables/update-email-column.md b/docs/examples/kotlin/tables/update-email-column.md deleted file mode 100644 index 593a89b..0000000 --- a/docs/examples/kotlin/tables/update-email-column.md +++ /dev/null @@ -1,19 +0,0 @@ -import io.appwrite.Client -import io.appwrite.coroutines.CoroutineCallback -import io.appwrite.services.Tables - -val client = Client() - .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint - .setProject("<YOUR_PROJECT_ID>") // Your project ID - .setKey("<YOUR_API_KEY>") // Your secret API key - -val tables = Tables(client) - -val response = tables.updateEmailColumn( - databaseId = "<DATABASE_ID>", - tableId = "<TABLE_ID>", - key = "", - required = false, - default = "email@example.com", - newKey = "" // optional -) diff --git a/docs/examples/kotlin/tables/update-enum-column.md b/docs/examples/kotlin/tables/update-enum-column.md deleted file mode 100644 index b672e3e..0000000 --- a/docs/examples/kotlin/tables/update-enum-column.md +++ /dev/null @@ -1,20 +0,0 @@ -import io.appwrite.Client -import io.appwrite.coroutines.CoroutineCallback -import io.appwrite.services.Tables - -val client = Client() - .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint - .setProject("<YOUR_PROJECT_ID>") // Your project ID - .setKey("<YOUR_API_KEY>") // Your secret API key - -val tables = Tables(client) - -val response = tables.updateEnumColumn( - databaseId = "<DATABASE_ID>", - tableId = "<TABLE_ID>", - key = "", - elements = listOf(), - required = false, - default = "<DEFAULT>", - newKey = "" // optional -) diff --git a/docs/examples/kotlin/tables/update-float-column.md b/docs/examples/kotlin/tables/update-float-column.md deleted file mode 100644 index 005c4e6..0000000 --- a/docs/examples/kotlin/tables/update-float-column.md +++ /dev/null @@ -1,21 +0,0 @@ -import io.appwrite.Client -import io.appwrite.coroutines.CoroutineCallback -import io.appwrite.services.Tables - -val client = Client() - .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint - .setProject("<YOUR_PROJECT_ID>") // Your project ID - .setKey("<YOUR_API_KEY>") // Your secret API key - -val tables = Tables(client) - -val response = tables.updateFloatColumn( - databaseId = "<DATABASE_ID>", - tableId = "<TABLE_ID>", - key = "", - required = false, - default = 0, - min = 0, // optional - max = 0, // optional - newKey = "" // optional -) diff --git a/docs/examples/kotlin/tables/update-integer-column.md b/docs/examples/kotlin/tables/update-integer-column.md deleted file mode 100644 index 39da19d..0000000 --- a/docs/examples/kotlin/tables/update-integer-column.md +++ /dev/null @@ -1,21 +0,0 @@ -import io.appwrite.Client -import io.appwrite.coroutines.CoroutineCallback -import io.appwrite.services.Tables - -val client = Client() - .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint - .setProject("<YOUR_PROJECT_ID>") // Your project ID - .setKey("<YOUR_API_KEY>") // Your secret API key - -val tables = Tables(client) - -val response = tables.updateIntegerColumn( - databaseId = "<DATABASE_ID>", - tableId = "<TABLE_ID>", - key = "", - required = false, - default = 0, - min = 0, // optional - max = 0, // optional - newKey = "" // optional -) diff --git a/docs/examples/kotlin/tables/update-ip-column.md b/docs/examples/kotlin/tables/update-ip-column.md deleted file mode 100644 index 40e54bc..0000000 --- a/docs/examples/kotlin/tables/update-ip-column.md +++ /dev/null @@ -1,19 +0,0 @@ -import io.appwrite.Client -import io.appwrite.coroutines.CoroutineCallback -import io.appwrite.services.Tables - -val client = Client() - .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint - .setProject("<YOUR_PROJECT_ID>") // Your project ID - .setKey("<YOUR_API_KEY>") // Your secret API key - -val tables = Tables(client) - -val response = tables.updateIpColumn( - databaseId = "<DATABASE_ID>", - tableId = "<TABLE_ID>", - key = "", - required = false, - default = "", - newKey = "" // optional -) diff --git a/docs/examples/kotlin/tables/update-relationship-column.md b/docs/examples/kotlin/tables/update-relationship-column.md deleted file mode 100644 index d4c36e8..0000000 --- a/docs/examples/kotlin/tables/update-relationship-column.md +++ /dev/null @@ -1,18 +0,0 @@ -import io.appwrite.Client -import io.appwrite.coroutines.CoroutineCallback -import io.appwrite.services.Tables - -val client = Client() - .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint - .setProject("<YOUR_PROJECT_ID>") // Your project ID - .setKey("<YOUR_API_KEY>") // Your secret API key - -val tables = Tables(client) - -val response = tables.updateRelationshipColumn( - databaseId = "<DATABASE_ID>", - tableId = "<TABLE_ID>", - key = "", - onDelete = "cascade", // optional - newKey = "" // optional -) diff --git a/docs/examples/kotlin/tables/update-row.md b/docs/examples/kotlin/tables/update-row.md deleted file mode 100644 index 6d3d9a4..0000000 --- a/docs/examples/kotlin/tables/update-row.md +++ /dev/null @@ -1,18 +0,0 @@ -import io.appwrite.Client -import io.appwrite.coroutines.CoroutineCallback -import io.appwrite.services.Tables - -val client = Client() - .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint - .setProject("<YOUR_PROJECT_ID>") // Your project ID - .setSession("") // The user session to authenticate with - -val tables = Tables(client) - -val response = tables.updateRow( - databaseId = "<DATABASE_ID>", - tableId = "<TABLE_ID>", - rowId = "<ROW_ID>", - data = mapOf( "a" to "b" ), // optional - permissions = listOf("read("any")") // optional -) diff --git a/docs/examples/kotlin/tables/update-rows.md b/docs/examples/kotlin/tables/update-rows.md deleted file mode 100644 index aac87c1..0000000 --- a/docs/examples/kotlin/tables/update-rows.md +++ /dev/null @@ -1,17 +0,0 @@ -import io.appwrite.Client -import io.appwrite.coroutines.CoroutineCallback -import io.appwrite.services.Tables - -val client = Client() - .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint - .setProject("<YOUR_PROJECT_ID>") // Your project ID - .setKey("<YOUR_API_KEY>") // Your secret API key - -val tables = Tables(client) - -val response = tables.updateRows( - databaseId = "<DATABASE_ID>", - tableId = "<TABLE_ID>", - data = mapOf( "a" to "b" ), // optional - queries = listOf() // optional -) diff --git a/docs/examples/kotlin/tables/update-string-column.md b/docs/examples/kotlin/tables/update-string-column.md deleted file mode 100644 index bb5b1f4..0000000 --- a/docs/examples/kotlin/tables/update-string-column.md +++ /dev/null @@ -1,20 +0,0 @@ -import io.appwrite.Client -import io.appwrite.coroutines.CoroutineCallback -import io.appwrite.services.Tables - -val client = Client() - .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint - .setProject("<YOUR_PROJECT_ID>") // Your project ID - .setKey("<YOUR_API_KEY>") // Your secret API key - -val tables = Tables(client) - -val response = tables.updateStringColumn( - databaseId = "<DATABASE_ID>", - tableId = "<TABLE_ID>", - key = "", - required = false, - default = "<DEFAULT>", - size = 1, // optional - newKey = "" // optional -) diff --git a/docs/examples/kotlin/tables/update-url-column.md b/docs/examples/kotlin/tables/update-url-column.md deleted file mode 100644 index 07f43e3..0000000 --- a/docs/examples/kotlin/tables/update-url-column.md +++ /dev/null @@ -1,19 +0,0 @@ -import io.appwrite.Client -import io.appwrite.coroutines.CoroutineCallback -import io.appwrite.services.Tables - -val client = Client() - .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint - .setProject("<YOUR_PROJECT_ID>") // Your project ID - .setKey("<YOUR_API_KEY>") // Your secret API key - -val tables = Tables(client) - -val response = tables.updateUrlColumn( - databaseId = "<DATABASE_ID>", - tableId = "<TABLE_ID>", - key = "", - required = false, - default = "https://example.com", - newKey = "" // optional -) diff --git a/docs/examples/kotlin/tables/update.md b/docs/examples/kotlin/tables/update.md deleted file mode 100644 index 3815323..0000000 --- a/docs/examples/kotlin/tables/update.md +++ /dev/null @@ -1,19 +0,0 @@ -import io.appwrite.Client -import io.appwrite.coroutines.CoroutineCallback -import io.appwrite.services.Tables - -val client = Client() - .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint - .setProject("<YOUR_PROJECT_ID>") // Your project ID - .setKey("<YOUR_API_KEY>") // Your secret API key - -val tables = Tables(client) - -val response = tables.update( - databaseId = "<DATABASE_ID>", - tableId = "<TABLE_ID>", - name = "<NAME>", - permissions = listOf("read("any")"), // optional - rowSecurity = false, // optional - enabled = false // optional -) diff --git a/docs/examples/kotlin/tables/upsert-row.md b/docs/examples/kotlin/tables/upsert-row.md deleted file mode 100644 index 6e02b3a..0000000 --- a/docs/examples/kotlin/tables/upsert-row.md +++ /dev/null @@ -1,17 +0,0 @@ -import io.appwrite.Client -import io.appwrite.coroutines.CoroutineCallback -import io.appwrite.services.Tables - -val client = Client() - .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint - .setSession("") // The user session to authenticate with - .setKey("<YOUR_API_KEY>") // Your secret API key - .setJWT("<YOUR_JWT>") // Your secret JSON Web Token - -val tables = Tables(client) - -val response = tables.upsertRow( - databaseId = "<DATABASE_ID>", - tableId = "<TABLE_ID>", - rowId = "<ROW_ID>" -) diff --git a/docs/examples/kotlin/tables/upsert-rows.md b/docs/examples/kotlin/tables/upsert-rows.md deleted file mode 100644 index d639e3d..0000000 --- a/docs/examples/kotlin/tables/upsert-rows.md +++ /dev/null @@ -1,15 +0,0 @@ -import io.appwrite.Client -import io.appwrite.coroutines.CoroutineCallback -import io.appwrite.services.Tables - -val client = Client() - .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint - .setAdmin("") // - .setKey("<YOUR_API_KEY>") // Your secret API key - -val tables = Tables(client) - -val response = tables.upsertRows( - databaseId = "<DATABASE_ID>", - tableId = "<TABLE_ID>" -) diff --git a/src/main/kotlin/io/appwrite/Client.kt b/src/main/kotlin/io/appwrite/Client.kt index 41a6878..c7824ef 100644 --- a/src/main/kotlin/io/appwrite/Client.kt +++ b/src/main/kotlin/io/appwrite/Client.kt @@ -58,12 +58,12 @@ class Client @JvmOverloads constructor( init { headers = mutableMapOf( "content-type" to "application/json", - "user-agent" to "AppwriteKotlinSDK/10.0.0 ${System.getProperty("http.agent")}", + "user-agent" to "AppwriteKotlinSDK/9.0.0 ${System.getProperty("http.agent")}", "x-sdk-name" to "Kotlin", "x-sdk-platform" to "server", "x-sdk-language" to "kotlin", - "x-sdk-version" to "10.0.0", - "x-appwrite-response-format" to "1.8.0", + "x-sdk-version" to "9.0.0", + "x-appwrite-response-format" to "1.7.0", ) config = mutableMapOf() diff --git a/src/main/kotlin/io/appwrite/models/BucketList.kt b/src/main/kotlin/io/appwrite/models/BucketList.kt index 58cce61..91e331f 100644 --- a/src/main/kotlin/io/appwrite/models/BucketList.kt +++ b/src/main/kotlin/io/appwrite/models/BucketList.kt @@ -8,7 +8,7 @@ import io.appwrite.extensions.jsonCast */ data class BucketList( /** - * Total number of buckets rows that matched your query. + * Total number of buckets documents that matched your query. */ @SerializedName("total") val total: Long, diff --git a/src/main/kotlin/io/appwrite/models/CollectionList.kt b/src/main/kotlin/io/appwrite/models/CollectionList.kt index 6cd040a..b171ae8 100644 --- a/src/main/kotlin/io/appwrite/models/CollectionList.kt +++ b/src/main/kotlin/io/appwrite/models/CollectionList.kt @@ -8,7 +8,7 @@ import io.appwrite.extensions.jsonCast */ data class CollectionList( /** - * Total number of collections rows that matched your query. + * Total number of collections documents that matched your query. */ @SerializedName("total") val total: Long, diff --git a/src/main/kotlin/io/appwrite/models/ColumnBoolean.kt b/src/main/kotlin/io/appwrite/models/ColumnBoolean.kt deleted file mode 100644 index fc5c45e..0000000 --- a/src/main/kotlin/io/appwrite/models/ColumnBoolean.kt +++ /dev/null @@ -1,94 +0,0 @@ -package io.appwrite.models - -import com.google.gson.annotations.SerializedName -import io.appwrite.extensions.jsonCast - -/** - * ColumnBoolean - */ -data class ColumnBoolean( - /** - * Column Key. - */ - @SerializedName("key") - val key: String, - - /** - * Column type. - */ - @SerializedName("type") - val type: String, - - /** - * Column status. Possible values: `available`, `processing`, `deleting`, `stuck`, or `failed` - */ - @SerializedName("status") - val status: String, - - /** - * Error message. Displays error generated on failure of creating or deleting an column. - */ - @SerializedName("error") - val error: String, - - /** - * Is column required? - */ - @SerializedName("required") - val required: Boolean, - - /** - * Is column an array? - */ - @SerializedName("array") - var array: Boolean?, - - /** - * Column creation date in ISO 8601 format. - */ - @SerializedName("\$createdAt") - val createdAt: String, - - /** - * Column update date in ISO 8601 format. - */ - @SerializedName("\$updatedAt") - val updatedAt: String, - - /** - * Default value for attribute when not provided. Cannot be set when attribute is required. - */ - @SerializedName("default") - var default: Boolean?, - -) { - fun toMap(): Map<String, Any> = mapOf( - "key" to key as Any, - "type" to type as Any, - "status" to status as Any, - "error" to error as Any, - "required" to required as Any, - "array" to array as Any, - "\$createdAt" to createdAt as Any, - "\$updatedAt" to updatedAt as Any, - "default" to default as Any, - ) - - companion object { - - @Suppress("UNCHECKED_CAST") - fun from( - map: Map<String, Any>, - ) = ColumnBoolean( - key = map["key"] as String, - type = map["type"] as String, - status = map["status"] as String, - error = map["error"] as String, - required = map["required"] as Boolean, - array = map["array"] as? Boolean?, - createdAt = map["\$createdAt"] as String, - updatedAt = map["\$updatedAt"] as String, - default = map["default"] as? Boolean?, - ) - } -} \ No newline at end of file diff --git a/src/main/kotlin/io/appwrite/models/ColumnDatetime.kt b/src/main/kotlin/io/appwrite/models/ColumnDatetime.kt deleted file mode 100644 index 3c5c446..0000000 --- a/src/main/kotlin/io/appwrite/models/ColumnDatetime.kt +++ /dev/null @@ -1,102 +0,0 @@ -package io.appwrite.models - -import com.google.gson.annotations.SerializedName -import io.appwrite.extensions.jsonCast - -/** - * ColumnDatetime - */ -data class ColumnDatetime( - /** - * Column Key. - */ - @SerializedName("key") - val key: String, - - /** - * Column type. - */ - @SerializedName("type") - val type: String, - - /** - * Column status. Possible values: `available`, `processing`, `deleting`, `stuck`, or `failed` - */ - @SerializedName("status") - val status: String, - - /** - * Error message. Displays error generated on failure of creating or deleting an column. - */ - @SerializedName("error") - val error: String, - - /** - * Is column required? - */ - @SerializedName("required") - val required: Boolean, - - /** - * Is column an array? - */ - @SerializedName("array") - var array: Boolean?, - - /** - * Column creation date in ISO 8601 format. - */ - @SerializedName("\$createdAt") - val createdAt: String, - - /** - * Column update date in ISO 8601 format. - */ - @SerializedName("\$updatedAt") - val updatedAt: String, - - /** - * ISO 8601 format. - */ - @SerializedName("format") - val format: String, - - /** - * Default value for attribute when not provided. Only null is optional - */ - @SerializedName("default") - var default: String?, - -) { - fun toMap(): Map<String, Any> = mapOf( - "key" to key as Any, - "type" to type as Any, - "status" to status as Any, - "error" to error as Any, - "required" to required as Any, - "array" to array as Any, - "\$createdAt" to createdAt as Any, - "\$updatedAt" to updatedAt as Any, - "format" to format as Any, - "default" to default as Any, - ) - - companion object { - - @Suppress("UNCHECKED_CAST") - fun from( - map: Map<String, Any>, - ) = ColumnDatetime( - key = map["key"] as String, - type = map["type"] as String, - status = map["status"] as String, - error = map["error"] as String, - required = map["required"] as Boolean, - array = map["array"] as? Boolean?, - createdAt = map["\$createdAt"] as String, - updatedAt = map["\$updatedAt"] as String, - format = map["format"] as String, - default = map["default"] as? String?, - ) - } -} \ No newline at end of file diff --git a/src/main/kotlin/io/appwrite/models/ColumnEmail.kt b/src/main/kotlin/io/appwrite/models/ColumnEmail.kt deleted file mode 100644 index 43c9cf2..0000000 --- a/src/main/kotlin/io/appwrite/models/ColumnEmail.kt +++ /dev/null @@ -1,102 +0,0 @@ -package io.appwrite.models - -import com.google.gson.annotations.SerializedName -import io.appwrite.extensions.jsonCast - -/** - * ColumnEmail - */ -data class ColumnEmail( - /** - * Column Key. - */ - @SerializedName("key") - val key: String, - - /** - * Column type. - */ - @SerializedName("type") - val type: String, - - /** - * Column status. Possible values: `available`, `processing`, `deleting`, `stuck`, or `failed` - */ - @SerializedName("status") - val status: String, - - /** - * Error message. Displays error generated on failure of creating or deleting an column. - */ - @SerializedName("error") - val error: String, - - /** - * Is column required? - */ - @SerializedName("required") - val required: Boolean, - - /** - * Is column an array? - */ - @SerializedName("array") - var array: Boolean?, - - /** - * Column creation date in ISO 8601 format. - */ - @SerializedName("\$createdAt") - val createdAt: String, - - /** - * Column update date in ISO 8601 format. - */ - @SerializedName("\$updatedAt") - val updatedAt: String, - - /** - * String format. - */ - @SerializedName("format") - val format: String, - - /** - * Default value for attribute when not provided. Cannot be set when attribute is required. - */ - @SerializedName("default") - var default: String?, - -) { - fun toMap(): Map<String, Any> = mapOf( - "key" to key as Any, - "type" to type as Any, - "status" to status as Any, - "error" to error as Any, - "required" to required as Any, - "array" to array as Any, - "\$createdAt" to createdAt as Any, - "\$updatedAt" to updatedAt as Any, - "format" to format as Any, - "default" to default as Any, - ) - - companion object { - - @Suppress("UNCHECKED_CAST") - fun from( - map: Map<String, Any>, - ) = ColumnEmail( - key = map["key"] as String, - type = map["type"] as String, - status = map["status"] as String, - error = map["error"] as String, - required = map["required"] as Boolean, - array = map["array"] as? Boolean?, - createdAt = map["\$createdAt"] as String, - updatedAt = map["\$updatedAt"] as String, - format = map["format"] as String, - default = map["default"] as? String?, - ) - } -} \ No newline at end of file diff --git a/src/main/kotlin/io/appwrite/models/ColumnEnum.kt b/src/main/kotlin/io/appwrite/models/ColumnEnum.kt deleted file mode 100644 index 717316b..0000000 --- a/src/main/kotlin/io/appwrite/models/ColumnEnum.kt +++ /dev/null @@ -1,110 +0,0 @@ -package io.appwrite.models - -import com.google.gson.annotations.SerializedName -import io.appwrite.extensions.jsonCast - -/** - * ColumnEnum - */ -data class ColumnEnum( - /** - * Column Key. - */ - @SerializedName("key") - val key: String, - - /** - * Column type. - */ - @SerializedName("type") - val type: String, - - /** - * Column status. Possible values: `available`, `processing`, `deleting`, `stuck`, or `failed` - */ - @SerializedName("status") - val status: String, - - /** - * Error message. Displays error generated on failure of creating or deleting an column. - */ - @SerializedName("error") - val error: String, - - /** - * Is column required? - */ - @SerializedName("required") - val required: Boolean, - - /** - * Is column an array? - */ - @SerializedName("array") - var array: Boolean?, - - /** - * Column creation date in ISO 8601 format. - */ - @SerializedName("\$createdAt") - val createdAt: String, - - /** - * Column update date in ISO 8601 format. - */ - @SerializedName("\$updatedAt") - val updatedAt: String, - - /** - * Array of elements in enumerated type. - */ - @SerializedName("elements") - val elements: List<String>, - - /** - * String format. - */ - @SerializedName("format") - val format: String, - - /** - * Default value for attribute when not provided. Cannot be set when attribute is required. - */ - @SerializedName("default") - var default: String?, - -) { - fun toMap(): Map<String, Any> = mapOf( - "key" to key as Any, - "type" to type as Any, - "status" to status as Any, - "error" to error as Any, - "required" to required as Any, - "array" to array as Any, - "\$createdAt" to createdAt as Any, - "\$updatedAt" to updatedAt as Any, - "elements" to elements as Any, - "format" to format as Any, - "default" to default as Any, - ) - - companion object { - - @Suppress("UNCHECKED_CAST") - fun from( - map: Map<String, Any>, - ) = ColumnEnum( - key = map["key"] as String, - type = map["type"] as String, - status = map["status"] as String, - error = map["error"] as String, - required = map["required"] as Boolean, - array = map["array"] as? Boolean?, - createdAt = map["\$createdAt"] as String, - updatedAt = map["\$updatedAt"] as String, - elements = map["elements"] as List<String>, - format = map["format"] as String, - default = map["default"] as? String?, - ) - } -} \ No newline at end of file diff --git a/src/main/kotlin/io/appwrite/models/ColumnFloat.kt b/src/main/kotlin/io/appwrite/models/ColumnFloat.kt deleted file mode 100644 index 92b7a2f..0000000 --- a/src/main/kotlin/io/appwrite/models/ColumnFloat.kt +++ /dev/null @@ -1,110 +0,0 @@ -package io.appwrite.models - -import com.google.gson.annotations.SerializedName -import io.appwrite.extensions.jsonCast - -/** - * ColumnFloat - */ -data class ColumnFloat( - /** - * Column Key. - */ - @SerializedName("key") - val key: String, - - /** - * Column type. - */ - @SerializedName("type") - val type: String, - - /** - * Column status. Possible values: `available`, `processing`, `deleting`, `stuck`, or `failed` - */ - @SerializedName("status") - val status: String, - - /** - * Error message. Displays error generated on failure of creating or deleting an column. - */ - @SerializedName("error") - val error: String, - - /** - * Is column required? - */ - @SerializedName("required") - val required: Boolean, - - /** - * Is column an array? - */ - @SerializedName("array") - var array: Boolean?, - - /** - * Column creation date in ISO 8601 format. - */ - @SerializedName("\$createdAt") - val createdAt: String, - - /** - * Column update date in ISO 8601 format. - */ - @SerializedName("\$updatedAt") - val updatedAt: String, - - /** - * Minimum value to enforce for new documents. - */ - @SerializedName("min") - var min: Double?, - - /** - * Maximum value to enforce for new documents. - */ - @SerializedName("max") - var max: Double?, - - /** - * Default value for attribute when not provided. Cannot be set when attribute is required. - */ - @SerializedName("default") - var default: Double?, - -) { - fun toMap(): Map<String, Any> = mapOf( - "key" to key as Any, - "type" to type as Any, - "status" to status as Any, - "error" to error as Any, - "required" to required as Any, - "array" to array as Any, - "\$createdAt" to createdAt as Any, - "\$updatedAt" to updatedAt as Any, - "min" to min as Any, - "max" to max as Any, - "default" to default as Any, - ) - - companion object { - - @Suppress("UNCHECKED_CAST") - fun from( - map: Map<String, Any>, - ) = ColumnFloat( - key = map["key"] as String, - type = map["type"] as String, - status = map["status"] as String, - error = map["error"] as String, - required = map["required"] as Boolean, - array = map["array"] as? Boolean?, - createdAt = map["\$createdAt"] as String, - updatedAt = map["\$updatedAt"] as String, - min = (map["min"] as? Number)?.toDouble(), - max = (map["max"] as? Number)?.toDouble(), - default = (map["default"] as? Number)?.toDouble(), - ) - } -} \ No newline at end of file diff --git a/src/main/kotlin/io/appwrite/models/ColumnIndex.kt b/src/main/kotlin/io/appwrite/models/ColumnIndex.kt deleted file mode 100644 index 4912fe9..0000000 --- a/src/main/kotlin/io/appwrite/models/ColumnIndex.kt +++ /dev/null @@ -1,94 +0,0 @@ -package io.appwrite.models - -import com.google.gson.annotations.SerializedName -import io.appwrite.extensions.jsonCast - -/** - * Index - */ -data class ColumnIndex( - /** - * Index Key. - */ - @SerializedName("key") - val key: String, - - /** - * Index type. - */ - @SerializedName("type") - val type: String, - - /** - * Index status. Possible values: `available`, `processing`, `deleting`, `stuck`, or `failed` - */ - @SerializedName("status") - val status: String, - - /** - * Error message. Displays error generated on failure of creating or deleting an index. - */ - @SerializedName("error") - val error: String, - - /** - * Index columns. - */ - @SerializedName("columns") - val columns: List<String>, - - /** - * Index columns length. - */ - @SerializedName("lengths") - val lengths: List<Long>, - - /** - * Index orders. - */ - @SerializedName("orders") - var orders: List<String>?, - - /** - * Index creation date in ISO 8601 format. - */ - @SerializedName("\$createdAt") - val createdAt: String, - - /** - * Index update date in ISO 8601 format. - */ - @SerializedName("\$updatedAt") - val updatedAt: String, - -) { - fun toMap(): Map<String, Any> = mapOf( - "key" to key as Any, - "type" to type as Any, - "status" to status as Any, - "error" to error as Any, - "columns" to columns as Any, - "lengths" to lengths as Any, - "orders" to orders as Any, - "\$createdAt" to createdAt as Any, - "\$updatedAt" to updatedAt as Any, - ) - - companion object { - - @Suppress("UNCHECKED_CAST") - fun from( - map: Map<String, Any>, - ) = ColumnIndex( - key = map["key"] as String, - type = map["type"] as String, - status = map["status"] as String, - error = map["error"] as String, - columns = map["columns"] as List<String>, - lengths = map["lengths"] as List<Long>, - orders = map["orders"] as? List<String>?, - createdAt = map["\$createdAt"] as String, - updatedAt = map["\$updatedAt"] as String, - ) - } -} \ No newline at end of file diff --git a/src/main/kotlin/io/appwrite/models/ColumnIndexList.kt b/src/main/kotlin/io/appwrite/models/ColumnIndexList.kt deleted file mode 100644 index fc877a9..0000000 --- a/src/main/kotlin/io/appwrite/models/ColumnIndexList.kt +++ /dev/null @@ -1,38 +0,0 @@ -package io.appwrite.models - -import com.google.gson.annotations.SerializedName -import io.appwrite.extensions.jsonCast - -/** - * Column Indexes List - */ -data class ColumnIndexList( - /** - * Total number of indexes rows that matched your query. - */ - @SerializedName("total") - val total: Long, - - /** - * List of indexes. - */ - @SerializedName("indexes") - val indexes: List<ColumnIndex>, - -) { - fun toMap(): Map<String, Any> = mapOf( - "total" to total as Any, - "indexes" to indexes.map { it.toMap() } as Any, - ) - - companion object { - - @Suppress("UNCHECKED_CAST") - fun from( - map: Map<String, Any>, - ) = ColumnIndexList( - total = (map["total"] as Number).toLong(), - indexes = (map["indexes"] as List<Map<String, Any>>).map { ColumnIndex.from(map = it) }, - ) - } -} \ No newline at end of file diff --git a/src/main/kotlin/io/appwrite/models/ColumnInteger.kt b/src/main/kotlin/io/appwrite/models/ColumnInteger.kt deleted file mode 100644 index 0545ec5..0000000 --- a/src/main/kotlin/io/appwrite/models/ColumnInteger.kt +++ /dev/null @@ -1,110 +0,0 @@ -package io.appwrite.models - -import com.google.gson.annotations.SerializedName -import io.appwrite.extensions.jsonCast - -/** - * ColumnInteger - */ -data class ColumnInteger( - /** - * Column Key. - */ - @SerializedName("key") - val key: String, - - /** - * Column type. - */ - @SerializedName("type") - val type: String, - - /** - * Column status. Possible values: `available`, `processing`, `deleting`, `stuck`, or `failed` - */ - @SerializedName("status") - val status: String, - - /** - * Error message. Displays error generated on failure of creating or deleting an column. - */ - @SerializedName("error") - val error: String, - - /** - * Is column required? - */ - @SerializedName("required") - val required: Boolean, - - /** - * Is column an array? - */ - @SerializedName("array") - var array: Boolean?, - - /** - * Column creation date in ISO 8601 format. - */ - @SerializedName("\$createdAt") - val createdAt: String, - - /** - * Column update date in ISO 8601 format. - */ - @SerializedName("\$updatedAt") - val updatedAt: String, - - /** - * Minimum value to enforce for new documents. - */ - @SerializedName("min") - var min: Long?, - - /** - * Maximum value to enforce for new documents. - */ - @SerializedName("max") - var max: Long?, - - /** - * Default value for attribute when not provided. Cannot be set when attribute is required. - */ - @SerializedName("default") - var default: Long?, - -) { - fun toMap(): Map<String, Any> = mapOf( - "key" to key as Any, - "type" to type as Any, - "status" to status as Any, - "error" to error as Any, - "required" to required as Any, - "array" to array as Any, - "\$createdAt" to createdAt as Any, - "\$updatedAt" to updatedAt as Any, - "min" to min as Any, - "max" to max as Any, - "default" to default as Any, - ) - - companion object { - - @Suppress("UNCHECKED_CAST") - fun from( - map: Map<String, Any>, - ) = ColumnInteger( - key = map["key"] as String, - type = map["type"] as String, - status = map["status"] as String, - error = map["error"] as String, - required = map["required"] as Boolean, - array = map["array"] as? Boolean?, - createdAt = map["\$createdAt"] as String, - updatedAt = map["\$updatedAt"] as String, - min = (map["min"] as? Number)?.toLong(), - max = (map["max"] as? Number)?.toLong(), - default = (map["default"] as? Number)?.toLong(), - ) - } -} \ No newline at end of file diff --git a/src/main/kotlin/io/appwrite/models/ColumnIp.kt b/src/main/kotlin/io/appwrite/models/ColumnIp.kt deleted file mode 100644 index dad7442..0000000 --- a/src/main/kotlin/io/appwrite/models/ColumnIp.kt +++ /dev/null @@ -1,102 +0,0 @@ -package io.appwrite.models - -import com.google.gson.annotations.SerializedName -import io.appwrite.extensions.jsonCast - -/** - * ColumnIP - */ -data class ColumnIp( - /** - * Column Key. - */ - @SerializedName("key") - val key: String, - - /** - * Column type. - */ - @SerializedName("type") - val type: String, - - /** - * Column status. Possible values: `available`, `processing`, `deleting`, `stuck`, or `failed` - */ - @SerializedName("status") - val status: String, - - /** - * Error message. Displays error generated on failure of creating or deleting an column. - */ - @SerializedName("error") - val error: String, - - /** - * Is column required? - */ - @SerializedName("required") - val required: Boolean, - - /** - * Is column an array? - */ - @SerializedName("array") - var array: Boolean?, - - /** - * Column creation date in ISO 8601 format. - */ - @SerializedName("\$createdAt") - val createdAt: String, - - /** - * Column update date in ISO 8601 format. - */ - @SerializedName("\$updatedAt") - val updatedAt: String, - - /** - * String format. - */ - @SerializedName("format") - val format: String, - - /** - * Default value for attribute when not provided. Cannot be set when attribute is required. - */ - @SerializedName("default") - var default: String?, - -) { - fun toMap(): Map<String, Any> = mapOf( - "key" to key as Any, - "type" to type as Any, - "status" to status as Any, - "error" to error as Any, - "required" to required as Any, - "array" to array as Any, - "\$createdAt" to createdAt as Any, - "\$updatedAt" to updatedAt as Any, - "format" to format as Any, - "default" to default as Any, - ) - - companion object { - - @Suppress("UNCHECKED_CAST") - fun from( - map: Map<String, Any>, - ) = ColumnIp( - key = map["key"] as String, - type = map["type"] as String, - status = map["status"] as String, - error = map["error"] as String, - required = map["required"] as Boolean, - array = map["array"] as? Boolean?, - createdAt = map["\$createdAt"] as String, - updatedAt = map["\$updatedAt"] as String, - format = map["format"] as String, - default = map["default"] as? String?, - ) - } -} \ No newline at end of file diff --git a/src/main/kotlin/io/appwrite/models/ColumnList.kt b/src/main/kotlin/io/appwrite/models/ColumnList.kt deleted file mode 100644 index 06e8bd4..0000000 --- a/src/main/kotlin/io/appwrite/models/ColumnList.kt +++ /dev/null @@ -1,38 +0,0 @@ -package io.appwrite.models - -import com.google.gson.annotations.SerializedName -import io.appwrite.extensions.jsonCast - -/** - * Columns List - */ -data class ColumnList( - /** - * Total number of columns in the given table. - */ - @SerializedName("total") - val total: Long, - - /** - * List of columns. - */ - @SerializedName("columns") - val columns: List<Any>, - -) { - fun toMap(): Map<String, Any> = mapOf( - "total" to total as Any, - "columns" to columns as Any, - ) - - companion object { - - @Suppress("UNCHECKED_CAST") - fun from( - map: Map<String, Any>, - ) = ColumnList( - total = (map["total"] as Number).toLong(), - columns = map["columns"] as List<Any>, - ) - } -} \ No newline at end of file diff --git a/src/main/kotlin/io/appwrite/models/ColumnRelationship.kt b/src/main/kotlin/io/appwrite/models/ColumnRelationship.kt deleted file mode 100644 index 5524b42..0000000 --- a/src/main/kotlin/io/appwrite/models/ColumnRelationship.kt +++ /dev/null @@ -1,134 +0,0 @@ -package io.appwrite.models - -import com.google.gson.annotations.SerializedName -import io.appwrite.extensions.jsonCast - -/** - * ColumnRelationship - */ -data class ColumnRelationship( - /** - * Column Key. - */ - @SerializedName("key") - val key: String, - - /** - * Column type. - */ - @SerializedName("type") - val type: String, - - /** - * Column status. Possible values: `available`, `processing`, `deleting`, `stuck`, or `failed` - */ - @SerializedName("status") - val status: String, - - /** - * Error message. Displays error generated on failure of creating or deleting an column. - */ - @SerializedName("error") - val error: String, - - /** - * Is column required? - */ - @SerializedName("required") - val required: Boolean, - - /** - * Is column an array? - */ - @SerializedName("array") - var array: Boolean?, - - /** - * Column creation date in ISO 8601 format. - */ - @SerializedName("\$createdAt") - val createdAt: String, - - /** - * Column update date in ISO 8601 format. - */ - @SerializedName("\$updatedAt") - val updatedAt: String, - - /** - * The ID of the related table. - */ - @SerializedName("relatedTable") - val relatedTable: String, - - /** - * The type of the relationship. - */ - @SerializedName("relationType") - val relationType: String, - - /** - * Is the relationship two-way? - */ - @SerializedName("twoWay") - val twoWay: Boolean, - - /** - * The key of the two-way relationship. - */ - @SerializedName("twoWayKey") - val twoWayKey: String, - - /** - * How deleting the parent document will propagate to child documents. - */ - @SerializedName("onDelete") - val onDelete: String, - - /** - * Whether this is the parent or child side of the relationship - */ - @SerializedName("side") - val side: String, - -) { - fun toMap(): Map<String, Any> = mapOf( - "key" to key as Any, - "type" to type as Any, - "status" to status as Any, - "error" to error as Any, - "required" to required as Any, - "array" to array as Any, - "\$createdAt" to createdAt as Any, - "\$updatedAt" to updatedAt as Any, - "relatedTable" to relatedTable as Any, - "relationType" to relationType as Any, - "twoWay" to twoWay as Any, - "twoWayKey" to twoWayKey as Any, - "onDelete" to onDelete as Any, - "side" to side as Any, - ) - - companion object { - - @Suppress("UNCHECKED_CAST") - fun from( - map: Map<String, Any>, - ) = ColumnRelationship( - key = map["key"] as String, - type = map["type"] as String, - status = map["status"] as String, - error = map["error"] as String, - required = map["required"] as Boolean, - array = map["array"] as? Boolean?, - createdAt = map["\$createdAt"] as String, - updatedAt = map["\$updatedAt"] as String, - relatedTable = map["relatedTable"] as String, - relationType = map["relationType"] as String, - twoWay = map["twoWay"] as Boolean, - twoWayKey = map["twoWayKey"] as String, - onDelete = map["onDelete"] as String, - side = map["side"] as String, - ) - } -} \ No newline at end of file diff --git a/src/main/kotlin/io/appwrite/models/ColumnString.kt b/src/main/kotlin/io/appwrite/models/ColumnString.kt deleted file mode 100644 index 773a8ce..0000000 --- a/src/main/kotlin/io/appwrite/models/ColumnString.kt +++ /dev/null @@ -1,110 +0,0 @@ -package io.appwrite.models - -import com.google.gson.annotations.SerializedName -import io.appwrite.extensions.jsonCast - -/** - * ColumnString - */ -data class ColumnString( - /** - * Column Key. - */ - @SerializedName("key") - val key: String, - - /** - * Column type. - */ - @SerializedName("type") - val type: String, - - /** - * Column status. Possible values: `available`, `processing`, `deleting`, `stuck`, or `failed` - */ - @SerializedName("status") - val status: String, - - /** - * Error message. Displays error generated on failure of creating or deleting an column. - */ - @SerializedName("error") - val error: String, - - /** - * Is column required? - */ - @SerializedName("required") - val required: Boolean, - - /** - * Is column an array? - */ - @SerializedName("array") - var array: Boolean?, - - /** - * Column creation date in ISO 8601 format. - */ - @SerializedName("\$createdAt") - val createdAt: String, - - /** - * Column update date in ISO 8601 format. - */ - @SerializedName("\$updatedAt") - val updatedAt: String, - - /** - * Column size. - */ - @SerializedName("size") - val size: Long, - - /** - * Default value for column when not provided. Cannot be set when column is required. - */ - @SerializedName("default") - var default: String?, - - /** - * Defines whether this column is encrypted or not. - */ - @SerializedName("encrypt") - var encrypt: Boolean?, - -) { - fun toMap(): Map<String, Any> = mapOf( - "key" to key as Any, - "type" to type as Any, - "status" to status as Any, - "error" to error as Any, - "required" to required as Any, - "array" to array as Any, - "\$createdAt" to createdAt as Any, - "\$updatedAt" to updatedAt as Any, - "size" to size as Any, - "default" to default as Any, - "encrypt" to encrypt as Any, - ) - - companion object { - - @Suppress("UNCHECKED_CAST") - fun from( - map: Map<String, Any>, - ) = ColumnString( - key = map["key"] as String, - type = map["type"] as String, - status = map["status"] as String, - error = map["error"] as String, - required = map["required"] as Boolean, - array = map["array"] as? Boolean?, - createdAt = map["\$createdAt"] as String, - updatedAt = map["\$updatedAt"] as String, - size = (map["size"] as Number).toLong(), - default = map["default"] as? String?, - encrypt = map["encrypt"] as? Boolean?, - ) - } -} \ No newline at end of file diff --git a/src/main/kotlin/io/appwrite/models/ColumnUrl.kt b/src/main/kotlin/io/appwrite/models/ColumnUrl.kt deleted file mode 100644 index 10cd5d9..0000000 --- a/src/main/kotlin/io/appwrite/models/ColumnUrl.kt +++ /dev/null @@ -1,102 +0,0 @@ -package io.appwrite.models - -import com.google.gson.annotations.SerializedName -import io.appwrite.extensions.jsonCast - -/** - * ColumnURL - */ -data class ColumnUrl( - /** - * Column Key. - */ - @SerializedName("key") - val key: String, - - /** - * Column type. - */ - @SerializedName("type") - val type: String, - - /** - * Column status. Possible values: `available`, `processing`, `deleting`, `stuck`, or `failed` - */ - @SerializedName("status") - val status: String, - - /** - * Error message. Displays error generated on failure of creating or deleting an column. - */ - @SerializedName("error") - val error: String, - - /** - * Is column required? - */ - @SerializedName("required") - val required: Boolean, - - /** - * Is column an array? - */ - @SerializedName("array") - var array: Boolean?, - - /** - * Column creation date in ISO 8601 format. - */ - @SerializedName("\$createdAt") - val createdAt: String, - - /** - * Column update date in ISO 8601 format. - */ - @SerializedName("\$updatedAt") - val updatedAt: String, - - /** - * String format. - */ - @SerializedName("format") - val format: String, - - /** - * Default value for column when not provided. Cannot be set when column is required. - */ - @SerializedName("default") - var default: String?, - -) { - fun toMap(): Map<String, Any> = mapOf( - "key" to key as Any, - "type" to type as Any, - "status" to status as Any, - "error" to error as Any, - "required" to required as Any, - "array" to array as Any, - "\$createdAt" to createdAt as Any, - "\$updatedAt" to updatedAt as Any, - "format" to format as Any, - "default" to default as Any, - ) - - companion object { - - @Suppress("UNCHECKED_CAST") - fun from( - map: Map<String, Any>, - ) = ColumnUrl( - key = map["key"] as String, - type = map["type"] as String, - status = map["status"] as String, - error = map["error"] as String, - required = map["required"] as Boolean, - array = map["array"] as? Boolean?, - createdAt = map["\$createdAt"] as String, - updatedAt = map["\$updatedAt"] as String, - format = map["format"] as String, - default = map["default"] as? String?, - ) - } -} \ No newline at end of file diff --git a/src/main/kotlin/io/appwrite/models/ContinentList.kt b/src/main/kotlin/io/appwrite/models/ContinentList.kt index a6ec310..fdd490a 100644 --- a/src/main/kotlin/io/appwrite/models/ContinentList.kt +++ b/src/main/kotlin/io/appwrite/models/ContinentList.kt @@ -8,7 +8,7 @@ import io.appwrite.extensions.jsonCast */ data class ContinentList( /** - * Total number of continents rows that matched your query. + * Total number of continents documents that matched your query. */ @SerializedName("total") val total: Long, diff --git a/src/main/kotlin/io/appwrite/models/CountryList.kt b/src/main/kotlin/io/appwrite/models/CountryList.kt index 546cf73..350a894 100644 --- a/src/main/kotlin/io/appwrite/models/CountryList.kt +++ b/src/main/kotlin/io/appwrite/models/CountryList.kt @@ -8,7 +8,7 @@ import io.appwrite.extensions.jsonCast */ data class CountryList( /** - * Total number of countries rows that matched your query. + * Total number of countries documents that matched your query. */ @SerializedName("total") val total: Long, diff --git a/src/main/kotlin/io/appwrite/models/CurrencyList.kt b/src/main/kotlin/io/appwrite/models/CurrencyList.kt index 95dec92..fe1e001 100644 --- a/src/main/kotlin/io/appwrite/models/CurrencyList.kt +++ b/src/main/kotlin/io/appwrite/models/CurrencyList.kt @@ -8,7 +8,7 @@ import io.appwrite.extensions.jsonCast */ data class CurrencyList( /** - * Total number of currencies rows that matched your query. + * Total number of currencies documents that matched your query. */ @SerializedName("total") val total: Long, diff --git a/src/main/kotlin/io/appwrite/models/DatabaseList.kt b/src/main/kotlin/io/appwrite/models/DatabaseList.kt index 3b98e29..81c91aa 100644 --- a/src/main/kotlin/io/appwrite/models/DatabaseList.kt +++ b/src/main/kotlin/io/appwrite/models/DatabaseList.kt @@ -8,7 +8,7 @@ import io.appwrite.extensions.jsonCast */ data class DatabaseList( /** - * Total number of databases rows that matched your query. + * Total number of databases documents that matched your query. */ @SerializedName("total") val total: Long, diff --git a/src/main/kotlin/io/appwrite/models/DeploymentList.kt b/src/main/kotlin/io/appwrite/models/DeploymentList.kt index 3bc6f49..2b7cf64 100644 --- a/src/main/kotlin/io/appwrite/models/DeploymentList.kt +++ b/src/main/kotlin/io/appwrite/models/DeploymentList.kt @@ -8,7 +8,7 @@ import io.appwrite.extensions.jsonCast */ data class DeploymentList( /** - * Total number of deployments rows that matched your query. + * Total number of deployments documents that matched your query. */ @SerializedName("total") val total: Long, diff --git a/src/main/kotlin/io/appwrite/models/DocumentList.kt b/src/main/kotlin/io/appwrite/models/DocumentList.kt index 6f40579..fa3dd20 100644 --- a/src/main/kotlin/io/appwrite/models/DocumentList.kt +++ b/src/main/kotlin/io/appwrite/models/DocumentList.kt @@ -8,7 +8,7 @@ import io.appwrite.extensions.jsonCast */ data class DocumentList<T>( /** - * Total number of documents rows that matched your query. + * Total number of documents documents that matched your query. */ @SerializedName("total") val total: Long, diff --git a/src/main/kotlin/io/appwrite/models/ExecutionList.kt b/src/main/kotlin/io/appwrite/models/ExecutionList.kt index ac11e4f..322aeee 100644 --- a/src/main/kotlin/io/appwrite/models/ExecutionList.kt +++ b/src/main/kotlin/io/appwrite/models/ExecutionList.kt @@ -8,7 +8,7 @@ import io.appwrite.extensions.jsonCast */ data class ExecutionList( /** - * Total number of executions rows that matched your query. + * Total number of executions documents that matched your query. */ @SerializedName("total") val total: Long, diff --git a/src/main/kotlin/io/appwrite/models/FileList.kt b/src/main/kotlin/io/appwrite/models/FileList.kt index ba69ea8..5af18f1 100644 --- a/src/main/kotlin/io/appwrite/models/FileList.kt +++ b/src/main/kotlin/io/appwrite/models/FileList.kt @@ -8,7 +8,7 @@ import io.appwrite.extensions.jsonCast */ data class FileList( /** - * Total number of files rows that matched your query. + * Total number of files documents that matched your query. */ @SerializedName("total") val total: Long, diff --git a/src/main/kotlin/io/appwrite/models/FrameworkList.kt b/src/main/kotlin/io/appwrite/models/FrameworkList.kt index 243bc0f..41532c8 100644 --- a/src/main/kotlin/io/appwrite/models/FrameworkList.kt +++ b/src/main/kotlin/io/appwrite/models/FrameworkList.kt @@ -8,7 +8,7 @@ import io.appwrite.extensions.jsonCast */ data class FrameworkList( /** - * Total number of frameworks rows that matched your query. + * Total number of frameworks documents that matched your query. */ @SerializedName("total") val total: Long, diff --git a/src/main/kotlin/io/appwrite/models/FunctionList.kt b/src/main/kotlin/io/appwrite/models/FunctionList.kt index 7ffe820..6aaa86a 100644 --- a/src/main/kotlin/io/appwrite/models/FunctionList.kt +++ b/src/main/kotlin/io/appwrite/models/FunctionList.kt @@ -8,7 +8,7 @@ import io.appwrite.extensions.jsonCast */ data class FunctionList( /** - * Total number of functions rows that matched your query. + * Total number of functions documents that matched your query. */ @SerializedName("total") val total: Long, diff --git a/src/main/kotlin/io/appwrite/models/IdentityList.kt b/src/main/kotlin/io/appwrite/models/IdentityList.kt index 2e1a33a..1cbb07d 100644 --- a/src/main/kotlin/io/appwrite/models/IdentityList.kt +++ b/src/main/kotlin/io/appwrite/models/IdentityList.kt @@ -8,7 +8,7 @@ import io.appwrite.extensions.jsonCast */ data class IdentityList( /** - * Total number of identities rows that matched your query. + * Total number of identities documents that matched your query. */ @SerializedName("total") val total: Long, diff --git a/src/main/kotlin/io/appwrite/models/IndexList.kt b/src/main/kotlin/io/appwrite/models/IndexList.kt index 1c2120a..a14167d 100644 --- a/src/main/kotlin/io/appwrite/models/IndexList.kt +++ b/src/main/kotlin/io/appwrite/models/IndexList.kt @@ -8,7 +8,7 @@ import io.appwrite.extensions.jsonCast */ data class IndexList( /** - * Total number of indexes rows that matched your query. + * Total number of indexes documents that matched your query. */ @SerializedName("total") val total: Long, diff --git a/src/main/kotlin/io/appwrite/models/LanguageList.kt b/src/main/kotlin/io/appwrite/models/LanguageList.kt index ab78452..07559b9 100644 --- a/src/main/kotlin/io/appwrite/models/LanguageList.kt +++ b/src/main/kotlin/io/appwrite/models/LanguageList.kt @@ -8,7 +8,7 @@ import io.appwrite.extensions.jsonCast */ data class LanguageList( /** - * Total number of languages rows that matched your query. + * Total number of languages documents that matched your query. */ @SerializedName("total") val total: Long, diff --git a/src/main/kotlin/io/appwrite/models/LocaleCodeList.kt b/src/main/kotlin/io/appwrite/models/LocaleCodeList.kt index 6f47333..3973a03 100644 --- a/src/main/kotlin/io/appwrite/models/LocaleCodeList.kt +++ b/src/main/kotlin/io/appwrite/models/LocaleCodeList.kt @@ -8,7 +8,7 @@ import io.appwrite.extensions.jsonCast */ data class LocaleCodeList( /** - * Total number of localeCodes rows that matched your query. + * Total number of localeCodes documents that matched your query. */ @SerializedName("total") val total: Long, diff --git a/src/main/kotlin/io/appwrite/models/LogList.kt b/src/main/kotlin/io/appwrite/models/LogList.kt index d2e0b00..b9f381c 100644 --- a/src/main/kotlin/io/appwrite/models/LogList.kt +++ b/src/main/kotlin/io/appwrite/models/LogList.kt @@ -8,7 +8,7 @@ import io.appwrite.extensions.jsonCast */ data class LogList( /** - * Total number of logs rows that matched your query. + * Total number of logs documents that matched your query. */ @SerializedName("total") val total: Long, diff --git a/src/main/kotlin/io/appwrite/models/MembershipList.kt b/src/main/kotlin/io/appwrite/models/MembershipList.kt index efcffc4..7feaaaa 100644 --- a/src/main/kotlin/io/appwrite/models/MembershipList.kt +++ b/src/main/kotlin/io/appwrite/models/MembershipList.kt @@ -8,7 +8,7 @@ import io.appwrite.extensions.jsonCast */ data class MembershipList( /** - * Total number of memberships rows that matched your query. + * Total number of memberships documents that matched your query. */ @SerializedName("total") val total: Long, diff --git a/src/main/kotlin/io/appwrite/models/MessageList.kt b/src/main/kotlin/io/appwrite/models/MessageList.kt index 1926541..85e4a1b 100644 --- a/src/main/kotlin/io/appwrite/models/MessageList.kt +++ b/src/main/kotlin/io/appwrite/models/MessageList.kt @@ -8,7 +8,7 @@ import io.appwrite.extensions.jsonCast */ data class MessageList( /** - * Total number of messages rows that matched your query. + * Total number of messages documents that matched your query. */ @SerializedName("total") val total: Long, diff --git a/src/main/kotlin/io/appwrite/models/PhoneList.kt b/src/main/kotlin/io/appwrite/models/PhoneList.kt index 675295f..b17de4f 100644 --- a/src/main/kotlin/io/appwrite/models/PhoneList.kt +++ b/src/main/kotlin/io/appwrite/models/PhoneList.kt @@ -8,7 +8,7 @@ import io.appwrite.extensions.jsonCast */ data class PhoneList( /** - * Total number of phones rows that matched your query. + * Total number of phones documents that matched your query. */ @SerializedName("total") val total: Long, diff --git a/src/main/kotlin/io/appwrite/models/ProviderList.kt b/src/main/kotlin/io/appwrite/models/ProviderList.kt index 4223124..113ba67 100644 --- a/src/main/kotlin/io/appwrite/models/ProviderList.kt +++ b/src/main/kotlin/io/appwrite/models/ProviderList.kt @@ -8,7 +8,7 @@ import io.appwrite.extensions.jsonCast */ data class ProviderList( /** - * Total number of providers rows that matched your query. + * Total number of providers documents that matched your query. */ @SerializedName("total") val total: Long, diff --git a/src/main/kotlin/io/appwrite/models/ResourceTokenList.kt b/src/main/kotlin/io/appwrite/models/ResourceTokenList.kt index aaf22f8..bb9e6d7 100644 --- a/src/main/kotlin/io/appwrite/models/ResourceTokenList.kt +++ b/src/main/kotlin/io/appwrite/models/ResourceTokenList.kt @@ -8,7 +8,7 @@ import io.appwrite.extensions.jsonCast */ data class ResourceTokenList( /** - * Total number of tokens rows that matched your query. + * Total number of tokens documents that matched your query. */ @SerializedName("total") val total: Long, diff --git a/src/main/kotlin/io/appwrite/models/Row.kt b/src/main/kotlin/io/appwrite/models/Row.kt deleted file mode 100644 index bb5c14f..0000000 --- a/src/main/kotlin/io/appwrite/models/Row.kt +++ /dev/null @@ -1,105 +0,0 @@ -package io.appwrite.models - -import com.google.gson.annotations.SerializedName -import io.appwrite.extensions.jsonCast - -/** - * Row - */ -data class Row<T>( - /** - * Row ID. - */ - @SerializedName("\$id") - val id: String, - - /** - * Row automatically incrementing ID. - */ - @SerializedName("\$sequence") - val sequence: Long, - - /** - * Table ID. - */ - @SerializedName("\$tableId") - val tableId: String, - - /** - * Database ID. - */ - @SerializedName("\$databaseId") - val databaseId: String, - - /** - * Row creation date in ISO 8601 format. - */ - @SerializedName("\$createdAt") - val createdAt: String, - - /** - * Row update date in ISO 8601 format. - */ - @SerializedName("\$updatedAt") - val updatedAt: String, - - /** - * Row permissions. [Learn more about permissions](https://appwrite.io/docs/permissions). - */ - @SerializedName("\$permissions") - val permissions: List<String>, - - /** - * Additional properties - */ - @SerializedName("data") - val data: T -) { - fun toMap(): Map<String, Any> = mapOf( - "\$id" to id as Any, - "\$sequence" to sequence as Any, - "\$tableId" to tableId as Any, - "\$databaseId" to databaseId as Any, - "\$createdAt" to createdAt as Any, - "\$updatedAt" to updatedAt as Any, - "\$permissions" to permissions as Any, - "data" to data!!.jsonCast(to = Map::class.java) - ) - - companion object { - operator fun invoke( - id: String, - sequence: Long, - tableId: String, - databaseId: String, - createdAt: String, - updatedAt: String, - permissions: List<String>, - data: Map<String, Any> - ) = Row<Map<String, Any>>( - id, - sequence, - tableId, - databaseId, - createdAt, - updatedAt, - permissions, - data - ) - - @Suppress("UNCHECKED_CAST") - fun <T> from( - map: Map<String, Any>, - nestedType: Class<T> - ) = Row<T>( - id = map["\$id"] as String, - sequence = (map["\$sequence"] as Number).toLong(), - tableId = map["\$tableId"] as String, - databaseId = map["\$databaseId"] as String, - createdAt = map["\$createdAt"] as String, - updatedAt = map["\$updatedAt"] as String, - permissions = map["\$permissions"] as List<String>, - data = map.jsonCast(to = nestedType) - ) - } -} \ No newline at end of file diff --git a/src/main/kotlin/io/appwrite/models/RowList.kt b/src/main/kotlin/io/appwrite/models/RowList.kt deleted file mode 100644 index 289f39b..0000000 --- a/src/main/kotlin/io/appwrite/models/RowList.kt +++ /dev/null @@ -1,46 +0,0 @@ -package io.appwrite.models - -import com.google.gson.annotations.SerializedName -import io.appwrite.extensions.jsonCast - -/** - * Rows List - */ -data class RowList<T>( - /** - * Total number of rows rows that matched your query. - */ - @SerializedName("total") - val total: Long, - - /** - * List of rows. - */ - @SerializedName("rows") - val rows: List<Row<T>>, - -) { - fun toMap(): Map<String, Any> = mapOf( - "total" to total as Any, - "rows" to rows.map { it.toMap() } as Any, - ) - - companion object { - operator fun invoke( - total: Long, - rows: List<Row<Map<String, Any>>>, - ) = RowList<Map<String, Any>>( - total, - rows, - ) - - @Suppress("UNCHECKED_CAST") - fun <T> from( - map: Map<String, Any>, - nestedType: Class<T> - ) = RowList<T>( - total = (map["total"] as Number).toLong(), - rows = (map["rows"] as List<Map<String, Any>>).map { Row.from(map = it, nestedType) }, - ) - } -} \ No newline at end of file diff --git a/src/main/kotlin/io/appwrite/models/RuntimeList.kt b/src/main/kotlin/io/appwrite/models/RuntimeList.kt index 55c17d9..d08e9a2 100644 --- a/src/main/kotlin/io/appwrite/models/RuntimeList.kt +++ b/src/main/kotlin/io/appwrite/models/RuntimeList.kt @@ -8,7 +8,7 @@ import io.appwrite.extensions.jsonCast */ data class RuntimeList( /** - * Total number of runtimes rows that matched your query. + * Total number of runtimes documents that matched your query. */ @SerializedName("total") val total: Long, diff --git a/src/main/kotlin/io/appwrite/models/SessionList.kt b/src/main/kotlin/io/appwrite/models/SessionList.kt index 13e0c36..c7080e6 100644 --- a/src/main/kotlin/io/appwrite/models/SessionList.kt +++ b/src/main/kotlin/io/appwrite/models/SessionList.kt @@ -8,7 +8,7 @@ import io.appwrite.extensions.jsonCast */ data class SessionList( /** - * Total number of sessions rows that matched your query. + * Total number of sessions documents that matched your query. */ @SerializedName("total") val total: Long, diff --git a/src/main/kotlin/io/appwrite/models/SiteList.kt b/src/main/kotlin/io/appwrite/models/SiteList.kt index 5332571..15ecc7f 100644 --- a/src/main/kotlin/io/appwrite/models/SiteList.kt +++ b/src/main/kotlin/io/appwrite/models/SiteList.kt @@ -8,7 +8,7 @@ import io.appwrite.extensions.jsonCast */ data class SiteList( /** - * Total number of sites rows that matched your query. + * Total number of sites documents that matched your query. */ @SerializedName("total") val total: Long, diff --git a/src/main/kotlin/io/appwrite/models/SpecificationList.kt b/src/main/kotlin/io/appwrite/models/SpecificationList.kt index 5ac8cf9..f504577 100644 --- a/src/main/kotlin/io/appwrite/models/SpecificationList.kt +++ b/src/main/kotlin/io/appwrite/models/SpecificationList.kt @@ -8,7 +8,7 @@ import io.appwrite.extensions.jsonCast */ data class SpecificationList( /** - * Total number of specifications rows that matched your query. + * Total number of specifications documents that matched your query. */ @SerializedName("total") val total: Long, diff --git a/src/main/kotlin/io/appwrite/models/SubscriberList.kt b/src/main/kotlin/io/appwrite/models/SubscriberList.kt index 8f811c7..87181a3 100644 --- a/src/main/kotlin/io/appwrite/models/SubscriberList.kt +++ b/src/main/kotlin/io/appwrite/models/SubscriberList.kt @@ -8,7 +8,7 @@ import io.appwrite.extensions.jsonCast */ data class SubscriberList( /** - * Total number of subscribers rows that matched your query. + * Total number of subscribers documents that matched your query. */ @SerializedName("total") val total: Long, diff --git a/src/main/kotlin/io/appwrite/models/Table.kt b/src/main/kotlin/io/appwrite/models/Table.kt deleted file mode 100644 index 9b43c41..0000000 --- a/src/main/kotlin/io/appwrite/models/Table.kt +++ /dev/null @@ -1,102 +0,0 @@ -package io.appwrite.models - -import com.google.gson.annotations.SerializedName -import io.appwrite.extensions.jsonCast - -/** - * Table - */ -data class Table( - /** - * Table ID. - */ - @SerializedName("\$id") - val id: String, - - /** - * Table creation date in ISO 8601 format. - */ - @SerializedName("\$createdAt") - val createdAt: String, - - /** - * Table update date in ISO 8601 format. - */ - @SerializedName("\$updatedAt") - val updatedAt: String, - - /** - * Table permissions. [Learn more about permissions](https://appwrite.io/docs/permissions). - */ - @SerializedName("\$permissions") - val permissions: List<String>, - - /** - * Database ID. - */ - @SerializedName("databaseId") - val databaseId: String, - - /** - * Table name. - */ - @SerializedName("name") - val name: String, - - /** - * Table enabled. Can be 'enabled' or 'disabled'. When disabled, the table is inaccessible to users, but remains accessible to Server SDKs using API keys. - */ - @SerializedName("enabled") - val enabled: Boolean, - - /** - * Whether row-level permissions are enabled. [Learn more about permissions](https://appwrite.io/docs/permissions). - */ - @SerializedName("rowSecurity") - val rowSecurity: Boolean, - - /** - * Table columns. - */ - @SerializedName("columns") - val columns: List<Any>, - - /** - * Table indexes. - */ - @SerializedName("indexes") - val indexes: List<ColumnIndex>, - -) { - fun toMap(): Map<String, Any> = mapOf( - "\$id" to id as Any, - "\$createdAt" to createdAt as Any, - "\$updatedAt" to updatedAt as Any, - "\$permissions" to permissions as Any, - "databaseId" to databaseId as Any, - "name" to name as Any, - "enabled" to enabled as Any, - "rowSecurity" to rowSecurity as Any, - "columns" to columns as Any, - "indexes" to indexes.map { it.toMap() } as Any, - ) - - companion object { - - @Suppress("UNCHECKED_CAST") - fun from( - map: Map<String, Any>, - ) = Table( - id = map["\$id"] as String, - createdAt = map["\$createdAt"] as String, - updatedAt = map["\$updatedAt"] as String, - permissions = map["\$permissions"] as List<String>, - databaseId = map["databaseId"] as String, - name = map["name"] as String, - enabled = map["enabled"] as Boolean, - rowSecurity = map["rowSecurity"] as Boolean, - columns = map["columns"] as List<Any>, - indexes = (map["indexes"] as List<Map<String, Any>>).map { ColumnIndex.from(map = it) }, - ) - } -} \ No newline at end of file diff --git a/src/main/kotlin/io/appwrite/models/TableList.kt b/src/main/kotlin/io/appwrite/models/TableList.kt deleted file mode 100644 index 3ee5afb..0000000 --- a/src/main/kotlin/io/appwrite/models/TableList.kt +++ /dev/null @@ -1,38 +0,0 @@ -package io.appwrite.models - -import com.google.gson.annotations.SerializedName -import io.appwrite.extensions.jsonCast - -/** - * Tables List - */ -data class TableList( - /** - * Total number of tables rows that matched your query. - */ - @SerializedName("total") - val total: Long, - - /** - * List of tables. - */ - @SerializedName("tables") - val tables: List<Table>, - -) { - fun toMap(): Map<String, Any> = mapOf( - "total" to total as Any, - "tables" to tables.map { it.toMap() } as Any, - ) - - companion object { - - @Suppress("UNCHECKED_CAST") - fun from( - map: Map<String, Any>, - ) = TableList( - total = (map["total"] as Number).toLong(), - tables = (map["tables"] as List<Map<String, Any>>).map { Table.from(map = it) }, - ) - } -} \ No newline at end of file diff --git a/src/main/kotlin/io/appwrite/models/TargetList.kt b/src/main/kotlin/io/appwrite/models/TargetList.kt index 8b94727..01470c8 100644 --- a/src/main/kotlin/io/appwrite/models/TargetList.kt +++ b/src/main/kotlin/io/appwrite/models/TargetList.kt @@ -8,7 +8,7 @@ import io.appwrite.extensions.jsonCast */ data class TargetList( /** - * Total number of targets rows that matched your query. + * Total number of targets documents that matched your query. */ @SerializedName("total") val total: Long, diff --git a/src/main/kotlin/io/appwrite/models/TeamList.kt b/src/main/kotlin/io/appwrite/models/TeamList.kt index f1a1968..17ccd6b 100644 --- a/src/main/kotlin/io/appwrite/models/TeamList.kt +++ b/src/main/kotlin/io/appwrite/models/TeamList.kt @@ -8,7 +8,7 @@ import io.appwrite.extensions.jsonCast */ data class TeamList<T>( /** - * Total number of teams rows that matched your query. + * Total number of teams documents that matched your query. */ @SerializedName("total") val total: Long, diff --git a/src/main/kotlin/io/appwrite/models/TopicList.kt b/src/main/kotlin/io/appwrite/models/TopicList.kt index 2a1cc5f..7173fec 100644 --- a/src/main/kotlin/io/appwrite/models/TopicList.kt +++ b/src/main/kotlin/io/appwrite/models/TopicList.kt @@ -8,7 +8,7 @@ import io.appwrite.extensions.jsonCast */ data class TopicList( /** - * Total number of topics rows that matched your query. + * Total number of topics documents that matched your query. */ @SerializedName("total") val total: Long, diff --git a/src/main/kotlin/io/appwrite/models/UserList.kt b/src/main/kotlin/io/appwrite/models/UserList.kt index 3bf322e..efe164f 100644 --- a/src/main/kotlin/io/appwrite/models/UserList.kt +++ b/src/main/kotlin/io/appwrite/models/UserList.kt @@ -8,7 +8,7 @@ import io.appwrite.extensions.jsonCast */ data class UserList<T>( /** - * Total number of users rows that matched your query. + * Total number of users documents that matched your query. */ @SerializedName("total") val total: Long, diff --git a/src/main/kotlin/io/appwrite/models/VariableList.kt b/src/main/kotlin/io/appwrite/models/VariableList.kt index 3f7e430..06004c6 100644 --- a/src/main/kotlin/io/appwrite/models/VariableList.kt +++ b/src/main/kotlin/io/appwrite/models/VariableList.kt @@ -8,7 +8,7 @@ import io.appwrite.extensions.jsonCast */ data class VariableList( /** - * Total number of variables rows that matched your query. + * Total number of variables documents that matched your query. */ @SerializedName("total") val total: Long, diff --git a/src/main/kotlin/io/appwrite/services/Account.kt b/src/main/kotlin/io/appwrite/services/Account.kt index dcfe70d..26494eb 100644 --- a/src/main/kotlin/io/appwrite/services/Account.kt +++ b/src/main/kotlin/io/appwrite/services/Account.kt @@ -1046,9 +1046,6 @@ class Account(client: Client) : Service(client) { * @param secret Valid verification token. * @return [io.appwrite.models.Session] */ - @Deprecated( - message = "This API has been deprecated." - ) @Throws(AppwriteException::class) suspend fun updateMagicURLSession( userId: String, @@ -1083,9 +1080,6 @@ class Account(client: Client) : Service(client) { * @param secret Valid verification token. * @return [io.appwrite.models.Session] */ - @Deprecated( - message = "This API has been deprecated." - ) @Throws(AppwriteException::class) suspend fun updatePhoneSession( userId: String, diff --git a/src/main/kotlin/io/appwrite/services/Databases.kt b/src/main/kotlin/io/appwrite/services/Databases.kt index 688d372..6c57ede 100644 --- a/src/main/kotlin/io/appwrite/services/Databases.kt +++ b/src/main/kotlin/io/appwrite/services/Databases.kt @@ -188,11 +188,6 @@ class Databases(client: Client) : Service(client) { * @param search Search term to filter your list results. Max length: 256 chars. * @return [io.appwrite.models.CollectionList] */ - @Deprecated( - message = "This API has been deprecated since 1.8.0. Please use `Tables.list` instead.", - replaceWith = ReplaceWith("io.appwrite.services.Tables.list"), - since = "1.8.0" - ) @JvmOverloads @Throws(AppwriteException::class) suspend fun listCollections( @@ -233,11 +228,6 @@ class Databases(client: Client) : Service(client) { * @param enabled Is collection enabled? When set to 'disabled', users cannot access the collection but Server SDKs with and API key can still read and write to the collection. No data is lost when this is toggled. * @return [io.appwrite.models.Collection] */ - @Deprecated( - message = "This API has been deprecated since 1.8.0. Please use `Tables.create` instead.", - replaceWith = ReplaceWith("io.appwrite.services.Tables.create"), - since = "1.8.0" - ) @JvmOverloads @Throws(AppwriteException::class) suspend fun createCollection( @@ -281,11 +271,6 @@ class Databases(client: Client) : Service(client) { * @param collectionId Collection ID. * @return [io.appwrite.models.Collection] */ - @Deprecated( - message = "This API has been deprecated since 1.8.0. Please use `Tables.get` instead.", - replaceWith = ReplaceWith("io.appwrite.services.Tables.get"), - since = "1.8.0" - ) @Throws(AppwriteException::class) suspend fun getCollection( databaseId: String, @@ -323,11 +308,6 @@ class Databases(client: Client) : Service(client) { * @param enabled Is collection enabled? When set to 'disabled', users cannot access the collection but Server SDKs with and API key can still read and write to the collection. No data is lost when this is toggled. * @return [io.appwrite.models.Collection] */ - @Deprecated( - message = "This API has been deprecated since 1.8.0. Please use `Tables.update` instead.", - replaceWith = ReplaceWith("io.appwrite.services.Tables.update"), - since = "1.8.0" - ) @JvmOverloads @Throws(AppwriteException::class) suspend fun updateCollection( @@ -371,11 +351,6 @@ class Databases(client: Client) : Service(client) { * @param collectionId Collection ID. * @return [Any] */ - @Deprecated( - message = "This API has been deprecated since 1.8.0. Please use `Tables.delete` instead.", - replaceWith = ReplaceWith("io.appwrite.services.Tables.delete"), - since = "1.8.0" - ) @Throws(AppwriteException::class) suspend fun deleteCollection( databaseId: String, @@ -403,15 +378,10 @@ class Databases(client: Client) : Service(client) { * List attributes in the collection. * * @param databaseId Database ID. - * @param collectionId Collection ID. + * @param collectionId Collection ID. You can create a new collection using the Database service [server integration](https://appwrite.io/docs/server/databases#databasesCreateCollection). * @param queries Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https://appwrite.io/docs/queries). Maximum of 100 queries are allowed, each 4096 characters long. You may filter on the following attributes: key, type, size, required, array, status, error * @return [io.appwrite.models.AttributeList] */ - @Deprecated( - message = "This API has been deprecated since 1.8.0. Please use `Tables.listColumns` instead.", - replaceWith = ReplaceWith("io.appwrite.services.Tables.listColumns"), - since = "1.8.0" - ) @JvmOverloads @Throws(AppwriteException::class) suspend fun listAttributes( @@ -445,18 +415,13 @@ class Databases(client: Client) : Service(client) { * Create a boolean attribute. * * @param databaseId Database ID. - * @param collectionId Collection ID. You can create a new table using the Database service [server integration](https://appwrite.io/docs/server/databases#databasesCreateCollection). + * @param collectionId Collection ID. You can create a new collection using the Database service [server integration](https://appwrite.io/docs/server/databases#databasesCreateCollection). * @param key Attribute Key. * @param required Is attribute required? * @param default Default value for attribute when not provided. Cannot be set when attribute is required. * @param array Is attribute an array? * @return [io.appwrite.models.AttributeBoolean] */ - @Deprecated( - message = "This API has been deprecated since 1.8.0. Please use `Tables.createBooleanColumn` instead.", - replaceWith = ReplaceWith("io.appwrite.services.Tables.createBooleanColumn"), - since = "1.8.0" - ) @JvmOverloads @Throws(AppwriteException::class) suspend fun createBooleanAttribute( @@ -497,18 +462,13 @@ class Databases(client: Client) : Service(client) { * Update a boolean attribute. Changing the `default` value will not update already existing documents. * * @param databaseId Database ID. - * @param collectionId Collection ID. You can create a new collection using the Database service [server integration](https://appwrite.io/docs/server/databases#createCollection). + * @param collectionId Collection ID. You can create a new collection using the Database service [server integration](https://appwrite.io/docs/server/databases#databasesCreateCollection). * @param key Attribute Key. * @param required Is attribute required? * @param default Default value for attribute when not provided. Cannot be set when attribute is required. * @param newKey New attribute key. * @return [io.appwrite.models.AttributeBoolean] */ - @Deprecated( - message = "This API has been deprecated since 1.8.0. Please use `Tables.updateBooleanColumn` instead.", - replaceWith = ReplaceWith("io.appwrite.services.Tables.updateBooleanColumn"), - since = "1.8.0" - ) @JvmOverloads @Throws(AppwriteException::class) suspend fun updateBooleanAttribute( @@ -549,18 +509,13 @@ class Databases(client: Client) : Service(client) { * Create a date time attribute according to the ISO 8601 standard. * * @param databaseId Database ID. - * @param collectionId Collection ID. You can create a new collection using the Database service [server integration](https://appwrite.io/docs/server/databases#createCollection). + * @param collectionId Collection ID. You can create a new collection using the Database service [server integration](https://appwrite.io/docs/server/databases#databasesCreateCollection). * @param key Attribute Key. * @param required Is attribute required? * @param default Default value for the attribute in [ISO 8601](https://www.iso.org/iso-8601-date-and-time-format.html) format. Cannot be set when attribute is required. * @param array Is attribute an array? * @return [io.appwrite.models.AttributeDatetime] */ - @Deprecated( - message = "This API has been deprecated since 1.8.0. Please use `Tables.createDatetimeColumn` instead.", - replaceWith = ReplaceWith("io.appwrite.services.Tables.createDatetimeColumn"), - since = "1.8.0" - ) @JvmOverloads @Throws(AppwriteException::class) suspend fun createDatetimeAttribute( @@ -601,18 +556,13 @@ class Databases(client: Client) : Service(client) { * Update a date time attribute. Changing the `default` value will not update already existing documents. * * @param databaseId Database ID. - * @param collectionId Collection ID. + * @param collectionId Collection ID. You can create a new collection using the Database service [server integration](https://appwrite.io/docs/server/databases#databasesCreateCollection). * @param key Attribute Key. * @param required Is attribute required? * @param default Default value for attribute when not provided. Cannot be set when attribute is required. * @param newKey New attribute key. * @return [io.appwrite.models.AttributeDatetime] */ - @Deprecated( - message = "This API has been deprecated since 1.8.0. Please use `Tables.updateDatetimeColumn` instead.", - replaceWith = ReplaceWith("io.appwrite.services.Tables.updateDatetimeColumn"), - since = "1.8.0" - ) @JvmOverloads @Throws(AppwriteException::class) suspend fun updateDatetimeAttribute( @@ -653,18 +603,13 @@ class Databases(client: Client) : Service(client) { * Create an email attribute. * * @param databaseId Database ID. - * @param collectionId Collection ID. + * @param collectionId Collection ID. You can create a new collection using the Database service [server integration](https://appwrite.io/docs/server/databases#databasesCreateCollection). * @param key Attribute Key. * @param required Is attribute required? * @param default Default value for attribute when not provided. Cannot be set when attribute is required. * @param array Is attribute an array? * @return [io.appwrite.models.AttributeEmail] */ - @Deprecated( - message = "This API has been deprecated since 1.8.0. Please use `Tables.createEmailColumn` instead.", - replaceWith = ReplaceWith("io.appwrite.services.Tables.createEmailColumn"), - since = "1.8.0" - ) @JvmOverloads @Throws(AppwriteException::class) suspend fun createEmailAttribute( @@ -705,18 +650,13 @@ class Databases(client: Client) : Service(client) { * Update an email attribute. Changing the `default` value will not update already existing documents. * * @param databaseId Database ID. - * @param collectionId Collection ID. + * @param collectionId Collection ID. You can create a new collection using the Database service [server integration](https://appwrite.io/docs/server/databases#databasesCreateCollection). * @param key Attribute Key. * @param required Is attribute required? * @param default Default value for attribute when not provided. Cannot be set when attribute is required. - * @param newKey New Attribute Key. + * @param newKey New attribute key. * @return [io.appwrite.models.AttributeEmail] */ - @Deprecated( - message = "This API has been deprecated since 1.8.0. Please use `Tables.updateEmailColumn` instead.", - replaceWith = ReplaceWith("io.appwrite.services.Tables.updateEmailColumn"), - since = "1.8.0" - ) @JvmOverloads @Throws(AppwriteException::class) suspend fun updateEmailAttribute( @@ -754,22 +694,17 @@ class Databases(client: Client) : Service(client) { } /** - * Create an enum attribute. The `elements` param acts as a white-list of accepted values for this attribute. + * Create an enumeration attribute. The `elements` param acts as a white-list of accepted values for this attribute. * * @param databaseId Database ID. - * @param collectionId Collection ID. + * @param collectionId Collection ID. You can create a new collection using the Database service [server integration](https://appwrite.io/docs/server/databases#databasesCreateCollection). * @param key Attribute Key. - * @param elements Array of enum values. + * @param elements Array of elements in enumerated type. Uses length of longest element to determine size. Maximum of 100 elements are allowed, each 255 characters long. * @param required Is attribute required? * @param default Default value for attribute when not provided. Cannot be set when attribute is required. * @param array Is attribute an array? * @return [io.appwrite.models.AttributeEnum] */ - @Deprecated( - message = "This API has been deprecated since 1.8.0. Please use `Tables.createEnumColumn` instead.", - replaceWith = ReplaceWith("io.appwrite.services.Tables.createEnumColumn"), - since = "1.8.0" - ) @JvmOverloads @Throws(AppwriteException::class) suspend fun createEnumAttribute( @@ -812,19 +747,14 @@ class Databases(client: Client) : Service(client) { * Update an enum attribute. Changing the `default` value will not update already existing documents. * * @param databaseId Database ID. - * @param collectionId Collection ID. + * @param collectionId Collection ID. You can create a new collection using the Database service [server integration](https://appwrite.io/docs/server/databases#databasesCreateCollection). * @param key Attribute Key. - * @param elements Updated list of enum values. + * @param elements Array of elements in enumerated type. Uses length of longest element to determine size. Maximum of 100 elements are allowed, each 255 characters long. * @param required Is attribute required? * @param default Default value for attribute when not provided. Cannot be set when attribute is required. - * @param newKey New Attribute Key. + * @param newKey New attribute key. * @return [io.appwrite.models.AttributeEnum] */ - @Deprecated( - message = "This API has been deprecated since 1.8.0. Please use `Tables.updateEnumColumn` instead.", - replaceWith = ReplaceWith("io.appwrite.services.Tables.updateEnumColumn"), - since = "1.8.0" - ) @JvmOverloads @Throws(AppwriteException::class) suspend fun updateEnumAttribute( @@ -867,20 +797,15 @@ class Databases(client: Client) : Service(client) { * Create a float attribute. Optionally, minimum and maximum values can be provided. * * @param databaseId Database ID. - * @param collectionId Collection ID. + * @param collectionId Collection ID. You can create a new collection using the Database service [server integration](https://appwrite.io/docs/server/databases#databasesCreateCollection). * @param key Attribute Key. * @param required Is attribute required? - * @param min Minimum value. - * @param max Maximum value. - * @param default Default value. Cannot be set when required. + * @param min Minimum value to enforce on new documents + * @param max Maximum value to enforce on new documents + * @param default Default value for attribute when not provided. Cannot be set when attribute is required. * @param array Is attribute an array? * @return [io.appwrite.models.AttributeFloat] */ - @Deprecated( - message = "This API has been deprecated since 1.8.0. Please use `Tables.createFloatColumn` instead.", - replaceWith = ReplaceWith("io.appwrite.services.Tables.createFloatColumn"), - since = "1.8.0" - ) @JvmOverloads @Throws(AppwriteException::class) suspend fun createFloatAttribute( @@ -925,20 +850,15 @@ class Databases(client: Client) : Service(client) { * Update a float attribute. Changing the `default` value will not update already existing documents. * * @param databaseId Database ID. - * @param collectionId Collection ID. + * @param collectionId Collection ID. You can create a new collection using the Database service [server integration](https://appwrite.io/docs/server/databases#databasesCreateCollection). * @param key Attribute Key. * @param required Is attribute required? - * @param default Default value. Cannot be set when required. - * @param min Minimum value. - * @param max Maximum value. - * @param newKey New Attribute Key. + * @param default Default value for attribute when not provided. Cannot be set when attribute is required. + * @param min Minimum value to enforce on new documents + * @param max Maximum value to enforce on new documents + * @param newKey New attribute key. * @return [io.appwrite.models.AttributeFloat] */ - @Deprecated( - message = "This API has been deprecated since 1.8.0. Please use `Tables.updateFloatColumn` instead.", - replaceWith = ReplaceWith("io.appwrite.services.Tables.updateFloatColumn"), - since = "1.8.0" - ) @JvmOverloads @Throws(AppwriteException::class) suspend fun updateFloatAttribute( @@ -983,20 +903,15 @@ class Databases(client: Client) : Service(client) { * Create an integer attribute. Optionally, minimum and maximum values can be provided. * * @param databaseId Database ID. - * @param collectionId Collection ID. + * @param collectionId Collection ID. You can create a new collection using the Database service [server integration](https://appwrite.io/docs/server/databases#databasesCreateCollection). * @param key Attribute Key. * @param required Is attribute required? - * @param min Minimum value - * @param max Maximum value - * @param default Default value. Cannot be set when attribute is required. + * @param min Minimum value to enforce on new documents + * @param max Maximum value to enforce on new documents + * @param default Default value for attribute when not provided. Cannot be set when attribute is required. * @param array Is attribute an array? * @return [io.appwrite.models.AttributeInteger] */ - @Deprecated( - message = "This API has been deprecated since 1.8.0. Please use `Tables.createIntegerColumn` instead.", - replaceWith = ReplaceWith("io.appwrite.services.Tables.createIntegerColumn"), - since = "1.8.0" - ) @JvmOverloads @Throws(AppwriteException::class) suspend fun createIntegerAttribute( @@ -1041,20 +956,15 @@ class Databases(client: Client) : Service(client) { * Update an integer attribute. Changing the `default` value will not update already existing documents. * * @param databaseId Database ID. - * @param collectionId Collection ID. + * @param collectionId Collection ID. You can create a new collection using the Database service [server integration](https://appwrite.io/docs/server/databases#databasesCreateCollection). * @param key Attribute Key. * @param required Is attribute required? - * @param default Default value. Cannot be set when attribute is required. - * @param min Minimum value - * @param max Maximum value - * @param newKey New Attribute Key. + * @param default Default value for attribute when not provided. Cannot be set when attribute is required. + * @param min Minimum value to enforce on new documents + * @param max Maximum value to enforce on new documents + * @param newKey New attribute key. * @return [io.appwrite.models.AttributeInteger] */ - @Deprecated( - message = "This API has been deprecated since 1.8.0. Please use `Tables.updateIntegerColumn` instead.", - replaceWith = ReplaceWith("io.appwrite.services.Tables.updateIntegerColumn"), - since = "1.8.0" - ) @JvmOverloads @Throws(AppwriteException::class) suspend fun updateIntegerAttribute( @@ -1099,18 +1009,13 @@ class Databases(client: Client) : Service(client) { * Create IP address attribute. * * @param databaseId Database ID. - * @param collectionId Collection ID. + * @param collectionId Collection ID. You can create a new collection using the Database service [server integration](https://appwrite.io/docs/server/databases#databasesCreateCollection). * @param key Attribute Key. * @param required Is attribute required? - * @param default Default value. Cannot be set when attribute is required. + * @param default Default value for attribute when not provided. Cannot be set when attribute is required. * @param array Is attribute an array? * @return [io.appwrite.models.AttributeIp] */ - @Deprecated( - message = "This API has been deprecated since 1.8.0. Please use `Tables.createIpColumn` instead.", - replaceWith = ReplaceWith("io.appwrite.services.Tables.createIpColumn"), - since = "1.8.0" - ) @JvmOverloads @Throws(AppwriteException::class) suspend fun createIpAttribute( @@ -1151,18 +1056,13 @@ class Databases(client: Client) : Service(client) { * Update an ip attribute. Changing the `default` value will not update already existing documents. * * @param databaseId Database ID. - * @param collectionId Collection ID. + * @param collectionId Collection ID. You can create a new collection using the Database service [server integration](https://appwrite.io/docs/server/databases#databasesCreateCollection). * @param key Attribute Key. * @param required Is attribute required? - * @param default Default value. Cannot be set when attribute is required. - * @param newKey New Attribute Key. + * @param default Default value for attribute when not provided. Cannot be set when attribute is required. + * @param newKey New attribute key. * @return [io.appwrite.models.AttributeIp] */ - @Deprecated( - message = "This API has been deprecated since 1.8.0. Please use `Tables.updateIpColumn` instead.", - replaceWith = ReplaceWith("io.appwrite.services.Tables.updateIpColumn"), - since = "1.8.0" - ) @JvmOverloads @Throws(AppwriteException::class) suspend fun updateIpAttribute( @@ -1203,8 +1103,8 @@ class Databases(client: Client) : Service(client) { * Create relationship attribute. [Learn more about relationship attributes](https://appwrite.io/docs/databases-relationships#relationship-attributes). * * @param databaseId Database ID. - * @param collectionId Collection ID. - * @param relatedCollectionId Related Collection ID. + * @param collectionId Collection ID. You can create a new collection using the Database service [server integration](https://appwrite.io/docs/server/databases#databasesCreateCollection). + * @param relatedCollectionId Related Collection ID. You can create a new collection using the Database service [server integration](https://appwrite.io/docs/server/databases#databasesCreateCollection). * @param type Relation type * @param twoWay Is Two Way? * @param key Attribute Key. @@ -1212,11 +1112,6 @@ class Databases(client: Client) : Service(client) { * @param onDelete Constraints option * @return [io.appwrite.models.AttributeRelationship] */ - @Deprecated( - message = "This API has been deprecated since 1.8.0. Please use `Tables.createRelationshipColumn` instead.", - replaceWith = ReplaceWith("io.appwrite.services.Tables.createRelationshipColumn"), - since = "1.8.0" - ) @JvmOverloads @Throws(AppwriteException::class) suspend fun createRelationshipAttribute( @@ -1261,7 +1156,7 @@ class Databases(client: Client) : Service(client) { * Create a string attribute. * * @param databaseId Database ID. - * @param collectionId Collection ID. You can create a new table using the Database service [server integration](https://appwrite.io/docs/server/databases#databasesCreateCollection). + * @param collectionId Collection ID. You can create a new collection using the Database service [server integration](https://appwrite.io/docs/server/databases#databasesCreateCollection). * @param key Attribute Key. * @param size Attribute size for text attributes, in number of characters. * @param required Is attribute required? @@ -1270,11 +1165,6 @@ class Databases(client: Client) : Service(client) { * @param encrypt Toggle encryption for the attribute. Encryption enhances security by not storing any plain text values in the database. However, encrypted attributes cannot be queried. * @return [io.appwrite.models.AttributeString] */ - @Deprecated( - message = "This API has been deprecated since 1.8.0. Please use `Tables.createStringColumn` instead.", - replaceWith = ReplaceWith("io.appwrite.services.Tables.createStringColumn"), - since = "1.8.0" - ) @JvmOverloads @Throws(AppwriteException::class) suspend fun createStringAttribute( @@ -1319,19 +1209,14 @@ class Databases(client: Client) : Service(client) { * Update a string attribute. Changing the `default` value will not update already existing documents. * * @param databaseId Database ID. - * @param collectionId Collection ID. You can create a new table using the Database service [server integration](https://appwrite.io/docs/server/databases#databasesCreateCollection). + * @param collectionId Collection ID. You can create a new collection using the Database service [server integration](https://appwrite.io/docs/server/databases#databasesCreateCollection). * @param key Attribute Key. * @param required Is attribute required? * @param default Default value for attribute when not provided. Cannot be set when attribute is required. * @param size Maximum size of the string attribute. - * @param newKey New Attribute Key. + * @param newKey New attribute key. * @return [io.appwrite.models.AttributeString] */ - @Deprecated( - message = "This API has been deprecated since 1.8.0. Please use `Tables.updateStringColumn` instead.", - replaceWith = ReplaceWith("io.appwrite.services.Tables.updateStringColumn"), - since = "1.8.0" - ) @JvmOverloads @Throws(AppwriteException::class) suspend fun updateStringAttribute( @@ -1374,18 +1259,13 @@ class Databases(client: Client) : Service(client) { * Create a URL attribute. * * @param databaseId Database ID. - * @param collectionId Collection ID. + * @param collectionId Collection ID. You can create a new collection using the Database service [server integration](https://appwrite.io/docs/server/databases#databasesCreateCollection). * @param key Attribute Key. * @param required Is attribute required? * @param default Default value for attribute when not provided. Cannot be set when attribute is required. * @param array Is attribute an array? * @return [io.appwrite.models.AttributeUrl] */ - @Deprecated( - message = "This API has been deprecated since 1.8.0. Please use `Tables.createUrlColumn` instead.", - replaceWith = ReplaceWith("io.appwrite.services.Tables.createUrlColumn"), - since = "1.8.0" - ) @JvmOverloads @Throws(AppwriteException::class) suspend fun createUrlAttribute( @@ -1426,18 +1306,13 @@ class Databases(client: Client) : Service(client) { * Update an url attribute. Changing the `default` value will not update already existing documents. * * @param databaseId Database ID. - * @param collectionId Collection ID. + * @param collectionId Collection ID. You can create a new collection using the Database service [server integration](https://appwrite.io/docs/server/databases#databasesCreateCollection). * @param key Attribute Key. * @param required Is attribute required? * @param default Default value for attribute when not provided. Cannot be set when attribute is required. - * @param newKey New Attribute Key. + * @param newKey New attribute key. * @return [io.appwrite.models.AttributeUrl] */ - @Deprecated( - message = "This API has been deprecated since 1.8.0. Please use `Tables.updateUrlColumn` instead.", - replaceWith = ReplaceWith("io.appwrite.services.Tables.updateUrlColumn"), - since = "1.8.0" - ) @JvmOverloads @Throws(AppwriteException::class) suspend fun updateUrlAttribute( @@ -1478,15 +1353,10 @@ class Databases(client: Client) : Service(client) { * Get attribute by ID. * * @param databaseId Database ID. - * @param collectionId Collection ID. + * @param collectionId Collection ID. You can create a new collection using the Database service [server integration](https://appwrite.io/docs/server/databases#databasesCreateCollection). * @param key Attribute Key. * @return [Any] */ - @Deprecated( - message = "This API has been deprecated since 1.8.0. Please use `Tables.getColumn` instead.", - replaceWith = ReplaceWith("io.appwrite.services.Tables.getColumn"), - since = "1.8.0" - ) @Throws(AppwriteException::class) suspend fun getAttribute( databaseId: String, @@ -1515,15 +1385,10 @@ class Databases(client: Client) : Service(client) { * Deletes an attribute. * * @param databaseId Database ID. - * @param collectionId Collection ID. + * @param collectionId Collection ID. You can create a new collection using the Database service [server integration](https://appwrite.io/docs/server/databases#databasesCreateCollection). * @param key Attribute Key. * @return [Any] */ - @Deprecated( - message = "This API has been deprecated since 1.8.0. Please use `Tables.deleteColumn` instead.", - replaceWith = ReplaceWith("io.appwrite.services.Tables.deleteColumn"), - since = "1.8.0" - ) @Throws(AppwriteException::class) suspend fun deleteAttribute( databaseId: String, @@ -1553,17 +1418,12 @@ class Databases(client: Client) : Service(client) { * Update relationship attribute. [Learn more about relationship attributes](https://appwrite.io/docs/databases-relationships#relationship-attributes). * * @param databaseId Database ID. - * @param collectionId Collection ID. + * @param collectionId Collection ID. You can create a new collection using the Database service [server integration](https://appwrite.io/docs/server/databases#databasesCreateCollection). * @param key Attribute Key. * @param onDelete Constraints option - * @param newKey New Attribute Key. + * @param newKey New attribute key. * @return [io.appwrite.models.AttributeRelationship] */ - @Deprecated( - message = "This API has been deprecated since 1.8.0. Please use `Tables.updateRelationshipColumn` instead.", - replaceWith = ReplaceWith("io.appwrite.services.Tables.updateRelationshipColumn"), - since = "1.8.0" - ) @JvmOverloads @Throws(AppwriteException::class) suspend fun updateRelationshipAttribute( @@ -1606,11 +1466,6 @@ class Databases(client: Client) : Service(client) { * @param queries 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. * @return [io.appwrite.models.DocumentList<T>] */ - @Deprecated( - message = "This API has been deprecated since 1.8.0. Please use `Tables.listRows` instead.", - replaceWith = ReplaceWith("io.appwrite.services.Tables.listRows"), - since = "1.8.0" - ) @JvmOverloads @Throws(AppwriteException::class) suspend fun <T> listDocuments( @@ -1649,11 +1504,6 @@ class Databases(client: Client) : Service(client) { * @param queries 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. * @return [io.appwrite.models.DocumentList<T>] */ - @Deprecated( - message = "This API has been deprecated since 1.8.0. Please use `Tables.listRows` instead.", - replaceWith = ReplaceWith("io.appwrite.services.Tables.listRows"), - since = "1.8.0" - ) @JvmOverloads @Throws(AppwriteException::class) suspend fun listDocuments( @@ -1677,11 +1527,6 @@ class Databases(client: Client) : Service(client) { * @param permissions An array of permissions strings. By default, only the current user is granted all permissions. [Learn more about permissions](https://appwrite.io/docs/permissions). * @return [io.appwrite.models.Document<T>] */ - @Deprecated( - message = "This API has been deprecated since 1.8.0. Please use `Tables.createRow` instead.", - replaceWith = ReplaceWith("io.appwrite.services.Tables.createRow"), - since = "1.8.0" - ) @JvmOverloads @Throws(AppwriteException::class) suspend fun <T> createDocument( @@ -1727,11 +1572,6 @@ class Databases(client: Client) : Service(client) { * @param permissions An array of permissions strings. By default, only the current user is granted all permissions. [Learn more about permissions](https://appwrite.io/docs/permissions). * @return [io.appwrite.models.Document<T>] */ - @Deprecated( - message = "This API has been deprecated since 1.8.0. Please use `Tables.createRow` instead.", - replaceWith = ReplaceWith("io.appwrite.services.Tables.createRow"), - since = "1.8.0" - ) @JvmOverloads @Throws(AppwriteException::class) suspend fun createDocument( @@ -1757,11 +1597,6 @@ class Databases(client: Client) : Service(client) { * @param documents Array of documents data as JSON objects. * @return [io.appwrite.models.DocumentList<T>] */ - @Deprecated( - message = "This API has been deprecated since 1.8.0. Please use `Tables.createRow` instead.", - replaceWith = ReplaceWith("io.appwrite.services.Tables.createRow"), - since = "1.8.0" - ) @Throws(AppwriteException::class) suspend fun <T> createDocuments( databaseId: String, @@ -1800,11 +1635,6 @@ class Databases(client: Client) : Service(client) { * @param documents Array of documents data as JSON objects. * @return [io.appwrite.models.DocumentList<T>] */ - @Deprecated( - message = "This API has been deprecated since 1.8.0. Please use `Tables.createRow` instead.", - replaceWith = ReplaceWith("io.appwrite.services.Tables.createRow"), - since = "1.8.0" - ) @Throws(AppwriteException::class) suspend fun createDocuments( databaseId: String, @@ -1822,17 +1652,14 @@ class Databases(client: Client) : Service(client) { * * @param databaseId Database ID. * @param collectionId Collection ID. + * @param documents Array of document data as JSON objects. May contain partial documents. * @return [io.appwrite.models.DocumentList<T>] */ - @Deprecated( - message = "This API has been deprecated since 1.8.0. Please use `Tables.upsertRows` instead.", - replaceWith = ReplaceWith("io.appwrite.services.Tables.upsertRows"), - since = "1.8.0" - ) @Throws(AppwriteException::class) suspend fun <T> upsertDocuments( databaseId: String, collectionId: String, + documents: List<Any>, nestedType: Class<T>, ): io.appwrite.models.DocumentList<T> { val apiPath = "/databases/{databaseId}/collections/{collectionId}/documents" @@ -1840,6 +1667,7 @@ class Databases(client: Client) : Service(client) { .replace("{collectionId}", collectionId) val apiParams = mutableMapOf<String, Any?>( + "documents" to documents, ) val apiHeaders = mutableMapOf<String, String>( "content-type" to "application/json", @@ -1862,20 +1690,18 @@ class Databases(client: Client) : Service(client) { * * @param databaseId Database ID. * @param collectionId Collection ID. + * @param documents Array of document data as JSON objects. May contain partial documents. * @return [io.appwrite.models.DocumentList<T>] */ - @Deprecated( - message = "This API has been deprecated since 1.8.0. Please use `Tables.upsertRows` instead.", - replaceWith = ReplaceWith("io.appwrite.services.Tables.upsertRows"), - since = "1.8.0" - ) @Throws(AppwriteException::class) suspend fun upsertDocuments( databaseId: String, collectionId: String, + documents: List<Any>, ): io.appwrite.models.DocumentList<Map<String, Any>> = upsertDocuments( databaseId, collectionId, + documents, nestedType = classOf(), ) @@ -1888,11 +1714,6 @@ class Databases(client: Client) : Service(client) { * @param queries 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. * @return [io.appwrite.models.DocumentList<T>] */ - @Deprecated( - message = "This API has been deprecated since 1.8.0. Please use `Tables.updateRows` instead.", - replaceWith = ReplaceWith("io.appwrite.services.Tables.updateRows"), - since = "1.8.0" - ) @JvmOverloads @Throws(AppwriteException::class) suspend fun <T> updateDocuments( @@ -1935,11 +1756,6 @@ class Databases(client: Client) : Service(client) { * @param queries 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. * @return [io.appwrite.models.DocumentList<T>] */ - @Deprecated( - message = "This API has been deprecated since 1.8.0. Please use `Tables.updateRows` instead.", - replaceWith = ReplaceWith("io.appwrite.services.Tables.updateRows"), - since = "1.8.0" - ) @JvmOverloads @Throws(AppwriteException::class) suspend fun updateDocuments( @@ -1963,11 +1779,6 @@ class Databases(client: Client) : Service(client) { * @param queries 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. * @return [io.appwrite.models.DocumentList<T>] */ - @Deprecated( - message = "This API has been deprecated since 1.8.0. Please use `Tables.deleteRows` instead.", - replaceWith = ReplaceWith("io.appwrite.services.Tables.deleteRows"), - since = "1.8.0" - ) @JvmOverloads @Throws(AppwriteException::class) suspend fun <T> deleteDocuments( @@ -2007,11 +1818,6 @@ class Databases(client: Client) : Service(client) { * @param queries 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. * @return [io.appwrite.models.DocumentList<T>] */ - @Deprecated( - message = "This API has been deprecated since 1.8.0. Please use `Tables.deleteRows` instead.", - replaceWith = ReplaceWith("io.appwrite.services.Tables.deleteRows"), - since = "1.8.0" - ) @JvmOverloads @Throws(AppwriteException::class) suspend fun deleteDocuments( @@ -2034,11 +1840,6 @@ class Databases(client: Client) : Service(client) { * @param queries 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. * @return [io.appwrite.models.Document<T>] */ - @Deprecated( - message = "This API has been deprecated since 1.8.0. Please use `Tables.getRow` instead.", - replaceWith = ReplaceWith("io.appwrite.services.Tables.getRow"), - since = "1.8.0" - ) @JvmOverloads @Throws(AppwriteException::class) suspend fun <T> getDocument( @@ -2080,11 +1881,6 @@ class Databases(client: Client) : Service(client) { * @param queries 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. * @return [io.appwrite.models.Document<T>] */ - @Deprecated( - message = "This API has been deprecated since 1.8.0. Please use `Tables.getRow` instead.", - replaceWith = ReplaceWith("io.appwrite.services.Tables.getRow"), - since = "1.8.0" - ) @JvmOverloads @Throws(AppwriteException::class) suspend fun getDocument( @@ -2106,18 +1902,18 @@ class Databases(client: Client) : Service(client) { * @param databaseId Database ID. * @param collectionId Collection ID. * @param documentId Document ID. + * @param data Document data as JSON object. Include all required attributes of the document to be created or updated. + * @param permissions An array of permissions strings. By default, the current permissions are inherited. [Learn more about permissions](https://appwrite.io/docs/permissions). * @return [io.appwrite.models.Document<T>] */ - @Deprecated( - message = "This API has been deprecated since 1.8.0. Please use `Tables.upsertRow` instead.", - replaceWith = ReplaceWith("io.appwrite.services.Tables.upsertRow"), - since = "1.8.0" - ) + @JvmOverloads @Throws(AppwriteException::class) suspend fun <T> upsertDocument( databaseId: String, collectionId: String, documentId: String, + data: Any, + permissions: List<String>? = null, nestedType: Class<T>, ): io.appwrite.models.Document<T> { val apiPath = "/databases/{databaseId}/collections/{collectionId}/documents/{documentId}" @@ -2126,6 +1922,8 @@ class Databases(client: Client) : Service(client) { .replace("{documentId}", documentId) val apiParams = mutableMapOf<String, Any?>( + "data" to data, + "permissions" to permissions, ) val apiHeaders = mutableMapOf<String, String>( "content-type" to "application/json", @@ -2149,22 +1947,24 @@ class Databases(client: Client) : Service(client) { * @param databaseId Database ID. * @param collectionId Collection ID. * @param documentId Document ID. + * @param data Document data as JSON object. Include all required attributes of the document to be created or updated. + * @param permissions An array of permissions strings. By default, the current permissions are inherited. [Learn more about permissions](https://appwrite.io/docs/permissions). * @return [io.appwrite.models.Document<T>] */ - @Deprecated( - message = "This API has been deprecated since 1.8.0. Please use `Tables.upsertRow` instead.", - replaceWith = ReplaceWith("io.appwrite.services.Tables.upsertRow"), - since = "1.8.0" - ) + @JvmOverloads @Throws(AppwriteException::class) suspend fun upsertDocument( databaseId: String, collectionId: String, documentId: String, + data: Any, + permissions: List<String>? = null, ): io.appwrite.models.Document<Map<String, Any>> = upsertDocument( databaseId, collectionId, documentId, + data, + permissions, nestedType = classOf(), ) @@ -2178,11 +1978,6 @@ class Databases(client: Client) : Service(client) { * @param permissions An array of permissions strings. By default, the current permissions are inherited. [Learn more about permissions](https://appwrite.io/docs/permissions). * @return [io.appwrite.models.Document<T>] */ - @Deprecated( - message = "This API has been deprecated since 1.8.0. Please use `Tables.updateRow` instead.", - replaceWith = ReplaceWith("io.appwrite.services.Tables.updateRow"), - since = "1.8.0" - ) @JvmOverloads @Throws(AppwriteException::class) suspend fun <T> updateDocument( @@ -2228,11 +2023,6 @@ class Databases(client: Client) : Service(client) { * @param permissions An array of permissions strings. By default, the current permissions are inherited. [Learn more about permissions](https://appwrite.io/docs/permissions). * @return [io.appwrite.models.Document<T>] */ - @Deprecated( - message = "This API has been deprecated since 1.8.0. Please use `Tables.updateRow` instead.", - replaceWith = ReplaceWith("io.appwrite.services.Tables.updateRow"), - since = "1.8.0" - ) @JvmOverloads @Throws(AppwriteException::class) suspend fun updateDocument( @@ -2258,11 +2048,6 @@ class Databases(client: Client) : Service(client) { * @param documentId Document ID. * @return [Any] */ - @Deprecated( - message = "This API has been deprecated since 1.8.0. Please use `Tables.deleteRow` instead.", - replaceWith = ReplaceWith("io.appwrite.services.Tables.deleteRow"), - since = "1.8.0" - ) @Throws(AppwriteException::class) suspend fun deleteDocument( databaseId: String, @@ -2295,15 +2080,10 @@ class Databases(client: Client) : Service(client) { * @param collectionId Collection ID. * @param documentId Document ID. * @param attribute Attribute key. - * @param value Value to increment the attribute by. The value must be a number. + * @param value Value to decrement the attribute by. The value must be a number. * @param min Minimum value for the attribute. If the current value is lesser than this value, an exception will be thrown. * @return [io.appwrite.models.Document<T>] */ - @Deprecated( - message = "This API has been deprecated since 1.8.0. Please use `Tables.decrementRowColumn` instead.", - replaceWith = ReplaceWith("io.appwrite.services.Tables.decrementRowColumn"), - since = "1.8.0" - ) @JvmOverloads @Throws(AppwriteException::class) suspend fun <T> decrementDocumentAttribute( @@ -2348,15 +2128,10 @@ class Databases(client: Client) : Service(client) { * @param collectionId Collection ID. * @param documentId Document ID. * @param attribute Attribute key. - * @param value Value to increment the attribute by. The value must be a number. + * @param value Value to decrement the attribute by. The value must be a number. * @param min Minimum value for the attribute. If the current value is lesser than this value, an exception will be thrown. * @return [io.appwrite.models.Document<T>] */ - @Deprecated( - message = "This API has been deprecated since 1.8.0. Please use `Tables.decrementRowColumn` instead.", - replaceWith = ReplaceWith("io.appwrite.services.Tables.decrementRowColumn"), - since = "1.8.0" - ) @JvmOverloads @Throws(AppwriteException::class) suspend fun decrementDocumentAttribute( @@ -2387,11 +2162,6 @@ class Databases(client: Client) : Service(client) { * @param max Maximum value for the attribute. If the current value is greater than this value, an error will be thrown. * @return [io.appwrite.models.Document<T>] */ - @Deprecated( - message = "This API has been deprecated since 1.8.0. Please use `Tables.incrementRowColumn` instead.", - replaceWith = ReplaceWith("io.appwrite.services.Tables.incrementRowColumn"), - since = "1.8.0" - ) @JvmOverloads @Throws(AppwriteException::class) suspend fun <T> incrementDocumentAttribute( @@ -2440,11 +2210,6 @@ class Databases(client: Client) : Service(client) { * @param max Maximum value for the attribute. If the current value is greater than this value, an error will be thrown. * @return [io.appwrite.models.Document<T>] */ - @Deprecated( - message = "This API has been deprecated since 1.8.0. Please use `Tables.incrementRowColumn` instead.", - replaceWith = ReplaceWith("io.appwrite.services.Tables.incrementRowColumn"), - since = "1.8.0" - ) @JvmOverloads @Throws(AppwriteException::class) suspend fun incrementDocumentAttribute( @@ -2472,11 +2237,6 @@ class Databases(client: Client) : Service(client) { * @param queries Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https://appwrite.io/docs/queries). Maximum of 100 queries are allowed, each 4096 characters long. You may filter on the following attributes: key, type, status, attributes, error * @return [io.appwrite.models.IndexList] */ - @Deprecated( - message = "This API has been deprecated since 1.8.0. Please use `Tables.listIndexes` instead.", - replaceWith = ReplaceWith("io.appwrite.services.Tables.listIndexes"), - since = "1.8.0" - ) @JvmOverloads @Throws(AppwriteException::class) suspend fun listIndexes( @@ -2518,11 +2278,6 @@ class Databases(client: Client) : Service(client) { * @param lengths Length of index. Maximum of 100 * @return [io.appwrite.models.Index] */ - @Deprecated( - message = "This API has been deprecated since 1.8.0. Please use `Tables.createIndex` instead.", - replaceWith = ReplaceWith("io.appwrite.services.Tables.createIndex"), - since = "1.8.0" - ) @JvmOverloads @Throws(AppwriteException::class) suspend fun createIndex( @@ -2569,11 +2324,6 @@ class Databases(client: Client) : Service(client) { * @param key Index Key. * @return [io.appwrite.models.Index] */ - @Deprecated( - message = "This API has been deprecated since 1.8.0. Please use `Tables.getIndex` instead.", - replaceWith = ReplaceWith("io.appwrite.services.Tables.getIndex"), - since = "1.8.0" - ) @Throws(AppwriteException::class) suspend fun getIndex( databaseId: String, @@ -2610,11 +2360,6 @@ class Databases(client: Client) : Service(client) { * @param key Index Key. * @return [Any] */ - @Deprecated( - message = "This API has been deprecated since 1.8.0. Please use `Tables.deleteIndex` instead.", - replaceWith = ReplaceWith("io.appwrite.services.Tables.deleteIndex"), - since = "1.8.0" - ) @Throws(AppwriteException::class) suspend fun deleteIndex( databaseId: String, diff --git a/src/main/kotlin/io/appwrite/services/Tables.kt b/src/main/kotlin/io/appwrite/services/Tables.kt deleted file mode 100644 index 027b003..0000000 --- a/src/main/kotlin/io/appwrite/services/Tables.kt +++ /dev/null @@ -1,2201 +0,0 @@ -package io.appwrite.services - -import io.appwrite.Client -import io.appwrite.models.* -import io.appwrite.enums.* -import io.appwrite.exceptions.AppwriteException -import io.appwrite.extensions.classOf -import okhttp3.Cookie -import java.io.File - -/** - * The Tables service allows you to create structured tables of rows, query and filter lists of rows -**/ -class Tables(client: Client) : Service(client) { - - /** - * Get a list of all tables that belong to the provided databaseId. You can use the search parameter to filter your results. - * - * @param databaseId Database ID. - * @param queries Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https://appwrite.io/docs/queries). Maximum of 100 queries are allowed, each 4096 characters long. You may filter on the following attributes: name, enabled, rowSecurity - * @param search Search term to filter your list results. Max length: 256 chars. - * @return [io.appwrite.models.TableList] - */ - @JvmOverloads - @Throws(AppwriteException::class) - suspend fun list( - databaseId: String, - queries: List<String>? = null, - search: String? = null, - ): io.appwrite.models.TableList { - val apiPath = "/databases/{databaseId}/tables" - .replace("{databaseId}", databaseId) - - val apiParams = mutableMapOf<String, Any?>( - "queries" to queries, - "search" to search, - ) - val apiHeaders = mutableMapOf<String, String>( - ) - val converter: (Any) -> io.appwrite.models.TableList = { - io.appwrite.models.TableList.from(map = it as Map<String, Any>) - } - return client.call( - "GET", - apiPath, - apiHeaders, - apiParams, - responseType = io.appwrite.models.TableList::class.java, - converter, - ) - } - - /** - * Create a new Table. Before using this route, you should create a new database resource using either a [server integration](https://appwrite.io/docs/server/databases#databasesCreateTable) API or directly from your database console. - * - * @param databaseId Database ID. - * @param tableId 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. - * @param name Table name. Max length: 128 chars. - * @param permissions An array of permissions strings. By default, no user is granted with any permissions. [Learn more about permissions](https://appwrite.io/docs/permissions). - * @param rowSecurity Enables configuring permissions for individual rows. A user needs one of row or table level permissions to access a row. [Learn more about permissions](https://appwrite.io/docs/permissions). - * @param enabled Is table enabled? When set to 'disabled', users cannot access the table but Server SDKs with and API key can still read and write to the table. No data is lost when this is toggled. - * @return [io.appwrite.models.Table] - */ - @JvmOverloads - @Throws(AppwriteException::class) - suspend fun create( - databaseId: String, - tableId: String, - name: String, - permissions: List<String>? = null, - rowSecurity: Boolean? = null, - enabled: Boolean? = null, - ): io.appwrite.models.Table { - val apiPath = "/databases/{databaseId}/tables" - .replace("{databaseId}", databaseId) - - val apiParams = mutableMapOf<String, Any?>( - "tableId" to tableId, - "name" to name, - "permissions" to permissions, - "rowSecurity" to rowSecurity, - "enabled" to enabled, - ) - val apiHeaders = mutableMapOf<String, String>( - "content-type" to "application/json", - ) - val converter: (Any) -> io.appwrite.models.Table = { - io.appwrite.models.Table.from(map = it as Map<String, Any>) - } - return client.call( - "POST", - apiPath, - apiHeaders, - apiParams, - responseType = io.appwrite.models.Table::class.java, - converter, - ) - } - - /** - * Get a table by its unique ID. This endpoint response returns a JSON object with the table metadata. - * - * @param databaseId Database ID. - * @param tableId Table ID. - * @return [io.appwrite.models.Table] - */ - @Throws(AppwriteException::class) - suspend fun get( - databaseId: String, - tableId: String, - ): io.appwrite.models.Table { - val apiPath = "/databases/{databaseId}/tables/{tableId}" - .replace("{databaseId}", databaseId) - .replace("{tableId}", tableId) - - val apiParams = mutableMapOf<String, Any?>( - ) - val apiHeaders = mutableMapOf<String, String>( - ) - val converter: (Any) -> io.appwrite.models.Table = { - io.appwrite.models.Table.from(map = it as Map<String, Any>) - } - return client.call( - "GET", - apiPath, - apiHeaders, - apiParams, - responseType = io.appwrite.models.Table::class.java, - converter, - ) - } - - /** - * Update a table by its unique ID. - * - * @param databaseId Database ID. - * @param tableId Table ID. - * @param name Table name. Max length: 128 chars. - * @param permissions An array of permission strings. By default, the current permissions are inherited. [Learn more about permissions](https://appwrite.io/docs/permissions). - * @param rowSecurity Enables configuring permissions for individual rows. A user needs one of row or table level permissions to access a document. [Learn more about permissions](https://appwrite.io/docs/permissions). - * @param enabled Is table enabled? When set to 'disabled', users cannot access the table but Server SDKs with and API key can still read and write to the table. No data is lost when this is toggled. - * @return [io.appwrite.models.Table] - */ - @JvmOverloads - @Throws(AppwriteException::class) - suspend fun update( - databaseId: String, - tableId: String, - name: String, - permissions: List<String>? = null, - rowSecurity: Boolean? = null, - enabled: Boolean? = null, - ): io.appwrite.models.Table { - val apiPath = "/databases/{databaseId}/tables/{tableId}" - .replace("{databaseId}", databaseId) - .replace("{tableId}", tableId) - - val apiParams = mutableMapOf<String, Any?>( - "name" to name, - "permissions" to permissions, - "rowSecurity" to rowSecurity, - "enabled" to enabled, - ) - val apiHeaders = mutableMapOf<String, String>( - "content-type" to "application/json", - ) - val converter: (Any) -> io.appwrite.models.Table = { - io.appwrite.models.Table.from(map = it as Map<String, Any>) - } - return client.call( - "PUT", - apiPath, - apiHeaders, - apiParams, - responseType = io.appwrite.models.Table::class.java, - converter, - ) - } - - /** - * Delete a table by its unique ID. Only users with write permissions have access to delete this resource. - * - * @param databaseId Database ID. - * @param tableId Table ID. - * @return [Any] - */ - @Throws(AppwriteException::class) - suspend fun delete( - databaseId: String, - tableId: String, - ): Any { - val apiPath = "/databases/{databaseId}/tables/{tableId}" - .replace("{databaseId}", databaseId) - .replace("{tableId}", tableId) - - val apiParams = mutableMapOf<String, Any?>( - ) - val apiHeaders = mutableMapOf<String, String>( - "content-type" to "application/json", - ) - return client.call( - "DELETE", - apiPath, - apiHeaders, - apiParams, - responseType = Any::class.java, - ) - } - - /** - * List attributes in the collection. - * - * @param databaseId Database ID. - * @param tableId Table ID. - * @param queries Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https://appwrite.io/docs/queries). Maximum of 100 queries are allowed, each 4096 characters long. You may filter on the following attributes: key, type, size, required, array, status, error - * @return [io.appwrite.models.ColumnList] - */ - @JvmOverloads - @Throws(AppwriteException::class) - suspend fun listColumns( - databaseId: String, - tableId: String, - queries: List<String>? = null, - ): io.appwrite.models.ColumnList { - val apiPath = "/databases/{databaseId}/tables/{tableId}/columns" - .replace("{databaseId}", databaseId) - .replace("{tableId}", tableId) - - val apiParams = mutableMapOf<String, Any?>( - "queries" to queries, - ) - val apiHeaders = mutableMapOf<String, String>( - ) - val converter: (Any) -> io.appwrite.models.ColumnList = { - io.appwrite.models.ColumnList.from(map = it as Map<String, Any>) - } - return client.call( - "GET", - apiPath, - apiHeaders, - apiParams, - responseType = io.appwrite.models.ColumnList::class.java, - converter, - ) - } - - /** - * Create a boolean column. - * - * @param databaseId Database ID. - * @param tableId Table ID. You can create a new table using the Database service [server integration](https://appwrite.io/docs/server/tables#tablesCreate). - * @param key Column Key. - * @param required Is column required? - * @param default Default value for column when not provided. Cannot be set when column is required. - * @param array Is column an array? - * @return [io.appwrite.models.ColumnBoolean] - */ - @JvmOverloads - @Throws(AppwriteException::class) - suspend fun createBooleanColumn( - databaseId: String, - tableId: String, - key: String, - required: Boolean, - default: Boolean? = null, - array: Boolean? = null, - ): io.appwrite.models.ColumnBoolean { - val apiPath = "/databases/{databaseId}/tables/{tableId}/columns/boolean" - .replace("{databaseId}", databaseId) - .replace("{tableId}", tableId) - - val apiParams = mutableMapOf<String, Any?>( - "key" to key, - "required" to required, - "default" to default, - "array" to array, - ) - val apiHeaders = mutableMapOf<String, String>( - "content-type" to "application/json", - ) - val converter: (Any) -> io.appwrite.models.ColumnBoolean = { - io.appwrite.models.ColumnBoolean.from(map = it as Map<String, Any>) - } - return client.call( - "POST", - apiPath, - apiHeaders, - apiParams, - responseType = io.appwrite.models.ColumnBoolean::class.java, - converter, - ) - } - - /** - * Update a boolean column. Changing the `default` value will not update already existing rows. - * - * @param databaseId Database ID. - * @param tableId Table ID. You can create a new table using the Database service [server integration](https://appwrite.io/docs/server/tables#tablesCreate). - * @param key Column Key. - * @param required Is column required? - * @param default Default value for column when not provided. Cannot be set when column is required. - * @param newKey New Column Key. - * @return [io.appwrite.models.ColumnBoolean] - */ - @JvmOverloads - @Throws(AppwriteException::class) - suspend fun updateBooleanColumn( - databaseId: String, - tableId: String, - key: String, - required: Boolean, - default: Boolean? = null, - newKey: String? = null, - ): io.appwrite.models.ColumnBoolean { - val apiPath = "/databases/{databaseId}/tables/{tableId}/columns/boolean/{key}" - .replace("{databaseId}", databaseId) - .replace("{tableId}", tableId) - .replace("{key}", key) - - val apiParams = mutableMapOf<String, Any?>( - "required" to required, - "default" to default, - "newKey" to newKey, - ) - val apiHeaders = mutableMapOf<String, String>( - "content-type" to "application/json", - ) - val converter: (Any) -> io.appwrite.models.ColumnBoolean = { - io.appwrite.models.ColumnBoolean.from(map = it as Map<String, Any>) - } - return client.call( - "PATCH", - apiPath, - apiHeaders, - apiParams, - responseType = io.appwrite.models.ColumnBoolean::class.java, - converter, - ) - } - - /** - * Create a date time column according to the ISO 8601 standard. - * - * @param databaseId Database ID. - * @param tableId Table ID. - * @param key Column Key. - * @param required Is column required? - * @param default Default value for the column in [ISO 8601](https://www.iso.org/iso-8601-date-and-time-format.html) format. Cannot be set when column is required. - * @param array Is column an array? - * @return [io.appwrite.models.ColumnDatetime] - */ - @JvmOverloads - @Throws(AppwriteException::class) - suspend fun createDatetimeColumn( - databaseId: String, - tableId: String, - key: String, - required: Boolean, - default: String? = null, - array: Boolean? = null, - ): io.appwrite.models.ColumnDatetime { - val apiPath = "/databases/{databaseId}/tables/{tableId}/columns/datetime" - .replace("{databaseId}", databaseId) - .replace("{tableId}", tableId) - - val apiParams = mutableMapOf<String, Any?>( - "key" to key, - "required" to required, - "default" to default, - "array" to array, - ) - val apiHeaders = mutableMapOf<String, String>( - "content-type" to "application/json", - ) - val converter: (Any) -> io.appwrite.models.ColumnDatetime = { - io.appwrite.models.ColumnDatetime.from(map = it as Map<String, Any>) - } - return client.call( - "POST", - apiPath, - apiHeaders, - apiParams, - responseType = io.appwrite.models.ColumnDatetime::class.java, - converter, - ) - } - - /** - * Update a date time column. Changing the `default` value will not update already existing rows. - * - * @param databaseId Database ID. - * @param tableId Table ID. - * @param key Column Key. - * @param required Is column required? - * @param default Default value for column when not provided. Cannot be set when column is required. - * @param newKey New Column Key. - * @return [io.appwrite.models.ColumnDatetime] - */ - @JvmOverloads - @Throws(AppwriteException::class) - suspend fun updateDatetimeColumn( - databaseId: String, - tableId: String, - key: String, - required: Boolean, - default: String? = null, - newKey: String? = null, - ): io.appwrite.models.ColumnDatetime { - val apiPath = "/databases/{databaseId}/tables/{tableId}/columns/datetime/{key}" - .replace("{databaseId}", databaseId) - .replace("{tableId}", tableId) - .replace("{key}", key) - - val apiParams = mutableMapOf<String, Any?>( - "required" to required, - "default" to default, - "newKey" to newKey, - ) - val apiHeaders = mutableMapOf<String, String>( - "content-type" to "application/json", - ) - val converter: (Any) -> io.appwrite.models.ColumnDatetime = { - io.appwrite.models.ColumnDatetime.from(map = it as Map<String, Any>) - } - return client.call( - "PATCH", - apiPath, - apiHeaders, - apiParams, - responseType = io.appwrite.models.ColumnDatetime::class.java, - converter, - ) - } - - /** - * Create an email column. - * - * @param databaseId Database ID. - * @param tableId Table ID. - * @param key Column Key. - * @param required Is column required? - * @param default Default value for column when not provided. Cannot be set when column is required. - * @param array Is column an array? - * @return [io.appwrite.models.ColumnEmail] - */ - @JvmOverloads - @Throws(AppwriteException::class) - suspend fun createEmailColumn( - databaseId: String, - tableId: String, - key: String, - required: Boolean, - default: String? = null, - array: Boolean? = null, - ): io.appwrite.models.ColumnEmail { - val apiPath = "/databases/{databaseId}/tables/{tableId}/columns/email" - .replace("{databaseId}", databaseId) - .replace("{tableId}", tableId) - - val apiParams = mutableMapOf<String, Any?>( - "key" to key, - "required" to required, - "default" to default, - "array" to array, - ) - val apiHeaders = mutableMapOf<String, String>( - "content-type" to "application/json", - ) - val converter: (Any) -> io.appwrite.models.ColumnEmail = { - io.appwrite.models.ColumnEmail.from(map = it as Map<String, Any>) - } - return client.call( - "POST", - apiPath, - apiHeaders, - apiParams, - responseType = io.appwrite.models.ColumnEmail::class.java, - converter, - ) - } - - /** - * Update an email column. Changing the `default` value will not update already existing rows. - * - * @param databaseId Database ID. - * @param tableId Table ID. - * @param key Column Key. - * @param required Is column required? - * @param default Default value for column when not provided. Cannot be set when column is required. - * @param newKey New Column Key. - * @return [io.appwrite.models.ColumnEmail] - */ - @JvmOverloads - @Throws(AppwriteException::class) - suspend fun updateEmailColumn( - databaseId: String, - tableId: String, - key: String, - required: Boolean, - default: String? = null, - newKey: String? = null, - ): io.appwrite.models.ColumnEmail { - val apiPath = "/databases/{databaseId}/tables/{tableId}/columns/email/{key}" - .replace("{databaseId}", databaseId) - .replace("{tableId}", tableId) - .replace("{key}", key) - - val apiParams = mutableMapOf<String, Any?>( - "required" to required, - "default" to default, - "newKey" to newKey, - ) - val apiHeaders = mutableMapOf<String, String>( - "content-type" to "application/json", - ) - val converter: (Any) -> io.appwrite.models.ColumnEmail = { - io.appwrite.models.ColumnEmail.from(map = it as Map<String, Any>) - } - return client.call( - "PATCH", - apiPath, - apiHeaders, - apiParams, - responseType = io.appwrite.models.ColumnEmail::class.java, - converter, - ) - } - - /** - * Create an enumeration column. The `elements` param acts as a white-list of accepted values for this column. - * - * @param databaseId Database ID. - * @param tableId Table ID. - * @param key Column Key. - * @param elements Array of enum values. - * @param required Is column required? - * @param default Default value for column when not provided. Cannot be set when column is required. - * @param array Is column an array? - * @return [io.appwrite.models.ColumnEnum] - */ - @JvmOverloads - @Throws(AppwriteException::class) - suspend fun createEnumColumn( - databaseId: String, - tableId: String, - key: String, - elements: List<String>, - required: Boolean, - default: String? = null, - array: Boolean? = null, - ): io.appwrite.models.ColumnEnum { - val apiPath = "/databases/{databaseId}/tables/{tableId}/columns/enum" - .replace("{databaseId}", databaseId) - .replace("{tableId}", tableId) - - val apiParams = mutableMapOf<String, Any?>( - "key" to key, - "elements" to elements, - "required" to required, - "default" to default, - "array" to array, - ) - val apiHeaders = mutableMapOf<String, String>( - "content-type" to "application/json", - ) - val converter: (Any) -> io.appwrite.models.ColumnEnum = { - io.appwrite.models.ColumnEnum.from(map = it as Map<String, Any>) - } - return client.call( - "POST", - apiPath, - apiHeaders, - apiParams, - responseType = io.appwrite.models.ColumnEnum::class.java, - converter, - ) - } - - /** - * Update an enum column. Changing the `default` value will not update already existing rows. - * - * @param databaseId Database ID. - * @param tableId Table ID. - * @param key Column Key. - * @param elements Updated list of enum values. - * @param required Is column required? - * @param default Default value for column when not provided. Cannot be set when column is required. - * @param newKey New Column Key. - * @return [io.appwrite.models.ColumnEnum] - */ - @JvmOverloads - @Throws(AppwriteException::class) - suspend fun updateEnumColumn( - databaseId: String, - tableId: String, - key: String, - elements: List<String>, - required: Boolean, - default: String? = null, - newKey: String? = null, - ): io.appwrite.models.ColumnEnum { - val apiPath = "/databases/{databaseId}/tables/{tableId}/columns/enum/{key}" - .replace("{databaseId}", databaseId) - .replace("{tableId}", tableId) - .replace("{key}", key) - - val apiParams = mutableMapOf<String, Any?>( - "elements" to elements, - "required" to required, - "default" to default, - "newKey" to newKey, - ) - val apiHeaders = mutableMapOf<String, String>( - "content-type" to "application/json", - ) - val converter: (Any) -> io.appwrite.models.ColumnEnum = { - io.appwrite.models.ColumnEnum.from(map = it as Map<String, Any>) - } - return client.call( - "PATCH", - apiPath, - apiHeaders, - apiParams, - responseType = io.appwrite.models.ColumnEnum::class.java, - converter, - ) - } - - /** - * Create a float column. Optionally, minimum and maximum values can be provided. - * - * @param databaseId Database ID. - * @param tableId Table ID. - * @param key Column Key. - * @param required Is column required? - * @param min Minimum value - * @param max Maximum value - * @param default Default value. Cannot be set when required. - * @param array Is column an array? - * @return [io.appwrite.models.ColumnFloat] - */ - @JvmOverloads - @Throws(AppwriteException::class) - suspend fun createFloatColumn( - databaseId: String, - tableId: String, - key: String, - required: Boolean, - min: Double? = null, - max: Double? = null, - default: Double? = null, - array: Boolean? = null, - ): io.appwrite.models.ColumnFloat { - val apiPath = "/databases/{databaseId}/tables/{tableId}/columns/float" - .replace("{databaseId}", databaseId) - .replace("{tableId}", tableId) - - val apiParams = mutableMapOf<String, Any?>( - "key" to key, - "required" to required, - "min" to min, - "max" to max, - "default" to default, - "array" to array, - ) - val apiHeaders = mutableMapOf<String, String>( - "content-type" to "application/json", - ) - val converter: (Any) -> io.appwrite.models.ColumnFloat = { - io.appwrite.models.ColumnFloat.from(map = it as Map<String, Any>) - } - return client.call( - "POST", - apiPath, - apiHeaders, - apiParams, - responseType = io.appwrite.models.ColumnFloat::class.java, - converter, - ) - } - - /** - * Update a float column. Changing the `default` value will not update already existing rows. - * - * @param databaseId Database ID. - * @param tableId Table ID. - * @param key Column Key. - * @param required Is column required? - * @param default Default value. Cannot be set when required. - * @param min Minimum value - * @param max Maximum value - * @param newKey New Column Key. - * @return [io.appwrite.models.ColumnFloat] - */ - @JvmOverloads - @Throws(AppwriteException::class) - suspend fun updateFloatColumn( - databaseId: String, - tableId: String, - key: String, - required: Boolean, - default: Double? = null, - min: Double? = null, - max: Double? = null, - newKey: String? = null, - ): io.appwrite.models.ColumnFloat { - val apiPath = "/databases/{databaseId}/tables/{tableId}/columns/float/{key}" - .replace("{databaseId}", databaseId) - .replace("{tableId}", tableId) - .replace("{key}", key) - - val apiParams = mutableMapOf<String, Any?>( - "required" to required, - "min" to min, - "max" to max, - "default" to default, - "newKey" to newKey, - ) - val apiHeaders = mutableMapOf<String, String>( - "content-type" to "application/json", - ) - val converter: (Any) -> io.appwrite.models.ColumnFloat = { - io.appwrite.models.ColumnFloat.from(map = it as Map<String, Any>) - } - return client.call( - "PATCH", - apiPath, - apiHeaders, - apiParams, - responseType = io.appwrite.models.ColumnFloat::class.java, - converter, - ) - } - - /** - * Create an integer column. Optionally, minimum and maximum values can be provided. - * - * @param databaseId Database ID. - * @param tableId Table ID. - * @param key Column Key. - * @param required Is column required? - * @param min Minimum value - * @param max Maximum value - * @param default Default value. Cannot be set when column is required. - * @param array Is column an array? - * @return [io.appwrite.models.ColumnInteger] - */ - @JvmOverloads - @Throws(AppwriteException::class) - suspend fun createIntegerColumn( - databaseId: String, - tableId: String, - key: String, - required: Boolean, - min: Long? = null, - max: Long? = null, - default: Long? = null, - array: Boolean? = null, - ): io.appwrite.models.ColumnInteger { - val apiPath = "/databases/{databaseId}/tables/{tableId}/columns/integer" - .replace("{databaseId}", databaseId) - .replace("{tableId}", tableId) - - val apiParams = mutableMapOf<String, Any?>( - "key" to key, - "required" to required, - "min" to min, - "max" to max, - "default" to default, - "array" to array, - ) - val apiHeaders = mutableMapOf<String, String>( - "content-type" to "application/json", - ) - val converter: (Any) -> io.appwrite.models.ColumnInteger = { - io.appwrite.models.ColumnInteger.from(map = it as Map<String, Any>) - } - return client.call( - "POST", - apiPath, - apiHeaders, - apiParams, - responseType = io.appwrite.models.ColumnInteger::class.java, - converter, - ) - } - - /** - * Update an integer column. Changing the `default` value will not update already existing rows. - * - * @param databaseId Database ID. - * @param tableId Table ID. - * @param key Column Key. - * @param required Is column required? - * @param default Default value. Cannot be set when column is required. - * @param min Minimum value - * @param max Maximum value - * @param newKey New Column Key. - * @return [io.appwrite.models.ColumnInteger] - */ - @JvmOverloads - @Throws(AppwriteException::class) - suspend fun updateIntegerColumn( - databaseId: String, - tableId: String, - key: String, - required: Boolean, - default: Long? = null, - min: Long? = null, - max: Long? = null, - newKey: String? = null, - ): io.appwrite.models.ColumnInteger { - val apiPath = "/databases/{databaseId}/tables/{tableId}/columns/integer/{key}" - .replace("{databaseId}", databaseId) - .replace("{tableId}", tableId) - .replace("{key}", key) - - val apiParams = mutableMapOf<String, Any?>( - "required" to required, - "min" to min, - "max" to max, - "default" to default, - "newKey" to newKey, - ) - val apiHeaders = mutableMapOf<String, String>( - "content-type" to "application/json", - ) - val converter: (Any) -> io.appwrite.models.ColumnInteger = { - io.appwrite.models.ColumnInteger.from(map = it as Map<String, Any>) - } - return client.call( - "PATCH", - apiPath, - apiHeaders, - apiParams, - responseType = io.appwrite.models.ColumnInteger::class.java, - converter, - ) - } - - /** - * Create IP address column. - * - * @param databaseId Database ID. - * @param tableId Table ID. - * @param key Column Key. - * @param required Is column required? - * @param default Default value. Cannot be set when column is required. - * @param array Is column an array? - * @return [io.appwrite.models.ColumnIp] - */ - @JvmOverloads - @Throws(AppwriteException::class) - suspend fun createIpColumn( - databaseId: String, - tableId: String, - key: String, - required: Boolean, - default: String? = null, - array: Boolean? = null, - ): io.appwrite.models.ColumnIp { - val apiPath = "/databases/{databaseId}/tables/{tableId}/columns/ip" - .replace("{databaseId}", databaseId) - .replace("{tableId}", tableId) - - val apiParams = mutableMapOf<String, Any?>( - "key" to key, - "required" to required, - "default" to default, - "array" to array, - ) - val apiHeaders = mutableMapOf<String, String>( - "content-type" to "application/json", - ) - val converter: (Any) -> io.appwrite.models.ColumnIp = { - io.appwrite.models.ColumnIp.from(map = it as Map<String, Any>) - } - return client.call( - "POST", - apiPath, - apiHeaders, - apiParams, - responseType = io.appwrite.models.ColumnIp::class.java, - converter, - ) - } - - /** - * Update an ip column. Changing the `default` value will not update already existing rows. - * - * @param databaseId Database ID. - * @param tableId Table ID. - * @param key Column Key. - * @param required Is column required? - * @param default Default value. Cannot be set when column is required. - * @param newKey New Column Key. - * @return [io.appwrite.models.ColumnIp] - */ - @JvmOverloads - @Throws(AppwriteException::class) - suspend fun updateIpColumn( - databaseId: String, - tableId: String, - key: String, - required: Boolean, - default: String? = null, - newKey: String? = null, - ): io.appwrite.models.ColumnIp { - val apiPath = "/databases/{databaseId}/tables/{tableId}/columns/ip/{key}" - .replace("{databaseId}", databaseId) - .replace("{tableId}", tableId) - .replace("{key}", key) - - val apiParams = mutableMapOf<String, Any?>( - "required" to required, - "default" to default, - "newKey" to newKey, - ) - val apiHeaders = mutableMapOf<String, String>( - "content-type" to "application/json", - ) - val converter: (Any) -> io.appwrite.models.ColumnIp = { - io.appwrite.models.ColumnIp.from(map = it as Map<String, Any>) - } - return client.call( - "PATCH", - apiPath, - apiHeaders, - apiParams, - responseType = io.appwrite.models.ColumnIp::class.java, - converter, - ) - } - - /** - * Create relationship column. [Learn more about relationship columns](https://appwrite.io/docs/databases-relationships#relationship-columns). - * - * @param databaseId Database ID. - * @param tableId Table ID. - * @param relatedTableId Related Table ID. - * @param type Relation type - * @param twoWay Is Two Way? - * @param key Column Key. - * @param twoWayKey Two Way Column Key. - * @param onDelete Constraints option - * @return [io.appwrite.models.ColumnRelationship] - */ - @JvmOverloads - @Throws(AppwriteException::class) - suspend fun createRelationshipColumn( - databaseId: String, - tableId: String, - relatedTableId: String, - type: io.appwrite.enums.RelationshipType, - twoWay: Boolean? = null, - key: String? = null, - twoWayKey: String? = null, - onDelete: io.appwrite.enums.RelationMutate? = null, - ): io.appwrite.models.ColumnRelationship { - val apiPath = "/databases/{databaseId}/tables/{tableId}/columns/relationship" - .replace("{databaseId}", databaseId) - .replace("{tableId}", tableId) - - val apiParams = mutableMapOf<String, Any?>( - "relatedTableId" to relatedTableId, - "type" to type, - "twoWay" to twoWay, - "key" to key, - "twoWayKey" to twoWayKey, - "onDelete" to onDelete, - ) - val apiHeaders = mutableMapOf<String, String>( - "content-type" to "application/json", - ) - val converter: (Any) -> io.appwrite.models.ColumnRelationship = { - io.appwrite.models.ColumnRelationship.from(map = it as Map<String, Any>) - } - return client.call( - "POST", - apiPath, - apiHeaders, - apiParams, - responseType = io.appwrite.models.ColumnRelationship::class.java, - converter, - ) - } - - /** - * Create a string column. - * - * @param databaseId Database ID. - * @param tableId Table ID. You can create a new table using the Database service [server integration](https://appwrite.io/docs/server/tables#tablesCreate). - * @param key Column Key. - * @param size Attribute size for text attributes, in number of characters. - * @param required Is column required? - * @param default Default value for column when not provided. Cannot be set when column is required. - * @param array Is column an array? - * @param encrypt Toggle encryption for the column. Encryption enhances security by not storing any plain text values in the database. However, encrypted columns cannot be queried. - * @return [io.appwrite.models.ColumnString] - */ - @JvmOverloads - @Throws(AppwriteException::class) - suspend fun createStringColumn( - databaseId: String, - tableId: String, - key: String, - size: Long, - required: Boolean, - default: String? = null, - array: Boolean? = null, - encrypt: Boolean? = null, - ): io.appwrite.models.ColumnString { - val apiPath = "/databases/{databaseId}/tables/{tableId}/columns/string" - .replace("{databaseId}", databaseId) - .replace("{tableId}", tableId) - - val apiParams = mutableMapOf<String, Any?>( - "key" to key, - "size" to size, - "required" to required, - "default" to default, - "array" to array, - "encrypt" to encrypt, - ) - val apiHeaders = mutableMapOf<String, String>( - "content-type" to "application/json", - ) - val converter: (Any) -> io.appwrite.models.ColumnString = { - io.appwrite.models.ColumnString.from(map = it as Map<String, Any>) - } - return client.call( - "POST", - apiPath, - apiHeaders, - apiParams, - responseType = io.appwrite.models.ColumnString::class.java, - converter, - ) - } - - /** - * Update a string column. Changing the `default` value will not update already existing rows. - * - * @param databaseId Database ID. - * @param tableId Table ID. You can create a new table using the Database service [server integration](https://appwrite.io/docs/server/tables#tablesCreate). - * @param key Column Key. - * @param required Is column required? - * @param default Default value for column when not provided. Cannot be set when column is required. - * @param size Maximum size of the string column. - * @param newKey New Column Key. - * @return [io.appwrite.models.ColumnString] - */ - @JvmOverloads - @Throws(AppwriteException::class) - suspend fun updateStringColumn( - databaseId: String, - tableId: String, - key: String, - required: Boolean, - default: String? = null, - size: Long? = null, - newKey: String? = null, - ): io.appwrite.models.ColumnString { - val apiPath = "/databases/{databaseId}/tables/{tableId}/columns/string/{key}" - .replace("{databaseId}", databaseId) - .replace("{tableId}", tableId) - .replace("{key}", key) - - val apiParams = mutableMapOf<String, Any?>( - "required" to required, - "default" to default, - "size" to size, - "newKey" to newKey, - ) - val apiHeaders = mutableMapOf<String, String>( - "content-type" to "application/json", - ) - val converter: (Any) -> io.appwrite.models.ColumnString = { - io.appwrite.models.ColumnString.from(map = it as Map<String, Any>) - } - return client.call( - "PATCH", - apiPath, - apiHeaders, - apiParams, - responseType = io.appwrite.models.ColumnString::class.java, - converter, - ) - } - - /** - * Create a URL column. - * - * @param databaseId Database ID. - * @param tableId Table ID. - * @param key Column Key. - * @param required Is column required? - * @param default Default value for column when not provided. Cannot be set when column is required. - * @param array Is column an array? - * @return [io.appwrite.models.ColumnUrl] - */ - @JvmOverloads - @Throws(AppwriteException::class) - suspend fun createUrlColumn( - databaseId: String, - tableId: String, - key: String, - required: Boolean, - default: String? = null, - array: Boolean? = null, - ): io.appwrite.models.ColumnUrl { - val apiPath = "/databases/{databaseId}/tables/{tableId}/columns/url" - .replace("{databaseId}", databaseId) - .replace("{tableId}", tableId) - - val apiParams = mutableMapOf<String, Any?>( - "key" to key, - "required" to required, - "default" to default, - "array" to array, - ) - val apiHeaders = mutableMapOf<String, String>( - "content-type" to "application/json", - ) - val converter: (Any) -> io.appwrite.models.ColumnUrl = { - io.appwrite.models.ColumnUrl.from(map = it as Map<String, Any>) - } - return client.call( - "POST", - apiPath, - apiHeaders, - apiParams, - responseType = io.appwrite.models.ColumnUrl::class.java, - converter, - ) - } - - /** - * Update an url column. Changing the `default` value will not update already existing rows. - * - * @param databaseId Database ID. - * @param tableId Table ID. - * @param key Column Key. - * @param required Is column required? - * @param default Default value for column when not provided. Cannot be set when column is required. - * @param newKey New Column Key. - * @return [io.appwrite.models.ColumnUrl] - */ - @JvmOverloads - @Throws(AppwriteException::class) - suspend fun updateUrlColumn( - databaseId: String, - tableId: String, - key: String, - required: Boolean, - default: String? = null, - newKey: String? = null, - ): io.appwrite.models.ColumnUrl { - val apiPath = "/databases/{databaseId}/tables/{tableId}/columns/url/{key}" - .replace("{databaseId}", databaseId) - .replace("{tableId}", tableId) - .replace("{key}", key) - - val apiParams = mutableMapOf<String, Any?>( - "required" to required, - "default" to default, - "newKey" to newKey, - ) - val apiHeaders = mutableMapOf<String, String>( - "content-type" to "application/json", - ) - val converter: (Any) -> io.appwrite.models.ColumnUrl = { - io.appwrite.models.ColumnUrl.from(map = it as Map<String, Any>) - } - return client.call( - "PATCH", - apiPath, - apiHeaders, - apiParams, - responseType = io.appwrite.models.ColumnUrl::class.java, - converter, - ) - } - - /** - * Get column by ID. - * - * @param databaseId Database ID. - * @param tableId Table ID. - * @param key Column Key. - * @return [Any] - */ - @Throws(AppwriteException::class) - suspend fun getColumn( - databaseId: String, - tableId: String, - key: String, - ): Any { - val apiPath = "/databases/{databaseId}/tables/{tableId}/columns/{key}" - .replace("{databaseId}", databaseId) - .replace("{tableId}", tableId) - .replace("{key}", key) - - val apiParams = mutableMapOf<String, Any?>( - ) - val apiHeaders = mutableMapOf<String, String>( - ) - return client.call( - "GET", - apiPath, - apiHeaders, - apiParams, - responseType = Any::class.java, - ) - } - - /** - * Deletes a column. - * - * @param databaseId Database ID. - * @param tableId Table ID. - * @param key Column Key. - * @return [Any] - */ - @Throws(AppwriteException::class) - suspend fun deleteColumn( - databaseId: String, - tableId: String, - key: String, - ): Any { - val apiPath = "/databases/{databaseId}/tables/{tableId}/columns/{key}" - .replace("{databaseId}", databaseId) - .replace("{tableId}", tableId) - .replace("{key}", key) - - val apiParams = mutableMapOf<String, Any?>( - ) - val apiHeaders = mutableMapOf<String, String>( - "content-type" to "application/json", - ) - return client.call( - "DELETE", - apiPath, - apiHeaders, - apiParams, - responseType = Any::class.java, - ) - } - - /** - * Update relationship column. [Learn more about relationship columns](https://appwrite.io/docs/databases-relationships#relationship-columns). - * - * @param databaseId Database ID. - * @param tableId Table ID. - * @param key Column Key. - * @param onDelete Constraints option - * @param newKey New Column Key. - * @return [io.appwrite.models.ColumnRelationship] - */ - @JvmOverloads - @Throws(AppwriteException::class) - suspend fun updateRelationshipColumn( - databaseId: String, - tableId: String, - key: String, - onDelete: io.appwrite.enums.RelationMutate? = null, - newKey: String? = null, - ): io.appwrite.models.ColumnRelationship { - val apiPath = "/databases/{databaseId}/tables/{tableId}/columns/{key}/relationship" - .replace("{databaseId}", databaseId) - .replace("{tableId}", tableId) - .replace("{key}", key) - - val apiParams = mutableMapOf<String, Any?>( - "onDelete" to onDelete, - "newKey" to newKey, - ) - val apiHeaders = mutableMapOf<String, String>( - "content-type" to "application/json", - ) - val converter: (Any) -> io.appwrite.models.ColumnRelationship = { - io.appwrite.models.ColumnRelationship.from(map = it as Map<String, Any>) - } - return client.call( - "PATCH", - apiPath, - apiHeaders, - apiParams, - responseType = io.appwrite.models.ColumnRelationship::class.java, - converter, - ) - } - - /** - * List indexes in the collection. - * - * @param databaseId Database ID. - * @param tableId Table ID. You can create a new table using the Database service [server integration](https://appwrite.io/docs/server/tables#tablesCreate). - * @param queries Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https://appwrite.io/docs/queries). Maximum of 100 queries are allowed, each 4096 characters long. You may filter on the following attributes: key, type, status, attributes, error - * @return [io.appwrite.models.ColumnIndexList] - */ - @JvmOverloads - @Throws(AppwriteException::class) - suspend fun listIndexes( - databaseId: String, - tableId: String, - queries: List<String>? = null, - ): io.appwrite.models.ColumnIndexList { - val apiPath = "/databases/{databaseId}/tables/{tableId}/indexes" - .replace("{databaseId}", databaseId) - .replace("{tableId}", tableId) - - val apiParams = mutableMapOf<String, Any?>( - "queries" to queries, - ) - val apiHeaders = mutableMapOf<String, String>( - ) - val converter: (Any) -> io.appwrite.models.ColumnIndexList = { - io.appwrite.models.ColumnIndexList.from(map = it as Map<String, Any>) - } - return client.call( - "GET", - apiPath, - apiHeaders, - apiParams, - responseType = io.appwrite.models.ColumnIndexList::class.java, - converter, - ) - } - - /** - * Creates an index on the attributes listed. Your index should include all the attributes you will query in a single request.Attributes can be `key`, `fulltext`, and `unique`. - * - * @param databaseId Database ID. - * @param tableId Table ID. You can create a new table using the Database service [server integration](https://appwrite.io/docs/server/tables#tablesCreate). - * @param key Index Key. - * @param type Index type. - * @param columns Array of columns to index. Maximum of 100 columns are allowed, each 32 characters long. - * @param orders Array of index orders. Maximum of 100 orders are allowed. - * @param lengths Length of index. Maximum of 100 - * @return [io.appwrite.models.ColumnIndex] - */ - @JvmOverloads - @Throws(AppwriteException::class) - suspend fun createIndex( - databaseId: String, - tableId: String, - key: String, - type: io.appwrite.enums.IndexType, - columns: List<String>, - orders: List<String>? = null, - lengths: List<Long>? = null, - ): io.appwrite.models.ColumnIndex { - val apiPath = "/databases/{databaseId}/tables/{tableId}/indexes" - .replace("{databaseId}", databaseId) - .replace("{tableId}", tableId) - - val apiParams = mutableMapOf<String, Any?>( - "key" to key, - "type" to type, - "columns" to columns, - "orders" to orders, - "lengths" to lengths, - ) - val apiHeaders = mutableMapOf<String, String>( - "content-type" to "application/json", - ) - val converter: (Any) -> io.appwrite.models.ColumnIndex = { - io.appwrite.models.ColumnIndex.from(map = it as Map<String, Any>) - } - return client.call( - "POST", - apiPath, - apiHeaders, - apiParams, - responseType = io.appwrite.models.ColumnIndex::class.java, - converter, - ) - } - - /** - * Get index by ID. - * - * @param databaseId Database ID. - * @param tableId Table ID. You can create a new table using the Database service [server integration](https://appwrite.io/docs/server/tables#tablesCreate). - * @param key Index Key. - * @return [io.appwrite.models.ColumnIndex] - */ - @Throws(AppwriteException::class) - suspend fun getIndex( - databaseId: String, - tableId: String, - key: String, - ): io.appwrite.models.ColumnIndex { - val apiPath = "/databases/{databaseId}/tables/{tableId}/indexes/{key}" - .replace("{databaseId}", databaseId) - .replace("{tableId}", tableId) - .replace("{key}", key) - - val apiParams = mutableMapOf<String, Any?>( - ) - val apiHeaders = mutableMapOf<String, String>( - ) - val converter: (Any) -> io.appwrite.models.ColumnIndex = { - io.appwrite.models.ColumnIndex.from(map = it as Map<String, Any>) - } - return client.call( - "GET", - apiPath, - apiHeaders, - apiParams, - responseType = io.appwrite.models.ColumnIndex::class.java, - converter, - ) - } - - /** - * Delete an index. - * - * @param databaseId Database ID. - * @param tableId Table ID. You can create a new table using the Database service [server integration](https://appwrite.io/docs/server/tables#tablesCreate). - * @param key Index Key. - * @return [Any] - */ - @Throws(AppwriteException::class) - suspend fun deleteIndex( - databaseId: String, - tableId: String, - key: String, - ): Any { - val apiPath = "/databases/{databaseId}/tables/{tableId}/indexes/{key}" - .replace("{databaseId}", databaseId) - .replace("{tableId}", tableId) - .replace("{key}", key) - - val apiParams = mutableMapOf<String, Any?>( - ) - val apiHeaders = mutableMapOf<String, String>( - "content-type" to "application/json", - ) - return client.call( - "DELETE", - apiPath, - apiHeaders, - apiParams, - responseType = Any::class.java, - ) - } - - /** - * Get a list of all the user's rows in a given table. You can use the query params to filter your results. - * - * @param databaseId Database ID. - * @param tableId Table ID. You can create a new table using the Database service [server integration](https://appwrite.io/docs/server/tables#tablesCreate). - * @param queries 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. - * @return [io.appwrite.models.RowList<T>] - */ - @JvmOverloads - @Throws(AppwriteException::class) - suspend fun <T> listRows( - databaseId: String, - tableId: String, - queries: List<String>? = null, - nestedType: Class<T>, - ): io.appwrite.models.RowList<T> { - val apiPath = "/databases/{databaseId}/tables/{tableId}/rows" - .replace("{databaseId}", databaseId) - .replace("{tableId}", tableId) - - val apiParams = mutableMapOf<String, Any?>( - "queries" to queries, - ) - val apiHeaders = mutableMapOf<String, String>( - ) - val converter: (Any) -> io.appwrite.models.RowList<T> = { - io.appwrite.models.RowList.from(map = it as Map<String, Any>, nestedType) - } - return client.call( - "GET", - apiPath, - apiHeaders, - apiParams, - responseType = classOf(), - converter, - ) - } - - /** - * Get a list of all the user's rows in a given table. You can use the query params to filter your results. - * - * @param databaseId Database ID. - * @param tableId Table ID. You can create a new table using the Database service [server integration](https://appwrite.io/docs/server/tables#tablesCreate). - * @param queries 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. - * @return [io.appwrite.models.RowList<T>] - */ - @JvmOverloads - @Throws(AppwriteException::class) - suspend fun listRows( - databaseId: String, - tableId: String, - queries: List<String>? = null, - ): io.appwrite.models.RowList<Map<String, Any>> = listRows( - databaseId, - tableId, - queries, - nestedType = classOf(), - ) - - /** - * Create a new Row. Before using this route, you should create a new table resource using either a [server integration](https://appwrite.io/docs/server/databases#databasesCreateTable) API or directly from your database console. - * - * @param databaseId Database ID. - * @param tableId Table ID. You can create a new table using the Database service [server integration](https://appwrite.io/docs/server/tables#tablesCreate). Make sure to define columns before creating rows. - * @param rowId Row 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. - * @param data Row data as JSON object. - * @param permissions An array of permissions strings. By default, only the current user is granted all permissions. [Learn more about permissions](https://appwrite.io/docs/permissions). - * @return [io.appwrite.models.Row<T>] - */ - @JvmOverloads - @Throws(AppwriteException::class) - suspend fun <T> createRow( - databaseId: String, - tableId: String, - rowId: String, - data: Any, - permissions: List<String>? = null, - nestedType: Class<T>, - ): io.appwrite.models.Row<T> { - val apiPath = "/databases/{databaseId}/tables/{tableId}/rows" - .replace("{databaseId}", databaseId) - .replace("{tableId}", tableId) - - val apiParams = mutableMapOf<String, Any?>( - "rowId" to rowId, - "data" to data, - "permissions" to permissions, - ) - val apiHeaders = mutableMapOf<String, String>( - "content-type" to "application/json", - ) - val converter: (Any) -> io.appwrite.models.Row<T> = { - io.appwrite.models.Row.from(map = it as Map<String, Any>, nestedType) - } - return client.call( - "POST", - apiPath, - apiHeaders, - apiParams, - responseType = classOf(), - converter, - ) - } - - /** - * Create a new Row. Before using this route, you should create a new table resource using either a [server integration](https://appwrite.io/docs/server/databases#databasesCreateTable) API or directly from your database console. - * - * @param databaseId Database ID. - * @param tableId Table ID. You can create a new table using the Database service [server integration](https://appwrite.io/docs/server/tables#tablesCreate). Make sure to define columns before creating rows. - * @param rowId Row 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. - * @param data Row data as JSON object. - * @param permissions An array of permissions strings. By default, only the current user is granted all permissions. [Learn more about permissions](https://appwrite.io/docs/permissions). - * @return [io.appwrite.models.Row<T>] - */ - @JvmOverloads - @Throws(AppwriteException::class) - suspend fun createRow( - databaseId: String, - tableId: String, - rowId: String, - data: Any, - permissions: List<String>? = null, - ): io.appwrite.models.Row<Map<String, Any>> = createRow( - databaseId, - tableId, - rowId, - data, - permissions, - nestedType = classOf(), - ) - - /** - * Create new Rows. Before using this route, you should create a new table resource using either a [server integration](https://appwrite.io/docs/server/databases#databasesCreateTable) API or directly from your database console. - * - * @param databaseId Database ID. - * @param tableId Table ID. You can create a new table using the Database service [server integration](https://appwrite.io/docs/server/tables#tablesCreate). Make sure to define columns before creating rows. - * @param rows Array of documents data as JSON objects. - * @return [io.appwrite.models.RowList<T>] - */ - @Throws(AppwriteException::class) - suspend fun <T> createRows( - databaseId: String, - tableId: String, - rows: List<Any>, - nestedType: Class<T>, - ): io.appwrite.models.RowList<T> { - val apiPath = "/databases/{databaseId}/tables/{tableId}/rows" - .replace("{databaseId}", databaseId) - .replace("{tableId}", tableId) - - val apiParams = mutableMapOf<String, Any?>( - "rows" to rows, - ) - val apiHeaders = mutableMapOf<String, String>( - "content-type" to "application/json", - ) - val converter: (Any) -> io.appwrite.models.RowList<T> = { - io.appwrite.models.RowList.from(map = it as Map<String, Any>, nestedType) - } - return client.call( - "POST", - apiPath, - apiHeaders, - apiParams, - responseType = classOf(), - converter, - ) - } - - /** - * Create new Rows. Before using this route, you should create a new table resource using either a [server integration](https://appwrite.io/docs/server/databases#databasesCreateTable) API or directly from your database console. - * - * @param databaseId Database ID. - * @param tableId Table ID. You can create a new table using the Database service [server integration](https://appwrite.io/docs/server/tables#tablesCreate). Make sure to define columns before creating rows. - * @param rows Array of documents data as JSON objects. - * @return [io.appwrite.models.RowList<T>] - */ - @Throws(AppwriteException::class) - suspend fun createRows( - databaseId: String, - tableId: String, - rows: List<Any>, - ): io.appwrite.models.RowList<Map<String, Any>> = createRows( - databaseId, - tableId, - rows, - nestedType = classOf(), - ) - - /** - * Create or update Rows. Before using this route, you should create a new table resource using either a [server integration](https://appwrite.io/docs/server/databases#databasesCreateTable) API or directly from your database console. - * - * @param databaseId Database ID. - * @param tableId Table ID. - * @return [io.appwrite.models.RowList<T>] - */ - @Throws(AppwriteException::class) - suspend fun <T> upsertRows( - databaseId: String, - tableId: String, - nestedType: Class<T>, - ): io.appwrite.models.RowList<T> { - val apiPath = "/databases/{databaseId}/tables/{tableId}/rows" - .replace("{databaseId}", databaseId) - .replace("{tableId}", tableId) - - val apiParams = mutableMapOf<String, Any?>( - ) - val apiHeaders = mutableMapOf<String, String>( - "content-type" to "application/json", - ) - val converter: (Any) -> io.appwrite.models.RowList<T> = { - io.appwrite.models.RowList.from(map = it as Map<String, Any>, nestedType) - } - return client.call( - "PUT", - apiPath, - apiHeaders, - apiParams, - responseType = classOf(), - converter, - ) - } - - /** - * Create or update Rows. Before using this route, you should create a new table resource using either a [server integration](https://appwrite.io/docs/server/databases#databasesCreateTable) API or directly from your database console. - * - * @param databaseId Database ID. - * @param tableId Table ID. - * @return [io.appwrite.models.RowList<T>] - */ - @Throws(AppwriteException::class) - suspend fun upsertRows( - databaseId: String, - tableId: String, - ): io.appwrite.models.RowList<Map<String, Any>> = upsertRows( - databaseId, - tableId, - nestedType = classOf(), - ) - - /** - * Update all rows that match your queries, if no queries are submitted then all rows are updated. You can pass only specific fields to be updated. - * - * @param databaseId Database ID. - * @param tableId Table ID. - * @param data Row data as JSON object. Include only column and value pairs to be updated. - * @param queries 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. - * @return [io.appwrite.models.RowList<T>] - */ - @JvmOverloads - @Throws(AppwriteException::class) - suspend fun <T> updateRows( - databaseId: String, - tableId: String, - data: Any? = null, - queries: List<String>? = null, - nestedType: Class<T>, - ): io.appwrite.models.RowList<T> { - val apiPath = "/databases/{databaseId}/tables/{tableId}/rows" - .replace("{databaseId}", databaseId) - .replace("{tableId}", tableId) - - val apiParams = mutableMapOf<String, Any?>( - "data" to data, - "queries" to queries, - ) - val apiHeaders = mutableMapOf<String, String>( - "content-type" to "application/json", - ) - val converter: (Any) -> io.appwrite.models.RowList<T> = { - io.appwrite.models.RowList.from(map = it as Map<String, Any>, nestedType) - } - return client.call( - "PATCH", - apiPath, - apiHeaders, - apiParams, - responseType = classOf(), - converter, - ) - } - - /** - * Update all rows that match your queries, if no queries are submitted then all rows are updated. You can pass only specific fields to be updated. - * - * @param databaseId Database ID. - * @param tableId Table ID. - * @param data Row data as JSON object. Include only column and value pairs to be updated. - * @param queries 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. - * @return [io.appwrite.models.RowList<T>] - */ - @JvmOverloads - @Throws(AppwriteException::class) - suspend fun updateRows( - databaseId: String, - tableId: String, - data: Any? = null, - queries: List<String>? = null, - ): io.appwrite.models.RowList<Map<String, Any>> = updateRows( - databaseId, - tableId, - data, - queries, - nestedType = classOf(), - ) - - /** - * Bulk delete rows using queries, if no queries are passed then all rows are deleted. - * - * @param databaseId Database ID. - * @param tableId Table ID. You can create a new table using the Database service [server integration](https://appwrite.io/docs/server/tables#tablesCreate). - * @param queries 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. - * @return [io.appwrite.models.RowList<T>] - */ - @JvmOverloads - @Throws(AppwriteException::class) - suspend fun <T> deleteRows( - databaseId: String, - tableId: String, - queries: List<String>? = null, - nestedType: Class<T>, - ): io.appwrite.models.RowList<T> { - val apiPath = "/databases/{databaseId}/tables/{tableId}/rows" - .replace("{databaseId}", databaseId) - .replace("{tableId}", tableId) - - val apiParams = mutableMapOf<String, Any?>( - "queries" to queries, - ) - val apiHeaders = mutableMapOf<String, String>( - "content-type" to "application/json", - ) - val converter: (Any) -> io.appwrite.models.RowList<T> = { - io.appwrite.models.RowList.from(map = it as Map<String, Any>, nestedType) - } - return client.call( - "DELETE", - apiPath, - apiHeaders, - apiParams, - responseType = classOf(), - converter, - ) - } - - /** - * Bulk delete rows using queries, if no queries are passed then all rows are deleted. - * - * @param databaseId Database ID. - * @param tableId Table ID. You can create a new table using the Database service [server integration](https://appwrite.io/docs/server/tables#tablesCreate). - * @param queries 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. - * @return [io.appwrite.models.RowList<T>] - */ - @JvmOverloads - @Throws(AppwriteException::class) - suspend fun deleteRows( - databaseId: String, - tableId: String, - queries: List<String>? = null, - ): io.appwrite.models.RowList<Map<String, Any>> = deleteRows( - databaseId, - tableId, - queries, - nestedType = classOf(), - ) - - /** - * Get a row by its unique ID. This endpoint response returns a JSON object with the row data. - * - * @param databaseId Database ID. - * @param tableId Table ID. You can create a new table using the Database service [server integration](https://appwrite.io/docs/server/tables#tablesCreate). - * @param rowId Row ID. - * @param queries 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. - * @return [io.appwrite.models.Row<T>] - */ - @JvmOverloads - @Throws(AppwriteException::class) - suspend fun <T> getRow( - databaseId: String, - tableId: String, - rowId: String, - queries: List<String>? = null, - nestedType: Class<T>, - ): io.appwrite.models.Row<T> { - val apiPath = "/databases/{databaseId}/tables/{tableId}/rows/{rowId}" - .replace("{databaseId}", databaseId) - .replace("{tableId}", tableId) - .replace("{rowId}", rowId) - - val apiParams = mutableMapOf<String, Any?>( - "queries" to queries, - ) - val apiHeaders = mutableMapOf<String, String>( - ) - val converter: (Any) -> io.appwrite.models.Row<T> = { - io.appwrite.models.Row.from(map = it as Map<String, Any>, nestedType) - } - return client.call( - "GET", - apiPath, - apiHeaders, - apiParams, - responseType = classOf(), - converter, - ) - } - - /** - * Get a row by its unique ID. This endpoint response returns a JSON object with the row data. - * - * @param databaseId Database ID. - * @param tableId Table ID. You can create a new table using the Database service [server integration](https://appwrite.io/docs/server/tables#tablesCreate). - * @param rowId Row ID. - * @param queries 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. - * @return [io.appwrite.models.Row<T>] - */ - @JvmOverloads - @Throws(AppwriteException::class) - suspend fun getRow( - databaseId: String, - tableId: String, - rowId: String, - queries: List<String>? = null, - ): io.appwrite.models.Row<Map<String, Any>> = getRow( - databaseId, - tableId, - rowId, - queries, - nestedType = classOf(), - ) - - /** - * Create or update a Row. Before using this route, you should create a new table resource using either a [server integration](https://appwrite.io/docs/server/databases#databasesCreateTable) API or directly from your database console. - * - * @param databaseId Database ID. - * @param tableId Table ID. - * @param rowId Row ID. - * @return [io.appwrite.models.Row<T>] - */ - @Throws(AppwriteException::class) - suspend fun <T> upsertRow( - databaseId: String, - tableId: String, - rowId: String, - nestedType: Class<T>, - ): io.appwrite.models.Row<T> { - val apiPath = "/databases/{databaseId}/tables/{tableId}/rows/{rowId}" - .replace("{databaseId}", databaseId) - .replace("{tableId}", tableId) - .replace("{rowId}", rowId) - - val apiParams = mutableMapOf<String, Any?>( - ) - val apiHeaders = mutableMapOf<String, String>( - "content-type" to "application/json", - ) - val converter: (Any) -> io.appwrite.models.Row<T> = { - io.appwrite.models.Row.from(map = it as Map<String, Any>, nestedType) - } - return client.call( - "PUT", - apiPath, - apiHeaders, - apiParams, - responseType = classOf(), - converter, - ) - } - - /** - * Create or update a Row. Before using this route, you should create a new table resource using either a [server integration](https://appwrite.io/docs/server/databases#databasesCreateTable) API or directly from your database console. - * - * @param databaseId Database ID. - * @param tableId Table ID. - * @param rowId Row ID. - * @return [io.appwrite.models.Row<T>] - */ - @Throws(AppwriteException::class) - suspend fun upsertRow( - databaseId: String, - tableId: String, - rowId: String, - ): io.appwrite.models.Row<Map<String, Any>> = upsertRow( - databaseId, - tableId, - rowId, - nestedType = classOf(), - ) - - /** - * Update a row by its unique ID. Using the patch method you can pass only specific fields that will get updated. - * - * @param databaseId Database ID. - * @param tableId Table ID. - * @param rowId Row ID. - * @param data Row data as JSON object. Include only columns and value pairs to be updated. - * @param permissions An array of permissions strings. By default, the current permissions are inherited. [Learn more about permissions](https://appwrite.io/docs/permissions). - * @return [io.appwrite.models.Row<T>] - */ - @JvmOverloads - @Throws(AppwriteException::class) - suspend fun <T> updateRow( - databaseId: String, - tableId: String, - rowId: String, - data: Any? = null, - permissions: List<String>? = null, - nestedType: Class<T>, - ): io.appwrite.models.Row<T> { - val apiPath = "/databases/{databaseId}/tables/{tableId}/rows/{rowId}" - .replace("{databaseId}", databaseId) - .replace("{tableId}", tableId) - .replace("{rowId}", rowId) - - val apiParams = mutableMapOf<String, Any?>( - "data" to data, - "permissions" to permissions, - ) - val apiHeaders = mutableMapOf<String, String>( - "content-type" to "application/json", - ) - val converter: (Any) -> io.appwrite.models.Row<T> = { - io.appwrite.models.Row.from(map = it as Map<String, Any>, nestedType) - } - return client.call( - "PATCH", - apiPath, - apiHeaders, - apiParams, - responseType = classOf(), - converter, - ) - } - - /** - * Update a row by its unique ID. Using the patch method you can pass only specific fields that will get updated. - * - * @param databaseId Database ID. - * @param tableId Table ID. - * @param rowId Row ID. - * @param data Row data as JSON object. Include only columns and value pairs to be updated. - * @param permissions An array of permissions strings. By default, the current permissions are inherited. [Learn more about permissions](https://appwrite.io/docs/permissions). - * @return [io.appwrite.models.Row<T>] - */ - @JvmOverloads - @Throws(AppwriteException::class) - suspend fun updateRow( - databaseId: String, - tableId: String, - rowId: String, - data: Any? = null, - permissions: List<String>? = null, - ): io.appwrite.models.Row<Map<String, Any>> = updateRow( - databaseId, - tableId, - rowId, - data, - permissions, - nestedType = classOf(), - ) - - /** - * Delete a row by its unique ID. - * - * @param databaseId Database ID. - * @param tableId Table ID. You can create a new table using the Database service [server integration](https://appwrite.io/docs/server/tables#tablesCreate). - * @param rowId Row ID. - * @return [Any] - */ - @Throws(AppwriteException::class) - suspend fun deleteRow( - databaseId: String, - tableId: String, - rowId: String, - ): Any { - val apiPath = "/databases/{databaseId}/tables/{tableId}/rows/{rowId}" - .replace("{databaseId}", databaseId) - .replace("{tableId}", tableId) - .replace("{rowId}", rowId) - - val apiParams = mutableMapOf<String, Any?>( - ) - val apiHeaders = mutableMapOf<String, String>( - "content-type" to "application/json", - ) - return client.call( - "DELETE", - apiPath, - apiHeaders, - apiParams, - responseType = Any::class.java, - ) - } - - /** - * Decrement a specific column of a row by a given value. - * - * @param databaseId Database ID. - * @param tableId Table ID. - * @param rowId Row ID. - * @param column Column key. - * @param value Value to increment the column by. The value must be a number. - * @param min Minimum value for the column. If the current value is lesser than this value, an exception will be thrown. - * @return [io.appwrite.models.Row<T>] - */ - @JvmOverloads - @Throws(AppwriteException::class) - suspend fun <T> decrementRowColumn( - databaseId: String, - tableId: String, - rowId: String, - column: String, - value: Double? = null, - min: Double? = null, - nestedType: Class<T>, - ): io.appwrite.models.Row<T> { - val apiPath = "/databases/{databaseId}/tables/{tableId}/rows/{rowId}/{column}/decrement" - .replace("{databaseId}", databaseId) - .replace("{tableId}", tableId) - .replace("{rowId}", rowId) - .replace("{column}", column) - - val apiParams = mutableMapOf<String, Any?>( - "value" to value, - "min" to min, - ) - val apiHeaders = mutableMapOf<String, String>( - "content-type" to "application/json", - ) - val converter: (Any) -> io.appwrite.models.Row<T> = { - io.appwrite.models.Row.from(map = it as Map<String, Any>, nestedType) - } - return client.call( - "PATCH", - apiPath, - apiHeaders, - apiParams, - responseType = classOf(), - converter, - ) - } - - /** - * Decrement a specific column of a row by a given value. - * - * @param databaseId Database ID. - * @param tableId Table ID. - * @param rowId Row ID. - * @param column Column key. - * @param value Value to increment the column by. The value must be a number. - * @param min Minimum value for the column. If the current value is lesser than this value, an exception will be thrown. - * @return [io.appwrite.models.Row<T>] - */ - @JvmOverloads - @Throws(AppwriteException::class) - suspend fun decrementRowColumn( - databaseId: String, - tableId: String, - rowId: String, - column: String, - value: Double? = null, - min: Double? = null, - ): io.appwrite.models.Row<Map<String, Any>> = decrementRowColumn( - databaseId, - tableId, - rowId, - column, - value, - min, - nestedType = classOf(), - ) - - /** - * Increment a specific column of a row by a given value. - * - * @param databaseId Database ID. - * @param tableId Table ID. - * @param rowId Row ID. - * @param column Column key. - * @param value Value to increment the column by. The value must be a number. - * @param max Maximum value for the column. If the current value is greater than this value, an error will be thrown. - * @return [io.appwrite.models.Row<T>] - */ - @JvmOverloads - @Throws(AppwriteException::class) - suspend fun <T> incrementRowColumn( - databaseId: String, - tableId: String, - rowId: String, - column: String, - value: Double? = null, - max: Double? = null, - nestedType: Class<T>, - ): io.appwrite.models.Row<T> { - val apiPath = "/databases/{databaseId}/tables/{tableId}/rows/{rowId}/{column}/increment" - .replace("{databaseId}", databaseId) - .replace("{tableId}", tableId) - .replace("{rowId}", rowId) - .replace("{column}", column) - - val apiParams = mutableMapOf<String, Any?>( - "value" to value, - "max" to max, - ) - val apiHeaders = mutableMapOf<String, String>( - "content-type" to "application/json", - ) - val converter: (Any) -> io.appwrite.models.Row<T> = { - io.appwrite.models.Row.from(map = it as Map<String, Any>, nestedType) - } - return client.call( - "PATCH", - apiPath, - apiHeaders, - apiParams, - responseType = classOf(), - converter, - ) - } - - /** - * Increment a specific column of a row by a given value. - * - * @param databaseId Database ID. - * @param tableId Table ID. - * @param rowId Row ID. - * @param column Column key. - * @param value Value to increment the column by. The value must be a number. - * @param max Maximum value for the column. If the current value is greater than this value, an error will be thrown. - * @return [io.appwrite.models.Row<T>] - */ - @JvmOverloads - @Throws(AppwriteException::class) - suspend fun incrementRowColumn( - databaseId: String, - tableId: String, - rowId: String, - column: String, - value: Double? = null, - max: Double? = null, - ): io.appwrite.models.Row<Map<String, Any>> = incrementRowColumn( - databaseId, - tableId, - rowId, - column, - value, - max, - nestedType = classOf(), - ) - -} \ No newline at end of file From 5221112bd243bf0807c16935eb159f21dbfb85b8 Mon Sep 17 00:00:00 2001 From: root <chiragaggarwal5k@gmail.com> Date: Thu, 24 Jul 2025 11:16:59 +0000 Subject: [PATCH 15/17] chore: add changelog --- CHANGELOG.md | 30 ++++++++++++++++++++++++++- README.md | 4 ++-- src/main/kotlin/io/appwrite/Client.kt | 4 ++-- 3 files changed, 33 insertions(+), 5 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index fa4d35e..c7194d5 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1 +1,29 @@ -# Change Log \ No newline at end of file +# Change Log + +## 9.1.0 + +* Add `incrementDocumentAttribute` and `decrementDocumentAttribute` support to `Databases` service +* Add `dart38` and `flutter332` support to runtime models +* Add `gif` support to `ImageFormat` enum +* Add `encrypt` support to `StringAttribute` model +* Add `sequence` support to `Document` model + +## 9.0.0 + +* Add `<REGION>` to doc examples due to the new multi region endpoints +* Add doc examples and methods for bulk api transactions: `createDocuments`, `deleteDocuments` etc. +* Add doc examples, class and methods for new `Sites` service +* Add doc examples, class and methods for new `Tokens` service +* Add enums for `BuildRuntime `, `Adapter`, `Framework`, `DeploymentDownloadType` and `VCSDeploymentType` +* Update enum for `runtimes` with Pythonml312, Dart219, Flutter327 and Flutter329 +* Add `token` param to `getFilePreview` and `getFileView` for File tokens usage +* Add `queries` and `search` params to `listMemberships` method +* Remove `search` param from `listExecutions` method + +## 8.0.0 + +* Fix requests failing by removing `Content-Type` header from `GET` and `HEAD` requests + +## 7.0.0 + +* Fix pong response & chunked upload diff --git a/README.md b/README.md index 52fd0c1..126160d 100644 --- a/README.md +++ b/README.md @@ -39,7 +39,7 @@ repositories { Next, add the dependency to your project's `build.gradle(.kts)` file: ```groovy -implementation("io.appwrite:sdk-for-kotlin:9.0.0") +implementation("io.appwrite:sdk-for-kotlin:9.1.0") ``` ### Maven @@ -50,7 +50,7 @@ Add this to your project's `pom.xml` file: <dependency> <groupId>io.appwrite</groupId> <artifactId>sdk-for-kotlin</artifactId> - <version>9.0.0</version> + <version>9.1.0</version> </dependency> </dependencies> ``` diff --git a/src/main/kotlin/io/appwrite/Client.kt b/src/main/kotlin/io/appwrite/Client.kt index c7824ef..429131e 100644 --- a/src/main/kotlin/io/appwrite/Client.kt +++ b/src/main/kotlin/io/appwrite/Client.kt @@ -58,11 +58,11 @@ class Client @JvmOverloads constructor( init { headers = mutableMapOf( "content-type" to "application/json", - "user-agent" to "AppwriteKotlinSDK/9.0.0 ${System.getProperty("http.agent")}", + "user-agent" to "AppwriteKotlinSDK/9.1.0 ${System.getProperty("http.agent")}", "x-sdk-name" to "Kotlin", "x-sdk-platform" to "server", "x-sdk-language" to "kotlin", - "x-sdk-version" to "9.0.0", + "x-sdk-version" to "9.1.0", "x-appwrite-response-format" to "1.7.0", ) From 74e11383aef7653e2a4df48a1d06a5cd47085126 Mon Sep 17 00:00:00 2001 From: root <chiragaggarwal5k@gmail.com> Date: Fri, 25 Jul 2025 11:46:50 +0000 Subject: [PATCH 16/17] chore: update readme --- README.md | 71 +++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 71 insertions(+) diff --git a/README.md b/README.md index 126160d..f3824c3 100644 --- a/README.md +++ b/README.md @@ -115,6 +115,77 @@ suspend fun main() { } ``` +### Type Safety with Models + +The Appwrite Kotlin SDK provides type safety when working with database documents through generic methods. Methods like `listDocuments`, `getDocument`, and others accept a `nestedType` parameter that allows you to specify your custom model type for full type safety. + +```kotlin +data class Book( + val name: String, + val author: String, + val releaseYear: String? = null, + val category: String? = null, + val genre: List<String>? = null, + val isCheckedOut: Boolean +) + +val databases = Databases(client) + +try { + val documents = databases.listDocuments( + databaseId = "your-database-id", + collectionId = "your-collection-id", + nestedType = Book::class.java // Pass in your custom model type + ) + + for (book in documents.documents) { + Log.d("Appwrite", "Book: ${book.name} by ${book.author}") // Now you have full type safety + } +} catch (e: AppwriteException) { + Log.e("Appwrite", e.message ?: "Unknown error") +} +``` + +**Tip**: You can use the `appwrite types` command to automatically generate model definitions based on your Appwrite database schema. Learn more about [type generation](https://appwrite.io/docs/products/databases/type-generation). + +### Working with Model Methods + +All Appwrite models come with built-in methods for data conversion and manipulation: + +**`toMap()`** - Converts a model instance to a Map format, useful for debugging or manual data manipulation: +```kotlin +val account = Account(client) +val user = account.get() +val userMap = user.toMap() +Log.d("Appwrite", userMap.toString()) // Prints all user properties as a Map +``` + +**`from(map:, nestedType:)`** - Creates a model instance from a Map, useful when working with raw data: +```kotlin +val userData: Map<String, Any> = mapOf( + "\$id" to "123", + "name" to "John", + "email" to "john@example.com" +) +val user = User.from(userData, User::class.java) +``` + +**JSON Serialization** - Models can be easily converted to/from JSON using Gson (which the SDK uses internally): +```kotlin +import com.google.gson.Gson + +val account = Account(client) +val user = account.get() + +// Convert to JSON +val gson = Gson() +val jsonString = gson.toJson(user) +Log.d("Appwrite", "User JSON: $jsonString") + +// Convert from JSON +val userFromJson = gson.fromJson(jsonString, User::class.java) +``` + ### Error Handling The Appwrite Kotlin SDK raises `AppwriteException` object with `message`, `code` and `response` properties. You can handle any errors by catching `AppwriteException` and present the `message` to the user or handle it yourself based on the provided error information. Below is an example. From 54041969fa49f6d7b937e00c0f84d6db82fdf6c7 Mon Sep 17 00:00:00 2001 From: Christy Jacob <christyjacob4@gmail.com> Date: Wed, 6 Aug 2025 08:05:17 +0000 Subject: [PATCH 17/17] update maven deployment --- README.md | 59 ++++++++++++++++++- .../java/functions/create-execution.md | 2 +- .../kotlin/functions/create-execution.md | 2 +- scripts/publish.gradle | 12 ---- scripts/setup.gradle | 6 +- src/main/kotlin/io/appwrite/Client.kt | 4 +- 6 files changed, 64 insertions(+), 21 deletions(-) diff --git a/README.md b/README.md index f3824c3..9ddec57 100644 --- a/README.md +++ b/README.md @@ -39,7 +39,7 @@ repositories { Next, add the dependency to your project's `build.gradle(.kts)` file: ```groovy -implementation("io.appwrite:sdk-for-kotlin:9.1.0") +implementation("io.appwrite:sdk-for-kotlin:9.1.2") ``` ### Maven @@ -50,7 +50,7 @@ Add this to your project's `pom.xml` file: <dependency> <groupId>io.appwrite</groupId> <artifactId>sdk-for-kotlin</artifactId> - <version>9.1.0</version> + <version>9.1.2</version> </dependency> </dependencies> ``` @@ -119,6 +119,7 @@ suspend fun main() { The Appwrite Kotlin SDK provides type safety when working with database documents through generic methods. Methods like `listDocuments`, `getDocument`, and others accept a `nestedType` parameter that allows you to specify your custom model type for full type safety. +**Kotlin:** ```kotlin data class Book( val name: String, @@ -146,6 +147,60 @@ try { } ``` +**Java:** +```java +public class Book { + private String name; + private String author; + private String releaseYear; + private String category; + private List<String> genre; + private boolean isCheckedOut; + + // Constructor + public Book(String name, String author, boolean isCheckedOut) { + this.name = name; + this.author = author; + this.isCheckedOut = isCheckedOut; + } + + // Getters and setters + public String getName() { return name; } + public void setName(String name) { this.name = name; } + + public String getAuthor() { return author; } + public void setAuthor(String author) { this.author = author; } + + public String getReleaseYear() { return releaseYear; } + public void setReleaseYear(String releaseYear) { this.releaseYear = releaseYear; } + + public String getCategory() { return category; } + public void setCategory(String category) { this.category = category; } + + public List<String> getGenre() { return genre; } + public void setGenre(List<String> genre) { this.genre = genre; } + + public boolean isCheckedOut() { return isCheckedOut; } + public void setCheckedOut(boolean checkedOut) { isCheckedOut = checkedOut; } +} + +Databases databases = new Databases(client); + +try { + DocumentList<Book> documents = databases.listDocuments( + "your-database-id", + "your-collection-id", + Book.class // Pass in your custom model type + ); + + for (Book book : documents.getDocuments()) { + Log.d("Appwrite", "Book: " + book.getName() + " by " + book.getAuthor()); // Now you have full type safety + } +} catch (AppwriteException e) { + Log.e("Appwrite", e.getMessage() != null ? e.getMessage() : "Unknown error"); +} +``` + **Tip**: You can use the `appwrite types` command to automatically generate model definitions based on your Appwrite database schema. Learn more about [type generation](https://appwrite.io/docs/products/databases/type-generation). ### Working with Model Methods diff --git a/docs/examples/java/functions/create-execution.md b/docs/examples/java/functions/create-execution.md index 82d48fa..93efa0a 100644 --- a/docs/examples/java/functions/create-execution.md +++ b/docs/examples/java/functions/create-execution.md @@ -16,7 +16,7 @@ functions.createExecution( "<PATH>", // path (optional) ExecutionMethod.GET, // method (optional) mapOf( "a" to "b" ), // headers (optional) - "", // scheduledAt (optional) + "<SCHEDULED_AT>", // scheduledAt (optional) new CoroutineCallback<>((result, error) -> { if (error != null) { error.printStackTrace(); diff --git a/docs/examples/kotlin/functions/create-execution.md b/docs/examples/kotlin/functions/create-execution.md index 94bfa23..2734412 100644 --- a/docs/examples/kotlin/functions/create-execution.md +++ b/docs/examples/kotlin/functions/create-execution.md @@ -16,5 +16,5 @@ val response = functions.createExecution( path = "<PATH>", // optional method = "GET", // optional headers = mapOf( "a" to "b" ), // optional - scheduledAt = "" // optional + scheduledAt = "<SCHEDULED_AT>" // optional ) diff --git a/scripts/publish.gradle b/scripts/publish.gradle index cee6ff0..c8c5110 100644 --- a/scripts/publish.gradle +++ b/scripts/publish.gradle @@ -10,18 +10,6 @@ java { } publishing { - repositories { - maven { - name = "sonatype" - def releaseUrl = "https://s01.oss.sonatype.org/service/local/staging/deploy/maven2/" - def snapshotUrl = "https://s01.oss.sonatype.org/content/repositories/snapshots/" - url = version.endsWith('-SNAPSHOT') ? snapshotUrl : releaseUrl - credentials { - username = rootProject.ext["ossrhUsername"] - password = rootProject.ext["ossrhPassword"] - } - } - } publications { mavenJava(MavenPublication) { from components.java diff --git a/scripts/setup.gradle b/scripts/setup.gradle index 6591e1f..cd94c1d 100644 --- a/scripts/setup.gradle +++ b/scripts/setup.gradle @@ -22,15 +22,15 @@ ext["signing.keyId"] = System.getenv('SIGNING_KEY_ID') ?: ext["signing.keyId"] ext["signing.password"] = System.getenv('SIGNING_PASSWORD') ?: ext["signing.password"] ext["signing.secretKeyRingFile"] = System.getenv('SIGNING_SECRET_KEY_RING_FILE') ?: ext["signing.secretKeyRingFile"] -// Set up Sonatype repository +// Set up Sonatype repository using OSSRH Staging API nexusPublishing { repositories { sonatype { stagingProfileId = sonatypeStagingProfileId username = ossrhUsername password = ossrhPassword - nexusUrl.set(uri("https://s01.oss.sonatype.org/service/local/")) - snapshotRepositoryUrl.set(uri("https://s01.oss.sonatype.org/content/repositories/snapshots/")) + nexusUrl.set(uri("https://ossrh-staging-api.central.sonatype.com/service/local/")) + snapshotRepositoryUrl.set(uri("https://central.sonatype.com/repository/maven-snapshots/")) } } } \ No newline at end of file diff --git a/src/main/kotlin/io/appwrite/Client.kt b/src/main/kotlin/io/appwrite/Client.kt index 429131e..68a45cb 100644 --- a/src/main/kotlin/io/appwrite/Client.kt +++ b/src/main/kotlin/io/appwrite/Client.kt @@ -58,11 +58,11 @@ class Client @JvmOverloads constructor( init { headers = mutableMapOf( "content-type" to "application/json", - "user-agent" to "AppwriteKotlinSDK/9.1.0 ${System.getProperty("http.agent")}", + "user-agent" to "AppwriteKotlinSDK/9.1.2 ${System.getProperty("http.agent")}", "x-sdk-name" to "Kotlin", "x-sdk-platform" to "server", "x-sdk-language" to "kotlin", - "x-sdk-version" to "9.1.0", + "x-sdk-version" to "9.1.2", "x-appwrite-response-format" to "1.7.0", )