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 1/5] 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 2/5] 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 3/5] 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 4/5] 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 5/5] 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 *