From ab71ea8c721c8201dedaf087b7945be907f38f92 Mon Sep 17 00:00:00 2001 From: Eldad Fux Date: Wed, 23 Dec 2020 18:21:44 +0200 Subject: [PATCH] Changed SDK structure --- .../client-flutter-dev/CHANGELOG.md | 0 .../{ => 0.6.2}/client-flutter-dev/LICENSE | 0 .../{ => 0.6.2}/client-flutter-dev/README.md | 0 .../examples/account/create-o-auth2session.md | 0 .../docs/examples/account/create-recovery.md | 0 .../docs/examples/account/create-session.md | 0 .../examples/account/create-verification.md | 0 .../docs/examples/account/create.md | 0 .../docs/examples/account/delete-session.md | 0 .../docs/examples/account/delete-sessions.md | 0 .../docs/examples/account/delete.md | 0 .../docs/examples/account/get-logs.md | 0 .../docs/examples/account/get-prefs.md | 0 .../docs/examples/account/get-sessions.md | 0 .../docs/examples/account/get.md | 0 .../docs/examples/account/update-email.md | 0 .../docs/examples/account/update-name.md | 0 .../docs/examples/account/update-password.md | 0 .../docs/examples/account/update-prefs.md | 0 .../docs/examples/account/update-recovery.md | 0 .../examples/account/update-verification.md | 0 .../docs/examples/avatars/get-browser.md | 0 .../docs/examples/avatars/get-credit-card.md | 0 .../docs/examples/avatars/get-favicon.md | 0 .../docs/examples/avatars/get-flag.md | 0 .../docs/examples/avatars/get-image.md | 0 .../docs/examples/avatars/get-q-r.md | 0 .../docs/examples/database/create-document.md | 0 .../docs/examples/database/delete-document.md | 0 .../docs/examples/database/get-document.md | 0 .../docs/examples/database/list-documents.md | 0 .../docs/examples/database/update-document.md | 0 .../docs/examples/locale/get-continents.md | 0 .../docs/examples/locale/get-countries-e-u.md | 0 .../examples/locale/get-countries-phones.md | 0 .../docs/examples/locale/get-countries.md | 0 .../docs/examples/locale/get-currencies.md | 0 .../docs/examples/locale/get.md | 0 .../docs/examples/storage/create-file.md | 0 .../docs/examples/storage/delete-file.md | 0 .../examples/storage/get-file-download.md | 0 .../docs/examples/storage/get-file-preview.md | 0 .../docs/examples/storage/get-file-view.md | 0 .../docs/examples/storage/get-file.md | 0 .../docs/examples/storage/list-files.md | 0 .../docs/examples/storage/update-file.md | 0 .../docs/examples/teams/create-membership.md | 0 .../docs/examples/teams/create.md | 0 .../docs/examples/teams/delete-membership.md | 0 .../docs/examples/teams/delete.md | 0 .../docs/examples/teams/get-memberships.md | 0 .../docs/examples/teams/get.md | 0 .../docs/examples/teams/list.md | 0 .../teams/update-membership-status.md | 0 .../docs/examples/teams/update.md | 0 .../client-flutter-dev/example/README.md | 0 .../client-flutter-dev/lib/appwrite.dart | 0 .../client-flutter-dev/lib/appwrite_dev.dart | 0 .../client-flutter-dev/lib/client.dart | 0 .../client-flutter-dev/lib/enums.dart | 0 .../client-flutter-dev/lib/service.dart | 0 .../lib/services/account.dart | 0 .../lib/services/avatars.dart | 0 .../lib/services/database.dart | 0 .../lib/services/locale.dart | 0 .../lib/services/storage.dart | 0 .../lib/services/teams.dart | 0 .../client-flutter-dev/pubspec.yaml | 0 .../{ => 0.6.2}/client-flutter/CHANGELOG.md | 0 app/sdks/{ => 0.6.2}/client-flutter/LICENSE | 0 app/sdks/{ => 0.6.2}/client-flutter/README.md | 0 .../examples/account/create-o-auth2session.md | 0 .../docs/examples/account/create-recovery.md | 0 .../docs/examples/account/create-session.md | 0 .../examples/account/create-verification.md | 0 .../docs/examples/account/create.md | 0 .../docs/examples/account/delete-session.md | 0 .../docs/examples/account/delete-sessions.md | 0 .../docs/examples/account/delete.md | 0 .../docs/examples/account/get-logs.md | 0 .../docs/examples/account/get-prefs.md | 0 .../docs/examples/account/get-sessions.md | 0 .../docs/examples/account/get.md | 0 .../docs/examples/account/update-email.md | 0 .../docs/examples/account/update-name.md | 0 .../docs/examples/account/update-password.md | 0 .../docs/examples/account/update-prefs.md | 0 .../docs/examples/account/update-recovery.md | 0 .../examples/account/update-verification.md | 0 .../docs/examples/avatars/get-browser.md | 0 .../docs/examples/avatars/get-credit-card.md | 0 .../docs/examples/avatars/get-favicon.md | 0 .../docs/examples/avatars/get-flag.md | 0 .../docs/examples/avatars/get-image.md | 0 .../docs/examples/avatars/get-initials.md | 0 .../docs/examples/avatars/get-q-r.md | 0 .../docs/examples/database/create-document.md | 0 .../docs/examples/database/delete-document.md | 0 .../docs/examples/database/get-document.md | 0 .../docs/examples/database/list-documents.md | 0 .../docs/examples/database/update-document.md | 0 .../docs/examples/locale/get-continents.md | 0 .../docs/examples/locale/get-countries-e-u.md | 0 .../examples/locale/get-countries-phones.md | 0 .../docs/examples/locale/get-countries.md | 0 .../docs/examples/locale/get-currencies.md | 0 .../docs/examples/locale/get-languages.md | 0 .../docs/examples/locale/get.md | 0 .../docs/examples/storage/create-file.md | 0 .../docs/examples/storage/delete-file.md | 0 .../examples/storage/get-file-download.md | 0 .../docs/examples/storage/get-file-preview.md | 0 .../docs/examples/storage/get-file-view.md | 0 .../docs/examples/storage/get-file.md | 0 .../docs/examples/storage/list-files.md | 0 .../docs/examples/storage/update-file.md | 0 .../docs/examples/teams/create-membership.md | 0 .../docs/examples/teams/create.md | 0 .../docs/examples/teams/delete-membership.md | 0 .../docs/examples/teams/delete.md | 0 .../docs/examples/teams/get-memberships.md | 0 .../client-flutter/docs/examples/teams/get.md | 0 .../docs/examples/teams/list.md | 0 .../teams/update-membership-status.md | 0 .../docs/examples/teams/update.md | 0 .../client-flutter/example/README.md | 0 .../client-flutter/lib/appwrite.dart | 0 .../client-flutter/lib/client.dart | 0 .../{ => 0.6.2}/client-flutter/lib/enums.dart | 0 .../client-flutter/lib/service.dart | 0 .../client-flutter/lib/services/account.dart | 0 .../client-flutter/lib/services/avatars.dart | 0 .../client-flutter/lib/services/database.dart | 0 .../client-flutter/lib/services/locale.dart | 0 .../client-flutter/lib/services/storage.dart | 0 .../client-flutter/lib/services/teams.dart | 0 .../{ => 0.6.2}/client-flutter/pubspec.yaml | 0 .../{ => 0.6.2}/client-swift/CHANGELOG.md | 0 app/sdks/{ => 0.6.2}/client-swift/LICENSE | 0 .../{ => 0.6.2}/client-swift/Package.swift | 0 app/sdks/{ => 0.6.2}/client-swift/README.md | 0 .../Sources/Appwrite/Client.swift | 0 .../Sources/Appwrite/Service.swift | 0 .../Sources/Appwrite/Services/Account.swift | 0 .../Sources/Appwrite/Services/Avatars.swift | 0 .../Sources/Appwrite/Services/Database.swift | 0 .../Sources/Appwrite/Services/Locale.swift | 0 .../Sources/Appwrite/Services/Storage.swift | 0 .../Sources/Appwrite/Services/Teams.swift | 0 .../{ => 0.6.2}/client-swift/docs/account.md | 0 .../{ => 0.6.2}/client-swift/docs/avatars.md | 0 .../{ => 0.6.2}/client-swift/docs/database.md | 0 .../examples/account/create-o-auth2session.md | 0 .../docs/examples/account/create-recovery.md | 0 .../docs/examples/account/create-session.md | 0 .../examples/account/create-verification.md | 0 .../docs/examples/account/create.md | 0 .../docs/examples/account/delete-session.md | 0 .../docs/examples/account/delete-sessions.md | 0 .../docs/examples/account/delete.md | 0 .../docs/examples/account/get-logs.md | 0 .../docs/examples/account/get-prefs.md | 0 .../docs/examples/account/get-sessions.md | 0 .../client-swift/docs/examples/account/get.md | 0 .../docs/examples/account/update-email.md | 0 .../docs/examples/account/update-name.md | 0 .../docs/examples/account/update-password.md | 0 .../docs/examples/account/update-prefs.md | 0 .../docs/examples/account/update-recovery.md | 0 .../examples/account/update-verification.md | 0 .../docs/examples/avatars/get-browser.md | 0 .../docs/examples/avatars/get-credit-card.md | 0 .../docs/examples/avatars/get-favicon.md | 0 .../docs/examples/avatars/get-flag.md | 0 .../docs/examples/avatars/get-image.md | 0 .../docs/examples/avatars/get-initials.md | 0 .../docs/examples/avatars/get-q-r.md | 0 .../docs/examples/database/create-document.md | 0 .../docs/examples/database/delete-document.md | 0 .../docs/examples/database/get-document.md | 0 .../docs/examples/database/list-documents.md | 0 .../docs/examples/database/update-document.md | 0 .../docs/examples/locale/get-continents.md | 0 .../docs/examples/locale/get-countries-e-u.md | 0 .../examples/locale/get-countries-phones.md | 0 .../docs/examples/locale/get-countries.md | 0 .../docs/examples/locale/get-currencies.md | 0 .../docs/examples/locale/get-languages.md | 0 .../client-swift/docs/examples/locale/get.md | 0 .../docs/examples/storage/create-file.md | 0 .../docs/examples/storage/delete-file.md | 0 .../examples/storage/get-file-download.md | 0 .../docs/examples/storage/get-file-preview.md | 0 .../docs/examples/storage/get-file-view.md | 0 .../docs/examples/storage/get-file.md | 0 .../docs/examples/storage/list-files.md | 0 .../docs/examples/storage/update-file.md | 0 .../docs/examples/teams/create-membership.md | 0 .../docs/examples/teams/create.md | 0 .../docs/examples/teams/delete-membership.md | 0 .../docs/examples/teams/delete.md | 0 .../docs/examples/teams/get-memberships.md | 0 .../client-swift/docs/examples/teams/get.md | 0 .../client-swift/docs/examples/teams/list.md | 0 .../teams/update-membership-status.md | 0 .../docs/examples/teams/update.md | 0 .../{ => 0.6.2}/client-swift/docs/locale.md | 0 .../{ => 0.6.2}/client-swift/docs/storage.md | 0 .../{ => 0.6.2}/client-swift/docs/teams.md | 0 app/sdks/{ => 0.6.2}/client-web/CHANGELOG.md | 0 app/sdks/{ => 0.6.2}/client-web/LICENSE | 0 app/sdks/{ => 0.6.2}/client-web/README.md | 0 .../examples/account/create-o-auth2session.md | 0 .../docs/examples/account/create-recovery.md | 0 .../docs/examples/account/create-session.md | 0 .../examples/account/create-verification.md | 0 .../docs/examples/account/create.md | 0 .../docs/examples/account/delete-session.md | 0 .../docs/examples/account/delete-sessions.md | 0 .../docs/examples/account/delete.md | 0 .../docs/examples/account/get-logs.md | 0 .../docs/examples/account/get-prefs.md | 0 .../docs/examples/account/get-sessions.md | 0 .../client-web/docs/examples/account/get.md | 0 .../docs/examples/account/update-email.md | 0 .../docs/examples/account/update-name.md | 0 .../docs/examples/account/update-password.md | 0 .../docs/examples/account/update-prefs.md | 0 .../docs/examples/account/update-recovery.md | 0 .../examples/account/update-verification.md | 0 .../docs/examples/avatars/get-browser.md | 0 .../docs/examples/avatars/get-credit-card.md | 0 .../docs/examples/avatars/get-favicon.md | 0 .../docs/examples/avatars/get-flag.md | 0 .../docs/examples/avatars/get-image.md | 0 .../docs/examples/avatars/get-initials.md | 0 .../docs/examples/avatars/get-q-r.md | 0 .../docs/examples/database/create-document.md | 0 .../docs/examples/database/delete-document.md | 0 .../docs/examples/database/get-document.md | 0 .../docs/examples/database/list-documents.md | 0 .../docs/examples/database/update-document.md | 0 .../docs/examples/locale/get-continents.md | 0 .../docs/examples/locale/get-countries-e-u.md | 0 .../examples/locale/get-countries-phones.md | 0 .../docs/examples/locale/get-countries.md | 0 .../docs/examples/locale/get-currencies.md | 0 .../docs/examples/locale/get-languages.md | 0 .../client-web/docs/examples/locale/get.md | 0 .../docs/examples/storage/create-file.md | 0 .../docs/examples/storage/delete-file.md | 0 .../examples/storage/get-file-download.md | 0 .../docs/examples/storage/get-file-preview.md | 0 .../docs/examples/storage/get-file-view.md | 0 .../docs/examples/storage/get-file.md | 0 .../docs/examples/storage/list-files.md | 0 .../docs/examples/storage/update-file.md | 0 .../docs/examples/teams/create-membership.md | 0 .../client-web/docs/examples/teams/create.md | 0 .../docs/examples/teams/delete-membership.md | 0 .../client-web/docs/examples/teams/delete.md | 0 .../docs/examples/teams/get-memberships.md | 0 .../client-web/docs/examples/teams/get.md | 0 .../client-web/docs/examples/teams/list.md | 0 .../teams/update-membership-status.md | 0 .../client-web/docs/examples/teams/update.md | 0 app/sdks/{ => 0.6.2}/client-web/package.json | 0 app/sdks/{ => 0.6.2}/client-web/src/sdk.js | 0 .../{ => 0.6.2}/client-web/src/sdk.min.js | 0 app/sdks/{ => 0.6.2}/client-web/tsconfig.json | 0 .../{ => 0.6.2}/client-web/types/index.d.ts | 0 app/sdks/{ => 0.6.2}/console-web/CHANGELOG.md | 0 app/sdks/{ => 0.6.2}/console-web/LICENSE | 0 app/sdks/{ => 0.6.2}/console-web/README.md | 0 .../examples/account/create-o-auth2session.md | 0 .../docs/examples/account/create-recovery.md | 0 .../docs/examples/account/create-session.md | 0 .../examples/account/create-verification.md | 0 .../docs/examples/account/create.md | 0 .../docs/examples/account/delete-session.md | 0 .../docs/examples/account/delete-sessions.md | 0 .../docs/examples/account/delete.md | 0 .../docs/examples/account/get-logs.md | 0 .../docs/examples/account/get-prefs.md | 0 .../docs/examples/account/get-sessions.md | 0 .../console-web/docs/examples/account/get.md | 0 .../docs/examples/account/update-email.md | 0 .../docs/examples/account/update-name.md | 0 .../docs/examples/account/update-password.md | 0 .../docs/examples/account/update-prefs.md | 0 .../docs/examples/account/update-recovery.md | 0 .../examples/account/update-verification.md | 0 .../docs/examples/avatars/get-browser.md | 0 .../docs/examples/avatars/get-credit-card.md | 0 .../docs/examples/avatars/get-favicon.md | 0 .../docs/examples/avatars/get-flag.md | 0 .../docs/examples/avatars/get-image.md | 0 .../docs/examples/avatars/get-initials.md | 0 .../docs/examples/avatars/get-q-r.md | 0 .../console-web/docs/examples/bar/delete.md | 0 .../console-web/docs/examples/bar/get.md | 0 .../console-web/docs/examples/bar/patch.md | 0 .../console-web/docs/examples/bar/post.md | 0 .../console-web/docs/examples/bar/put.md | 0 .../examples/database/create-collection.md | 0 .../docs/examples/database/create-document.md | 0 .../examples/database/delete-collection.md | 0 .../docs/examples/database/delete-document.md | 0 .../examples/database/get-collection-logs.md | 0 .../docs/examples/database/get-collection.md | 0 .../docs/examples/database/get-document.md | 0 .../examples/database/list-collections.md | 0 .../docs/examples/database/list-documents.md | 0 .../examples/database/update-collection.md | 0 .../docs/examples/database/update-document.md | 0 .../console-web/docs/examples/foo/delete.md | 0 .../console-web/docs/examples/foo/get.md | 0 .../console-web/docs/examples/foo/patch.md | 0 .../console-web/docs/examples/foo/post.md | 0 .../console-web/docs/examples/foo/put.md | 0 .../examples/functions/create-execution.md | 0 .../docs/examples/functions/create-tag.md | 0 .../docs/examples/functions/create.md | 0 .../docs/examples/functions/delete-tag.md | 0 .../docs/examples/functions/delete.md | 0 .../docs/examples/functions/get-execution.md | 0 .../docs/examples/functions/get-tag.md | 0 .../docs/examples/functions/get.md | 0 .../examples/functions/list-executions.md | 0 .../docs/examples/functions/list-tags.md | 0 .../docs/examples/functions/list.md | 0 .../docs/examples/functions/update-active.md | 0 .../docs/examples/functions/update-tag.md | 0 .../docs/examples/functions/update.md | 0 .../docs/examples/general/empty.md | 0 .../docs/examples/general/get-cookie.md | 0 .../docs/examples/general/redirect.md | 0 .../docs/examples/general/redirected.md | 0 .../docs/examples/general/set-cookie.md | 0 .../docs/examples/general/upload.md | 0 .../docs/examples/health/get-anti-virus.md | 0 .../docs/examples/health/get-cache.md | 0 .../docs/examples/health/get-d-b.md | 0 .../examples/health/get-queue-certificates.md | 0 .../examples/health/get-queue-functions.md | 0 .../docs/examples/health/get-queue-logs.md | 0 .../docs/examples/health/get-queue-tasks.md | 0 .../docs/examples/health/get-queue-usage.md | 0 .../examples/health/get-queue-webhooks.md | 0 .../docs/examples/health/get-storage-local.md | 0 .../docs/examples/health/get-time.md | 0 .../console-web/docs/examples/health/get.md | 0 .../docs/examples/locale/get-continents.md | 0 .../docs/examples/locale/get-countries-e-u.md | 0 .../examples/locale/get-countries-phones.md | 0 .../docs/examples/locale/get-countries.md | 0 .../docs/examples/locale/get-currencies.md | 0 .../docs/examples/locale/get-languages.md | 0 .../console-web/docs/examples/locale/get.md | 0 .../docs/examples/projects/create-domain.md | 0 .../docs/examples/projects/create-key.md | 0 .../docs/examples/projects/create-platform.md | 0 .../docs/examples/projects/create-task.md | 0 .../docs/examples/projects/create-webhook.md | 0 .../docs/examples/projects/create.md | 0 .../docs/examples/projects/delete-domain.md | 0 .../docs/examples/projects/delete-key.md | 0 .../docs/examples/projects/delete-platform.md | 0 .../docs/examples/projects/delete-task.md | 0 .../docs/examples/projects/delete-webhook.md | 0 .../docs/examples/projects/delete.md | 0 .../docs/examples/projects/get-domain.md | 0 .../docs/examples/projects/get-key.md | 0 .../docs/examples/projects/get-platform.md | 0 .../docs/examples/projects/get-task.md | 0 .../docs/examples/projects/get-usage.md | 0 .../docs/examples/projects/get-webhook.md | 0 .../console-web/docs/examples/projects/get.md | 0 .../docs/examples/projects/list-domains.md | 0 .../docs/examples/projects/list-keys.md | 0 .../docs/examples/projects/list-platforms.md | 0 .../docs/examples/projects/list-tasks.md | 0 .../docs/examples/projects/list-webhooks.md | 0 .../docs/examples/projects/list.md | 0 .../projects/update-domain-verification.md | 0 .../docs/examples/projects/update-key.md | 0 .../docs/examples/projects/update-o-auth2.md | 0 .../docs/examples/projects/update-platform.md | 0 .../docs/examples/projects/update-task.md | 0 .../docs/examples/projects/update-webhook.md | 0 .../docs/examples/projects/update.md | 0 .../docs/examples/storage/create-file.md | 0 .../docs/examples/storage/delete-file.md | 0 .../examples/storage/get-file-download.md | 0 .../docs/examples/storage/get-file-preview.md | 0 .../docs/examples/storage/get-file-view.md | 0 .../docs/examples/storage/get-file.md | 0 .../docs/examples/storage/list-files.md | 0 .../docs/examples/storage/update-file.md | 0 .../docs/examples/teams/create-membership.md | 0 .../console-web/docs/examples/teams/create.md | 0 .../docs/examples/teams/delete-membership.md | 0 .../console-web/docs/examples/teams/delete.md | 0 .../docs/examples/teams/get-memberships.md | 0 .../console-web/docs/examples/teams/get.md | 0 .../console-web/docs/examples/teams/list.md | 0 .../teams/update-membership-status.md | 0 .../console-web/docs/examples/teams/update.md | 0 .../console-web/docs/examples/users/create.md | 0 .../docs/examples/users/delete-session.md | 0 .../docs/examples/users/delete-sessions.md | 0 .../docs/examples/users/delete-user.md | 0 .../docs/examples/users/get-logs.md | 0 .../docs/examples/users/get-prefs.md | 0 .../docs/examples/users/get-sessions.md | 0 .../console-web/docs/examples/users/get.md | 0 .../console-web/docs/examples/users/list.md | 0 .../docs/examples/users/update-prefs.md | 0 .../docs/examples/users/update-status.md | 0 app/sdks/{ => 0.6.2}/console-web/package.json | 0 app/sdks/{ => 0.6.2}/console-web/src/sdk.js | 0 .../{ => 0.6.2}/console-web/src/sdk.min.js | 0 .../{ => 0.6.2}/console-web/tsconfig.json | 0 .../{ => 0.6.2}/console-web/types/index.d.ts | 0 app/sdks/{ => 0.6.2}/server-deno/CHANGELOG.md | 0 app/sdks/{ => 0.6.2}/server-deno/LICENSE | 0 app/sdks/{ => 0.6.2}/server-deno/README.md | 0 .../docs/examples/avatars/get-browser.md | 0 .../docs/examples/avatars/get-credit-card.md | 0 .../docs/examples/avatars/get-favicon.md | 0 .../docs/examples/avatars/get-flag.md | 0 .../docs/examples/avatars/get-image.md | 0 .../docs/examples/avatars/get-q-r.md | 0 .../examples/database/create-collection.md | 0 .../docs/examples/database/create-document.md | 0 .../examples/database/delete-collection.md | 0 .../docs/examples/database/delete-document.md | 0 .../examples/database/get-collection-logs.md | 0 .../docs/examples/database/get-collection.md | 0 .../docs/examples/database/get-document.md | 0 .../examples/database/list-collections.md | 0 .../docs/examples/database/list-documents.md | 0 .../examples/database/update-collection.md | 0 .../docs/examples/database/update-document.md | 0 .../docs/examples/health/get-anti-virus.md | 0 .../docs/examples/health/get-cache.md | 0 .../docs/examples/health/get-d-b.md | 0 .../examples/health/get-queue-certificates.md | 0 .../examples/health/get-queue-functions.md | 0 .../docs/examples/health/get-queue-logs.md | 0 .../docs/examples/health/get-queue-tasks.md | 0 .../docs/examples/health/get-queue-usage.md | 0 .../examples/health/get-queue-webhooks.md | 0 .../docs/examples/health/get-storage-local.md | 0 .../docs/examples/health/get-time.md | 0 .../server-deno/docs/examples/health/get.md | 0 .../docs/examples/locale/get-continents.md | 0 .../docs/examples/locale/get-countries-e-u.md | 0 .../examples/locale/get-countries-phones.md | 0 .../docs/examples/locale/get-countries.md | 0 .../docs/examples/locale/get-currencies.md | 0 .../server-deno/docs/examples/locale/get.md | 0 .../docs/examples/storage/create-file.md | 0 .../docs/examples/storage/delete-file.md | 0 .../examples/storage/get-file-download.md | 0 .../docs/examples/storage/get-file-preview.md | 0 .../docs/examples/storage/get-file-view.md | 0 .../docs/examples/storage/get-file.md | 0 .../docs/examples/storage/list-files.md | 0 .../docs/examples/storage/update-file.md | 0 .../docs/examples/teams/create-membership.md | 0 .../server-deno/docs/examples/teams/create.md | 0 .../docs/examples/teams/delete-membership.md | 0 .../server-deno/docs/examples/teams/delete.md | 0 .../docs/examples/teams/get-memberships.md | 0 .../server-deno/docs/examples/teams/get.md | 0 .../server-deno/docs/examples/teams/list.md | 0 .../server-deno/docs/examples/teams/update.md | 0 .../server-deno/docs/examples/users/create.md | 0 .../docs/examples/users/delete-session.md | 0 .../docs/examples/users/delete-sessions.md | 0 .../docs/examples/users/get-logs.md | 0 .../docs/examples/users/get-prefs.md | 0 .../docs/examples/users/get-sessions.md | 0 .../server-deno/docs/examples/users/get.md | 0 .../server-deno/docs/examples/users/list.md | 0 .../docs/examples/users/update-prefs.md | 0 .../docs/examples/users/update-status.md | 0 app/sdks/{ => 0.6.2}/server-deno/mod.ts | 0 .../{ => 0.6.2}/server-deno/src/client.ts | 0 .../{ => 0.6.2}/server-deno/src/service.ts | 0 .../server-deno/src/services/avatars.ts | 0 .../server-deno/src/services/database.ts | 0 .../server-deno/src/services/health.ts | 0 .../server-deno/src/services/locale.ts | 0 .../server-deno/src/services/storage.ts | 0 .../server-deno/src/services/teams.ts | 0 .../server-deno/src/services/users.ts | 0 app/sdks/{ => 0.6.2}/server-go/CHANGELOG.md | 0 app/sdks/{ => 0.6.2}/server-go/LICENSE | 0 app/sdks/{ => 0.6.2}/server-go/README.md | 0 app/sdks/{ => 0.6.2}/server-go/avatars.go | 0 app/sdks/{ => 0.6.2}/server-go/client.go | 0 app/sdks/{ => 0.6.2}/server-go/database.go | 0 .../docs/examples/avatars/get-browser.md | 0 .../docs/examples/avatars/get-credit-card.md | 0 .../docs/examples/avatars/get-favicon.md | 0 .../docs/examples/avatars/get-flag.md | 0 .../docs/examples/avatars/get-image.md | 0 .../docs/examples/avatars/get-q-r.md | 0 .../examples/database/create-collection.md | 0 .../docs/examples/database/create-document.md | 0 .../examples/database/delete-collection.md | 0 .../docs/examples/database/delete-document.md | 0 .../examples/database/get-collection-logs.md | 0 .../docs/examples/database/get-collection.md | 0 .../docs/examples/database/get-document.md | 0 .../examples/database/list-collections.md | 0 .../docs/examples/database/list-documents.md | 0 .../examples/database/update-collection.md | 0 .../docs/examples/database/update-document.md | 0 .../examples/functions/create-execution.md | 0 .../docs/examples/functions/create-tag.md | 0 .../docs/examples/functions/create.md | 0 .../docs/examples/functions/delete-tag.md | 0 .../docs/examples/functions/delete.md | 0 .../docs/examples/functions/get-execution.md | 0 .../docs/examples/functions/get-tag.md | 0 .../server-go/docs/examples/functions/get.md | 0 .../examples/functions/list-executions.md | 0 .../docs/examples/functions/list-tags.md | 0 .../server-go/docs/examples/functions/list.md | 0 .../docs/examples/functions/update-active.md | 0 .../docs/examples/functions/update-tag.md | 0 .../docs/examples/functions/update.md | 0 .../docs/examples/health/get-anti-virus.md | 0 .../docs/examples/health/get-cache.md | 0 .../server-go/docs/examples/health/get-d-b.md | 0 .../examples/health/get-queue-certificates.md | 0 .../examples/health/get-queue-functions.md | 0 .../docs/examples/health/get-queue-logs.md | 0 .../docs/examples/health/get-queue-tasks.md | 0 .../docs/examples/health/get-queue-usage.md | 0 .../examples/health/get-queue-webhooks.md | 0 .../examples/health/get-storage-anti-virus.md | 0 .../docs/examples/health/get-storage-local.md | 0 .../docs/examples/health/get-time.md | 0 .../server-go/docs/examples/health/get.md | 0 .../docs/examples/locale/get-continents.md | 0 .../docs/examples/locale/get-countries-e-u.md | 0 .../examples/locale/get-countries-phones.md | 0 .../docs/examples/locale/get-countries.md | 0 .../docs/examples/locale/get-currencies.md | 0 .../server-go/docs/examples/locale/get.md | 0 .../docs/examples/storage/create-file.md | 0 .../docs/examples/storage/delete-file.md | 0 .../examples/storage/get-file-download.md | 0 .../docs/examples/storage/get-file-preview.md | 0 .../docs/examples/storage/get-file-view.md | 0 .../docs/examples/storage/get-file.md | 0 .../docs/examples/storage/list-files.md | 0 .../docs/examples/storage/update-file.md | 0 .../docs/examples/teams/create-membership.md | 0 .../server-go/docs/examples/teams/create.md | 0 .../docs/examples/teams/delete-membership.md | 0 .../server-go/docs/examples/teams/delete.md | 0 .../docs/examples/teams/get-memberships.md | 0 .../server-go/docs/examples/teams/get.md | 0 .../server-go/docs/examples/teams/list.md | 0 .../server-go/docs/examples/teams/update.md | 0 .../server-go/docs/examples/users/create.md | 0 .../docs/examples/users/delete-session.md | 0 .../docs/examples/users/delete-sessions.md | 0 .../server-go/docs/examples/users/get-logs.md | 0 .../docs/examples/users/get-prefs.md | 0 .../docs/examples/users/get-sessions.md | 0 .../server-go/docs/examples/users/get.md | 0 .../server-go/docs/examples/users/list.md | 0 .../docs/examples/users/update-prefs.md | 0 .../docs/examples/users/update-status.md | 0 app/sdks/{ => 0.6.2}/server-go/functions.go | 0 app/sdks/{ => 0.6.2}/server-go/health.go | 0 app/sdks/{ => 0.6.2}/server-go/locale.go | 0 app/sdks/{ => 0.6.2}/server-go/main.go | 0 app/sdks/{ => 0.6.2}/server-go/storage.go | 0 app/sdks/{ => 0.6.2}/server-go/teams.go | 0 app/sdks/{ => 0.6.2}/server-go/users.go | 0 app/sdks/{ => 0.6.2}/server-go/utils.go | 0 app/sdks/{ => 0.6.2}/server-java/CHANGELOG.md | 0 app/sdks/{ => 0.6.2}/server-java/LICENSE | 0 app/sdks/{ => 0.6.2}/server-java/README.md | 0 app/sdks/{ => 0.6.2}/server-java/pom.xml | 0 .../server-java/src/main/java/Client.java | 0 .../src/main/java/enums/OrderType.java | 0 .../src/main/java/services/Avatars.java | 0 .../src/main/java/services/Database.java | 0 .../src/main/java/services/Functions.java | 0 .../src/main/java/services/Health.java | 0 .../src/main/java/services/Locale.java | 0 .../src/main/java/services/Service.java | 0 .../src/main/java/services/Storage.java | 0 .../src/main/java/services/Teams.java | 0 .../src/main/java/services/Users.java | 0 .../{ => 0.6.2}/server-nodejs/CHANGELOG.md | 0 app/sdks/{ => 0.6.2}/server-nodejs/LICENSE | 0 app/sdks/{ => 0.6.2}/server-nodejs/README.md | 0 .../docs/examples/avatars/get-browser.md | 0 .../docs/examples/avatars/get-credit-card.md | 0 .../docs/examples/avatars/get-favicon.md | 0 .../docs/examples/avatars/get-flag.md | 0 .../docs/examples/avatars/get-image.md | 0 .../docs/examples/avatars/get-q-r.md | 0 .../examples/database/create-collection.md | 0 .../docs/examples/database/create-document.md | 0 .../examples/database/delete-collection.md | 0 .../docs/examples/database/delete-document.md | 0 .../examples/database/get-collection-logs.md | 0 .../docs/examples/database/get-collection.md | 0 .../docs/examples/database/get-document.md | 0 .../examples/database/list-collections.md | 0 .../docs/examples/database/list-documents.md | 0 .../examples/database/update-collection.md | 0 .../docs/examples/database/update-document.md | 0 .../examples/functions/create-execution.md | 0 .../docs/examples/functions/create-tag.md | 0 .../docs/examples/functions/create.md | 0 .../docs/examples/functions/delete-tag.md | 0 .../docs/examples/functions/delete.md | 0 .../docs/examples/functions/get-execution.md | 0 .../docs/examples/functions/get-tag.md | 0 .../docs/examples/functions/get.md | 0 .../examples/functions/list-executions.md | 0 .../docs/examples/functions/list-tags.md | 0 .../docs/examples/functions/list.md | 0 .../docs/examples/functions/update-active.md | 0 .../docs/examples/functions/update-tag.md | 0 .../docs/examples/functions/update.md | 0 .../docs/examples/health/get-anti-virus.md | 0 .../docs/examples/health/get-cache.md | 0 .../docs/examples/health/get-d-b.md | 0 .../examples/health/get-queue-certificates.md | 0 .../examples/health/get-queue-functions.md | 0 .../docs/examples/health/get-queue-logs.md | 0 .../docs/examples/health/get-queue-tasks.md | 0 .../docs/examples/health/get-queue-usage.md | 0 .../examples/health/get-queue-webhooks.md | 0 .../examples/health/get-storage-anti-virus.md | 0 .../docs/examples/health/get-storage-local.md | 0 .../docs/examples/health/get-time.md | 0 .../server-nodejs/docs/examples/health/get.md | 0 .../docs/examples/locale/get-continents.md | 0 .../docs/examples/locale/get-countries-e-u.md | 0 .../examples/locale/get-countries-phones.md | 0 .../docs/examples/locale/get-countries.md | 0 .../docs/examples/locale/get-currencies.md | 0 .../server-nodejs/docs/examples/locale/get.md | 0 .../docs/examples/storage/create-file.md | 0 .../docs/examples/storage/delete-file.md | 0 .../examples/storage/get-file-download.md | 0 .../docs/examples/storage/get-file-preview.md | 0 .../docs/examples/storage/get-file-view.md | 0 .../docs/examples/storage/get-file.md | 0 .../docs/examples/storage/list-files.md | 0 .../docs/examples/storage/update-file.md | 0 .../docs/examples/teams/create-membership.md | 0 .../docs/examples/teams/create.md | 0 .../docs/examples/teams/delete-membership.md | 0 .../docs/examples/teams/delete.md | 0 .../docs/examples/teams/get-memberships.md | 0 .../server-nodejs/docs/examples/teams/get.md | 0 .../server-nodejs/docs/examples/teams/list.md | 0 .../docs/examples/teams/update.md | 0 .../docs/examples/users/create.md | 0 .../docs/examples/users/delete-session.md | 0 .../docs/examples/users/delete-sessions.md | 0 .../docs/examples/users/get-logs.md | 0 .../docs/examples/users/get-prefs.md | 0 .../docs/examples/users/get-sessions.md | 0 .../server-nodejs/docs/examples/users/get.md | 0 .../server-nodejs/docs/examples/users/list.md | 0 .../docs/examples/users/update-prefs.md | 0 .../docs/examples/users/update-status.md | 0 app/sdks/{ => 0.6.2}/server-nodejs/index.js | 0 .../{ => 0.6.2}/server-nodejs/lib/client.js | 0 .../{ => 0.6.2}/server-nodejs/lib/service.js | 0 .../server-nodejs/lib/services/avatars.js | 0 .../server-nodejs/lib/services/database.js | 0 .../server-nodejs/lib/services/functions.js | 0 .../server-nodejs/lib/services/health.js | 0 .../server-nodejs/lib/services/locale.js | 0 .../server-nodejs/lib/services/storage.js | 0 .../server-nodejs/lib/services/teams.js | 0 .../server-nodejs/lib/services/users.js | 0 .../{ => 0.6.2}/server-nodejs/package.json | 0 app/sdks/{ => 0.6.2}/server-php/CHANGELOG.md | 0 app/sdks/{ => 0.6.2}/server-php/LICENSE | 0 app/sdks/{ => 0.6.2}/server-php/README.md | 0 app/sdks/{ => 0.6.2}/server-php/composer.json | 0 .../{ => 0.6.2}/server-php/docs/avatars.md | 0 .../{ => 0.6.2}/server-php/docs/database.md | 0 .../docs/examples/avatars/get-browser.md | 0 .../docs/examples/avatars/get-credit-card.md | 0 .../docs/examples/avatars/get-favicon.md | 0 .../docs/examples/avatars/get-flag.md | 0 .../docs/examples/avatars/get-image.md | 0 .../docs/examples/avatars/get-q-r.md | 0 .../examples/database/create-collection.md | 0 .../docs/examples/database/create-document.md | 0 .../examples/database/delete-collection.md | 0 .../docs/examples/database/delete-document.md | 0 .../examples/database/get-collection-logs.md | 0 .../docs/examples/database/get-collection.md | 0 .../docs/examples/database/get-document.md | 0 .../examples/database/list-collections.md | 0 .../docs/examples/database/list-documents.md | 0 .../examples/database/update-collection.md | 0 .../docs/examples/database/update-document.md | 0 .../examples/functions/create-execution.md | 0 .../docs/examples/functions/create-tag.md | 0 .../docs/examples/functions/create.md | 0 .../docs/examples/functions/delete-tag.md | 0 .../docs/examples/functions/delete.md | 0 .../docs/examples/functions/get-execution.md | 0 .../docs/examples/functions/get-tag.md | 0 .../server-php/docs/examples/functions/get.md | 0 .../examples/functions/list-executions.md | 0 .../docs/examples/functions/list-tags.md | 0 .../docs/examples/functions/list.md | 0 .../docs/examples/functions/update-active.md | 0 .../docs/examples/functions/update-tag.md | 0 .../docs/examples/functions/update.md | 0 .../docs/examples/health/get-anti-virus.md | 0 .../docs/examples/health/get-cache.md | 0 .../docs/examples/health/get-d-b.md | 0 .../examples/health/get-queue-certificates.md | 0 .../examples/health/get-queue-functions.md | 0 .../docs/examples/health/get-queue-logs.md | 0 .../docs/examples/health/get-queue-tasks.md | 0 .../docs/examples/health/get-queue-usage.md | 0 .../examples/health/get-queue-webhooks.md | 0 .../examples/health/get-storage-anti-virus.md | 0 .../docs/examples/health/get-storage-local.md | 0 .../docs/examples/health/get-time.md | 0 .../server-php/docs/examples/health/get.md | 0 .../docs/examples/locale/get-continents.md | 0 .../docs/examples/locale/get-countries-e-u.md | 0 .../examples/locale/get-countries-phones.md | 0 .../docs/examples/locale/get-countries.md | 0 .../docs/examples/locale/get-currencies.md | 0 .../server-php/docs/examples/locale/get.md | 0 .../docs/examples/storage/create-file.md | 0 .../docs/examples/storage/delete-file.md | 0 .../examples/storage/get-file-download.md | 0 .../docs/examples/storage/get-file-preview.md | 0 .../docs/examples/storage/get-file-view.md | 0 .../docs/examples/storage/get-file.md | 0 .../docs/examples/storage/list-files.md | 0 .../docs/examples/storage/update-file.md | 0 .../docs/examples/teams/create-membership.md | 0 .../server-php/docs/examples/teams/create.md | 0 .../docs/examples/teams/delete-membership.md | 0 .../server-php/docs/examples/teams/delete.md | 0 .../docs/examples/teams/get-memberships.md | 0 .../server-php/docs/examples/teams/get.md | 0 .../server-php/docs/examples/teams/list.md | 0 .../server-php/docs/examples/teams/update.md | 0 .../server-php/docs/examples/users/create.md | 0 .../docs/examples/users/delete-session.md | 0 .../docs/examples/users/delete-sessions.md | 0 .../docs/examples/users/get-logs.md | 0 .../docs/examples/users/get-prefs.md | 0 .../docs/examples/users/get-sessions.md | 0 .../server-php/docs/examples/users/get.md | 0 .../server-php/docs/examples/users/list.md | 0 .../docs/examples/users/update-prefs.md | 0 .../docs/examples/users/update-status.md | 0 .../{ => 0.6.2}/server-php/docs/functions.md | 0 .../{ => 0.6.2}/server-php/docs/health.md | 0 .../{ => 0.6.2}/server-php/docs/locale.md | 0 .../{ => 0.6.2}/server-php/docs/storage.md | 0 app/sdks/{ => 0.6.2}/server-php/docs/teams.md | 0 app/sdks/{ => 0.6.2}/server-php/docs/users.md | 0 .../server-php/src/Appwrite/Client.php | 0 .../server-php/src/Appwrite/Service.php | 0 .../src/Appwrite/Services/Avatars.php | 0 .../src/Appwrite/Services/Database.php | 0 .../src/Appwrite/Services/Functions.php | 0 .../src/Appwrite/Services/Health.php | 0 .../src/Appwrite/Services/Locale.php | 0 .../src/Appwrite/Services/Storage.php | 0 .../src/Appwrite/Services/Teams.php | 0 .../src/Appwrite/Services/Users.php | 0 .../{ => 0.6.2}/server-python/CHANGELOG.md | 0 app/sdks/{ => 0.6.2}/server-python/LICENSE | 0 app/sdks/{ => 0.6.2}/server-python/README.md | 0 .../server-python/appwrite/__init__.py | 0 .../server-python/appwrite/client.py | 0 .../server-python/appwrite/service.py | 0 .../appwrite/services/__init__.py | 0 .../appwrite/services/avatars.py | 0 .../appwrite/services/database.py | 0 .../appwrite/services/functions.py | 0 .../server-python/appwrite/services/health.py | 0 .../server-python/appwrite/services/locale.py | 0 .../appwrite/services/storage.py | 0 .../server-python/appwrite/services/teams.py | 0 .../server-python/appwrite/services/users.py | 0 .../docs/examples/avatars/get-browser.md | 0 .../docs/examples/avatars/get-credit-card.md | 0 .../docs/examples/avatars/get-favicon.md | 0 .../docs/examples/avatars/get-flag.md | 0 .../docs/examples/avatars/get-image.md | 0 .../docs/examples/avatars/get-q-r.md | 0 .../examples/database/create-collection.md | 0 .../docs/examples/database/create-document.md | 0 .../examples/database/delete-collection.md | 0 .../docs/examples/database/delete-document.md | 0 .../examples/database/get-collection-logs.md | 0 .../docs/examples/database/get-collection.md | 0 .../docs/examples/database/get-document.md | 0 .../examples/database/list-collections.md | 0 .../docs/examples/database/list-documents.md | 0 .../examples/database/update-collection.md | 0 .../docs/examples/database/update-document.md | 0 .../examples/functions/create-execution.md | 0 .../docs/examples/functions/create-tag.md | 0 .../docs/examples/functions/create.md | 0 .../docs/examples/functions/delete-tag.md | 0 .../docs/examples/functions/delete.md | 0 .../docs/examples/functions/get-execution.md | 0 .../docs/examples/functions/get-tag.md | 0 .../docs/examples/functions/get.md | 0 .../examples/functions/list-executions.md | 0 .../docs/examples/functions/list-tags.md | 0 .../docs/examples/functions/list.md | 0 .../docs/examples/functions/update-active.md | 0 .../docs/examples/functions/update-tag.md | 0 .../docs/examples/functions/update.md | 0 .../docs/examples/health/get-anti-virus.md | 0 .../docs/examples/health/get-cache.md | 0 .../docs/examples/health/get-d-b.md | 0 .../examples/health/get-queue-certificates.md | 0 .../examples/health/get-queue-functions.md | 0 .../docs/examples/health/get-queue-logs.md | 0 .../docs/examples/health/get-queue-tasks.md | 0 .../docs/examples/health/get-queue-usage.md | 0 .../examples/health/get-queue-webhooks.md | 0 .../examples/health/get-storage-anti-virus.md | 0 .../docs/examples/health/get-storage-local.md | 0 .../docs/examples/health/get-time.md | 0 .../server-python/docs/examples/health/get.md | 0 .../docs/examples/locale/get-continents.md | 0 .../docs/examples/locale/get-countries-e-u.md | 0 .../examples/locale/get-countries-phones.md | 0 .../docs/examples/locale/get-countries.md | 0 .../docs/examples/locale/get-currencies.md | 0 .../server-python/docs/examples/locale/get.md | 0 .../docs/examples/storage/create-file.md | 0 .../docs/examples/storage/delete-file.md | 0 .../examples/storage/get-file-download.md | 0 .../docs/examples/storage/get-file-preview.md | 0 .../docs/examples/storage/get-file-view.md | 0 .../docs/examples/storage/get-file.md | 0 .../docs/examples/storage/list-files.md | 0 .../docs/examples/storage/update-file.md | 0 .../docs/examples/teams/create-membership.md | 0 .../docs/examples/teams/create.md | 0 .../docs/examples/teams/delete-membership.md | 0 .../docs/examples/teams/delete.md | 0 .../docs/examples/teams/get-memberships.md | 0 .../server-python/docs/examples/teams/get.md | 0 .../server-python/docs/examples/teams/list.md | 0 .../docs/examples/teams/update.md | 0 .../docs/examples/users/create.md | 0 .../docs/examples/users/delete-session.md | 0 .../docs/examples/users/delete-sessions.md | 0 .../docs/examples/users/get-logs.md | 0 .../docs/examples/users/get-prefs.md | 0 .../docs/examples/users/get-sessions.md | 0 .../server-python/docs/examples/users/get.md | 0 .../server-python/docs/examples/users/list.md | 0 .../docs/examples/users/update-prefs.md | 0 .../docs/examples/users/update-status.md | 0 .../server-python/requirements.txt | 0 app/sdks/{ => 0.6.2}/server-python/setup.cfg | 0 app/sdks/{ => 0.6.2}/server-python/setup.py | 0 app/sdks/{ => 0.6.2}/server-ruby/CHANGELOG.md | 0 app/sdks/{ => 0.6.2}/server-ruby/Gemfile | 0 app/sdks/{ => 0.6.2}/server-ruby/LICENSE | 0 app/sdks/{ => 0.6.2}/server-ruby/README.md | 0 .../{ => 0.6.2}/server-ruby/appwrite.gemspec | 0 .../docs/examples/avatars/get-browser.md | 0 .../docs/examples/avatars/get-credit-card.md | 0 .../docs/examples/avatars/get-favicon.md | 0 .../docs/examples/avatars/get-flag.md | 0 .../docs/examples/avatars/get-image.md | 0 .../docs/examples/avatars/get-q-r.md | 0 .../examples/database/create-collection.md | 0 .../docs/examples/database/create-document.md | 0 .../examples/database/delete-collection.md | 0 .../docs/examples/database/delete-document.md | 0 .../examples/database/get-collection-logs.md | 0 .../docs/examples/database/get-collection.md | 0 .../docs/examples/database/get-document.md | 0 .../examples/database/list-collections.md | 0 .../docs/examples/database/list-documents.md | 0 .../examples/database/update-collection.md | 0 .../docs/examples/database/update-document.md | 0 .../docs/examples/health/get-anti-virus.md | 0 .../docs/examples/health/get-cache.md | 0 .../docs/examples/health/get-d-b.md | 0 .../examples/health/get-queue-certificates.md | 0 .../examples/health/get-queue-functions.md | 0 .../docs/examples/health/get-queue-logs.md | 0 .../docs/examples/health/get-queue-tasks.md | 0 .../docs/examples/health/get-queue-usage.md | 0 .../examples/health/get-queue-webhooks.md | 0 .../docs/examples/health/get-storage-local.md | 0 .../docs/examples/health/get-time.md | 0 .../server-ruby/docs/examples/health/get.md | 0 .../docs/examples/locale/get-continents.md | 0 .../docs/examples/locale/get-countries-e-u.md | 0 .../examples/locale/get-countries-phones.md | 0 .../docs/examples/locale/get-countries.md | 0 .../docs/examples/locale/get-currencies.md | 0 .../server-ruby/docs/examples/locale/get.md | 0 .../docs/examples/storage/create-file.md | 0 .../docs/examples/storage/delete-file.md | 0 .../examples/storage/get-file-download.md | 0 .../docs/examples/storage/get-file-preview.md | 0 .../docs/examples/storage/get-file-view.md | 0 .../docs/examples/storage/get-file.md | 0 .../docs/examples/storage/list-files.md | 0 .../docs/examples/storage/update-file.md | 0 .../docs/examples/teams/create-membership.md | 0 .../server-ruby/docs/examples/teams/create.md | 0 .../docs/examples/teams/delete-membership.md | 0 .../server-ruby/docs/examples/teams/delete.md | 0 .../docs/examples/teams/get-memberships.md | 0 .../server-ruby/docs/examples/teams/get.md | 0 .../server-ruby/docs/examples/teams/list.md | 0 .../server-ruby/docs/examples/teams/update.md | 0 .../server-ruby/docs/examples/users/create.md | 0 .../docs/examples/users/delete-session.md | 0 .../docs/examples/users/delete-sessions.md | 0 .../docs/examples/users/get-logs.md | 0 .../docs/examples/users/get-prefs.md | 0 .../docs/examples/users/get-sessions.md | 0 .../server-ruby/docs/examples/users/get.md | 0 .../server-ruby/docs/examples/users/list.md | 0 .../docs/examples/users/update-prefs.md | 0 .../docs/examples/users/update-status.md | 0 .../{ => 0.6.2}/server-ruby/lib/appwrite.rb | 0 .../server-ruby/lib/appwrite/client.rb | 0 .../server-ruby/lib/appwrite/service.rb | 0 .../lib/appwrite/services/avatars.rb | 0 .../lib/appwrite/services/database.rb | 0 .../lib/appwrite/services/functions.rb | 0 .../lib/appwrite/services/health.rb | 0 .../lib/appwrite/services/locale.rb | 0 .../lib/appwrite/services/storage.rb | 0 .../lib/appwrite/services/teams.rb | 0 .../lib/appwrite/services/users.rb | 0 .../0.7.0/client-flutter-dev/CHANGELOG.md | 64 + app/sdks/0.7.0/client-flutter-dev/LICENSE | 12 + app/sdks/0.7.0/client-flutter-dev/README.md | 38 + .../examples/account/create-o-auth2session.md | 22 + .../docs/examples/account/create-recovery.md | 23 + .../docs/examples/account/create-session.md | 23 + .../examples/account/create-verification.md | 22 + .../docs/examples/account/create.md | 23 + .../docs/examples/account/delete-session.md | 22 + .../docs/examples/account/delete-sessions.md | 20 + .../docs/examples/account/delete.md | 20 + .../docs/examples/account/get-logs.md | 20 + .../docs/examples/account/get-prefs.md | 20 + .../docs/examples/account/get-sessions.md | 20 + .../docs/examples/account/get.md | 20 + .../docs/examples/account/update-email.md | 23 + .../docs/examples/account/update-name.md | 22 + .../docs/examples/account/update-password.md | 23 + .../docs/examples/account/update-prefs.md | 22 + .../docs/examples/account/update-recovery.md | 25 + .../examples/account/update-verification.md | 23 + .../docs/examples/avatars/get-browser.md | 17 + .../docs/examples/avatars/get-credit-card.md | 17 + .../docs/examples/avatars/get-favicon.md | 17 + .../docs/examples/avatars/get-flag.md | 17 + .../docs/examples/avatars/get-image.md | 17 + .../docs/examples/avatars/get-q-r.md | 17 + .../docs/examples/database/create-document.md | 25 + .../docs/examples/database/delete-document.md | 23 + .../docs/examples/database/get-document.md | 23 + .../docs/examples/database/list-documents.md | 22 + .../docs/examples/database/update-document.md | 26 + .../docs/examples/locale/get-continents.md | 20 + .../docs/examples/locale/get-countries-e-u.md | 20 + .../examples/locale/get-countries-phones.md | 20 + .../docs/examples/locale/get-countries.md | 20 + .../docs/examples/locale/get-currencies.md | 20 + .../docs/examples/locale/get.md | 20 + .../docs/examples/storage/create-file.md | 25 + .../docs/examples/storage/delete-file.md | 22 + .../examples/storage/get-file-download.md | 17 + .../docs/examples/storage/get-file-preview.md | 17 + .../docs/examples/storage/get-file-view.md | 17 + .../docs/examples/storage/get-file.md | 22 + .../docs/examples/storage/list-files.md | 21 + .../docs/examples/storage/update-file.md | 24 + .../docs/examples/teams/create-membership.md | 25 + .../docs/examples/teams/create.md | 22 + .../docs/examples/teams/delete-membership.md | 23 + .../docs/examples/teams/delete.md | 22 + .../docs/examples/teams/get-memberships.md | 22 + .../docs/examples/teams/get.md | 22 + .../docs/examples/teams/list.md | 21 + .../teams/update-membership-status.md | 25 + .../docs/examples/teams/update.md | 23 + .../client-flutter-dev/example/README.md | 55 + .../client-flutter-dev/lib/appwrite.dart | 10 + .../client-flutter-dev/lib/appwrite_dev.dart | 10 + .../0.7.0/client-flutter-dev/lib/client.dart | 134 + .../0.7.0/client-flutter-dev/lib/enums.dart | 15 + .../0.7.0/client-flutter-dev/lib/service.dart | 7 + .../lib/services/account.dart | 424 ++ .../lib/services/avatars.dart | 198 + .../lib/services/database.dart | 121 + .../lib/services/locale.dart | 125 + .../lib/services/storage.dart | 203 + .../lib/services/teams.dart | 203 + .../0.7.0/client-flutter-dev/pubspec.yaml | 23 + app/sdks/0.7.0/client-flutter/CHANGELOG.md | 60 + app/sdks/0.7.0/client-flutter/LICENSE | 12 + app/sdks/0.7.0/client-flutter/README.md | 38 + .../examples/account/create-o-auth2session.md | 22 + .../docs/examples/account/create-recovery.md | 23 + .../docs/examples/account/create-session.md | 23 + .../examples/account/create-verification.md | 22 + .../docs/examples/account/create.md | 23 + .../docs/examples/account/delete-session.md | 22 + .../docs/examples/account/delete-sessions.md | 20 + .../docs/examples/account/delete.md | 20 + .../docs/examples/account/get-logs.md | 20 + .../docs/examples/account/get-prefs.md | 20 + .../docs/examples/account/get-sessions.md | 20 + .../docs/examples/account/get.md | 20 + .../docs/examples/account/update-email.md | 23 + .../docs/examples/account/update-name.md | 22 + .../docs/examples/account/update-password.md | 23 + .../docs/examples/account/update-prefs.md | 22 + .../docs/examples/account/update-recovery.md | 25 + .../examples/account/update-verification.md | 23 + .../docs/examples/avatars/get-browser.md | 17 + .../docs/examples/avatars/get-credit-card.md | 17 + .../docs/examples/avatars/get-favicon.md | 17 + .../docs/examples/avatars/get-flag.md | 17 + .../docs/examples/avatars/get-image.md | 17 + .../docs/examples/avatars/get-initials.md | 16 + .../docs/examples/avatars/get-q-r.md | 17 + .../docs/examples/database/create-document.md | 25 + .../docs/examples/database/delete-document.md | 23 + .../docs/examples/database/get-document.md | 23 + .../docs/examples/database/list-documents.md | 22 + .../docs/examples/database/update-document.md | 26 + .../docs/examples/locale/get-continents.md | 20 + .../docs/examples/locale/get-countries-e-u.md | 20 + .../examples/locale/get-countries-phones.md | 20 + .../docs/examples/locale/get-countries.md | 20 + .../docs/examples/locale/get-currencies.md | 20 + .../docs/examples/locale/get-languages.md | 20 + .../docs/examples/locale/get.md | 20 + .../docs/examples/storage/create-file.md | 25 + .../docs/examples/storage/delete-file.md | 22 + .../examples/storage/get-file-download.md | 17 + .../docs/examples/storage/get-file-preview.md | 17 + .../docs/examples/storage/get-file-view.md | 17 + .../docs/examples/storage/get-file.md | 22 + .../docs/examples/storage/list-files.md | 21 + .../docs/examples/storage/update-file.md | 24 + .../docs/examples/teams/create-membership.md | 25 + .../docs/examples/teams/create.md | 22 + .../docs/examples/teams/delete-membership.md | 23 + .../docs/examples/teams/delete.md | 22 + .../docs/examples/teams/get-memberships.md | 22 + .../client-flutter/docs/examples/teams/get.md | 22 + .../docs/examples/teams/list.md | 21 + .../teams/update-membership-status.md | 25 + .../docs/examples/teams/update.md | 23 + .../0.7.0/client-flutter/example/README.md | 55 + .../0.7.0/client-flutter/lib/appwrite.dart | 10 + app/sdks/0.7.0/client-flutter/lib/client.dart | 134 + app/sdks/0.7.0/client-flutter/lib/enums.dart | 15 + .../0.7.0/client-flutter/lib/service.dart | 7 + .../client-flutter/lib/services/account.dart | 435 ++ .../client-flutter/lib/services/avatars.dart | 238 + .../client-flutter/lib/services/database.dart | 119 + .../client-flutter/lib/services/locale.dart | 143 + .../client-flutter/lib/services/storage.dart | 203 + .../client-flutter/lib/services/teams.dart | 207 + app/sdks/0.7.0/client-flutter/pubspec.yaml | 24 + app/sdks/0.7.0/client-swift/CHANGELOG.md | 1 + app/sdks/0.7.0/client-swift/LICENSE | 12 + app/sdks/0.7.0/client-swift/Package.swift | 35 + app/sdks/0.7.0/client-swift/README.md | 24 + .../Sources/Appwrite/Client.swift | 231 + .../Sources/Appwrite/Service.swift | 16 + .../Sources/Appwrite/Services/Account.swift | 491 ++ .../Sources/Appwrite/Services/Avatars.swift | 233 + .../Sources/Appwrite/Services/Database.swift | 183 + .../Sources/Appwrite/Services/Locale.swift | 164 + .../Sources/Appwrite/Services/Storage.swift | 246 + .../Sources/Appwrite/Services/Teams.swift | 298 + app/sdks/0.7.0/client-swift/docs/account.md | 240 + app/sdks/0.7.0/client-swift/docs/avatars.md | 124 + app/sdks/0.7.0/client-swift/docs/database.md | 90 + .../examples/account/create-o-auth2session.md | 14 + .../docs/examples/account/create-recovery.md | 14 + .../docs/examples/account/create-session.md | 14 + .../examples/account/create-verification.md | 14 + .../docs/examples/account/create.md | 14 + .../docs/examples/account/delete-session.md | 14 + .../docs/examples/account/delete-sessions.md | 14 + .../docs/examples/account/delete.md | 14 + .../docs/examples/account/get-logs.md | 14 + .../docs/examples/account/get-prefs.md | 14 + .../docs/examples/account/get-sessions.md | 14 + .../client-swift/docs/examples/account/get.md | 14 + .../docs/examples/account/update-email.md | 14 + .../docs/examples/account/update-name.md | 14 + .../docs/examples/account/update-password.md | 14 + .../docs/examples/account/update-prefs.md | 14 + .../docs/examples/account/update-recovery.md | 14 + .../examples/account/update-verification.md | 14 + .../docs/examples/avatars/get-browser.md | 14 + .../docs/examples/avatars/get-credit-card.md | 14 + .../docs/examples/avatars/get-favicon.md | 14 + .../docs/examples/avatars/get-flag.md | 14 + .../docs/examples/avatars/get-image.md | 14 + .../docs/examples/avatars/get-initials.md | 14 + .../docs/examples/avatars/get-q-r.md | 14 + .../docs/examples/database/create-document.md | 14 + .../docs/examples/database/delete-document.md | 14 + .../docs/examples/database/get-document.md | 14 + .../docs/examples/database/list-documents.md | 14 + .../docs/examples/database/update-document.md | 14 + .../docs/examples/locale/get-continents.md | 14 + .../docs/examples/locale/get-countries-e-u.md | 14 + .../examples/locale/get-countries-phones.md | 14 + .../docs/examples/locale/get-countries.md | 14 + .../docs/examples/locale/get-currencies.md | 14 + .../docs/examples/locale/get-languages.md | 14 + .../client-swift/docs/examples/locale/get.md | 14 + .../docs/examples/storage/create-file.md | 14 + .../docs/examples/storage/delete-file.md | 14 + .../examples/storage/get-file-download.md | 14 + .../docs/examples/storage/get-file-preview.md | 14 + .../docs/examples/storage/get-file-view.md | 14 + .../docs/examples/storage/get-file.md | 14 + .../docs/examples/storage/list-files.md | 14 + .../docs/examples/storage/update-file.md | 14 + .../docs/examples/teams/create-membership.md | 14 + .../docs/examples/teams/create.md | 14 + .../docs/examples/teams/delete-membership.md | 14 + .../docs/examples/teams/delete.md | 14 + .../docs/examples/teams/get-memberships.md | 14 + .../client-swift/docs/examples/teams/get.md | 14 + .../client-swift/docs/examples/teams/list.md | 14 + .../teams/update-membership-status.md | 14 + .../docs/examples/teams/update.md | 14 + app/sdks/0.7.0/client-swift/docs/locale.md | 64 + app/sdks/0.7.0/client-swift/docs/storage.md | 131 + app/sdks/0.7.0/client-swift/docs/teams.md | 153 + app/sdks/0.7.0/client-web/CHANGELOG.md | 1 + app/sdks/0.7.0/client-web/LICENSE | 12 + app/sdks/0.7.0/client-web/README.md | 44 + .../examples/account/create-o-auth2session.md | 10 + .../docs/examples/account/create-recovery.md | 14 + .../docs/examples/account/create-session.md | 14 + .../examples/account/create-verification.md | 14 + .../docs/examples/account/create.md | 14 + .../docs/examples/account/delete-session.md | 14 + .../docs/examples/account/delete-sessions.md | 14 + .../docs/examples/account/delete.md | 14 + .../docs/examples/account/get-logs.md | 14 + .../docs/examples/account/get-prefs.md | 14 + .../docs/examples/account/get-sessions.md | 14 + .../client-web/docs/examples/account/get.md | 14 + .../docs/examples/account/update-email.md | 14 + .../docs/examples/account/update-name.md | 14 + .../docs/examples/account/update-password.md | 14 + .../docs/examples/account/update-prefs.md | 14 + .../docs/examples/account/update-recovery.md | 14 + .../examples/account/update-verification.md | 14 + .../docs/examples/avatars/get-browser.md | 10 + .../docs/examples/avatars/get-credit-card.md | 10 + .../docs/examples/avatars/get-favicon.md | 10 + .../docs/examples/avatars/get-flag.md | 10 + .../docs/examples/avatars/get-image.md | 10 + .../docs/examples/avatars/get-initials.md | 10 + .../docs/examples/avatars/get-q-r.md | 10 + .../docs/examples/database/create-document.md | 14 + .../docs/examples/database/delete-document.md | 14 + .../docs/examples/database/get-document.md | 14 + .../docs/examples/database/list-documents.md | 14 + .../docs/examples/database/update-document.md | 14 + .../docs/examples/locale/get-continents.md | 14 + .../docs/examples/locale/get-countries-e-u.md | 14 + .../examples/locale/get-countries-phones.md | 14 + .../docs/examples/locale/get-countries.md | 14 + .../docs/examples/locale/get-currencies.md | 14 + .../docs/examples/locale/get-languages.md | 14 + .../client-web/docs/examples/locale/get.md | 14 + .../docs/examples/storage/create-file.md | 14 + .../docs/examples/storage/delete-file.md | 14 + .../examples/storage/get-file-download.md | 10 + .../docs/examples/storage/get-file-preview.md | 10 + .../docs/examples/storage/get-file-view.md | 10 + .../docs/examples/storage/get-file.md | 14 + .../docs/examples/storage/list-files.md | 14 + .../docs/examples/storage/update-file.md | 14 + .../docs/examples/teams/create-membership.md | 14 + .../client-web/docs/examples/teams/create.md | 14 + .../docs/examples/teams/delete-membership.md | 14 + .../client-web/docs/examples/teams/delete.md | 14 + .../docs/examples/teams/get-memberships.md | 14 + .../client-web/docs/examples/teams/get.md | 14 + .../client-web/docs/examples/teams/list.md | 14 + .../teams/update-membership-status.md | 14 + .../client-web/docs/examples/teams/update.md | 14 + app/sdks/0.7.0/client-web/package.json | 17 + app/sdks/0.7.0/client-web/src/sdk.js | 2386 ++++++++ app/sdks/0.7.0/client-web/src/sdk.min.js | 187 + app/sdks/0.7.0/client-web/tsconfig.json | 8 + app/sdks/0.7.0/client-web/types/index.d.ts | 868 +++ app/sdks/0.7.0/console-web/CHANGELOG.md | 1 + app/sdks/0.7.0/console-web/LICENSE | 12 + app/sdks/0.7.0/console-web/README.md | 44 + .../examples/account/create-o-auth2session.md | 11 + .../docs/examples/account/create-recovery.md | 15 + .../docs/examples/account/create-session.md | 15 + .../examples/account/create-verification.md | 15 + .../docs/examples/account/create.md | 15 + .../docs/examples/account/delete-session.md | 15 + .../docs/examples/account/delete-sessions.md | 15 + .../docs/examples/account/delete.md | 15 + .../docs/examples/account/get-logs.md | 15 + .../docs/examples/account/get-prefs.md | 15 + .../docs/examples/account/get-sessions.md | 15 + .../console-web/docs/examples/account/get.md | 15 + .../docs/examples/account/update-email.md | 15 + .../docs/examples/account/update-name.md | 15 + .../docs/examples/account/update-password.md | 15 + .../docs/examples/account/update-prefs.md | 15 + .../docs/examples/account/update-recovery.md | 15 + .../examples/account/update-verification.md | 15 + .../docs/examples/avatars/get-browser.md | 11 + .../docs/examples/avatars/get-credit-card.md | 11 + .../docs/examples/avatars/get-favicon.md | 11 + .../docs/examples/avatars/get-flag.md | 11 + .../docs/examples/avatars/get-image.md | 11 + .../docs/examples/avatars/get-initials.md | 11 + .../docs/examples/avatars/get-q-r.md | 11 + .../console-web/docs/examples/bar/delete.md | 15 + .../console-web/docs/examples/bar/get.md | 15 + .../console-web/docs/examples/bar/patch.md | 15 + .../console-web/docs/examples/bar/post.md | 15 + .../console-web/docs/examples/bar/put.md | 15 + .../examples/database/create-collection.md | 15 + .../docs/examples/database/create-document.md | 15 + .../examples/database/delete-collection.md | 15 + .../docs/examples/database/delete-document.md | 15 + .../examples/database/get-collection-logs.md | 15 + .../docs/examples/database/get-collection.md | 15 + .../docs/examples/database/get-document.md | 15 + .../examples/database/list-collections.md | 15 + .../docs/examples/database/list-documents.md | 15 + .../examples/database/update-collection.md | 15 + .../docs/examples/database/update-document.md | 15 + .../console-web/docs/examples/foo/delete.md | 15 + .../console-web/docs/examples/foo/get.md | 15 + .../console-web/docs/examples/foo/patch.md | 15 + .../console-web/docs/examples/foo/post.md | 15 + .../console-web/docs/examples/foo/put.md | 15 + .../examples/functions/create-execution.md | 15 + .../docs/examples/functions/create-tag.md | 15 + .../docs/examples/functions/create.md | 15 + .../docs/examples/functions/delete-tag.md | 15 + .../docs/examples/functions/delete.md | 15 + .../docs/examples/functions/get-execution.md | 15 + .../docs/examples/functions/get-tag.md | 15 + .../docs/examples/functions/get.md | 15 + .../examples/functions/list-executions.md | 15 + .../docs/examples/functions/list-tags.md | 15 + .../docs/examples/functions/list.md | 15 + .../docs/examples/functions/update-active.md | 14 + .../docs/examples/functions/update-tag.md | 15 + .../docs/examples/functions/update.md | 15 + .../docs/examples/general/empty.md | 15 + .../docs/examples/general/get-cookie.md | 15 + .../docs/examples/general/redirect.md | 15 + .../docs/examples/general/redirected.md | 15 + .../docs/examples/general/set-cookie.md | 15 + .../docs/examples/general/upload.md | 15 + .../docs/examples/health/get-anti-virus.md | 15 + .../docs/examples/health/get-cache.md | 15 + .../docs/examples/health/get-d-b.md | 15 + .../examples/health/get-queue-certificates.md | 15 + .../examples/health/get-queue-functions.md | 15 + .../docs/examples/health/get-queue-logs.md | 15 + .../docs/examples/health/get-queue-tasks.md | 15 + .../docs/examples/health/get-queue-usage.md | 15 + .../examples/health/get-queue-webhooks.md | 15 + .../docs/examples/health/get-storage-local.md | 15 + .../docs/examples/health/get-time.md | 15 + .../console-web/docs/examples/health/get.md | 15 + .../docs/examples/locale/get-continents.md | 15 + .../docs/examples/locale/get-countries-e-u.md | 15 + .../examples/locale/get-countries-phones.md | 15 + .../docs/examples/locale/get-countries.md | 15 + .../docs/examples/locale/get-currencies.md | 15 + .../docs/examples/locale/get-languages.md | 15 + .../console-web/docs/examples/locale/get.md | 15 + .../docs/examples/projects/create-domain.md | 15 + .../docs/examples/projects/create-key.md | 15 + .../docs/examples/projects/create-platform.md | 15 + .../docs/examples/projects/create-task.md | 15 + .../docs/examples/projects/create-webhook.md | 15 + .../docs/examples/projects/create.md | 15 + .../docs/examples/projects/delete-domain.md | 15 + .../docs/examples/projects/delete-key.md | 15 + .../docs/examples/projects/delete-platform.md | 15 + .../docs/examples/projects/delete-task.md | 15 + .../docs/examples/projects/delete-webhook.md | 15 + .../docs/examples/projects/delete.md | 15 + .../docs/examples/projects/get-domain.md | 15 + .../docs/examples/projects/get-key.md | 15 + .../docs/examples/projects/get-platform.md | 15 + .../docs/examples/projects/get-task.md | 15 + .../docs/examples/projects/get-usage.md | 15 + .../docs/examples/projects/get-webhook.md | 15 + .../console-web/docs/examples/projects/get.md | 15 + .../docs/examples/projects/list-domains.md | 15 + .../docs/examples/projects/list-keys.md | 15 + .../docs/examples/projects/list-platforms.md | 15 + .../docs/examples/projects/list-tasks.md | 15 + .../docs/examples/projects/list-webhooks.md | 15 + .../docs/examples/projects/list.md | 15 + .../projects/update-domain-verification.md | 15 + .../docs/examples/projects/update-key.md | 15 + .../docs/examples/projects/update-o-auth2.md | 15 + .../docs/examples/projects/update-platform.md | 15 + .../docs/examples/projects/update-task.md | 15 + .../docs/examples/projects/update-webhook.md | 15 + .../docs/examples/projects/update.md | 15 + .../docs/examples/storage/create-file.md | 15 + .../docs/examples/storage/delete-file.md | 15 + .../examples/storage/get-file-download.md | 11 + .../docs/examples/storage/get-file-preview.md | 11 + .../docs/examples/storage/get-file-view.md | 11 + .../docs/examples/storage/get-file.md | 15 + .../docs/examples/storage/list-files.md | 15 + .../docs/examples/storage/update-file.md | 15 + .../docs/examples/teams/create-membership.md | 15 + .../console-web/docs/examples/teams/create.md | 15 + .../docs/examples/teams/delete-membership.md | 15 + .../console-web/docs/examples/teams/delete.md | 15 + .../docs/examples/teams/get-memberships.md | 15 + .../console-web/docs/examples/teams/get.md | 15 + .../console-web/docs/examples/teams/list.md | 15 + .../teams/update-membership-status.md | 15 + .../console-web/docs/examples/teams/update.md | 15 + .../console-web/docs/examples/users/create.md | 15 + .../docs/examples/users/delete-session.md | 15 + .../docs/examples/users/delete-sessions.md | 15 + .../docs/examples/users/delete-user.md | 15 + .../docs/examples/users/get-logs.md | 15 + .../docs/examples/users/get-prefs.md | 15 + .../docs/examples/users/get-sessions.md | 15 + .../console-web/docs/examples/users/get.md | 15 + .../console-web/docs/examples/users/list.md | 15 + .../docs/examples/users/update-prefs.md | 15 + .../docs/examples/users/update-status.md | 15 + app/sdks/0.7.0/console-web/package.json | 17 + app/sdks/0.7.0/console-web/src/sdk.js | 4993 +++++++++++++++++ app/sdks/0.7.0/console-web/src/sdk.min.js | 431 ++ app/sdks/0.7.0/console-web/tsconfig.json | 8 + app/sdks/0.7.0/console-web/types/index.d.ts | 1804 ++++++ app/sdks/0.7.0/server-deno/CHANGELOG.md | 1 + app/sdks/0.7.0/server-deno/LICENSE | 12 + app/sdks/0.7.0/server-deno/README.md | 28 + .../docs/examples/avatars/get-browser.md | 20 + .../docs/examples/avatars/get-credit-card.md | 20 + .../docs/examples/avatars/get-favicon.md | 20 + .../docs/examples/avatars/get-flag.md | 20 + .../docs/examples/avatars/get-image.md | 20 + .../docs/examples/avatars/get-q-r.md | 20 + .../examples/database/create-collection.md | 20 + .../docs/examples/database/create-document.md | 20 + .../examples/database/delete-collection.md | 20 + .../docs/examples/database/delete-document.md | 20 + .../examples/database/get-collection-logs.md | 20 + .../docs/examples/database/get-collection.md | 20 + .../docs/examples/database/get-document.md | 20 + .../examples/database/list-collections.md | 20 + .../docs/examples/database/list-documents.md | 20 + .../examples/database/update-collection.md | 20 + .../docs/examples/database/update-document.md | 20 + .../docs/examples/health/get-anti-virus.md | 20 + .../docs/examples/health/get-cache.md | 20 + .../docs/examples/health/get-d-b.md | 20 + .../examples/health/get-queue-certificates.md | 20 + .../examples/health/get-queue-functions.md | 20 + .../docs/examples/health/get-queue-logs.md | 20 + .../docs/examples/health/get-queue-tasks.md | 20 + .../docs/examples/health/get-queue-usage.md | 20 + .../examples/health/get-queue-webhooks.md | 20 + .../docs/examples/health/get-storage-local.md | 20 + .../docs/examples/health/get-time.md | 20 + .../server-deno/docs/examples/health/get.md | 20 + .../docs/examples/locale/get-continents.md | 20 + .../docs/examples/locale/get-countries-e-u.md | 20 + .../examples/locale/get-countries-phones.md | 20 + .../docs/examples/locale/get-countries.md | 20 + .../docs/examples/locale/get-currencies.md | 20 + .../server-deno/docs/examples/locale/get.md | 20 + .../docs/examples/storage/create-file.md | 20 + .../docs/examples/storage/delete-file.md | 20 + .../examples/storage/get-file-download.md | 20 + .../docs/examples/storage/get-file-preview.md | 20 + .../docs/examples/storage/get-file-view.md | 20 + .../docs/examples/storage/get-file.md | 20 + .../docs/examples/storage/list-files.md | 20 + .../docs/examples/storage/update-file.md | 20 + .../docs/examples/teams/create-membership.md | 20 + .../server-deno/docs/examples/teams/create.md | 20 + .../docs/examples/teams/delete-membership.md | 20 + .../server-deno/docs/examples/teams/delete.md | 20 + .../docs/examples/teams/get-memberships.md | 20 + .../server-deno/docs/examples/teams/get.md | 20 + .../server-deno/docs/examples/teams/list.md | 20 + .../server-deno/docs/examples/teams/update.md | 20 + .../server-deno/docs/examples/users/create.md | 20 + .../docs/examples/users/delete-session.md | 20 + .../docs/examples/users/delete-sessions.md | 20 + .../docs/examples/users/get-logs.md | 20 + .../docs/examples/users/get-prefs.md | 20 + .../docs/examples/users/get-sessions.md | 20 + .../server-deno/docs/examples/users/get.md | 20 + .../server-deno/docs/examples/users/list.md | 20 + .../docs/examples/users/update-prefs.md | 20 + .../docs/examples/users/update-status.md | 20 + app/sdks/0.7.0/server-deno/mod.ts | 19 + app/sdks/0.7.0/server-deno/src/client.ts | 138 + app/sdks/0.7.0/server-deno/src/service.ts | 13 + .../0.7.0/server-deno/src/services/avatars.ts | 163 + .../server-deno/src/services/database.ts | 285 + .../0.7.0/server-deno/src/services/health.ts | 232 + .../0.7.0/server-deno/src/services/locale.ts | 124 + .../0.7.0/server-deno/src/services/storage.ts | 198 + .../0.7.0/server-deno/src/services/teams.ts | 201 + .../0.7.0/server-deno/src/services/users.ts | 214 + app/sdks/0.7.0/server-go/CHANGELOG.md | 1 + app/sdks/0.7.0/server-go/LICENSE | 12 + app/sdks/0.7.0/server-go/README.md | 30 + app/sdks/0.7.0/server-go/avatars.go | 111 + app/sdks/0.7.0/server-go/client.go | 113 + app/sdks/0.7.0/server-go/database.go | 178 + .../docs/examples/avatars/get-browser.md | 25 + .../docs/examples/avatars/get-credit-card.md | 25 + .../docs/examples/avatars/get-favicon.md | 25 + .../docs/examples/avatars/get-flag.md | 25 + .../docs/examples/avatars/get-image.md | 25 + .../docs/examples/avatars/get-q-r.md | 25 + .../examples/database/create-collection.md | 25 + .../docs/examples/database/create-document.md | 25 + .../examples/database/delete-collection.md | 25 + .../docs/examples/database/delete-document.md | 25 + .../examples/database/get-collection-logs.md | 25 + .../docs/examples/database/get-collection.md | 25 + .../docs/examples/database/get-document.md | 25 + .../examples/database/list-collections.md | 25 + .../docs/examples/database/list-documents.md | 25 + .../examples/database/update-collection.md | 25 + .../docs/examples/database/update-document.md | 25 + .../examples/functions/create-execution.md | 25 + .../docs/examples/functions/create-tag.md | 25 + .../docs/examples/functions/create.md | 25 + .../docs/examples/functions/delete-tag.md | 25 + .../docs/examples/functions/delete.md | 25 + .../docs/examples/functions/get-execution.md | 25 + .../docs/examples/functions/get-tag.md | 25 + .../server-go/docs/examples/functions/get.md | 25 + .../examples/functions/list-executions.md | 25 + .../docs/examples/functions/list-tags.md | 25 + .../server-go/docs/examples/functions/list.md | 25 + .../docs/examples/functions/update-active.md | 25 + .../docs/examples/functions/update-tag.md | 25 + .../docs/examples/functions/update.md | 25 + .../docs/examples/health/get-anti-virus.md | 25 + .../docs/examples/health/get-cache.md | 25 + .../server-go/docs/examples/health/get-d-b.md | 25 + .../examples/health/get-queue-certificates.md | 25 + .../examples/health/get-queue-functions.md | 25 + .../docs/examples/health/get-queue-logs.md | 25 + .../docs/examples/health/get-queue-tasks.md | 25 + .../docs/examples/health/get-queue-usage.md | 25 + .../examples/health/get-queue-webhooks.md | 25 + .../examples/health/get-storage-anti-virus.md | 25 + .../docs/examples/health/get-storage-local.md | 25 + .../docs/examples/health/get-time.md | 25 + .../server-go/docs/examples/health/get.md | 25 + .../docs/examples/locale/get-continents.md | 25 + .../docs/examples/locale/get-countries-e-u.md | 25 + .../examples/locale/get-countries-phones.md | 25 + .../docs/examples/locale/get-countries.md | 25 + .../docs/examples/locale/get-currencies.md | 25 + .../server-go/docs/examples/locale/get.md | 25 + .../docs/examples/storage/create-file.md | 25 + .../docs/examples/storage/delete-file.md | 25 + .../examples/storage/get-file-download.md | 25 + .../docs/examples/storage/get-file-preview.md | 25 + .../docs/examples/storage/get-file-view.md | 25 + .../docs/examples/storage/get-file.md | 25 + .../docs/examples/storage/list-files.md | 25 + .../docs/examples/storage/update-file.md | 25 + .../docs/examples/teams/create-membership.md | 25 + .../server-go/docs/examples/teams/create.md | 25 + .../docs/examples/teams/delete-membership.md | 25 + .../server-go/docs/examples/teams/delete.md | 25 + .../docs/examples/teams/get-memberships.md | 25 + .../server-go/docs/examples/teams/get.md | 25 + .../server-go/docs/examples/teams/list.md | 25 + .../server-go/docs/examples/teams/update.md | 25 + .../server-go/docs/examples/users/create.md | 25 + .../docs/examples/users/delete-session.md | 25 + .../docs/examples/users/delete-sessions.md | 25 + .../server-go/docs/examples/users/get-logs.md | 25 + .../docs/examples/users/get-prefs.md | 25 + .../docs/examples/users/get-sessions.md | 25 + .../server-go/docs/examples/users/get.md | 25 + .../server-go/docs/examples/users/list.md | 25 + .../docs/examples/users/update-prefs.md | 25 + .../docs/examples/users/update-status.md | 25 + app/sdks/0.7.0/server-go/functions.go | 186 + app/sdks/0.7.0/server-go/health.go | 153 + app/sdks/0.7.0/server-go/locale.go | 88 + app/sdks/0.7.0/server-go/main.go | 6 + app/sdks/0.7.0/server-go/storage.go | 134 + app/sdks/0.7.0/server-go/teams.go | 140 + app/sdks/0.7.0/server-go/users.go | 137 + app/sdks/0.7.0/server-go/utils.go | 36 + app/sdks/0.7.0/server-java/CHANGELOG.md | 1 + app/sdks/0.7.0/server-java/LICENSE | 12 + app/sdks/0.7.0/server-java/README.md | 43 + app/sdks/0.7.0/server-java/pom.xml | 57 + .../server-java/src/main/java/Client.java | 143 + .../src/main/java/enums/OrderType.java | 6 + .../src/main/java/services/Avatars.java | 164 + .../src/main/java/services/Database.java | 264 + .../src/main/java/services/Functions.java | 255 + .../src/main/java/services/Health.java | 258 + .../src/main/java/services/Locale.java | 145 + .../src/main/java/services/Service.java | 11 + .../src/main/java/services/Storage.java | 204 + .../src/main/java/services/Teams.java | 206 + .../src/main/java/services/Users.java | 221 + app/sdks/0.7.0/server-nodejs/CHANGELOG.md | 1 + app/sdks/0.7.0/server-nodejs/LICENSE | 12 + app/sdks/0.7.0/server-nodejs/README.md | 28 + .../docs/examples/avatars/get-browser.md | 20 + .../docs/examples/avatars/get-credit-card.md | 20 + .../docs/examples/avatars/get-favicon.md | 20 + .../docs/examples/avatars/get-flag.md | 20 + .../docs/examples/avatars/get-image.md | 20 + .../docs/examples/avatars/get-q-r.md | 20 + .../examples/database/create-collection.md | 20 + .../docs/examples/database/create-document.md | 20 + .../examples/database/delete-collection.md | 20 + .../docs/examples/database/delete-document.md | 20 + .../examples/database/get-collection-logs.md | 20 + .../docs/examples/database/get-collection.md | 20 + .../docs/examples/database/get-document.md | 20 + .../examples/database/list-collections.md | 20 + .../docs/examples/database/list-documents.md | 20 + .../examples/database/update-collection.md | 20 + .../docs/examples/database/update-document.md | 20 + .../examples/functions/create-execution.md | 19 + .../docs/examples/functions/create-tag.md | 19 + .../docs/examples/functions/create.md | 19 + .../docs/examples/functions/delete-tag.md | 19 + .../docs/examples/functions/delete.md | 19 + .../docs/examples/functions/get-execution.md | 19 + .../docs/examples/functions/get-tag.md | 19 + .../docs/examples/functions/get.md | 19 + .../examples/functions/list-executions.md | 19 + .../docs/examples/functions/list-tags.md | 19 + .../docs/examples/functions/list.md | 19 + .../docs/examples/functions/update-active.md | 19 + .../docs/examples/functions/update-tag.md | 19 + .../docs/examples/functions/update.md | 19 + .../docs/examples/health/get-anti-virus.md | 20 + .../docs/examples/health/get-cache.md | 20 + .../docs/examples/health/get-d-b.md | 20 + .../examples/health/get-queue-certificates.md | 20 + .../examples/health/get-queue-functions.md | 20 + .../docs/examples/health/get-queue-logs.md | 20 + .../docs/examples/health/get-queue-tasks.md | 20 + .../docs/examples/health/get-queue-usage.md | 20 + .../examples/health/get-queue-webhooks.md | 20 + .../examples/health/get-storage-anti-virus.md | 19 + .../docs/examples/health/get-storage-local.md | 20 + .../docs/examples/health/get-time.md | 20 + .../server-nodejs/docs/examples/health/get.md | 20 + .../docs/examples/locale/get-continents.md | 20 + .../docs/examples/locale/get-countries-e-u.md | 20 + .../examples/locale/get-countries-phones.md | 20 + .../docs/examples/locale/get-countries.md | 20 + .../docs/examples/locale/get-currencies.md | 20 + .../server-nodejs/docs/examples/locale/get.md | 20 + .../docs/examples/storage/create-file.md | 21 + .../docs/examples/storage/delete-file.md | 20 + .../examples/storage/get-file-download.md | 20 + .../docs/examples/storage/get-file-preview.md | 20 + .../docs/examples/storage/get-file-view.md | 20 + .../docs/examples/storage/get-file.md | 20 + .../docs/examples/storage/list-files.md | 20 + .../docs/examples/storage/update-file.md | 20 + .../docs/examples/teams/create-membership.md | 20 + .../docs/examples/teams/create.md | 20 + .../docs/examples/teams/delete-membership.md | 20 + .../docs/examples/teams/delete.md | 20 + .../docs/examples/teams/get-memberships.md | 20 + .../server-nodejs/docs/examples/teams/get.md | 20 + .../server-nodejs/docs/examples/teams/list.md | 20 + .../docs/examples/teams/update.md | 20 + .../docs/examples/users/create.md | 20 + .../docs/examples/users/delete-session.md | 20 + .../docs/examples/users/delete-sessions.md | 20 + .../docs/examples/users/get-logs.md | 20 + .../docs/examples/users/get-prefs.md | 20 + .../docs/examples/users/get-sessions.md | 20 + .../server-nodejs/docs/examples/users/get.md | 20 + .../server-nodejs/docs/examples/users/list.md | 20 + .../docs/examples/users/update-prefs.md | 20 + .../docs/examples/users/update-status.md | 20 + app/sdks/0.7.0/server-nodejs/index.js | 21 + app/sdks/0.7.0/server-nodejs/lib/client.js | 135 + app/sdks/0.7.0/server-nodejs/lib/service.js | 10 + .../server-nodejs/lib/services/avatars.js | 164 + .../server-nodejs/lib/services/database.js | 283 + .../server-nodejs/lib/services/functions.js | 282 + .../server-nodejs/lib/services/health.js | 233 + .../server-nodejs/lib/services/locale.js | 125 + .../server-nodejs/lib/services/storage.js | 199 + .../0.7.0/server-nodejs/lib/services/teams.js | 202 + .../0.7.0/server-nodejs/lib/services/users.js | 215 + app/sdks/0.7.0/server-nodejs/package.json | 17 + app/sdks/0.7.0/server-php/CHANGELOG.md | 1 + app/sdks/0.7.0/server-php/LICENSE | 12 + app/sdks/0.7.0/server-php/README.md | 28 + app/sdks/0.7.0/server-php/composer.json | 26 + app/sdks/0.7.0/server-php/docs/avatars.md | 100 + app/sdks/0.7.0/server-php/docs/database.md | 183 + .../docs/examples/avatars/get-browser.md | 16 + .../docs/examples/avatars/get-credit-card.md | 16 + .../docs/examples/avatars/get-favicon.md | 16 + .../docs/examples/avatars/get-flag.md | 16 + .../docs/examples/avatars/get-image.md | 16 + .../docs/examples/avatars/get-q-r.md | 16 + .../examples/database/create-collection.md | 16 + .../docs/examples/database/create-document.md | 16 + .../examples/database/delete-collection.md | 16 + .../docs/examples/database/delete-document.md | 16 + .../examples/database/get-collection-logs.md | 16 + .../docs/examples/database/get-collection.md | 16 + .../docs/examples/database/get-document.md | 16 + .../examples/database/list-collections.md | 16 + .../docs/examples/database/list-documents.md | 16 + .../examples/database/update-collection.md | 16 + .../docs/examples/database/update-document.md | 16 + .../examples/functions/create-execution.md | 15 + .../docs/examples/functions/create-tag.md | 15 + .../docs/examples/functions/create.md | 15 + .../docs/examples/functions/delete-tag.md | 15 + .../docs/examples/functions/delete.md | 15 + .../docs/examples/functions/get-execution.md | 15 + .../docs/examples/functions/get-tag.md | 15 + .../server-php/docs/examples/functions/get.md | 15 + .../examples/functions/list-executions.md | 15 + .../docs/examples/functions/list-tags.md | 15 + .../docs/examples/functions/list.md | 15 + .../docs/examples/functions/update-active.md | 15 + .../docs/examples/functions/update-tag.md | 15 + .../docs/examples/functions/update.md | 15 + .../docs/examples/health/get-anti-virus.md | 16 + .../docs/examples/health/get-cache.md | 16 + .../docs/examples/health/get-d-b.md | 16 + .../examples/health/get-queue-certificates.md | 16 + .../examples/health/get-queue-functions.md | 16 + .../docs/examples/health/get-queue-logs.md | 16 + .../docs/examples/health/get-queue-tasks.md | 16 + .../docs/examples/health/get-queue-usage.md | 16 + .../examples/health/get-queue-webhooks.md | 16 + .../examples/health/get-storage-anti-virus.md | 15 + .../docs/examples/health/get-storage-local.md | 16 + .../docs/examples/health/get-time.md | 16 + .../server-php/docs/examples/health/get.md | 16 + .../docs/examples/locale/get-continents.md | 16 + .../docs/examples/locale/get-countries-e-u.md | 16 + .../examples/locale/get-countries-phones.md | 16 + .../docs/examples/locale/get-countries.md | 16 + .../docs/examples/locale/get-currencies.md | 16 + .../server-php/docs/examples/locale/get.md | 16 + .../docs/examples/storage/create-file.md | 16 + .../docs/examples/storage/delete-file.md | 16 + .../examples/storage/get-file-download.md | 16 + .../docs/examples/storage/get-file-preview.md | 16 + .../docs/examples/storage/get-file-view.md | 16 + .../docs/examples/storage/get-file.md | 16 + .../docs/examples/storage/list-files.md | 16 + .../docs/examples/storage/update-file.md | 16 + .../docs/examples/teams/create-membership.md | 16 + .../server-php/docs/examples/teams/create.md | 16 + .../docs/examples/teams/delete-membership.md | 16 + .../server-php/docs/examples/teams/delete.md | 16 + .../docs/examples/teams/get-memberships.md | 16 + .../server-php/docs/examples/teams/get.md | 16 + .../server-php/docs/examples/teams/list.md | 16 + .../server-php/docs/examples/teams/update.md | 16 + .../server-php/docs/examples/users/create.md | 16 + .../docs/examples/users/delete-session.md | 16 + .../docs/examples/users/delete-sessions.md | 16 + .../docs/examples/users/get-logs.md | 16 + .../docs/examples/users/get-prefs.md | 16 + .../docs/examples/users/get-sessions.md | 16 + .../server-php/docs/examples/users/get.md | 16 + .../server-php/docs/examples/users/list.md | 16 + .../docs/examples/users/update-prefs.md | 16 + .../docs/examples/users/update-status.md | 16 + app/sdks/0.7.0/server-php/docs/functions.md | 186 + app/sdks/0.7.0/server-php/docs/health.md | 96 + app/sdks/0.7.0/server-php/docs/locale.md | 52 + app/sdks/0.7.0/server-php/docs/storage.md | 127 + app/sdks/0.7.0/server-php/docs/teams.md | 128 + app/sdks/0.7.0/server-php/docs/users.md | 150 + .../0.7.0/server-php/src/Appwrite/Client.php | 240 + .../0.7.0/server-php/src/Appwrite/Service.php | 19 + .../src/Appwrite/Services/Avatars.php | 175 + .../src/Appwrite/Services/Database.php | 299 + .../src/Appwrite/Services/Functions.php | 300 + .../src/Appwrite/Services/Health.php | 250 + .../src/Appwrite/Services/Locale.php | 136 + .../src/Appwrite/Services/Storage.php | 212 + .../src/Appwrite/Services/Teams.php | 215 + .../src/Appwrite/Services/Users.php | 230 + app/sdks/0.7.0/server-python/CHANGELOG.md | 1 + app/sdks/0.7.0/server-python/LICENSE | 12 + app/sdks/0.7.0/server-python/README.md | 30 + .../0.7.0/server-python/appwrite/__init__.py | 1 + .../0.7.0/server-python/appwrite/client.py | 106 + .../0.7.0/server-python/appwrite/service.py | 6 + .../appwrite/services/__init__.py | 1 + .../appwrite/services/avatars.py | 87 + .../appwrite/services/database.py | 159 + .../appwrite/services/functions.py | 178 + .../server-python/appwrite/services/health.py | 127 + .../server-python/appwrite/services/locale.py | 67 + .../appwrite/services/storage.py | 108 + .../server-python/appwrite/services/teams.py | 105 + .../server-python/appwrite/services/users.py | 125 + .../docs/examples/avatars/get-browser.md | 14 + .../docs/examples/avatars/get-credit-card.md | 14 + .../docs/examples/avatars/get-favicon.md | 14 + .../docs/examples/avatars/get-flag.md | 14 + .../docs/examples/avatars/get-image.md | 14 + .../docs/examples/avatars/get-q-r.md | 14 + .../examples/database/create-collection.md | 14 + .../docs/examples/database/create-document.md | 14 + .../examples/database/delete-collection.md | 14 + .../docs/examples/database/delete-document.md | 14 + .../examples/database/get-collection-logs.md | 14 + .../docs/examples/database/get-collection.md | 14 + .../docs/examples/database/get-document.md | 14 + .../examples/database/list-collections.md | 14 + .../docs/examples/database/list-documents.md | 14 + .../examples/database/update-collection.md | 14 + .../docs/examples/database/update-document.md | 14 + .../examples/functions/create-execution.md | 13 + .../docs/examples/functions/create-tag.md | 13 + .../docs/examples/functions/create.md | 13 + .../docs/examples/functions/delete-tag.md | 13 + .../docs/examples/functions/delete.md | 13 + .../docs/examples/functions/get-execution.md | 13 + .../docs/examples/functions/get-tag.md | 13 + .../docs/examples/functions/get.md | 13 + .../examples/functions/list-executions.md | 13 + .../docs/examples/functions/list-tags.md | 13 + .../docs/examples/functions/list.md | 13 + .../docs/examples/functions/update-active.md | 13 + .../docs/examples/functions/update-tag.md | 13 + .../docs/examples/functions/update.md | 13 + .../docs/examples/health/get-anti-virus.md | 14 + .../docs/examples/health/get-cache.md | 14 + .../docs/examples/health/get-d-b.md | 14 + .../examples/health/get-queue-certificates.md | 14 + .../examples/health/get-queue-functions.md | 14 + .../docs/examples/health/get-queue-logs.md | 14 + .../docs/examples/health/get-queue-tasks.md | 14 + .../docs/examples/health/get-queue-usage.md | 14 + .../examples/health/get-queue-webhooks.md | 14 + .../examples/health/get-storage-anti-virus.md | 13 + .../docs/examples/health/get-storage-local.md | 14 + .../docs/examples/health/get-time.md | 14 + .../server-python/docs/examples/health/get.md | 14 + .../docs/examples/locale/get-continents.md | 14 + .../docs/examples/locale/get-countries-e-u.md | 14 + .../examples/locale/get-countries-phones.md | 14 + .../docs/examples/locale/get-countries.md | 14 + .../docs/examples/locale/get-currencies.md | 14 + .../server-python/docs/examples/locale/get.md | 14 + .../docs/examples/storage/create-file.md | 14 + .../docs/examples/storage/delete-file.md | 14 + .../examples/storage/get-file-download.md | 14 + .../docs/examples/storage/get-file-preview.md | 14 + .../docs/examples/storage/get-file-view.md | 14 + .../docs/examples/storage/get-file.md | 14 + .../docs/examples/storage/list-files.md | 14 + .../docs/examples/storage/update-file.md | 14 + .../docs/examples/teams/create-membership.md | 14 + .../docs/examples/teams/create.md | 14 + .../docs/examples/teams/delete-membership.md | 14 + .../docs/examples/teams/delete.md | 14 + .../docs/examples/teams/get-memberships.md | 14 + .../server-python/docs/examples/teams/get.md | 14 + .../server-python/docs/examples/teams/list.md | 14 + .../docs/examples/teams/update.md | 14 + .../docs/examples/users/create.md | 14 + .../docs/examples/users/delete-session.md | 14 + .../docs/examples/users/delete-sessions.md | 14 + .../docs/examples/users/get-logs.md | 14 + .../docs/examples/users/get-prefs.md | 14 + .../docs/examples/users/get-sessions.md | 14 + .../server-python/docs/examples/users/get.md | 14 + .../server-python/docs/examples/users/list.md | 14 + .../docs/examples/users/update-prefs.md | 14 + .../docs/examples/users/update-status.md | 14 + app/sdks/0.7.0/server-python/requirements.txt | 1 + app/sdks/0.7.0/server-python/setup.cfg | 2 + app/sdks/0.7.0/server-python/setup.py | 30 + app/sdks/0.7.0/server-ruby/CHANGELOG.md | 1 + app/sdks/0.7.0/server-ruby/Gemfile | 3 + app/sdks/0.7.0/server-ruby/LICENSE | 12 + app/sdks/0.7.0/server-ruby/README.md | 30 + app/sdks/0.7.0/server-ruby/appwrite.gemspec | 13 + .../docs/examples/avatars/get-browser.md | 15 + .../docs/examples/avatars/get-credit-card.md | 15 + .../docs/examples/avatars/get-favicon.md | 15 + .../docs/examples/avatars/get-flag.md | 15 + .../docs/examples/avatars/get-image.md | 15 + .../docs/examples/avatars/get-q-r.md | 15 + .../examples/database/create-collection.md | 15 + .../docs/examples/database/create-document.md | 15 + .../examples/database/delete-collection.md | 15 + .../docs/examples/database/delete-document.md | 15 + .../examples/database/get-collection-logs.md | 15 + .../docs/examples/database/get-collection.md | 15 + .../docs/examples/database/get-document.md | 15 + .../examples/database/list-collections.md | 15 + .../docs/examples/database/list-documents.md | 15 + .../examples/database/update-collection.md | 15 + .../docs/examples/database/update-document.md | 15 + .../docs/examples/health/get-anti-virus.md | 15 + .../docs/examples/health/get-cache.md | 15 + .../docs/examples/health/get-d-b.md | 15 + .../examples/health/get-queue-certificates.md | 15 + .../examples/health/get-queue-functions.md | 15 + .../docs/examples/health/get-queue-logs.md | 15 + .../docs/examples/health/get-queue-tasks.md | 15 + .../docs/examples/health/get-queue-usage.md | 15 + .../examples/health/get-queue-webhooks.md | 15 + .../docs/examples/health/get-storage-local.md | 15 + .../docs/examples/health/get-time.md | 15 + .../server-ruby/docs/examples/health/get.md | 15 + .../docs/examples/locale/get-continents.md | 15 + .../docs/examples/locale/get-countries-e-u.md | 15 + .../examples/locale/get-countries-phones.md | 15 + .../docs/examples/locale/get-countries.md | 15 + .../docs/examples/locale/get-currencies.md | 15 + .../server-ruby/docs/examples/locale/get.md | 15 + .../docs/examples/storage/create-file.md | 15 + .../docs/examples/storage/delete-file.md | 15 + .../examples/storage/get-file-download.md | 15 + .../docs/examples/storage/get-file-preview.md | 15 + .../docs/examples/storage/get-file-view.md | 15 + .../docs/examples/storage/get-file.md | 15 + .../docs/examples/storage/list-files.md | 15 + .../docs/examples/storage/update-file.md | 15 + .../docs/examples/teams/create-membership.md | 15 + .../server-ruby/docs/examples/teams/create.md | 15 + .../docs/examples/teams/delete-membership.md | 15 + .../server-ruby/docs/examples/teams/delete.md | 15 + .../docs/examples/teams/get-memberships.md | 15 + .../server-ruby/docs/examples/teams/get.md | 15 + .../server-ruby/docs/examples/teams/list.md | 15 + .../server-ruby/docs/examples/teams/update.md | 15 + .../server-ruby/docs/examples/users/create.md | 15 + .../docs/examples/users/delete-session.md | 15 + .../docs/examples/users/delete-sessions.md | 15 + .../docs/examples/users/get-logs.md | 15 + .../docs/examples/users/get-prefs.md | 15 + .../docs/examples/users/get-sessions.md | 15 + .../server-ruby/docs/examples/users/get.md | 15 + .../server-ruby/docs/examples/users/list.md | 15 + .../docs/examples/users/update-prefs.md | 15 + .../docs/examples/users/update-status.md | 15 + app/sdks/0.7.0/server-ruby/lib/appwrite.rb | 13 + .../0.7.0/server-ruby/lib/appwrite/client.rb | 116 + .../0.7.0/server-ruby/lib/appwrite/service.rb | 12 + .../lib/appwrite/services/avatars.rb | 95 + .../lib/appwrite/services/database.rb | 172 + .../lib/appwrite/services/functions.rb | 193 + .../lib/appwrite/services/health.rb | 141 + .../lib/appwrite/services/locale.rb | 75 + .../lib/appwrite/services/storage.rb | 118 + .../lib/appwrite/services/teams.rb | 115 + .../lib/appwrite/services/users.rb | 137 + 1926 files changed, 42971 insertions(+) rename app/sdks/{ => 0.6.2}/client-flutter-dev/CHANGELOG.md (100%) rename app/sdks/{ => 0.6.2}/client-flutter-dev/LICENSE (100%) rename app/sdks/{ => 0.6.2}/client-flutter-dev/README.md (100%) rename app/sdks/{ => 0.6.2}/client-flutter-dev/docs/examples/account/create-o-auth2session.md (100%) rename app/sdks/{ => 0.6.2}/client-flutter-dev/docs/examples/account/create-recovery.md (100%) rename app/sdks/{ => 0.6.2}/client-flutter-dev/docs/examples/account/create-session.md (100%) rename app/sdks/{ => 0.6.2}/client-flutter-dev/docs/examples/account/create-verification.md (100%) rename app/sdks/{ => 0.6.2}/client-flutter-dev/docs/examples/account/create.md (100%) rename app/sdks/{ => 0.6.2}/client-flutter-dev/docs/examples/account/delete-session.md (100%) rename app/sdks/{ => 0.6.2}/client-flutter-dev/docs/examples/account/delete-sessions.md (100%) rename app/sdks/{ => 0.6.2}/client-flutter-dev/docs/examples/account/delete.md (100%) rename app/sdks/{ => 0.6.2}/client-flutter-dev/docs/examples/account/get-logs.md (100%) rename app/sdks/{ => 0.6.2}/client-flutter-dev/docs/examples/account/get-prefs.md (100%) rename app/sdks/{ => 0.6.2}/client-flutter-dev/docs/examples/account/get-sessions.md (100%) rename app/sdks/{ => 0.6.2}/client-flutter-dev/docs/examples/account/get.md (100%) rename app/sdks/{ => 0.6.2}/client-flutter-dev/docs/examples/account/update-email.md (100%) rename app/sdks/{ => 0.6.2}/client-flutter-dev/docs/examples/account/update-name.md (100%) rename app/sdks/{ => 0.6.2}/client-flutter-dev/docs/examples/account/update-password.md (100%) rename app/sdks/{ => 0.6.2}/client-flutter-dev/docs/examples/account/update-prefs.md (100%) rename app/sdks/{ => 0.6.2}/client-flutter-dev/docs/examples/account/update-recovery.md (100%) rename app/sdks/{ => 0.6.2}/client-flutter-dev/docs/examples/account/update-verification.md (100%) rename app/sdks/{ => 0.6.2}/client-flutter-dev/docs/examples/avatars/get-browser.md (100%) rename app/sdks/{ => 0.6.2}/client-flutter-dev/docs/examples/avatars/get-credit-card.md (100%) rename app/sdks/{ => 0.6.2}/client-flutter-dev/docs/examples/avatars/get-favicon.md (100%) rename app/sdks/{ => 0.6.2}/client-flutter-dev/docs/examples/avatars/get-flag.md (100%) rename app/sdks/{ => 0.6.2}/client-flutter-dev/docs/examples/avatars/get-image.md (100%) rename app/sdks/{ => 0.6.2}/client-flutter-dev/docs/examples/avatars/get-q-r.md (100%) rename app/sdks/{ => 0.6.2}/client-flutter-dev/docs/examples/database/create-document.md (100%) rename app/sdks/{ => 0.6.2}/client-flutter-dev/docs/examples/database/delete-document.md (100%) rename app/sdks/{ => 0.6.2}/client-flutter-dev/docs/examples/database/get-document.md (100%) rename app/sdks/{ => 0.6.2}/client-flutter-dev/docs/examples/database/list-documents.md (100%) rename app/sdks/{ => 0.6.2}/client-flutter-dev/docs/examples/database/update-document.md (100%) rename app/sdks/{ => 0.6.2}/client-flutter-dev/docs/examples/locale/get-continents.md (100%) rename app/sdks/{ => 0.6.2}/client-flutter-dev/docs/examples/locale/get-countries-e-u.md (100%) rename app/sdks/{ => 0.6.2}/client-flutter-dev/docs/examples/locale/get-countries-phones.md (100%) rename app/sdks/{ => 0.6.2}/client-flutter-dev/docs/examples/locale/get-countries.md (100%) rename app/sdks/{ => 0.6.2}/client-flutter-dev/docs/examples/locale/get-currencies.md (100%) rename app/sdks/{ => 0.6.2}/client-flutter-dev/docs/examples/locale/get.md (100%) rename app/sdks/{ => 0.6.2}/client-flutter-dev/docs/examples/storage/create-file.md (100%) rename app/sdks/{ => 0.6.2}/client-flutter-dev/docs/examples/storage/delete-file.md (100%) rename app/sdks/{ => 0.6.2}/client-flutter-dev/docs/examples/storage/get-file-download.md (100%) rename app/sdks/{ => 0.6.2}/client-flutter-dev/docs/examples/storage/get-file-preview.md (100%) rename app/sdks/{ => 0.6.2}/client-flutter-dev/docs/examples/storage/get-file-view.md (100%) rename app/sdks/{ => 0.6.2}/client-flutter-dev/docs/examples/storage/get-file.md (100%) rename app/sdks/{ => 0.6.2}/client-flutter-dev/docs/examples/storage/list-files.md (100%) rename app/sdks/{ => 0.6.2}/client-flutter-dev/docs/examples/storage/update-file.md (100%) rename app/sdks/{ => 0.6.2}/client-flutter-dev/docs/examples/teams/create-membership.md (100%) rename app/sdks/{ => 0.6.2}/client-flutter-dev/docs/examples/teams/create.md (100%) rename app/sdks/{ => 0.6.2}/client-flutter-dev/docs/examples/teams/delete-membership.md (100%) rename app/sdks/{ => 0.6.2}/client-flutter-dev/docs/examples/teams/delete.md (100%) rename app/sdks/{ => 0.6.2}/client-flutter-dev/docs/examples/teams/get-memberships.md (100%) rename app/sdks/{ => 0.6.2}/client-flutter-dev/docs/examples/teams/get.md (100%) rename app/sdks/{ => 0.6.2}/client-flutter-dev/docs/examples/teams/list.md (100%) rename app/sdks/{ => 0.6.2}/client-flutter-dev/docs/examples/teams/update-membership-status.md (100%) rename app/sdks/{ => 0.6.2}/client-flutter-dev/docs/examples/teams/update.md (100%) rename app/sdks/{ => 0.6.2}/client-flutter-dev/example/README.md (100%) rename app/sdks/{ => 0.6.2}/client-flutter-dev/lib/appwrite.dart (100%) rename app/sdks/{ => 0.6.2}/client-flutter-dev/lib/appwrite_dev.dart (100%) rename app/sdks/{ => 0.6.2}/client-flutter-dev/lib/client.dart (100%) rename app/sdks/{ => 0.6.2}/client-flutter-dev/lib/enums.dart (100%) rename app/sdks/{ => 0.6.2}/client-flutter-dev/lib/service.dart (100%) rename app/sdks/{ => 0.6.2}/client-flutter-dev/lib/services/account.dart (100%) rename app/sdks/{ => 0.6.2}/client-flutter-dev/lib/services/avatars.dart (100%) rename app/sdks/{ => 0.6.2}/client-flutter-dev/lib/services/database.dart (100%) rename app/sdks/{ => 0.6.2}/client-flutter-dev/lib/services/locale.dart (100%) rename app/sdks/{ => 0.6.2}/client-flutter-dev/lib/services/storage.dart (100%) rename app/sdks/{ => 0.6.2}/client-flutter-dev/lib/services/teams.dart (100%) rename app/sdks/{ => 0.6.2}/client-flutter-dev/pubspec.yaml (100%) rename app/sdks/{ => 0.6.2}/client-flutter/CHANGELOG.md (100%) rename app/sdks/{ => 0.6.2}/client-flutter/LICENSE (100%) rename app/sdks/{ => 0.6.2}/client-flutter/README.md (100%) rename app/sdks/{ => 0.6.2}/client-flutter/docs/examples/account/create-o-auth2session.md (100%) rename app/sdks/{ => 0.6.2}/client-flutter/docs/examples/account/create-recovery.md (100%) rename app/sdks/{ => 0.6.2}/client-flutter/docs/examples/account/create-session.md (100%) rename app/sdks/{ => 0.6.2}/client-flutter/docs/examples/account/create-verification.md (100%) rename app/sdks/{ => 0.6.2}/client-flutter/docs/examples/account/create.md (100%) rename app/sdks/{ => 0.6.2}/client-flutter/docs/examples/account/delete-session.md (100%) rename app/sdks/{ => 0.6.2}/client-flutter/docs/examples/account/delete-sessions.md (100%) rename app/sdks/{ => 0.6.2}/client-flutter/docs/examples/account/delete.md (100%) rename app/sdks/{ => 0.6.2}/client-flutter/docs/examples/account/get-logs.md (100%) rename app/sdks/{ => 0.6.2}/client-flutter/docs/examples/account/get-prefs.md (100%) rename app/sdks/{ => 0.6.2}/client-flutter/docs/examples/account/get-sessions.md (100%) rename app/sdks/{ => 0.6.2}/client-flutter/docs/examples/account/get.md (100%) rename app/sdks/{ => 0.6.2}/client-flutter/docs/examples/account/update-email.md (100%) rename app/sdks/{ => 0.6.2}/client-flutter/docs/examples/account/update-name.md (100%) rename app/sdks/{ => 0.6.2}/client-flutter/docs/examples/account/update-password.md (100%) rename app/sdks/{ => 0.6.2}/client-flutter/docs/examples/account/update-prefs.md (100%) rename app/sdks/{ => 0.6.2}/client-flutter/docs/examples/account/update-recovery.md (100%) rename app/sdks/{ => 0.6.2}/client-flutter/docs/examples/account/update-verification.md (100%) rename app/sdks/{ => 0.6.2}/client-flutter/docs/examples/avatars/get-browser.md (100%) rename app/sdks/{ => 0.6.2}/client-flutter/docs/examples/avatars/get-credit-card.md (100%) rename app/sdks/{ => 0.6.2}/client-flutter/docs/examples/avatars/get-favicon.md (100%) rename app/sdks/{ => 0.6.2}/client-flutter/docs/examples/avatars/get-flag.md (100%) rename app/sdks/{ => 0.6.2}/client-flutter/docs/examples/avatars/get-image.md (100%) rename app/sdks/{ => 0.6.2}/client-flutter/docs/examples/avatars/get-initials.md (100%) rename app/sdks/{ => 0.6.2}/client-flutter/docs/examples/avatars/get-q-r.md (100%) rename app/sdks/{ => 0.6.2}/client-flutter/docs/examples/database/create-document.md (100%) rename app/sdks/{ => 0.6.2}/client-flutter/docs/examples/database/delete-document.md (100%) rename app/sdks/{ => 0.6.2}/client-flutter/docs/examples/database/get-document.md (100%) rename app/sdks/{ => 0.6.2}/client-flutter/docs/examples/database/list-documents.md (100%) rename app/sdks/{ => 0.6.2}/client-flutter/docs/examples/database/update-document.md (100%) rename app/sdks/{ => 0.6.2}/client-flutter/docs/examples/locale/get-continents.md (100%) rename app/sdks/{ => 0.6.2}/client-flutter/docs/examples/locale/get-countries-e-u.md (100%) rename app/sdks/{ => 0.6.2}/client-flutter/docs/examples/locale/get-countries-phones.md (100%) rename app/sdks/{ => 0.6.2}/client-flutter/docs/examples/locale/get-countries.md (100%) rename app/sdks/{ => 0.6.2}/client-flutter/docs/examples/locale/get-currencies.md (100%) rename app/sdks/{ => 0.6.2}/client-flutter/docs/examples/locale/get-languages.md (100%) rename app/sdks/{ => 0.6.2}/client-flutter/docs/examples/locale/get.md (100%) rename app/sdks/{ => 0.6.2}/client-flutter/docs/examples/storage/create-file.md (100%) rename app/sdks/{ => 0.6.2}/client-flutter/docs/examples/storage/delete-file.md (100%) rename app/sdks/{ => 0.6.2}/client-flutter/docs/examples/storage/get-file-download.md (100%) rename app/sdks/{ => 0.6.2}/client-flutter/docs/examples/storage/get-file-preview.md (100%) rename app/sdks/{ => 0.6.2}/client-flutter/docs/examples/storage/get-file-view.md (100%) rename app/sdks/{ => 0.6.2}/client-flutter/docs/examples/storage/get-file.md (100%) rename app/sdks/{ => 0.6.2}/client-flutter/docs/examples/storage/list-files.md (100%) rename app/sdks/{ => 0.6.2}/client-flutter/docs/examples/storage/update-file.md (100%) rename app/sdks/{ => 0.6.2}/client-flutter/docs/examples/teams/create-membership.md (100%) rename app/sdks/{ => 0.6.2}/client-flutter/docs/examples/teams/create.md (100%) rename app/sdks/{ => 0.6.2}/client-flutter/docs/examples/teams/delete-membership.md (100%) rename app/sdks/{ => 0.6.2}/client-flutter/docs/examples/teams/delete.md (100%) rename app/sdks/{ => 0.6.2}/client-flutter/docs/examples/teams/get-memberships.md (100%) rename app/sdks/{ => 0.6.2}/client-flutter/docs/examples/teams/get.md (100%) rename app/sdks/{ => 0.6.2}/client-flutter/docs/examples/teams/list.md (100%) rename app/sdks/{ => 0.6.2}/client-flutter/docs/examples/teams/update-membership-status.md (100%) rename app/sdks/{ => 0.6.2}/client-flutter/docs/examples/teams/update.md (100%) rename app/sdks/{ => 0.6.2}/client-flutter/example/README.md (100%) rename app/sdks/{ => 0.6.2}/client-flutter/lib/appwrite.dart (100%) rename app/sdks/{ => 0.6.2}/client-flutter/lib/client.dart (100%) rename app/sdks/{ => 0.6.2}/client-flutter/lib/enums.dart (100%) rename app/sdks/{ => 0.6.2}/client-flutter/lib/service.dart (100%) rename app/sdks/{ => 0.6.2}/client-flutter/lib/services/account.dart (100%) rename app/sdks/{ => 0.6.2}/client-flutter/lib/services/avatars.dart (100%) rename app/sdks/{ => 0.6.2}/client-flutter/lib/services/database.dart (100%) rename app/sdks/{ => 0.6.2}/client-flutter/lib/services/locale.dart (100%) rename app/sdks/{ => 0.6.2}/client-flutter/lib/services/storage.dart (100%) rename app/sdks/{ => 0.6.2}/client-flutter/lib/services/teams.dart (100%) rename app/sdks/{ => 0.6.2}/client-flutter/pubspec.yaml (100%) rename app/sdks/{ => 0.6.2}/client-swift/CHANGELOG.md (100%) rename app/sdks/{ => 0.6.2}/client-swift/LICENSE (100%) rename app/sdks/{ => 0.6.2}/client-swift/Package.swift (100%) rename app/sdks/{ => 0.6.2}/client-swift/README.md (100%) rename app/sdks/{ => 0.6.2}/client-swift/Sources/Appwrite/Client.swift (100%) rename app/sdks/{ => 0.6.2}/client-swift/Sources/Appwrite/Service.swift (100%) rename app/sdks/{ => 0.6.2}/client-swift/Sources/Appwrite/Services/Account.swift (100%) rename app/sdks/{ => 0.6.2}/client-swift/Sources/Appwrite/Services/Avatars.swift (100%) rename app/sdks/{ => 0.6.2}/client-swift/Sources/Appwrite/Services/Database.swift (100%) rename app/sdks/{ => 0.6.2}/client-swift/Sources/Appwrite/Services/Locale.swift (100%) rename app/sdks/{ => 0.6.2}/client-swift/Sources/Appwrite/Services/Storage.swift (100%) rename app/sdks/{ => 0.6.2}/client-swift/Sources/Appwrite/Services/Teams.swift (100%) rename app/sdks/{ => 0.6.2}/client-swift/docs/account.md (100%) rename app/sdks/{ => 0.6.2}/client-swift/docs/avatars.md (100%) rename app/sdks/{ => 0.6.2}/client-swift/docs/database.md (100%) rename app/sdks/{ => 0.6.2}/client-swift/docs/examples/account/create-o-auth2session.md (100%) rename app/sdks/{ => 0.6.2}/client-swift/docs/examples/account/create-recovery.md (100%) rename app/sdks/{ => 0.6.2}/client-swift/docs/examples/account/create-session.md (100%) rename app/sdks/{ => 0.6.2}/client-swift/docs/examples/account/create-verification.md (100%) rename app/sdks/{ => 0.6.2}/client-swift/docs/examples/account/create.md (100%) rename app/sdks/{ => 0.6.2}/client-swift/docs/examples/account/delete-session.md (100%) rename app/sdks/{ => 0.6.2}/client-swift/docs/examples/account/delete-sessions.md (100%) rename app/sdks/{ => 0.6.2}/client-swift/docs/examples/account/delete.md (100%) rename app/sdks/{ => 0.6.2}/client-swift/docs/examples/account/get-logs.md (100%) rename app/sdks/{ => 0.6.2}/client-swift/docs/examples/account/get-prefs.md (100%) rename app/sdks/{ => 0.6.2}/client-swift/docs/examples/account/get-sessions.md (100%) rename app/sdks/{ => 0.6.2}/client-swift/docs/examples/account/get.md (100%) rename app/sdks/{ => 0.6.2}/client-swift/docs/examples/account/update-email.md (100%) rename app/sdks/{ => 0.6.2}/client-swift/docs/examples/account/update-name.md (100%) rename app/sdks/{ => 0.6.2}/client-swift/docs/examples/account/update-password.md (100%) rename app/sdks/{ => 0.6.2}/client-swift/docs/examples/account/update-prefs.md (100%) rename app/sdks/{ => 0.6.2}/client-swift/docs/examples/account/update-recovery.md (100%) rename app/sdks/{ => 0.6.2}/client-swift/docs/examples/account/update-verification.md (100%) rename app/sdks/{ => 0.6.2}/client-swift/docs/examples/avatars/get-browser.md (100%) rename app/sdks/{ => 0.6.2}/client-swift/docs/examples/avatars/get-credit-card.md (100%) rename app/sdks/{ => 0.6.2}/client-swift/docs/examples/avatars/get-favicon.md (100%) rename app/sdks/{ => 0.6.2}/client-swift/docs/examples/avatars/get-flag.md (100%) rename app/sdks/{ => 0.6.2}/client-swift/docs/examples/avatars/get-image.md (100%) rename app/sdks/{ => 0.6.2}/client-swift/docs/examples/avatars/get-initials.md (100%) rename app/sdks/{ => 0.6.2}/client-swift/docs/examples/avatars/get-q-r.md (100%) rename app/sdks/{ => 0.6.2}/client-swift/docs/examples/database/create-document.md (100%) rename app/sdks/{ => 0.6.2}/client-swift/docs/examples/database/delete-document.md (100%) rename app/sdks/{ => 0.6.2}/client-swift/docs/examples/database/get-document.md (100%) rename app/sdks/{ => 0.6.2}/client-swift/docs/examples/database/list-documents.md (100%) rename app/sdks/{ => 0.6.2}/client-swift/docs/examples/database/update-document.md (100%) rename app/sdks/{ => 0.6.2}/client-swift/docs/examples/locale/get-continents.md (100%) rename app/sdks/{ => 0.6.2}/client-swift/docs/examples/locale/get-countries-e-u.md (100%) rename app/sdks/{ => 0.6.2}/client-swift/docs/examples/locale/get-countries-phones.md (100%) rename app/sdks/{ => 0.6.2}/client-swift/docs/examples/locale/get-countries.md (100%) rename app/sdks/{ => 0.6.2}/client-swift/docs/examples/locale/get-currencies.md (100%) rename app/sdks/{ => 0.6.2}/client-swift/docs/examples/locale/get-languages.md (100%) rename app/sdks/{ => 0.6.2}/client-swift/docs/examples/locale/get.md (100%) rename app/sdks/{ => 0.6.2}/client-swift/docs/examples/storage/create-file.md (100%) rename app/sdks/{ => 0.6.2}/client-swift/docs/examples/storage/delete-file.md (100%) rename app/sdks/{ => 0.6.2}/client-swift/docs/examples/storage/get-file-download.md (100%) rename app/sdks/{ => 0.6.2}/client-swift/docs/examples/storage/get-file-preview.md (100%) rename app/sdks/{ => 0.6.2}/client-swift/docs/examples/storage/get-file-view.md (100%) rename app/sdks/{ => 0.6.2}/client-swift/docs/examples/storage/get-file.md (100%) rename app/sdks/{ => 0.6.2}/client-swift/docs/examples/storage/list-files.md (100%) rename app/sdks/{ => 0.6.2}/client-swift/docs/examples/storage/update-file.md (100%) rename app/sdks/{ => 0.6.2}/client-swift/docs/examples/teams/create-membership.md (100%) rename app/sdks/{ => 0.6.2}/client-swift/docs/examples/teams/create.md (100%) rename app/sdks/{ => 0.6.2}/client-swift/docs/examples/teams/delete-membership.md (100%) rename app/sdks/{ => 0.6.2}/client-swift/docs/examples/teams/delete.md (100%) rename app/sdks/{ => 0.6.2}/client-swift/docs/examples/teams/get-memberships.md (100%) rename app/sdks/{ => 0.6.2}/client-swift/docs/examples/teams/get.md (100%) rename app/sdks/{ => 0.6.2}/client-swift/docs/examples/teams/list.md (100%) rename app/sdks/{ => 0.6.2}/client-swift/docs/examples/teams/update-membership-status.md (100%) rename app/sdks/{ => 0.6.2}/client-swift/docs/examples/teams/update.md (100%) rename app/sdks/{ => 0.6.2}/client-swift/docs/locale.md (100%) rename app/sdks/{ => 0.6.2}/client-swift/docs/storage.md (100%) rename app/sdks/{ => 0.6.2}/client-swift/docs/teams.md (100%) rename app/sdks/{ => 0.6.2}/client-web/CHANGELOG.md (100%) rename app/sdks/{ => 0.6.2}/client-web/LICENSE (100%) rename app/sdks/{ => 0.6.2}/client-web/README.md (100%) rename app/sdks/{ => 0.6.2}/client-web/docs/examples/account/create-o-auth2session.md (100%) rename app/sdks/{ => 0.6.2}/client-web/docs/examples/account/create-recovery.md (100%) rename app/sdks/{ => 0.6.2}/client-web/docs/examples/account/create-session.md (100%) rename app/sdks/{ => 0.6.2}/client-web/docs/examples/account/create-verification.md (100%) rename app/sdks/{ => 0.6.2}/client-web/docs/examples/account/create.md (100%) rename app/sdks/{ => 0.6.2}/client-web/docs/examples/account/delete-session.md (100%) rename app/sdks/{ => 0.6.2}/client-web/docs/examples/account/delete-sessions.md (100%) rename app/sdks/{ => 0.6.2}/client-web/docs/examples/account/delete.md (100%) rename app/sdks/{ => 0.6.2}/client-web/docs/examples/account/get-logs.md (100%) rename app/sdks/{ => 0.6.2}/client-web/docs/examples/account/get-prefs.md (100%) rename app/sdks/{ => 0.6.2}/client-web/docs/examples/account/get-sessions.md (100%) rename app/sdks/{ => 0.6.2}/client-web/docs/examples/account/get.md (100%) rename app/sdks/{ => 0.6.2}/client-web/docs/examples/account/update-email.md (100%) rename app/sdks/{ => 0.6.2}/client-web/docs/examples/account/update-name.md (100%) rename app/sdks/{ => 0.6.2}/client-web/docs/examples/account/update-password.md (100%) rename app/sdks/{ => 0.6.2}/client-web/docs/examples/account/update-prefs.md (100%) rename app/sdks/{ => 0.6.2}/client-web/docs/examples/account/update-recovery.md (100%) rename app/sdks/{ => 0.6.2}/client-web/docs/examples/account/update-verification.md (100%) rename app/sdks/{ => 0.6.2}/client-web/docs/examples/avatars/get-browser.md (100%) rename app/sdks/{ => 0.6.2}/client-web/docs/examples/avatars/get-credit-card.md (100%) rename app/sdks/{ => 0.6.2}/client-web/docs/examples/avatars/get-favicon.md (100%) rename app/sdks/{ => 0.6.2}/client-web/docs/examples/avatars/get-flag.md (100%) rename app/sdks/{ => 0.6.2}/client-web/docs/examples/avatars/get-image.md (100%) rename app/sdks/{ => 0.6.2}/client-web/docs/examples/avatars/get-initials.md (100%) rename app/sdks/{ => 0.6.2}/client-web/docs/examples/avatars/get-q-r.md (100%) rename app/sdks/{ => 0.6.2}/client-web/docs/examples/database/create-document.md (100%) rename app/sdks/{ => 0.6.2}/client-web/docs/examples/database/delete-document.md (100%) rename app/sdks/{ => 0.6.2}/client-web/docs/examples/database/get-document.md (100%) rename app/sdks/{ => 0.6.2}/client-web/docs/examples/database/list-documents.md (100%) rename app/sdks/{ => 0.6.2}/client-web/docs/examples/database/update-document.md (100%) rename app/sdks/{ => 0.6.2}/client-web/docs/examples/locale/get-continents.md (100%) rename app/sdks/{ => 0.6.2}/client-web/docs/examples/locale/get-countries-e-u.md (100%) rename app/sdks/{ => 0.6.2}/client-web/docs/examples/locale/get-countries-phones.md (100%) rename app/sdks/{ => 0.6.2}/client-web/docs/examples/locale/get-countries.md (100%) rename app/sdks/{ => 0.6.2}/client-web/docs/examples/locale/get-currencies.md (100%) rename app/sdks/{ => 0.6.2}/client-web/docs/examples/locale/get-languages.md (100%) rename app/sdks/{ => 0.6.2}/client-web/docs/examples/locale/get.md (100%) rename app/sdks/{ => 0.6.2}/client-web/docs/examples/storage/create-file.md (100%) rename app/sdks/{ => 0.6.2}/client-web/docs/examples/storage/delete-file.md (100%) rename app/sdks/{ => 0.6.2}/client-web/docs/examples/storage/get-file-download.md (100%) rename app/sdks/{ => 0.6.2}/client-web/docs/examples/storage/get-file-preview.md (100%) rename app/sdks/{ => 0.6.2}/client-web/docs/examples/storage/get-file-view.md (100%) rename app/sdks/{ => 0.6.2}/client-web/docs/examples/storage/get-file.md (100%) rename app/sdks/{ => 0.6.2}/client-web/docs/examples/storage/list-files.md (100%) rename app/sdks/{ => 0.6.2}/client-web/docs/examples/storage/update-file.md (100%) rename app/sdks/{ => 0.6.2}/client-web/docs/examples/teams/create-membership.md (100%) rename app/sdks/{ => 0.6.2}/client-web/docs/examples/teams/create.md (100%) rename app/sdks/{ => 0.6.2}/client-web/docs/examples/teams/delete-membership.md (100%) rename app/sdks/{ => 0.6.2}/client-web/docs/examples/teams/delete.md (100%) rename app/sdks/{ => 0.6.2}/client-web/docs/examples/teams/get-memberships.md (100%) rename app/sdks/{ => 0.6.2}/client-web/docs/examples/teams/get.md (100%) rename app/sdks/{ => 0.6.2}/client-web/docs/examples/teams/list.md (100%) rename app/sdks/{ => 0.6.2}/client-web/docs/examples/teams/update-membership-status.md (100%) rename app/sdks/{ => 0.6.2}/client-web/docs/examples/teams/update.md (100%) rename app/sdks/{ => 0.6.2}/client-web/package.json (100%) rename app/sdks/{ => 0.6.2}/client-web/src/sdk.js (100%) rename app/sdks/{ => 0.6.2}/client-web/src/sdk.min.js (100%) rename app/sdks/{ => 0.6.2}/client-web/tsconfig.json (100%) rename app/sdks/{ => 0.6.2}/client-web/types/index.d.ts (100%) rename app/sdks/{ => 0.6.2}/console-web/CHANGELOG.md (100%) rename app/sdks/{ => 0.6.2}/console-web/LICENSE (100%) rename app/sdks/{ => 0.6.2}/console-web/README.md (100%) rename app/sdks/{ => 0.6.2}/console-web/docs/examples/account/create-o-auth2session.md (100%) rename app/sdks/{ => 0.6.2}/console-web/docs/examples/account/create-recovery.md (100%) rename app/sdks/{ => 0.6.2}/console-web/docs/examples/account/create-session.md (100%) rename app/sdks/{ => 0.6.2}/console-web/docs/examples/account/create-verification.md (100%) rename app/sdks/{ => 0.6.2}/console-web/docs/examples/account/create.md (100%) rename app/sdks/{ => 0.6.2}/console-web/docs/examples/account/delete-session.md (100%) rename app/sdks/{ => 0.6.2}/console-web/docs/examples/account/delete-sessions.md (100%) rename app/sdks/{ => 0.6.2}/console-web/docs/examples/account/delete.md (100%) rename app/sdks/{ => 0.6.2}/console-web/docs/examples/account/get-logs.md (100%) rename app/sdks/{ => 0.6.2}/console-web/docs/examples/account/get-prefs.md (100%) rename app/sdks/{ => 0.6.2}/console-web/docs/examples/account/get-sessions.md (100%) rename app/sdks/{ => 0.6.2}/console-web/docs/examples/account/get.md (100%) rename app/sdks/{ => 0.6.2}/console-web/docs/examples/account/update-email.md (100%) rename app/sdks/{ => 0.6.2}/console-web/docs/examples/account/update-name.md (100%) rename app/sdks/{ => 0.6.2}/console-web/docs/examples/account/update-password.md (100%) rename app/sdks/{ => 0.6.2}/console-web/docs/examples/account/update-prefs.md (100%) rename app/sdks/{ => 0.6.2}/console-web/docs/examples/account/update-recovery.md (100%) rename app/sdks/{ => 0.6.2}/console-web/docs/examples/account/update-verification.md (100%) rename app/sdks/{ => 0.6.2}/console-web/docs/examples/avatars/get-browser.md (100%) rename app/sdks/{ => 0.6.2}/console-web/docs/examples/avatars/get-credit-card.md (100%) rename app/sdks/{ => 0.6.2}/console-web/docs/examples/avatars/get-favicon.md (100%) rename app/sdks/{ => 0.6.2}/console-web/docs/examples/avatars/get-flag.md (100%) rename app/sdks/{ => 0.6.2}/console-web/docs/examples/avatars/get-image.md (100%) rename app/sdks/{ => 0.6.2}/console-web/docs/examples/avatars/get-initials.md (100%) rename app/sdks/{ => 0.6.2}/console-web/docs/examples/avatars/get-q-r.md (100%) rename app/sdks/{ => 0.6.2}/console-web/docs/examples/bar/delete.md (100%) rename app/sdks/{ => 0.6.2}/console-web/docs/examples/bar/get.md (100%) rename app/sdks/{ => 0.6.2}/console-web/docs/examples/bar/patch.md (100%) rename app/sdks/{ => 0.6.2}/console-web/docs/examples/bar/post.md (100%) rename app/sdks/{ => 0.6.2}/console-web/docs/examples/bar/put.md (100%) rename app/sdks/{ => 0.6.2}/console-web/docs/examples/database/create-collection.md (100%) rename app/sdks/{ => 0.6.2}/console-web/docs/examples/database/create-document.md (100%) rename app/sdks/{ => 0.6.2}/console-web/docs/examples/database/delete-collection.md (100%) rename app/sdks/{ => 0.6.2}/console-web/docs/examples/database/delete-document.md (100%) rename app/sdks/{ => 0.6.2}/console-web/docs/examples/database/get-collection-logs.md (100%) rename app/sdks/{ => 0.6.2}/console-web/docs/examples/database/get-collection.md (100%) rename app/sdks/{ => 0.6.2}/console-web/docs/examples/database/get-document.md (100%) rename app/sdks/{ => 0.6.2}/console-web/docs/examples/database/list-collections.md (100%) rename app/sdks/{ => 0.6.2}/console-web/docs/examples/database/list-documents.md (100%) rename app/sdks/{ => 0.6.2}/console-web/docs/examples/database/update-collection.md (100%) rename app/sdks/{ => 0.6.2}/console-web/docs/examples/database/update-document.md (100%) rename app/sdks/{ => 0.6.2}/console-web/docs/examples/foo/delete.md (100%) rename app/sdks/{ => 0.6.2}/console-web/docs/examples/foo/get.md (100%) rename app/sdks/{ => 0.6.2}/console-web/docs/examples/foo/patch.md (100%) rename app/sdks/{ => 0.6.2}/console-web/docs/examples/foo/post.md (100%) rename app/sdks/{ => 0.6.2}/console-web/docs/examples/foo/put.md (100%) rename app/sdks/{ => 0.6.2}/console-web/docs/examples/functions/create-execution.md (100%) rename app/sdks/{ => 0.6.2}/console-web/docs/examples/functions/create-tag.md (100%) rename app/sdks/{ => 0.6.2}/console-web/docs/examples/functions/create.md (100%) rename app/sdks/{ => 0.6.2}/console-web/docs/examples/functions/delete-tag.md (100%) rename app/sdks/{ => 0.6.2}/console-web/docs/examples/functions/delete.md (100%) rename app/sdks/{ => 0.6.2}/console-web/docs/examples/functions/get-execution.md (100%) rename app/sdks/{ => 0.6.2}/console-web/docs/examples/functions/get-tag.md (100%) rename app/sdks/{ => 0.6.2}/console-web/docs/examples/functions/get.md (100%) rename app/sdks/{ => 0.6.2}/console-web/docs/examples/functions/list-executions.md (100%) rename app/sdks/{ => 0.6.2}/console-web/docs/examples/functions/list-tags.md (100%) rename app/sdks/{ => 0.6.2}/console-web/docs/examples/functions/list.md (100%) rename app/sdks/{ => 0.6.2}/console-web/docs/examples/functions/update-active.md (100%) rename app/sdks/{ => 0.6.2}/console-web/docs/examples/functions/update-tag.md (100%) rename app/sdks/{ => 0.6.2}/console-web/docs/examples/functions/update.md (100%) rename app/sdks/{ => 0.6.2}/console-web/docs/examples/general/empty.md (100%) rename app/sdks/{ => 0.6.2}/console-web/docs/examples/general/get-cookie.md (100%) rename app/sdks/{ => 0.6.2}/console-web/docs/examples/general/redirect.md (100%) rename app/sdks/{ => 0.6.2}/console-web/docs/examples/general/redirected.md (100%) rename app/sdks/{ => 0.6.2}/console-web/docs/examples/general/set-cookie.md (100%) rename app/sdks/{ => 0.6.2}/console-web/docs/examples/general/upload.md (100%) rename app/sdks/{ => 0.6.2}/console-web/docs/examples/health/get-anti-virus.md (100%) rename app/sdks/{ => 0.6.2}/console-web/docs/examples/health/get-cache.md (100%) rename app/sdks/{ => 0.6.2}/console-web/docs/examples/health/get-d-b.md (100%) rename app/sdks/{ => 0.6.2}/console-web/docs/examples/health/get-queue-certificates.md (100%) rename app/sdks/{ => 0.6.2}/console-web/docs/examples/health/get-queue-functions.md (100%) rename app/sdks/{ => 0.6.2}/console-web/docs/examples/health/get-queue-logs.md (100%) rename app/sdks/{ => 0.6.2}/console-web/docs/examples/health/get-queue-tasks.md (100%) rename app/sdks/{ => 0.6.2}/console-web/docs/examples/health/get-queue-usage.md (100%) rename app/sdks/{ => 0.6.2}/console-web/docs/examples/health/get-queue-webhooks.md (100%) rename app/sdks/{ => 0.6.2}/console-web/docs/examples/health/get-storage-local.md (100%) rename app/sdks/{ => 0.6.2}/console-web/docs/examples/health/get-time.md (100%) rename app/sdks/{ => 0.6.2}/console-web/docs/examples/health/get.md (100%) rename app/sdks/{ => 0.6.2}/console-web/docs/examples/locale/get-continents.md (100%) rename app/sdks/{ => 0.6.2}/console-web/docs/examples/locale/get-countries-e-u.md (100%) rename app/sdks/{ => 0.6.2}/console-web/docs/examples/locale/get-countries-phones.md (100%) rename app/sdks/{ => 0.6.2}/console-web/docs/examples/locale/get-countries.md (100%) rename app/sdks/{ => 0.6.2}/console-web/docs/examples/locale/get-currencies.md (100%) rename app/sdks/{ => 0.6.2}/console-web/docs/examples/locale/get-languages.md (100%) rename app/sdks/{ => 0.6.2}/console-web/docs/examples/locale/get.md (100%) rename app/sdks/{ => 0.6.2}/console-web/docs/examples/projects/create-domain.md (100%) rename app/sdks/{ => 0.6.2}/console-web/docs/examples/projects/create-key.md (100%) rename app/sdks/{ => 0.6.2}/console-web/docs/examples/projects/create-platform.md (100%) rename app/sdks/{ => 0.6.2}/console-web/docs/examples/projects/create-task.md (100%) rename app/sdks/{ => 0.6.2}/console-web/docs/examples/projects/create-webhook.md (100%) rename app/sdks/{ => 0.6.2}/console-web/docs/examples/projects/create.md (100%) rename app/sdks/{ => 0.6.2}/console-web/docs/examples/projects/delete-domain.md (100%) rename app/sdks/{ => 0.6.2}/console-web/docs/examples/projects/delete-key.md (100%) rename app/sdks/{ => 0.6.2}/console-web/docs/examples/projects/delete-platform.md (100%) rename app/sdks/{ => 0.6.2}/console-web/docs/examples/projects/delete-task.md (100%) rename app/sdks/{ => 0.6.2}/console-web/docs/examples/projects/delete-webhook.md (100%) rename app/sdks/{ => 0.6.2}/console-web/docs/examples/projects/delete.md (100%) rename app/sdks/{ => 0.6.2}/console-web/docs/examples/projects/get-domain.md (100%) rename app/sdks/{ => 0.6.2}/console-web/docs/examples/projects/get-key.md (100%) rename app/sdks/{ => 0.6.2}/console-web/docs/examples/projects/get-platform.md (100%) rename app/sdks/{ => 0.6.2}/console-web/docs/examples/projects/get-task.md (100%) rename app/sdks/{ => 0.6.2}/console-web/docs/examples/projects/get-usage.md (100%) rename app/sdks/{ => 0.6.2}/console-web/docs/examples/projects/get-webhook.md (100%) rename app/sdks/{ => 0.6.2}/console-web/docs/examples/projects/get.md (100%) rename app/sdks/{ => 0.6.2}/console-web/docs/examples/projects/list-domains.md (100%) rename app/sdks/{ => 0.6.2}/console-web/docs/examples/projects/list-keys.md (100%) rename app/sdks/{ => 0.6.2}/console-web/docs/examples/projects/list-platforms.md (100%) rename app/sdks/{ => 0.6.2}/console-web/docs/examples/projects/list-tasks.md (100%) rename app/sdks/{ => 0.6.2}/console-web/docs/examples/projects/list-webhooks.md (100%) rename app/sdks/{ => 0.6.2}/console-web/docs/examples/projects/list.md (100%) rename app/sdks/{ => 0.6.2}/console-web/docs/examples/projects/update-domain-verification.md (100%) rename app/sdks/{ => 0.6.2}/console-web/docs/examples/projects/update-key.md (100%) rename app/sdks/{ => 0.6.2}/console-web/docs/examples/projects/update-o-auth2.md (100%) rename app/sdks/{ => 0.6.2}/console-web/docs/examples/projects/update-platform.md (100%) rename app/sdks/{ => 0.6.2}/console-web/docs/examples/projects/update-task.md (100%) rename app/sdks/{ => 0.6.2}/console-web/docs/examples/projects/update-webhook.md (100%) rename app/sdks/{ => 0.6.2}/console-web/docs/examples/projects/update.md (100%) rename app/sdks/{ => 0.6.2}/console-web/docs/examples/storage/create-file.md (100%) rename app/sdks/{ => 0.6.2}/console-web/docs/examples/storage/delete-file.md (100%) rename app/sdks/{ => 0.6.2}/console-web/docs/examples/storage/get-file-download.md (100%) rename app/sdks/{ => 0.6.2}/console-web/docs/examples/storage/get-file-preview.md (100%) rename app/sdks/{ => 0.6.2}/console-web/docs/examples/storage/get-file-view.md (100%) rename app/sdks/{ => 0.6.2}/console-web/docs/examples/storage/get-file.md (100%) rename app/sdks/{ => 0.6.2}/console-web/docs/examples/storage/list-files.md (100%) rename app/sdks/{ => 0.6.2}/console-web/docs/examples/storage/update-file.md (100%) rename app/sdks/{ => 0.6.2}/console-web/docs/examples/teams/create-membership.md (100%) rename app/sdks/{ => 0.6.2}/console-web/docs/examples/teams/create.md (100%) rename app/sdks/{ => 0.6.2}/console-web/docs/examples/teams/delete-membership.md (100%) rename app/sdks/{ => 0.6.2}/console-web/docs/examples/teams/delete.md (100%) rename app/sdks/{ => 0.6.2}/console-web/docs/examples/teams/get-memberships.md (100%) rename app/sdks/{ => 0.6.2}/console-web/docs/examples/teams/get.md (100%) rename app/sdks/{ => 0.6.2}/console-web/docs/examples/teams/list.md (100%) rename app/sdks/{ => 0.6.2}/console-web/docs/examples/teams/update-membership-status.md (100%) rename app/sdks/{ => 0.6.2}/console-web/docs/examples/teams/update.md (100%) rename app/sdks/{ => 0.6.2}/console-web/docs/examples/users/create.md (100%) rename app/sdks/{ => 0.6.2}/console-web/docs/examples/users/delete-session.md (100%) rename app/sdks/{ => 0.6.2}/console-web/docs/examples/users/delete-sessions.md (100%) rename app/sdks/{ => 0.6.2}/console-web/docs/examples/users/delete-user.md (100%) rename app/sdks/{ => 0.6.2}/console-web/docs/examples/users/get-logs.md (100%) rename app/sdks/{ => 0.6.2}/console-web/docs/examples/users/get-prefs.md (100%) rename app/sdks/{ => 0.6.2}/console-web/docs/examples/users/get-sessions.md (100%) rename app/sdks/{ => 0.6.2}/console-web/docs/examples/users/get.md (100%) rename app/sdks/{ => 0.6.2}/console-web/docs/examples/users/list.md (100%) rename app/sdks/{ => 0.6.2}/console-web/docs/examples/users/update-prefs.md (100%) rename app/sdks/{ => 0.6.2}/console-web/docs/examples/users/update-status.md (100%) rename app/sdks/{ => 0.6.2}/console-web/package.json (100%) rename app/sdks/{ => 0.6.2}/console-web/src/sdk.js (100%) rename app/sdks/{ => 0.6.2}/console-web/src/sdk.min.js (100%) rename app/sdks/{ => 0.6.2}/console-web/tsconfig.json (100%) rename app/sdks/{ => 0.6.2}/console-web/types/index.d.ts (100%) rename app/sdks/{ => 0.6.2}/server-deno/CHANGELOG.md (100%) rename app/sdks/{ => 0.6.2}/server-deno/LICENSE (100%) rename app/sdks/{ => 0.6.2}/server-deno/README.md (100%) rename app/sdks/{ => 0.6.2}/server-deno/docs/examples/avatars/get-browser.md (100%) rename app/sdks/{ => 0.6.2}/server-deno/docs/examples/avatars/get-credit-card.md (100%) rename app/sdks/{ => 0.6.2}/server-deno/docs/examples/avatars/get-favicon.md (100%) rename app/sdks/{ => 0.6.2}/server-deno/docs/examples/avatars/get-flag.md (100%) rename app/sdks/{ => 0.6.2}/server-deno/docs/examples/avatars/get-image.md (100%) rename app/sdks/{ => 0.6.2}/server-deno/docs/examples/avatars/get-q-r.md (100%) rename app/sdks/{ => 0.6.2}/server-deno/docs/examples/database/create-collection.md (100%) rename app/sdks/{ => 0.6.2}/server-deno/docs/examples/database/create-document.md (100%) rename app/sdks/{ => 0.6.2}/server-deno/docs/examples/database/delete-collection.md (100%) rename app/sdks/{ => 0.6.2}/server-deno/docs/examples/database/delete-document.md (100%) rename app/sdks/{ => 0.6.2}/server-deno/docs/examples/database/get-collection-logs.md (100%) rename app/sdks/{ => 0.6.2}/server-deno/docs/examples/database/get-collection.md (100%) rename app/sdks/{ => 0.6.2}/server-deno/docs/examples/database/get-document.md (100%) rename app/sdks/{ => 0.6.2}/server-deno/docs/examples/database/list-collections.md (100%) rename app/sdks/{ => 0.6.2}/server-deno/docs/examples/database/list-documents.md (100%) rename app/sdks/{ => 0.6.2}/server-deno/docs/examples/database/update-collection.md (100%) rename app/sdks/{ => 0.6.2}/server-deno/docs/examples/database/update-document.md (100%) rename app/sdks/{ => 0.6.2}/server-deno/docs/examples/health/get-anti-virus.md (100%) rename app/sdks/{ => 0.6.2}/server-deno/docs/examples/health/get-cache.md (100%) rename app/sdks/{ => 0.6.2}/server-deno/docs/examples/health/get-d-b.md (100%) rename app/sdks/{ => 0.6.2}/server-deno/docs/examples/health/get-queue-certificates.md (100%) rename app/sdks/{ => 0.6.2}/server-deno/docs/examples/health/get-queue-functions.md (100%) rename app/sdks/{ => 0.6.2}/server-deno/docs/examples/health/get-queue-logs.md (100%) rename app/sdks/{ => 0.6.2}/server-deno/docs/examples/health/get-queue-tasks.md (100%) rename app/sdks/{ => 0.6.2}/server-deno/docs/examples/health/get-queue-usage.md (100%) rename app/sdks/{ => 0.6.2}/server-deno/docs/examples/health/get-queue-webhooks.md (100%) rename app/sdks/{ => 0.6.2}/server-deno/docs/examples/health/get-storage-local.md (100%) rename app/sdks/{ => 0.6.2}/server-deno/docs/examples/health/get-time.md (100%) rename app/sdks/{ => 0.6.2}/server-deno/docs/examples/health/get.md (100%) rename app/sdks/{ => 0.6.2}/server-deno/docs/examples/locale/get-continents.md (100%) rename app/sdks/{ => 0.6.2}/server-deno/docs/examples/locale/get-countries-e-u.md (100%) rename app/sdks/{ => 0.6.2}/server-deno/docs/examples/locale/get-countries-phones.md (100%) rename app/sdks/{ => 0.6.2}/server-deno/docs/examples/locale/get-countries.md (100%) rename app/sdks/{ => 0.6.2}/server-deno/docs/examples/locale/get-currencies.md (100%) rename app/sdks/{ => 0.6.2}/server-deno/docs/examples/locale/get.md (100%) rename app/sdks/{ => 0.6.2}/server-deno/docs/examples/storage/create-file.md (100%) rename app/sdks/{ => 0.6.2}/server-deno/docs/examples/storage/delete-file.md (100%) rename app/sdks/{ => 0.6.2}/server-deno/docs/examples/storage/get-file-download.md (100%) rename app/sdks/{ => 0.6.2}/server-deno/docs/examples/storage/get-file-preview.md (100%) rename app/sdks/{ => 0.6.2}/server-deno/docs/examples/storage/get-file-view.md (100%) rename app/sdks/{ => 0.6.2}/server-deno/docs/examples/storage/get-file.md (100%) rename app/sdks/{ => 0.6.2}/server-deno/docs/examples/storage/list-files.md (100%) rename app/sdks/{ => 0.6.2}/server-deno/docs/examples/storage/update-file.md (100%) rename app/sdks/{ => 0.6.2}/server-deno/docs/examples/teams/create-membership.md (100%) rename app/sdks/{ => 0.6.2}/server-deno/docs/examples/teams/create.md (100%) rename app/sdks/{ => 0.6.2}/server-deno/docs/examples/teams/delete-membership.md (100%) rename app/sdks/{ => 0.6.2}/server-deno/docs/examples/teams/delete.md (100%) rename app/sdks/{ => 0.6.2}/server-deno/docs/examples/teams/get-memberships.md (100%) rename app/sdks/{ => 0.6.2}/server-deno/docs/examples/teams/get.md (100%) rename app/sdks/{ => 0.6.2}/server-deno/docs/examples/teams/list.md (100%) rename app/sdks/{ => 0.6.2}/server-deno/docs/examples/teams/update.md (100%) rename app/sdks/{ => 0.6.2}/server-deno/docs/examples/users/create.md (100%) rename app/sdks/{ => 0.6.2}/server-deno/docs/examples/users/delete-session.md (100%) rename app/sdks/{ => 0.6.2}/server-deno/docs/examples/users/delete-sessions.md (100%) rename app/sdks/{ => 0.6.2}/server-deno/docs/examples/users/get-logs.md (100%) rename app/sdks/{ => 0.6.2}/server-deno/docs/examples/users/get-prefs.md (100%) rename app/sdks/{ => 0.6.2}/server-deno/docs/examples/users/get-sessions.md (100%) rename app/sdks/{ => 0.6.2}/server-deno/docs/examples/users/get.md (100%) rename app/sdks/{ => 0.6.2}/server-deno/docs/examples/users/list.md (100%) rename app/sdks/{ => 0.6.2}/server-deno/docs/examples/users/update-prefs.md (100%) rename app/sdks/{ => 0.6.2}/server-deno/docs/examples/users/update-status.md (100%) rename app/sdks/{ => 0.6.2}/server-deno/mod.ts (100%) rename app/sdks/{ => 0.6.2}/server-deno/src/client.ts (100%) rename app/sdks/{ => 0.6.2}/server-deno/src/service.ts (100%) rename app/sdks/{ => 0.6.2}/server-deno/src/services/avatars.ts (100%) rename app/sdks/{ => 0.6.2}/server-deno/src/services/database.ts (100%) rename app/sdks/{ => 0.6.2}/server-deno/src/services/health.ts (100%) rename app/sdks/{ => 0.6.2}/server-deno/src/services/locale.ts (100%) rename app/sdks/{ => 0.6.2}/server-deno/src/services/storage.ts (100%) rename app/sdks/{ => 0.6.2}/server-deno/src/services/teams.ts (100%) rename app/sdks/{ => 0.6.2}/server-deno/src/services/users.ts (100%) rename app/sdks/{ => 0.6.2}/server-go/CHANGELOG.md (100%) rename app/sdks/{ => 0.6.2}/server-go/LICENSE (100%) rename app/sdks/{ => 0.6.2}/server-go/README.md (100%) rename app/sdks/{ => 0.6.2}/server-go/avatars.go (100%) rename app/sdks/{ => 0.6.2}/server-go/client.go (100%) rename app/sdks/{ => 0.6.2}/server-go/database.go (100%) rename app/sdks/{ => 0.6.2}/server-go/docs/examples/avatars/get-browser.md (100%) rename app/sdks/{ => 0.6.2}/server-go/docs/examples/avatars/get-credit-card.md (100%) rename app/sdks/{ => 0.6.2}/server-go/docs/examples/avatars/get-favicon.md (100%) rename app/sdks/{ => 0.6.2}/server-go/docs/examples/avatars/get-flag.md (100%) rename app/sdks/{ => 0.6.2}/server-go/docs/examples/avatars/get-image.md (100%) rename app/sdks/{ => 0.6.2}/server-go/docs/examples/avatars/get-q-r.md (100%) rename app/sdks/{ => 0.6.2}/server-go/docs/examples/database/create-collection.md (100%) rename app/sdks/{ => 0.6.2}/server-go/docs/examples/database/create-document.md (100%) rename app/sdks/{ => 0.6.2}/server-go/docs/examples/database/delete-collection.md (100%) rename app/sdks/{ => 0.6.2}/server-go/docs/examples/database/delete-document.md (100%) rename app/sdks/{ => 0.6.2}/server-go/docs/examples/database/get-collection-logs.md (100%) rename app/sdks/{ => 0.6.2}/server-go/docs/examples/database/get-collection.md (100%) rename app/sdks/{ => 0.6.2}/server-go/docs/examples/database/get-document.md (100%) rename app/sdks/{ => 0.6.2}/server-go/docs/examples/database/list-collections.md (100%) rename app/sdks/{ => 0.6.2}/server-go/docs/examples/database/list-documents.md (100%) rename app/sdks/{ => 0.6.2}/server-go/docs/examples/database/update-collection.md (100%) rename app/sdks/{ => 0.6.2}/server-go/docs/examples/database/update-document.md (100%) rename app/sdks/{ => 0.6.2}/server-go/docs/examples/functions/create-execution.md (100%) rename app/sdks/{ => 0.6.2}/server-go/docs/examples/functions/create-tag.md (100%) rename app/sdks/{ => 0.6.2}/server-go/docs/examples/functions/create.md (100%) rename app/sdks/{ => 0.6.2}/server-go/docs/examples/functions/delete-tag.md (100%) rename app/sdks/{ => 0.6.2}/server-go/docs/examples/functions/delete.md (100%) rename app/sdks/{ => 0.6.2}/server-go/docs/examples/functions/get-execution.md (100%) rename app/sdks/{ => 0.6.2}/server-go/docs/examples/functions/get-tag.md (100%) rename app/sdks/{ => 0.6.2}/server-go/docs/examples/functions/get.md (100%) rename app/sdks/{ => 0.6.2}/server-go/docs/examples/functions/list-executions.md (100%) rename app/sdks/{ => 0.6.2}/server-go/docs/examples/functions/list-tags.md (100%) rename app/sdks/{ => 0.6.2}/server-go/docs/examples/functions/list.md (100%) rename app/sdks/{ => 0.6.2}/server-go/docs/examples/functions/update-active.md (100%) rename app/sdks/{ => 0.6.2}/server-go/docs/examples/functions/update-tag.md (100%) rename app/sdks/{ => 0.6.2}/server-go/docs/examples/functions/update.md (100%) rename app/sdks/{ => 0.6.2}/server-go/docs/examples/health/get-anti-virus.md (100%) rename app/sdks/{ => 0.6.2}/server-go/docs/examples/health/get-cache.md (100%) rename app/sdks/{ => 0.6.2}/server-go/docs/examples/health/get-d-b.md (100%) rename app/sdks/{ => 0.6.2}/server-go/docs/examples/health/get-queue-certificates.md (100%) rename app/sdks/{ => 0.6.2}/server-go/docs/examples/health/get-queue-functions.md (100%) rename app/sdks/{ => 0.6.2}/server-go/docs/examples/health/get-queue-logs.md (100%) rename app/sdks/{ => 0.6.2}/server-go/docs/examples/health/get-queue-tasks.md (100%) rename app/sdks/{ => 0.6.2}/server-go/docs/examples/health/get-queue-usage.md (100%) rename app/sdks/{ => 0.6.2}/server-go/docs/examples/health/get-queue-webhooks.md (100%) rename app/sdks/{ => 0.6.2}/server-go/docs/examples/health/get-storage-anti-virus.md (100%) rename app/sdks/{ => 0.6.2}/server-go/docs/examples/health/get-storage-local.md (100%) rename app/sdks/{ => 0.6.2}/server-go/docs/examples/health/get-time.md (100%) rename app/sdks/{ => 0.6.2}/server-go/docs/examples/health/get.md (100%) rename app/sdks/{ => 0.6.2}/server-go/docs/examples/locale/get-continents.md (100%) rename app/sdks/{ => 0.6.2}/server-go/docs/examples/locale/get-countries-e-u.md (100%) rename app/sdks/{ => 0.6.2}/server-go/docs/examples/locale/get-countries-phones.md (100%) rename app/sdks/{ => 0.6.2}/server-go/docs/examples/locale/get-countries.md (100%) rename app/sdks/{ => 0.6.2}/server-go/docs/examples/locale/get-currencies.md (100%) rename app/sdks/{ => 0.6.2}/server-go/docs/examples/locale/get.md (100%) rename app/sdks/{ => 0.6.2}/server-go/docs/examples/storage/create-file.md (100%) rename app/sdks/{ => 0.6.2}/server-go/docs/examples/storage/delete-file.md (100%) rename app/sdks/{ => 0.6.2}/server-go/docs/examples/storage/get-file-download.md (100%) rename app/sdks/{ => 0.6.2}/server-go/docs/examples/storage/get-file-preview.md (100%) rename app/sdks/{ => 0.6.2}/server-go/docs/examples/storage/get-file-view.md (100%) rename app/sdks/{ => 0.6.2}/server-go/docs/examples/storage/get-file.md (100%) rename app/sdks/{ => 0.6.2}/server-go/docs/examples/storage/list-files.md (100%) rename app/sdks/{ => 0.6.2}/server-go/docs/examples/storage/update-file.md (100%) rename app/sdks/{ => 0.6.2}/server-go/docs/examples/teams/create-membership.md (100%) rename app/sdks/{ => 0.6.2}/server-go/docs/examples/teams/create.md (100%) rename app/sdks/{ => 0.6.2}/server-go/docs/examples/teams/delete-membership.md (100%) rename app/sdks/{ => 0.6.2}/server-go/docs/examples/teams/delete.md (100%) rename app/sdks/{ => 0.6.2}/server-go/docs/examples/teams/get-memberships.md (100%) rename app/sdks/{ => 0.6.2}/server-go/docs/examples/teams/get.md (100%) rename app/sdks/{ => 0.6.2}/server-go/docs/examples/teams/list.md (100%) rename app/sdks/{ => 0.6.2}/server-go/docs/examples/teams/update.md (100%) rename app/sdks/{ => 0.6.2}/server-go/docs/examples/users/create.md (100%) rename app/sdks/{ => 0.6.2}/server-go/docs/examples/users/delete-session.md (100%) rename app/sdks/{ => 0.6.2}/server-go/docs/examples/users/delete-sessions.md (100%) rename app/sdks/{ => 0.6.2}/server-go/docs/examples/users/get-logs.md (100%) rename app/sdks/{ => 0.6.2}/server-go/docs/examples/users/get-prefs.md (100%) rename app/sdks/{ => 0.6.2}/server-go/docs/examples/users/get-sessions.md (100%) rename app/sdks/{ => 0.6.2}/server-go/docs/examples/users/get.md (100%) rename app/sdks/{ => 0.6.2}/server-go/docs/examples/users/list.md (100%) rename app/sdks/{ => 0.6.2}/server-go/docs/examples/users/update-prefs.md (100%) rename app/sdks/{ => 0.6.2}/server-go/docs/examples/users/update-status.md (100%) rename app/sdks/{ => 0.6.2}/server-go/functions.go (100%) rename app/sdks/{ => 0.6.2}/server-go/health.go (100%) rename app/sdks/{ => 0.6.2}/server-go/locale.go (100%) rename app/sdks/{ => 0.6.2}/server-go/main.go (100%) rename app/sdks/{ => 0.6.2}/server-go/storage.go (100%) rename app/sdks/{ => 0.6.2}/server-go/teams.go (100%) rename app/sdks/{ => 0.6.2}/server-go/users.go (100%) rename app/sdks/{ => 0.6.2}/server-go/utils.go (100%) rename app/sdks/{ => 0.6.2}/server-java/CHANGELOG.md (100%) rename app/sdks/{ => 0.6.2}/server-java/LICENSE (100%) rename app/sdks/{ => 0.6.2}/server-java/README.md (100%) rename app/sdks/{ => 0.6.2}/server-java/pom.xml (100%) rename app/sdks/{ => 0.6.2}/server-java/src/main/java/Client.java (100%) rename app/sdks/{ => 0.6.2}/server-java/src/main/java/enums/OrderType.java (100%) rename app/sdks/{ => 0.6.2}/server-java/src/main/java/services/Avatars.java (100%) rename app/sdks/{ => 0.6.2}/server-java/src/main/java/services/Database.java (100%) rename app/sdks/{ => 0.6.2}/server-java/src/main/java/services/Functions.java (100%) rename app/sdks/{ => 0.6.2}/server-java/src/main/java/services/Health.java (100%) rename app/sdks/{ => 0.6.2}/server-java/src/main/java/services/Locale.java (100%) rename app/sdks/{ => 0.6.2}/server-java/src/main/java/services/Service.java (100%) rename app/sdks/{ => 0.6.2}/server-java/src/main/java/services/Storage.java (100%) rename app/sdks/{ => 0.6.2}/server-java/src/main/java/services/Teams.java (100%) rename app/sdks/{ => 0.6.2}/server-java/src/main/java/services/Users.java (100%) rename app/sdks/{ => 0.6.2}/server-nodejs/CHANGELOG.md (100%) rename app/sdks/{ => 0.6.2}/server-nodejs/LICENSE (100%) rename app/sdks/{ => 0.6.2}/server-nodejs/README.md (100%) rename app/sdks/{ => 0.6.2}/server-nodejs/docs/examples/avatars/get-browser.md (100%) rename app/sdks/{ => 0.6.2}/server-nodejs/docs/examples/avatars/get-credit-card.md (100%) rename app/sdks/{ => 0.6.2}/server-nodejs/docs/examples/avatars/get-favicon.md (100%) rename app/sdks/{ => 0.6.2}/server-nodejs/docs/examples/avatars/get-flag.md (100%) rename app/sdks/{ => 0.6.2}/server-nodejs/docs/examples/avatars/get-image.md (100%) rename app/sdks/{ => 0.6.2}/server-nodejs/docs/examples/avatars/get-q-r.md (100%) rename app/sdks/{ => 0.6.2}/server-nodejs/docs/examples/database/create-collection.md (100%) rename app/sdks/{ => 0.6.2}/server-nodejs/docs/examples/database/create-document.md (100%) rename app/sdks/{ => 0.6.2}/server-nodejs/docs/examples/database/delete-collection.md (100%) rename app/sdks/{ => 0.6.2}/server-nodejs/docs/examples/database/delete-document.md (100%) rename app/sdks/{ => 0.6.2}/server-nodejs/docs/examples/database/get-collection-logs.md (100%) rename app/sdks/{ => 0.6.2}/server-nodejs/docs/examples/database/get-collection.md (100%) rename app/sdks/{ => 0.6.2}/server-nodejs/docs/examples/database/get-document.md (100%) rename app/sdks/{ => 0.6.2}/server-nodejs/docs/examples/database/list-collections.md (100%) rename app/sdks/{ => 0.6.2}/server-nodejs/docs/examples/database/list-documents.md (100%) rename app/sdks/{ => 0.6.2}/server-nodejs/docs/examples/database/update-collection.md (100%) rename app/sdks/{ => 0.6.2}/server-nodejs/docs/examples/database/update-document.md (100%) rename app/sdks/{ => 0.6.2}/server-nodejs/docs/examples/functions/create-execution.md (100%) rename app/sdks/{ => 0.6.2}/server-nodejs/docs/examples/functions/create-tag.md (100%) rename app/sdks/{ => 0.6.2}/server-nodejs/docs/examples/functions/create.md (100%) rename app/sdks/{ => 0.6.2}/server-nodejs/docs/examples/functions/delete-tag.md (100%) rename app/sdks/{ => 0.6.2}/server-nodejs/docs/examples/functions/delete.md (100%) rename app/sdks/{ => 0.6.2}/server-nodejs/docs/examples/functions/get-execution.md (100%) rename app/sdks/{ => 0.6.2}/server-nodejs/docs/examples/functions/get-tag.md (100%) rename app/sdks/{ => 0.6.2}/server-nodejs/docs/examples/functions/get.md (100%) rename app/sdks/{ => 0.6.2}/server-nodejs/docs/examples/functions/list-executions.md (100%) rename app/sdks/{ => 0.6.2}/server-nodejs/docs/examples/functions/list-tags.md (100%) rename app/sdks/{ => 0.6.2}/server-nodejs/docs/examples/functions/list.md (100%) rename app/sdks/{ => 0.6.2}/server-nodejs/docs/examples/functions/update-active.md (100%) rename app/sdks/{ => 0.6.2}/server-nodejs/docs/examples/functions/update-tag.md (100%) rename app/sdks/{ => 0.6.2}/server-nodejs/docs/examples/functions/update.md (100%) rename app/sdks/{ => 0.6.2}/server-nodejs/docs/examples/health/get-anti-virus.md (100%) rename app/sdks/{ => 0.6.2}/server-nodejs/docs/examples/health/get-cache.md (100%) rename app/sdks/{ => 0.6.2}/server-nodejs/docs/examples/health/get-d-b.md (100%) rename app/sdks/{ => 0.6.2}/server-nodejs/docs/examples/health/get-queue-certificates.md (100%) rename app/sdks/{ => 0.6.2}/server-nodejs/docs/examples/health/get-queue-functions.md (100%) rename app/sdks/{ => 0.6.2}/server-nodejs/docs/examples/health/get-queue-logs.md (100%) rename app/sdks/{ => 0.6.2}/server-nodejs/docs/examples/health/get-queue-tasks.md (100%) rename app/sdks/{ => 0.6.2}/server-nodejs/docs/examples/health/get-queue-usage.md (100%) rename app/sdks/{ => 0.6.2}/server-nodejs/docs/examples/health/get-queue-webhooks.md (100%) rename app/sdks/{ => 0.6.2}/server-nodejs/docs/examples/health/get-storage-anti-virus.md (100%) rename app/sdks/{ => 0.6.2}/server-nodejs/docs/examples/health/get-storage-local.md (100%) rename app/sdks/{ => 0.6.2}/server-nodejs/docs/examples/health/get-time.md (100%) rename app/sdks/{ => 0.6.2}/server-nodejs/docs/examples/health/get.md (100%) rename app/sdks/{ => 0.6.2}/server-nodejs/docs/examples/locale/get-continents.md (100%) rename app/sdks/{ => 0.6.2}/server-nodejs/docs/examples/locale/get-countries-e-u.md (100%) rename app/sdks/{ => 0.6.2}/server-nodejs/docs/examples/locale/get-countries-phones.md (100%) rename app/sdks/{ => 0.6.2}/server-nodejs/docs/examples/locale/get-countries.md (100%) rename app/sdks/{ => 0.6.2}/server-nodejs/docs/examples/locale/get-currencies.md (100%) rename app/sdks/{ => 0.6.2}/server-nodejs/docs/examples/locale/get.md (100%) rename app/sdks/{ => 0.6.2}/server-nodejs/docs/examples/storage/create-file.md (100%) rename app/sdks/{ => 0.6.2}/server-nodejs/docs/examples/storage/delete-file.md (100%) rename app/sdks/{ => 0.6.2}/server-nodejs/docs/examples/storage/get-file-download.md (100%) rename app/sdks/{ => 0.6.2}/server-nodejs/docs/examples/storage/get-file-preview.md (100%) rename app/sdks/{ => 0.6.2}/server-nodejs/docs/examples/storage/get-file-view.md (100%) rename app/sdks/{ => 0.6.2}/server-nodejs/docs/examples/storage/get-file.md (100%) rename app/sdks/{ => 0.6.2}/server-nodejs/docs/examples/storage/list-files.md (100%) rename app/sdks/{ => 0.6.2}/server-nodejs/docs/examples/storage/update-file.md (100%) rename app/sdks/{ => 0.6.2}/server-nodejs/docs/examples/teams/create-membership.md (100%) rename app/sdks/{ => 0.6.2}/server-nodejs/docs/examples/teams/create.md (100%) rename app/sdks/{ => 0.6.2}/server-nodejs/docs/examples/teams/delete-membership.md (100%) rename app/sdks/{ => 0.6.2}/server-nodejs/docs/examples/teams/delete.md (100%) rename app/sdks/{ => 0.6.2}/server-nodejs/docs/examples/teams/get-memberships.md (100%) rename app/sdks/{ => 0.6.2}/server-nodejs/docs/examples/teams/get.md (100%) rename app/sdks/{ => 0.6.2}/server-nodejs/docs/examples/teams/list.md (100%) rename app/sdks/{ => 0.6.2}/server-nodejs/docs/examples/teams/update.md (100%) rename app/sdks/{ => 0.6.2}/server-nodejs/docs/examples/users/create.md (100%) rename app/sdks/{ => 0.6.2}/server-nodejs/docs/examples/users/delete-session.md (100%) rename app/sdks/{ => 0.6.2}/server-nodejs/docs/examples/users/delete-sessions.md (100%) rename app/sdks/{ => 0.6.2}/server-nodejs/docs/examples/users/get-logs.md (100%) rename app/sdks/{ => 0.6.2}/server-nodejs/docs/examples/users/get-prefs.md (100%) rename app/sdks/{ => 0.6.2}/server-nodejs/docs/examples/users/get-sessions.md (100%) rename app/sdks/{ => 0.6.2}/server-nodejs/docs/examples/users/get.md (100%) rename app/sdks/{ => 0.6.2}/server-nodejs/docs/examples/users/list.md (100%) rename app/sdks/{ => 0.6.2}/server-nodejs/docs/examples/users/update-prefs.md (100%) rename app/sdks/{ => 0.6.2}/server-nodejs/docs/examples/users/update-status.md (100%) rename app/sdks/{ => 0.6.2}/server-nodejs/index.js (100%) rename app/sdks/{ => 0.6.2}/server-nodejs/lib/client.js (100%) rename app/sdks/{ => 0.6.2}/server-nodejs/lib/service.js (100%) rename app/sdks/{ => 0.6.2}/server-nodejs/lib/services/avatars.js (100%) rename app/sdks/{ => 0.6.2}/server-nodejs/lib/services/database.js (100%) rename app/sdks/{ => 0.6.2}/server-nodejs/lib/services/functions.js (100%) rename app/sdks/{ => 0.6.2}/server-nodejs/lib/services/health.js (100%) rename app/sdks/{ => 0.6.2}/server-nodejs/lib/services/locale.js (100%) rename app/sdks/{ => 0.6.2}/server-nodejs/lib/services/storage.js (100%) rename app/sdks/{ => 0.6.2}/server-nodejs/lib/services/teams.js (100%) rename app/sdks/{ => 0.6.2}/server-nodejs/lib/services/users.js (100%) rename app/sdks/{ => 0.6.2}/server-nodejs/package.json (100%) rename app/sdks/{ => 0.6.2}/server-php/CHANGELOG.md (100%) rename app/sdks/{ => 0.6.2}/server-php/LICENSE (100%) rename app/sdks/{ => 0.6.2}/server-php/README.md (100%) rename app/sdks/{ => 0.6.2}/server-php/composer.json (100%) rename app/sdks/{ => 0.6.2}/server-php/docs/avatars.md (100%) rename app/sdks/{ => 0.6.2}/server-php/docs/database.md (100%) rename app/sdks/{ => 0.6.2}/server-php/docs/examples/avatars/get-browser.md (100%) rename app/sdks/{ => 0.6.2}/server-php/docs/examples/avatars/get-credit-card.md (100%) rename app/sdks/{ => 0.6.2}/server-php/docs/examples/avatars/get-favicon.md (100%) rename app/sdks/{ => 0.6.2}/server-php/docs/examples/avatars/get-flag.md (100%) rename app/sdks/{ => 0.6.2}/server-php/docs/examples/avatars/get-image.md (100%) rename app/sdks/{ => 0.6.2}/server-php/docs/examples/avatars/get-q-r.md (100%) rename app/sdks/{ => 0.6.2}/server-php/docs/examples/database/create-collection.md (100%) rename app/sdks/{ => 0.6.2}/server-php/docs/examples/database/create-document.md (100%) rename app/sdks/{ => 0.6.2}/server-php/docs/examples/database/delete-collection.md (100%) rename app/sdks/{ => 0.6.2}/server-php/docs/examples/database/delete-document.md (100%) rename app/sdks/{ => 0.6.2}/server-php/docs/examples/database/get-collection-logs.md (100%) rename app/sdks/{ => 0.6.2}/server-php/docs/examples/database/get-collection.md (100%) rename app/sdks/{ => 0.6.2}/server-php/docs/examples/database/get-document.md (100%) rename app/sdks/{ => 0.6.2}/server-php/docs/examples/database/list-collections.md (100%) rename app/sdks/{ => 0.6.2}/server-php/docs/examples/database/list-documents.md (100%) rename app/sdks/{ => 0.6.2}/server-php/docs/examples/database/update-collection.md (100%) rename app/sdks/{ => 0.6.2}/server-php/docs/examples/database/update-document.md (100%) rename app/sdks/{ => 0.6.2}/server-php/docs/examples/functions/create-execution.md (100%) rename app/sdks/{ => 0.6.2}/server-php/docs/examples/functions/create-tag.md (100%) rename app/sdks/{ => 0.6.2}/server-php/docs/examples/functions/create.md (100%) rename app/sdks/{ => 0.6.2}/server-php/docs/examples/functions/delete-tag.md (100%) rename app/sdks/{ => 0.6.2}/server-php/docs/examples/functions/delete.md (100%) rename app/sdks/{ => 0.6.2}/server-php/docs/examples/functions/get-execution.md (100%) rename app/sdks/{ => 0.6.2}/server-php/docs/examples/functions/get-tag.md (100%) rename app/sdks/{ => 0.6.2}/server-php/docs/examples/functions/get.md (100%) rename app/sdks/{ => 0.6.2}/server-php/docs/examples/functions/list-executions.md (100%) rename app/sdks/{ => 0.6.2}/server-php/docs/examples/functions/list-tags.md (100%) rename app/sdks/{ => 0.6.2}/server-php/docs/examples/functions/list.md (100%) rename app/sdks/{ => 0.6.2}/server-php/docs/examples/functions/update-active.md (100%) rename app/sdks/{ => 0.6.2}/server-php/docs/examples/functions/update-tag.md (100%) rename app/sdks/{ => 0.6.2}/server-php/docs/examples/functions/update.md (100%) rename app/sdks/{ => 0.6.2}/server-php/docs/examples/health/get-anti-virus.md (100%) rename app/sdks/{ => 0.6.2}/server-php/docs/examples/health/get-cache.md (100%) rename app/sdks/{ => 0.6.2}/server-php/docs/examples/health/get-d-b.md (100%) rename app/sdks/{ => 0.6.2}/server-php/docs/examples/health/get-queue-certificates.md (100%) rename app/sdks/{ => 0.6.2}/server-php/docs/examples/health/get-queue-functions.md (100%) rename app/sdks/{ => 0.6.2}/server-php/docs/examples/health/get-queue-logs.md (100%) rename app/sdks/{ => 0.6.2}/server-php/docs/examples/health/get-queue-tasks.md (100%) rename app/sdks/{ => 0.6.2}/server-php/docs/examples/health/get-queue-usage.md (100%) rename app/sdks/{ => 0.6.2}/server-php/docs/examples/health/get-queue-webhooks.md (100%) rename app/sdks/{ => 0.6.2}/server-php/docs/examples/health/get-storage-anti-virus.md (100%) rename app/sdks/{ => 0.6.2}/server-php/docs/examples/health/get-storage-local.md (100%) rename app/sdks/{ => 0.6.2}/server-php/docs/examples/health/get-time.md (100%) rename app/sdks/{ => 0.6.2}/server-php/docs/examples/health/get.md (100%) rename app/sdks/{ => 0.6.2}/server-php/docs/examples/locale/get-continents.md (100%) rename app/sdks/{ => 0.6.2}/server-php/docs/examples/locale/get-countries-e-u.md (100%) rename app/sdks/{ => 0.6.2}/server-php/docs/examples/locale/get-countries-phones.md (100%) rename app/sdks/{ => 0.6.2}/server-php/docs/examples/locale/get-countries.md (100%) rename app/sdks/{ => 0.6.2}/server-php/docs/examples/locale/get-currencies.md (100%) rename app/sdks/{ => 0.6.2}/server-php/docs/examples/locale/get.md (100%) rename app/sdks/{ => 0.6.2}/server-php/docs/examples/storage/create-file.md (100%) rename app/sdks/{ => 0.6.2}/server-php/docs/examples/storage/delete-file.md (100%) rename app/sdks/{ => 0.6.2}/server-php/docs/examples/storage/get-file-download.md (100%) rename app/sdks/{ => 0.6.2}/server-php/docs/examples/storage/get-file-preview.md (100%) rename app/sdks/{ => 0.6.2}/server-php/docs/examples/storage/get-file-view.md (100%) rename app/sdks/{ => 0.6.2}/server-php/docs/examples/storage/get-file.md (100%) rename app/sdks/{ => 0.6.2}/server-php/docs/examples/storage/list-files.md (100%) rename app/sdks/{ => 0.6.2}/server-php/docs/examples/storage/update-file.md (100%) rename app/sdks/{ => 0.6.2}/server-php/docs/examples/teams/create-membership.md (100%) rename app/sdks/{ => 0.6.2}/server-php/docs/examples/teams/create.md (100%) rename app/sdks/{ => 0.6.2}/server-php/docs/examples/teams/delete-membership.md (100%) rename app/sdks/{ => 0.6.2}/server-php/docs/examples/teams/delete.md (100%) rename app/sdks/{ => 0.6.2}/server-php/docs/examples/teams/get-memberships.md (100%) rename app/sdks/{ => 0.6.2}/server-php/docs/examples/teams/get.md (100%) rename app/sdks/{ => 0.6.2}/server-php/docs/examples/teams/list.md (100%) rename app/sdks/{ => 0.6.2}/server-php/docs/examples/teams/update.md (100%) rename app/sdks/{ => 0.6.2}/server-php/docs/examples/users/create.md (100%) rename app/sdks/{ => 0.6.2}/server-php/docs/examples/users/delete-session.md (100%) rename app/sdks/{ => 0.6.2}/server-php/docs/examples/users/delete-sessions.md (100%) rename app/sdks/{ => 0.6.2}/server-php/docs/examples/users/get-logs.md (100%) rename app/sdks/{ => 0.6.2}/server-php/docs/examples/users/get-prefs.md (100%) rename app/sdks/{ => 0.6.2}/server-php/docs/examples/users/get-sessions.md (100%) rename app/sdks/{ => 0.6.2}/server-php/docs/examples/users/get.md (100%) rename app/sdks/{ => 0.6.2}/server-php/docs/examples/users/list.md (100%) rename app/sdks/{ => 0.6.2}/server-php/docs/examples/users/update-prefs.md (100%) rename app/sdks/{ => 0.6.2}/server-php/docs/examples/users/update-status.md (100%) rename app/sdks/{ => 0.6.2}/server-php/docs/functions.md (100%) rename app/sdks/{ => 0.6.2}/server-php/docs/health.md (100%) rename app/sdks/{ => 0.6.2}/server-php/docs/locale.md (100%) rename app/sdks/{ => 0.6.2}/server-php/docs/storage.md (100%) rename app/sdks/{ => 0.6.2}/server-php/docs/teams.md (100%) rename app/sdks/{ => 0.6.2}/server-php/docs/users.md (100%) rename app/sdks/{ => 0.6.2}/server-php/src/Appwrite/Client.php (100%) rename app/sdks/{ => 0.6.2}/server-php/src/Appwrite/Service.php (100%) rename app/sdks/{ => 0.6.2}/server-php/src/Appwrite/Services/Avatars.php (100%) rename app/sdks/{ => 0.6.2}/server-php/src/Appwrite/Services/Database.php (100%) rename app/sdks/{ => 0.6.2}/server-php/src/Appwrite/Services/Functions.php (100%) rename app/sdks/{ => 0.6.2}/server-php/src/Appwrite/Services/Health.php (100%) rename app/sdks/{ => 0.6.2}/server-php/src/Appwrite/Services/Locale.php (100%) rename app/sdks/{ => 0.6.2}/server-php/src/Appwrite/Services/Storage.php (100%) rename app/sdks/{ => 0.6.2}/server-php/src/Appwrite/Services/Teams.php (100%) rename app/sdks/{ => 0.6.2}/server-php/src/Appwrite/Services/Users.php (100%) rename app/sdks/{ => 0.6.2}/server-python/CHANGELOG.md (100%) rename app/sdks/{ => 0.6.2}/server-python/LICENSE (100%) rename app/sdks/{ => 0.6.2}/server-python/README.md (100%) rename app/sdks/{ => 0.6.2}/server-python/appwrite/__init__.py (100%) rename app/sdks/{ => 0.6.2}/server-python/appwrite/client.py (100%) rename app/sdks/{ => 0.6.2}/server-python/appwrite/service.py (100%) rename app/sdks/{ => 0.6.2}/server-python/appwrite/services/__init__.py (100%) rename app/sdks/{ => 0.6.2}/server-python/appwrite/services/avatars.py (100%) rename app/sdks/{ => 0.6.2}/server-python/appwrite/services/database.py (100%) rename app/sdks/{ => 0.6.2}/server-python/appwrite/services/functions.py (100%) rename app/sdks/{ => 0.6.2}/server-python/appwrite/services/health.py (100%) rename app/sdks/{ => 0.6.2}/server-python/appwrite/services/locale.py (100%) rename app/sdks/{ => 0.6.2}/server-python/appwrite/services/storage.py (100%) rename app/sdks/{ => 0.6.2}/server-python/appwrite/services/teams.py (100%) rename app/sdks/{ => 0.6.2}/server-python/appwrite/services/users.py (100%) rename app/sdks/{ => 0.6.2}/server-python/docs/examples/avatars/get-browser.md (100%) rename app/sdks/{ => 0.6.2}/server-python/docs/examples/avatars/get-credit-card.md (100%) rename app/sdks/{ => 0.6.2}/server-python/docs/examples/avatars/get-favicon.md (100%) rename app/sdks/{ => 0.6.2}/server-python/docs/examples/avatars/get-flag.md (100%) rename app/sdks/{ => 0.6.2}/server-python/docs/examples/avatars/get-image.md (100%) rename app/sdks/{ => 0.6.2}/server-python/docs/examples/avatars/get-q-r.md (100%) rename app/sdks/{ => 0.6.2}/server-python/docs/examples/database/create-collection.md (100%) rename app/sdks/{ => 0.6.2}/server-python/docs/examples/database/create-document.md (100%) rename app/sdks/{ => 0.6.2}/server-python/docs/examples/database/delete-collection.md (100%) rename app/sdks/{ => 0.6.2}/server-python/docs/examples/database/delete-document.md (100%) rename app/sdks/{ => 0.6.2}/server-python/docs/examples/database/get-collection-logs.md (100%) rename app/sdks/{ => 0.6.2}/server-python/docs/examples/database/get-collection.md (100%) rename app/sdks/{ => 0.6.2}/server-python/docs/examples/database/get-document.md (100%) rename app/sdks/{ => 0.6.2}/server-python/docs/examples/database/list-collections.md (100%) rename app/sdks/{ => 0.6.2}/server-python/docs/examples/database/list-documents.md (100%) rename app/sdks/{ => 0.6.2}/server-python/docs/examples/database/update-collection.md (100%) rename app/sdks/{ => 0.6.2}/server-python/docs/examples/database/update-document.md (100%) rename app/sdks/{ => 0.6.2}/server-python/docs/examples/functions/create-execution.md (100%) rename app/sdks/{ => 0.6.2}/server-python/docs/examples/functions/create-tag.md (100%) rename app/sdks/{ => 0.6.2}/server-python/docs/examples/functions/create.md (100%) rename app/sdks/{ => 0.6.2}/server-python/docs/examples/functions/delete-tag.md (100%) rename app/sdks/{ => 0.6.2}/server-python/docs/examples/functions/delete.md (100%) rename app/sdks/{ => 0.6.2}/server-python/docs/examples/functions/get-execution.md (100%) rename app/sdks/{ => 0.6.2}/server-python/docs/examples/functions/get-tag.md (100%) rename app/sdks/{ => 0.6.2}/server-python/docs/examples/functions/get.md (100%) rename app/sdks/{ => 0.6.2}/server-python/docs/examples/functions/list-executions.md (100%) rename app/sdks/{ => 0.6.2}/server-python/docs/examples/functions/list-tags.md (100%) rename app/sdks/{ => 0.6.2}/server-python/docs/examples/functions/list.md (100%) rename app/sdks/{ => 0.6.2}/server-python/docs/examples/functions/update-active.md (100%) rename app/sdks/{ => 0.6.2}/server-python/docs/examples/functions/update-tag.md (100%) rename app/sdks/{ => 0.6.2}/server-python/docs/examples/functions/update.md (100%) rename app/sdks/{ => 0.6.2}/server-python/docs/examples/health/get-anti-virus.md (100%) rename app/sdks/{ => 0.6.2}/server-python/docs/examples/health/get-cache.md (100%) rename app/sdks/{ => 0.6.2}/server-python/docs/examples/health/get-d-b.md (100%) rename app/sdks/{ => 0.6.2}/server-python/docs/examples/health/get-queue-certificates.md (100%) rename app/sdks/{ => 0.6.2}/server-python/docs/examples/health/get-queue-functions.md (100%) rename app/sdks/{ => 0.6.2}/server-python/docs/examples/health/get-queue-logs.md (100%) rename app/sdks/{ => 0.6.2}/server-python/docs/examples/health/get-queue-tasks.md (100%) rename app/sdks/{ => 0.6.2}/server-python/docs/examples/health/get-queue-usage.md (100%) rename app/sdks/{ => 0.6.2}/server-python/docs/examples/health/get-queue-webhooks.md (100%) rename app/sdks/{ => 0.6.2}/server-python/docs/examples/health/get-storage-anti-virus.md (100%) rename app/sdks/{ => 0.6.2}/server-python/docs/examples/health/get-storage-local.md (100%) rename app/sdks/{ => 0.6.2}/server-python/docs/examples/health/get-time.md (100%) rename app/sdks/{ => 0.6.2}/server-python/docs/examples/health/get.md (100%) rename app/sdks/{ => 0.6.2}/server-python/docs/examples/locale/get-continents.md (100%) rename app/sdks/{ => 0.6.2}/server-python/docs/examples/locale/get-countries-e-u.md (100%) rename app/sdks/{ => 0.6.2}/server-python/docs/examples/locale/get-countries-phones.md (100%) rename app/sdks/{ => 0.6.2}/server-python/docs/examples/locale/get-countries.md (100%) rename app/sdks/{ => 0.6.2}/server-python/docs/examples/locale/get-currencies.md (100%) rename app/sdks/{ => 0.6.2}/server-python/docs/examples/locale/get.md (100%) rename app/sdks/{ => 0.6.2}/server-python/docs/examples/storage/create-file.md (100%) rename app/sdks/{ => 0.6.2}/server-python/docs/examples/storage/delete-file.md (100%) rename app/sdks/{ => 0.6.2}/server-python/docs/examples/storage/get-file-download.md (100%) rename app/sdks/{ => 0.6.2}/server-python/docs/examples/storage/get-file-preview.md (100%) rename app/sdks/{ => 0.6.2}/server-python/docs/examples/storage/get-file-view.md (100%) rename app/sdks/{ => 0.6.2}/server-python/docs/examples/storage/get-file.md (100%) rename app/sdks/{ => 0.6.2}/server-python/docs/examples/storage/list-files.md (100%) rename app/sdks/{ => 0.6.2}/server-python/docs/examples/storage/update-file.md (100%) rename app/sdks/{ => 0.6.2}/server-python/docs/examples/teams/create-membership.md (100%) rename app/sdks/{ => 0.6.2}/server-python/docs/examples/teams/create.md (100%) rename app/sdks/{ => 0.6.2}/server-python/docs/examples/teams/delete-membership.md (100%) rename app/sdks/{ => 0.6.2}/server-python/docs/examples/teams/delete.md (100%) rename app/sdks/{ => 0.6.2}/server-python/docs/examples/teams/get-memberships.md (100%) rename app/sdks/{ => 0.6.2}/server-python/docs/examples/teams/get.md (100%) rename app/sdks/{ => 0.6.2}/server-python/docs/examples/teams/list.md (100%) rename app/sdks/{ => 0.6.2}/server-python/docs/examples/teams/update.md (100%) rename app/sdks/{ => 0.6.2}/server-python/docs/examples/users/create.md (100%) rename app/sdks/{ => 0.6.2}/server-python/docs/examples/users/delete-session.md (100%) rename app/sdks/{ => 0.6.2}/server-python/docs/examples/users/delete-sessions.md (100%) rename app/sdks/{ => 0.6.2}/server-python/docs/examples/users/get-logs.md (100%) rename app/sdks/{ => 0.6.2}/server-python/docs/examples/users/get-prefs.md (100%) rename app/sdks/{ => 0.6.2}/server-python/docs/examples/users/get-sessions.md (100%) rename app/sdks/{ => 0.6.2}/server-python/docs/examples/users/get.md (100%) rename app/sdks/{ => 0.6.2}/server-python/docs/examples/users/list.md (100%) rename app/sdks/{ => 0.6.2}/server-python/docs/examples/users/update-prefs.md (100%) rename app/sdks/{ => 0.6.2}/server-python/docs/examples/users/update-status.md (100%) rename app/sdks/{ => 0.6.2}/server-python/requirements.txt (100%) rename app/sdks/{ => 0.6.2}/server-python/setup.cfg (100%) rename app/sdks/{ => 0.6.2}/server-python/setup.py (100%) rename app/sdks/{ => 0.6.2}/server-ruby/CHANGELOG.md (100%) rename app/sdks/{ => 0.6.2}/server-ruby/Gemfile (100%) rename app/sdks/{ => 0.6.2}/server-ruby/LICENSE (100%) rename app/sdks/{ => 0.6.2}/server-ruby/README.md (100%) rename app/sdks/{ => 0.6.2}/server-ruby/appwrite.gemspec (100%) rename app/sdks/{ => 0.6.2}/server-ruby/docs/examples/avatars/get-browser.md (100%) rename app/sdks/{ => 0.6.2}/server-ruby/docs/examples/avatars/get-credit-card.md (100%) rename app/sdks/{ => 0.6.2}/server-ruby/docs/examples/avatars/get-favicon.md (100%) rename app/sdks/{ => 0.6.2}/server-ruby/docs/examples/avatars/get-flag.md (100%) rename app/sdks/{ => 0.6.2}/server-ruby/docs/examples/avatars/get-image.md (100%) rename app/sdks/{ => 0.6.2}/server-ruby/docs/examples/avatars/get-q-r.md (100%) rename app/sdks/{ => 0.6.2}/server-ruby/docs/examples/database/create-collection.md (100%) rename app/sdks/{ => 0.6.2}/server-ruby/docs/examples/database/create-document.md (100%) rename app/sdks/{ => 0.6.2}/server-ruby/docs/examples/database/delete-collection.md (100%) rename app/sdks/{ => 0.6.2}/server-ruby/docs/examples/database/delete-document.md (100%) rename app/sdks/{ => 0.6.2}/server-ruby/docs/examples/database/get-collection-logs.md (100%) rename app/sdks/{ => 0.6.2}/server-ruby/docs/examples/database/get-collection.md (100%) rename app/sdks/{ => 0.6.2}/server-ruby/docs/examples/database/get-document.md (100%) rename app/sdks/{ => 0.6.2}/server-ruby/docs/examples/database/list-collections.md (100%) rename app/sdks/{ => 0.6.2}/server-ruby/docs/examples/database/list-documents.md (100%) rename app/sdks/{ => 0.6.2}/server-ruby/docs/examples/database/update-collection.md (100%) rename app/sdks/{ => 0.6.2}/server-ruby/docs/examples/database/update-document.md (100%) rename app/sdks/{ => 0.6.2}/server-ruby/docs/examples/health/get-anti-virus.md (100%) rename app/sdks/{ => 0.6.2}/server-ruby/docs/examples/health/get-cache.md (100%) rename app/sdks/{ => 0.6.2}/server-ruby/docs/examples/health/get-d-b.md (100%) rename app/sdks/{ => 0.6.2}/server-ruby/docs/examples/health/get-queue-certificates.md (100%) rename app/sdks/{ => 0.6.2}/server-ruby/docs/examples/health/get-queue-functions.md (100%) rename app/sdks/{ => 0.6.2}/server-ruby/docs/examples/health/get-queue-logs.md (100%) rename app/sdks/{ => 0.6.2}/server-ruby/docs/examples/health/get-queue-tasks.md (100%) rename app/sdks/{ => 0.6.2}/server-ruby/docs/examples/health/get-queue-usage.md (100%) rename app/sdks/{ => 0.6.2}/server-ruby/docs/examples/health/get-queue-webhooks.md (100%) rename app/sdks/{ => 0.6.2}/server-ruby/docs/examples/health/get-storage-local.md (100%) rename app/sdks/{ => 0.6.2}/server-ruby/docs/examples/health/get-time.md (100%) rename app/sdks/{ => 0.6.2}/server-ruby/docs/examples/health/get.md (100%) rename app/sdks/{ => 0.6.2}/server-ruby/docs/examples/locale/get-continents.md (100%) rename app/sdks/{ => 0.6.2}/server-ruby/docs/examples/locale/get-countries-e-u.md (100%) rename app/sdks/{ => 0.6.2}/server-ruby/docs/examples/locale/get-countries-phones.md (100%) rename app/sdks/{ => 0.6.2}/server-ruby/docs/examples/locale/get-countries.md (100%) rename app/sdks/{ => 0.6.2}/server-ruby/docs/examples/locale/get-currencies.md (100%) rename app/sdks/{ => 0.6.2}/server-ruby/docs/examples/locale/get.md (100%) rename app/sdks/{ => 0.6.2}/server-ruby/docs/examples/storage/create-file.md (100%) rename app/sdks/{ => 0.6.2}/server-ruby/docs/examples/storage/delete-file.md (100%) rename app/sdks/{ => 0.6.2}/server-ruby/docs/examples/storage/get-file-download.md (100%) rename app/sdks/{ => 0.6.2}/server-ruby/docs/examples/storage/get-file-preview.md (100%) rename app/sdks/{ => 0.6.2}/server-ruby/docs/examples/storage/get-file-view.md (100%) rename app/sdks/{ => 0.6.2}/server-ruby/docs/examples/storage/get-file.md (100%) rename app/sdks/{ => 0.6.2}/server-ruby/docs/examples/storage/list-files.md (100%) rename app/sdks/{ => 0.6.2}/server-ruby/docs/examples/storage/update-file.md (100%) rename app/sdks/{ => 0.6.2}/server-ruby/docs/examples/teams/create-membership.md (100%) rename app/sdks/{ => 0.6.2}/server-ruby/docs/examples/teams/create.md (100%) rename app/sdks/{ => 0.6.2}/server-ruby/docs/examples/teams/delete-membership.md (100%) rename app/sdks/{ => 0.6.2}/server-ruby/docs/examples/teams/delete.md (100%) rename app/sdks/{ => 0.6.2}/server-ruby/docs/examples/teams/get-memberships.md (100%) rename app/sdks/{ => 0.6.2}/server-ruby/docs/examples/teams/get.md (100%) rename app/sdks/{ => 0.6.2}/server-ruby/docs/examples/teams/list.md (100%) rename app/sdks/{ => 0.6.2}/server-ruby/docs/examples/teams/update.md (100%) rename app/sdks/{ => 0.6.2}/server-ruby/docs/examples/users/create.md (100%) rename app/sdks/{ => 0.6.2}/server-ruby/docs/examples/users/delete-session.md (100%) rename app/sdks/{ => 0.6.2}/server-ruby/docs/examples/users/delete-sessions.md (100%) rename app/sdks/{ => 0.6.2}/server-ruby/docs/examples/users/get-logs.md (100%) rename app/sdks/{ => 0.6.2}/server-ruby/docs/examples/users/get-prefs.md (100%) rename app/sdks/{ => 0.6.2}/server-ruby/docs/examples/users/get-sessions.md (100%) rename app/sdks/{ => 0.6.2}/server-ruby/docs/examples/users/get.md (100%) rename app/sdks/{ => 0.6.2}/server-ruby/docs/examples/users/list.md (100%) rename app/sdks/{ => 0.6.2}/server-ruby/docs/examples/users/update-prefs.md (100%) rename app/sdks/{ => 0.6.2}/server-ruby/docs/examples/users/update-status.md (100%) rename app/sdks/{ => 0.6.2}/server-ruby/lib/appwrite.rb (100%) rename app/sdks/{ => 0.6.2}/server-ruby/lib/appwrite/client.rb (100%) rename app/sdks/{ => 0.6.2}/server-ruby/lib/appwrite/service.rb (100%) rename app/sdks/{ => 0.6.2}/server-ruby/lib/appwrite/services/avatars.rb (100%) rename app/sdks/{ => 0.6.2}/server-ruby/lib/appwrite/services/database.rb (100%) rename app/sdks/{ => 0.6.2}/server-ruby/lib/appwrite/services/functions.rb (100%) rename app/sdks/{ => 0.6.2}/server-ruby/lib/appwrite/services/health.rb (100%) rename app/sdks/{ => 0.6.2}/server-ruby/lib/appwrite/services/locale.rb (100%) rename app/sdks/{ => 0.6.2}/server-ruby/lib/appwrite/services/storage.rb (100%) rename app/sdks/{ => 0.6.2}/server-ruby/lib/appwrite/services/teams.rb (100%) rename app/sdks/{ => 0.6.2}/server-ruby/lib/appwrite/services/users.rb (100%) create mode 100644 app/sdks/0.7.0/client-flutter-dev/CHANGELOG.md create mode 100644 app/sdks/0.7.0/client-flutter-dev/LICENSE create mode 100644 app/sdks/0.7.0/client-flutter-dev/README.md create mode 100644 app/sdks/0.7.0/client-flutter-dev/docs/examples/account/create-o-auth2session.md create mode 100644 app/sdks/0.7.0/client-flutter-dev/docs/examples/account/create-recovery.md create mode 100644 app/sdks/0.7.0/client-flutter-dev/docs/examples/account/create-session.md create mode 100644 app/sdks/0.7.0/client-flutter-dev/docs/examples/account/create-verification.md create mode 100644 app/sdks/0.7.0/client-flutter-dev/docs/examples/account/create.md create mode 100644 app/sdks/0.7.0/client-flutter-dev/docs/examples/account/delete-session.md create mode 100644 app/sdks/0.7.0/client-flutter-dev/docs/examples/account/delete-sessions.md create mode 100644 app/sdks/0.7.0/client-flutter-dev/docs/examples/account/delete.md create mode 100644 app/sdks/0.7.0/client-flutter-dev/docs/examples/account/get-logs.md create mode 100644 app/sdks/0.7.0/client-flutter-dev/docs/examples/account/get-prefs.md create mode 100644 app/sdks/0.7.0/client-flutter-dev/docs/examples/account/get-sessions.md create mode 100644 app/sdks/0.7.0/client-flutter-dev/docs/examples/account/get.md create mode 100644 app/sdks/0.7.0/client-flutter-dev/docs/examples/account/update-email.md create mode 100644 app/sdks/0.7.0/client-flutter-dev/docs/examples/account/update-name.md create mode 100644 app/sdks/0.7.0/client-flutter-dev/docs/examples/account/update-password.md create mode 100644 app/sdks/0.7.0/client-flutter-dev/docs/examples/account/update-prefs.md create mode 100644 app/sdks/0.7.0/client-flutter-dev/docs/examples/account/update-recovery.md create mode 100644 app/sdks/0.7.0/client-flutter-dev/docs/examples/account/update-verification.md create mode 100644 app/sdks/0.7.0/client-flutter-dev/docs/examples/avatars/get-browser.md create mode 100644 app/sdks/0.7.0/client-flutter-dev/docs/examples/avatars/get-credit-card.md create mode 100644 app/sdks/0.7.0/client-flutter-dev/docs/examples/avatars/get-favicon.md create mode 100644 app/sdks/0.7.0/client-flutter-dev/docs/examples/avatars/get-flag.md create mode 100644 app/sdks/0.7.0/client-flutter-dev/docs/examples/avatars/get-image.md create mode 100644 app/sdks/0.7.0/client-flutter-dev/docs/examples/avatars/get-q-r.md create mode 100644 app/sdks/0.7.0/client-flutter-dev/docs/examples/database/create-document.md create mode 100644 app/sdks/0.7.0/client-flutter-dev/docs/examples/database/delete-document.md create mode 100644 app/sdks/0.7.0/client-flutter-dev/docs/examples/database/get-document.md create mode 100644 app/sdks/0.7.0/client-flutter-dev/docs/examples/database/list-documents.md create mode 100644 app/sdks/0.7.0/client-flutter-dev/docs/examples/database/update-document.md create mode 100644 app/sdks/0.7.0/client-flutter-dev/docs/examples/locale/get-continents.md create mode 100644 app/sdks/0.7.0/client-flutter-dev/docs/examples/locale/get-countries-e-u.md create mode 100644 app/sdks/0.7.0/client-flutter-dev/docs/examples/locale/get-countries-phones.md create mode 100644 app/sdks/0.7.0/client-flutter-dev/docs/examples/locale/get-countries.md create mode 100644 app/sdks/0.7.0/client-flutter-dev/docs/examples/locale/get-currencies.md create mode 100644 app/sdks/0.7.0/client-flutter-dev/docs/examples/locale/get.md create mode 100644 app/sdks/0.7.0/client-flutter-dev/docs/examples/storage/create-file.md create mode 100644 app/sdks/0.7.0/client-flutter-dev/docs/examples/storage/delete-file.md create mode 100644 app/sdks/0.7.0/client-flutter-dev/docs/examples/storage/get-file-download.md create mode 100644 app/sdks/0.7.0/client-flutter-dev/docs/examples/storage/get-file-preview.md create mode 100644 app/sdks/0.7.0/client-flutter-dev/docs/examples/storage/get-file-view.md create mode 100644 app/sdks/0.7.0/client-flutter-dev/docs/examples/storage/get-file.md create mode 100644 app/sdks/0.7.0/client-flutter-dev/docs/examples/storage/list-files.md create mode 100644 app/sdks/0.7.0/client-flutter-dev/docs/examples/storage/update-file.md create mode 100644 app/sdks/0.7.0/client-flutter-dev/docs/examples/teams/create-membership.md create mode 100644 app/sdks/0.7.0/client-flutter-dev/docs/examples/teams/create.md create mode 100644 app/sdks/0.7.0/client-flutter-dev/docs/examples/teams/delete-membership.md create mode 100644 app/sdks/0.7.0/client-flutter-dev/docs/examples/teams/delete.md create mode 100644 app/sdks/0.7.0/client-flutter-dev/docs/examples/teams/get-memberships.md create mode 100644 app/sdks/0.7.0/client-flutter-dev/docs/examples/teams/get.md create mode 100644 app/sdks/0.7.0/client-flutter-dev/docs/examples/teams/list.md create mode 100644 app/sdks/0.7.0/client-flutter-dev/docs/examples/teams/update-membership-status.md create mode 100644 app/sdks/0.7.0/client-flutter-dev/docs/examples/teams/update.md create mode 100644 app/sdks/0.7.0/client-flutter-dev/example/README.md create mode 100644 app/sdks/0.7.0/client-flutter-dev/lib/appwrite.dart create mode 100644 app/sdks/0.7.0/client-flutter-dev/lib/appwrite_dev.dart create mode 100644 app/sdks/0.7.0/client-flutter-dev/lib/client.dart create mode 100644 app/sdks/0.7.0/client-flutter-dev/lib/enums.dart create mode 100644 app/sdks/0.7.0/client-flutter-dev/lib/service.dart create mode 100644 app/sdks/0.7.0/client-flutter-dev/lib/services/account.dart create mode 100644 app/sdks/0.7.0/client-flutter-dev/lib/services/avatars.dart create mode 100644 app/sdks/0.7.0/client-flutter-dev/lib/services/database.dart create mode 100644 app/sdks/0.7.0/client-flutter-dev/lib/services/locale.dart create mode 100644 app/sdks/0.7.0/client-flutter-dev/lib/services/storage.dart create mode 100644 app/sdks/0.7.0/client-flutter-dev/lib/services/teams.dart create mode 100644 app/sdks/0.7.0/client-flutter-dev/pubspec.yaml create mode 100644 app/sdks/0.7.0/client-flutter/CHANGELOG.md create mode 100644 app/sdks/0.7.0/client-flutter/LICENSE create mode 100644 app/sdks/0.7.0/client-flutter/README.md create mode 100644 app/sdks/0.7.0/client-flutter/docs/examples/account/create-o-auth2session.md create mode 100644 app/sdks/0.7.0/client-flutter/docs/examples/account/create-recovery.md create mode 100644 app/sdks/0.7.0/client-flutter/docs/examples/account/create-session.md create mode 100644 app/sdks/0.7.0/client-flutter/docs/examples/account/create-verification.md create mode 100644 app/sdks/0.7.0/client-flutter/docs/examples/account/create.md create mode 100644 app/sdks/0.7.0/client-flutter/docs/examples/account/delete-session.md create mode 100644 app/sdks/0.7.0/client-flutter/docs/examples/account/delete-sessions.md create mode 100644 app/sdks/0.7.0/client-flutter/docs/examples/account/delete.md create mode 100644 app/sdks/0.7.0/client-flutter/docs/examples/account/get-logs.md create mode 100644 app/sdks/0.7.0/client-flutter/docs/examples/account/get-prefs.md create mode 100644 app/sdks/0.7.0/client-flutter/docs/examples/account/get-sessions.md create mode 100644 app/sdks/0.7.0/client-flutter/docs/examples/account/get.md create mode 100644 app/sdks/0.7.0/client-flutter/docs/examples/account/update-email.md create mode 100644 app/sdks/0.7.0/client-flutter/docs/examples/account/update-name.md create mode 100644 app/sdks/0.7.0/client-flutter/docs/examples/account/update-password.md create mode 100644 app/sdks/0.7.0/client-flutter/docs/examples/account/update-prefs.md create mode 100644 app/sdks/0.7.0/client-flutter/docs/examples/account/update-recovery.md create mode 100644 app/sdks/0.7.0/client-flutter/docs/examples/account/update-verification.md create mode 100644 app/sdks/0.7.0/client-flutter/docs/examples/avatars/get-browser.md create mode 100644 app/sdks/0.7.0/client-flutter/docs/examples/avatars/get-credit-card.md create mode 100644 app/sdks/0.7.0/client-flutter/docs/examples/avatars/get-favicon.md create mode 100644 app/sdks/0.7.0/client-flutter/docs/examples/avatars/get-flag.md create mode 100644 app/sdks/0.7.0/client-flutter/docs/examples/avatars/get-image.md create mode 100644 app/sdks/0.7.0/client-flutter/docs/examples/avatars/get-initials.md create mode 100644 app/sdks/0.7.0/client-flutter/docs/examples/avatars/get-q-r.md create mode 100644 app/sdks/0.7.0/client-flutter/docs/examples/database/create-document.md create mode 100644 app/sdks/0.7.0/client-flutter/docs/examples/database/delete-document.md create mode 100644 app/sdks/0.7.0/client-flutter/docs/examples/database/get-document.md create mode 100644 app/sdks/0.7.0/client-flutter/docs/examples/database/list-documents.md create mode 100644 app/sdks/0.7.0/client-flutter/docs/examples/database/update-document.md create mode 100644 app/sdks/0.7.0/client-flutter/docs/examples/locale/get-continents.md create mode 100644 app/sdks/0.7.0/client-flutter/docs/examples/locale/get-countries-e-u.md create mode 100644 app/sdks/0.7.0/client-flutter/docs/examples/locale/get-countries-phones.md create mode 100644 app/sdks/0.7.0/client-flutter/docs/examples/locale/get-countries.md create mode 100644 app/sdks/0.7.0/client-flutter/docs/examples/locale/get-currencies.md create mode 100644 app/sdks/0.7.0/client-flutter/docs/examples/locale/get-languages.md create mode 100644 app/sdks/0.7.0/client-flutter/docs/examples/locale/get.md create mode 100644 app/sdks/0.7.0/client-flutter/docs/examples/storage/create-file.md create mode 100644 app/sdks/0.7.0/client-flutter/docs/examples/storage/delete-file.md create mode 100644 app/sdks/0.7.0/client-flutter/docs/examples/storage/get-file-download.md create mode 100644 app/sdks/0.7.0/client-flutter/docs/examples/storage/get-file-preview.md create mode 100644 app/sdks/0.7.0/client-flutter/docs/examples/storage/get-file-view.md create mode 100644 app/sdks/0.7.0/client-flutter/docs/examples/storage/get-file.md create mode 100644 app/sdks/0.7.0/client-flutter/docs/examples/storage/list-files.md create mode 100644 app/sdks/0.7.0/client-flutter/docs/examples/storage/update-file.md create mode 100644 app/sdks/0.7.0/client-flutter/docs/examples/teams/create-membership.md create mode 100644 app/sdks/0.7.0/client-flutter/docs/examples/teams/create.md create mode 100644 app/sdks/0.7.0/client-flutter/docs/examples/teams/delete-membership.md create mode 100644 app/sdks/0.7.0/client-flutter/docs/examples/teams/delete.md create mode 100644 app/sdks/0.7.0/client-flutter/docs/examples/teams/get-memberships.md create mode 100644 app/sdks/0.7.0/client-flutter/docs/examples/teams/get.md create mode 100644 app/sdks/0.7.0/client-flutter/docs/examples/teams/list.md create mode 100644 app/sdks/0.7.0/client-flutter/docs/examples/teams/update-membership-status.md create mode 100644 app/sdks/0.7.0/client-flutter/docs/examples/teams/update.md create mode 100644 app/sdks/0.7.0/client-flutter/example/README.md create mode 100644 app/sdks/0.7.0/client-flutter/lib/appwrite.dart create mode 100644 app/sdks/0.7.0/client-flutter/lib/client.dart create mode 100644 app/sdks/0.7.0/client-flutter/lib/enums.dart create mode 100644 app/sdks/0.7.0/client-flutter/lib/service.dart create mode 100644 app/sdks/0.7.0/client-flutter/lib/services/account.dart create mode 100644 app/sdks/0.7.0/client-flutter/lib/services/avatars.dart create mode 100644 app/sdks/0.7.0/client-flutter/lib/services/database.dart create mode 100644 app/sdks/0.7.0/client-flutter/lib/services/locale.dart create mode 100644 app/sdks/0.7.0/client-flutter/lib/services/storage.dart create mode 100644 app/sdks/0.7.0/client-flutter/lib/services/teams.dart create mode 100644 app/sdks/0.7.0/client-flutter/pubspec.yaml create mode 100644 app/sdks/0.7.0/client-swift/CHANGELOG.md create mode 100644 app/sdks/0.7.0/client-swift/LICENSE create mode 100644 app/sdks/0.7.0/client-swift/Package.swift create mode 100644 app/sdks/0.7.0/client-swift/README.md create mode 100644 app/sdks/0.7.0/client-swift/Sources/Appwrite/Client.swift create mode 100644 app/sdks/0.7.0/client-swift/Sources/Appwrite/Service.swift create mode 100644 app/sdks/0.7.0/client-swift/Sources/Appwrite/Services/Account.swift create mode 100644 app/sdks/0.7.0/client-swift/Sources/Appwrite/Services/Avatars.swift create mode 100644 app/sdks/0.7.0/client-swift/Sources/Appwrite/Services/Database.swift create mode 100644 app/sdks/0.7.0/client-swift/Sources/Appwrite/Services/Locale.swift create mode 100644 app/sdks/0.7.0/client-swift/Sources/Appwrite/Services/Storage.swift create mode 100644 app/sdks/0.7.0/client-swift/Sources/Appwrite/Services/Teams.swift create mode 100644 app/sdks/0.7.0/client-swift/docs/account.md create mode 100644 app/sdks/0.7.0/client-swift/docs/avatars.md create mode 100644 app/sdks/0.7.0/client-swift/docs/database.md create mode 100644 app/sdks/0.7.0/client-swift/docs/examples/account/create-o-auth2session.md create mode 100644 app/sdks/0.7.0/client-swift/docs/examples/account/create-recovery.md create mode 100644 app/sdks/0.7.0/client-swift/docs/examples/account/create-session.md create mode 100644 app/sdks/0.7.0/client-swift/docs/examples/account/create-verification.md create mode 100644 app/sdks/0.7.0/client-swift/docs/examples/account/create.md create mode 100644 app/sdks/0.7.0/client-swift/docs/examples/account/delete-session.md create mode 100644 app/sdks/0.7.0/client-swift/docs/examples/account/delete-sessions.md create mode 100644 app/sdks/0.7.0/client-swift/docs/examples/account/delete.md create mode 100644 app/sdks/0.7.0/client-swift/docs/examples/account/get-logs.md create mode 100644 app/sdks/0.7.0/client-swift/docs/examples/account/get-prefs.md create mode 100644 app/sdks/0.7.0/client-swift/docs/examples/account/get-sessions.md create mode 100644 app/sdks/0.7.0/client-swift/docs/examples/account/get.md create mode 100644 app/sdks/0.7.0/client-swift/docs/examples/account/update-email.md create mode 100644 app/sdks/0.7.0/client-swift/docs/examples/account/update-name.md create mode 100644 app/sdks/0.7.0/client-swift/docs/examples/account/update-password.md create mode 100644 app/sdks/0.7.0/client-swift/docs/examples/account/update-prefs.md create mode 100644 app/sdks/0.7.0/client-swift/docs/examples/account/update-recovery.md create mode 100644 app/sdks/0.7.0/client-swift/docs/examples/account/update-verification.md create mode 100644 app/sdks/0.7.0/client-swift/docs/examples/avatars/get-browser.md create mode 100644 app/sdks/0.7.0/client-swift/docs/examples/avatars/get-credit-card.md create mode 100644 app/sdks/0.7.0/client-swift/docs/examples/avatars/get-favicon.md create mode 100644 app/sdks/0.7.0/client-swift/docs/examples/avatars/get-flag.md create mode 100644 app/sdks/0.7.0/client-swift/docs/examples/avatars/get-image.md create mode 100644 app/sdks/0.7.0/client-swift/docs/examples/avatars/get-initials.md create mode 100644 app/sdks/0.7.0/client-swift/docs/examples/avatars/get-q-r.md create mode 100644 app/sdks/0.7.0/client-swift/docs/examples/database/create-document.md create mode 100644 app/sdks/0.7.0/client-swift/docs/examples/database/delete-document.md create mode 100644 app/sdks/0.7.0/client-swift/docs/examples/database/get-document.md create mode 100644 app/sdks/0.7.0/client-swift/docs/examples/database/list-documents.md create mode 100644 app/sdks/0.7.0/client-swift/docs/examples/database/update-document.md create mode 100644 app/sdks/0.7.0/client-swift/docs/examples/locale/get-continents.md create mode 100644 app/sdks/0.7.0/client-swift/docs/examples/locale/get-countries-e-u.md create mode 100644 app/sdks/0.7.0/client-swift/docs/examples/locale/get-countries-phones.md create mode 100644 app/sdks/0.7.0/client-swift/docs/examples/locale/get-countries.md create mode 100644 app/sdks/0.7.0/client-swift/docs/examples/locale/get-currencies.md create mode 100644 app/sdks/0.7.0/client-swift/docs/examples/locale/get-languages.md create mode 100644 app/sdks/0.7.0/client-swift/docs/examples/locale/get.md create mode 100644 app/sdks/0.7.0/client-swift/docs/examples/storage/create-file.md create mode 100644 app/sdks/0.7.0/client-swift/docs/examples/storage/delete-file.md create mode 100644 app/sdks/0.7.0/client-swift/docs/examples/storage/get-file-download.md create mode 100644 app/sdks/0.7.0/client-swift/docs/examples/storage/get-file-preview.md create mode 100644 app/sdks/0.7.0/client-swift/docs/examples/storage/get-file-view.md create mode 100644 app/sdks/0.7.0/client-swift/docs/examples/storage/get-file.md create mode 100644 app/sdks/0.7.0/client-swift/docs/examples/storage/list-files.md create mode 100644 app/sdks/0.7.0/client-swift/docs/examples/storage/update-file.md create mode 100644 app/sdks/0.7.0/client-swift/docs/examples/teams/create-membership.md create mode 100644 app/sdks/0.7.0/client-swift/docs/examples/teams/create.md create mode 100644 app/sdks/0.7.0/client-swift/docs/examples/teams/delete-membership.md create mode 100644 app/sdks/0.7.0/client-swift/docs/examples/teams/delete.md create mode 100644 app/sdks/0.7.0/client-swift/docs/examples/teams/get-memberships.md create mode 100644 app/sdks/0.7.0/client-swift/docs/examples/teams/get.md create mode 100644 app/sdks/0.7.0/client-swift/docs/examples/teams/list.md create mode 100644 app/sdks/0.7.0/client-swift/docs/examples/teams/update-membership-status.md create mode 100644 app/sdks/0.7.0/client-swift/docs/examples/teams/update.md create mode 100644 app/sdks/0.7.0/client-swift/docs/locale.md create mode 100644 app/sdks/0.7.0/client-swift/docs/storage.md create mode 100644 app/sdks/0.7.0/client-swift/docs/teams.md create mode 100644 app/sdks/0.7.0/client-web/CHANGELOG.md create mode 100644 app/sdks/0.7.0/client-web/LICENSE create mode 100644 app/sdks/0.7.0/client-web/README.md create mode 100644 app/sdks/0.7.0/client-web/docs/examples/account/create-o-auth2session.md create mode 100644 app/sdks/0.7.0/client-web/docs/examples/account/create-recovery.md create mode 100644 app/sdks/0.7.0/client-web/docs/examples/account/create-session.md create mode 100644 app/sdks/0.7.0/client-web/docs/examples/account/create-verification.md create mode 100644 app/sdks/0.7.0/client-web/docs/examples/account/create.md create mode 100644 app/sdks/0.7.0/client-web/docs/examples/account/delete-session.md create mode 100644 app/sdks/0.7.0/client-web/docs/examples/account/delete-sessions.md create mode 100644 app/sdks/0.7.0/client-web/docs/examples/account/delete.md create mode 100644 app/sdks/0.7.0/client-web/docs/examples/account/get-logs.md create mode 100644 app/sdks/0.7.0/client-web/docs/examples/account/get-prefs.md create mode 100644 app/sdks/0.7.0/client-web/docs/examples/account/get-sessions.md create mode 100644 app/sdks/0.7.0/client-web/docs/examples/account/get.md create mode 100644 app/sdks/0.7.0/client-web/docs/examples/account/update-email.md create mode 100644 app/sdks/0.7.0/client-web/docs/examples/account/update-name.md create mode 100644 app/sdks/0.7.0/client-web/docs/examples/account/update-password.md create mode 100644 app/sdks/0.7.0/client-web/docs/examples/account/update-prefs.md create mode 100644 app/sdks/0.7.0/client-web/docs/examples/account/update-recovery.md create mode 100644 app/sdks/0.7.0/client-web/docs/examples/account/update-verification.md create mode 100644 app/sdks/0.7.0/client-web/docs/examples/avatars/get-browser.md create mode 100644 app/sdks/0.7.0/client-web/docs/examples/avatars/get-credit-card.md create mode 100644 app/sdks/0.7.0/client-web/docs/examples/avatars/get-favicon.md create mode 100644 app/sdks/0.7.0/client-web/docs/examples/avatars/get-flag.md create mode 100644 app/sdks/0.7.0/client-web/docs/examples/avatars/get-image.md create mode 100644 app/sdks/0.7.0/client-web/docs/examples/avatars/get-initials.md create mode 100644 app/sdks/0.7.0/client-web/docs/examples/avatars/get-q-r.md create mode 100644 app/sdks/0.7.0/client-web/docs/examples/database/create-document.md create mode 100644 app/sdks/0.7.0/client-web/docs/examples/database/delete-document.md create mode 100644 app/sdks/0.7.0/client-web/docs/examples/database/get-document.md create mode 100644 app/sdks/0.7.0/client-web/docs/examples/database/list-documents.md create mode 100644 app/sdks/0.7.0/client-web/docs/examples/database/update-document.md create mode 100644 app/sdks/0.7.0/client-web/docs/examples/locale/get-continents.md create mode 100644 app/sdks/0.7.0/client-web/docs/examples/locale/get-countries-e-u.md create mode 100644 app/sdks/0.7.0/client-web/docs/examples/locale/get-countries-phones.md create mode 100644 app/sdks/0.7.0/client-web/docs/examples/locale/get-countries.md create mode 100644 app/sdks/0.7.0/client-web/docs/examples/locale/get-currencies.md create mode 100644 app/sdks/0.7.0/client-web/docs/examples/locale/get-languages.md create mode 100644 app/sdks/0.7.0/client-web/docs/examples/locale/get.md create mode 100644 app/sdks/0.7.0/client-web/docs/examples/storage/create-file.md create mode 100644 app/sdks/0.7.0/client-web/docs/examples/storage/delete-file.md create mode 100644 app/sdks/0.7.0/client-web/docs/examples/storage/get-file-download.md create mode 100644 app/sdks/0.7.0/client-web/docs/examples/storage/get-file-preview.md create mode 100644 app/sdks/0.7.0/client-web/docs/examples/storage/get-file-view.md create mode 100644 app/sdks/0.7.0/client-web/docs/examples/storage/get-file.md create mode 100644 app/sdks/0.7.0/client-web/docs/examples/storage/list-files.md create mode 100644 app/sdks/0.7.0/client-web/docs/examples/storage/update-file.md create mode 100644 app/sdks/0.7.0/client-web/docs/examples/teams/create-membership.md create mode 100644 app/sdks/0.7.0/client-web/docs/examples/teams/create.md create mode 100644 app/sdks/0.7.0/client-web/docs/examples/teams/delete-membership.md create mode 100644 app/sdks/0.7.0/client-web/docs/examples/teams/delete.md create mode 100644 app/sdks/0.7.0/client-web/docs/examples/teams/get-memberships.md create mode 100644 app/sdks/0.7.0/client-web/docs/examples/teams/get.md create mode 100644 app/sdks/0.7.0/client-web/docs/examples/teams/list.md create mode 100644 app/sdks/0.7.0/client-web/docs/examples/teams/update-membership-status.md create mode 100644 app/sdks/0.7.0/client-web/docs/examples/teams/update.md create mode 100644 app/sdks/0.7.0/client-web/package.json create mode 100644 app/sdks/0.7.0/client-web/src/sdk.js create mode 100644 app/sdks/0.7.0/client-web/src/sdk.min.js create mode 100644 app/sdks/0.7.0/client-web/tsconfig.json create mode 100644 app/sdks/0.7.0/client-web/types/index.d.ts create mode 100644 app/sdks/0.7.0/console-web/CHANGELOG.md create mode 100644 app/sdks/0.7.0/console-web/LICENSE create mode 100644 app/sdks/0.7.0/console-web/README.md create mode 100644 app/sdks/0.7.0/console-web/docs/examples/account/create-o-auth2session.md create mode 100644 app/sdks/0.7.0/console-web/docs/examples/account/create-recovery.md create mode 100644 app/sdks/0.7.0/console-web/docs/examples/account/create-session.md create mode 100644 app/sdks/0.7.0/console-web/docs/examples/account/create-verification.md create mode 100644 app/sdks/0.7.0/console-web/docs/examples/account/create.md create mode 100644 app/sdks/0.7.0/console-web/docs/examples/account/delete-session.md create mode 100644 app/sdks/0.7.0/console-web/docs/examples/account/delete-sessions.md create mode 100644 app/sdks/0.7.0/console-web/docs/examples/account/delete.md create mode 100644 app/sdks/0.7.0/console-web/docs/examples/account/get-logs.md create mode 100644 app/sdks/0.7.0/console-web/docs/examples/account/get-prefs.md create mode 100644 app/sdks/0.7.0/console-web/docs/examples/account/get-sessions.md create mode 100644 app/sdks/0.7.0/console-web/docs/examples/account/get.md create mode 100644 app/sdks/0.7.0/console-web/docs/examples/account/update-email.md create mode 100644 app/sdks/0.7.0/console-web/docs/examples/account/update-name.md create mode 100644 app/sdks/0.7.0/console-web/docs/examples/account/update-password.md create mode 100644 app/sdks/0.7.0/console-web/docs/examples/account/update-prefs.md create mode 100644 app/sdks/0.7.0/console-web/docs/examples/account/update-recovery.md create mode 100644 app/sdks/0.7.0/console-web/docs/examples/account/update-verification.md create mode 100644 app/sdks/0.7.0/console-web/docs/examples/avatars/get-browser.md create mode 100644 app/sdks/0.7.0/console-web/docs/examples/avatars/get-credit-card.md create mode 100644 app/sdks/0.7.0/console-web/docs/examples/avatars/get-favicon.md create mode 100644 app/sdks/0.7.0/console-web/docs/examples/avatars/get-flag.md create mode 100644 app/sdks/0.7.0/console-web/docs/examples/avatars/get-image.md create mode 100644 app/sdks/0.7.0/console-web/docs/examples/avatars/get-initials.md create mode 100644 app/sdks/0.7.0/console-web/docs/examples/avatars/get-q-r.md create mode 100644 app/sdks/0.7.0/console-web/docs/examples/bar/delete.md create mode 100644 app/sdks/0.7.0/console-web/docs/examples/bar/get.md create mode 100644 app/sdks/0.7.0/console-web/docs/examples/bar/patch.md create mode 100644 app/sdks/0.7.0/console-web/docs/examples/bar/post.md create mode 100644 app/sdks/0.7.0/console-web/docs/examples/bar/put.md create mode 100644 app/sdks/0.7.0/console-web/docs/examples/database/create-collection.md create mode 100644 app/sdks/0.7.0/console-web/docs/examples/database/create-document.md create mode 100644 app/sdks/0.7.0/console-web/docs/examples/database/delete-collection.md create mode 100644 app/sdks/0.7.0/console-web/docs/examples/database/delete-document.md create mode 100644 app/sdks/0.7.0/console-web/docs/examples/database/get-collection-logs.md create mode 100644 app/sdks/0.7.0/console-web/docs/examples/database/get-collection.md create mode 100644 app/sdks/0.7.0/console-web/docs/examples/database/get-document.md create mode 100644 app/sdks/0.7.0/console-web/docs/examples/database/list-collections.md create mode 100644 app/sdks/0.7.0/console-web/docs/examples/database/list-documents.md create mode 100644 app/sdks/0.7.0/console-web/docs/examples/database/update-collection.md create mode 100644 app/sdks/0.7.0/console-web/docs/examples/database/update-document.md create mode 100644 app/sdks/0.7.0/console-web/docs/examples/foo/delete.md create mode 100644 app/sdks/0.7.0/console-web/docs/examples/foo/get.md create mode 100644 app/sdks/0.7.0/console-web/docs/examples/foo/patch.md create mode 100644 app/sdks/0.7.0/console-web/docs/examples/foo/post.md create mode 100644 app/sdks/0.7.0/console-web/docs/examples/foo/put.md create mode 100644 app/sdks/0.7.0/console-web/docs/examples/functions/create-execution.md create mode 100644 app/sdks/0.7.0/console-web/docs/examples/functions/create-tag.md create mode 100644 app/sdks/0.7.0/console-web/docs/examples/functions/create.md create mode 100644 app/sdks/0.7.0/console-web/docs/examples/functions/delete-tag.md create mode 100644 app/sdks/0.7.0/console-web/docs/examples/functions/delete.md create mode 100644 app/sdks/0.7.0/console-web/docs/examples/functions/get-execution.md create mode 100644 app/sdks/0.7.0/console-web/docs/examples/functions/get-tag.md create mode 100644 app/sdks/0.7.0/console-web/docs/examples/functions/get.md create mode 100644 app/sdks/0.7.0/console-web/docs/examples/functions/list-executions.md create mode 100644 app/sdks/0.7.0/console-web/docs/examples/functions/list-tags.md create mode 100644 app/sdks/0.7.0/console-web/docs/examples/functions/list.md create mode 100644 app/sdks/0.7.0/console-web/docs/examples/functions/update-active.md create mode 100644 app/sdks/0.7.0/console-web/docs/examples/functions/update-tag.md create mode 100644 app/sdks/0.7.0/console-web/docs/examples/functions/update.md create mode 100644 app/sdks/0.7.0/console-web/docs/examples/general/empty.md create mode 100644 app/sdks/0.7.0/console-web/docs/examples/general/get-cookie.md create mode 100644 app/sdks/0.7.0/console-web/docs/examples/general/redirect.md create mode 100644 app/sdks/0.7.0/console-web/docs/examples/general/redirected.md create mode 100644 app/sdks/0.7.0/console-web/docs/examples/general/set-cookie.md create mode 100644 app/sdks/0.7.0/console-web/docs/examples/general/upload.md create mode 100644 app/sdks/0.7.0/console-web/docs/examples/health/get-anti-virus.md create mode 100644 app/sdks/0.7.0/console-web/docs/examples/health/get-cache.md create mode 100644 app/sdks/0.7.0/console-web/docs/examples/health/get-d-b.md create mode 100644 app/sdks/0.7.0/console-web/docs/examples/health/get-queue-certificates.md create mode 100644 app/sdks/0.7.0/console-web/docs/examples/health/get-queue-functions.md create mode 100644 app/sdks/0.7.0/console-web/docs/examples/health/get-queue-logs.md create mode 100644 app/sdks/0.7.0/console-web/docs/examples/health/get-queue-tasks.md create mode 100644 app/sdks/0.7.0/console-web/docs/examples/health/get-queue-usage.md create mode 100644 app/sdks/0.7.0/console-web/docs/examples/health/get-queue-webhooks.md create mode 100644 app/sdks/0.7.0/console-web/docs/examples/health/get-storage-local.md create mode 100644 app/sdks/0.7.0/console-web/docs/examples/health/get-time.md create mode 100644 app/sdks/0.7.0/console-web/docs/examples/health/get.md create mode 100644 app/sdks/0.7.0/console-web/docs/examples/locale/get-continents.md create mode 100644 app/sdks/0.7.0/console-web/docs/examples/locale/get-countries-e-u.md create mode 100644 app/sdks/0.7.0/console-web/docs/examples/locale/get-countries-phones.md create mode 100644 app/sdks/0.7.0/console-web/docs/examples/locale/get-countries.md create mode 100644 app/sdks/0.7.0/console-web/docs/examples/locale/get-currencies.md create mode 100644 app/sdks/0.7.0/console-web/docs/examples/locale/get-languages.md create mode 100644 app/sdks/0.7.0/console-web/docs/examples/locale/get.md create mode 100644 app/sdks/0.7.0/console-web/docs/examples/projects/create-domain.md create mode 100644 app/sdks/0.7.0/console-web/docs/examples/projects/create-key.md create mode 100644 app/sdks/0.7.0/console-web/docs/examples/projects/create-platform.md create mode 100644 app/sdks/0.7.0/console-web/docs/examples/projects/create-task.md create mode 100644 app/sdks/0.7.0/console-web/docs/examples/projects/create-webhook.md create mode 100644 app/sdks/0.7.0/console-web/docs/examples/projects/create.md create mode 100644 app/sdks/0.7.0/console-web/docs/examples/projects/delete-domain.md create mode 100644 app/sdks/0.7.0/console-web/docs/examples/projects/delete-key.md create mode 100644 app/sdks/0.7.0/console-web/docs/examples/projects/delete-platform.md create mode 100644 app/sdks/0.7.0/console-web/docs/examples/projects/delete-task.md create mode 100644 app/sdks/0.7.0/console-web/docs/examples/projects/delete-webhook.md create mode 100644 app/sdks/0.7.0/console-web/docs/examples/projects/delete.md create mode 100644 app/sdks/0.7.0/console-web/docs/examples/projects/get-domain.md create mode 100644 app/sdks/0.7.0/console-web/docs/examples/projects/get-key.md create mode 100644 app/sdks/0.7.0/console-web/docs/examples/projects/get-platform.md create mode 100644 app/sdks/0.7.0/console-web/docs/examples/projects/get-task.md create mode 100644 app/sdks/0.7.0/console-web/docs/examples/projects/get-usage.md create mode 100644 app/sdks/0.7.0/console-web/docs/examples/projects/get-webhook.md create mode 100644 app/sdks/0.7.0/console-web/docs/examples/projects/get.md create mode 100644 app/sdks/0.7.0/console-web/docs/examples/projects/list-domains.md create mode 100644 app/sdks/0.7.0/console-web/docs/examples/projects/list-keys.md create mode 100644 app/sdks/0.7.0/console-web/docs/examples/projects/list-platforms.md create mode 100644 app/sdks/0.7.0/console-web/docs/examples/projects/list-tasks.md create mode 100644 app/sdks/0.7.0/console-web/docs/examples/projects/list-webhooks.md create mode 100644 app/sdks/0.7.0/console-web/docs/examples/projects/list.md create mode 100644 app/sdks/0.7.0/console-web/docs/examples/projects/update-domain-verification.md create mode 100644 app/sdks/0.7.0/console-web/docs/examples/projects/update-key.md create mode 100644 app/sdks/0.7.0/console-web/docs/examples/projects/update-o-auth2.md create mode 100644 app/sdks/0.7.0/console-web/docs/examples/projects/update-platform.md create mode 100644 app/sdks/0.7.0/console-web/docs/examples/projects/update-task.md create mode 100644 app/sdks/0.7.0/console-web/docs/examples/projects/update-webhook.md create mode 100644 app/sdks/0.7.0/console-web/docs/examples/projects/update.md create mode 100644 app/sdks/0.7.0/console-web/docs/examples/storage/create-file.md create mode 100644 app/sdks/0.7.0/console-web/docs/examples/storage/delete-file.md create mode 100644 app/sdks/0.7.0/console-web/docs/examples/storage/get-file-download.md create mode 100644 app/sdks/0.7.0/console-web/docs/examples/storage/get-file-preview.md create mode 100644 app/sdks/0.7.0/console-web/docs/examples/storage/get-file-view.md create mode 100644 app/sdks/0.7.0/console-web/docs/examples/storage/get-file.md create mode 100644 app/sdks/0.7.0/console-web/docs/examples/storage/list-files.md create mode 100644 app/sdks/0.7.0/console-web/docs/examples/storage/update-file.md create mode 100644 app/sdks/0.7.0/console-web/docs/examples/teams/create-membership.md create mode 100644 app/sdks/0.7.0/console-web/docs/examples/teams/create.md create mode 100644 app/sdks/0.7.0/console-web/docs/examples/teams/delete-membership.md create mode 100644 app/sdks/0.7.0/console-web/docs/examples/teams/delete.md create mode 100644 app/sdks/0.7.0/console-web/docs/examples/teams/get-memberships.md create mode 100644 app/sdks/0.7.0/console-web/docs/examples/teams/get.md create mode 100644 app/sdks/0.7.0/console-web/docs/examples/teams/list.md create mode 100644 app/sdks/0.7.0/console-web/docs/examples/teams/update-membership-status.md create mode 100644 app/sdks/0.7.0/console-web/docs/examples/teams/update.md create mode 100644 app/sdks/0.7.0/console-web/docs/examples/users/create.md create mode 100644 app/sdks/0.7.0/console-web/docs/examples/users/delete-session.md create mode 100644 app/sdks/0.7.0/console-web/docs/examples/users/delete-sessions.md create mode 100644 app/sdks/0.7.0/console-web/docs/examples/users/delete-user.md create mode 100644 app/sdks/0.7.0/console-web/docs/examples/users/get-logs.md create mode 100644 app/sdks/0.7.0/console-web/docs/examples/users/get-prefs.md create mode 100644 app/sdks/0.7.0/console-web/docs/examples/users/get-sessions.md create mode 100644 app/sdks/0.7.0/console-web/docs/examples/users/get.md create mode 100644 app/sdks/0.7.0/console-web/docs/examples/users/list.md create mode 100644 app/sdks/0.7.0/console-web/docs/examples/users/update-prefs.md create mode 100644 app/sdks/0.7.0/console-web/docs/examples/users/update-status.md create mode 100644 app/sdks/0.7.0/console-web/package.json create mode 100644 app/sdks/0.7.0/console-web/src/sdk.js create mode 100644 app/sdks/0.7.0/console-web/src/sdk.min.js create mode 100644 app/sdks/0.7.0/console-web/tsconfig.json create mode 100644 app/sdks/0.7.0/console-web/types/index.d.ts create mode 100644 app/sdks/0.7.0/server-deno/CHANGELOG.md create mode 100644 app/sdks/0.7.0/server-deno/LICENSE create mode 100644 app/sdks/0.7.0/server-deno/README.md create mode 100644 app/sdks/0.7.0/server-deno/docs/examples/avatars/get-browser.md create mode 100644 app/sdks/0.7.0/server-deno/docs/examples/avatars/get-credit-card.md create mode 100644 app/sdks/0.7.0/server-deno/docs/examples/avatars/get-favicon.md create mode 100644 app/sdks/0.7.0/server-deno/docs/examples/avatars/get-flag.md create mode 100644 app/sdks/0.7.0/server-deno/docs/examples/avatars/get-image.md create mode 100644 app/sdks/0.7.0/server-deno/docs/examples/avatars/get-q-r.md create mode 100644 app/sdks/0.7.0/server-deno/docs/examples/database/create-collection.md create mode 100644 app/sdks/0.7.0/server-deno/docs/examples/database/create-document.md create mode 100644 app/sdks/0.7.0/server-deno/docs/examples/database/delete-collection.md create mode 100644 app/sdks/0.7.0/server-deno/docs/examples/database/delete-document.md create mode 100644 app/sdks/0.7.0/server-deno/docs/examples/database/get-collection-logs.md create mode 100644 app/sdks/0.7.0/server-deno/docs/examples/database/get-collection.md create mode 100644 app/sdks/0.7.0/server-deno/docs/examples/database/get-document.md create mode 100644 app/sdks/0.7.0/server-deno/docs/examples/database/list-collections.md create mode 100644 app/sdks/0.7.0/server-deno/docs/examples/database/list-documents.md create mode 100644 app/sdks/0.7.0/server-deno/docs/examples/database/update-collection.md create mode 100644 app/sdks/0.7.0/server-deno/docs/examples/database/update-document.md create mode 100644 app/sdks/0.7.0/server-deno/docs/examples/health/get-anti-virus.md create mode 100644 app/sdks/0.7.0/server-deno/docs/examples/health/get-cache.md create mode 100644 app/sdks/0.7.0/server-deno/docs/examples/health/get-d-b.md create mode 100644 app/sdks/0.7.0/server-deno/docs/examples/health/get-queue-certificates.md create mode 100644 app/sdks/0.7.0/server-deno/docs/examples/health/get-queue-functions.md create mode 100644 app/sdks/0.7.0/server-deno/docs/examples/health/get-queue-logs.md create mode 100644 app/sdks/0.7.0/server-deno/docs/examples/health/get-queue-tasks.md create mode 100644 app/sdks/0.7.0/server-deno/docs/examples/health/get-queue-usage.md create mode 100644 app/sdks/0.7.0/server-deno/docs/examples/health/get-queue-webhooks.md create mode 100644 app/sdks/0.7.0/server-deno/docs/examples/health/get-storage-local.md create mode 100644 app/sdks/0.7.0/server-deno/docs/examples/health/get-time.md create mode 100644 app/sdks/0.7.0/server-deno/docs/examples/health/get.md create mode 100644 app/sdks/0.7.0/server-deno/docs/examples/locale/get-continents.md create mode 100644 app/sdks/0.7.0/server-deno/docs/examples/locale/get-countries-e-u.md create mode 100644 app/sdks/0.7.0/server-deno/docs/examples/locale/get-countries-phones.md create mode 100644 app/sdks/0.7.0/server-deno/docs/examples/locale/get-countries.md create mode 100644 app/sdks/0.7.0/server-deno/docs/examples/locale/get-currencies.md create mode 100644 app/sdks/0.7.0/server-deno/docs/examples/locale/get.md create mode 100644 app/sdks/0.7.0/server-deno/docs/examples/storage/create-file.md create mode 100644 app/sdks/0.7.0/server-deno/docs/examples/storage/delete-file.md create mode 100644 app/sdks/0.7.0/server-deno/docs/examples/storage/get-file-download.md create mode 100644 app/sdks/0.7.0/server-deno/docs/examples/storage/get-file-preview.md create mode 100644 app/sdks/0.7.0/server-deno/docs/examples/storage/get-file-view.md create mode 100644 app/sdks/0.7.0/server-deno/docs/examples/storage/get-file.md create mode 100644 app/sdks/0.7.0/server-deno/docs/examples/storage/list-files.md create mode 100644 app/sdks/0.7.0/server-deno/docs/examples/storage/update-file.md create mode 100644 app/sdks/0.7.0/server-deno/docs/examples/teams/create-membership.md create mode 100644 app/sdks/0.7.0/server-deno/docs/examples/teams/create.md create mode 100644 app/sdks/0.7.0/server-deno/docs/examples/teams/delete-membership.md create mode 100644 app/sdks/0.7.0/server-deno/docs/examples/teams/delete.md create mode 100644 app/sdks/0.7.0/server-deno/docs/examples/teams/get-memberships.md create mode 100644 app/sdks/0.7.0/server-deno/docs/examples/teams/get.md create mode 100644 app/sdks/0.7.0/server-deno/docs/examples/teams/list.md create mode 100644 app/sdks/0.7.0/server-deno/docs/examples/teams/update.md create mode 100644 app/sdks/0.7.0/server-deno/docs/examples/users/create.md create mode 100644 app/sdks/0.7.0/server-deno/docs/examples/users/delete-session.md create mode 100644 app/sdks/0.7.0/server-deno/docs/examples/users/delete-sessions.md create mode 100644 app/sdks/0.7.0/server-deno/docs/examples/users/get-logs.md create mode 100644 app/sdks/0.7.0/server-deno/docs/examples/users/get-prefs.md create mode 100644 app/sdks/0.7.0/server-deno/docs/examples/users/get-sessions.md create mode 100644 app/sdks/0.7.0/server-deno/docs/examples/users/get.md create mode 100644 app/sdks/0.7.0/server-deno/docs/examples/users/list.md create mode 100644 app/sdks/0.7.0/server-deno/docs/examples/users/update-prefs.md create mode 100644 app/sdks/0.7.0/server-deno/docs/examples/users/update-status.md create mode 100644 app/sdks/0.7.0/server-deno/mod.ts create mode 100644 app/sdks/0.7.0/server-deno/src/client.ts create mode 100644 app/sdks/0.7.0/server-deno/src/service.ts create mode 100644 app/sdks/0.7.0/server-deno/src/services/avatars.ts create mode 100644 app/sdks/0.7.0/server-deno/src/services/database.ts create mode 100644 app/sdks/0.7.0/server-deno/src/services/health.ts create mode 100644 app/sdks/0.7.0/server-deno/src/services/locale.ts create mode 100644 app/sdks/0.7.0/server-deno/src/services/storage.ts create mode 100644 app/sdks/0.7.0/server-deno/src/services/teams.ts create mode 100644 app/sdks/0.7.0/server-deno/src/services/users.ts create mode 100644 app/sdks/0.7.0/server-go/CHANGELOG.md create mode 100644 app/sdks/0.7.0/server-go/LICENSE create mode 100644 app/sdks/0.7.0/server-go/README.md create mode 100644 app/sdks/0.7.0/server-go/avatars.go create mode 100644 app/sdks/0.7.0/server-go/client.go create mode 100644 app/sdks/0.7.0/server-go/database.go create mode 100644 app/sdks/0.7.0/server-go/docs/examples/avatars/get-browser.md create mode 100644 app/sdks/0.7.0/server-go/docs/examples/avatars/get-credit-card.md create mode 100644 app/sdks/0.7.0/server-go/docs/examples/avatars/get-favicon.md create mode 100644 app/sdks/0.7.0/server-go/docs/examples/avatars/get-flag.md create mode 100644 app/sdks/0.7.0/server-go/docs/examples/avatars/get-image.md create mode 100644 app/sdks/0.7.0/server-go/docs/examples/avatars/get-q-r.md create mode 100644 app/sdks/0.7.0/server-go/docs/examples/database/create-collection.md create mode 100644 app/sdks/0.7.0/server-go/docs/examples/database/create-document.md create mode 100644 app/sdks/0.7.0/server-go/docs/examples/database/delete-collection.md create mode 100644 app/sdks/0.7.0/server-go/docs/examples/database/delete-document.md create mode 100644 app/sdks/0.7.0/server-go/docs/examples/database/get-collection-logs.md create mode 100644 app/sdks/0.7.0/server-go/docs/examples/database/get-collection.md create mode 100644 app/sdks/0.7.0/server-go/docs/examples/database/get-document.md create mode 100644 app/sdks/0.7.0/server-go/docs/examples/database/list-collections.md create mode 100644 app/sdks/0.7.0/server-go/docs/examples/database/list-documents.md create mode 100644 app/sdks/0.7.0/server-go/docs/examples/database/update-collection.md create mode 100644 app/sdks/0.7.0/server-go/docs/examples/database/update-document.md create mode 100644 app/sdks/0.7.0/server-go/docs/examples/functions/create-execution.md create mode 100644 app/sdks/0.7.0/server-go/docs/examples/functions/create-tag.md create mode 100644 app/sdks/0.7.0/server-go/docs/examples/functions/create.md create mode 100644 app/sdks/0.7.0/server-go/docs/examples/functions/delete-tag.md create mode 100644 app/sdks/0.7.0/server-go/docs/examples/functions/delete.md create mode 100644 app/sdks/0.7.0/server-go/docs/examples/functions/get-execution.md create mode 100644 app/sdks/0.7.0/server-go/docs/examples/functions/get-tag.md create mode 100644 app/sdks/0.7.0/server-go/docs/examples/functions/get.md create mode 100644 app/sdks/0.7.0/server-go/docs/examples/functions/list-executions.md create mode 100644 app/sdks/0.7.0/server-go/docs/examples/functions/list-tags.md create mode 100644 app/sdks/0.7.0/server-go/docs/examples/functions/list.md create mode 100644 app/sdks/0.7.0/server-go/docs/examples/functions/update-active.md create mode 100644 app/sdks/0.7.0/server-go/docs/examples/functions/update-tag.md create mode 100644 app/sdks/0.7.0/server-go/docs/examples/functions/update.md create mode 100644 app/sdks/0.7.0/server-go/docs/examples/health/get-anti-virus.md create mode 100644 app/sdks/0.7.0/server-go/docs/examples/health/get-cache.md create mode 100644 app/sdks/0.7.0/server-go/docs/examples/health/get-d-b.md create mode 100644 app/sdks/0.7.0/server-go/docs/examples/health/get-queue-certificates.md create mode 100644 app/sdks/0.7.0/server-go/docs/examples/health/get-queue-functions.md create mode 100644 app/sdks/0.7.0/server-go/docs/examples/health/get-queue-logs.md create mode 100644 app/sdks/0.7.0/server-go/docs/examples/health/get-queue-tasks.md create mode 100644 app/sdks/0.7.0/server-go/docs/examples/health/get-queue-usage.md create mode 100644 app/sdks/0.7.0/server-go/docs/examples/health/get-queue-webhooks.md create mode 100644 app/sdks/0.7.0/server-go/docs/examples/health/get-storage-anti-virus.md create mode 100644 app/sdks/0.7.0/server-go/docs/examples/health/get-storage-local.md create mode 100644 app/sdks/0.7.0/server-go/docs/examples/health/get-time.md create mode 100644 app/sdks/0.7.0/server-go/docs/examples/health/get.md create mode 100644 app/sdks/0.7.0/server-go/docs/examples/locale/get-continents.md create mode 100644 app/sdks/0.7.0/server-go/docs/examples/locale/get-countries-e-u.md create mode 100644 app/sdks/0.7.0/server-go/docs/examples/locale/get-countries-phones.md create mode 100644 app/sdks/0.7.0/server-go/docs/examples/locale/get-countries.md create mode 100644 app/sdks/0.7.0/server-go/docs/examples/locale/get-currencies.md create mode 100644 app/sdks/0.7.0/server-go/docs/examples/locale/get.md create mode 100644 app/sdks/0.7.0/server-go/docs/examples/storage/create-file.md create mode 100644 app/sdks/0.7.0/server-go/docs/examples/storage/delete-file.md create mode 100644 app/sdks/0.7.0/server-go/docs/examples/storage/get-file-download.md create mode 100644 app/sdks/0.7.0/server-go/docs/examples/storage/get-file-preview.md create mode 100644 app/sdks/0.7.0/server-go/docs/examples/storage/get-file-view.md create mode 100644 app/sdks/0.7.0/server-go/docs/examples/storage/get-file.md create mode 100644 app/sdks/0.7.0/server-go/docs/examples/storage/list-files.md create mode 100644 app/sdks/0.7.0/server-go/docs/examples/storage/update-file.md create mode 100644 app/sdks/0.7.0/server-go/docs/examples/teams/create-membership.md create mode 100644 app/sdks/0.7.0/server-go/docs/examples/teams/create.md create mode 100644 app/sdks/0.7.0/server-go/docs/examples/teams/delete-membership.md create mode 100644 app/sdks/0.7.0/server-go/docs/examples/teams/delete.md create mode 100644 app/sdks/0.7.0/server-go/docs/examples/teams/get-memberships.md create mode 100644 app/sdks/0.7.0/server-go/docs/examples/teams/get.md create mode 100644 app/sdks/0.7.0/server-go/docs/examples/teams/list.md create mode 100644 app/sdks/0.7.0/server-go/docs/examples/teams/update.md create mode 100644 app/sdks/0.7.0/server-go/docs/examples/users/create.md create mode 100644 app/sdks/0.7.0/server-go/docs/examples/users/delete-session.md create mode 100644 app/sdks/0.7.0/server-go/docs/examples/users/delete-sessions.md create mode 100644 app/sdks/0.7.0/server-go/docs/examples/users/get-logs.md create mode 100644 app/sdks/0.7.0/server-go/docs/examples/users/get-prefs.md create mode 100644 app/sdks/0.7.0/server-go/docs/examples/users/get-sessions.md create mode 100644 app/sdks/0.7.0/server-go/docs/examples/users/get.md create mode 100644 app/sdks/0.7.0/server-go/docs/examples/users/list.md create mode 100644 app/sdks/0.7.0/server-go/docs/examples/users/update-prefs.md create mode 100644 app/sdks/0.7.0/server-go/docs/examples/users/update-status.md create mode 100644 app/sdks/0.7.0/server-go/functions.go create mode 100644 app/sdks/0.7.0/server-go/health.go create mode 100644 app/sdks/0.7.0/server-go/locale.go create mode 100644 app/sdks/0.7.0/server-go/main.go create mode 100644 app/sdks/0.7.0/server-go/storage.go create mode 100644 app/sdks/0.7.0/server-go/teams.go create mode 100644 app/sdks/0.7.0/server-go/users.go create mode 100644 app/sdks/0.7.0/server-go/utils.go create mode 100644 app/sdks/0.7.0/server-java/CHANGELOG.md create mode 100644 app/sdks/0.7.0/server-java/LICENSE create mode 100644 app/sdks/0.7.0/server-java/README.md create mode 100644 app/sdks/0.7.0/server-java/pom.xml create mode 100644 app/sdks/0.7.0/server-java/src/main/java/Client.java create mode 100644 app/sdks/0.7.0/server-java/src/main/java/enums/OrderType.java create mode 100644 app/sdks/0.7.0/server-java/src/main/java/services/Avatars.java create mode 100644 app/sdks/0.7.0/server-java/src/main/java/services/Database.java create mode 100644 app/sdks/0.7.0/server-java/src/main/java/services/Functions.java create mode 100644 app/sdks/0.7.0/server-java/src/main/java/services/Health.java create mode 100644 app/sdks/0.7.0/server-java/src/main/java/services/Locale.java create mode 100644 app/sdks/0.7.0/server-java/src/main/java/services/Service.java create mode 100644 app/sdks/0.7.0/server-java/src/main/java/services/Storage.java create mode 100644 app/sdks/0.7.0/server-java/src/main/java/services/Teams.java create mode 100644 app/sdks/0.7.0/server-java/src/main/java/services/Users.java create mode 100644 app/sdks/0.7.0/server-nodejs/CHANGELOG.md create mode 100644 app/sdks/0.7.0/server-nodejs/LICENSE create mode 100644 app/sdks/0.7.0/server-nodejs/README.md create mode 100644 app/sdks/0.7.0/server-nodejs/docs/examples/avatars/get-browser.md create mode 100644 app/sdks/0.7.0/server-nodejs/docs/examples/avatars/get-credit-card.md create mode 100644 app/sdks/0.7.0/server-nodejs/docs/examples/avatars/get-favicon.md create mode 100644 app/sdks/0.7.0/server-nodejs/docs/examples/avatars/get-flag.md create mode 100644 app/sdks/0.7.0/server-nodejs/docs/examples/avatars/get-image.md create mode 100644 app/sdks/0.7.0/server-nodejs/docs/examples/avatars/get-q-r.md create mode 100644 app/sdks/0.7.0/server-nodejs/docs/examples/database/create-collection.md create mode 100644 app/sdks/0.7.0/server-nodejs/docs/examples/database/create-document.md create mode 100644 app/sdks/0.7.0/server-nodejs/docs/examples/database/delete-collection.md create mode 100644 app/sdks/0.7.0/server-nodejs/docs/examples/database/delete-document.md create mode 100644 app/sdks/0.7.0/server-nodejs/docs/examples/database/get-collection-logs.md create mode 100644 app/sdks/0.7.0/server-nodejs/docs/examples/database/get-collection.md create mode 100644 app/sdks/0.7.0/server-nodejs/docs/examples/database/get-document.md create mode 100644 app/sdks/0.7.0/server-nodejs/docs/examples/database/list-collections.md create mode 100644 app/sdks/0.7.0/server-nodejs/docs/examples/database/list-documents.md create mode 100644 app/sdks/0.7.0/server-nodejs/docs/examples/database/update-collection.md create mode 100644 app/sdks/0.7.0/server-nodejs/docs/examples/database/update-document.md create mode 100644 app/sdks/0.7.0/server-nodejs/docs/examples/functions/create-execution.md create mode 100644 app/sdks/0.7.0/server-nodejs/docs/examples/functions/create-tag.md create mode 100644 app/sdks/0.7.0/server-nodejs/docs/examples/functions/create.md create mode 100644 app/sdks/0.7.0/server-nodejs/docs/examples/functions/delete-tag.md create mode 100644 app/sdks/0.7.0/server-nodejs/docs/examples/functions/delete.md create mode 100644 app/sdks/0.7.0/server-nodejs/docs/examples/functions/get-execution.md create mode 100644 app/sdks/0.7.0/server-nodejs/docs/examples/functions/get-tag.md create mode 100644 app/sdks/0.7.0/server-nodejs/docs/examples/functions/get.md create mode 100644 app/sdks/0.7.0/server-nodejs/docs/examples/functions/list-executions.md create mode 100644 app/sdks/0.7.0/server-nodejs/docs/examples/functions/list-tags.md create mode 100644 app/sdks/0.7.0/server-nodejs/docs/examples/functions/list.md create mode 100644 app/sdks/0.7.0/server-nodejs/docs/examples/functions/update-active.md create mode 100644 app/sdks/0.7.0/server-nodejs/docs/examples/functions/update-tag.md create mode 100644 app/sdks/0.7.0/server-nodejs/docs/examples/functions/update.md create mode 100644 app/sdks/0.7.0/server-nodejs/docs/examples/health/get-anti-virus.md create mode 100644 app/sdks/0.7.0/server-nodejs/docs/examples/health/get-cache.md create mode 100644 app/sdks/0.7.0/server-nodejs/docs/examples/health/get-d-b.md create mode 100644 app/sdks/0.7.0/server-nodejs/docs/examples/health/get-queue-certificates.md create mode 100644 app/sdks/0.7.0/server-nodejs/docs/examples/health/get-queue-functions.md create mode 100644 app/sdks/0.7.0/server-nodejs/docs/examples/health/get-queue-logs.md create mode 100644 app/sdks/0.7.0/server-nodejs/docs/examples/health/get-queue-tasks.md create mode 100644 app/sdks/0.7.0/server-nodejs/docs/examples/health/get-queue-usage.md create mode 100644 app/sdks/0.7.0/server-nodejs/docs/examples/health/get-queue-webhooks.md create mode 100644 app/sdks/0.7.0/server-nodejs/docs/examples/health/get-storage-anti-virus.md create mode 100644 app/sdks/0.7.0/server-nodejs/docs/examples/health/get-storage-local.md create mode 100644 app/sdks/0.7.0/server-nodejs/docs/examples/health/get-time.md create mode 100644 app/sdks/0.7.0/server-nodejs/docs/examples/health/get.md create mode 100644 app/sdks/0.7.0/server-nodejs/docs/examples/locale/get-continents.md create mode 100644 app/sdks/0.7.0/server-nodejs/docs/examples/locale/get-countries-e-u.md create mode 100644 app/sdks/0.7.0/server-nodejs/docs/examples/locale/get-countries-phones.md create mode 100644 app/sdks/0.7.0/server-nodejs/docs/examples/locale/get-countries.md create mode 100644 app/sdks/0.7.0/server-nodejs/docs/examples/locale/get-currencies.md create mode 100644 app/sdks/0.7.0/server-nodejs/docs/examples/locale/get.md create mode 100644 app/sdks/0.7.0/server-nodejs/docs/examples/storage/create-file.md create mode 100644 app/sdks/0.7.0/server-nodejs/docs/examples/storage/delete-file.md create mode 100644 app/sdks/0.7.0/server-nodejs/docs/examples/storage/get-file-download.md create mode 100644 app/sdks/0.7.0/server-nodejs/docs/examples/storage/get-file-preview.md create mode 100644 app/sdks/0.7.0/server-nodejs/docs/examples/storage/get-file-view.md create mode 100644 app/sdks/0.7.0/server-nodejs/docs/examples/storage/get-file.md create mode 100644 app/sdks/0.7.0/server-nodejs/docs/examples/storage/list-files.md create mode 100644 app/sdks/0.7.0/server-nodejs/docs/examples/storage/update-file.md create mode 100644 app/sdks/0.7.0/server-nodejs/docs/examples/teams/create-membership.md create mode 100644 app/sdks/0.7.0/server-nodejs/docs/examples/teams/create.md create mode 100644 app/sdks/0.7.0/server-nodejs/docs/examples/teams/delete-membership.md create mode 100644 app/sdks/0.7.0/server-nodejs/docs/examples/teams/delete.md create mode 100644 app/sdks/0.7.0/server-nodejs/docs/examples/teams/get-memberships.md create mode 100644 app/sdks/0.7.0/server-nodejs/docs/examples/teams/get.md create mode 100644 app/sdks/0.7.0/server-nodejs/docs/examples/teams/list.md create mode 100644 app/sdks/0.7.0/server-nodejs/docs/examples/teams/update.md create mode 100644 app/sdks/0.7.0/server-nodejs/docs/examples/users/create.md create mode 100644 app/sdks/0.7.0/server-nodejs/docs/examples/users/delete-session.md create mode 100644 app/sdks/0.7.0/server-nodejs/docs/examples/users/delete-sessions.md create mode 100644 app/sdks/0.7.0/server-nodejs/docs/examples/users/get-logs.md create mode 100644 app/sdks/0.7.0/server-nodejs/docs/examples/users/get-prefs.md create mode 100644 app/sdks/0.7.0/server-nodejs/docs/examples/users/get-sessions.md create mode 100644 app/sdks/0.7.0/server-nodejs/docs/examples/users/get.md create mode 100644 app/sdks/0.7.0/server-nodejs/docs/examples/users/list.md create mode 100644 app/sdks/0.7.0/server-nodejs/docs/examples/users/update-prefs.md create mode 100644 app/sdks/0.7.0/server-nodejs/docs/examples/users/update-status.md create mode 100644 app/sdks/0.7.0/server-nodejs/index.js create mode 100644 app/sdks/0.7.0/server-nodejs/lib/client.js create mode 100644 app/sdks/0.7.0/server-nodejs/lib/service.js create mode 100644 app/sdks/0.7.0/server-nodejs/lib/services/avatars.js create mode 100644 app/sdks/0.7.0/server-nodejs/lib/services/database.js create mode 100644 app/sdks/0.7.0/server-nodejs/lib/services/functions.js create mode 100644 app/sdks/0.7.0/server-nodejs/lib/services/health.js create mode 100644 app/sdks/0.7.0/server-nodejs/lib/services/locale.js create mode 100644 app/sdks/0.7.0/server-nodejs/lib/services/storage.js create mode 100644 app/sdks/0.7.0/server-nodejs/lib/services/teams.js create mode 100644 app/sdks/0.7.0/server-nodejs/lib/services/users.js create mode 100644 app/sdks/0.7.0/server-nodejs/package.json create mode 100644 app/sdks/0.7.0/server-php/CHANGELOG.md create mode 100644 app/sdks/0.7.0/server-php/LICENSE create mode 100644 app/sdks/0.7.0/server-php/README.md create mode 100644 app/sdks/0.7.0/server-php/composer.json create mode 100644 app/sdks/0.7.0/server-php/docs/avatars.md create mode 100644 app/sdks/0.7.0/server-php/docs/database.md create mode 100644 app/sdks/0.7.0/server-php/docs/examples/avatars/get-browser.md create mode 100644 app/sdks/0.7.0/server-php/docs/examples/avatars/get-credit-card.md create mode 100644 app/sdks/0.7.0/server-php/docs/examples/avatars/get-favicon.md create mode 100644 app/sdks/0.7.0/server-php/docs/examples/avatars/get-flag.md create mode 100644 app/sdks/0.7.0/server-php/docs/examples/avatars/get-image.md create mode 100644 app/sdks/0.7.0/server-php/docs/examples/avatars/get-q-r.md create mode 100644 app/sdks/0.7.0/server-php/docs/examples/database/create-collection.md create mode 100644 app/sdks/0.7.0/server-php/docs/examples/database/create-document.md create mode 100644 app/sdks/0.7.0/server-php/docs/examples/database/delete-collection.md create mode 100644 app/sdks/0.7.0/server-php/docs/examples/database/delete-document.md create mode 100644 app/sdks/0.7.0/server-php/docs/examples/database/get-collection-logs.md create mode 100644 app/sdks/0.7.0/server-php/docs/examples/database/get-collection.md create mode 100644 app/sdks/0.7.0/server-php/docs/examples/database/get-document.md create mode 100644 app/sdks/0.7.0/server-php/docs/examples/database/list-collections.md create mode 100644 app/sdks/0.7.0/server-php/docs/examples/database/list-documents.md create mode 100644 app/sdks/0.7.0/server-php/docs/examples/database/update-collection.md create mode 100644 app/sdks/0.7.0/server-php/docs/examples/database/update-document.md create mode 100644 app/sdks/0.7.0/server-php/docs/examples/functions/create-execution.md create mode 100644 app/sdks/0.7.0/server-php/docs/examples/functions/create-tag.md create mode 100644 app/sdks/0.7.0/server-php/docs/examples/functions/create.md create mode 100644 app/sdks/0.7.0/server-php/docs/examples/functions/delete-tag.md create mode 100644 app/sdks/0.7.0/server-php/docs/examples/functions/delete.md create mode 100644 app/sdks/0.7.0/server-php/docs/examples/functions/get-execution.md create mode 100644 app/sdks/0.7.0/server-php/docs/examples/functions/get-tag.md create mode 100644 app/sdks/0.7.0/server-php/docs/examples/functions/get.md create mode 100644 app/sdks/0.7.0/server-php/docs/examples/functions/list-executions.md create mode 100644 app/sdks/0.7.0/server-php/docs/examples/functions/list-tags.md create mode 100644 app/sdks/0.7.0/server-php/docs/examples/functions/list.md create mode 100644 app/sdks/0.7.0/server-php/docs/examples/functions/update-active.md create mode 100644 app/sdks/0.7.0/server-php/docs/examples/functions/update-tag.md create mode 100644 app/sdks/0.7.0/server-php/docs/examples/functions/update.md create mode 100644 app/sdks/0.7.0/server-php/docs/examples/health/get-anti-virus.md create mode 100644 app/sdks/0.7.0/server-php/docs/examples/health/get-cache.md create mode 100644 app/sdks/0.7.0/server-php/docs/examples/health/get-d-b.md create mode 100644 app/sdks/0.7.0/server-php/docs/examples/health/get-queue-certificates.md create mode 100644 app/sdks/0.7.0/server-php/docs/examples/health/get-queue-functions.md create mode 100644 app/sdks/0.7.0/server-php/docs/examples/health/get-queue-logs.md create mode 100644 app/sdks/0.7.0/server-php/docs/examples/health/get-queue-tasks.md create mode 100644 app/sdks/0.7.0/server-php/docs/examples/health/get-queue-usage.md create mode 100644 app/sdks/0.7.0/server-php/docs/examples/health/get-queue-webhooks.md create mode 100644 app/sdks/0.7.0/server-php/docs/examples/health/get-storage-anti-virus.md create mode 100644 app/sdks/0.7.0/server-php/docs/examples/health/get-storage-local.md create mode 100644 app/sdks/0.7.0/server-php/docs/examples/health/get-time.md create mode 100644 app/sdks/0.7.0/server-php/docs/examples/health/get.md create mode 100644 app/sdks/0.7.0/server-php/docs/examples/locale/get-continents.md create mode 100644 app/sdks/0.7.0/server-php/docs/examples/locale/get-countries-e-u.md create mode 100644 app/sdks/0.7.0/server-php/docs/examples/locale/get-countries-phones.md create mode 100644 app/sdks/0.7.0/server-php/docs/examples/locale/get-countries.md create mode 100644 app/sdks/0.7.0/server-php/docs/examples/locale/get-currencies.md create mode 100644 app/sdks/0.7.0/server-php/docs/examples/locale/get.md create mode 100644 app/sdks/0.7.0/server-php/docs/examples/storage/create-file.md create mode 100644 app/sdks/0.7.0/server-php/docs/examples/storage/delete-file.md create mode 100644 app/sdks/0.7.0/server-php/docs/examples/storage/get-file-download.md create mode 100644 app/sdks/0.7.0/server-php/docs/examples/storage/get-file-preview.md create mode 100644 app/sdks/0.7.0/server-php/docs/examples/storage/get-file-view.md create mode 100644 app/sdks/0.7.0/server-php/docs/examples/storage/get-file.md create mode 100644 app/sdks/0.7.0/server-php/docs/examples/storage/list-files.md create mode 100644 app/sdks/0.7.0/server-php/docs/examples/storage/update-file.md create mode 100644 app/sdks/0.7.0/server-php/docs/examples/teams/create-membership.md create mode 100644 app/sdks/0.7.0/server-php/docs/examples/teams/create.md create mode 100644 app/sdks/0.7.0/server-php/docs/examples/teams/delete-membership.md create mode 100644 app/sdks/0.7.0/server-php/docs/examples/teams/delete.md create mode 100644 app/sdks/0.7.0/server-php/docs/examples/teams/get-memberships.md create mode 100644 app/sdks/0.7.0/server-php/docs/examples/teams/get.md create mode 100644 app/sdks/0.7.0/server-php/docs/examples/teams/list.md create mode 100644 app/sdks/0.7.0/server-php/docs/examples/teams/update.md create mode 100644 app/sdks/0.7.0/server-php/docs/examples/users/create.md create mode 100644 app/sdks/0.7.0/server-php/docs/examples/users/delete-session.md create mode 100644 app/sdks/0.7.0/server-php/docs/examples/users/delete-sessions.md create mode 100644 app/sdks/0.7.0/server-php/docs/examples/users/get-logs.md create mode 100644 app/sdks/0.7.0/server-php/docs/examples/users/get-prefs.md create mode 100644 app/sdks/0.7.0/server-php/docs/examples/users/get-sessions.md create mode 100644 app/sdks/0.7.0/server-php/docs/examples/users/get.md create mode 100644 app/sdks/0.7.0/server-php/docs/examples/users/list.md create mode 100644 app/sdks/0.7.0/server-php/docs/examples/users/update-prefs.md create mode 100644 app/sdks/0.7.0/server-php/docs/examples/users/update-status.md create mode 100644 app/sdks/0.7.0/server-php/docs/functions.md create mode 100644 app/sdks/0.7.0/server-php/docs/health.md create mode 100644 app/sdks/0.7.0/server-php/docs/locale.md create mode 100644 app/sdks/0.7.0/server-php/docs/storage.md create mode 100644 app/sdks/0.7.0/server-php/docs/teams.md create mode 100644 app/sdks/0.7.0/server-php/docs/users.md create mode 100644 app/sdks/0.7.0/server-php/src/Appwrite/Client.php create mode 100644 app/sdks/0.7.0/server-php/src/Appwrite/Service.php create mode 100644 app/sdks/0.7.0/server-php/src/Appwrite/Services/Avatars.php create mode 100644 app/sdks/0.7.0/server-php/src/Appwrite/Services/Database.php create mode 100644 app/sdks/0.7.0/server-php/src/Appwrite/Services/Functions.php create mode 100644 app/sdks/0.7.0/server-php/src/Appwrite/Services/Health.php create mode 100644 app/sdks/0.7.0/server-php/src/Appwrite/Services/Locale.php create mode 100644 app/sdks/0.7.0/server-php/src/Appwrite/Services/Storage.php create mode 100644 app/sdks/0.7.0/server-php/src/Appwrite/Services/Teams.php create mode 100644 app/sdks/0.7.0/server-php/src/Appwrite/Services/Users.php create mode 100644 app/sdks/0.7.0/server-python/CHANGELOG.md create mode 100644 app/sdks/0.7.0/server-python/LICENSE create mode 100644 app/sdks/0.7.0/server-python/README.md create mode 100644 app/sdks/0.7.0/server-python/appwrite/__init__.py create mode 100644 app/sdks/0.7.0/server-python/appwrite/client.py create mode 100644 app/sdks/0.7.0/server-python/appwrite/service.py create mode 100644 app/sdks/0.7.0/server-python/appwrite/services/__init__.py create mode 100644 app/sdks/0.7.0/server-python/appwrite/services/avatars.py create mode 100644 app/sdks/0.7.0/server-python/appwrite/services/database.py create mode 100644 app/sdks/0.7.0/server-python/appwrite/services/functions.py create mode 100644 app/sdks/0.7.0/server-python/appwrite/services/health.py create mode 100644 app/sdks/0.7.0/server-python/appwrite/services/locale.py create mode 100644 app/sdks/0.7.0/server-python/appwrite/services/storage.py create mode 100644 app/sdks/0.7.0/server-python/appwrite/services/teams.py create mode 100644 app/sdks/0.7.0/server-python/appwrite/services/users.py create mode 100644 app/sdks/0.7.0/server-python/docs/examples/avatars/get-browser.md create mode 100644 app/sdks/0.7.0/server-python/docs/examples/avatars/get-credit-card.md create mode 100644 app/sdks/0.7.0/server-python/docs/examples/avatars/get-favicon.md create mode 100644 app/sdks/0.7.0/server-python/docs/examples/avatars/get-flag.md create mode 100644 app/sdks/0.7.0/server-python/docs/examples/avatars/get-image.md create mode 100644 app/sdks/0.7.0/server-python/docs/examples/avatars/get-q-r.md create mode 100644 app/sdks/0.7.0/server-python/docs/examples/database/create-collection.md create mode 100644 app/sdks/0.7.0/server-python/docs/examples/database/create-document.md create mode 100644 app/sdks/0.7.0/server-python/docs/examples/database/delete-collection.md create mode 100644 app/sdks/0.7.0/server-python/docs/examples/database/delete-document.md create mode 100644 app/sdks/0.7.0/server-python/docs/examples/database/get-collection-logs.md create mode 100644 app/sdks/0.7.0/server-python/docs/examples/database/get-collection.md create mode 100644 app/sdks/0.7.0/server-python/docs/examples/database/get-document.md create mode 100644 app/sdks/0.7.0/server-python/docs/examples/database/list-collections.md create mode 100644 app/sdks/0.7.0/server-python/docs/examples/database/list-documents.md create mode 100644 app/sdks/0.7.0/server-python/docs/examples/database/update-collection.md create mode 100644 app/sdks/0.7.0/server-python/docs/examples/database/update-document.md create mode 100644 app/sdks/0.7.0/server-python/docs/examples/functions/create-execution.md create mode 100644 app/sdks/0.7.0/server-python/docs/examples/functions/create-tag.md create mode 100644 app/sdks/0.7.0/server-python/docs/examples/functions/create.md create mode 100644 app/sdks/0.7.0/server-python/docs/examples/functions/delete-tag.md create mode 100644 app/sdks/0.7.0/server-python/docs/examples/functions/delete.md create mode 100644 app/sdks/0.7.0/server-python/docs/examples/functions/get-execution.md create mode 100644 app/sdks/0.7.0/server-python/docs/examples/functions/get-tag.md create mode 100644 app/sdks/0.7.0/server-python/docs/examples/functions/get.md create mode 100644 app/sdks/0.7.0/server-python/docs/examples/functions/list-executions.md create mode 100644 app/sdks/0.7.0/server-python/docs/examples/functions/list-tags.md create mode 100644 app/sdks/0.7.0/server-python/docs/examples/functions/list.md create mode 100644 app/sdks/0.7.0/server-python/docs/examples/functions/update-active.md create mode 100644 app/sdks/0.7.0/server-python/docs/examples/functions/update-tag.md create mode 100644 app/sdks/0.7.0/server-python/docs/examples/functions/update.md create mode 100644 app/sdks/0.7.0/server-python/docs/examples/health/get-anti-virus.md create mode 100644 app/sdks/0.7.0/server-python/docs/examples/health/get-cache.md create mode 100644 app/sdks/0.7.0/server-python/docs/examples/health/get-d-b.md create mode 100644 app/sdks/0.7.0/server-python/docs/examples/health/get-queue-certificates.md create mode 100644 app/sdks/0.7.0/server-python/docs/examples/health/get-queue-functions.md create mode 100644 app/sdks/0.7.0/server-python/docs/examples/health/get-queue-logs.md create mode 100644 app/sdks/0.7.0/server-python/docs/examples/health/get-queue-tasks.md create mode 100644 app/sdks/0.7.0/server-python/docs/examples/health/get-queue-usage.md create mode 100644 app/sdks/0.7.0/server-python/docs/examples/health/get-queue-webhooks.md create mode 100644 app/sdks/0.7.0/server-python/docs/examples/health/get-storage-anti-virus.md create mode 100644 app/sdks/0.7.0/server-python/docs/examples/health/get-storage-local.md create mode 100644 app/sdks/0.7.0/server-python/docs/examples/health/get-time.md create mode 100644 app/sdks/0.7.0/server-python/docs/examples/health/get.md create mode 100644 app/sdks/0.7.0/server-python/docs/examples/locale/get-continents.md create mode 100644 app/sdks/0.7.0/server-python/docs/examples/locale/get-countries-e-u.md create mode 100644 app/sdks/0.7.0/server-python/docs/examples/locale/get-countries-phones.md create mode 100644 app/sdks/0.7.0/server-python/docs/examples/locale/get-countries.md create mode 100644 app/sdks/0.7.0/server-python/docs/examples/locale/get-currencies.md create mode 100644 app/sdks/0.7.0/server-python/docs/examples/locale/get.md create mode 100644 app/sdks/0.7.0/server-python/docs/examples/storage/create-file.md create mode 100644 app/sdks/0.7.0/server-python/docs/examples/storage/delete-file.md create mode 100644 app/sdks/0.7.0/server-python/docs/examples/storage/get-file-download.md create mode 100644 app/sdks/0.7.0/server-python/docs/examples/storage/get-file-preview.md create mode 100644 app/sdks/0.7.0/server-python/docs/examples/storage/get-file-view.md create mode 100644 app/sdks/0.7.0/server-python/docs/examples/storage/get-file.md create mode 100644 app/sdks/0.7.0/server-python/docs/examples/storage/list-files.md create mode 100644 app/sdks/0.7.0/server-python/docs/examples/storage/update-file.md create mode 100644 app/sdks/0.7.0/server-python/docs/examples/teams/create-membership.md create mode 100644 app/sdks/0.7.0/server-python/docs/examples/teams/create.md create mode 100644 app/sdks/0.7.0/server-python/docs/examples/teams/delete-membership.md create mode 100644 app/sdks/0.7.0/server-python/docs/examples/teams/delete.md create mode 100644 app/sdks/0.7.0/server-python/docs/examples/teams/get-memberships.md create mode 100644 app/sdks/0.7.0/server-python/docs/examples/teams/get.md create mode 100644 app/sdks/0.7.0/server-python/docs/examples/teams/list.md create mode 100644 app/sdks/0.7.0/server-python/docs/examples/teams/update.md create mode 100644 app/sdks/0.7.0/server-python/docs/examples/users/create.md create mode 100644 app/sdks/0.7.0/server-python/docs/examples/users/delete-session.md create mode 100644 app/sdks/0.7.0/server-python/docs/examples/users/delete-sessions.md create mode 100644 app/sdks/0.7.0/server-python/docs/examples/users/get-logs.md create mode 100644 app/sdks/0.7.0/server-python/docs/examples/users/get-prefs.md create mode 100644 app/sdks/0.7.0/server-python/docs/examples/users/get-sessions.md create mode 100644 app/sdks/0.7.0/server-python/docs/examples/users/get.md create mode 100644 app/sdks/0.7.0/server-python/docs/examples/users/list.md create mode 100644 app/sdks/0.7.0/server-python/docs/examples/users/update-prefs.md create mode 100644 app/sdks/0.7.0/server-python/docs/examples/users/update-status.md create mode 100644 app/sdks/0.7.0/server-python/requirements.txt create mode 100644 app/sdks/0.7.0/server-python/setup.cfg create mode 100644 app/sdks/0.7.0/server-python/setup.py create mode 100644 app/sdks/0.7.0/server-ruby/CHANGELOG.md create mode 100644 app/sdks/0.7.0/server-ruby/Gemfile create mode 100644 app/sdks/0.7.0/server-ruby/LICENSE create mode 100644 app/sdks/0.7.0/server-ruby/README.md create mode 100644 app/sdks/0.7.0/server-ruby/appwrite.gemspec create mode 100644 app/sdks/0.7.0/server-ruby/docs/examples/avatars/get-browser.md create mode 100644 app/sdks/0.7.0/server-ruby/docs/examples/avatars/get-credit-card.md create mode 100644 app/sdks/0.7.0/server-ruby/docs/examples/avatars/get-favicon.md create mode 100644 app/sdks/0.7.0/server-ruby/docs/examples/avatars/get-flag.md create mode 100644 app/sdks/0.7.0/server-ruby/docs/examples/avatars/get-image.md create mode 100644 app/sdks/0.7.0/server-ruby/docs/examples/avatars/get-q-r.md create mode 100644 app/sdks/0.7.0/server-ruby/docs/examples/database/create-collection.md create mode 100644 app/sdks/0.7.0/server-ruby/docs/examples/database/create-document.md create mode 100644 app/sdks/0.7.0/server-ruby/docs/examples/database/delete-collection.md create mode 100644 app/sdks/0.7.0/server-ruby/docs/examples/database/delete-document.md create mode 100644 app/sdks/0.7.0/server-ruby/docs/examples/database/get-collection-logs.md create mode 100644 app/sdks/0.7.0/server-ruby/docs/examples/database/get-collection.md create mode 100644 app/sdks/0.7.0/server-ruby/docs/examples/database/get-document.md create mode 100644 app/sdks/0.7.0/server-ruby/docs/examples/database/list-collections.md create mode 100644 app/sdks/0.7.0/server-ruby/docs/examples/database/list-documents.md create mode 100644 app/sdks/0.7.0/server-ruby/docs/examples/database/update-collection.md create mode 100644 app/sdks/0.7.0/server-ruby/docs/examples/database/update-document.md create mode 100644 app/sdks/0.7.0/server-ruby/docs/examples/health/get-anti-virus.md create mode 100644 app/sdks/0.7.0/server-ruby/docs/examples/health/get-cache.md create mode 100644 app/sdks/0.7.0/server-ruby/docs/examples/health/get-d-b.md create mode 100644 app/sdks/0.7.0/server-ruby/docs/examples/health/get-queue-certificates.md create mode 100644 app/sdks/0.7.0/server-ruby/docs/examples/health/get-queue-functions.md create mode 100644 app/sdks/0.7.0/server-ruby/docs/examples/health/get-queue-logs.md create mode 100644 app/sdks/0.7.0/server-ruby/docs/examples/health/get-queue-tasks.md create mode 100644 app/sdks/0.7.0/server-ruby/docs/examples/health/get-queue-usage.md create mode 100644 app/sdks/0.7.0/server-ruby/docs/examples/health/get-queue-webhooks.md create mode 100644 app/sdks/0.7.0/server-ruby/docs/examples/health/get-storage-local.md create mode 100644 app/sdks/0.7.0/server-ruby/docs/examples/health/get-time.md create mode 100644 app/sdks/0.7.0/server-ruby/docs/examples/health/get.md create mode 100644 app/sdks/0.7.0/server-ruby/docs/examples/locale/get-continents.md create mode 100644 app/sdks/0.7.0/server-ruby/docs/examples/locale/get-countries-e-u.md create mode 100644 app/sdks/0.7.0/server-ruby/docs/examples/locale/get-countries-phones.md create mode 100644 app/sdks/0.7.0/server-ruby/docs/examples/locale/get-countries.md create mode 100644 app/sdks/0.7.0/server-ruby/docs/examples/locale/get-currencies.md create mode 100644 app/sdks/0.7.0/server-ruby/docs/examples/locale/get.md create mode 100644 app/sdks/0.7.0/server-ruby/docs/examples/storage/create-file.md create mode 100644 app/sdks/0.7.0/server-ruby/docs/examples/storage/delete-file.md create mode 100644 app/sdks/0.7.0/server-ruby/docs/examples/storage/get-file-download.md create mode 100644 app/sdks/0.7.0/server-ruby/docs/examples/storage/get-file-preview.md create mode 100644 app/sdks/0.7.0/server-ruby/docs/examples/storage/get-file-view.md create mode 100644 app/sdks/0.7.0/server-ruby/docs/examples/storage/get-file.md create mode 100644 app/sdks/0.7.0/server-ruby/docs/examples/storage/list-files.md create mode 100644 app/sdks/0.7.0/server-ruby/docs/examples/storage/update-file.md create mode 100644 app/sdks/0.7.0/server-ruby/docs/examples/teams/create-membership.md create mode 100644 app/sdks/0.7.0/server-ruby/docs/examples/teams/create.md create mode 100644 app/sdks/0.7.0/server-ruby/docs/examples/teams/delete-membership.md create mode 100644 app/sdks/0.7.0/server-ruby/docs/examples/teams/delete.md create mode 100644 app/sdks/0.7.0/server-ruby/docs/examples/teams/get-memberships.md create mode 100644 app/sdks/0.7.0/server-ruby/docs/examples/teams/get.md create mode 100644 app/sdks/0.7.0/server-ruby/docs/examples/teams/list.md create mode 100644 app/sdks/0.7.0/server-ruby/docs/examples/teams/update.md create mode 100644 app/sdks/0.7.0/server-ruby/docs/examples/users/create.md create mode 100644 app/sdks/0.7.0/server-ruby/docs/examples/users/delete-session.md create mode 100644 app/sdks/0.7.0/server-ruby/docs/examples/users/delete-sessions.md create mode 100644 app/sdks/0.7.0/server-ruby/docs/examples/users/get-logs.md create mode 100644 app/sdks/0.7.0/server-ruby/docs/examples/users/get-prefs.md create mode 100644 app/sdks/0.7.0/server-ruby/docs/examples/users/get-sessions.md create mode 100644 app/sdks/0.7.0/server-ruby/docs/examples/users/get.md create mode 100644 app/sdks/0.7.0/server-ruby/docs/examples/users/list.md create mode 100644 app/sdks/0.7.0/server-ruby/docs/examples/users/update-prefs.md create mode 100644 app/sdks/0.7.0/server-ruby/docs/examples/users/update-status.md create mode 100644 app/sdks/0.7.0/server-ruby/lib/appwrite.rb create mode 100644 app/sdks/0.7.0/server-ruby/lib/appwrite/client.rb create mode 100644 app/sdks/0.7.0/server-ruby/lib/appwrite/service.rb create mode 100644 app/sdks/0.7.0/server-ruby/lib/appwrite/services/avatars.rb create mode 100644 app/sdks/0.7.0/server-ruby/lib/appwrite/services/database.rb create mode 100644 app/sdks/0.7.0/server-ruby/lib/appwrite/services/functions.rb create mode 100644 app/sdks/0.7.0/server-ruby/lib/appwrite/services/health.rb create mode 100644 app/sdks/0.7.0/server-ruby/lib/appwrite/services/locale.rb create mode 100644 app/sdks/0.7.0/server-ruby/lib/appwrite/services/storage.rb create mode 100644 app/sdks/0.7.0/server-ruby/lib/appwrite/services/teams.rb create mode 100644 app/sdks/0.7.0/server-ruby/lib/appwrite/services/users.rb diff --git a/app/sdks/client-flutter-dev/CHANGELOG.md b/app/sdks/0.6.2/client-flutter-dev/CHANGELOG.md similarity index 100% rename from app/sdks/client-flutter-dev/CHANGELOG.md rename to app/sdks/0.6.2/client-flutter-dev/CHANGELOG.md diff --git a/app/sdks/client-flutter-dev/LICENSE b/app/sdks/0.6.2/client-flutter-dev/LICENSE similarity index 100% rename from app/sdks/client-flutter-dev/LICENSE rename to app/sdks/0.6.2/client-flutter-dev/LICENSE diff --git a/app/sdks/client-flutter-dev/README.md b/app/sdks/0.6.2/client-flutter-dev/README.md similarity index 100% rename from app/sdks/client-flutter-dev/README.md rename to app/sdks/0.6.2/client-flutter-dev/README.md diff --git a/app/sdks/client-flutter-dev/docs/examples/account/create-o-auth2session.md b/app/sdks/0.6.2/client-flutter-dev/docs/examples/account/create-o-auth2session.md similarity index 100% rename from app/sdks/client-flutter-dev/docs/examples/account/create-o-auth2session.md rename to app/sdks/0.6.2/client-flutter-dev/docs/examples/account/create-o-auth2session.md diff --git a/app/sdks/client-flutter-dev/docs/examples/account/create-recovery.md b/app/sdks/0.6.2/client-flutter-dev/docs/examples/account/create-recovery.md similarity index 100% rename from app/sdks/client-flutter-dev/docs/examples/account/create-recovery.md rename to app/sdks/0.6.2/client-flutter-dev/docs/examples/account/create-recovery.md diff --git a/app/sdks/client-flutter-dev/docs/examples/account/create-session.md b/app/sdks/0.6.2/client-flutter-dev/docs/examples/account/create-session.md similarity index 100% rename from app/sdks/client-flutter-dev/docs/examples/account/create-session.md rename to app/sdks/0.6.2/client-flutter-dev/docs/examples/account/create-session.md diff --git a/app/sdks/client-flutter-dev/docs/examples/account/create-verification.md b/app/sdks/0.6.2/client-flutter-dev/docs/examples/account/create-verification.md similarity index 100% rename from app/sdks/client-flutter-dev/docs/examples/account/create-verification.md rename to app/sdks/0.6.2/client-flutter-dev/docs/examples/account/create-verification.md diff --git a/app/sdks/client-flutter-dev/docs/examples/account/create.md b/app/sdks/0.6.2/client-flutter-dev/docs/examples/account/create.md similarity index 100% rename from app/sdks/client-flutter-dev/docs/examples/account/create.md rename to app/sdks/0.6.2/client-flutter-dev/docs/examples/account/create.md diff --git a/app/sdks/client-flutter-dev/docs/examples/account/delete-session.md b/app/sdks/0.6.2/client-flutter-dev/docs/examples/account/delete-session.md similarity index 100% rename from app/sdks/client-flutter-dev/docs/examples/account/delete-session.md rename to app/sdks/0.6.2/client-flutter-dev/docs/examples/account/delete-session.md diff --git a/app/sdks/client-flutter-dev/docs/examples/account/delete-sessions.md b/app/sdks/0.6.2/client-flutter-dev/docs/examples/account/delete-sessions.md similarity index 100% rename from app/sdks/client-flutter-dev/docs/examples/account/delete-sessions.md rename to app/sdks/0.6.2/client-flutter-dev/docs/examples/account/delete-sessions.md diff --git a/app/sdks/client-flutter-dev/docs/examples/account/delete.md b/app/sdks/0.6.2/client-flutter-dev/docs/examples/account/delete.md similarity index 100% rename from app/sdks/client-flutter-dev/docs/examples/account/delete.md rename to app/sdks/0.6.2/client-flutter-dev/docs/examples/account/delete.md diff --git a/app/sdks/client-flutter-dev/docs/examples/account/get-logs.md b/app/sdks/0.6.2/client-flutter-dev/docs/examples/account/get-logs.md similarity index 100% rename from app/sdks/client-flutter-dev/docs/examples/account/get-logs.md rename to app/sdks/0.6.2/client-flutter-dev/docs/examples/account/get-logs.md diff --git a/app/sdks/client-flutter-dev/docs/examples/account/get-prefs.md b/app/sdks/0.6.2/client-flutter-dev/docs/examples/account/get-prefs.md similarity index 100% rename from app/sdks/client-flutter-dev/docs/examples/account/get-prefs.md rename to app/sdks/0.6.2/client-flutter-dev/docs/examples/account/get-prefs.md diff --git a/app/sdks/client-flutter-dev/docs/examples/account/get-sessions.md b/app/sdks/0.6.2/client-flutter-dev/docs/examples/account/get-sessions.md similarity index 100% rename from app/sdks/client-flutter-dev/docs/examples/account/get-sessions.md rename to app/sdks/0.6.2/client-flutter-dev/docs/examples/account/get-sessions.md diff --git a/app/sdks/client-flutter-dev/docs/examples/account/get.md b/app/sdks/0.6.2/client-flutter-dev/docs/examples/account/get.md similarity index 100% rename from app/sdks/client-flutter-dev/docs/examples/account/get.md rename to app/sdks/0.6.2/client-flutter-dev/docs/examples/account/get.md diff --git a/app/sdks/client-flutter-dev/docs/examples/account/update-email.md b/app/sdks/0.6.2/client-flutter-dev/docs/examples/account/update-email.md similarity index 100% rename from app/sdks/client-flutter-dev/docs/examples/account/update-email.md rename to app/sdks/0.6.2/client-flutter-dev/docs/examples/account/update-email.md diff --git a/app/sdks/client-flutter-dev/docs/examples/account/update-name.md b/app/sdks/0.6.2/client-flutter-dev/docs/examples/account/update-name.md similarity index 100% rename from app/sdks/client-flutter-dev/docs/examples/account/update-name.md rename to app/sdks/0.6.2/client-flutter-dev/docs/examples/account/update-name.md diff --git a/app/sdks/client-flutter-dev/docs/examples/account/update-password.md b/app/sdks/0.6.2/client-flutter-dev/docs/examples/account/update-password.md similarity index 100% rename from app/sdks/client-flutter-dev/docs/examples/account/update-password.md rename to app/sdks/0.6.2/client-flutter-dev/docs/examples/account/update-password.md diff --git a/app/sdks/client-flutter-dev/docs/examples/account/update-prefs.md b/app/sdks/0.6.2/client-flutter-dev/docs/examples/account/update-prefs.md similarity index 100% rename from app/sdks/client-flutter-dev/docs/examples/account/update-prefs.md rename to app/sdks/0.6.2/client-flutter-dev/docs/examples/account/update-prefs.md diff --git a/app/sdks/client-flutter-dev/docs/examples/account/update-recovery.md b/app/sdks/0.6.2/client-flutter-dev/docs/examples/account/update-recovery.md similarity index 100% rename from app/sdks/client-flutter-dev/docs/examples/account/update-recovery.md rename to app/sdks/0.6.2/client-flutter-dev/docs/examples/account/update-recovery.md diff --git a/app/sdks/client-flutter-dev/docs/examples/account/update-verification.md b/app/sdks/0.6.2/client-flutter-dev/docs/examples/account/update-verification.md similarity index 100% rename from app/sdks/client-flutter-dev/docs/examples/account/update-verification.md rename to app/sdks/0.6.2/client-flutter-dev/docs/examples/account/update-verification.md diff --git a/app/sdks/client-flutter-dev/docs/examples/avatars/get-browser.md b/app/sdks/0.6.2/client-flutter-dev/docs/examples/avatars/get-browser.md similarity index 100% rename from app/sdks/client-flutter-dev/docs/examples/avatars/get-browser.md rename to app/sdks/0.6.2/client-flutter-dev/docs/examples/avatars/get-browser.md diff --git a/app/sdks/client-flutter-dev/docs/examples/avatars/get-credit-card.md b/app/sdks/0.6.2/client-flutter-dev/docs/examples/avatars/get-credit-card.md similarity index 100% rename from app/sdks/client-flutter-dev/docs/examples/avatars/get-credit-card.md rename to app/sdks/0.6.2/client-flutter-dev/docs/examples/avatars/get-credit-card.md diff --git a/app/sdks/client-flutter-dev/docs/examples/avatars/get-favicon.md b/app/sdks/0.6.2/client-flutter-dev/docs/examples/avatars/get-favicon.md similarity index 100% rename from app/sdks/client-flutter-dev/docs/examples/avatars/get-favicon.md rename to app/sdks/0.6.2/client-flutter-dev/docs/examples/avatars/get-favicon.md diff --git a/app/sdks/client-flutter-dev/docs/examples/avatars/get-flag.md b/app/sdks/0.6.2/client-flutter-dev/docs/examples/avatars/get-flag.md similarity index 100% rename from app/sdks/client-flutter-dev/docs/examples/avatars/get-flag.md rename to app/sdks/0.6.2/client-flutter-dev/docs/examples/avatars/get-flag.md diff --git a/app/sdks/client-flutter-dev/docs/examples/avatars/get-image.md b/app/sdks/0.6.2/client-flutter-dev/docs/examples/avatars/get-image.md similarity index 100% rename from app/sdks/client-flutter-dev/docs/examples/avatars/get-image.md rename to app/sdks/0.6.2/client-flutter-dev/docs/examples/avatars/get-image.md diff --git a/app/sdks/client-flutter-dev/docs/examples/avatars/get-q-r.md b/app/sdks/0.6.2/client-flutter-dev/docs/examples/avatars/get-q-r.md similarity index 100% rename from app/sdks/client-flutter-dev/docs/examples/avatars/get-q-r.md rename to app/sdks/0.6.2/client-flutter-dev/docs/examples/avatars/get-q-r.md diff --git a/app/sdks/client-flutter-dev/docs/examples/database/create-document.md b/app/sdks/0.6.2/client-flutter-dev/docs/examples/database/create-document.md similarity index 100% rename from app/sdks/client-flutter-dev/docs/examples/database/create-document.md rename to app/sdks/0.6.2/client-flutter-dev/docs/examples/database/create-document.md diff --git a/app/sdks/client-flutter-dev/docs/examples/database/delete-document.md b/app/sdks/0.6.2/client-flutter-dev/docs/examples/database/delete-document.md similarity index 100% rename from app/sdks/client-flutter-dev/docs/examples/database/delete-document.md rename to app/sdks/0.6.2/client-flutter-dev/docs/examples/database/delete-document.md diff --git a/app/sdks/client-flutter-dev/docs/examples/database/get-document.md b/app/sdks/0.6.2/client-flutter-dev/docs/examples/database/get-document.md similarity index 100% rename from app/sdks/client-flutter-dev/docs/examples/database/get-document.md rename to app/sdks/0.6.2/client-flutter-dev/docs/examples/database/get-document.md diff --git a/app/sdks/client-flutter-dev/docs/examples/database/list-documents.md b/app/sdks/0.6.2/client-flutter-dev/docs/examples/database/list-documents.md similarity index 100% rename from app/sdks/client-flutter-dev/docs/examples/database/list-documents.md rename to app/sdks/0.6.2/client-flutter-dev/docs/examples/database/list-documents.md diff --git a/app/sdks/client-flutter-dev/docs/examples/database/update-document.md b/app/sdks/0.6.2/client-flutter-dev/docs/examples/database/update-document.md similarity index 100% rename from app/sdks/client-flutter-dev/docs/examples/database/update-document.md rename to app/sdks/0.6.2/client-flutter-dev/docs/examples/database/update-document.md diff --git a/app/sdks/client-flutter-dev/docs/examples/locale/get-continents.md b/app/sdks/0.6.2/client-flutter-dev/docs/examples/locale/get-continents.md similarity index 100% rename from app/sdks/client-flutter-dev/docs/examples/locale/get-continents.md rename to app/sdks/0.6.2/client-flutter-dev/docs/examples/locale/get-continents.md diff --git a/app/sdks/client-flutter-dev/docs/examples/locale/get-countries-e-u.md b/app/sdks/0.6.2/client-flutter-dev/docs/examples/locale/get-countries-e-u.md similarity index 100% rename from app/sdks/client-flutter-dev/docs/examples/locale/get-countries-e-u.md rename to app/sdks/0.6.2/client-flutter-dev/docs/examples/locale/get-countries-e-u.md diff --git a/app/sdks/client-flutter-dev/docs/examples/locale/get-countries-phones.md b/app/sdks/0.6.2/client-flutter-dev/docs/examples/locale/get-countries-phones.md similarity index 100% rename from app/sdks/client-flutter-dev/docs/examples/locale/get-countries-phones.md rename to app/sdks/0.6.2/client-flutter-dev/docs/examples/locale/get-countries-phones.md diff --git a/app/sdks/client-flutter-dev/docs/examples/locale/get-countries.md b/app/sdks/0.6.2/client-flutter-dev/docs/examples/locale/get-countries.md similarity index 100% rename from app/sdks/client-flutter-dev/docs/examples/locale/get-countries.md rename to app/sdks/0.6.2/client-flutter-dev/docs/examples/locale/get-countries.md diff --git a/app/sdks/client-flutter-dev/docs/examples/locale/get-currencies.md b/app/sdks/0.6.2/client-flutter-dev/docs/examples/locale/get-currencies.md similarity index 100% rename from app/sdks/client-flutter-dev/docs/examples/locale/get-currencies.md rename to app/sdks/0.6.2/client-flutter-dev/docs/examples/locale/get-currencies.md diff --git a/app/sdks/client-flutter-dev/docs/examples/locale/get.md b/app/sdks/0.6.2/client-flutter-dev/docs/examples/locale/get.md similarity index 100% rename from app/sdks/client-flutter-dev/docs/examples/locale/get.md rename to app/sdks/0.6.2/client-flutter-dev/docs/examples/locale/get.md diff --git a/app/sdks/client-flutter-dev/docs/examples/storage/create-file.md b/app/sdks/0.6.2/client-flutter-dev/docs/examples/storage/create-file.md similarity index 100% rename from app/sdks/client-flutter-dev/docs/examples/storage/create-file.md rename to app/sdks/0.6.2/client-flutter-dev/docs/examples/storage/create-file.md diff --git a/app/sdks/client-flutter-dev/docs/examples/storage/delete-file.md b/app/sdks/0.6.2/client-flutter-dev/docs/examples/storage/delete-file.md similarity index 100% rename from app/sdks/client-flutter-dev/docs/examples/storage/delete-file.md rename to app/sdks/0.6.2/client-flutter-dev/docs/examples/storage/delete-file.md diff --git a/app/sdks/client-flutter-dev/docs/examples/storage/get-file-download.md b/app/sdks/0.6.2/client-flutter-dev/docs/examples/storage/get-file-download.md similarity index 100% rename from app/sdks/client-flutter-dev/docs/examples/storage/get-file-download.md rename to app/sdks/0.6.2/client-flutter-dev/docs/examples/storage/get-file-download.md diff --git a/app/sdks/client-flutter-dev/docs/examples/storage/get-file-preview.md b/app/sdks/0.6.2/client-flutter-dev/docs/examples/storage/get-file-preview.md similarity index 100% rename from app/sdks/client-flutter-dev/docs/examples/storage/get-file-preview.md rename to app/sdks/0.6.2/client-flutter-dev/docs/examples/storage/get-file-preview.md diff --git a/app/sdks/client-flutter-dev/docs/examples/storage/get-file-view.md b/app/sdks/0.6.2/client-flutter-dev/docs/examples/storage/get-file-view.md similarity index 100% rename from app/sdks/client-flutter-dev/docs/examples/storage/get-file-view.md rename to app/sdks/0.6.2/client-flutter-dev/docs/examples/storage/get-file-view.md diff --git a/app/sdks/client-flutter-dev/docs/examples/storage/get-file.md b/app/sdks/0.6.2/client-flutter-dev/docs/examples/storage/get-file.md similarity index 100% rename from app/sdks/client-flutter-dev/docs/examples/storage/get-file.md rename to app/sdks/0.6.2/client-flutter-dev/docs/examples/storage/get-file.md diff --git a/app/sdks/client-flutter-dev/docs/examples/storage/list-files.md b/app/sdks/0.6.2/client-flutter-dev/docs/examples/storage/list-files.md similarity index 100% rename from app/sdks/client-flutter-dev/docs/examples/storage/list-files.md rename to app/sdks/0.6.2/client-flutter-dev/docs/examples/storage/list-files.md diff --git a/app/sdks/client-flutter-dev/docs/examples/storage/update-file.md b/app/sdks/0.6.2/client-flutter-dev/docs/examples/storage/update-file.md similarity index 100% rename from app/sdks/client-flutter-dev/docs/examples/storage/update-file.md rename to app/sdks/0.6.2/client-flutter-dev/docs/examples/storage/update-file.md diff --git a/app/sdks/client-flutter-dev/docs/examples/teams/create-membership.md b/app/sdks/0.6.2/client-flutter-dev/docs/examples/teams/create-membership.md similarity index 100% rename from app/sdks/client-flutter-dev/docs/examples/teams/create-membership.md rename to app/sdks/0.6.2/client-flutter-dev/docs/examples/teams/create-membership.md diff --git a/app/sdks/client-flutter-dev/docs/examples/teams/create.md b/app/sdks/0.6.2/client-flutter-dev/docs/examples/teams/create.md similarity index 100% rename from app/sdks/client-flutter-dev/docs/examples/teams/create.md rename to app/sdks/0.6.2/client-flutter-dev/docs/examples/teams/create.md diff --git a/app/sdks/client-flutter-dev/docs/examples/teams/delete-membership.md b/app/sdks/0.6.2/client-flutter-dev/docs/examples/teams/delete-membership.md similarity index 100% rename from app/sdks/client-flutter-dev/docs/examples/teams/delete-membership.md rename to app/sdks/0.6.2/client-flutter-dev/docs/examples/teams/delete-membership.md diff --git a/app/sdks/client-flutter-dev/docs/examples/teams/delete.md b/app/sdks/0.6.2/client-flutter-dev/docs/examples/teams/delete.md similarity index 100% rename from app/sdks/client-flutter-dev/docs/examples/teams/delete.md rename to app/sdks/0.6.2/client-flutter-dev/docs/examples/teams/delete.md diff --git a/app/sdks/client-flutter-dev/docs/examples/teams/get-memberships.md b/app/sdks/0.6.2/client-flutter-dev/docs/examples/teams/get-memberships.md similarity index 100% rename from app/sdks/client-flutter-dev/docs/examples/teams/get-memberships.md rename to app/sdks/0.6.2/client-flutter-dev/docs/examples/teams/get-memberships.md diff --git a/app/sdks/client-flutter-dev/docs/examples/teams/get.md b/app/sdks/0.6.2/client-flutter-dev/docs/examples/teams/get.md similarity index 100% rename from app/sdks/client-flutter-dev/docs/examples/teams/get.md rename to app/sdks/0.6.2/client-flutter-dev/docs/examples/teams/get.md diff --git a/app/sdks/client-flutter-dev/docs/examples/teams/list.md b/app/sdks/0.6.2/client-flutter-dev/docs/examples/teams/list.md similarity index 100% rename from app/sdks/client-flutter-dev/docs/examples/teams/list.md rename to app/sdks/0.6.2/client-flutter-dev/docs/examples/teams/list.md diff --git a/app/sdks/client-flutter-dev/docs/examples/teams/update-membership-status.md b/app/sdks/0.6.2/client-flutter-dev/docs/examples/teams/update-membership-status.md similarity index 100% rename from app/sdks/client-flutter-dev/docs/examples/teams/update-membership-status.md rename to app/sdks/0.6.2/client-flutter-dev/docs/examples/teams/update-membership-status.md diff --git a/app/sdks/client-flutter-dev/docs/examples/teams/update.md b/app/sdks/0.6.2/client-flutter-dev/docs/examples/teams/update.md similarity index 100% rename from app/sdks/client-flutter-dev/docs/examples/teams/update.md rename to app/sdks/0.6.2/client-flutter-dev/docs/examples/teams/update.md diff --git a/app/sdks/client-flutter-dev/example/README.md b/app/sdks/0.6.2/client-flutter-dev/example/README.md similarity index 100% rename from app/sdks/client-flutter-dev/example/README.md rename to app/sdks/0.6.2/client-flutter-dev/example/README.md diff --git a/app/sdks/client-flutter-dev/lib/appwrite.dart b/app/sdks/0.6.2/client-flutter-dev/lib/appwrite.dart similarity index 100% rename from app/sdks/client-flutter-dev/lib/appwrite.dart rename to app/sdks/0.6.2/client-flutter-dev/lib/appwrite.dart diff --git a/app/sdks/client-flutter-dev/lib/appwrite_dev.dart b/app/sdks/0.6.2/client-flutter-dev/lib/appwrite_dev.dart similarity index 100% rename from app/sdks/client-flutter-dev/lib/appwrite_dev.dart rename to app/sdks/0.6.2/client-flutter-dev/lib/appwrite_dev.dart diff --git a/app/sdks/client-flutter-dev/lib/client.dart b/app/sdks/0.6.2/client-flutter-dev/lib/client.dart similarity index 100% rename from app/sdks/client-flutter-dev/lib/client.dart rename to app/sdks/0.6.2/client-flutter-dev/lib/client.dart diff --git a/app/sdks/client-flutter-dev/lib/enums.dart b/app/sdks/0.6.2/client-flutter-dev/lib/enums.dart similarity index 100% rename from app/sdks/client-flutter-dev/lib/enums.dart rename to app/sdks/0.6.2/client-flutter-dev/lib/enums.dart diff --git a/app/sdks/client-flutter-dev/lib/service.dart b/app/sdks/0.6.2/client-flutter-dev/lib/service.dart similarity index 100% rename from app/sdks/client-flutter-dev/lib/service.dart rename to app/sdks/0.6.2/client-flutter-dev/lib/service.dart diff --git a/app/sdks/client-flutter-dev/lib/services/account.dart b/app/sdks/0.6.2/client-flutter-dev/lib/services/account.dart similarity index 100% rename from app/sdks/client-flutter-dev/lib/services/account.dart rename to app/sdks/0.6.2/client-flutter-dev/lib/services/account.dart diff --git a/app/sdks/client-flutter-dev/lib/services/avatars.dart b/app/sdks/0.6.2/client-flutter-dev/lib/services/avatars.dart similarity index 100% rename from app/sdks/client-flutter-dev/lib/services/avatars.dart rename to app/sdks/0.6.2/client-flutter-dev/lib/services/avatars.dart diff --git a/app/sdks/client-flutter-dev/lib/services/database.dart b/app/sdks/0.6.2/client-flutter-dev/lib/services/database.dart similarity index 100% rename from app/sdks/client-flutter-dev/lib/services/database.dart rename to app/sdks/0.6.2/client-flutter-dev/lib/services/database.dart diff --git a/app/sdks/client-flutter-dev/lib/services/locale.dart b/app/sdks/0.6.2/client-flutter-dev/lib/services/locale.dart similarity index 100% rename from app/sdks/client-flutter-dev/lib/services/locale.dart rename to app/sdks/0.6.2/client-flutter-dev/lib/services/locale.dart diff --git a/app/sdks/client-flutter-dev/lib/services/storage.dart b/app/sdks/0.6.2/client-flutter-dev/lib/services/storage.dart similarity index 100% rename from app/sdks/client-flutter-dev/lib/services/storage.dart rename to app/sdks/0.6.2/client-flutter-dev/lib/services/storage.dart diff --git a/app/sdks/client-flutter-dev/lib/services/teams.dart b/app/sdks/0.6.2/client-flutter-dev/lib/services/teams.dart similarity index 100% rename from app/sdks/client-flutter-dev/lib/services/teams.dart rename to app/sdks/0.6.2/client-flutter-dev/lib/services/teams.dart diff --git a/app/sdks/client-flutter-dev/pubspec.yaml b/app/sdks/0.6.2/client-flutter-dev/pubspec.yaml similarity index 100% rename from app/sdks/client-flutter-dev/pubspec.yaml rename to app/sdks/0.6.2/client-flutter-dev/pubspec.yaml diff --git a/app/sdks/client-flutter/CHANGELOG.md b/app/sdks/0.6.2/client-flutter/CHANGELOG.md similarity index 100% rename from app/sdks/client-flutter/CHANGELOG.md rename to app/sdks/0.6.2/client-flutter/CHANGELOG.md diff --git a/app/sdks/client-flutter/LICENSE b/app/sdks/0.6.2/client-flutter/LICENSE similarity index 100% rename from app/sdks/client-flutter/LICENSE rename to app/sdks/0.6.2/client-flutter/LICENSE diff --git a/app/sdks/client-flutter/README.md b/app/sdks/0.6.2/client-flutter/README.md similarity index 100% rename from app/sdks/client-flutter/README.md rename to app/sdks/0.6.2/client-flutter/README.md diff --git a/app/sdks/client-flutter/docs/examples/account/create-o-auth2session.md b/app/sdks/0.6.2/client-flutter/docs/examples/account/create-o-auth2session.md similarity index 100% rename from app/sdks/client-flutter/docs/examples/account/create-o-auth2session.md rename to app/sdks/0.6.2/client-flutter/docs/examples/account/create-o-auth2session.md diff --git a/app/sdks/client-flutter/docs/examples/account/create-recovery.md b/app/sdks/0.6.2/client-flutter/docs/examples/account/create-recovery.md similarity index 100% rename from app/sdks/client-flutter/docs/examples/account/create-recovery.md rename to app/sdks/0.6.2/client-flutter/docs/examples/account/create-recovery.md diff --git a/app/sdks/client-flutter/docs/examples/account/create-session.md b/app/sdks/0.6.2/client-flutter/docs/examples/account/create-session.md similarity index 100% rename from app/sdks/client-flutter/docs/examples/account/create-session.md rename to app/sdks/0.6.2/client-flutter/docs/examples/account/create-session.md diff --git a/app/sdks/client-flutter/docs/examples/account/create-verification.md b/app/sdks/0.6.2/client-flutter/docs/examples/account/create-verification.md similarity index 100% rename from app/sdks/client-flutter/docs/examples/account/create-verification.md rename to app/sdks/0.6.2/client-flutter/docs/examples/account/create-verification.md diff --git a/app/sdks/client-flutter/docs/examples/account/create.md b/app/sdks/0.6.2/client-flutter/docs/examples/account/create.md similarity index 100% rename from app/sdks/client-flutter/docs/examples/account/create.md rename to app/sdks/0.6.2/client-flutter/docs/examples/account/create.md diff --git a/app/sdks/client-flutter/docs/examples/account/delete-session.md b/app/sdks/0.6.2/client-flutter/docs/examples/account/delete-session.md similarity index 100% rename from app/sdks/client-flutter/docs/examples/account/delete-session.md rename to app/sdks/0.6.2/client-flutter/docs/examples/account/delete-session.md diff --git a/app/sdks/client-flutter/docs/examples/account/delete-sessions.md b/app/sdks/0.6.2/client-flutter/docs/examples/account/delete-sessions.md similarity index 100% rename from app/sdks/client-flutter/docs/examples/account/delete-sessions.md rename to app/sdks/0.6.2/client-flutter/docs/examples/account/delete-sessions.md diff --git a/app/sdks/client-flutter/docs/examples/account/delete.md b/app/sdks/0.6.2/client-flutter/docs/examples/account/delete.md similarity index 100% rename from app/sdks/client-flutter/docs/examples/account/delete.md rename to app/sdks/0.6.2/client-flutter/docs/examples/account/delete.md diff --git a/app/sdks/client-flutter/docs/examples/account/get-logs.md b/app/sdks/0.6.2/client-flutter/docs/examples/account/get-logs.md similarity index 100% rename from app/sdks/client-flutter/docs/examples/account/get-logs.md rename to app/sdks/0.6.2/client-flutter/docs/examples/account/get-logs.md diff --git a/app/sdks/client-flutter/docs/examples/account/get-prefs.md b/app/sdks/0.6.2/client-flutter/docs/examples/account/get-prefs.md similarity index 100% rename from app/sdks/client-flutter/docs/examples/account/get-prefs.md rename to app/sdks/0.6.2/client-flutter/docs/examples/account/get-prefs.md diff --git a/app/sdks/client-flutter/docs/examples/account/get-sessions.md b/app/sdks/0.6.2/client-flutter/docs/examples/account/get-sessions.md similarity index 100% rename from app/sdks/client-flutter/docs/examples/account/get-sessions.md rename to app/sdks/0.6.2/client-flutter/docs/examples/account/get-sessions.md diff --git a/app/sdks/client-flutter/docs/examples/account/get.md b/app/sdks/0.6.2/client-flutter/docs/examples/account/get.md similarity index 100% rename from app/sdks/client-flutter/docs/examples/account/get.md rename to app/sdks/0.6.2/client-flutter/docs/examples/account/get.md diff --git a/app/sdks/client-flutter/docs/examples/account/update-email.md b/app/sdks/0.6.2/client-flutter/docs/examples/account/update-email.md similarity index 100% rename from app/sdks/client-flutter/docs/examples/account/update-email.md rename to app/sdks/0.6.2/client-flutter/docs/examples/account/update-email.md diff --git a/app/sdks/client-flutter/docs/examples/account/update-name.md b/app/sdks/0.6.2/client-flutter/docs/examples/account/update-name.md similarity index 100% rename from app/sdks/client-flutter/docs/examples/account/update-name.md rename to app/sdks/0.6.2/client-flutter/docs/examples/account/update-name.md diff --git a/app/sdks/client-flutter/docs/examples/account/update-password.md b/app/sdks/0.6.2/client-flutter/docs/examples/account/update-password.md similarity index 100% rename from app/sdks/client-flutter/docs/examples/account/update-password.md rename to app/sdks/0.6.2/client-flutter/docs/examples/account/update-password.md diff --git a/app/sdks/client-flutter/docs/examples/account/update-prefs.md b/app/sdks/0.6.2/client-flutter/docs/examples/account/update-prefs.md similarity index 100% rename from app/sdks/client-flutter/docs/examples/account/update-prefs.md rename to app/sdks/0.6.2/client-flutter/docs/examples/account/update-prefs.md diff --git a/app/sdks/client-flutter/docs/examples/account/update-recovery.md b/app/sdks/0.6.2/client-flutter/docs/examples/account/update-recovery.md similarity index 100% rename from app/sdks/client-flutter/docs/examples/account/update-recovery.md rename to app/sdks/0.6.2/client-flutter/docs/examples/account/update-recovery.md diff --git a/app/sdks/client-flutter/docs/examples/account/update-verification.md b/app/sdks/0.6.2/client-flutter/docs/examples/account/update-verification.md similarity index 100% rename from app/sdks/client-flutter/docs/examples/account/update-verification.md rename to app/sdks/0.6.2/client-flutter/docs/examples/account/update-verification.md diff --git a/app/sdks/client-flutter/docs/examples/avatars/get-browser.md b/app/sdks/0.6.2/client-flutter/docs/examples/avatars/get-browser.md similarity index 100% rename from app/sdks/client-flutter/docs/examples/avatars/get-browser.md rename to app/sdks/0.6.2/client-flutter/docs/examples/avatars/get-browser.md diff --git a/app/sdks/client-flutter/docs/examples/avatars/get-credit-card.md b/app/sdks/0.6.2/client-flutter/docs/examples/avatars/get-credit-card.md similarity index 100% rename from app/sdks/client-flutter/docs/examples/avatars/get-credit-card.md rename to app/sdks/0.6.2/client-flutter/docs/examples/avatars/get-credit-card.md diff --git a/app/sdks/client-flutter/docs/examples/avatars/get-favicon.md b/app/sdks/0.6.2/client-flutter/docs/examples/avatars/get-favicon.md similarity index 100% rename from app/sdks/client-flutter/docs/examples/avatars/get-favicon.md rename to app/sdks/0.6.2/client-flutter/docs/examples/avatars/get-favicon.md diff --git a/app/sdks/client-flutter/docs/examples/avatars/get-flag.md b/app/sdks/0.6.2/client-flutter/docs/examples/avatars/get-flag.md similarity index 100% rename from app/sdks/client-flutter/docs/examples/avatars/get-flag.md rename to app/sdks/0.6.2/client-flutter/docs/examples/avatars/get-flag.md diff --git a/app/sdks/client-flutter/docs/examples/avatars/get-image.md b/app/sdks/0.6.2/client-flutter/docs/examples/avatars/get-image.md similarity index 100% rename from app/sdks/client-flutter/docs/examples/avatars/get-image.md rename to app/sdks/0.6.2/client-flutter/docs/examples/avatars/get-image.md diff --git a/app/sdks/client-flutter/docs/examples/avatars/get-initials.md b/app/sdks/0.6.2/client-flutter/docs/examples/avatars/get-initials.md similarity index 100% rename from app/sdks/client-flutter/docs/examples/avatars/get-initials.md rename to app/sdks/0.6.2/client-flutter/docs/examples/avatars/get-initials.md diff --git a/app/sdks/client-flutter/docs/examples/avatars/get-q-r.md b/app/sdks/0.6.2/client-flutter/docs/examples/avatars/get-q-r.md similarity index 100% rename from app/sdks/client-flutter/docs/examples/avatars/get-q-r.md rename to app/sdks/0.6.2/client-flutter/docs/examples/avatars/get-q-r.md diff --git a/app/sdks/client-flutter/docs/examples/database/create-document.md b/app/sdks/0.6.2/client-flutter/docs/examples/database/create-document.md similarity index 100% rename from app/sdks/client-flutter/docs/examples/database/create-document.md rename to app/sdks/0.6.2/client-flutter/docs/examples/database/create-document.md diff --git a/app/sdks/client-flutter/docs/examples/database/delete-document.md b/app/sdks/0.6.2/client-flutter/docs/examples/database/delete-document.md similarity index 100% rename from app/sdks/client-flutter/docs/examples/database/delete-document.md rename to app/sdks/0.6.2/client-flutter/docs/examples/database/delete-document.md diff --git a/app/sdks/client-flutter/docs/examples/database/get-document.md b/app/sdks/0.6.2/client-flutter/docs/examples/database/get-document.md similarity index 100% rename from app/sdks/client-flutter/docs/examples/database/get-document.md rename to app/sdks/0.6.2/client-flutter/docs/examples/database/get-document.md diff --git a/app/sdks/client-flutter/docs/examples/database/list-documents.md b/app/sdks/0.6.2/client-flutter/docs/examples/database/list-documents.md similarity index 100% rename from app/sdks/client-flutter/docs/examples/database/list-documents.md rename to app/sdks/0.6.2/client-flutter/docs/examples/database/list-documents.md diff --git a/app/sdks/client-flutter/docs/examples/database/update-document.md b/app/sdks/0.6.2/client-flutter/docs/examples/database/update-document.md similarity index 100% rename from app/sdks/client-flutter/docs/examples/database/update-document.md rename to app/sdks/0.6.2/client-flutter/docs/examples/database/update-document.md diff --git a/app/sdks/client-flutter/docs/examples/locale/get-continents.md b/app/sdks/0.6.2/client-flutter/docs/examples/locale/get-continents.md similarity index 100% rename from app/sdks/client-flutter/docs/examples/locale/get-continents.md rename to app/sdks/0.6.2/client-flutter/docs/examples/locale/get-continents.md diff --git a/app/sdks/client-flutter/docs/examples/locale/get-countries-e-u.md b/app/sdks/0.6.2/client-flutter/docs/examples/locale/get-countries-e-u.md similarity index 100% rename from app/sdks/client-flutter/docs/examples/locale/get-countries-e-u.md rename to app/sdks/0.6.2/client-flutter/docs/examples/locale/get-countries-e-u.md diff --git a/app/sdks/client-flutter/docs/examples/locale/get-countries-phones.md b/app/sdks/0.6.2/client-flutter/docs/examples/locale/get-countries-phones.md similarity index 100% rename from app/sdks/client-flutter/docs/examples/locale/get-countries-phones.md rename to app/sdks/0.6.2/client-flutter/docs/examples/locale/get-countries-phones.md diff --git a/app/sdks/client-flutter/docs/examples/locale/get-countries.md b/app/sdks/0.6.2/client-flutter/docs/examples/locale/get-countries.md similarity index 100% rename from app/sdks/client-flutter/docs/examples/locale/get-countries.md rename to app/sdks/0.6.2/client-flutter/docs/examples/locale/get-countries.md diff --git a/app/sdks/client-flutter/docs/examples/locale/get-currencies.md b/app/sdks/0.6.2/client-flutter/docs/examples/locale/get-currencies.md similarity index 100% rename from app/sdks/client-flutter/docs/examples/locale/get-currencies.md rename to app/sdks/0.6.2/client-flutter/docs/examples/locale/get-currencies.md diff --git a/app/sdks/client-flutter/docs/examples/locale/get-languages.md b/app/sdks/0.6.2/client-flutter/docs/examples/locale/get-languages.md similarity index 100% rename from app/sdks/client-flutter/docs/examples/locale/get-languages.md rename to app/sdks/0.6.2/client-flutter/docs/examples/locale/get-languages.md diff --git a/app/sdks/client-flutter/docs/examples/locale/get.md b/app/sdks/0.6.2/client-flutter/docs/examples/locale/get.md similarity index 100% rename from app/sdks/client-flutter/docs/examples/locale/get.md rename to app/sdks/0.6.2/client-flutter/docs/examples/locale/get.md diff --git a/app/sdks/client-flutter/docs/examples/storage/create-file.md b/app/sdks/0.6.2/client-flutter/docs/examples/storage/create-file.md similarity index 100% rename from app/sdks/client-flutter/docs/examples/storage/create-file.md rename to app/sdks/0.6.2/client-flutter/docs/examples/storage/create-file.md diff --git a/app/sdks/client-flutter/docs/examples/storage/delete-file.md b/app/sdks/0.6.2/client-flutter/docs/examples/storage/delete-file.md similarity index 100% rename from app/sdks/client-flutter/docs/examples/storage/delete-file.md rename to app/sdks/0.6.2/client-flutter/docs/examples/storage/delete-file.md diff --git a/app/sdks/client-flutter/docs/examples/storage/get-file-download.md b/app/sdks/0.6.2/client-flutter/docs/examples/storage/get-file-download.md similarity index 100% rename from app/sdks/client-flutter/docs/examples/storage/get-file-download.md rename to app/sdks/0.6.2/client-flutter/docs/examples/storage/get-file-download.md diff --git a/app/sdks/client-flutter/docs/examples/storage/get-file-preview.md b/app/sdks/0.6.2/client-flutter/docs/examples/storage/get-file-preview.md similarity index 100% rename from app/sdks/client-flutter/docs/examples/storage/get-file-preview.md rename to app/sdks/0.6.2/client-flutter/docs/examples/storage/get-file-preview.md diff --git a/app/sdks/client-flutter/docs/examples/storage/get-file-view.md b/app/sdks/0.6.2/client-flutter/docs/examples/storage/get-file-view.md similarity index 100% rename from app/sdks/client-flutter/docs/examples/storage/get-file-view.md rename to app/sdks/0.6.2/client-flutter/docs/examples/storage/get-file-view.md diff --git a/app/sdks/client-flutter/docs/examples/storage/get-file.md b/app/sdks/0.6.2/client-flutter/docs/examples/storage/get-file.md similarity index 100% rename from app/sdks/client-flutter/docs/examples/storage/get-file.md rename to app/sdks/0.6.2/client-flutter/docs/examples/storage/get-file.md diff --git a/app/sdks/client-flutter/docs/examples/storage/list-files.md b/app/sdks/0.6.2/client-flutter/docs/examples/storage/list-files.md similarity index 100% rename from app/sdks/client-flutter/docs/examples/storage/list-files.md rename to app/sdks/0.6.2/client-flutter/docs/examples/storage/list-files.md diff --git a/app/sdks/client-flutter/docs/examples/storage/update-file.md b/app/sdks/0.6.2/client-flutter/docs/examples/storage/update-file.md similarity index 100% rename from app/sdks/client-flutter/docs/examples/storage/update-file.md rename to app/sdks/0.6.2/client-flutter/docs/examples/storage/update-file.md diff --git a/app/sdks/client-flutter/docs/examples/teams/create-membership.md b/app/sdks/0.6.2/client-flutter/docs/examples/teams/create-membership.md similarity index 100% rename from app/sdks/client-flutter/docs/examples/teams/create-membership.md rename to app/sdks/0.6.2/client-flutter/docs/examples/teams/create-membership.md diff --git a/app/sdks/client-flutter/docs/examples/teams/create.md b/app/sdks/0.6.2/client-flutter/docs/examples/teams/create.md similarity index 100% rename from app/sdks/client-flutter/docs/examples/teams/create.md rename to app/sdks/0.6.2/client-flutter/docs/examples/teams/create.md diff --git a/app/sdks/client-flutter/docs/examples/teams/delete-membership.md b/app/sdks/0.6.2/client-flutter/docs/examples/teams/delete-membership.md similarity index 100% rename from app/sdks/client-flutter/docs/examples/teams/delete-membership.md rename to app/sdks/0.6.2/client-flutter/docs/examples/teams/delete-membership.md diff --git a/app/sdks/client-flutter/docs/examples/teams/delete.md b/app/sdks/0.6.2/client-flutter/docs/examples/teams/delete.md similarity index 100% rename from app/sdks/client-flutter/docs/examples/teams/delete.md rename to app/sdks/0.6.2/client-flutter/docs/examples/teams/delete.md diff --git a/app/sdks/client-flutter/docs/examples/teams/get-memberships.md b/app/sdks/0.6.2/client-flutter/docs/examples/teams/get-memberships.md similarity index 100% rename from app/sdks/client-flutter/docs/examples/teams/get-memberships.md rename to app/sdks/0.6.2/client-flutter/docs/examples/teams/get-memberships.md diff --git a/app/sdks/client-flutter/docs/examples/teams/get.md b/app/sdks/0.6.2/client-flutter/docs/examples/teams/get.md similarity index 100% rename from app/sdks/client-flutter/docs/examples/teams/get.md rename to app/sdks/0.6.2/client-flutter/docs/examples/teams/get.md diff --git a/app/sdks/client-flutter/docs/examples/teams/list.md b/app/sdks/0.6.2/client-flutter/docs/examples/teams/list.md similarity index 100% rename from app/sdks/client-flutter/docs/examples/teams/list.md rename to app/sdks/0.6.2/client-flutter/docs/examples/teams/list.md diff --git a/app/sdks/client-flutter/docs/examples/teams/update-membership-status.md b/app/sdks/0.6.2/client-flutter/docs/examples/teams/update-membership-status.md similarity index 100% rename from app/sdks/client-flutter/docs/examples/teams/update-membership-status.md rename to app/sdks/0.6.2/client-flutter/docs/examples/teams/update-membership-status.md diff --git a/app/sdks/client-flutter/docs/examples/teams/update.md b/app/sdks/0.6.2/client-flutter/docs/examples/teams/update.md similarity index 100% rename from app/sdks/client-flutter/docs/examples/teams/update.md rename to app/sdks/0.6.2/client-flutter/docs/examples/teams/update.md diff --git a/app/sdks/client-flutter/example/README.md b/app/sdks/0.6.2/client-flutter/example/README.md similarity index 100% rename from app/sdks/client-flutter/example/README.md rename to app/sdks/0.6.2/client-flutter/example/README.md diff --git a/app/sdks/client-flutter/lib/appwrite.dart b/app/sdks/0.6.2/client-flutter/lib/appwrite.dart similarity index 100% rename from app/sdks/client-flutter/lib/appwrite.dart rename to app/sdks/0.6.2/client-flutter/lib/appwrite.dart diff --git a/app/sdks/client-flutter/lib/client.dart b/app/sdks/0.6.2/client-flutter/lib/client.dart similarity index 100% rename from app/sdks/client-flutter/lib/client.dart rename to app/sdks/0.6.2/client-flutter/lib/client.dart diff --git a/app/sdks/client-flutter/lib/enums.dart b/app/sdks/0.6.2/client-flutter/lib/enums.dart similarity index 100% rename from app/sdks/client-flutter/lib/enums.dart rename to app/sdks/0.6.2/client-flutter/lib/enums.dart diff --git a/app/sdks/client-flutter/lib/service.dart b/app/sdks/0.6.2/client-flutter/lib/service.dart similarity index 100% rename from app/sdks/client-flutter/lib/service.dart rename to app/sdks/0.6.2/client-flutter/lib/service.dart diff --git a/app/sdks/client-flutter/lib/services/account.dart b/app/sdks/0.6.2/client-flutter/lib/services/account.dart similarity index 100% rename from app/sdks/client-flutter/lib/services/account.dart rename to app/sdks/0.6.2/client-flutter/lib/services/account.dart diff --git a/app/sdks/client-flutter/lib/services/avatars.dart b/app/sdks/0.6.2/client-flutter/lib/services/avatars.dart similarity index 100% rename from app/sdks/client-flutter/lib/services/avatars.dart rename to app/sdks/0.6.2/client-flutter/lib/services/avatars.dart diff --git a/app/sdks/client-flutter/lib/services/database.dart b/app/sdks/0.6.2/client-flutter/lib/services/database.dart similarity index 100% rename from app/sdks/client-flutter/lib/services/database.dart rename to app/sdks/0.6.2/client-flutter/lib/services/database.dart diff --git a/app/sdks/client-flutter/lib/services/locale.dart b/app/sdks/0.6.2/client-flutter/lib/services/locale.dart similarity index 100% rename from app/sdks/client-flutter/lib/services/locale.dart rename to app/sdks/0.6.2/client-flutter/lib/services/locale.dart diff --git a/app/sdks/client-flutter/lib/services/storage.dart b/app/sdks/0.6.2/client-flutter/lib/services/storage.dart similarity index 100% rename from app/sdks/client-flutter/lib/services/storage.dart rename to app/sdks/0.6.2/client-flutter/lib/services/storage.dart diff --git a/app/sdks/client-flutter/lib/services/teams.dart b/app/sdks/0.6.2/client-flutter/lib/services/teams.dart similarity index 100% rename from app/sdks/client-flutter/lib/services/teams.dart rename to app/sdks/0.6.2/client-flutter/lib/services/teams.dart diff --git a/app/sdks/client-flutter/pubspec.yaml b/app/sdks/0.6.2/client-flutter/pubspec.yaml similarity index 100% rename from app/sdks/client-flutter/pubspec.yaml rename to app/sdks/0.6.2/client-flutter/pubspec.yaml diff --git a/app/sdks/client-swift/CHANGELOG.md b/app/sdks/0.6.2/client-swift/CHANGELOG.md similarity index 100% rename from app/sdks/client-swift/CHANGELOG.md rename to app/sdks/0.6.2/client-swift/CHANGELOG.md diff --git a/app/sdks/client-swift/LICENSE b/app/sdks/0.6.2/client-swift/LICENSE similarity index 100% rename from app/sdks/client-swift/LICENSE rename to app/sdks/0.6.2/client-swift/LICENSE diff --git a/app/sdks/client-swift/Package.swift b/app/sdks/0.6.2/client-swift/Package.swift similarity index 100% rename from app/sdks/client-swift/Package.swift rename to app/sdks/0.6.2/client-swift/Package.swift diff --git a/app/sdks/client-swift/README.md b/app/sdks/0.6.2/client-swift/README.md similarity index 100% rename from app/sdks/client-swift/README.md rename to app/sdks/0.6.2/client-swift/README.md diff --git a/app/sdks/client-swift/Sources/Appwrite/Client.swift b/app/sdks/0.6.2/client-swift/Sources/Appwrite/Client.swift similarity index 100% rename from app/sdks/client-swift/Sources/Appwrite/Client.swift rename to app/sdks/0.6.2/client-swift/Sources/Appwrite/Client.swift diff --git a/app/sdks/client-swift/Sources/Appwrite/Service.swift b/app/sdks/0.6.2/client-swift/Sources/Appwrite/Service.swift similarity index 100% rename from app/sdks/client-swift/Sources/Appwrite/Service.swift rename to app/sdks/0.6.2/client-swift/Sources/Appwrite/Service.swift diff --git a/app/sdks/client-swift/Sources/Appwrite/Services/Account.swift b/app/sdks/0.6.2/client-swift/Sources/Appwrite/Services/Account.swift similarity index 100% rename from app/sdks/client-swift/Sources/Appwrite/Services/Account.swift rename to app/sdks/0.6.2/client-swift/Sources/Appwrite/Services/Account.swift diff --git a/app/sdks/client-swift/Sources/Appwrite/Services/Avatars.swift b/app/sdks/0.6.2/client-swift/Sources/Appwrite/Services/Avatars.swift similarity index 100% rename from app/sdks/client-swift/Sources/Appwrite/Services/Avatars.swift rename to app/sdks/0.6.2/client-swift/Sources/Appwrite/Services/Avatars.swift diff --git a/app/sdks/client-swift/Sources/Appwrite/Services/Database.swift b/app/sdks/0.6.2/client-swift/Sources/Appwrite/Services/Database.swift similarity index 100% rename from app/sdks/client-swift/Sources/Appwrite/Services/Database.swift rename to app/sdks/0.6.2/client-swift/Sources/Appwrite/Services/Database.swift diff --git a/app/sdks/client-swift/Sources/Appwrite/Services/Locale.swift b/app/sdks/0.6.2/client-swift/Sources/Appwrite/Services/Locale.swift similarity index 100% rename from app/sdks/client-swift/Sources/Appwrite/Services/Locale.swift rename to app/sdks/0.6.2/client-swift/Sources/Appwrite/Services/Locale.swift diff --git a/app/sdks/client-swift/Sources/Appwrite/Services/Storage.swift b/app/sdks/0.6.2/client-swift/Sources/Appwrite/Services/Storage.swift similarity index 100% rename from app/sdks/client-swift/Sources/Appwrite/Services/Storage.swift rename to app/sdks/0.6.2/client-swift/Sources/Appwrite/Services/Storage.swift diff --git a/app/sdks/client-swift/Sources/Appwrite/Services/Teams.swift b/app/sdks/0.6.2/client-swift/Sources/Appwrite/Services/Teams.swift similarity index 100% rename from app/sdks/client-swift/Sources/Appwrite/Services/Teams.swift rename to app/sdks/0.6.2/client-swift/Sources/Appwrite/Services/Teams.swift diff --git a/app/sdks/client-swift/docs/account.md b/app/sdks/0.6.2/client-swift/docs/account.md similarity index 100% rename from app/sdks/client-swift/docs/account.md rename to app/sdks/0.6.2/client-swift/docs/account.md diff --git a/app/sdks/client-swift/docs/avatars.md b/app/sdks/0.6.2/client-swift/docs/avatars.md similarity index 100% rename from app/sdks/client-swift/docs/avatars.md rename to app/sdks/0.6.2/client-swift/docs/avatars.md diff --git a/app/sdks/client-swift/docs/database.md b/app/sdks/0.6.2/client-swift/docs/database.md similarity index 100% rename from app/sdks/client-swift/docs/database.md rename to app/sdks/0.6.2/client-swift/docs/database.md diff --git a/app/sdks/client-swift/docs/examples/account/create-o-auth2session.md b/app/sdks/0.6.2/client-swift/docs/examples/account/create-o-auth2session.md similarity index 100% rename from app/sdks/client-swift/docs/examples/account/create-o-auth2session.md rename to app/sdks/0.6.2/client-swift/docs/examples/account/create-o-auth2session.md diff --git a/app/sdks/client-swift/docs/examples/account/create-recovery.md b/app/sdks/0.6.2/client-swift/docs/examples/account/create-recovery.md similarity index 100% rename from app/sdks/client-swift/docs/examples/account/create-recovery.md rename to app/sdks/0.6.2/client-swift/docs/examples/account/create-recovery.md diff --git a/app/sdks/client-swift/docs/examples/account/create-session.md b/app/sdks/0.6.2/client-swift/docs/examples/account/create-session.md similarity index 100% rename from app/sdks/client-swift/docs/examples/account/create-session.md rename to app/sdks/0.6.2/client-swift/docs/examples/account/create-session.md diff --git a/app/sdks/client-swift/docs/examples/account/create-verification.md b/app/sdks/0.6.2/client-swift/docs/examples/account/create-verification.md similarity index 100% rename from app/sdks/client-swift/docs/examples/account/create-verification.md rename to app/sdks/0.6.2/client-swift/docs/examples/account/create-verification.md diff --git a/app/sdks/client-swift/docs/examples/account/create.md b/app/sdks/0.6.2/client-swift/docs/examples/account/create.md similarity index 100% rename from app/sdks/client-swift/docs/examples/account/create.md rename to app/sdks/0.6.2/client-swift/docs/examples/account/create.md diff --git a/app/sdks/client-swift/docs/examples/account/delete-session.md b/app/sdks/0.6.2/client-swift/docs/examples/account/delete-session.md similarity index 100% rename from app/sdks/client-swift/docs/examples/account/delete-session.md rename to app/sdks/0.6.2/client-swift/docs/examples/account/delete-session.md diff --git a/app/sdks/client-swift/docs/examples/account/delete-sessions.md b/app/sdks/0.6.2/client-swift/docs/examples/account/delete-sessions.md similarity index 100% rename from app/sdks/client-swift/docs/examples/account/delete-sessions.md rename to app/sdks/0.6.2/client-swift/docs/examples/account/delete-sessions.md diff --git a/app/sdks/client-swift/docs/examples/account/delete.md b/app/sdks/0.6.2/client-swift/docs/examples/account/delete.md similarity index 100% rename from app/sdks/client-swift/docs/examples/account/delete.md rename to app/sdks/0.6.2/client-swift/docs/examples/account/delete.md diff --git a/app/sdks/client-swift/docs/examples/account/get-logs.md b/app/sdks/0.6.2/client-swift/docs/examples/account/get-logs.md similarity index 100% rename from app/sdks/client-swift/docs/examples/account/get-logs.md rename to app/sdks/0.6.2/client-swift/docs/examples/account/get-logs.md diff --git a/app/sdks/client-swift/docs/examples/account/get-prefs.md b/app/sdks/0.6.2/client-swift/docs/examples/account/get-prefs.md similarity index 100% rename from app/sdks/client-swift/docs/examples/account/get-prefs.md rename to app/sdks/0.6.2/client-swift/docs/examples/account/get-prefs.md diff --git a/app/sdks/client-swift/docs/examples/account/get-sessions.md b/app/sdks/0.6.2/client-swift/docs/examples/account/get-sessions.md similarity index 100% rename from app/sdks/client-swift/docs/examples/account/get-sessions.md rename to app/sdks/0.6.2/client-swift/docs/examples/account/get-sessions.md diff --git a/app/sdks/client-swift/docs/examples/account/get.md b/app/sdks/0.6.2/client-swift/docs/examples/account/get.md similarity index 100% rename from app/sdks/client-swift/docs/examples/account/get.md rename to app/sdks/0.6.2/client-swift/docs/examples/account/get.md diff --git a/app/sdks/client-swift/docs/examples/account/update-email.md b/app/sdks/0.6.2/client-swift/docs/examples/account/update-email.md similarity index 100% rename from app/sdks/client-swift/docs/examples/account/update-email.md rename to app/sdks/0.6.2/client-swift/docs/examples/account/update-email.md diff --git a/app/sdks/client-swift/docs/examples/account/update-name.md b/app/sdks/0.6.2/client-swift/docs/examples/account/update-name.md similarity index 100% rename from app/sdks/client-swift/docs/examples/account/update-name.md rename to app/sdks/0.6.2/client-swift/docs/examples/account/update-name.md diff --git a/app/sdks/client-swift/docs/examples/account/update-password.md b/app/sdks/0.6.2/client-swift/docs/examples/account/update-password.md similarity index 100% rename from app/sdks/client-swift/docs/examples/account/update-password.md rename to app/sdks/0.6.2/client-swift/docs/examples/account/update-password.md diff --git a/app/sdks/client-swift/docs/examples/account/update-prefs.md b/app/sdks/0.6.2/client-swift/docs/examples/account/update-prefs.md similarity index 100% rename from app/sdks/client-swift/docs/examples/account/update-prefs.md rename to app/sdks/0.6.2/client-swift/docs/examples/account/update-prefs.md diff --git a/app/sdks/client-swift/docs/examples/account/update-recovery.md b/app/sdks/0.6.2/client-swift/docs/examples/account/update-recovery.md similarity index 100% rename from app/sdks/client-swift/docs/examples/account/update-recovery.md rename to app/sdks/0.6.2/client-swift/docs/examples/account/update-recovery.md diff --git a/app/sdks/client-swift/docs/examples/account/update-verification.md b/app/sdks/0.6.2/client-swift/docs/examples/account/update-verification.md similarity index 100% rename from app/sdks/client-swift/docs/examples/account/update-verification.md rename to app/sdks/0.6.2/client-swift/docs/examples/account/update-verification.md diff --git a/app/sdks/client-swift/docs/examples/avatars/get-browser.md b/app/sdks/0.6.2/client-swift/docs/examples/avatars/get-browser.md similarity index 100% rename from app/sdks/client-swift/docs/examples/avatars/get-browser.md rename to app/sdks/0.6.2/client-swift/docs/examples/avatars/get-browser.md diff --git a/app/sdks/client-swift/docs/examples/avatars/get-credit-card.md b/app/sdks/0.6.2/client-swift/docs/examples/avatars/get-credit-card.md similarity index 100% rename from app/sdks/client-swift/docs/examples/avatars/get-credit-card.md rename to app/sdks/0.6.2/client-swift/docs/examples/avatars/get-credit-card.md diff --git a/app/sdks/client-swift/docs/examples/avatars/get-favicon.md b/app/sdks/0.6.2/client-swift/docs/examples/avatars/get-favicon.md similarity index 100% rename from app/sdks/client-swift/docs/examples/avatars/get-favicon.md rename to app/sdks/0.6.2/client-swift/docs/examples/avatars/get-favicon.md diff --git a/app/sdks/client-swift/docs/examples/avatars/get-flag.md b/app/sdks/0.6.2/client-swift/docs/examples/avatars/get-flag.md similarity index 100% rename from app/sdks/client-swift/docs/examples/avatars/get-flag.md rename to app/sdks/0.6.2/client-swift/docs/examples/avatars/get-flag.md diff --git a/app/sdks/client-swift/docs/examples/avatars/get-image.md b/app/sdks/0.6.2/client-swift/docs/examples/avatars/get-image.md similarity index 100% rename from app/sdks/client-swift/docs/examples/avatars/get-image.md rename to app/sdks/0.6.2/client-swift/docs/examples/avatars/get-image.md diff --git a/app/sdks/client-swift/docs/examples/avatars/get-initials.md b/app/sdks/0.6.2/client-swift/docs/examples/avatars/get-initials.md similarity index 100% rename from app/sdks/client-swift/docs/examples/avatars/get-initials.md rename to app/sdks/0.6.2/client-swift/docs/examples/avatars/get-initials.md diff --git a/app/sdks/client-swift/docs/examples/avatars/get-q-r.md b/app/sdks/0.6.2/client-swift/docs/examples/avatars/get-q-r.md similarity index 100% rename from app/sdks/client-swift/docs/examples/avatars/get-q-r.md rename to app/sdks/0.6.2/client-swift/docs/examples/avatars/get-q-r.md diff --git a/app/sdks/client-swift/docs/examples/database/create-document.md b/app/sdks/0.6.2/client-swift/docs/examples/database/create-document.md similarity index 100% rename from app/sdks/client-swift/docs/examples/database/create-document.md rename to app/sdks/0.6.2/client-swift/docs/examples/database/create-document.md diff --git a/app/sdks/client-swift/docs/examples/database/delete-document.md b/app/sdks/0.6.2/client-swift/docs/examples/database/delete-document.md similarity index 100% rename from app/sdks/client-swift/docs/examples/database/delete-document.md rename to app/sdks/0.6.2/client-swift/docs/examples/database/delete-document.md diff --git a/app/sdks/client-swift/docs/examples/database/get-document.md b/app/sdks/0.6.2/client-swift/docs/examples/database/get-document.md similarity index 100% rename from app/sdks/client-swift/docs/examples/database/get-document.md rename to app/sdks/0.6.2/client-swift/docs/examples/database/get-document.md diff --git a/app/sdks/client-swift/docs/examples/database/list-documents.md b/app/sdks/0.6.2/client-swift/docs/examples/database/list-documents.md similarity index 100% rename from app/sdks/client-swift/docs/examples/database/list-documents.md rename to app/sdks/0.6.2/client-swift/docs/examples/database/list-documents.md diff --git a/app/sdks/client-swift/docs/examples/database/update-document.md b/app/sdks/0.6.2/client-swift/docs/examples/database/update-document.md similarity index 100% rename from app/sdks/client-swift/docs/examples/database/update-document.md rename to app/sdks/0.6.2/client-swift/docs/examples/database/update-document.md diff --git a/app/sdks/client-swift/docs/examples/locale/get-continents.md b/app/sdks/0.6.2/client-swift/docs/examples/locale/get-continents.md similarity index 100% rename from app/sdks/client-swift/docs/examples/locale/get-continents.md rename to app/sdks/0.6.2/client-swift/docs/examples/locale/get-continents.md diff --git a/app/sdks/client-swift/docs/examples/locale/get-countries-e-u.md b/app/sdks/0.6.2/client-swift/docs/examples/locale/get-countries-e-u.md similarity index 100% rename from app/sdks/client-swift/docs/examples/locale/get-countries-e-u.md rename to app/sdks/0.6.2/client-swift/docs/examples/locale/get-countries-e-u.md diff --git a/app/sdks/client-swift/docs/examples/locale/get-countries-phones.md b/app/sdks/0.6.2/client-swift/docs/examples/locale/get-countries-phones.md similarity index 100% rename from app/sdks/client-swift/docs/examples/locale/get-countries-phones.md rename to app/sdks/0.6.2/client-swift/docs/examples/locale/get-countries-phones.md diff --git a/app/sdks/client-swift/docs/examples/locale/get-countries.md b/app/sdks/0.6.2/client-swift/docs/examples/locale/get-countries.md similarity index 100% rename from app/sdks/client-swift/docs/examples/locale/get-countries.md rename to app/sdks/0.6.2/client-swift/docs/examples/locale/get-countries.md diff --git a/app/sdks/client-swift/docs/examples/locale/get-currencies.md b/app/sdks/0.6.2/client-swift/docs/examples/locale/get-currencies.md similarity index 100% rename from app/sdks/client-swift/docs/examples/locale/get-currencies.md rename to app/sdks/0.6.2/client-swift/docs/examples/locale/get-currencies.md diff --git a/app/sdks/client-swift/docs/examples/locale/get-languages.md b/app/sdks/0.6.2/client-swift/docs/examples/locale/get-languages.md similarity index 100% rename from app/sdks/client-swift/docs/examples/locale/get-languages.md rename to app/sdks/0.6.2/client-swift/docs/examples/locale/get-languages.md diff --git a/app/sdks/client-swift/docs/examples/locale/get.md b/app/sdks/0.6.2/client-swift/docs/examples/locale/get.md similarity index 100% rename from app/sdks/client-swift/docs/examples/locale/get.md rename to app/sdks/0.6.2/client-swift/docs/examples/locale/get.md diff --git a/app/sdks/client-swift/docs/examples/storage/create-file.md b/app/sdks/0.6.2/client-swift/docs/examples/storage/create-file.md similarity index 100% rename from app/sdks/client-swift/docs/examples/storage/create-file.md rename to app/sdks/0.6.2/client-swift/docs/examples/storage/create-file.md diff --git a/app/sdks/client-swift/docs/examples/storage/delete-file.md b/app/sdks/0.6.2/client-swift/docs/examples/storage/delete-file.md similarity index 100% rename from app/sdks/client-swift/docs/examples/storage/delete-file.md rename to app/sdks/0.6.2/client-swift/docs/examples/storage/delete-file.md diff --git a/app/sdks/client-swift/docs/examples/storage/get-file-download.md b/app/sdks/0.6.2/client-swift/docs/examples/storage/get-file-download.md similarity index 100% rename from app/sdks/client-swift/docs/examples/storage/get-file-download.md rename to app/sdks/0.6.2/client-swift/docs/examples/storage/get-file-download.md diff --git a/app/sdks/client-swift/docs/examples/storage/get-file-preview.md b/app/sdks/0.6.2/client-swift/docs/examples/storage/get-file-preview.md similarity index 100% rename from app/sdks/client-swift/docs/examples/storage/get-file-preview.md rename to app/sdks/0.6.2/client-swift/docs/examples/storage/get-file-preview.md diff --git a/app/sdks/client-swift/docs/examples/storage/get-file-view.md b/app/sdks/0.6.2/client-swift/docs/examples/storage/get-file-view.md similarity index 100% rename from app/sdks/client-swift/docs/examples/storage/get-file-view.md rename to app/sdks/0.6.2/client-swift/docs/examples/storage/get-file-view.md diff --git a/app/sdks/client-swift/docs/examples/storage/get-file.md b/app/sdks/0.6.2/client-swift/docs/examples/storage/get-file.md similarity index 100% rename from app/sdks/client-swift/docs/examples/storage/get-file.md rename to app/sdks/0.6.2/client-swift/docs/examples/storage/get-file.md diff --git a/app/sdks/client-swift/docs/examples/storage/list-files.md b/app/sdks/0.6.2/client-swift/docs/examples/storage/list-files.md similarity index 100% rename from app/sdks/client-swift/docs/examples/storage/list-files.md rename to app/sdks/0.6.2/client-swift/docs/examples/storage/list-files.md diff --git a/app/sdks/client-swift/docs/examples/storage/update-file.md b/app/sdks/0.6.2/client-swift/docs/examples/storage/update-file.md similarity index 100% rename from app/sdks/client-swift/docs/examples/storage/update-file.md rename to app/sdks/0.6.2/client-swift/docs/examples/storage/update-file.md diff --git a/app/sdks/client-swift/docs/examples/teams/create-membership.md b/app/sdks/0.6.2/client-swift/docs/examples/teams/create-membership.md similarity index 100% rename from app/sdks/client-swift/docs/examples/teams/create-membership.md rename to app/sdks/0.6.2/client-swift/docs/examples/teams/create-membership.md diff --git a/app/sdks/client-swift/docs/examples/teams/create.md b/app/sdks/0.6.2/client-swift/docs/examples/teams/create.md similarity index 100% rename from app/sdks/client-swift/docs/examples/teams/create.md rename to app/sdks/0.6.2/client-swift/docs/examples/teams/create.md diff --git a/app/sdks/client-swift/docs/examples/teams/delete-membership.md b/app/sdks/0.6.2/client-swift/docs/examples/teams/delete-membership.md similarity index 100% rename from app/sdks/client-swift/docs/examples/teams/delete-membership.md rename to app/sdks/0.6.2/client-swift/docs/examples/teams/delete-membership.md diff --git a/app/sdks/client-swift/docs/examples/teams/delete.md b/app/sdks/0.6.2/client-swift/docs/examples/teams/delete.md similarity index 100% rename from app/sdks/client-swift/docs/examples/teams/delete.md rename to app/sdks/0.6.2/client-swift/docs/examples/teams/delete.md diff --git a/app/sdks/client-swift/docs/examples/teams/get-memberships.md b/app/sdks/0.6.2/client-swift/docs/examples/teams/get-memberships.md similarity index 100% rename from app/sdks/client-swift/docs/examples/teams/get-memberships.md rename to app/sdks/0.6.2/client-swift/docs/examples/teams/get-memberships.md diff --git a/app/sdks/client-swift/docs/examples/teams/get.md b/app/sdks/0.6.2/client-swift/docs/examples/teams/get.md similarity index 100% rename from app/sdks/client-swift/docs/examples/teams/get.md rename to app/sdks/0.6.2/client-swift/docs/examples/teams/get.md diff --git a/app/sdks/client-swift/docs/examples/teams/list.md b/app/sdks/0.6.2/client-swift/docs/examples/teams/list.md similarity index 100% rename from app/sdks/client-swift/docs/examples/teams/list.md rename to app/sdks/0.6.2/client-swift/docs/examples/teams/list.md diff --git a/app/sdks/client-swift/docs/examples/teams/update-membership-status.md b/app/sdks/0.6.2/client-swift/docs/examples/teams/update-membership-status.md similarity index 100% rename from app/sdks/client-swift/docs/examples/teams/update-membership-status.md rename to app/sdks/0.6.2/client-swift/docs/examples/teams/update-membership-status.md diff --git a/app/sdks/client-swift/docs/examples/teams/update.md b/app/sdks/0.6.2/client-swift/docs/examples/teams/update.md similarity index 100% rename from app/sdks/client-swift/docs/examples/teams/update.md rename to app/sdks/0.6.2/client-swift/docs/examples/teams/update.md diff --git a/app/sdks/client-swift/docs/locale.md b/app/sdks/0.6.2/client-swift/docs/locale.md similarity index 100% rename from app/sdks/client-swift/docs/locale.md rename to app/sdks/0.6.2/client-swift/docs/locale.md diff --git a/app/sdks/client-swift/docs/storage.md b/app/sdks/0.6.2/client-swift/docs/storage.md similarity index 100% rename from app/sdks/client-swift/docs/storage.md rename to app/sdks/0.6.2/client-swift/docs/storage.md diff --git a/app/sdks/client-swift/docs/teams.md b/app/sdks/0.6.2/client-swift/docs/teams.md similarity index 100% rename from app/sdks/client-swift/docs/teams.md rename to app/sdks/0.6.2/client-swift/docs/teams.md diff --git a/app/sdks/client-web/CHANGELOG.md b/app/sdks/0.6.2/client-web/CHANGELOG.md similarity index 100% rename from app/sdks/client-web/CHANGELOG.md rename to app/sdks/0.6.2/client-web/CHANGELOG.md diff --git a/app/sdks/client-web/LICENSE b/app/sdks/0.6.2/client-web/LICENSE similarity index 100% rename from app/sdks/client-web/LICENSE rename to app/sdks/0.6.2/client-web/LICENSE diff --git a/app/sdks/client-web/README.md b/app/sdks/0.6.2/client-web/README.md similarity index 100% rename from app/sdks/client-web/README.md rename to app/sdks/0.6.2/client-web/README.md diff --git a/app/sdks/client-web/docs/examples/account/create-o-auth2session.md b/app/sdks/0.6.2/client-web/docs/examples/account/create-o-auth2session.md similarity index 100% rename from app/sdks/client-web/docs/examples/account/create-o-auth2session.md rename to app/sdks/0.6.2/client-web/docs/examples/account/create-o-auth2session.md diff --git a/app/sdks/client-web/docs/examples/account/create-recovery.md b/app/sdks/0.6.2/client-web/docs/examples/account/create-recovery.md similarity index 100% rename from app/sdks/client-web/docs/examples/account/create-recovery.md rename to app/sdks/0.6.2/client-web/docs/examples/account/create-recovery.md diff --git a/app/sdks/client-web/docs/examples/account/create-session.md b/app/sdks/0.6.2/client-web/docs/examples/account/create-session.md similarity index 100% rename from app/sdks/client-web/docs/examples/account/create-session.md rename to app/sdks/0.6.2/client-web/docs/examples/account/create-session.md diff --git a/app/sdks/client-web/docs/examples/account/create-verification.md b/app/sdks/0.6.2/client-web/docs/examples/account/create-verification.md similarity index 100% rename from app/sdks/client-web/docs/examples/account/create-verification.md rename to app/sdks/0.6.2/client-web/docs/examples/account/create-verification.md diff --git a/app/sdks/client-web/docs/examples/account/create.md b/app/sdks/0.6.2/client-web/docs/examples/account/create.md similarity index 100% rename from app/sdks/client-web/docs/examples/account/create.md rename to app/sdks/0.6.2/client-web/docs/examples/account/create.md diff --git a/app/sdks/client-web/docs/examples/account/delete-session.md b/app/sdks/0.6.2/client-web/docs/examples/account/delete-session.md similarity index 100% rename from app/sdks/client-web/docs/examples/account/delete-session.md rename to app/sdks/0.6.2/client-web/docs/examples/account/delete-session.md diff --git a/app/sdks/client-web/docs/examples/account/delete-sessions.md b/app/sdks/0.6.2/client-web/docs/examples/account/delete-sessions.md similarity index 100% rename from app/sdks/client-web/docs/examples/account/delete-sessions.md rename to app/sdks/0.6.2/client-web/docs/examples/account/delete-sessions.md diff --git a/app/sdks/client-web/docs/examples/account/delete.md b/app/sdks/0.6.2/client-web/docs/examples/account/delete.md similarity index 100% rename from app/sdks/client-web/docs/examples/account/delete.md rename to app/sdks/0.6.2/client-web/docs/examples/account/delete.md diff --git a/app/sdks/client-web/docs/examples/account/get-logs.md b/app/sdks/0.6.2/client-web/docs/examples/account/get-logs.md similarity index 100% rename from app/sdks/client-web/docs/examples/account/get-logs.md rename to app/sdks/0.6.2/client-web/docs/examples/account/get-logs.md diff --git a/app/sdks/client-web/docs/examples/account/get-prefs.md b/app/sdks/0.6.2/client-web/docs/examples/account/get-prefs.md similarity index 100% rename from app/sdks/client-web/docs/examples/account/get-prefs.md rename to app/sdks/0.6.2/client-web/docs/examples/account/get-prefs.md diff --git a/app/sdks/client-web/docs/examples/account/get-sessions.md b/app/sdks/0.6.2/client-web/docs/examples/account/get-sessions.md similarity index 100% rename from app/sdks/client-web/docs/examples/account/get-sessions.md rename to app/sdks/0.6.2/client-web/docs/examples/account/get-sessions.md diff --git a/app/sdks/client-web/docs/examples/account/get.md b/app/sdks/0.6.2/client-web/docs/examples/account/get.md similarity index 100% rename from app/sdks/client-web/docs/examples/account/get.md rename to app/sdks/0.6.2/client-web/docs/examples/account/get.md diff --git a/app/sdks/client-web/docs/examples/account/update-email.md b/app/sdks/0.6.2/client-web/docs/examples/account/update-email.md similarity index 100% rename from app/sdks/client-web/docs/examples/account/update-email.md rename to app/sdks/0.6.2/client-web/docs/examples/account/update-email.md diff --git a/app/sdks/client-web/docs/examples/account/update-name.md b/app/sdks/0.6.2/client-web/docs/examples/account/update-name.md similarity index 100% rename from app/sdks/client-web/docs/examples/account/update-name.md rename to app/sdks/0.6.2/client-web/docs/examples/account/update-name.md diff --git a/app/sdks/client-web/docs/examples/account/update-password.md b/app/sdks/0.6.2/client-web/docs/examples/account/update-password.md similarity index 100% rename from app/sdks/client-web/docs/examples/account/update-password.md rename to app/sdks/0.6.2/client-web/docs/examples/account/update-password.md diff --git a/app/sdks/client-web/docs/examples/account/update-prefs.md b/app/sdks/0.6.2/client-web/docs/examples/account/update-prefs.md similarity index 100% rename from app/sdks/client-web/docs/examples/account/update-prefs.md rename to app/sdks/0.6.2/client-web/docs/examples/account/update-prefs.md diff --git a/app/sdks/client-web/docs/examples/account/update-recovery.md b/app/sdks/0.6.2/client-web/docs/examples/account/update-recovery.md similarity index 100% rename from app/sdks/client-web/docs/examples/account/update-recovery.md rename to app/sdks/0.6.2/client-web/docs/examples/account/update-recovery.md diff --git a/app/sdks/client-web/docs/examples/account/update-verification.md b/app/sdks/0.6.2/client-web/docs/examples/account/update-verification.md similarity index 100% rename from app/sdks/client-web/docs/examples/account/update-verification.md rename to app/sdks/0.6.2/client-web/docs/examples/account/update-verification.md diff --git a/app/sdks/client-web/docs/examples/avatars/get-browser.md b/app/sdks/0.6.2/client-web/docs/examples/avatars/get-browser.md similarity index 100% rename from app/sdks/client-web/docs/examples/avatars/get-browser.md rename to app/sdks/0.6.2/client-web/docs/examples/avatars/get-browser.md diff --git a/app/sdks/client-web/docs/examples/avatars/get-credit-card.md b/app/sdks/0.6.2/client-web/docs/examples/avatars/get-credit-card.md similarity index 100% rename from app/sdks/client-web/docs/examples/avatars/get-credit-card.md rename to app/sdks/0.6.2/client-web/docs/examples/avatars/get-credit-card.md diff --git a/app/sdks/client-web/docs/examples/avatars/get-favicon.md b/app/sdks/0.6.2/client-web/docs/examples/avatars/get-favicon.md similarity index 100% rename from app/sdks/client-web/docs/examples/avatars/get-favicon.md rename to app/sdks/0.6.2/client-web/docs/examples/avatars/get-favicon.md diff --git a/app/sdks/client-web/docs/examples/avatars/get-flag.md b/app/sdks/0.6.2/client-web/docs/examples/avatars/get-flag.md similarity index 100% rename from app/sdks/client-web/docs/examples/avatars/get-flag.md rename to app/sdks/0.6.2/client-web/docs/examples/avatars/get-flag.md diff --git a/app/sdks/client-web/docs/examples/avatars/get-image.md b/app/sdks/0.6.2/client-web/docs/examples/avatars/get-image.md similarity index 100% rename from app/sdks/client-web/docs/examples/avatars/get-image.md rename to app/sdks/0.6.2/client-web/docs/examples/avatars/get-image.md diff --git a/app/sdks/client-web/docs/examples/avatars/get-initials.md b/app/sdks/0.6.2/client-web/docs/examples/avatars/get-initials.md similarity index 100% rename from app/sdks/client-web/docs/examples/avatars/get-initials.md rename to app/sdks/0.6.2/client-web/docs/examples/avatars/get-initials.md diff --git a/app/sdks/client-web/docs/examples/avatars/get-q-r.md b/app/sdks/0.6.2/client-web/docs/examples/avatars/get-q-r.md similarity index 100% rename from app/sdks/client-web/docs/examples/avatars/get-q-r.md rename to app/sdks/0.6.2/client-web/docs/examples/avatars/get-q-r.md diff --git a/app/sdks/client-web/docs/examples/database/create-document.md b/app/sdks/0.6.2/client-web/docs/examples/database/create-document.md similarity index 100% rename from app/sdks/client-web/docs/examples/database/create-document.md rename to app/sdks/0.6.2/client-web/docs/examples/database/create-document.md diff --git a/app/sdks/client-web/docs/examples/database/delete-document.md b/app/sdks/0.6.2/client-web/docs/examples/database/delete-document.md similarity index 100% rename from app/sdks/client-web/docs/examples/database/delete-document.md rename to app/sdks/0.6.2/client-web/docs/examples/database/delete-document.md diff --git a/app/sdks/client-web/docs/examples/database/get-document.md b/app/sdks/0.6.2/client-web/docs/examples/database/get-document.md similarity index 100% rename from app/sdks/client-web/docs/examples/database/get-document.md rename to app/sdks/0.6.2/client-web/docs/examples/database/get-document.md diff --git a/app/sdks/client-web/docs/examples/database/list-documents.md b/app/sdks/0.6.2/client-web/docs/examples/database/list-documents.md similarity index 100% rename from app/sdks/client-web/docs/examples/database/list-documents.md rename to app/sdks/0.6.2/client-web/docs/examples/database/list-documents.md diff --git a/app/sdks/client-web/docs/examples/database/update-document.md b/app/sdks/0.6.2/client-web/docs/examples/database/update-document.md similarity index 100% rename from app/sdks/client-web/docs/examples/database/update-document.md rename to app/sdks/0.6.2/client-web/docs/examples/database/update-document.md diff --git a/app/sdks/client-web/docs/examples/locale/get-continents.md b/app/sdks/0.6.2/client-web/docs/examples/locale/get-continents.md similarity index 100% rename from app/sdks/client-web/docs/examples/locale/get-continents.md rename to app/sdks/0.6.2/client-web/docs/examples/locale/get-continents.md diff --git a/app/sdks/client-web/docs/examples/locale/get-countries-e-u.md b/app/sdks/0.6.2/client-web/docs/examples/locale/get-countries-e-u.md similarity index 100% rename from app/sdks/client-web/docs/examples/locale/get-countries-e-u.md rename to app/sdks/0.6.2/client-web/docs/examples/locale/get-countries-e-u.md diff --git a/app/sdks/client-web/docs/examples/locale/get-countries-phones.md b/app/sdks/0.6.2/client-web/docs/examples/locale/get-countries-phones.md similarity index 100% rename from app/sdks/client-web/docs/examples/locale/get-countries-phones.md rename to app/sdks/0.6.2/client-web/docs/examples/locale/get-countries-phones.md diff --git a/app/sdks/client-web/docs/examples/locale/get-countries.md b/app/sdks/0.6.2/client-web/docs/examples/locale/get-countries.md similarity index 100% rename from app/sdks/client-web/docs/examples/locale/get-countries.md rename to app/sdks/0.6.2/client-web/docs/examples/locale/get-countries.md diff --git a/app/sdks/client-web/docs/examples/locale/get-currencies.md b/app/sdks/0.6.2/client-web/docs/examples/locale/get-currencies.md similarity index 100% rename from app/sdks/client-web/docs/examples/locale/get-currencies.md rename to app/sdks/0.6.2/client-web/docs/examples/locale/get-currencies.md diff --git a/app/sdks/client-web/docs/examples/locale/get-languages.md b/app/sdks/0.6.2/client-web/docs/examples/locale/get-languages.md similarity index 100% rename from app/sdks/client-web/docs/examples/locale/get-languages.md rename to app/sdks/0.6.2/client-web/docs/examples/locale/get-languages.md diff --git a/app/sdks/client-web/docs/examples/locale/get.md b/app/sdks/0.6.2/client-web/docs/examples/locale/get.md similarity index 100% rename from app/sdks/client-web/docs/examples/locale/get.md rename to app/sdks/0.6.2/client-web/docs/examples/locale/get.md diff --git a/app/sdks/client-web/docs/examples/storage/create-file.md b/app/sdks/0.6.2/client-web/docs/examples/storage/create-file.md similarity index 100% rename from app/sdks/client-web/docs/examples/storage/create-file.md rename to app/sdks/0.6.2/client-web/docs/examples/storage/create-file.md diff --git a/app/sdks/client-web/docs/examples/storage/delete-file.md b/app/sdks/0.6.2/client-web/docs/examples/storage/delete-file.md similarity index 100% rename from app/sdks/client-web/docs/examples/storage/delete-file.md rename to app/sdks/0.6.2/client-web/docs/examples/storage/delete-file.md diff --git a/app/sdks/client-web/docs/examples/storage/get-file-download.md b/app/sdks/0.6.2/client-web/docs/examples/storage/get-file-download.md similarity index 100% rename from app/sdks/client-web/docs/examples/storage/get-file-download.md rename to app/sdks/0.6.2/client-web/docs/examples/storage/get-file-download.md diff --git a/app/sdks/client-web/docs/examples/storage/get-file-preview.md b/app/sdks/0.6.2/client-web/docs/examples/storage/get-file-preview.md similarity index 100% rename from app/sdks/client-web/docs/examples/storage/get-file-preview.md rename to app/sdks/0.6.2/client-web/docs/examples/storage/get-file-preview.md diff --git a/app/sdks/client-web/docs/examples/storage/get-file-view.md b/app/sdks/0.6.2/client-web/docs/examples/storage/get-file-view.md similarity index 100% rename from app/sdks/client-web/docs/examples/storage/get-file-view.md rename to app/sdks/0.6.2/client-web/docs/examples/storage/get-file-view.md diff --git a/app/sdks/client-web/docs/examples/storage/get-file.md b/app/sdks/0.6.2/client-web/docs/examples/storage/get-file.md similarity index 100% rename from app/sdks/client-web/docs/examples/storage/get-file.md rename to app/sdks/0.6.2/client-web/docs/examples/storage/get-file.md diff --git a/app/sdks/client-web/docs/examples/storage/list-files.md b/app/sdks/0.6.2/client-web/docs/examples/storage/list-files.md similarity index 100% rename from app/sdks/client-web/docs/examples/storage/list-files.md rename to app/sdks/0.6.2/client-web/docs/examples/storage/list-files.md diff --git a/app/sdks/client-web/docs/examples/storage/update-file.md b/app/sdks/0.6.2/client-web/docs/examples/storage/update-file.md similarity index 100% rename from app/sdks/client-web/docs/examples/storage/update-file.md rename to app/sdks/0.6.2/client-web/docs/examples/storage/update-file.md diff --git a/app/sdks/client-web/docs/examples/teams/create-membership.md b/app/sdks/0.6.2/client-web/docs/examples/teams/create-membership.md similarity index 100% rename from app/sdks/client-web/docs/examples/teams/create-membership.md rename to app/sdks/0.6.2/client-web/docs/examples/teams/create-membership.md diff --git a/app/sdks/client-web/docs/examples/teams/create.md b/app/sdks/0.6.2/client-web/docs/examples/teams/create.md similarity index 100% rename from app/sdks/client-web/docs/examples/teams/create.md rename to app/sdks/0.6.2/client-web/docs/examples/teams/create.md diff --git a/app/sdks/client-web/docs/examples/teams/delete-membership.md b/app/sdks/0.6.2/client-web/docs/examples/teams/delete-membership.md similarity index 100% rename from app/sdks/client-web/docs/examples/teams/delete-membership.md rename to app/sdks/0.6.2/client-web/docs/examples/teams/delete-membership.md diff --git a/app/sdks/client-web/docs/examples/teams/delete.md b/app/sdks/0.6.2/client-web/docs/examples/teams/delete.md similarity index 100% rename from app/sdks/client-web/docs/examples/teams/delete.md rename to app/sdks/0.6.2/client-web/docs/examples/teams/delete.md diff --git a/app/sdks/client-web/docs/examples/teams/get-memberships.md b/app/sdks/0.6.2/client-web/docs/examples/teams/get-memberships.md similarity index 100% rename from app/sdks/client-web/docs/examples/teams/get-memberships.md rename to app/sdks/0.6.2/client-web/docs/examples/teams/get-memberships.md diff --git a/app/sdks/client-web/docs/examples/teams/get.md b/app/sdks/0.6.2/client-web/docs/examples/teams/get.md similarity index 100% rename from app/sdks/client-web/docs/examples/teams/get.md rename to app/sdks/0.6.2/client-web/docs/examples/teams/get.md diff --git a/app/sdks/client-web/docs/examples/teams/list.md b/app/sdks/0.6.2/client-web/docs/examples/teams/list.md similarity index 100% rename from app/sdks/client-web/docs/examples/teams/list.md rename to app/sdks/0.6.2/client-web/docs/examples/teams/list.md diff --git a/app/sdks/client-web/docs/examples/teams/update-membership-status.md b/app/sdks/0.6.2/client-web/docs/examples/teams/update-membership-status.md similarity index 100% rename from app/sdks/client-web/docs/examples/teams/update-membership-status.md rename to app/sdks/0.6.2/client-web/docs/examples/teams/update-membership-status.md diff --git a/app/sdks/client-web/docs/examples/teams/update.md b/app/sdks/0.6.2/client-web/docs/examples/teams/update.md similarity index 100% rename from app/sdks/client-web/docs/examples/teams/update.md rename to app/sdks/0.6.2/client-web/docs/examples/teams/update.md diff --git a/app/sdks/client-web/package.json b/app/sdks/0.6.2/client-web/package.json similarity index 100% rename from app/sdks/client-web/package.json rename to app/sdks/0.6.2/client-web/package.json diff --git a/app/sdks/client-web/src/sdk.js b/app/sdks/0.6.2/client-web/src/sdk.js similarity index 100% rename from app/sdks/client-web/src/sdk.js rename to app/sdks/0.6.2/client-web/src/sdk.js diff --git a/app/sdks/client-web/src/sdk.min.js b/app/sdks/0.6.2/client-web/src/sdk.min.js similarity index 100% rename from app/sdks/client-web/src/sdk.min.js rename to app/sdks/0.6.2/client-web/src/sdk.min.js diff --git a/app/sdks/client-web/tsconfig.json b/app/sdks/0.6.2/client-web/tsconfig.json similarity index 100% rename from app/sdks/client-web/tsconfig.json rename to app/sdks/0.6.2/client-web/tsconfig.json diff --git a/app/sdks/client-web/types/index.d.ts b/app/sdks/0.6.2/client-web/types/index.d.ts similarity index 100% rename from app/sdks/client-web/types/index.d.ts rename to app/sdks/0.6.2/client-web/types/index.d.ts diff --git a/app/sdks/console-web/CHANGELOG.md b/app/sdks/0.6.2/console-web/CHANGELOG.md similarity index 100% rename from app/sdks/console-web/CHANGELOG.md rename to app/sdks/0.6.2/console-web/CHANGELOG.md diff --git a/app/sdks/console-web/LICENSE b/app/sdks/0.6.2/console-web/LICENSE similarity index 100% rename from app/sdks/console-web/LICENSE rename to app/sdks/0.6.2/console-web/LICENSE diff --git a/app/sdks/console-web/README.md b/app/sdks/0.6.2/console-web/README.md similarity index 100% rename from app/sdks/console-web/README.md rename to app/sdks/0.6.2/console-web/README.md diff --git a/app/sdks/console-web/docs/examples/account/create-o-auth2session.md b/app/sdks/0.6.2/console-web/docs/examples/account/create-o-auth2session.md similarity index 100% rename from app/sdks/console-web/docs/examples/account/create-o-auth2session.md rename to app/sdks/0.6.2/console-web/docs/examples/account/create-o-auth2session.md diff --git a/app/sdks/console-web/docs/examples/account/create-recovery.md b/app/sdks/0.6.2/console-web/docs/examples/account/create-recovery.md similarity index 100% rename from app/sdks/console-web/docs/examples/account/create-recovery.md rename to app/sdks/0.6.2/console-web/docs/examples/account/create-recovery.md diff --git a/app/sdks/console-web/docs/examples/account/create-session.md b/app/sdks/0.6.2/console-web/docs/examples/account/create-session.md similarity index 100% rename from app/sdks/console-web/docs/examples/account/create-session.md rename to app/sdks/0.6.2/console-web/docs/examples/account/create-session.md diff --git a/app/sdks/console-web/docs/examples/account/create-verification.md b/app/sdks/0.6.2/console-web/docs/examples/account/create-verification.md similarity index 100% rename from app/sdks/console-web/docs/examples/account/create-verification.md rename to app/sdks/0.6.2/console-web/docs/examples/account/create-verification.md diff --git a/app/sdks/console-web/docs/examples/account/create.md b/app/sdks/0.6.2/console-web/docs/examples/account/create.md similarity index 100% rename from app/sdks/console-web/docs/examples/account/create.md rename to app/sdks/0.6.2/console-web/docs/examples/account/create.md diff --git a/app/sdks/console-web/docs/examples/account/delete-session.md b/app/sdks/0.6.2/console-web/docs/examples/account/delete-session.md similarity index 100% rename from app/sdks/console-web/docs/examples/account/delete-session.md rename to app/sdks/0.6.2/console-web/docs/examples/account/delete-session.md diff --git a/app/sdks/console-web/docs/examples/account/delete-sessions.md b/app/sdks/0.6.2/console-web/docs/examples/account/delete-sessions.md similarity index 100% rename from app/sdks/console-web/docs/examples/account/delete-sessions.md rename to app/sdks/0.6.2/console-web/docs/examples/account/delete-sessions.md diff --git a/app/sdks/console-web/docs/examples/account/delete.md b/app/sdks/0.6.2/console-web/docs/examples/account/delete.md similarity index 100% rename from app/sdks/console-web/docs/examples/account/delete.md rename to app/sdks/0.6.2/console-web/docs/examples/account/delete.md diff --git a/app/sdks/console-web/docs/examples/account/get-logs.md b/app/sdks/0.6.2/console-web/docs/examples/account/get-logs.md similarity index 100% rename from app/sdks/console-web/docs/examples/account/get-logs.md rename to app/sdks/0.6.2/console-web/docs/examples/account/get-logs.md diff --git a/app/sdks/console-web/docs/examples/account/get-prefs.md b/app/sdks/0.6.2/console-web/docs/examples/account/get-prefs.md similarity index 100% rename from app/sdks/console-web/docs/examples/account/get-prefs.md rename to app/sdks/0.6.2/console-web/docs/examples/account/get-prefs.md diff --git a/app/sdks/console-web/docs/examples/account/get-sessions.md b/app/sdks/0.6.2/console-web/docs/examples/account/get-sessions.md similarity index 100% rename from app/sdks/console-web/docs/examples/account/get-sessions.md rename to app/sdks/0.6.2/console-web/docs/examples/account/get-sessions.md diff --git a/app/sdks/console-web/docs/examples/account/get.md b/app/sdks/0.6.2/console-web/docs/examples/account/get.md similarity index 100% rename from app/sdks/console-web/docs/examples/account/get.md rename to app/sdks/0.6.2/console-web/docs/examples/account/get.md diff --git a/app/sdks/console-web/docs/examples/account/update-email.md b/app/sdks/0.6.2/console-web/docs/examples/account/update-email.md similarity index 100% rename from app/sdks/console-web/docs/examples/account/update-email.md rename to app/sdks/0.6.2/console-web/docs/examples/account/update-email.md diff --git a/app/sdks/console-web/docs/examples/account/update-name.md b/app/sdks/0.6.2/console-web/docs/examples/account/update-name.md similarity index 100% rename from app/sdks/console-web/docs/examples/account/update-name.md rename to app/sdks/0.6.2/console-web/docs/examples/account/update-name.md diff --git a/app/sdks/console-web/docs/examples/account/update-password.md b/app/sdks/0.6.2/console-web/docs/examples/account/update-password.md similarity index 100% rename from app/sdks/console-web/docs/examples/account/update-password.md rename to app/sdks/0.6.2/console-web/docs/examples/account/update-password.md diff --git a/app/sdks/console-web/docs/examples/account/update-prefs.md b/app/sdks/0.6.2/console-web/docs/examples/account/update-prefs.md similarity index 100% rename from app/sdks/console-web/docs/examples/account/update-prefs.md rename to app/sdks/0.6.2/console-web/docs/examples/account/update-prefs.md diff --git a/app/sdks/console-web/docs/examples/account/update-recovery.md b/app/sdks/0.6.2/console-web/docs/examples/account/update-recovery.md similarity index 100% rename from app/sdks/console-web/docs/examples/account/update-recovery.md rename to app/sdks/0.6.2/console-web/docs/examples/account/update-recovery.md diff --git a/app/sdks/console-web/docs/examples/account/update-verification.md b/app/sdks/0.6.2/console-web/docs/examples/account/update-verification.md similarity index 100% rename from app/sdks/console-web/docs/examples/account/update-verification.md rename to app/sdks/0.6.2/console-web/docs/examples/account/update-verification.md diff --git a/app/sdks/console-web/docs/examples/avatars/get-browser.md b/app/sdks/0.6.2/console-web/docs/examples/avatars/get-browser.md similarity index 100% rename from app/sdks/console-web/docs/examples/avatars/get-browser.md rename to app/sdks/0.6.2/console-web/docs/examples/avatars/get-browser.md diff --git a/app/sdks/console-web/docs/examples/avatars/get-credit-card.md b/app/sdks/0.6.2/console-web/docs/examples/avatars/get-credit-card.md similarity index 100% rename from app/sdks/console-web/docs/examples/avatars/get-credit-card.md rename to app/sdks/0.6.2/console-web/docs/examples/avatars/get-credit-card.md diff --git a/app/sdks/console-web/docs/examples/avatars/get-favicon.md b/app/sdks/0.6.2/console-web/docs/examples/avatars/get-favicon.md similarity index 100% rename from app/sdks/console-web/docs/examples/avatars/get-favicon.md rename to app/sdks/0.6.2/console-web/docs/examples/avatars/get-favicon.md diff --git a/app/sdks/console-web/docs/examples/avatars/get-flag.md b/app/sdks/0.6.2/console-web/docs/examples/avatars/get-flag.md similarity index 100% rename from app/sdks/console-web/docs/examples/avatars/get-flag.md rename to app/sdks/0.6.2/console-web/docs/examples/avatars/get-flag.md diff --git a/app/sdks/console-web/docs/examples/avatars/get-image.md b/app/sdks/0.6.2/console-web/docs/examples/avatars/get-image.md similarity index 100% rename from app/sdks/console-web/docs/examples/avatars/get-image.md rename to app/sdks/0.6.2/console-web/docs/examples/avatars/get-image.md diff --git a/app/sdks/console-web/docs/examples/avatars/get-initials.md b/app/sdks/0.6.2/console-web/docs/examples/avatars/get-initials.md similarity index 100% rename from app/sdks/console-web/docs/examples/avatars/get-initials.md rename to app/sdks/0.6.2/console-web/docs/examples/avatars/get-initials.md diff --git a/app/sdks/console-web/docs/examples/avatars/get-q-r.md b/app/sdks/0.6.2/console-web/docs/examples/avatars/get-q-r.md similarity index 100% rename from app/sdks/console-web/docs/examples/avatars/get-q-r.md rename to app/sdks/0.6.2/console-web/docs/examples/avatars/get-q-r.md diff --git a/app/sdks/console-web/docs/examples/bar/delete.md b/app/sdks/0.6.2/console-web/docs/examples/bar/delete.md similarity index 100% rename from app/sdks/console-web/docs/examples/bar/delete.md rename to app/sdks/0.6.2/console-web/docs/examples/bar/delete.md diff --git a/app/sdks/console-web/docs/examples/bar/get.md b/app/sdks/0.6.2/console-web/docs/examples/bar/get.md similarity index 100% rename from app/sdks/console-web/docs/examples/bar/get.md rename to app/sdks/0.6.2/console-web/docs/examples/bar/get.md diff --git a/app/sdks/console-web/docs/examples/bar/patch.md b/app/sdks/0.6.2/console-web/docs/examples/bar/patch.md similarity index 100% rename from app/sdks/console-web/docs/examples/bar/patch.md rename to app/sdks/0.6.2/console-web/docs/examples/bar/patch.md diff --git a/app/sdks/console-web/docs/examples/bar/post.md b/app/sdks/0.6.2/console-web/docs/examples/bar/post.md similarity index 100% rename from app/sdks/console-web/docs/examples/bar/post.md rename to app/sdks/0.6.2/console-web/docs/examples/bar/post.md diff --git a/app/sdks/console-web/docs/examples/bar/put.md b/app/sdks/0.6.2/console-web/docs/examples/bar/put.md similarity index 100% rename from app/sdks/console-web/docs/examples/bar/put.md rename to app/sdks/0.6.2/console-web/docs/examples/bar/put.md diff --git a/app/sdks/console-web/docs/examples/database/create-collection.md b/app/sdks/0.6.2/console-web/docs/examples/database/create-collection.md similarity index 100% rename from app/sdks/console-web/docs/examples/database/create-collection.md rename to app/sdks/0.6.2/console-web/docs/examples/database/create-collection.md diff --git a/app/sdks/console-web/docs/examples/database/create-document.md b/app/sdks/0.6.2/console-web/docs/examples/database/create-document.md similarity index 100% rename from app/sdks/console-web/docs/examples/database/create-document.md rename to app/sdks/0.6.2/console-web/docs/examples/database/create-document.md diff --git a/app/sdks/console-web/docs/examples/database/delete-collection.md b/app/sdks/0.6.2/console-web/docs/examples/database/delete-collection.md similarity index 100% rename from app/sdks/console-web/docs/examples/database/delete-collection.md rename to app/sdks/0.6.2/console-web/docs/examples/database/delete-collection.md diff --git a/app/sdks/console-web/docs/examples/database/delete-document.md b/app/sdks/0.6.2/console-web/docs/examples/database/delete-document.md similarity index 100% rename from app/sdks/console-web/docs/examples/database/delete-document.md rename to app/sdks/0.6.2/console-web/docs/examples/database/delete-document.md diff --git a/app/sdks/console-web/docs/examples/database/get-collection-logs.md b/app/sdks/0.6.2/console-web/docs/examples/database/get-collection-logs.md similarity index 100% rename from app/sdks/console-web/docs/examples/database/get-collection-logs.md rename to app/sdks/0.6.2/console-web/docs/examples/database/get-collection-logs.md diff --git a/app/sdks/console-web/docs/examples/database/get-collection.md b/app/sdks/0.6.2/console-web/docs/examples/database/get-collection.md similarity index 100% rename from app/sdks/console-web/docs/examples/database/get-collection.md rename to app/sdks/0.6.2/console-web/docs/examples/database/get-collection.md diff --git a/app/sdks/console-web/docs/examples/database/get-document.md b/app/sdks/0.6.2/console-web/docs/examples/database/get-document.md similarity index 100% rename from app/sdks/console-web/docs/examples/database/get-document.md rename to app/sdks/0.6.2/console-web/docs/examples/database/get-document.md diff --git a/app/sdks/console-web/docs/examples/database/list-collections.md b/app/sdks/0.6.2/console-web/docs/examples/database/list-collections.md similarity index 100% rename from app/sdks/console-web/docs/examples/database/list-collections.md rename to app/sdks/0.6.2/console-web/docs/examples/database/list-collections.md diff --git a/app/sdks/console-web/docs/examples/database/list-documents.md b/app/sdks/0.6.2/console-web/docs/examples/database/list-documents.md similarity index 100% rename from app/sdks/console-web/docs/examples/database/list-documents.md rename to app/sdks/0.6.2/console-web/docs/examples/database/list-documents.md diff --git a/app/sdks/console-web/docs/examples/database/update-collection.md b/app/sdks/0.6.2/console-web/docs/examples/database/update-collection.md similarity index 100% rename from app/sdks/console-web/docs/examples/database/update-collection.md rename to app/sdks/0.6.2/console-web/docs/examples/database/update-collection.md diff --git a/app/sdks/console-web/docs/examples/database/update-document.md b/app/sdks/0.6.2/console-web/docs/examples/database/update-document.md similarity index 100% rename from app/sdks/console-web/docs/examples/database/update-document.md rename to app/sdks/0.6.2/console-web/docs/examples/database/update-document.md diff --git a/app/sdks/console-web/docs/examples/foo/delete.md b/app/sdks/0.6.2/console-web/docs/examples/foo/delete.md similarity index 100% rename from app/sdks/console-web/docs/examples/foo/delete.md rename to app/sdks/0.6.2/console-web/docs/examples/foo/delete.md diff --git a/app/sdks/console-web/docs/examples/foo/get.md b/app/sdks/0.6.2/console-web/docs/examples/foo/get.md similarity index 100% rename from app/sdks/console-web/docs/examples/foo/get.md rename to app/sdks/0.6.2/console-web/docs/examples/foo/get.md diff --git a/app/sdks/console-web/docs/examples/foo/patch.md b/app/sdks/0.6.2/console-web/docs/examples/foo/patch.md similarity index 100% rename from app/sdks/console-web/docs/examples/foo/patch.md rename to app/sdks/0.6.2/console-web/docs/examples/foo/patch.md diff --git a/app/sdks/console-web/docs/examples/foo/post.md b/app/sdks/0.6.2/console-web/docs/examples/foo/post.md similarity index 100% rename from app/sdks/console-web/docs/examples/foo/post.md rename to app/sdks/0.6.2/console-web/docs/examples/foo/post.md diff --git a/app/sdks/console-web/docs/examples/foo/put.md b/app/sdks/0.6.2/console-web/docs/examples/foo/put.md similarity index 100% rename from app/sdks/console-web/docs/examples/foo/put.md rename to app/sdks/0.6.2/console-web/docs/examples/foo/put.md diff --git a/app/sdks/console-web/docs/examples/functions/create-execution.md b/app/sdks/0.6.2/console-web/docs/examples/functions/create-execution.md similarity index 100% rename from app/sdks/console-web/docs/examples/functions/create-execution.md rename to app/sdks/0.6.2/console-web/docs/examples/functions/create-execution.md diff --git a/app/sdks/console-web/docs/examples/functions/create-tag.md b/app/sdks/0.6.2/console-web/docs/examples/functions/create-tag.md similarity index 100% rename from app/sdks/console-web/docs/examples/functions/create-tag.md rename to app/sdks/0.6.2/console-web/docs/examples/functions/create-tag.md diff --git a/app/sdks/console-web/docs/examples/functions/create.md b/app/sdks/0.6.2/console-web/docs/examples/functions/create.md similarity index 100% rename from app/sdks/console-web/docs/examples/functions/create.md rename to app/sdks/0.6.2/console-web/docs/examples/functions/create.md diff --git a/app/sdks/console-web/docs/examples/functions/delete-tag.md b/app/sdks/0.6.2/console-web/docs/examples/functions/delete-tag.md similarity index 100% rename from app/sdks/console-web/docs/examples/functions/delete-tag.md rename to app/sdks/0.6.2/console-web/docs/examples/functions/delete-tag.md diff --git a/app/sdks/console-web/docs/examples/functions/delete.md b/app/sdks/0.6.2/console-web/docs/examples/functions/delete.md similarity index 100% rename from app/sdks/console-web/docs/examples/functions/delete.md rename to app/sdks/0.6.2/console-web/docs/examples/functions/delete.md diff --git a/app/sdks/console-web/docs/examples/functions/get-execution.md b/app/sdks/0.6.2/console-web/docs/examples/functions/get-execution.md similarity index 100% rename from app/sdks/console-web/docs/examples/functions/get-execution.md rename to app/sdks/0.6.2/console-web/docs/examples/functions/get-execution.md diff --git a/app/sdks/console-web/docs/examples/functions/get-tag.md b/app/sdks/0.6.2/console-web/docs/examples/functions/get-tag.md similarity index 100% rename from app/sdks/console-web/docs/examples/functions/get-tag.md rename to app/sdks/0.6.2/console-web/docs/examples/functions/get-tag.md diff --git a/app/sdks/console-web/docs/examples/functions/get.md b/app/sdks/0.6.2/console-web/docs/examples/functions/get.md similarity index 100% rename from app/sdks/console-web/docs/examples/functions/get.md rename to app/sdks/0.6.2/console-web/docs/examples/functions/get.md diff --git a/app/sdks/console-web/docs/examples/functions/list-executions.md b/app/sdks/0.6.2/console-web/docs/examples/functions/list-executions.md similarity index 100% rename from app/sdks/console-web/docs/examples/functions/list-executions.md rename to app/sdks/0.6.2/console-web/docs/examples/functions/list-executions.md diff --git a/app/sdks/console-web/docs/examples/functions/list-tags.md b/app/sdks/0.6.2/console-web/docs/examples/functions/list-tags.md similarity index 100% rename from app/sdks/console-web/docs/examples/functions/list-tags.md rename to app/sdks/0.6.2/console-web/docs/examples/functions/list-tags.md diff --git a/app/sdks/console-web/docs/examples/functions/list.md b/app/sdks/0.6.2/console-web/docs/examples/functions/list.md similarity index 100% rename from app/sdks/console-web/docs/examples/functions/list.md rename to app/sdks/0.6.2/console-web/docs/examples/functions/list.md diff --git a/app/sdks/console-web/docs/examples/functions/update-active.md b/app/sdks/0.6.2/console-web/docs/examples/functions/update-active.md similarity index 100% rename from app/sdks/console-web/docs/examples/functions/update-active.md rename to app/sdks/0.6.2/console-web/docs/examples/functions/update-active.md diff --git a/app/sdks/console-web/docs/examples/functions/update-tag.md b/app/sdks/0.6.2/console-web/docs/examples/functions/update-tag.md similarity index 100% rename from app/sdks/console-web/docs/examples/functions/update-tag.md rename to app/sdks/0.6.2/console-web/docs/examples/functions/update-tag.md diff --git a/app/sdks/console-web/docs/examples/functions/update.md b/app/sdks/0.6.2/console-web/docs/examples/functions/update.md similarity index 100% rename from app/sdks/console-web/docs/examples/functions/update.md rename to app/sdks/0.6.2/console-web/docs/examples/functions/update.md diff --git a/app/sdks/console-web/docs/examples/general/empty.md b/app/sdks/0.6.2/console-web/docs/examples/general/empty.md similarity index 100% rename from app/sdks/console-web/docs/examples/general/empty.md rename to app/sdks/0.6.2/console-web/docs/examples/general/empty.md diff --git a/app/sdks/console-web/docs/examples/general/get-cookie.md b/app/sdks/0.6.2/console-web/docs/examples/general/get-cookie.md similarity index 100% rename from app/sdks/console-web/docs/examples/general/get-cookie.md rename to app/sdks/0.6.2/console-web/docs/examples/general/get-cookie.md diff --git a/app/sdks/console-web/docs/examples/general/redirect.md b/app/sdks/0.6.2/console-web/docs/examples/general/redirect.md similarity index 100% rename from app/sdks/console-web/docs/examples/general/redirect.md rename to app/sdks/0.6.2/console-web/docs/examples/general/redirect.md diff --git a/app/sdks/console-web/docs/examples/general/redirected.md b/app/sdks/0.6.2/console-web/docs/examples/general/redirected.md similarity index 100% rename from app/sdks/console-web/docs/examples/general/redirected.md rename to app/sdks/0.6.2/console-web/docs/examples/general/redirected.md diff --git a/app/sdks/console-web/docs/examples/general/set-cookie.md b/app/sdks/0.6.2/console-web/docs/examples/general/set-cookie.md similarity index 100% rename from app/sdks/console-web/docs/examples/general/set-cookie.md rename to app/sdks/0.6.2/console-web/docs/examples/general/set-cookie.md diff --git a/app/sdks/console-web/docs/examples/general/upload.md b/app/sdks/0.6.2/console-web/docs/examples/general/upload.md similarity index 100% rename from app/sdks/console-web/docs/examples/general/upload.md rename to app/sdks/0.6.2/console-web/docs/examples/general/upload.md diff --git a/app/sdks/console-web/docs/examples/health/get-anti-virus.md b/app/sdks/0.6.2/console-web/docs/examples/health/get-anti-virus.md similarity index 100% rename from app/sdks/console-web/docs/examples/health/get-anti-virus.md rename to app/sdks/0.6.2/console-web/docs/examples/health/get-anti-virus.md diff --git a/app/sdks/console-web/docs/examples/health/get-cache.md b/app/sdks/0.6.2/console-web/docs/examples/health/get-cache.md similarity index 100% rename from app/sdks/console-web/docs/examples/health/get-cache.md rename to app/sdks/0.6.2/console-web/docs/examples/health/get-cache.md diff --git a/app/sdks/console-web/docs/examples/health/get-d-b.md b/app/sdks/0.6.2/console-web/docs/examples/health/get-d-b.md similarity index 100% rename from app/sdks/console-web/docs/examples/health/get-d-b.md rename to app/sdks/0.6.2/console-web/docs/examples/health/get-d-b.md diff --git a/app/sdks/console-web/docs/examples/health/get-queue-certificates.md b/app/sdks/0.6.2/console-web/docs/examples/health/get-queue-certificates.md similarity index 100% rename from app/sdks/console-web/docs/examples/health/get-queue-certificates.md rename to app/sdks/0.6.2/console-web/docs/examples/health/get-queue-certificates.md diff --git a/app/sdks/console-web/docs/examples/health/get-queue-functions.md b/app/sdks/0.6.2/console-web/docs/examples/health/get-queue-functions.md similarity index 100% rename from app/sdks/console-web/docs/examples/health/get-queue-functions.md rename to app/sdks/0.6.2/console-web/docs/examples/health/get-queue-functions.md diff --git a/app/sdks/console-web/docs/examples/health/get-queue-logs.md b/app/sdks/0.6.2/console-web/docs/examples/health/get-queue-logs.md similarity index 100% rename from app/sdks/console-web/docs/examples/health/get-queue-logs.md rename to app/sdks/0.6.2/console-web/docs/examples/health/get-queue-logs.md diff --git a/app/sdks/console-web/docs/examples/health/get-queue-tasks.md b/app/sdks/0.6.2/console-web/docs/examples/health/get-queue-tasks.md similarity index 100% rename from app/sdks/console-web/docs/examples/health/get-queue-tasks.md rename to app/sdks/0.6.2/console-web/docs/examples/health/get-queue-tasks.md diff --git a/app/sdks/console-web/docs/examples/health/get-queue-usage.md b/app/sdks/0.6.2/console-web/docs/examples/health/get-queue-usage.md similarity index 100% rename from app/sdks/console-web/docs/examples/health/get-queue-usage.md rename to app/sdks/0.6.2/console-web/docs/examples/health/get-queue-usage.md diff --git a/app/sdks/console-web/docs/examples/health/get-queue-webhooks.md b/app/sdks/0.6.2/console-web/docs/examples/health/get-queue-webhooks.md similarity index 100% rename from app/sdks/console-web/docs/examples/health/get-queue-webhooks.md rename to app/sdks/0.6.2/console-web/docs/examples/health/get-queue-webhooks.md diff --git a/app/sdks/console-web/docs/examples/health/get-storage-local.md b/app/sdks/0.6.2/console-web/docs/examples/health/get-storage-local.md similarity index 100% rename from app/sdks/console-web/docs/examples/health/get-storage-local.md rename to app/sdks/0.6.2/console-web/docs/examples/health/get-storage-local.md diff --git a/app/sdks/console-web/docs/examples/health/get-time.md b/app/sdks/0.6.2/console-web/docs/examples/health/get-time.md similarity index 100% rename from app/sdks/console-web/docs/examples/health/get-time.md rename to app/sdks/0.6.2/console-web/docs/examples/health/get-time.md diff --git a/app/sdks/console-web/docs/examples/health/get.md b/app/sdks/0.6.2/console-web/docs/examples/health/get.md similarity index 100% rename from app/sdks/console-web/docs/examples/health/get.md rename to app/sdks/0.6.2/console-web/docs/examples/health/get.md diff --git a/app/sdks/console-web/docs/examples/locale/get-continents.md b/app/sdks/0.6.2/console-web/docs/examples/locale/get-continents.md similarity index 100% rename from app/sdks/console-web/docs/examples/locale/get-continents.md rename to app/sdks/0.6.2/console-web/docs/examples/locale/get-continents.md diff --git a/app/sdks/console-web/docs/examples/locale/get-countries-e-u.md b/app/sdks/0.6.2/console-web/docs/examples/locale/get-countries-e-u.md similarity index 100% rename from app/sdks/console-web/docs/examples/locale/get-countries-e-u.md rename to app/sdks/0.6.2/console-web/docs/examples/locale/get-countries-e-u.md diff --git a/app/sdks/console-web/docs/examples/locale/get-countries-phones.md b/app/sdks/0.6.2/console-web/docs/examples/locale/get-countries-phones.md similarity index 100% rename from app/sdks/console-web/docs/examples/locale/get-countries-phones.md rename to app/sdks/0.6.2/console-web/docs/examples/locale/get-countries-phones.md diff --git a/app/sdks/console-web/docs/examples/locale/get-countries.md b/app/sdks/0.6.2/console-web/docs/examples/locale/get-countries.md similarity index 100% rename from app/sdks/console-web/docs/examples/locale/get-countries.md rename to app/sdks/0.6.2/console-web/docs/examples/locale/get-countries.md diff --git a/app/sdks/console-web/docs/examples/locale/get-currencies.md b/app/sdks/0.6.2/console-web/docs/examples/locale/get-currencies.md similarity index 100% rename from app/sdks/console-web/docs/examples/locale/get-currencies.md rename to app/sdks/0.6.2/console-web/docs/examples/locale/get-currencies.md diff --git a/app/sdks/console-web/docs/examples/locale/get-languages.md b/app/sdks/0.6.2/console-web/docs/examples/locale/get-languages.md similarity index 100% rename from app/sdks/console-web/docs/examples/locale/get-languages.md rename to app/sdks/0.6.2/console-web/docs/examples/locale/get-languages.md diff --git a/app/sdks/console-web/docs/examples/locale/get.md b/app/sdks/0.6.2/console-web/docs/examples/locale/get.md similarity index 100% rename from app/sdks/console-web/docs/examples/locale/get.md rename to app/sdks/0.6.2/console-web/docs/examples/locale/get.md diff --git a/app/sdks/console-web/docs/examples/projects/create-domain.md b/app/sdks/0.6.2/console-web/docs/examples/projects/create-domain.md similarity index 100% rename from app/sdks/console-web/docs/examples/projects/create-domain.md rename to app/sdks/0.6.2/console-web/docs/examples/projects/create-domain.md diff --git a/app/sdks/console-web/docs/examples/projects/create-key.md b/app/sdks/0.6.2/console-web/docs/examples/projects/create-key.md similarity index 100% rename from app/sdks/console-web/docs/examples/projects/create-key.md rename to app/sdks/0.6.2/console-web/docs/examples/projects/create-key.md diff --git a/app/sdks/console-web/docs/examples/projects/create-platform.md b/app/sdks/0.6.2/console-web/docs/examples/projects/create-platform.md similarity index 100% rename from app/sdks/console-web/docs/examples/projects/create-platform.md rename to app/sdks/0.6.2/console-web/docs/examples/projects/create-platform.md diff --git a/app/sdks/console-web/docs/examples/projects/create-task.md b/app/sdks/0.6.2/console-web/docs/examples/projects/create-task.md similarity index 100% rename from app/sdks/console-web/docs/examples/projects/create-task.md rename to app/sdks/0.6.2/console-web/docs/examples/projects/create-task.md diff --git a/app/sdks/console-web/docs/examples/projects/create-webhook.md b/app/sdks/0.6.2/console-web/docs/examples/projects/create-webhook.md similarity index 100% rename from app/sdks/console-web/docs/examples/projects/create-webhook.md rename to app/sdks/0.6.2/console-web/docs/examples/projects/create-webhook.md diff --git a/app/sdks/console-web/docs/examples/projects/create.md b/app/sdks/0.6.2/console-web/docs/examples/projects/create.md similarity index 100% rename from app/sdks/console-web/docs/examples/projects/create.md rename to app/sdks/0.6.2/console-web/docs/examples/projects/create.md diff --git a/app/sdks/console-web/docs/examples/projects/delete-domain.md b/app/sdks/0.6.2/console-web/docs/examples/projects/delete-domain.md similarity index 100% rename from app/sdks/console-web/docs/examples/projects/delete-domain.md rename to app/sdks/0.6.2/console-web/docs/examples/projects/delete-domain.md diff --git a/app/sdks/console-web/docs/examples/projects/delete-key.md b/app/sdks/0.6.2/console-web/docs/examples/projects/delete-key.md similarity index 100% rename from app/sdks/console-web/docs/examples/projects/delete-key.md rename to app/sdks/0.6.2/console-web/docs/examples/projects/delete-key.md diff --git a/app/sdks/console-web/docs/examples/projects/delete-platform.md b/app/sdks/0.6.2/console-web/docs/examples/projects/delete-platform.md similarity index 100% rename from app/sdks/console-web/docs/examples/projects/delete-platform.md rename to app/sdks/0.6.2/console-web/docs/examples/projects/delete-platform.md diff --git a/app/sdks/console-web/docs/examples/projects/delete-task.md b/app/sdks/0.6.2/console-web/docs/examples/projects/delete-task.md similarity index 100% rename from app/sdks/console-web/docs/examples/projects/delete-task.md rename to app/sdks/0.6.2/console-web/docs/examples/projects/delete-task.md diff --git a/app/sdks/console-web/docs/examples/projects/delete-webhook.md b/app/sdks/0.6.2/console-web/docs/examples/projects/delete-webhook.md similarity index 100% rename from app/sdks/console-web/docs/examples/projects/delete-webhook.md rename to app/sdks/0.6.2/console-web/docs/examples/projects/delete-webhook.md diff --git a/app/sdks/console-web/docs/examples/projects/delete.md b/app/sdks/0.6.2/console-web/docs/examples/projects/delete.md similarity index 100% rename from app/sdks/console-web/docs/examples/projects/delete.md rename to app/sdks/0.6.2/console-web/docs/examples/projects/delete.md diff --git a/app/sdks/console-web/docs/examples/projects/get-domain.md b/app/sdks/0.6.2/console-web/docs/examples/projects/get-domain.md similarity index 100% rename from app/sdks/console-web/docs/examples/projects/get-domain.md rename to app/sdks/0.6.2/console-web/docs/examples/projects/get-domain.md diff --git a/app/sdks/console-web/docs/examples/projects/get-key.md b/app/sdks/0.6.2/console-web/docs/examples/projects/get-key.md similarity index 100% rename from app/sdks/console-web/docs/examples/projects/get-key.md rename to app/sdks/0.6.2/console-web/docs/examples/projects/get-key.md diff --git a/app/sdks/console-web/docs/examples/projects/get-platform.md b/app/sdks/0.6.2/console-web/docs/examples/projects/get-platform.md similarity index 100% rename from app/sdks/console-web/docs/examples/projects/get-platform.md rename to app/sdks/0.6.2/console-web/docs/examples/projects/get-platform.md diff --git a/app/sdks/console-web/docs/examples/projects/get-task.md b/app/sdks/0.6.2/console-web/docs/examples/projects/get-task.md similarity index 100% rename from app/sdks/console-web/docs/examples/projects/get-task.md rename to app/sdks/0.6.2/console-web/docs/examples/projects/get-task.md diff --git a/app/sdks/console-web/docs/examples/projects/get-usage.md b/app/sdks/0.6.2/console-web/docs/examples/projects/get-usage.md similarity index 100% rename from app/sdks/console-web/docs/examples/projects/get-usage.md rename to app/sdks/0.6.2/console-web/docs/examples/projects/get-usage.md diff --git a/app/sdks/console-web/docs/examples/projects/get-webhook.md b/app/sdks/0.6.2/console-web/docs/examples/projects/get-webhook.md similarity index 100% rename from app/sdks/console-web/docs/examples/projects/get-webhook.md rename to app/sdks/0.6.2/console-web/docs/examples/projects/get-webhook.md diff --git a/app/sdks/console-web/docs/examples/projects/get.md b/app/sdks/0.6.2/console-web/docs/examples/projects/get.md similarity index 100% rename from app/sdks/console-web/docs/examples/projects/get.md rename to app/sdks/0.6.2/console-web/docs/examples/projects/get.md diff --git a/app/sdks/console-web/docs/examples/projects/list-domains.md b/app/sdks/0.6.2/console-web/docs/examples/projects/list-domains.md similarity index 100% rename from app/sdks/console-web/docs/examples/projects/list-domains.md rename to app/sdks/0.6.2/console-web/docs/examples/projects/list-domains.md diff --git a/app/sdks/console-web/docs/examples/projects/list-keys.md b/app/sdks/0.6.2/console-web/docs/examples/projects/list-keys.md similarity index 100% rename from app/sdks/console-web/docs/examples/projects/list-keys.md rename to app/sdks/0.6.2/console-web/docs/examples/projects/list-keys.md diff --git a/app/sdks/console-web/docs/examples/projects/list-platforms.md b/app/sdks/0.6.2/console-web/docs/examples/projects/list-platforms.md similarity index 100% rename from app/sdks/console-web/docs/examples/projects/list-platforms.md rename to app/sdks/0.6.2/console-web/docs/examples/projects/list-platforms.md diff --git a/app/sdks/console-web/docs/examples/projects/list-tasks.md b/app/sdks/0.6.2/console-web/docs/examples/projects/list-tasks.md similarity index 100% rename from app/sdks/console-web/docs/examples/projects/list-tasks.md rename to app/sdks/0.6.2/console-web/docs/examples/projects/list-tasks.md diff --git a/app/sdks/console-web/docs/examples/projects/list-webhooks.md b/app/sdks/0.6.2/console-web/docs/examples/projects/list-webhooks.md similarity index 100% rename from app/sdks/console-web/docs/examples/projects/list-webhooks.md rename to app/sdks/0.6.2/console-web/docs/examples/projects/list-webhooks.md diff --git a/app/sdks/console-web/docs/examples/projects/list.md b/app/sdks/0.6.2/console-web/docs/examples/projects/list.md similarity index 100% rename from app/sdks/console-web/docs/examples/projects/list.md rename to app/sdks/0.6.2/console-web/docs/examples/projects/list.md diff --git a/app/sdks/console-web/docs/examples/projects/update-domain-verification.md b/app/sdks/0.6.2/console-web/docs/examples/projects/update-domain-verification.md similarity index 100% rename from app/sdks/console-web/docs/examples/projects/update-domain-verification.md rename to app/sdks/0.6.2/console-web/docs/examples/projects/update-domain-verification.md diff --git a/app/sdks/console-web/docs/examples/projects/update-key.md b/app/sdks/0.6.2/console-web/docs/examples/projects/update-key.md similarity index 100% rename from app/sdks/console-web/docs/examples/projects/update-key.md rename to app/sdks/0.6.2/console-web/docs/examples/projects/update-key.md diff --git a/app/sdks/console-web/docs/examples/projects/update-o-auth2.md b/app/sdks/0.6.2/console-web/docs/examples/projects/update-o-auth2.md similarity index 100% rename from app/sdks/console-web/docs/examples/projects/update-o-auth2.md rename to app/sdks/0.6.2/console-web/docs/examples/projects/update-o-auth2.md diff --git a/app/sdks/console-web/docs/examples/projects/update-platform.md b/app/sdks/0.6.2/console-web/docs/examples/projects/update-platform.md similarity index 100% rename from app/sdks/console-web/docs/examples/projects/update-platform.md rename to app/sdks/0.6.2/console-web/docs/examples/projects/update-platform.md diff --git a/app/sdks/console-web/docs/examples/projects/update-task.md b/app/sdks/0.6.2/console-web/docs/examples/projects/update-task.md similarity index 100% rename from app/sdks/console-web/docs/examples/projects/update-task.md rename to app/sdks/0.6.2/console-web/docs/examples/projects/update-task.md diff --git a/app/sdks/console-web/docs/examples/projects/update-webhook.md b/app/sdks/0.6.2/console-web/docs/examples/projects/update-webhook.md similarity index 100% rename from app/sdks/console-web/docs/examples/projects/update-webhook.md rename to app/sdks/0.6.2/console-web/docs/examples/projects/update-webhook.md diff --git a/app/sdks/console-web/docs/examples/projects/update.md b/app/sdks/0.6.2/console-web/docs/examples/projects/update.md similarity index 100% rename from app/sdks/console-web/docs/examples/projects/update.md rename to app/sdks/0.6.2/console-web/docs/examples/projects/update.md diff --git a/app/sdks/console-web/docs/examples/storage/create-file.md b/app/sdks/0.6.2/console-web/docs/examples/storage/create-file.md similarity index 100% rename from app/sdks/console-web/docs/examples/storage/create-file.md rename to app/sdks/0.6.2/console-web/docs/examples/storage/create-file.md diff --git a/app/sdks/console-web/docs/examples/storage/delete-file.md b/app/sdks/0.6.2/console-web/docs/examples/storage/delete-file.md similarity index 100% rename from app/sdks/console-web/docs/examples/storage/delete-file.md rename to app/sdks/0.6.2/console-web/docs/examples/storage/delete-file.md diff --git a/app/sdks/console-web/docs/examples/storage/get-file-download.md b/app/sdks/0.6.2/console-web/docs/examples/storage/get-file-download.md similarity index 100% rename from app/sdks/console-web/docs/examples/storage/get-file-download.md rename to app/sdks/0.6.2/console-web/docs/examples/storage/get-file-download.md diff --git a/app/sdks/console-web/docs/examples/storage/get-file-preview.md b/app/sdks/0.6.2/console-web/docs/examples/storage/get-file-preview.md similarity index 100% rename from app/sdks/console-web/docs/examples/storage/get-file-preview.md rename to app/sdks/0.6.2/console-web/docs/examples/storage/get-file-preview.md diff --git a/app/sdks/console-web/docs/examples/storage/get-file-view.md b/app/sdks/0.6.2/console-web/docs/examples/storage/get-file-view.md similarity index 100% rename from app/sdks/console-web/docs/examples/storage/get-file-view.md rename to app/sdks/0.6.2/console-web/docs/examples/storage/get-file-view.md diff --git a/app/sdks/console-web/docs/examples/storage/get-file.md b/app/sdks/0.6.2/console-web/docs/examples/storage/get-file.md similarity index 100% rename from app/sdks/console-web/docs/examples/storage/get-file.md rename to app/sdks/0.6.2/console-web/docs/examples/storage/get-file.md diff --git a/app/sdks/console-web/docs/examples/storage/list-files.md b/app/sdks/0.6.2/console-web/docs/examples/storage/list-files.md similarity index 100% rename from app/sdks/console-web/docs/examples/storage/list-files.md rename to app/sdks/0.6.2/console-web/docs/examples/storage/list-files.md diff --git a/app/sdks/console-web/docs/examples/storage/update-file.md b/app/sdks/0.6.2/console-web/docs/examples/storage/update-file.md similarity index 100% rename from app/sdks/console-web/docs/examples/storage/update-file.md rename to app/sdks/0.6.2/console-web/docs/examples/storage/update-file.md diff --git a/app/sdks/console-web/docs/examples/teams/create-membership.md b/app/sdks/0.6.2/console-web/docs/examples/teams/create-membership.md similarity index 100% rename from app/sdks/console-web/docs/examples/teams/create-membership.md rename to app/sdks/0.6.2/console-web/docs/examples/teams/create-membership.md diff --git a/app/sdks/console-web/docs/examples/teams/create.md b/app/sdks/0.6.2/console-web/docs/examples/teams/create.md similarity index 100% rename from app/sdks/console-web/docs/examples/teams/create.md rename to app/sdks/0.6.2/console-web/docs/examples/teams/create.md diff --git a/app/sdks/console-web/docs/examples/teams/delete-membership.md b/app/sdks/0.6.2/console-web/docs/examples/teams/delete-membership.md similarity index 100% rename from app/sdks/console-web/docs/examples/teams/delete-membership.md rename to app/sdks/0.6.2/console-web/docs/examples/teams/delete-membership.md diff --git a/app/sdks/console-web/docs/examples/teams/delete.md b/app/sdks/0.6.2/console-web/docs/examples/teams/delete.md similarity index 100% rename from app/sdks/console-web/docs/examples/teams/delete.md rename to app/sdks/0.6.2/console-web/docs/examples/teams/delete.md diff --git a/app/sdks/console-web/docs/examples/teams/get-memberships.md b/app/sdks/0.6.2/console-web/docs/examples/teams/get-memberships.md similarity index 100% rename from app/sdks/console-web/docs/examples/teams/get-memberships.md rename to app/sdks/0.6.2/console-web/docs/examples/teams/get-memberships.md diff --git a/app/sdks/console-web/docs/examples/teams/get.md b/app/sdks/0.6.2/console-web/docs/examples/teams/get.md similarity index 100% rename from app/sdks/console-web/docs/examples/teams/get.md rename to app/sdks/0.6.2/console-web/docs/examples/teams/get.md diff --git a/app/sdks/console-web/docs/examples/teams/list.md b/app/sdks/0.6.2/console-web/docs/examples/teams/list.md similarity index 100% rename from app/sdks/console-web/docs/examples/teams/list.md rename to app/sdks/0.6.2/console-web/docs/examples/teams/list.md diff --git a/app/sdks/console-web/docs/examples/teams/update-membership-status.md b/app/sdks/0.6.2/console-web/docs/examples/teams/update-membership-status.md similarity index 100% rename from app/sdks/console-web/docs/examples/teams/update-membership-status.md rename to app/sdks/0.6.2/console-web/docs/examples/teams/update-membership-status.md diff --git a/app/sdks/console-web/docs/examples/teams/update.md b/app/sdks/0.6.2/console-web/docs/examples/teams/update.md similarity index 100% rename from app/sdks/console-web/docs/examples/teams/update.md rename to app/sdks/0.6.2/console-web/docs/examples/teams/update.md diff --git a/app/sdks/console-web/docs/examples/users/create.md b/app/sdks/0.6.2/console-web/docs/examples/users/create.md similarity index 100% rename from app/sdks/console-web/docs/examples/users/create.md rename to app/sdks/0.6.2/console-web/docs/examples/users/create.md diff --git a/app/sdks/console-web/docs/examples/users/delete-session.md b/app/sdks/0.6.2/console-web/docs/examples/users/delete-session.md similarity index 100% rename from app/sdks/console-web/docs/examples/users/delete-session.md rename to app/sdks/0.6.2/console-web/docs/examples/users/delete-session.md diff --git a/app/sdks/console-web/docs/examples/users/delete-sessions.md b/app/sdks/0.6.2/console-web/docs/examples/users/delete-sessions.md similarity index 100% rename from app/sdks/console-web/docs/examples/users/delete-sessions.md rename to app/sdks/0.6.2/console-web/docs/examples/users/delete-sessions.md diff --git a/app/sdks/console-web/docs/examples/users/delete-user.md b/app/sdks/0.6.2/console-web/docs/examples/users/delete-user.md similarity index 100% rename from app/sdks/console-web/docs/examples/users/delete-user.md rename to app/sdks/0.6.2/console-web/docs/examples/users/delete-user.md diff --git a/app/sdks/console-web/docs/examples/users/get-logs.md b/app/sdks/0.6.2/console-web/docs/examples/users/get-logs.md similarity index 100% rename from app/sdks/console-web/docs/examples/users/get-logs.md rename to app/sdks/0.6.2/console-web/docs/examples/users/get-logs.md diff --git a/app/sdks/console-web/docs/examples/users/get-prefs.md b/app/sdks/0.6.2/console-web/docs/examples/users/get-prefs.md similarity index 100% rename from app/sdks/console-web/docs/examples/users/get-prefs.md rename to app/sdks/0.6.2/console-web/docs/examples/users/get-prefs.md diff --git a/app/sdks/console-web/docs/examples/users/get-sessions.md b/app/sdks/0.6.2/console-web/docs/examples/users/get-sessions.md similarity index 100% rename from app/sdks/console-web/docs/examples/users/get-sessions.md rename to app/sdks/0.6.2/console-web/docs/examples/users/get-sessions.md diff --git a/app/sdks/console-web/docs/examples/users/get.md b/app/sdks/0.6.2/console-web/docs/examples/users/get.md similarity index 100% rename from app/sdks/console-web/docs/examples/users/get.md rename to app/sdks/0.6.2/console-web/docs/examples/users/get.md diff --git a/app/sdks/console-web/docs/examples/users/list.md b/app/sdks/0.6.2/console-web/docs/examples/users/list.md similarity index 100% rename from app/sdks/console-web/docs/examples/users/list.md rename to app/sdks/0.6.2/console-web/docs/examples/users/list.md diff --git a/app/sdks/console-web/docs/examples/users/update-prefs.md b/app/sdks/0.6.2/console-web/docs/examples/users/update-prefs.md similarity index 100% rename from app/sdks/console-web/docs/examples/users/update-prefs.md rename to app/sdks/0.6.2/console-web/docs/examples/users/update-prefs.md diff --git a/app/sdks/console-web/docs/examples/users/update-status.md b/app/sdks/0.6.2/console-web/docs/examples/users/update-status.md similarity index 100% rename from app/sdks/console-web/docs/examples/users/update-status.md rename to app/sdks/0.6.2/console-web/docs/examples/users/update-status.md diff --git a/app/sdks/console-web/package.json b/app/sdks/0.6.2/console-web/package.json similarity index 100% rename from app/sdks/console-web/package.json rename to app/sdks/0.6.2/console-web/package.json diff --git a/app/sdks/console-web/src/sdk.js b/app/sdks/0.6.2/console-web/src/sdk.js similarity index 100% rename from app/sdks/console-web/src/sdk.js rename to app/sdks/0.6.2/console-web/src/sdk.js diff --git a/app/sdks/console-web/src/sdk.min.js b/app/sdks/0.6.2/console-web/src/sdk.min.js similarity index 100% rename from app/sdks/console-web/src/sdk.min.js rename to app/sdks/0.6.2/console-web/src/sdk.min.js diff --git a/app/sdks/console-web/tsconfig.json b/app/sdks/0.6.2/console-web/tsconfig.json similarity index 100% rename from app/sdks/console-web/tsconfig.json rename to app/sdks/0.6.2/console-web/tsconfig.json diff --git a/app/sdks/console-web/types/index.d.ts b/app/sdks/0.6.2/console-web/types/index.d.ts similarity index 100% rename from app/sdks/console-web/types/index.d.ts rename to app/sdks/0.6.2/console-web/types/index.d.ts diff --git a/app/sdks/server-deno/CHANGELOG.md b/app/sdks/0.6.2/server-deno/CHANGELOG.md similarity index 100% rename from app/sdks/server-deno/CHANGELOG.md rename to app/sdks/0.6.2/server-deno/CHANGELOG.md diff --git a/app/sdks/server-deno/LICENSE b/app/sdks/0.6.2/server-deno/LICENSE similarity index 100% rename from app/sdks/server-deno/LICENSE rename to app/sdks/0.6.2/server-deno/LICENSE diff --git a/app/sdks/server-deno/README.md b/app/sdks/0.6.2/server-deno/README.md similarity index 100% rename from app/sdks/server-deno/README.md rename to app/sdks/0.6.2/server-deno/README.md diff --git a/app/sdks/server-deno/docs/examples/avatars/get-browser.md b/app/sdks/0.6.2/server-deno/docs/examples/avatars/get-browser.md similarity index 100% rename from app/sdks/server-deno/docs/examples/avatars/get-browser.md rename to app/sdks/0.6.2/server-deno/docs/examples/avatars/get-browser.md diff --git a/app/sdks/server-deno/docs/examples/avatars/get-credit-card.md b/app/sdks/0.6.2/server-deno/docs/examples/avatars/get-credit-card.md similarity index 100% rename from app/sdks/server-deno/docs/examples/avatars/get-credit-card.md rename to app/sdks/0.6.2/server-deno/docs/examples/avatars/get-credit-card.md diff --git a/app/sdks/server-deno/docs/examples/avatars/get-favicon.md b/app/sdks/0.6.2/server-deno/docs/examples/avatars/get-favicon.md similarity index 100% rename from app/sdks/server-deno/docs/examples/avatars/get-favicon.md rename to app/sdks/0.6.2/server-deno/docs/examples/avatars/get-favicon.md diff --git a/app/sdks/server-deno/docs/examples/avatars/get-flag.md b/app/sdks/0.6.2/server-deno/docs/examples/avatars/get-flag.md similarity index 100% rename from app/sdks/server-deno/docs/examples/avatars/get-flag.md rename to app/sdks/0.6.2/server-deno/docs/examples/avatars/get-flag.md diff --git a/app/sdks/server-deno/docs/examples/avatars/get-image.md b/app/sdks/0.6.2/server-deno/docs/examples/avatars/get-image.md similarity index 100% rename from app/sdks/server-deno/docs/examples/avatars/get-image.md rename to app/sdks/0.6.2/server-deno/docs/examples/avatars/get-image.md diff --git a/app/sdks/server-deno/docs/examples/avatars/get-q-r.md b/app/sdks/0.6.2/server-deno/docs/examples/avatars/get-q-r.md similarity index 100% rename from app/sdks/server-deno/docs/examples/avatars/get-q-r.md rename to app/sdks/0.6.2/server-deno/docs/examples/avatars/get-q-r.md diff --git a/app/sdks/server-deno/docs/examples/database/create-collection.md b/app/sdks/0.6.2/server-deno/docs/examples/database/create-collection.md similarity index 100% rename from app/sdks/server-deno/docs/examples/database/create-collection.md rename to app/sdks/0.6.2/server-deno/docs/examples/database/create-collection.md diff --git a/app/sdks/server-deno/docs/examples/database/create-document.md b/app/sdks/0.6.2/server-deno/docs/examples/database/create-document.md similarity index 100% rename from app/sdks/server-deno/docs/examples/database/create-document.md rename to app/sdks/0.6.2/server-deno/docs/examples/database/create-document.md diff --git a/app/sdks/server-deno/docs/examples/database/delete-collection.md b/app/sdks/0.6.2/server-deno/docs/examples/database/delete-collection.md similarity index 100% rename from app/sdks/server-deno/docs/examples/database/delete-collection.md rename to app/sdks/0.6.2/server-deno/docs/examples/database/delete-collection.md diff --git a/app/sdks/server-deno/docs/examples/database/delete-document.md b/app/sdks/0.6.2/server-deno/docs/examples/database/delete-document.md similarity index 100% rename from app/sdks/server-deno/docs/examples/database/delete-document.md rename to app/sdks/0.6.2/server-deno/docs/examples/database/delete-document.md diff --git a/app/sdks/server-deno/docs/examples/database/get-collection-logs.md b/app/sdks/0.6.2/server-deno/docs/examples/database/get-collection-logs.md similarity index 100% rename from app/sdks/server-deno/docs/examples/database/get-collection-logs.md rename to app/sdks/0.6.2/server-deno/docs/examples/database/get-collection-logs.md diff --git a/app/sdks/server-deno/docs/examples/database/get-collection.md b/app/sdks/0.6.2/server-deno/docs/examples/database/get-collection.md similarity index 100% rename from app/sdks/server-deno/docs/examples/database/get-collection.md rename to app/sdks/0.6.2/server-deno/docs/examples/database/get-collection.md diff --git a/app/sdks/server-deno/docs/examples/database/get-document.md b/app/sdks/0.6.2/server-deno/docs/examples/database/get-document.md similarity index 100% rename from app/sdks/server-deno/docs/examples/database/get-document.md rename to app/sdks/0.6.2/server-deno/docs/examples/database/get-document.md diff --git a/app/sdks/server-deno/docs/examples/database/list-collections.md b/app/sdks/0.6.2/server-deno/docs/examples/database/list-collections.md similarity index 100% rename from app/sdks/server-deno/docs/examples/database/list-collections.md rename to app/sdks/0.6.2/server-deno/docs/examples/database/list-collections.md diff --git a/app/sdks/server-deno/docs/examples/database/list-documents.md b/app/sdks/0.6.2/server-deno/docs/examples/database/list-documents.md similarity index 100% rename from app/sdks/server-deno/docs/examples/database/list-documents.md rename to app/sdks/0.6.2/server-deno/docs/examples/database/list-documents.md diff --git a/app/sdks/server-deno/docs/examples/database/update-collection.md b/app/sdks/0.6.2/server-deno/docs/examples/database/update-collection.md similarity index 100% rename from app/sdks/server-deno/docs/examples/database/update-collection.md rename to app/sdks/0.6.2/server-deno/docs/examples/database/update-collection.md diff --git a/app/sdks/server-deno/docs/examples/database/update-document.md b/app/sdks/0.6.2/server-deno/docs/examples/database/update-document.md similarity index 100% rename from app/sdks/server-deno/docs/examples/database/update-document.md rename to app/sdks/0.6.2/server-deno/docs/examples/database/update-document.md diff --git a/app/sdks/server-deno/docs/examples/health/get-anti-virus.md b/app/sdks/0.6.2/server-deno/docs/examples/health/get-anti-virus.md similarity index 100% rename from app/sdks/server-deno/docs/examples/health/get-anti-virus.md rename to app/sdks/0.6.2/server-deno/docs/examples/health/get-anti-virus.md diff --git a/app/sdks/server-deno/docs/examples/health/get-cache.md b/app/sdks/0.6.2/server-deno/docs/examples/health/get-cache.md similarity index 100% rename from app/sdks/server-deno/docs/examples/health/get-cache.md rename to app/sdks/0.6.2/server-deno/docs/examples/health/get-cache.md diff --git a/app/sdks/server-deno/docs/examples/health/get-d-b.md b/app/sdks/0.6.2/server-deno/docs/examples/health/get-d-b.md similarity index 100% rename from app/sdks/server-deno/docs/examples/health/get-d-b.md rename to app/sdks/0.6.2/server-deno/docs/examples/health/get-d-b.md diff --git a/app/sdks/server-deno/docs/examples/health/get-queue-certificates.md b/app/sdks/0.6.2/server-deno/docs/examples/health/get-queue-certificates.md similarity index 100% rename from app/sdks/server-deno/docs/examples/health/get-queue-certificates.md rename to app/sdks/0.6.2/server-deno/docs/examples/health/get-queue-certificates.md diff --git a/app/sdks/server-deno/docs/examples/health/get-queue-functions.md b/app/sdks/0.6.2/server-deno/docs/examples/health/get-queue-functions.md similarity index 100% rename from app/sdks/server-deno/docs/examples/health/get-queue-functions.md rename to app/sdks/0.6.2/server-deno/docs/examples/health/get-queue-functions.md diff --git a/app/sdks/server-deno/docs/examples/health/get-queue-logs.md b/app/sdks/0.6.2/server-deno/docs/examples/health/get-queue-logs.md similarity index 100% rename from app/sdks/server-deno/docs/examples/health/get-queue-logs.md rename to app/sdks/0.6.2/server-deno/docs/examples/health/get-queue-logs.md diff --git a/app/sdks/server-deno/docs/examples/health/get-queue-tasks.md b/app/sdks/0.6.2/server-deno/docs/examples/health/get-queue-tasks.md similarity index 100% rename from app/sdks/server-deno/docs/examples/health/get-queue-tasks.md rename to app/sdks/0.6.2/server-deno/docs/examples/health/get-queue-tasks.md diff --git a/app/sdks/server-deno/docs/examples/health/get-queue-usage.md b/app/sdks/0.6.2/server-deno/docs/examples/health/get-queue-usage.md similarity index 100% rename from app/sdks/server-deno/docs/examples/health/get-queue-usage.md rename to app/sdks/0.6.2/server-deno/docs/examples/health/get-queue-usage.md diff --git a/app/sdks/server-deno/docs/examples/health/get-queue-webhooks.md b/app/sdks/0.6.2/server-deno/docs/examples/health/get-queue-webhooks.md similarity index 100% rename from app/sdks/server-deno/docs/examples/health/get-queue-webhooks.md rename to app/sdks/0.6.2/server-deno/docs/examples/health/get-queue-webhooks.md diff --git a/app/sdks/server-deno/docs/examples/health/get-storage-local.md b/app/sdks/0.6.2/server-deno/docs/examples/health/get-storage-local.md similarity index 100% rename from app/sdks/server-deno/docs/examples/health/get-storage-local.md rename to app/sdks/0.6.2/server-deno/docs/examples/health/get-storage-local.md diff --git a/app/sdks/server-deno/docs/examples/health/get-time.md b/app/sdks/0.6.2/server-deno/docs/examples/health/get-time.md similarity index 100% rename from app/sdks/server-deno/docs/examples/health/get-time.md rename to app/sdks/0.6.2/server-deno/docs/examples/health/get-time.md diff --git a/app/sdks/server-deno/docs/examples/health/get.md b/app/sdks/0.6.2/server-deno/docs/examples/health/get.md similarity index 100% rename from app/sdks/server-deno/docs/examples/health/get.md rename to app/sdks/0.6.2/server-deno/docs/examples/health/get.md diff --git a/app/sdks/server-deno/docs/examples/locale/get-continents.md b/app/sdks/0.6.2/server-deno/docs/examples/locale/get-continents.md similarity index 100% rename from app/sdks/server-deno/docs/examples/locale/get-continents.md rename to app/sdks/0.6.2/server-deno/docs/examples/locale/get-continents.md diff --git a/app/sdks/server-deno/docs/examples/locale/get-countries-e-u.md b/app/sdks/0.6.2/server-deno/docs/examples/locale/get-countries-e-u.md similarity index 100% rename from app/sdks/server-deno/docs/examples/locale/get-countries-e-u.md rename to app/sdks/0.6.2/server-deno/docs/examples/locale/get-countries-e-u.md diff --git a/app/sdks/server-deno/docs/examples/locale/get-countries-phones.md b/app/sdks/0.6.2/server-deno/docs/examples/locale/get-countries-phones.md similarity index 100% rename from app/sdks/server-deno/docs/examples/locale/get-countries-phones.md rename to app/sdks/0.6.2/server-deno/docs/examples/locale/get-countries-phones.md diff --git a/app/sdks/server-deno/docs/examples/locale/get-countries.md b/app/sdks/0.6.2/server-deno/docs/examples/locale/get-countries.md similarity index 100% rename from app/sdks/server-deno/docs/examples/locale/get-countries.md rename to app/sdks/0.6.2/server-deno/docs/examples/locale/get-countries.md diff --git a/app/sdks/server-deno/docs/examples/locale/get-currencies.md b/app/sdks/0.6.2/server-deno/docs/examples/locale/get-currencies.md similarity index 100% rename from app/sdks/server-deno/docs/examples/locale/get-currencies.md rename to app/sdks/0.6.2/server-deno/docs/examples/locale/get-currencies.md diff --git a/app/sdks/server-deno/docs/examples/locale/get.md b/app/sdks/0.6.2/server-deno/docs/examples/locale/get.md similarity index 100% rename from app/sdks/server-deno/docs/examples/locale/get.md rename to app/sdks/0.6.2/server-deno/docs/examples/locale/get.md diff --git a/app/sdks/server-deno/docs/examples/storage/create-file.md b/app/sdks/0.6.2/server-deno/docs/examples/storage/create-file.md similarity index 100% rename from app/sdks/server-deno/docs/examples/storage/create-file.md rename to app/sdks/0.6.2/server-deno/docs/examples/storage/create-file.md diff --git a/app/sdks/server-deno/docs/examples/storage/delete-file.md b/app/sdks/0.6.2/server-deno/docs/examples/storage/delete-file.md similarity index 100% rename from app/sdks/server-deno/docs/examples/storage/delete-file.md rename to app/sdks/0.6.2/server-deno/docs/examples/storage/delete-file.md diff --git a/app/sdks/server-deno/docs/examples/storage/get-file-download.md b/app/sdks/0.6.2/server-deno/docs/examples/storage/get-file-download.md similarity index 100% rename from app/sdks/server-deno/docs/examples/storage/get-file-download.md rename to app/sdks/0.6.2/server-deno/docs/examples/storage/get-file-download.md diff --git a/app/sdks/server-deno/docs/examples/storage/get-file-preview.md b/app/sdks/0.6.2/server-deno/docs/examples/storage/get-file-preview.md similarity index 100% rename from app/sdks/server-deno/docs/examples/storage/get-file-preview.md rename to app/sdks/0.6.2/server-deno/docs/examples/storage/get-file-preview.md diff --git a/app/sdks/server-deno/docs/examples/storage/get-file-view.md b/app/sdks/0.6.2/server-deno/docs/examples/storage/get-file-view.md similarity index 100% rename from app/sdks/server-deno/docs/examples/storage/get-file-view.md rename to app/sdks/0.6.2/server-deno/docs/examples/storage/get-file-view.md diff --git a/app/sdks/server-deno/docs/examples/storage/get-file.md b/app/sdks/0.6.2/server-deno/docs/examples/storage/get-file.md similarity index 100% rename from app/sdks/server-deno/docs/examples/storage/get-file.md rename to app/sdks/0.6.2/server-deno/docs/examples/storage/get-file.md diff --git a/app/sdks/server-deno/docs/examples/storage/list-files.md b/app/sdks/0.6.2/server-deno/docs/examples/storage/list-files.md similarity index 100% rename from app/sdks/server-deno/docs/examples/storage/list-files.md rename to app/sdks/0.6.2/server-deno/docs/examples/storage/list-files.md diff --git a/app/sdks/server-deno/docs/examples/storage/update-file.md b/app/sdks/0.6.2/server-deno/docs/examples/storage/update-file.md similarity index 100% rename from app/sdks/server-deno/docs/examples/storage/update-file.md rename to app/sdks/0.6.2/server-deno/docs/examples/storage/update-file.md diff --git a/app/sdks/server-deno/docs/examples/teams/create-membership.md b/app/sdks/0.6.2/server-deno/docs/examples/teams/create-membership.md similarity index 100% rename from app/sdks/server-deno/docs/examples/teams/create-membership.md rename to app/sdks/0.6.2/server-deno/docs/examples/teams/create-membership.md diff --git a/app/sdks/server-deno/docs/examples/teams/create.md b/app/sdks/0.6.2/server-deno/docs/examples/teams/create.md similarity index 100% rename from app/sdks/server-deno/docs/examples/teams/create.md rename to app/sdks/0.6.2/server-deno/docs/examples/teams/create.md diff --git a/app/sdks/server-deno/docs/examples/teams/delete-membership.md b/app/sdks/0.6.2/server-deno/docs/examples/teams/delete-membership.md similarity index 100% rename from app/sdks/server-deno/docs/examples/teams/delete-membership.md rename to app/sdks/0.6.2/server-deno/docs/examples/teams/delete-membership.md diff --git a/app/sdks/server-deno/docs/examples/teams/delete.md b/app/sdks/0.6.2/server-deno/docs/examples/teams/delete.md similarity index 100% rename from app/sdks/server-deno/docs/examples/teams/delete.md rename to app/sdks/0.6.2/server-deno/docs/examples/teams/delete.md diff --git a/app/sdks/server-deno/docs/examples/teams/get-memberships.md b/app/sdks/0.6.2/server-deno/docs/examples/teams/get-memberships.md similarity index 100% rename from app/sdks/server-deno/docs/examples/teams/get-memberships.md rename to app/sdks/0.6.2/server-deno/docs/examples/teams/get-memberships.md diff --git a/app/sdks/server-deno/docs/examples/teams/get.md b/app/sdks/0.6.2/server-deno/docs/examples/teams/get.md similarity index 100% rename from app/sdks/server-deno/docs/examples/teams/get.md rename to app/sdks/0.6.2/server-deno/docs/examples/teams/get.md diff --git a/app/sdks/server-deno/docs/examples/teams/list.md b/app/sdks/0.6.2/server-deno/docs/examples/teams/list.md similarity index 100% rename from app/sdks/server-deno/docs/examples/teams/list.md rename to app/sdks/0.6.2/server-deno/docs/examples/teams/list.md diff --git a/app/sdks/server-deno/docs/examples/teams/update.md b/app/sdks/0.6.2/server-deno/docs/examples/teams/update.md similarity index 100% rename from app/sdks/server-deno/docs/examples/teams/update.md rename to app/sdks/0.6.2/server-deno/docs/examples/teams/update.md diff --git a/app/sdks/server-deno/docs/examples/users/create.md b/app/sdks/0.6.2/server-deno/docs/examples/users/create.md similarity index 100% rename from app/sdks/server-deno/docs/examples/users/create.md rename to app/sdks/0.6.2/server-deno/docs/examples/users/create.md diff --git a/app/sdks/server-deno/docs/examples/users/delete-session.md b/app/sdks/0.6.2/server-deno/docs/examples/users/delete-session.md similarity index 100% rename from app/sdks/server-deno/docs/examples/users/delete-session.md rename to app/sdks/0.6.2/server-deno/docs/examples/users/delete-session.md diff --git a/app/sdks/server-deno/docs/examples/users/delete-sessions.md b/app/sdks/0.6.2/server-deno/docs/examples/users/delete-sessions.md similarity index 100% rename from app/sdks/server-deno/docs/examples/users/delete-sessions.md rename to app/sdks/0.6.2/server-deno/docs/examples/users/delete-sessions.md diff --git a/app/sdks/server-deno/docs/examples/users/get-logs.md b/app/sdks/0.6.2/server-deno/docs/examples/users/get-logs.md similarity index 100% rename from app/sdks/server-deno/docs/examples/users/get-logs.md rename to app/sdks/0.6.2/server-deno/docs/examples/users/get-logs.md diff --git a/app/sdks/server-deno/docs/examples/users/get-prefs.md b/app/sdks/0.6.2/server-deno/docs/examples/users/get-prefs.md similarity index 100% rename from app/sdks/server-deno/docs/examples/users/get-prefs.md rename to app/sdks/0.6.2/server-deno/docs/examples/users/get-prefs.md diff --git a/app/sdks/server-deno/docs/examples/users/get-sessions.md b/app/sdks/0.6.2/server-deno/docs/examples/users/get-sessions.md similarity index 100% rename from app/sdks/server-deno/docs/examples/users/get-sessions.md rename to app/sdks/0.6.2/server-deno/docs/examples/users/get-sessions.md diff --git a/app/sdks/server-deno/docs/examples/users/get.md b/app/sdks/0.6.2/server-deno/docs/examples/users/get.md similarity index 100% rename from app/sdks/server-deno/docs/examples/users/get.md rename to app/sdks/0.6.2/server-deno/docs/examples/users/get.md diff --git a/app/sdks/server-deno/docs/examples/users/list.md b/app/sdks/0.6.2/server-deno/docs/examples/users/list.md similarity index 100% rename from app/sdks/server-deno/docs/examples/users/list.md rename to app/sdks/0.6.2/server-deno/docs/examples/users/list.md diff --git a/app/sdks/server-deno/docs/examples/users/update-prefs.md b/app/sdks/0.6.2/server-deno/docs/examples/users/update-prefs.md similarity index 100% rename from app/sdks/server-deno/docs/examples/users/update-prefs.md rename to app/sdks/0.6.2/server-deno/docs/examples/users/update-prefs.md diff --git a/app/sdks/server-deno/docs/examples/users/update-status.md b/app/sdks/0.6.2/server-deno/docs/examples/users/update-status.md similarity index 100% rename from app/sdks/server-deno/docs/examples/users/update-status.md rename to app/sdks/0.6.2/server-deno/docs/examples/users/update-status.md diff --git a/app/sdks/server-deno/mod.ts b/app/sdks/0.6.2/server-deno/mod.ts similarity index 100% rename from app/sdks/server-deno/mod.ts rename to app/sdks/0.6.2/server-deno/mod.ts diff --git a/app/sdks/server-deno/src/client.ts b/app/sdks/0.6.2/server-deno/src/client.ts similarity index 100% rename from app/sdks/server-deno/src/client.ts rename to app/sdks/0.6.2/server-deno/src/client.ts diff --git a/app/sdks/server-deno/src/service.ts b/app/sdks/0.6.2/server-deno/src/service.ts similarity index 100% rename from app/sdks/server-deno/src/service.ts rename to app/sdks/0.6.2/server-deno/src/service.ts diff --git a/app/sdks/server-deno/src/services/avatars.ts b/app/sdks/0.6.2/server-deno/src/services/avatars.ts similarity index 100% rename from app/sdks/server-deno/src/services/avatars.ts rename to app/sdks/0.6.2/server-deno/src/services/avatars.ts diff --git a/app/sdks/server-deno/src/services/database.ts b/app/sdks/0.6.2/server-deno/src/services/database.ts similarity index 100% rename from app/sdks/server-deno/src/services/database.ts rename to app/sdks/0.6.2/server-deno/src/services/database.ts diff --git a/app/sdks/server-deno/src/services/health.ts b/app/sdks/0.6.2/server-deno/src/services/health.ts similarity index 100% rename from app/sdks/server-deno/src/services/health.ts rename to app/sdks/0.6.2/server-deno/src/services/health.ts diff --git a/app/sdks/server-deno/src/services/locale.ts b/app/sdks/0.6.2/server-deno/src/services/locale.ts similarity index 100% rename from app/sdks/server-deno/src/services/locale.ts rename to app/sdks/0.6.2/server-deno/src/services/locale.ts diff --git a/app/sdks/server-deno/src/services/storage.ts b/app/sdks/0.6.2/server-deno/src/services/storage.ts similarity index 100% rename from app/sdks/server-deno/src/services/storage.ts rename to app/sdks/0.6.2/server-deno/src/services/storage.ts diff --git a/app/sdks/server-deno/src/services/teams.ts b/app/sdks/0.6.2/server-deno/src/services/teams.ts similarity index 100% rename from app/sdks/server-deno/src/services/teams.ts rename to app/sdks/0.6.2/server-deno/src/services/teams.ts diff --git a/app/sdks/server-deno/src/services/users.ts b/app/sdks/0.6.2/server-deno/src/services/users.ts similarity index 100% rename from app/sdks/server-deno/src/services/users.ts rename to app/sdks/0.6.2/server-deno/src/services/users.ts diff --git a/app/sdks/server-go/CHANGELOG.md b/app/sdks/0.6.2/server-go/CHANGELOG.md similarity index 100% rename from app/sdks/server-go/CHANGELOG.md rename to app/sdks/0.6.2/server-go/CHANGELOG.md diff --git a/app/sdks/server-go/LICENSE b/app/sdks/0.6.2/server-go/LICENSE similarity index 100% rename from app/sdks/server-go/LICENSE rename to app/sdks/0.6.2/server-go/LICENSE diff --git a/app/sdks/server-go/README.md b/app/sdks/0.6.2/server-go/README.md similarity index 100% rename from app/sdks/server-go/README.md rename to app/sdks/0.6.2/server-go/README.md diff --git a/app/sdks/server-go/avatars.go b/app/sdks/0.6.2/server-go/avatars.go similarity index 100% rename from app/sdks/server-go/avatars.go rename to app/sdks/0.6.2/server-go/avatars.go diff --git a/app/sdks/server-go/client.go b/app/sdks/0.6.2/server-go/client.go similarity index 100% rename from app/sdks/server-go/client.go rename to app/sdks/0.6.2/server-go/client.go diff --git a/app/sdks/server-go/database.go b/app/sdks/0.6.2/server-go/database.go similarity index 100% rename from app/sdks/server-go/database.go rename to app/sdks/0.6.2/server-go/database.go diff --git a/app/sdks/server-go/docs/examples/avatars/get-browser.md b/app/sdks/0.6.2/server-go/docs/examples/avatars/get-browser.md similarity index 100% rename from app/sdks/server-go/docs/examples/avatars/get-browser.md rename to app/sdks/0.6.2/server-go/docs/examples/avatars/get-browser.md diff --git a/app/sdks/server-go/docs/examples/avatars/get-credit-card.md b/app/sdks/0.6.2/server-go/docs/examples/avatars/get-credit-card.md similarity index 100% rename from app/sdks/server-go/docs/examples/avatars/get-credit-card.md rename to app/sdks/0.6.2/server-go/docs/examples/avatars/get-credit-card.md diff --git a/app/sdks/server-go/docs/examples/avatars/get-favicon.md b/app/sdks/0.6.2/server-go/docs/examples/avatars/get-favicon.md similarity index 100% rename from app/sdks/server-go/docs/examples/avatars/get-favicon.md rename to app/sdks/0.6.2/server-go/docs/examples/avatars/get-favicon.md diff --git a/app/sdks/server-go/docs/examples/avatars/get-flag.md b/app/sdks/0.6.2/server-go/docs/examples/avatars/get-flag.md similarity index 100% rename from app/sdks/server-go/docs/examples/avatars/get-flag.md rename to app/sdks/0.6.2/server-go/docs/examples/avatars/get-flag.md diff --git a/app/sdks/server-go/docs/examples/avatars/get-image.md b/app/sdks/0.6.2/server-go/docs/examples/avatars/get-image.md similarity index 100% rename from app/sdks/server-go/docs/examples/avatars/get-image.md rename to app/sdks/0.6.2/server-go/docs/examples/avatars/get-image.md diff --git a/app/sdks/server-go/docs/examples/avatars/get-q-r.md b/app/sdks/0.6.2/server-go/docs/examples/avatars/get-q-r.md similarity index 100% rename from app/sdks/server-go/docs/examples/avatars/get-q-r.md rename to app/sdks/0.6.2/server-go/docs/examples/avatars/get-q-r.md diff --git a/app/sdks/server-go/docs/examples/database/create-collection.md b/app/sdks/0.6.2/server-go/docs/examples/database/create-collection.md similarity index 100% rename from app/sdks/server-go/docs/examples/database/create-collection.md rename to app/sdks/0.6.2/server-go/docs/examples/database/create-collection.md diff --git a/app/sdks/server-go/docs/examples/database/create-document.md b/app/sdks/0.6.2/server-go/docs/examples/database/create-document.md similarity index 100% rename from app/sdks/server-go/docs/examples/database/create-document.md rename to app/sdks/0.6.2/server-go/docs/examples/database/create-document.md diff --git a/app/sdks/server-go/docs/examples/database/delete-collection.md b/app/sdks/0.6.2/server-go/docs/examples/database/delete-collection.md similarity index 100% rename from app/sdks/server-go/docs/examples/database/delete-collection.md rename to app/sdks/0.6.2/server-go/docs/examples/database/delete-collection.md diff --git a/app/sdks/server-go/docs/examples/database/delete-document.md b/app/sdks/0.6.2/server-go/docs/examples/database/delete-document.md similarity index 100% rename from app/sdks/server-go/docs/examples/database/delete-document.md rename to app/sdks/0.6.2/server-go/docs/examples/database/delete-document.md diff --git a/app/sdks/server-go/docs/examples/database/get-collection-logs.md b/app/sdks/0.6.2/server-go/docs/examples/database/get-collection-logs.md similarity index 100% rename from app/sdks/server-go/docs/examples/database/get-collection-logs.md rename to app/sdks/0.6.2/server-go/docs/examples/database/get-collection-logs.md diff --git a/app/sdks/server-go/docs/examples/database/get-collection.md b/app/sdks/0.6.2/server-go/docs/examples/database/get-collection.md similarity index 100% rename from app/sdks/server-go/docs/examples/database/get-collection.md rename to app/sdks/0.6.2/server-go/docs/examples/database/get-collection.md diff --git a/app/sdks/server-go/docs/examples/database/get-document.md b/app/sdks/0.6.2/server-go/docs/examples/database/get-document.md similarity index 100% rename from app/sdks/server-go/docs/examples/database/get-document.md rename to app/sdks/0.6.2/server-go/docs/examples/database/get-document.md diff --git a/app/sdks/server-go/docs/examples/database/list-collections.md b/app/sdks/0.6.2/server-go/docs/examples/database/list-collections.md similarity index 100% rename from app/sdks/server-go/docs/examples/database/list-collections.md rename to app/sdks/0.6.2/server-go/docs/examples/database/list-collections.md diff --git a/app/sdks/server-go/docs/examples/database/list-documents.md b/app/sdks/0.6.2/server-go/docs/examples/database/list-documents.md similarity index 100% rename from app/sdks/server-go/docs/examples/database/list-documents.md rename to app/sdks/0.6.2/server-go/docs/examples/database/list-documents.md diff --git a/app/sdks/server-go/docs/examples/database/update-collection.md b/app/sdks/0.6.2/server-go/docs/examples/database/update-collection.md similarity index 100% rename from app/sdks/server-go/docs/examples/database/update-collection.md rename to app/sdks/0.6.2/server-go/docs/examples/database/update-collection.md diff --git a/app/sdks/server-go/docs/examples/database/update-document.md b/app/sdks/0.6.2/server-go/docs/examples/database/update-document.md similarity index 100% rename from app/sdks/server-go/docs/examples/database/update-document.md rename to app/sdks/0.6.2/server-go/docs/examples/database/update-document.md diff --git a/app/sdks/server-go/docs/examples/functions/create-execution.md b/app/sdks/0.6.2/server-go/docs/examples/functions/create-execution.md similarity index 100% rename from app/sdks/server-go/docs/examples/functions/create-execution.md rename to app/sdks/0.6.2/server-go/docs/examples/functions/create-execution.md diff --git a/app/sdks/server-go/docs/examples/functions/create-tag.md b/app/sdks/0.6.2/server-go/docs/examples/functions/create-tag.md similarity index 100% rename from app/sdks/server-go/docs/examples/functions/create-tag.md rename to app/sdks/0.6.2/server-go/docs/examples/functions/create-tag.md diff --git a/app/sdks/server-go/docs/examples/functions/create.md b/app/sdks/0.6.2/server-go/docs/examples/functions/create.md similarity index 100% rename from app/sdks/server-go/docs/examples/functions/create.md rename to app/sdks/0.6.2/server-go/docs/examples/functions/create.md diff --git a/app/sdks/server-go/docs/examples/functions/delete-tag.md b/app/sdks/0.6.2/server-go/docs/examples/functions/delete-tag.md similarity index 100% rename from app/sdks/server-go/docs/examples/functions/delete-tag.md rename to app/sdks/0.6.2/server-go/docs/examples/functions/delete-tag.md diff --git a/app/sdks/server-go/docs/examples/functions/delete.md b/app/sdks/0.6.2/server-go/docs/examples/functions/delete.md similarity index 100% rename from app/sdks/server-go/docs/examples/functions/delete.md rename to app/sdks/0.6.2/server-go/docs/examples/functions/delete.md diff --git a/app/sdks/server-go/docs/examples/functions/get-execution.md b/app/sdks/0.6.2/server-go/docs/examples/functions/get-execution.md similarity index 100% rename from app/sdks/server-go/docs/examples/functions/get-execution.md rename to app/sdks/0.6.2/server-go/docs/examples/functions/get-execution.md diff --git a/app/sdks/server-go/docs/examples/functions/get-tag.md b/app/sdks/0.6.2/server-go/docs/examples/functions/get-tag.md similarity index 100% rename from app/sdks/server-go/docs/examples/functions/get-tag.md rename to app/sdks/0.6.2/server-go/docs/examples/functions/get-tag.md diff --git a/app/sdks/server-go/docs/examples/functions/get.md b/app/sdks/0.6.2/server-go/docs/examples/functions/get.md similarity index 100% rename from app/sdks/server-go/docs/examples/functions/get.md rename to app/sdks/0.6.2/server-go/docs/examples/functions/get.md diff --git a/app/sdks/server-go/docs/examples/functions/list-executions.md b/app/sdks/0.6.2/server-go/docs/examples/functions/list-executions.md similarity index 100% rename from app/sdks/server-go/docs/examples/functions/list-executions.md rename to app/sdks/0.6.2/server-go/docs/examples/functions/list-executions.md diff --git a/app/sdks/server-go/docs/examples/functions/list-tags.md b/app/sdks/0.6.2/server-go/docs/examples/functions/list-tags.md similarity index 100% rename from app/sdks/server-go/docs/examples/functions/list-tags.md rename to app/sdks/0.6.2/server-go/docs/examples/functions/list-tags.md diff --git a/app/sdks/server-go/docs/examples/functions/list.md b/app/sdks/0.6.2/server-go/docs/examples/functions/list.md similarity index 100% rename from app/sdks/server-go/docs/examples/functions/list.md rename to app/sdks/0.6.2/server-go/docs/examples/functions/list.md diff --git a/app/sdks/server-go/docs/examples/functions/update-active.md b/app/sdks/0.6.2/server-go/docs/examples/functions/update-active.md similarity index 100% rename from app/sdks/server-go/docs/examples/functions/update-active.md rename to app/sdks/0.6.2/server-go/docs/examples/functions/update-active.md diff --git a/app/sdks/server-go/docs/examples/functions/update-tag.md b/app/sdks/0.6.2/server-go/docs/examples/functions/update-tag.md similarity index 100% rename from app/sdks/server-go/docs/examples/functions/update-tag.md rename to app/sdks/0.6.2/server-go/docs/examples/functions/update-tag.md diff --git a/app/sdks/server-go/docs/examples/functions/update.md b/app/sdks/0.6.2/server-go/docs/examples/functions/update.md similarity index 100% rename from app/sdks/server-go/docs/examples/functions/update.md rename to app/sdks/0.6.2/server-go/docs/examples/functions/update.md diff --git a/app/sdks/server-go/docs/examples/health/get-anti-virus.md b/app/sdks/0.6.2/server-go/docs/examples/health/get-anti-virus.md similarity index 100% rename from app/sdks/server-go/docs/examples/health/get-anti-virus.md rename to app/sdks/0.6.2/server-go/docs/examples/health/get-anti-virus.md diff --git a/app/sdks/server-go/docs/examples/health/get-cache.md b/app/sdks/0.6.2/server-go/docs/examples/health/get-cache.md similarity index 100% rename from app/sdks/server-go/docs/examples/health/get-cache.md rename to app/sdks/0.6.2/server-go/docs/examples/health/get-cache.md diff --git a/app/sdks/server-go/docs/examples/health/get-d-b.md b/app/sdks/0.6.2/server-go/docs/examples/health/get-d-b.md similarity index 100% rename from app/sdks/server-go/docs/examples/health/get-d-b.md rename to app/sdks/0.6.2/server-go/docs/examples/health/get-d-b.md diff --git a/app/sdks/server-go/docs/examples/health/get-queue-certificates.md b/app/sdks/0.6.2/server-go/docs/examples/health/get-queue-certificates.md similarity index 100% rename from app/sdks/server-go/docs/examples/health/get-queue-certificates.md rename to app/sdks/0.6.2/server-go/docs/examples/health/get-queue-certificates.md diff --git a/app/sdks/server-go/docs/examples/health/get-queue-functions.md b/app/sdks/0.6.2/server-go/docs/examples/health/get-queue-functions.md similarity index 100% rename from app/sdks/server-go/docs/examples/health/get-queue-functions.md rename to app/sdks/0.6.2/server-go/docs/examples/health/get-queue-functions.md diff --git a/app/sdks/server-go/docs/examples/health/get-queue-logs.md b/app/sdks/0.6.2/server-go/docs/examples/health/get-queue-logs.md similarity index 100% rename from app/sdks/server-go/docs/examples/health/get-queue-logs.md rename to app/sdks/0.6.2/server-go/docs/examples/health/get-queue-logs.md diff --git a/app/sdks/server-go/docs/examples/health/get-queue-tasks.md b/app/sdks/0.6.2/server-go/docs/examples/health/get-queue-tasks.md similarity index 100% rename from app/sdks/server-go/docs/examples/health/get-queue-tasks.md rename to app/sdks/0.6.2/server-go/docs/examples/health/get-queue-tasks.md diff --git a/app/sdks/server-go/docs/examples/health/get-queue-usage.md b/app/sdks/0.6.2/server-go/docs/examples/health/get-queue-usage.md similarity index 100% rename from app/sdks/server-go/docs/examples/health/get-queue-usage.md rename to app/sdks/0.6.2/server-go/docs/examples/health/get-queue-usage.md diff --git a/app/sdks/server-go/docs/examples/health/get-queue-webhooks.md b/app/sdks/0.6.2/server-go/docs/examples/health/get-queue-webhooks.md similarity index 100% rename from app/sdks/server-go/docs/examples/health/get-queue-webhooks.md rename to app/sdks/0.6.2/server-go/docs/examples/health/get-queue-webhooks.md diff --git a/app/sdks/server-go/docs/examples/health/get-storage-anti-virus.md b/app/sdks/0.6.2/server-go/docs/examples/health/get-storage-anti-virus.md similarity index 100% rename from app/sdks/server-go/docs/examples/health/get-storage-anti-virus.md rename to app/sdks/0.6.2/server-go/docs/examples/health/get-storage-anti-virus.md diff --git a/app/sdks/server-go/docs/examples/health/get-storage-local.md b/app/sdks/0.6.2/server-go/docs/examples/health/get-storage-local.md similarity index 100% rename from app/sdks/server-go/docs/examples/health/get-storage-local.md rename to app/sdks/0.6.2/server-go/docs/examples/health/get-storage-local.md diff --git a/app/sdks/server-go/docs/examples/health/get-time.md b/app/sdks/0.6.2/server-go/docs/examples/health/get-time.md similarity index 100% rename from app/sdks/server-go/docs/examples/health/get-time.md rename to app/sdks/0.6.2/server-go/docs/examples/health/get-time.md diff --git a/app/sdks/server-go/docs/examples/health/get.md b/app/sdks/0.6.2/server-go/docs/examples/health/get.md similarity index 100% rename from app/sdks/server-go/docs/examples/health/get.md rename to app/sdks/0.6.2/server-go/docs/examples/health/get.md diff --git a/app/sdks/server-go/docs/examples/locale/get-continents.md b/app/sdks/0.6.2/server-go/docs/examples/locale/get-continents.md similarity index 100% rename from app/sdks/server-go/docs/examples/locale/get-continents.md rename to app/sdks/0.6.2/server-go/docs/examples/locale/get-continents.md diff --git a/app/sdks/server-go/docs/examples/locale/get-countries-e-u.md b/app/sdks/0.6.2/server-go/docs/examples/locale/get-countries-e-u.md similarity index 100% rename from app/sdks/server-go/docs/examples/locale/get-countries-e-u.md rename to app/sdks/0.6.2/server-go/docs/examples/locale/get-countries-e-u.md diff --git a/app/sdks/server-go/docs/examples/locale/get-countries-phones.md b/app/sdks/0.6.2/server-go/docs/examples/locale/get-countries-phones.md similarity index 100% rename from app/sdks/server-go/docs/examples/locale/get-countries-phones.md rename to app/sdks/0.6.2/server-go/docs/examples/locale/get-countries-phones.md diff --git a/app/sdks/server-go/docs/examples/locale/get-countries.md b/app/sdks/0.6.2/server-go/docs/examples/locale/get-countries.md similarity index 100% rename from app/sdks/server-go/docs/examples/locale/get-countries.md rename to app/sdks/0.6.2/server-go/docs/examples/locale/get-countries.md diff --git a/app/sdks/server-go/docs/examples/locale/get-currencies.md b/app/sdks/0.6.2/server-go/docs/examples/locale/get-currencies.md similarity index 100% rename from app/sdks/server-go/docs/examples/locale/get-currencies.md rename to app/sdks/0.6.2/server-go/docs/examples/locale/get-currencies.md diff --git a/app/sdks/server-go/docs/examples/locale/get.md b/app/sdks/0.6.2/server-go/docs/examples/locale/get.md similarity index 100% rename from app/sdks/server-go/docs/examples/locale/get.md rename to app/sdks/0.6.2/server-go/docs/examples/locale/get.md diff --git a/app/sdks/server-go/docs/examples/storage/create-file.md b/app/sdks/0.6.2/server-go/docs/examples/storage/create-file.md similarity index 100% rename from app/sdks/server-go/docs/examples/storage/create-file.md rename to app/sdks/0.6.2/server-go/docs/examples/storage/create-file.md diff --git a/app/sdks/server-go/docs/examples/storage/delete-file.md b/app/sdks/0.6.2/server-go/docs/examples/storage/delete-file.md similarity index 100% rename from app/sdks/server-go/docs/examples/storage/delete-file.md rename to app/sdks/0.6.2/server-go/docs/examples/storage/delete-file.md diff --git a/app/sdks/server-go/docs/examples/storage/get-file-download.md b/app/sdks/0.6.2/server-go/docs/examples/storage/get-file-download.md similarity index 100% rename from app/sdks/server-go/docs/examples/storage/get-file-download.md rename to app/sdks/0.6.2/server-go/docs/examples/storage/get-file-download.md diff --git a/app/sdks/server-go/docs/examples/storage/get-file-preview.md b/app/sdks/0.6.2/server-go/docs/examples/storage/get-file-preview.md similarity index 100% rename from app/sdks/server-go/docs/examples/storage/get-file-preview.md rename to app/sdks/0.6.2/server-go/docs/examples/storage/get-file-preview.md diff --git a/app/sdks/server-go/docs/examples/storage/get-file-view.md b/app/sdks/0.6.2/server-go/docs/examples/storage/get-file-view.md similarity index 100% rename from app/sdks/server-go/docs/examples/storage/get-file-view.md rename to app/sdks/0.6.2/server-go/docs/examples/storage/get-file-view.md diff --git a/app/sdks/server-go/docs/examples/storage/get-file.md b/app/sdks/0.6.2/server-go/docs/examples/storage/get-file.md similarity index 100% rename from app/sdks/server-go/docs/examples/storage/get-file.md rename to app/sdks/0.6.2/server-go/docs/examples/storage/get-file.md diff --git a/app/sdks/server-go/docs/examples/storage/list-files.md b/app/sdks/0.6.2/server-go/docs/examples/storage/list-files.md similarity index 100% rename from app/sdks/server-go/docs/examples/storage/list-files.md rename to app/sdks/0.6.2/server-go/docs/examples/storage/list-files.md diff --git a/app/sdks/server-go/docs/examples/storage/update-file.md b/app/sdks/0.6.2/server-go/docs/examples/storage/update-file.md similarity index 100% rename from app/sdks/server-go/docs/examples/storage/update-file.md rename to app/sdks/0.6.2/server-go/docs/examples/storage/update-file.md diff --git a/app/sdks/server-go/docs/examples/teams/create-membership.md b/app/sdks/0.6.2/server-go/docs/examples/teams/create-membership.md similarity index 100% rename from app/sdks/server-go/docs/examples/teams/create-membership.md rename to app/sdks/0.6.2/server-go/docs/examples/teams/create-membership.md diff --git a/app/sdks/server-go/docs/examples/teams/create.md b/app/sdks/0.6.2/server-go/docs/examples/teams/create.md similarity index 100% rename from app/sdks/server-go/docs/examples/teams/create.md rename to app/sdks/0.6.2/server-go/docs/examples/teams/create.md diff --git a/app/sdks/server-go/docs/examples/teams/delete-membership.md b/app/sdks/0.6.2/server-go/docs/examples/teams/delete-membership.md similarity index 100% rename from app/sdks/server-go/docs/examples/teams/delete-membership.md rename to app/sdks/0.6.2/server-go/docs/examples/teams/delete-membership.md diff --git a/app/sdks/server-go/docs/examples/teams/delete.md b/app/sdks/0.6.2/server-go/docs/examples/teams/delete.md similarity index 100% rename from app/sdks/server-go/docs/examples/teams/delete.md rename to app/sdks/0.6.2/server-go/docs/examples/teams/delete.md diff --git a/app/sdks/server-go/docs/examples/teams/get-memberships.md b/app/sdks/0.6.2/server-go/docs/examples/teams/get-memberships.md similarity index 100% rename from app/sdks/server-go/docs/examples/teams/get-memberships.md rename to app/sdks/0.6.2/server-go/docs/examples/teams/get-memberships.md diff --git a/app/sdks/server-go/docs/examples/teams/get.md b/app/sdks/0.6.2/server-go/docs/examples/teams/get.md similarity index 100% rename from app/sdks/server-go/docs/examples/teams/get.md rename to app/sdks/0.6.2/server-go/docs/examples/teams/get.md diff --git a/app/sdks/server-go/docs/examples/teams/list.md b/app/sdks/0.6.2/server-go/docs/examples/teams/list.md similarity index 100% rename from app/sdks/server-go/docs/examples/teams/list.md rename to app/sdks/0.6.2/server-go/docs/examples/teams/list.md diff --git a/app/sdks/server-go/docs/examples/teams/update.md b/app/sdks/0.6.2/server-go/docs/examples/teams/update.md similarity index 100% rename from app/sdks/server-go/docs/examples/teams/update.md rename to app/sdks/0.6.2/server-go/docs/examples/teams/update.md diff --git a/app/sdks/server-go/docs/examples/users/create.md b/app/sdks/0.6.2/server-go/docs/examples/users/create.md similarity index 100% rename from app/sdks/server-go/docs/examples/users/create.md rename to app/sdks/0.6.2/server-go/docs/examples/users/create.md diff --git a/app/sdks/server-go/docs/examples/users/delete-session.md b/app/sdks/0.6.2/server-go/docs/examples/users/delete-session.md similarity index 100% rename from app/sdks/server-go/docs/examples/users/delete-session.md rename to app/sdks/0.6.2/server-go/docs/examples/users/delete-session.md diff --git a/app/sdks/server-go/docs/examples/users/delete-sessions.md b/app/sdks/0.6.2/server-go/docs/examples/users/delete-sessions.md similarity index 100% rename from app/sdks/server-go/docs/examples/users/delete-sessions.md rename to app/sdks/0.6.2/server-go/docs/examples/users/delete-sessions.md diff --git a/app/sdks/server-go/docs/examples/users/get-logs.md b/app/sdks/0.6.2/server-go/docs/examples/users/get-logs.md similarity index 100% rename from app/sdks/server-go/docs/examples/users/get-logs.md rename to app/sdks/0.6.2/server-go/docs/examples/users/get-logs.md diff --git a/app/sdks/server-go/docs/examples/users/get-prefs.md b/app/sdks/0.6.2/server-go/docs/examples/users/get-prefs.md similarity index 100% rename from app/sdks/server-go/docs/examples/users/get-prefs.md rename to app/sdks/0.6.2/server-go/docs/examples/users/get-prefs.md diff --git a/app/sdks/server-go/docs/examples/users/get-sessions.md b/app/sdks/0.6.2/server-go/docs/examples/users/get-sessions.md similarity index 100% rename from app/sdks/server-go/docs/examples/users/get-sessions.md rename to app/sdks/0.6.2/server-go/docs/examples/users/get-sessions.md diff --git a/app/sdks/server-go/docs/examples/users/get.md b/app/sdks/0.6.2/server-go/docs/examples/users/get.md similarity index 100% rename from app/sdks/server-go/docs/examples/users/get.md rename to app/sdks/0.6.2/server-go/docs/examples/users/get.md diff --git a/app/sdks/server-go/docs/examples/users/list.md b/app/sdks/0.6.2/server-go/docs/examples/users/list.md similarity index 100% rename from app/sdks/server-go/docs/examples/users/list.md rename to app/sdks/0.6.2/server-go/docs/examples/users/list.md diff --git a/app/sdks/server-go/docs/examples/users/update-prefs.md b/app/sdks/0.6.2/server-go/docs/examples/users/update-prefs.md similarity index 100% rename from app/sdks/server-go/docs/examples/users/update-prefs.md rename to app/sdks/0.6.2/server-go/docs/examples/users/update-prefs.md diff --git a/app/sdks/server-go/docs/examples/users/update-status.md b/app/sdks/0.6.2/server-go/docs/examples/users/update-status.md similarity index 100% rename from app/sdks/server-go/docs/examples/users/update-status.md rename to app/sdks/0.6.2/server-go/docs/examples/users/update-status.md diff --git a/app/sdks/server-go/functions.go b/app/sdks/0.6.2/server-go/functions.go similarity index 100% rename from app/sdks/server-go/functions.go rename to app/sdks/0.6.2/server-go/functions.go diff --git a/app/sdks/server-go/health.go b/app/sdks/0.6.2/server-go/health.go similarity index 100% rename from app/sdks/server-go/health.go rename to app/sdks/0.6.2/server-go/health.go diff --git a/app/sdks/server-go/locale.go b/app/sdks/0.6.2/server-go/locale.go similarity index 100% rename from app/sdks/server-go/locale.go rename to app/sdks/0.6.2/server-go/locale.go diff --git a/app/sdks/server-go/main.go b/app/sdks/0.6.2/server-go/main.go similarity index 100% rename from app/sdks/server-go/main.go rename to app/sdks/0.6.2/server-go/main.go diff --git a/app/sdks/server-go/storage.go b/app/sdks/0.6.2/server-go/storage.go similarity index 100% rename from app/sdks/server-go/storage.go rename to app/sdks/0.6.2/server-go/storage.go diff --git a/app/sdks/server-go/teams.go b/app/sdks/0.6.2/server-go/teams.go similarity index 100% rename from app/sdks/server-go/teams.go rename to app/sdks/0.6.2/server-go/teams.go diff --git a/app/sdks/server-go/users.go b/app/sdks/0.6.2/server-go/users.go similarity index 100% rename from app/sdks/server-go/users.go rename to app/sdks/0.6.2/server-go/users.go diff --git a/app/sdks/server-go/utils.go b/app/sdks/0.6.2/server-go/utils.go similarity index 100% rename from app/sdks/server-go/utils.go rename to app/sdks/0.6.2/server-go/utils.go diff --git a/app/sdks/server-java/CHANGELOG.md b/app/sdks/0.6.2/server-java/CHANGELOG.md similarity index 100% rename from app/sdks/server-java/CHANGELOG.md rename to app/sdks/0.6.2/server-java/CHANGELOG.md diff --git a/app/sdks/server-java/LICENSE b/app/sdks/0.6.2/server-java/LICENSE similarity index 100% rename from app/sdks/server-java/LICENSE rename to app/sdks/0.6.2/server-java/LICENSE diff --git a/app/sdks/server-java/README.md b/app/sdks/0.6.2/server-java/README.md similarity index 100% rename from app/sdks/server-java/README.md rename to app/sdks/0.6.2/server-java/README.md diff --git a/app/sdks/server-java/pom.xml b/app/sdks/0.6.2/server-java/pom.xml similarity index 100% rename from app/sdks/server-java/pom.xml rename to app/sdks/0.6.2/server-java/pom.xml diff --git a/app/sdks/server-java/src/main/java/Client.java b/app/sdks/0.6.2/server-java/src/main/java/Client.java similarity index 100% rename from app/sdks/server-java/src/main/java/Client.java rename to app/sdks/0.6.2/server-java/src/main/java/Client.java diff --git a/app/sdks/server-java/src/main/java/enums/OrderType.java b/app/sdks/0.6.2/server-java/src/main/java/enums/OrderType.java similarity index 100% rename from app/sdks/server-java/src/main/java/enums/OrderType.java rename to app/sdks/0.6.2/server-java/src/main/java/enums/OrderType.java diff --git a/app/sdks/server-java/src/main/java/services/Avatars.java b/app/sdks/0.6.2/server-java/src/main/java/services/Avatars.java similarity index 100% rename from app/sdks/server-java/src/main/java/services/Avatars.java rename to app/sdks/0.6.2/server-java/src/main/java/services/Avatars.java diff --git a/app/sdks/server-java/src/main/java/services/Database.java b/app/sdks/0.6.2/server-java/src/main/java/services/Database.java similarity index 100% rename from app/sdks/server-java/src/main/java/services/Database.java rename to app/sdks/0.6.2/server-java/src/main/java/services/Database.java diff --git a/app/sdks/server-java/src/main/java/services/Functions.java b/app/sdks/0.6.2/server-java/src/main/java/services/Functions.java similarity index 100% rename from app/sdks/server-java/src/main/java/services/Functions.java rename to app/sdks/0.6.2/server-java/src/main/java/services/Functions.java diff --git a/app/sdks/server-java/src/main/java/services/Health.java b/app/sdks/0.6.2/server-java/src/main/java/services/Health.java similarity index 100% rename from app/sdks/server-java/src/main/java/services/Health.java rename to app/sdks/0.6.2/server-java/src/main/java/services/Health.java diff --git a/app/sdks/server-java/src/main/java/services/Locale.java b/app/sdks/0.6.2/server-java/src/main/java/services/Locale.java similarity index 100% rename from app/sdks/server-java/src/main/java/services/Locale.java rename to app/sdks/0.6.2/server-java/src/main/java/services/Locale.java diff --git a/app/sdks/server-java/src/main/java/services/Service.java b/app/sdks/0.6.2/server-java/src/main/java/services/Service.java similarity index 100% rename from app/sdks/server-java/src/main/java/services/Service.java rename to app/sdks/0.6.2/server-java/src/main/java/services/Service.java diff --git a/app/sdks/server-java/src/main/java/services/Storage.java b/app/sdks/0.6.2/server-java/src/main/java/services/Storage.java similarity index 100% rename from app/sdks/server-java/src/main/java/services/Storage.java rename to app/sdks/0.6.2/server-java/src/main/java/services/Storage.java diff --git a/app/sdks/server-java/src/main/java/services/Teams.java b/app/sdks/0.6.2/server-java/src/main/java/services/Teams.java similarity index 100% rename from app/sdks/server-java/src/main/java/services/Teams.java rename to app/sdks/0.6.2/server-java/src/main/java/services/Teams.java diff --git a/app/sdks/server-java/src/main/java/services/Users.java b/app/sdks/0.6.2/server-java/src/main/java/services/Users.java similarity index 100% rename from app/sdks/server-java/src/main/java/services/Users.java rename to app/sdks/0.6.2/server-java/src/main/java/services/Users.java diff --git a/app/sdks/server-nodejs/CHANGELOG.md b/app/sdks/0.6.2/server-nodejs/CHANGELOG.md similarity index 100% rename from app/sdks/server-nodejs/CHANGELOG.md rename to app/sdks/0.6.2/server-nodejs/CHANGELOG.md diff --git a/app/sdks/server-nodejs/LICENSE b/app/sdks/0.6.2/server-nodejs/LICENSE similarity index 100% rename from app/sdks/server-nodejs/LICENSE rename to app/sdks/0.6.2/server-nodejs/LICENSE diff --git a/app/sdks/server-nodejs/README.md b/app/sdks/0.6.2/server-nodejs/README.md similarity index 100% rename from app/sdks/server-nodejs/README.md rename to app/sdks/0.6.2/server-nodejs/README.md diff --git a/app/sdks/server-nodejs/docs/examples/avatars/get-browser.md b/app/sdks/0.6.2/server-nodejs/docs/examples/avatars/get-browser.md similarity index 100% rename from app/sdks/server-nodejs/docs/examples/avatars/get-browser.md rename to app/sdks/0.6.2/server-nodejs/docs/examples/avatars/get-browser.md diff --git a/app/sdks/server-nodejs/docs/examples/avatars/get-credit-card.md b/app/sdks/0.6.2/server-nodejs/docs/examples/avatars/get-credit-card.md similarity index 100% rename from app/sdks/server-nodejs/docs/examples/avatars/get-credit-card.md rename to app/sdks/0.6.2/server-nodejs/docs/examples/avatars/get-credit-card.md diff --git a/app/sdks/server-nodejs/docs/examples/avatars/get-favicon.md b/app/sdks/0.6.2/server-nodejs/docs/examples/avatars/get-favicon.md similarity index 100% rename from app/sdks/server-nodejs/docs/examples/avatars/get-favicon.md rename to app/sdks/0.6.2/server-nodejs/docs/examples/avatars/get-favicon.md diff --git a/app/sdks/server-nodejs/docs/examples/avatars/get-flag.md b/app/sdks/0.6.2/server-nodejs/docs/examples/avatars/get-flag.md similarity index 100% rename from app/sdks/server-nodejs/docs/examples/avatars/get-flag.md rename to app/sdks/0.6.2/server-nodejs/docs/examples/avatars/get-flag.md diff --git a/app/sdks/server-nodejs/docs/examples/avatars/get-image.md b/app/sdks/0.6.2/server-nodejs/docs/examples/avatars/get-image.md similarity index 100% rename from app/sdks/server-nodejs/docs/examples/avatars/get-image.md rename to app/sdks/0.6.2/server-nodejs/docs/examples/avatars/get-image.md diff --git a/app/sdks/server-nodejs/docs/examples/avatars/get-q-r.md b/app/sdks/0.6.2/server-nodejs/docs/examples/avatars/get-q-r.md similarity index 100% rename from app/sdks/server-nodejs/docs/examples/avatars/get-q-r.md rename to app/sdks/0.6.2/server-nodejs/docs/examples/avatars/get-q-r.md diff --git a/app/sdks/server-nodejs/docs/examples/database/create-collection.md b/app/sdks/0.6.2/server-nodejs/docs/examples/database/create-collection.md similarity index 100% rename from app/sdks/server-nodejs/docs/examples/database/create-collection.md rename to app/sdks/0.6.2/server-nodejs/docs/examples/database/create-collection.md diff --git a/app/sdks/server-nodejs/docs/examples/database/create-document.md b/app/sdks/0.6.2/server-nodejs/docs/examples/database/create-document.md similarity index 100% rename from app/sdks/server-nodejs/docs/examples/database/create-document.md rename to app/sdks/0.6.2/server-nodejs/docs/examples/database/create-document.md diff --git a/app/sdks/server-nodejs/docs/examples/database/delete-collection.md b/app/sdks/0.6.2/server-nodejs/docs/examples/database/delete-collection.md similarity index 100% rename from app/sdks/server-nodejs/docs/examples/database/delete-collection.md rename to app/sdks/0.6.2/server-nodejs/docs/examples/database/delete-collection.md diff --git a/app/sdks/server-nodejs/docs/examples/database/delete-document.md b/app/sdks/0.6.2/server-nodejs/docs/examples/database/delete-document.md similarity index 100% rename from app/sdks/server-nodejs/docs/examples/database/delete-document.md rename to app/sdks/0.6.2/server-nodejs/docs/examples/database/delete-document.md diff --git a/app/sdks/server-nodejs/docs/examples/database/get-collection-logs.md b/app/sdks/0.6.2/server-nodejs/docs/examples/database/get-collection-logs.md similarity index 100% rename from app/sdks/server-nodejs/docs/examples/database/get-collection-logs.md rename to app/sdks/0.6.2/server-nodejs/docs/examples/database/get-collection-logs.md diff --git a/app/sdks/server-nodejs/docs/examples/database/get-collection.md b/app/sdks/0.6.2/server-nodejs/docs/examples/database/get-collection.md similarity index 100% rename from app/sdks/server-nodejs/docs/examples/database/get-collection.md rename to app/sdks/0.6.2/server-nodejs/docs/examples/database/get-collection.md diff --git a/app/sdks/server-nodejs/docs/examples/database/get-document.md b/app/sdks/0.6.2/server-nodejs/docs/examples/database/get-document.md similarity index 100% rename from app/sdks/server-nodejs/docs/examples/database/get-document.md rename to app/sdks/0.6.2/server-nodejs/docs/examples/database/get-document.md diff --git a/app/sdks/server-nodejs/docs/examples/database/list-collections.md b/app/sdks/0.6.2/server-nodejs/docs/examples/database/list-collections.md similarity index 100% rename from app/sdks/server-nodejs/docs/examples/database/list-collections.md rename to app/sdks/0.6.2/server-nodejs/docs/examples/database/list-collections.md diff --git a/app/sdks/server-nodejs/docs/examples/database/list-documents.md b/app/sdks/0.6.2/server-nodejs/docs/examples/database/list-documents.md similarity index 100% rename from app/sdks/server-nodejs/docs/examples/database/list-documents.md rename to app/sdks/0.6.2/server-nodejs/docs/examples/database/list-documents.md diff --git a/app/sdks/server-nodejs/docs/examples/database/update-collection.md b/app/sdks/0.6.2/server-nodejs/docs/examples/database/update-collection.md similarity index 100% rename from app/sdks/server-nodejs/docs/examples/database/update-collection.md rename to app/sdks/0.6.2/server-nodejs/docs/examples/database/update-collection.md diff --git a/app/sdks/server-nodejs/docs/examples/database/update-document.md b/app/sdks/0.6.2/server-nodejs/docs/examples/database/update-document.md similarity index 100% rename from app/sdks/server-nodejs/docs/examples/database/update-document.md rename to app/sdks/0.6.2/server-nodejs/docs/examples/database/update-document.md diff --git a/app/sdks/server-nodejs/docs/examples/functions/create-execution.md b/app/sdks/0.6.2/server-nodejs/docs/examples/functions/create-execution.md similarity index 100% rename from app/sdks/server-nodejs/docs/examples/functions/create-execution.md rename to app/sdks/0.6.2/server-nodejs/docs/examples/functions/create-execution.md diff --git a/app/sdks/server-nodejs/docs/examples/functions/create-tag.md b/app/sdks/0.6.2/server-nodejs/docs/examples/functions/create-tag.md similarity index 100% rename from app/sdks/server-nodejs/docs/examples/functions/create-tag.md rename to app/sdks/0.6.2/server-nodejs/docs/examples/functions/create-tag.md diff --git a/app/sdks/server-nodejs/docs/examples/functions/create.md b/app/sdks/0.6.2/server-nodejs/docs/examples/functions/create.md similarity index 100% rename from app/sdks/server-nodejs/docs/examples/functions/create.md rename to app/sdks/0.6.2/server-nodejs/docs/examples/functions/create.md diff --git a/app/sdks/server-nodejs/docs/examples/functions/delete-tag.md b/app/sdks/0.6.2/server-nodejs/docs/examples/functions/delete-tag.md similarity index 100% rename from app/sdks/server-nodejs/docs/examples/functions/delete-tag.md rename to app/sdks/0.6.2/server-nodejs/docs/examples/functions/delete-tag.md diff --git a/app/sdks/server-nodejs/docs/examples/functions/delete.md b/app/sdks/0.6.2/server-nodejs/docs/examples/functions/delete.md similarity index 100% rename from app/sdks/server-nodejs/docs/examples/functions/delete.md rename to app/sdks/0.6.2/server-nodejs/docs/examples/functions/delete.md diff --git a/app/sdks/server-nodejs/docs/examples/functions/get-execution.md b/app/sdks/0.6.2/server-nodejs/docs/examples/functions/get-execution.md similarity index 100% rename from app/sdks/server-nodejs/docs/examples/functions/get-execution.md rename to app/sdks/0.6.2/server-nodejs/docs/examples/functions/get-execution.md diff --git a/app/sdks/server-nodejs/docs/examples/functions/get-tag.md b/app/sdks/0.6.2/server-nodejs/docs/examples/functions/get-tag.md similarity index 100% rename from app/sdks/server-nodejs/docs/examples/functions/get-tag.md rename to app/sdks/0.6.2/server-nodejs/docs/examples/functions/get-tag.md diff --git a/app/sdks/server-nodejs/docs/examples/functions/get.md b/app/sdks/0.6.2/server-nodejs/docs/examples/functions/get.md similarity index 100% rename from app/sdks/server-nodejs/docs/examples/functions/get.md rename to app/sdks/0.6.2/server-nodejs/docs/examples/functions/get.md diff --git a/app/sdks/server-nodejs/docs/examples/functions/list-executions.md b/app/sdks/0.6.2/server-nodejs/docs/examples/functions/list-executions.md similarity index 100% rename from app/sdks/server-nodejs/docs/examples/functions/list-executions.md rename to app/sdks/0.6.2/server-nodejs/docs/examples/functions/list-executions.md diff --git a/app/sdks/server-nodejs/docs/examples/functions/list-tags.md b/app/sdks/0.6.2/server-nodejs/docs/examples/functions/list-tags.md similarity index 100% rename from app/sdks/server-nodejs/docs/examples/functions/list-tags.md rename to app/sdks/0.6.2/server-nodejs/docs/examples/functions/list-tags.md diff --git a/app/sdks/server-nodejs/docs/examples/functions/list.md b/app/sdks/0.6.2/server-nodejs/docs/examples/functions/list.md similarity index 100% rename from app/sdks/server-nodejs/docs/examples/functions/list.md rename to app/sdks/0.6.2/server-nodejs/docs/examples/functions/list.md diff --git a/app/sdks/server-nodejs/docs/examples/functions/update-active.md b/app/sdks/0.6.2/server-nodejs/docs/examples/functions/update-active.md similarity index 100% rename from app/sdks/server-nodejs/docs/examples/functions/update-active.md rename to app/sdks/0.6.2/server-nodejs/docs/examples/functions/update-active.md diff --git a/app/sdks/server-nodejs/docs/examples/functions/update-tag.md b/app/sdks/0.6.2/server-nodejs/docs/examples/functions/update-tag.md similarity index 100% rename from app/sdks/server-nodejs/docs/examples/functions/update-tag.md rename to app/sdks/0.6.2/server-nodejs/docs/examples/functions/update-tag.md diff --git a/app/sdks/server-nodejs/docs/examples/functions/update.md b/app/sdks/0.6.2/server-nodejs/docs/examples/functions/update.md similarity index 100% rename from app/sdks/server-nodejs/docs/examples/functions/update.md rename to app/sdks/0.6.2/server-nodejs/docs/examples/functions/update.md diff --git a/app/sdks/server-nodejs/docs/examples/health/get-anti-virus.md b/app/sdks/0.6.2/server-nodejs/docs/examples/health/get-anti-virus.md similarity index 100% rename from app/sdks/server-nodejs/docs/examples/health/get-anti-virus.md rename to app/sdks/0.6.2/server-nodejs/docs/examples/health/get-anti-virus.md diff --git a/app/sdks/server-nodejs/docs/examples/health/get-cache.md b/app/sdks/0.6.2/server-nodejs/docs/examples/health/get-cache.md similarity index 100% rename from app/sdks/server-nodejs/docs/examples/health/get-cache.md rename to app/sdks/0.6.2/server-nodejs/docs/examples/health/get-cache.md diff --git a/app/sdks/server-nodejs/docs/examples/health/get-d-b.md b/app/sdks/0.6.2/server-nodejs/docs/examples/health/get-d-b.md similarity index 100% rename from app/sdks/server-nodejs/docs/examples/health/get-d-b.md rename to app/sdks/0.6.2/server-nodejs/docs/examples/health/get-d-b.md diff --git a/app/sdks/server-nodejs/docs/examples/health/get-queue-certificates.md b/app/sdks/0.6.2/server-nodejs/docs/examples/health/get-queue-certificates.md similarity index 100% rename from app/sdks/server-nodejs/docs/examples/health/get-queue-certificates.md rename to app/sdks/0.6.2/server-nodejs/docs/examples/health/get-queue-certificates.md diff --git a/app/sdks/server-nodejs/docs/examples/health/get-queue-functions.md b/app/sdks/0.6.2/server-nodejs/docs/examples/health/get-queue-functions.md similarity index 100% rename from app/sdks/server-nodejs/docs/examples/health/get-queue-functions.md rename to app/sdks/0.6.2/server-nodejs/docs/examples/health/get-queue-functions.md diff --git a/app/sdks/server-nodejs/docs/examples/health/get-queue-logs.md b/app/sdks/0.6.2/server-nodejs/docs/examples/health/get-queue-logs.md similarity index 100% rename from app/sdks/server-nodejs/docs/examples/health/get-queue-logs.md rename to app/sdks/0.6.2/server-nodejs/docs/examples/health/get-queue-logs.md diff --git a/app/sdks/server-nodejs/docs/examples/health/get-queue-tasks.md b/app/sdks/0.6.2/server-nodejs/docs/examples/health/get-queue-tasks.md similarity index 100% rename from app/sdks/server-nodejs/docs/examples/health/get-queue-tasks.md rename to app/sdks/0.6.2/server-nodejs/docs/examples/health/get-queue-tasks.md diff --git a/app/sdks/server-nodejs/docs/examples/health/get-queue-usage.md b/app/sdks/0.6.2/server-nodejs/docs/examples/health/get-queue-usage.md similarity index 100% rename from app/sdks/server-nodejs/docs/examples/health/get-queue-usage.md rename to app/sdks/0.6.2/server-nodejs/docs/examples/health/get-queue-usage.md diff --git a/app/sdks/server-nodejs/docs/examples/health/get-queue-webhooks.md b/app/sdks/0.6.2/server-nodejs/docs/examples/health/get-queue-webhooks.md similarity index 100% rename from app/sdks/server-nodejs/docs/examples/health/get-queue-webhooks.md rename to app/sdks/0.6.2/server-nodejs/docs/examples/health/get-queue-webhooks.md diff --git a/app/sdks/server-nodejs/docs/examples/health/get-storage-anti-virus.md b/app/sdks/0.6.2/server-nodejs/docs/examples/health/get-storage-anti-virus.md similarity index 100% rename from app/sdks/server-nodejs/docs/examples/health/get-storage-anti-virus.md rename to app/sdks/0.6.2/server-nodejs/docs/examples/health/get-storage-anti-virus.md diff --git a/app/sdks/server-nodejs/docs/examples/health/get-storage-local.md b/app/sdks/0.6.2/server-nodejs/docs/examples/health/get-storage-local.md similarity index 100% rename from app/sdks/server-nodejs/docs/examples/health/get-storage-local.md rename to app/sdks/0.6.2/server-nodejs/docs/examples/health/get-storage-local.md diff --git a/app/sdks/server-nodejs/docs/examples/health/get-time.md b/app/sdks/0.6.2/server-nodejs/docs/examples/health/get-time.md similarity index 100% rename from app/sdks/server-nodejs/docs/examples/health/get-time.md rename to app/sdks/0.6.2/server-nodejs/docs/examples/health/get-time.md diff --git a/app/sdks/server-nodejs/docs/examples/health/get.md b/app/sdks/0.6.2/server-nodejs/docs/examples/health/get.md similarity index 100% rename from app/sdks/server-nodejs/docs/examples/health/get.md rename to app/sdks/0.6.2/server-nodejs/docs/examples/health/get.md diff --git a/app/sdks/server-nodejs/docs/examples/locale/get-continents.md b/app/sdks/0.6.2/server-nodejs/docs/examples/locale/get-continents.md similarity index 100% rename from app/sdks/server-nodejs/docs/examples/locale/get-continents.md rename to app/sdks/0.6.2/server-nodejs/docs/examples/locale/get-continents.md diff --git a/app/sdks/server-nodejs/docs/examples/locale/get-countries-e-u.md b/app/sdks/0.6.2/server-nodejs/docs/examples/locale/get-countries-e-u.md similarity index 100% rename from app/sdks/server-nodejs/docs/examples/locale/get-countries-e-u.md rename to app/sdks/0.6.2/server-nodejs/docs/examples/locale/get-countries-e-u.md diff --git a/app/sdks/server-nodejs/docs/examples/locale/get-countries-phones.md b/app/sdks/0.6.2/server-nodejs/docs/examples/locale/get-countries-phones.md similarity index 100% rename from app/sdks/server-nodejs/docs/examples/locale/get-countries-phones.md rename to app/sdks/0.6.2/server-nodejs/docs/examples/locale/get-countries-phones.md diff --git a/app/sdks/server-nodejs/docs/examples/locale/get-countries.md b/app/sdks/0.6.2/server-nodejs/docs/examples/locale/get-countries.md similarity index 100% rename from app/sdks/server-nodejs/docs/examples/locale/get-countries.md rename to app/sdks/0.6.2/server-nodejs/docs/examples/locale/get-countries.md diff --git a/app/sdks/server-nodejs/docs/examples/locale/get-currencies.md b/app/sdks/0.6.2/server-nodejs/docs/examples/locale/get-currencies.md similarity index 100% rename from app/sdks/server-nodejs/docs/examples/locale/get-currencies.md rename to app/sdks/0.6.2/server-nodejs/docs/examples/locale/get-currencies.md diff --git a/app/sdks/server-nodejs/docs/examples/locale/get.md b/app/sdks/0.6.2/server-nodejs/docs/examples/locale/get.md similarity index 100% rename from app/sdks/server-nodejs/docs/examples/locale/get.md rename to app/sdks/0.6.2/server-nodejs/docs/examples/locale/get.md diff --git a/app/sdks/server-nodejs/docs/examples/storage/create-file.md b/app/sdks/0.6.2/server-nodejs/docs/examples/storage/create-file.md similarity index 100% rename from app/sdks/server-nodejs/docs/examples/storage/create-file.md rename to app/sdks/0.6.2/server-nodejs/docs/examples/storage/create-file.md diff --git a/app/sdks/server-nodejs/docs/examples/storage/delete-file.md b/app/sdks/0.6.2/server-nodejs/docs/examples/storage/delete-file.md similarity index 100% rename from app/sdks/server-nodejs/docs/examples/storage/delete-file.md rename to app/sdks/0.6.2/server-nodejs/docs/examples/storage/delete-file.md diff --git a/app/sdks/server-nodejs/docs/examples/storage/get-file-download.md b/app/sdks/0.6.2/server-nodejs/docs/examples/storage/get-file-download.md similarity index 100% rename from app/sdks/server-nodejs/docs/examples/storage/get-file-download.md rename to app/sdks/0.6.2/server-nodejs/docs/examples/storage/get-file-download.md diff --git a/app/sdks/server-nodejs/docs/examples/storage/get-file-preview.md b/app/sdks/0.6.2/server-nodejs/docs/examples/storage/get-file-preview.md similarity index 100% rename from app/sdks/server-nodejs/docs/examples/storage/get-file-preview.md rename to app/sdks/0.6.2/server-nodejs/docs/examples/storage/get-file-preview.md diff --git a/app/sdks/server-nodejs/docs/examples/storage/get-file-view.md b/app/sdks/0.6.2/server-nodejs/docs/examples/storage/get-file-view.md similarity index 100% rename from app/sdks/server-nodejs/docs/examples/storage/get-file-view.md rename to app/sdks/0.6.2/server-nodejs/docs/examples/storage/get-file-view.md diff --git a/app/sdks/server-nodejs/docs/examples/storage/get-file.md b/app/sdks/0.6.2/server-nodejs/docs/examples/storage/get-file.md similarity index 100% rename from app/sdks/server-nodejs/docs/examples/storage/get-file.md rename to app/sdks/0.6.2/server-nodejs/docs/examples/storage/get-file.md diff --git a/app/sdks/server-nodejs/docs/examples/storage/list-files.md b/app/sdks/0.6.2/server-nodejs/docs/examples/storage/list-files.md similarity index 100% rename from app/sdks/server-nodejs/docs/examples/storage/list-files.md rename to app/sdks/0.6.2/server-nodejs/docs/examples/storage/list-files.md diff --git a/app/sdks/server-nodejs/docs/examples/storage/update-file.md b/app/sdks/0.6.2/server-nodejs/docs/examples/storage/update-file.md similarity index 100% rename from app/sdks/server-nodejs/docs/examples/storage/update-file.md rename to app/sdks/0.6.2/server-nodejs/docs/examples/storage/update-file.md diff --git a/app/sdks/server-nodejs/docs/examples/teams/create-membership.md b/app/sdks/0.6.2/server-nodejs/docs/examples/teams/create-membership.md similarity index 100% rename from app/sdks/server-nodejs/docs/examples/teams/create-membership.md rename to app/sdks/0.6.2/server-nodejs/docs/examples/teams/create-membership.md diff --git a/app/sdks/server-nodejs/docs/examples/teams/create.md b/app/sdks/0.6.2/server-nodejs/docs/examples/teams/create.md similarity index 100% rename from app/sdks/server-nodejs/docs/examples/teams/create.md rename to app/sdks/0.6.2/server-nodejs/docs/examples/teams/create.md diff --git a/app/sdks/server-nodejs/docs/examples/teams/delete-membership.md b/app/sdks/0.6.2/server-nodejs/docs/examples/teams/delete-membership.md similarity index 100% rename from app/sdks/server-nodejs/docs/examples/teams/delete-membership.md rename to app/sdks/0.6.2/server-nodejs/docs/examples/teams/delete-membership.md diff --git a/app/sdks/server-nodejs/docs/examples/teams/delete.md b/app/sdks/0.6.2/server-nodejs/docs/examples/teams/delete.md similarity index 100% rename from app/sdks/server-nodejs/docs/examples/teams/delete.md rename to app/sdks/0.6.2/server-nodejs/docs/examples/teams/delete.md diff --git a/app/sdks/server-nodejs/docs/examples/teams/get-memberships.md b/app/sdks/0.6.2/server-nodejs/docs/examples/teams/get-memberships.md similarity index 100% rename from app/sdks/server-nodejs/docs/examples/teams/get-memberships.md rename to app/sdks/0.6.2/server-nodejs/docs/examples/teams/get-memberships.md diff --git a/app/sdks/server-nodejs/docs/examples/teams/get.md b/app/sdks/0.6.2/server-nodejs/docs/examples/teams/get.md similarity index 100% rename from app/sdks/server-nodejs/docs/examples/teams/get.md rename to app/sdks/0.6.2/server-nodejs/docs/examples/teams/get.md diff --git a/app/sdks/server-nodejs/docs/examples/teams/list.md b/app/sdks/0.6.2/server-nodejs/docs/examples/teams/list.md similarity index 100% rename from app/sdks/server-nodejs/docs/examples/teams/list.md rename to app/sdks/0.6.2/server-nodejs/docs/examples/teams/list.md diff --git a/app/sdks/server-nodejs/docs/examples/teams/update.md b/app/sdks/0.6.2/server-nodejs/docs/examples/teams/update.md similarity index 100% rename from app/sdks/server-nodejs/docs/examples/teams/update.md rename to app/sdks/0.6.2/server-nodejs/docs/examples/teams/update.md diff --git a/app/sdks/server-nodejs/docs/examples/users/create.md b/app/sdks/0.6.2/server-nodejs/docs/examples/users/create.md similarity index 100% rename from app/sdks/server-nodejs/docs/examples/users/create.md rename to app/sdks/0.6.2/server-nodejs/docs/examples/users/create.md diff --git a/app/sdks/server-nodejs/docs/examples/users/delete-session.md b/app/sdks/0.6.2/server-nodejs/docs/examples/users/delete-session.md similarity index 100% rename from app/sdks/server-nodejs/docs/examples/users/delete-session.md rename to app/sdks/0.6.2/server-nodejs/docs/examples/users/delete-session.md diff --git a/app/sdks/server-nodejs/docs/examples/users/delete-sessions.md b/app/sdks/0.6.2/server-nodejs/docs/examples/users/delete-sessions.md similarity index 100% rename from app/sdks/server-nodejs/docs/examples/users/delete-sessions.md rename to app/sdks/0.6.2/server-nodejs/docs/examples/users/delete-sessions.md diff --git a/app/sdks/server-nodejs/docs/examples/users/get-logs.md b/app/sdks/0.6.2/server-nodejs/docs/examples/users/get-logs.md similarity index 100% rename from app/sdks/server-nodejs/docs/examples/users/get-logs.md rename to app/sdks/0.6.2/server-nodejs/docs/examples/users/get-logs.md diff --git a/app/sdks/server-nodejs/docs/examples/users/get-prefs.md b/app/sdks/0.6.2/server-nodejs/docs/examples/users/get-prefs.md similarity index 100% rename from app/sdks/server-nodejs/docs/examples/users/get-prefs.md rename to app/sdks/0.6.2/server-nodejs/docs/examples/users/get-prefs.md diff --git a/app/sdks/server-nodejs/docs/examples/users/get-sessions.md b/app/sdks/0.6.2/server-nodejs/docs/examples/users/get-sessions.md similarity index 100% rename from app/sdks/server-nodejs/docs/examples/users/get-sessions.md rename to app/sdks/0.6.2/server-nodejs/docs/examples/users/get-sessions.md diff --git a/app/sdks/server-nodejs/docs/examples/users/get.md b/app/sdks/0.6.2/server-nodejs/docs/examples/users/get.md similarity index 100% rename from app/sdks/server-nodejs/docs/examples/users/get.md rename to app/sdks/0.6.2/server-nodejs/docs/examples/users/get.md diff --git a/app/sdks/server-nodejs/docs/examples/users/list.md b/app/sdks/0.6.2/server-nodejs/docs/examples/users/list.md similarity index 100% rename from app/sdks/server-nodejs/docs/examples/users/list.md rename to app/sdks/0.6.2/server-nodejs/docs/examples/users/list.md diff --git a/app/sdks/server-nodejs/docs/examples/users/update-prefs.md b/app/sdks/0.6.2/server-nodejs/docs/examples/users/update-prefs.md similarity index 100% rename from app/sdks/server-nodejs/docs/examples/users/update-prefs.md rename to app/sdks/0.6.2/server-nodejs/docs/examples/users/update-prefs.md diff --git a/app/sdks/server-nodejs/docs/examples/users/update-status.md b/app/sdks/0.6.2/server-nodejs/docs/examples/users/update-status.md similarity index 100% rename from app/sdks/server-nodejs/docs/examples/users/update-status.md rename to app/sdks/0.6.2/server-nodejs/docs/examples/users/update-status.md diff --git a/app/sdks/server-nodejs/index.js b/app/sdks/0.6.2/server-nodejs/index.js similarity index 100% rename from app/sdks/server-nodejs/index.js rename to app/sdks/0.6.2/server-nodejs/index.js diff --git a/app/sdks/server-nodejs/lib/client.js b/app/sdks/0.6.2/server-nodejs/lib/client.js similarity index 100% rename from app/sdks/server-nodejs/lib/client.js rename to app/sdks/0.6.2/server-nodejs/lib/client.js diff --git a/app/sdks/server-nodejs/lib/service.js b/app/sdks/0.6.2/server-nodejs/lib/service.js similarity index 100% rename from app/sdks/server-nodejs/lib/service.js rename to app/sdks/0.6.2/server-nodejs/lib/service.js diff --git a/app/sdks/server-nodejs/lib/services/avatars.js b/app/sdks/0.6.2/server-nodejs/lib/services/avatars.js similarity index 100% rename from app/sdks/server-nodejs/lib/services/avatars.js rename to app/sdks/0.6.2/server-nodejs/lib/services/avatars.js diff --git a/app/sdks/server-nodejs/lib/services/database.js b/app/sdks/0.6.2/server-nodejs/lib/services/database.js similarity index 100% rename from app/sdks/server-nodejs/lib/services/database.js rename to app/sdks/0.6.2/server-nodejs/lib/services/database.js diff --git a/app/sdks/server-nodejs/lib/services/functions.js b/app/sdks/0.6.2/server-nodejs/lib/services/functions.js similarity index 100% rename from app/sdks/server-nodejs/lib/services/functions.js rename to app/sdks/0.6.2/server-nodejs/lib/services/functions.js diff --git a/app/sdks/server-nodejs/lib/services/health.js b/app/sdks/0.6.2/server-nodejs/lib/services/health.js similarity index 100% rename from app/sdks/server-nodejs/lib/services/health.js rename to app/sdks/0.6.2/server-nodejs/lib/services/health.js diff --git a/app/sdks/server-nodejs/lib/services/locale.js b/app/sdks/0.6.2/server-nodejs/lib/services/locale.js similarity index 100% rename from app/sdks/server-nodejs/lib/services/locale.js rename to app/sdks/0.6.2/server-nodejs/lib/services/locale.js diff --git a/app/sdks/server-nodejs/lib/services/storage.js b/app/sdks/0.6.2/server-nodejs/lib/services/storage.js similarity index 100% rename from app/sdks/server-nodejs/lib/services/storage.js rename to app/sdks/0.6.2/server-nodejs/lib/services/storage.js diff --git a/app/sdks/server-nodejs/lib/services/teams.js b/app/sdks/0.6.2/server-nodejs/lib/services/teams.js similarity index 100% rename from app/sdks/server-nodejs/lib/services/teams.js rename to app/sdks/0.6.2/server-nodejs/lib/services/teams.js diff --git a/app/sdks/server-nodejs/lib/services/users.js b/app/sdks/0.6.2/server-nodejs/lib/services/users.js similarity index 100% rename from app/sdks/server-nodejs/lib/services/users.js rename to app/sdks/0.6.2/server-nodejs/lib/services/users.js diff --git a/app/sdks/server-nodejs/package.json b/app/sdks/0.6.2/server-nodejs/package.json similarity index 100% rename from app/sdks/server-nodejs/package.json rename to app/sdks/0.6.2/server-nodejs/package.json diff --git a/app/sdks/server-php/CHANGELOG.md b/app/sdks/0.6.2/server-php/CHANGELOG.md similarity index 100% rename from app/sdks/server-php/CHANGELOG.md rename to app/sdks/0.6.2/server-php/CHANGELOG.md diff --git a/app/sdks/server-php/LICENSE b/app/sdks/0.6.2/server-php/LICENSE similarity index 100% rename from app/sdks/server-php/LICENSE rename to app/sdks/0.6.2/server-php/LICENSE diff --git a/app/sdks/server-php/README.md b/app/sdks/0.6.2/server-php/README.md similarity index 100% rename from app/sdks/server-php/README.md rename to app/sdks/0.6.2/server-php/README.md diff --git a/app/sdks/server-php/composer.json b/app/sdks/0.6.2/server-php/composer.json similarity index 100% rename from app/sdks/server-php/composer.json rename to app/sdks/0.6.2/server-php/composer.json diff --git a/app/sdks/server-php/docs/avatars.md b/app/sdks/0.6.2/server-php/docs/avatars.md similarity index 100% rename from app/sdks/server-php/docs/avatars.md rename to app/sdks/0.6.2/server-php/docs/avatars.md diff --git a/app/sdks/server-php/docs/database.md b/app/sdks/0.6.2/server-php/docs/database.md similarity index 100% rename from app/sdks/server-php/docs/database.md rename to app/sdks/0.6.2/server-php/docs/database.md diff --git a/app/sdks/server-php/docs/examples/avatars/get-browser.md b/app/sdks/0.6.2/server-php/docs/examples/avatars/get-browser.md similarity index 100% rename from app/sdks/server-php/docs/examples/avatars/get-browser.md rename to app/sdks/0.6.2/server-php/docs/examples/avatars/get-browser.md diff --git a/app/sdks/server-php/docs/examples/avatars/get-credit-card.md b/app/sdks/0.6.2/server-php/docs/examples/avatars/get-credit-card.md similarity index 100% rename from app/sdks/server-php/docs/examples/avatars/get-credit-card.md rename to app/sdks/0.6.2/server-php/docs/examples/avatars/get-credit-card.md diff --git a/app/sdks/server-php/docs/examples/avatars/get-favicon.md b/app/sdks/0.6.2/server-php/docs/examples/avatars/get-favicon.md similarity index 100% rename from app/sdks/server-php/docs/examples/avatars/get-favicon.md rename to app/sdks/0.6.2/server-php/docs/examples/avatars/get-favicon.md diff --git a/app/sdks/server-php/docs/examples/avatars/get-flag.md b/app/sdks/0.6.2/server-php/docs/examples/avatars/get-flag.md similarity index 100% rename from app/sdks/server-php/docs/examples/avatars/get-flag.md rename to app/sdks/0.6.2/server-php/docs/examples/avatars/get-flag.md diff --git a/app/sdks/server-php/docs/examples/avatars/get-image.md b/app/sdks/0.6.2/server-php/docs/examples/avatars/get-image.md similarity index 100% rename from app/sdks/server-php/docs/examples/avatars/get-image.md rename to app/sdks/0.6.2/server-php/docs/examples/avatars/get-image.md diff --git a/app/sdks/server-php/docs/examples/avatars/get-q-r.md b/app/sdks/0.6.2/server-php/docs/examples/avatars/get-q-r.md similarity index 100% rename from app/sdks/server-php/docs/examples/avatars/get-q-r.md rename to app/sdks/0.6.2/server-php/docs/examples/avatars/get-q-r.md diff --git a/app/sdks/server-php/docs/examples/database/create-collection.md b/app/sdks/0.6.2/server-php/docs/examples/database/create-collection.md similarity index 100% rename from app/sdks/server-php/docs/examples/database/create-collection.md rename to app/sdks/0.6.2/server-php/docs/examples/database/create-collection.md diff --git a/app/sdks/server-php/docs/examples/database/create-document.md b/app/sdks/0.6.2/server-php/docs/examples/database/create-document.md similarity index 100% rename from app/sdks/server-php/docs/examples/database/create-document.md rename to app/sdks/0.6.2/server-php/docs/examples/database/create-document.md diff --git a/app/sdks/server-php/docs/examples/database/delete-collection.md b/app/sdks/0.6.2/server-php/docs/examples/database/delete-collection.md similarity index 100% rename from app/sdks/server-php/docs/examples/database/delete-collection.md rename to app/sdks/0.6.2/server-php/docs/examples/database/delete-collection.md diff --git a/app/sdks/server-php/docs/examples/database/delete-document.md b/app/sdks/0.6.2/server-php/docs/examples/database/delete-document.md similarity index 100% rename from app/sdks/server-php/docs/examples/database/delete-document.md rename to app/sdks/0.6.2/server-php/docs/examples/database/delete-document.md diff --git a/app/sdks/server-php/docs/examples/database/get-collection-logs.md b/app/sdks/0.6.2/server-php/docs/examples/database/get-collection-logs.md similarity index 100% rename from app/sdks/server-php/docs/examples/database/get-collection-logs.md rename to app/sdks/0.6.2/server-php/docs/examples/database/get-collection-logs.md diff --git a/app/sdks/server-php/docs/examples/database/get-collection.md b/app/sdks/0.6.2/server-php/docs/examples/database/get-collection.md similarity index 100% rename from app/sdks/server-php/docs/examples/database/get-collection.md rename to app/sdks/0.6.2/server-php/docs/examples/database/get-collection.md diff --git a/app/sdks/server-php/docs/examples/database/get-document.md b/app/sdks/0.6.2/server-php/docs/examples/database/get-document.md similarity index 100% rename from app/sdks/server-php/docs/examples/database/get-document.md rename to app/sdks/0.6.2/server-php/docs/examples/database/get-document.md diff --git a/app/sdks/server-php/docs/examples/database/list-collections.md b/app/sdks/0.6.2/server-php/docs/examples/database/list-collections.md similarity index 100% rename from app/sdks/server-php/docs/examples/database/list-collections.md rename to app/sdks/0.6.2/server-php/docs/examples/database/list-collections.md diff --git a/app/sdks/server-php/docs/examples/database/list-documents.md b/app/sdks/0.6.2/server-php/docs/examples/database/list-documents.md similarity index 100% rename from app/sdks/server-php/docs/examples/database/list-documents.md rename to app/sdks/0.6.2/server-php/docs/examples/database/list-documents.md diff --git a/app/sdks/server-php/docs/examples/database/update-collection.md b/app/sdks/0.6.2/server-php/docs/examples/database/update-collection.md similarity index 100% rename from app/sdks/server-php/docs/examples/database/update-collection.md rename to app/sdks/0.6.2/server-php/docs/examples/database/update-collection.md diff --git a/app/sdks/server-php/docs/examples/database/update-document.md b/app/sdks/0.6.2/server-php/docs/examples/database/update-document.md similarity index 100% rename from app/sdks/server-php/docs/examples/database/update-document.md rename to app/sdks/0.6.2/server-php/docs/examples/database/update-document.md diff --git a/app/sdks/server-php/docs/examples/functions/create-execution.md b/app/sdks/0.6.2/server-php/docs/examples/functions/create-execution.md similarity index 100% rename from app/sdks/server-php/docs/examples/functions/create-execution.md rename to app/sdks/0.6.2/server-php/docs/examples/functions/create-execution.md diff --git a/app/sdks/server-php/docs/examples/functions/create-tag.md b/app/sdks/0.6.2/server-php/docs/examples/functions/create-tag.md similarity index 100% rename from app/sdks/server-php/docs/examples/functions/create-tag.md rename to app/sdks/0.6.2/server-php/docs/examples/functions/create-tag.md diff --git a/app/sdks/server-php/docs/examples/functions/create.md b/app/sdks/0.6.2/server-php/docs/examples/functions/create.md similarity index 100% rename from app/sdks/server-php/docs/examples/functions/create.md rename to app/sdks/0.6.2/server-php/docs/examples/functions/create.md diff --git a/app/sdks/server-php/docs/examples/functions/delete-tag.md b/app/sdks/0.6.2/server-php/docs/examples/functions/delete-tag.md similarity index 100% rename from app/sdks/server-php/docs/examples/functions/delete-tag.md rename to app/sdks/0.6.2/server-php/docs/examples/functions/delete-tag.md diff --git a/app/sdks/server-php/docs/examples/functions/delete.md b/app/sdks/0.6.2/server-php/docs/examples/functions/delete.md similarity index 100% rename from app/sdks/server-php/docs/examples/functions/delete.md rename to app/sdks/0.6.2/server-php/docs/examples/functions/delete.md diff --git a/app/sdks/server-php/docs/examples/functions/get-execution.md b/app/sdks/0.6.2/server-php/docs/examples/functions/get-execution.md similarity index 100% rename from app/sdks/server-php/docs/examples/functions/get-execution.md rename to app/sdks/0.6.2/server-php/docs/examples/functions/get-execution.md diff --git a/app/sdks/server-php/docs/examples/functions/get-tag.md b/app/sdks/0.6.2/server-php/docs/examples/functions/get-tag.md similarity index 100% rename from app/sdks/server-php/docs/examples/functions/get-tag.md rename to app/sdks/0.6.2/server-php/docs/examples/functions/get-tag.md diff --git a/app/sdks/server-php/docs/examples/functions/get.md b/app/sdks/0.6.2/server-php/docs/examples/functions/get.md similarity index 100% rename from app/sdks/server-php/docs/examples/functions/get.md rename to app/sdks/0.6.2/server-php/docs/examples/functions/get.md diff --git a/app/sdks/server-php/docs/examples/functions/list-executions.md b/app/sdks/0.6.2/server-php/docs/examples/functions/list-executions.md similarity index 100% rename from app/sdks/server-php/docs/examples/functions/list-executions.md rename to app/sdks/0.6.2/server-php/docs/examples/functions/list-executions.md diff --git a/app/sdks/server-php/docs/examples/functions/list-tags.md b/app/sdks/0.6.2/server-php/docs/examples/functions/list-tags.md similarity index 100% rename from app/sdks/server-php/docs/examples/functions/list-tags.md rename to app/sdks/0.6.2/server-php/docs/examples/functions/list-tags.md diff --git a/app/sdks/server-php/docs/examples/functions/list.md b/app/sdks/0.6.2/server-php/docs/examples/functions/list.md similarity index 100% rename from app/sdks/server-php/docs/examples/functions/list.md rename to app/sdks/0.6.2/server-php/docs/examples/functions/list.md diff --git a/app/sdks/server-php/docs/examples/functions/update-active.md b/app/sdks/0.6.2/server-php/docs/examples/functions/update-active.md similarity index 100% rename from app/sdks/server-php/docs/examples/functions/update-active.md rename to app/sdks/0.6.2/server-php/docs/examples/functions/update-active.md diff --git a/app/sdks/server-php/docs/examples/functions/update-tag.md b/app/sdks/0.6.2/server-php/docs/examples/functions/update-tag.md similarity index 100% rename from app/sdks/server-php/docs/examples/functions/update-tag.md rename to app/sdks/0.6.2/server-php/docs/examples/functions/update-tag.md diff --git a/app/sdks/server-php/docs/examples/functions/update.md b/app/sdks/0.6.2/server-php/docs/examples/functions/update.md similarity index 100% rename from app/sdks/server-php/docs/examples/functions/update.md rename to app/sdks/0.6.2/server-php/docs/examples/functions/update.md diff --git a/app/sdks/server-php/docs/examples/health/get-anti-virus.md b/app/sdks/0.6.2/server-php/docs/examples/health/get-anti-virus.md similarity index 100% rename from app/sdks/server-php/docs/examples/health/get-anti-virus.md rename to app/sdks/0.6.2/server-php/docs/examples/health/get-anti-virus.md diff --git a/app/sdks/server-php/docs/examples/health/get-cache.md b/app/sdks/0.6.2/server-php/docs/examples/health/get-cache.md similarity index 100% rename from app/sdks/server-php/docs/examples/health/get-cache.md rename to app/sdks/0.6.2/server-php/docs/examples/health/get-cache.md diff --git a/app/sdks/server-php/docs/examples/health/get-d-b.md b/app/sdks/0.6.2/server-php/docs/examples/health/get-d-b.md similarity index 100% rename from app/sdks/server-php/docs/examples/health/get-d-b.md rename to app/sdks/0.6.2/server-php/docs/examples/health/get-d-b.md diff --git a/app/sdks/server-php/docs/examples/health/get-queue-certificates.md b/app/sdks/0.6.2/server-php/docs/examples/health/get-queue-certificates.md similarity index 100% rename from app/sdks/server-php/docs/examples/health/get-queue-certificates.md rename to app/sdks/0.6.2/server-php/docs/examples/health/get-queue-certificates.md diff --git a/app/sdks/server-php/docs/examples/health/get-queue-functions.md b/app/sdks/0.6.2/server-php/docs/examples/health/get-queue-functions.md similarity index 100% rename from app/sdks/server-php/docs/examples/health/get-queue-functions.md rename to app/sdks/0.6.2/server-php/docs/examples/health/get-queue-functions.md diff --git a/app/sdks/server-php/docs/examples/health/get-queue-logs.md b/app/sdks/0.6.2/server-php/docs/examples/health/get-queue-logs.md similarity index 100% rename from app/sdks/server-php/docs/examples/health/get-queue-logs.md rename to app/sdks/0.6.2/server-php/docs/examples/health/get-queue-logs.md diff --git a/app/sdks/server-php/docs/examples/health/get-queue-tasks.md b/app/sdks/0.6.2/server-php/docs/examples/health/get-queue-tasks.md similarity index 100% rename from app/sdks/server-php/docs/examples/health/get-queue-tasks.md rename to app/sdks/0.6.2/server-php/docs/examples/health/get-queue-tasks.md diff --git a/app/sdks/server-php/docs/examples/health/get-queue-usage.md b/app/sdks/0.6.2/server-php/docs/examples/health/get-queue-usage.md similarity index 100% rename from app/sdks/server-php/docs/examples/health/get-queue-usage.md rename to app/sdks/0.6.2/server-php/docs/examples/health/get-queue-usage.md diff --git a/app/sdks/server-php/docs/examples/health/get-queue-webhooks.md b/app/sdks/0.6.2/server-php/docs/examples/health/get-queue-webhooks.md similarity index 100% rename from app/sdks/server-php/docs/examples/health/get-queue-webhooks.md rename to app/sdks/0.6.2/server-php/docs/examples/health/get-queue-webhooks.md diff --git a/app/sdks/server-php/docs/examples/health/get-storage-anti-virus.md b/app/sdks/0.6.2/server-php/docs/examples/health/get-storage-anti-virus.md similarity index 100% rename from app/sdks/server-php/docs/examples/health/get-storage-anti-virus.md rename to app/sdks/0.6.2/server-php/docs/examples/health/get-storage-anti-virus.md diff --git a/app/sdks/server-php/docs/examples/health/get-storage-local.md b/app/sdks/0.6.2/server-php/docs/examples/health/get-storage-local.md similarity index 100% rename from app/sdks/server-php/docs/examples/health/get-storage-local.md rename to app/sdks/0.6.2/server-php/docs/examples/health/get-storage-local.md diff --git a/app/sdks/server-php/docs/examples/health/get-time.md b/app/sdks/0.6.2/server-php/docs/examples/health/get-time.md similarity index 100% rename from app/sdks/server-php/docs/examples/health/get-time.md rename to app/sdks/0.6.2/server-php/docs/examples/health/get-time.md diff --git a/app/sdks/server-php/docs/examples/health/get.md b/app/sdks/0.6.2/server-php/docs/examples/health/get.md similarity index 100% rename from app/sdks/server-php/docs/examples/health/get.md rename to app/sdks/0.6.2/server-php/docs/examples/health/get.md diff --git a/app/sdks/server-php/docs/examples/locale/get-continents.md b/app/sdks/0.6.2/server-php/docs/examples/locale/get-continents.md similarity index 100% rename from app/sdks/server-php/docs/examples/locale/get-continents.md rename to app/sdks/0.6.2/server-php/docs/examples/locale/get-continents.md diff --git a/app/sdks/server-php/docs/examples/locale/get-countries-e-u.md b/app/sdks/0.6.2/server-php/docs/examples/locale/get-countries-e-u.md similarity index 100% rename from app/sdks/server-php/docs/examples/locale/get-countries-e-u.md rename to app/sdks/0.6.2/server-php/docs/examples/locale/get-countries-e-u.md diff --git a/app/sdks/server-php/docs/examples/locale/get-countries-phones.md b/app/sdks/0.6.2/server-php/docs/examples/locale/get-countries-phones.md similarity index 100% rename from app/sdks/server-php/docs/examples/locale/get-countries-phones.md rename to app/sdks/0.6.2/server-php/docs/examples/locale/get-countries-phones.md diff --git a/app/sdks/server-php/docs/examples/locale/get-countries.md b/app/sdks/0.6.2/server-php/docs/examples/locale/get-countries.md similarity index 100% rename from app/sdks/server-php/docs/examples/locale/get-countries.md rename to app/sdks/0.6.2/server-php/docs/examples/locale/get-countries.md diff --git a/app/sdks/server-php/docs/examples/locale/get-currencies.md b/app/sdks/0.6.2/server-php/docs/examples/locale/get-currencies.md similarity index 100% rename from app/sdks/server-php/docs/examples/locale/get-currencies.md rename to app/sdks/0.6.2/server-php/docs/examples/locale/get-currencies.md diff --git a/app/sdks/server-php/docs/examples/locale/get.md b/app/sdks/0.6.2/server-php/docs/examples/locale/get.md similarity index 100% rename from app/sdks/server-php/docs/examples/locale/get.md rename to app/sdks/0.6.2/server-php/docs/examples/locale/get.md diff --git a/app/sdks/server-php/docs/examples/storage/create-file.md b/app/sdks/0.6.2/server-php/docs/examples/storage/create-file.md similarity index 100% rename from app/sdks/server-php/docs/examples/storage/create-file.md rename to app/sdks/0.6.2/server-php/docs/examples/storage/create-file.md diff --git a/app/sdks/server-php/docs/examples/storage/delete-file.md b/app/sdks/0.6.2/server-php/docs/examples/storage/delete-file.md similarity index 100% rename from app/sdks/server-php/docs/examples/storage/delete-file.md rename to app/sdks/0.6.2/server-php/docs/examples/storage/delete-file.md diff --git a/app/sdks/server-php/docs/examples/storage/get-file-download.md b/app/sdks/0.6.2/server-php/docs/examples/storage/get-file-download.md similarity index 100% rename from app/sdks/server-php/docs/examples/storage/get-file-download.md rename to app/sdks/0.6.2/server-php/docs/examples/storage/get-file-download.md diff --git a/app/sdks/server-php/docs/examples/storage/get-file-preview.md b/app/sdks/0.6.2/server-php/docs/examples/storage/get-file-preview.md similarity index 100% rename from app/sdks/server-php/docs/examples/storage/get-file-preview.md rename to app/sdks/0.6.2/server-php/docs/examples/storage/get-file-preview.md diff --git a/app/sdks/server-php/docs/examples/storage/get-file-view.md b/app/sdks/0.6.2/server-php/docs/examples/storage/get-file-view.md similarity index 100% rename from app/sdks/server-php/docs/examples/storage/get-file-view.md rename to app/sdks/0.6.2/server-php/docs/examples/storage/get-file-view.md diff --git a/app/sdks/server-php/docs/examples/storage/get-file.md b/app/sdks/0.6.2/server-php/docs/examples/storage/get-file.md similarity index 100% rename from app/sdks/server-php/docs/examples/storage/get-file.md rename to app/sdks/0.6.2/server-php/docs/examples/storage/get-file.md diff --git a/app/sdks/server-php/docs/examples/storage/list-files.md b/app/sdks/0.6.2/server-php/docs/examples/storage/list-files.md similarity index 100% rename from app/sdks/server-php/docs/examples/storage/list-files.md rename to app/sdks/0.6.2/server-php/docs/examples/storage/list-files.md diff --git a/app/sdks/server-php/docs/examples/storage/update-file.md b/app/sdks/0.6.2/server-php/docs/examples/storage/update-file.md similarity index 100% rename from app/sdks/server-php/docs/examples/storage/update-file.md rename to app/sdks/0.6.2/server-php/docs/examples/storage/update-file.md diff --git a/app/sdks/server-php/docs/examples/teams/create-membership.md b/app/sdks/0.6.2/server-php/docs/examples/teams/create-membership.md similarity index 100% rename from app/sdks/server-php/docs/examples/teams/create-membership.md rename to app/sdks/0.6.2/server-php/docs/examples/teams/create-membership.md diff --git a/app/sdks/server-php/docs/examples/teams/create.md b/app/sdks/0.6.2/server-php/docs/examples/teams/create.md similarity index 100% rename from app/sdks/server-php/docs/examples/teams/create.md rename to app/sdks/0.6.2/server-php/docs/examples/teams/create.md diff --git a/app/sdks/server-php/docs/examples/teams/delete-membership.md b/app/sdks/0.6.2/server-php/docs/examples/teams/delete-membership.md similarity index 100% rename from app/sdks/server-php/docs/examples/teams/delete-membership.md rename to app/sdks/0.6.2/server-php/docs/examples/teams/delete-membership.md diff --git a/app/sdks/server-php/docs/examples/teams/delete.md b/app/sdks/0.6.2/server-php/docs/examples/teams/delete.md similarity index 100% rename from app/sdks/server-php/docs/examples/teams/delete.md rename to app/sdks/0.6.2/server-php/docs/examples/teams/delete.md diff --git a/app/sdks/server-php/docs/examples/teams/get-memberships.md b/app/sdks/0.6.2/server-php/docs/examples/teams/get-memberships.md similarity index 100% rename from app/sdks/server-php/docs/examples/teams/get-memberships.md rename to app/sdks/0.6.2/server-php/docs/examples/teams/get-memberships.md diff --git a/app/sdks/server-php/docs/examples/teams/get.md b/app/sdks/0.6.2/server-php/docs/examples/teams/get.md similarity index 100% rename from app/sdks/server-php/docs/examples/teams/get.md rename to app/sdks/0.6.2/server-php/docs/examples/teams/get.md diff --git a/app/sdks/server-php/docs/examples/teams/list.md b/app/sdks/0.6.2/server-php/docs/examples/teams/list.md similarity index 100% rename from app/sdks/server-php/docs/examples/teams/list.md rename to app/sdks/0.6.2/server-php/docs/examples/teams/list.md diff --git a/app/sdks/server-php/docs/examples/teams/update.md b/app/sdks/0.6.2/server-php/docs/examples/teams/update.md similarity index 100% rename from app/sdks/server-php/docs/examples/teams/update.md rename to app/sdks/0.6.2/server-php/docs/examples/teams/update.md diff --git a/app/sdks/server-php/docs/examples/users/create.md b/app/sdks/0.6.2/server-php/docs/examples/users/create.md similarity index 100% rename from app/sdks/server-php/docs/examples/users/create.md rename to app/sdks/0.6.2/server-php/docs/examples/users/create.md diff --git a/app/sdks/server-php/docs/examples/users/delete-session.md b/app/sdks/0.6.2/server-php/docs/examples/users/delete-session.md similarity index 100% rename from app/sdks/server-php/docs/examples/users/delete-session.md rename to app/sdks/0.6.2/server-php/docs/examples/users/delete-session.md diff --git a/app/sdks/server-php/docs/examples/users/delete-sessions.md b/app/sdks/0.6.2/server-php/docs/examples/users/delete-sessions.md similarity index 100% rename from app/sdks/server-php/docs/examples/users/delete-sessions.md rename to app/sdks/0.6.2/server-php/docs/examples/users/delete-sessions.md diff --git a/app/sdks/server-php/docs/examples/users/get-logs.md b/app/sdks/0.6.2/server-php/docs/examples/users/get-logs.md similarity index 100% rename from app/sdks/server-php/docs/examples/users/get-logs.md rename to app/sdks/0.6.2/server-php/docs/examples/users/get-logs.md diff --git a/app/sdks/server-php/docs/examples/users/get-prefs.md b/app/sdks/0.6.2/server-php/docs/examples/users/get-prefs.md similarity index 100% rename from app/sdks/server-php/docs/examples/users/get-prefs.md rename to app/sdks/0.6.2/server-php/docs/examples/users/get-prefs.md diff --git a/app/sdks/server-php/docs/examples/users/get-sessions.md b/app/sdks/0.6.2/server-php/docs/examples/users/get-sessions.md similarity index 100% rename from app/sdks/server-php/docs/examples/users/get-sessions.md rename to app/sdks/0.6.2/server-php/docs/examples/users/get-sessions.md diff --git a/app/sdks/server-php/docs/examples/users/get.md b/app/sdks/0.6.2/server-php/docs/examples/users/get.md similarity index 100% rename from app/sdks/server-php/docs/examples/users/get.md rename to app/sdks/0.6.2/server-php/docs/examples/users/get.md diff --git a/app/sdks/server-php/docs/examples/users/list.md b/app/sdks/0.6.2/server-php/docs/examples/users/list.md similarity index 100% rename from app/sdks/server-php/docs/examples/users/list.md rename to app/sdks/0.6.2/server-php/docs/examples/users/list.md diff --git a/app/sdks/server-php/docs/examples/users/update-prefs.md b/app/sdks/0.6.2/server-php/docs/examples/users/update-prefs.md similarity index 100% rename from app/sdks/server-php/docs/examples/users/update-prefs.md rename to app/sdks/0.6.2/server-php/docs/examples/users/update-prefs.md diff --git a/app/sdks/server-php/docs/examples/users/update-status.md b/app/sdks/0.6.2/server-php/docs/examples/users/update-status.md similarity index 100% rename from app/sdks/server-php/docs/examples/users/update-status.md rename to app/sdks/0.6.2/server-php/docs/examples/users/update-status.md diff --git a/app/sdks/server-php/docs/functions.md b/app/sdks/0.6.2/server-php/docs/functions.md similarity index 100% rename from app/sdks/server-php/docs/functions.md rename to app/sdks/0.6.2/server-php/docs/functions.md diff --git a/app/sdks/server-php/docs/health.md b/app/sdks/0.6.2/server-php/docs/health.md similarity index 100% rename from app/sdks/server-php/docs/health.md rename to app/sdks/0.6.2/server-php/docs/health.md diff --git a/app/sdks/server-php/docs/locale.md b/app/sdks/0.6.2/server-php/docs/locale.md similarity index 100% rename from app/sdks/server-php/docs/locale.md rename to app/sdks/0.6.2/server-php/docs/locale.md diff --git a/app/sdks/server-php/docs/storage.md b/app/sdks/0.6.2/server-php/docs/storage.md similarity index 100% rename from app/sdks/server-php/docs/storage.md rename to app/sdks/0.6.2/server-php/docs/storage.md diff --git a/app/sdks/server-php/docs/teams.md b/app/sdks/0.6.2/server-php/docs/teams.md similarity index 100% rename from app/sdks/server-php/docs/teams.md rename to app/sdks/0.6.2/server-php/docs/teams.md diff --git a/app/sdks/server-php/docs/users.md b/app/sdks/0.6.2/server-php/docs/users.md similarity index 100% rename from app/sdks/server-php/docs/users.md rename to app/sdks/0.6.2/server-php/docs/users.md diff --git a/app/sdks/server-php/src/Appwrite/Client.php b/app/sdks/0.6.2/server-php/src/Appwrite/Client.php similarity index 100% rename from app/sdks/server-php/src/Appwrite/Client.php rename to app/sdks/0.6.2/server-php/src/Appwrite/Client.php diff --git a/app/sdks/server-php/src/Appwrite/Service.php b/app/sdks/0.6.2/server-php/src/Appwrite/Service.php similarity index 100% rename from app/sdks/server-php/src/Appwrite/Service.php rename to app/sdks/0.6.2/server-php/src/Appwrite/Service.php diff --git a/app/sdks/server-php/src/Appwrite/Services/Avatars.php b/app/sdks/0.6.2/server-php/src/Appwrite/Services/Avatars.php similarity index 100% rename from app/sdks/server-php/src/Appwrite/Services/Avatars.php rename to app/sdks/0.6.2/server-php/src/Appwrite/Services/Avatars.php diff --git a/app/sdks/server-php/src/Appwrite/Services/Database.php b/app/sdks/0.6.2/server-php/src/Appwrite/Services/Database.php similarity index 100% rename from app/sdks/server-php/src/Appwrite/Services/Database.php rename to app/sdks/0.6.2/server-php/src/Appwrite/Services/Database.php diff --git a/app/sdks/server-php/src/Appwrite/Services/Functions.php b/app/sdks/0.6.2/server-php/src/Appwrite/Services/Functions.php similarity index 100% rename from app/sdks/server-php/src/Appwrite/Services/Functions.php rename to app/sdks/0.6.2/server-php/src/Appwrite/Services/Functions.php diff --git a/app/sdks/server-php/src/Appwrite/Services/Health.php b/app/sdks/0.6.2/server-php/src/Appwrite/Services/Health.php similarity index 100% rename from app/sdks/server-php/src/Appwrite/Services/Health.php rename to app/sdks/0.6.2/server-php/src/Appwrite/Services/Health.php diff --git a/app/sdks/server-php/src/Appwrite/Services/Locale.php b/app/sdks/0.6.2/server-php/src/Appwrite/Services/Locale.php similarity index 100% rename from app/sdks/server-php/src/Appwrite/Services/Locale.php rename to app/sdks/0.6.2/server-php/src/Appwrite/Services/Locale.php diff --git a/app/sdks/server-php/src/Appwrite/Services/Storage.php b/app/sdks/0.6.2/server-php/src/Appwrite/Services/Storage.php similarity index 100% rename from app/sdks/server-php/src/Appwrite/Services/Storage.php rename to app/sdks/0.6.2/server-php/src/Appwrite/Services/Storage.php diff --git a/app/sdks/server-php/src/Appwrite/Services/Teams.php b/app/sdks/0.6.2/server-php/src/Appwrite/Services/Teams.php similarity index 100% rename from app/sdks/server-php/src/Appwrite/Services/Teams.php rename to app/sdks/0.6.2/server-php/src/Appwrite/Services/Teams.php diff --git a/app/sdks/server-php/src/Appwrite/Services/Users.php b/app/sdks/0.6.2/server-php/src/Appwrite/Services/Users.php similarity index 100% rename from app/sdks/server-php/src/Appwrite/Services/Users.php rename to app/sdks/0.6.2/server-php/src/Appwrite/Services/Users.php diff --git a/app/sdks/server-python/CHANGELOG.md b/app/sdks/0.6.2/server-python/CHANGELOG.md similarity index 100% rename from app/sdks/server-python/CHANGELOG.md rename to app/sdks/0.6.2/server-python/CHANGELOG.md diff --git a/app/sdks/server-python/LICENSE b/app/sdks/0.6.2/server-python/LICENSE similarity index 100% rename from app/sdks/server-python/LICENSE rename to app/sdks/0.6.2/server-python/LICENSE diff --git a/app/sdks/server-python/README.md b/app/sdks/0.6.2/server-python/README.md similarity index 100% rename from app/sdks/server-python/README.md rename to app/sdks/0.6.2/server-python/README.md diff --git a/app/sdks/server-python/appwrite/__init__.py b/app/sdks/0.6.2/server-python/appwrite/__init__.py similarity index 100% rename from app/sdks/server-python/appwrite/__init__.py rename to app/sdks/0.6.2/server-python/appwrite/__init__.py diff --git a/app/sdks/server-python/appwrite/client.py b/app/sdks/0.6.2/server-python/appwrite/client.py similarity index 100% rename from app/sdks/server-python/appwrite/client.py rename to app/sdks/0.6.2/server-python/appwrite/client.py diff --git a/app/sdks/server-python/appwrite/service.py b/app/sdks/0.6.2/server-python/appwrite/service.py similarity index 100% rename from app/sdks/server-python/appwrite/service.py rename to app/sdks/0.6.2/server-python/appwrite/service.py diff --git a/app/sdks/server-python/appwrite/services/__init__.py b/app/sdks/0.6.2/server-python/appwrite/services/__init__.py similarity index 100% rename from app/sdks/server-python/appwrite/services/__init__.py rename to app/sdks/0.6.2/server-python/appwrite/services/__init__.py diff --git a/app/sdks/server-python/appwrite/services/avatars.py b/app/sdks/0.6.2/server-python/appwrite/services/avatars.py similarity index 100% rename from app/sdks/server-python/appwrite/services/avatars.py rename to app/sdks/0.6.2/server-python/appwrite/services/avatars.py diff --git a/app/sdks/server-python/appwrite/services/database.py b/app/sdks/0.6.2/server-python/appwrite/services/database.py similarity index 100% rename from app/sdks/server-python/appwrite/services/database.py rename to app/sdks/0.6.2/server-python/appwrite/services/database.py diff --git a/app/sdks/server-python/appwrite/services/functions.py b/app/sdks/0.6.2/server-python/appwrite/services/functions.py similarity index 100% rename from app/sdks/server-python/appwrite/services/functions.py rename to app/sdks/0.6.2/server-python/appwrite/services/functions.py diff --git a/app/sdks/server-python/appwrite/services/health.py b/app/sdks/0.6.2/server-python/appwrite/services/health.py similarity index 100% rename from app/sdks/server-python/appwrite/services/health.py rename to app/sdks/0.6.2/server-python/appwrite/services/health.py diff --git a/app/sdks/server-python/appwrite/services/locale.py b/app/sdks/0.6.2/server-python/appwrite/services/locale.py similarity index 100% rename from app/sdks/server-python/appwrite/services/locale.py rename to app/sdks/0.6.2/server-python/appwrite/services/locale.py diff --git a/app/sdks/server-python/appwrite/services/storage.py b/app/sdks/0.6.2/server-python/appwrite/services/storage.py similarity index 100% rename from app/sdks/server-python/appwrite/services/storage.py rename to app/sdks/0.6.2/server-python/appwrite/services/storage.py diff --git a/app/sdks/server-python/appwrite/services/teams.py b/app/sdks/0.6.2/server-python/appwrite/services/teams.py similarity index 100% rename from app/sdks/server-python/appwrite/services/teams.py rename to app/sdks/0.6.2/server-python/appwrite/services/teams.py diff --git a/app/sdks/server-python/appwrite/services/users.py b/app/sdks/0.6.2/server-python/appwrite/services/users.py similarity index 100% rename from app/sdks/server-python/appwrite/services/users.py rename to app/sdks/0.6.2/server-python/appwrite/services/users.py diff --git a/app/sdks/server-python/docs/examples/avatars/get-browser.md b/app/sdks/0.6.2/server-python/docs/examples/avatars/get-browser.md similarity index 100% rename from app/sdks/server-python/docs/examples/avatars/get-browser.md rename to app/sdks/0.6.2/server-python/docs/examples/avatars/get-browser.md diff --git a/app/sdks/server-python/docs/examples/avatars/get-credit-card.md b/app/sdks/0.6.2/server-python/docs/examples/avatars/get-credit-card.md similarity index 100% rename from app/sdks/server-python/docs/examples/avatars/get-credit-card.md rename to app/sdks/0.6.2/server-python/docs/examples/avatars/get-credit-card.md diff --git a/app/sdks/server-python/docs/examples/avatars/get-favicon.md b/app/sdks/0.6.2/server-python/docs/examples/avatars/get-favicon.md similarity index 100% rename from app/sdks/server-python/docs/examples/avatars/get-favicon.md rename to app/sdks/0.6.2/server-python/docs/examples/avatars/get-favicon.md diff --git a/app/sdks/server-python/docs/examples/avatars/get-flag.md b/app/sdks/0.6.2/server-python/docs/examples/avatars/get-flag.md similarity index 100% rename from app/sdks/server-python/docs/examples/avatars/get-flag.md rename to app/sdks/0.6.2/server-python/docs/examples/avatars/get-flag.md diff --git a/app/sdks/server-python/docs/examples/avatars/get-image.md b/app/sdks/0.6.2/server-python/docs/examples/avatars/get-image.md similarity index 100% rename from app/sdks/server-python/docs/examples/avatars/get-image.md rename to app/sdks/0.6.2/server-python/docs/examples/avatars/get-image.md diff --git a/app/sdks/server-python/docs/examples/avatars/get-q-r.md b/app/sdks/0.6.2/server-python/docs/examples/avatars/get-q-r.md similarity index 100% rename from app/sdks/server-python/docs/examples/avatars/get-q-r.md rename to app/sdks/0.6.2/server-python/docs/examples/avatars/get-q-r.md diff --git a/app/sdks/server-python/docs/examples/database/create-collection.md b/app/sdks/0.6.2/server-python/docs/examples/database/create-collection.md similarity index 100% rename from app/sdks/server-python/docs/examples/database/create-collection.md rename to app/sdks/0.6.2/server-python/docs/examples/database/create-collection.md diff --git a/app/sdks/server-python/docs/examples/database/create-document.md b/app/sdks/0.6.2/server-python/docs/examples/database/create-document.md similarity index 100% rename from app/sdks/server-python/docs/examples/database/create-document.md rename to app/sdks/0.6.2/server-python/docs/examples/database/create-document.md diff --git a/app/sdks/server-python/docs/examples/database/delete-collection.md b/app/sdks/0.6.2/server-python/docs/examples/database/delete-collection.md similarity index 100% rename from app/sdks/server-python/docs/examples/database/delete-collection.md rename to app/sdks/0.6.2/server-python/docs/examples/database/delete-collection.md diff --git a/app/sdks/server-python/docs/examples/database/delete-document.md b/app/sdks/0.6.2/server-python/docs/examples/database/delete-document.md similarity index 100% rename from app/sdks/server-python/docs/examples/database/delete-document.md rename to app/sdks/0.6.2/server-python/docs/examples/database/delete-document.md diff --git a/app/sdks/server-python/docs/examples/database/get-collection-logs.md b/app/sdks/0.6.2/server-python/docs/examples/database/get-collection-logs.md similarity index 100% rename from app/sdks/server-python/docs/examples/database/get-collection-logs.md rename to app/sdks/0.6.2/server-python/docs/examples/database/get-collection-logs.md diff --git a/app/sdks/server-python/docs/examples/database/get-collection.md b/app/sdks/0.6.2/server-python/docs/examples/database/get-collection.md similarity index 100% rename from app/sdks/server-python/docs/examples/database/get-collection.md rename to app/sdks/0.6.2/server-python/docs/examples/database/get-collection.md diff --git a/app/sdks/server-python/docs/examples/database/get-document.md b/app/sdks/0.6.2/server-python/docs/examples/database/get-document.md similarity index 100% rename from app/sdks/server-python/docs/examples/database/get-document.md rename to app/sdks/0.6.2/server-python/docs/examples/database/get-document.md diff --git a/app/sdks/server-python/docs/examples/database/list-collections.md b/app/sdks/0.6.2/server-python/docs/examples/database/list-collections.md similarity index 100% rename from app/sdks/server-python/docs/examples/database/list-collections.md rename to app/sdks/0.6.2/server-python/docs/examples/database/list-collections.md diff --git a/app/sdks/server-python/docs/examples/database/list-documents.md b/app/sdks/0.6.2/server-python/docs/examples/database/list-documents.md similarity index 100% rename from app/sdks/server-python/docs/examples/database/list-documents.md rename to app/sdks/0.6.2/server-python/docs/examples/database/list-documents.md diff --git a/app/sdks/server-python/docs/examples/database/update-collection.md b/app/sdks/0.6.2/server-python/docs/examples/database/update-collection.md similarity index 100% rename from app/sdks/server-python/docs/examples/database/update-collection.md rename to app/sdks/0.6.2/server-python/docs/examples/database/update-collection.md diff --git a/app/sdks/server-python/docs/examples/database/update-document.md b/app/sdks/0.6.2/server-python/docs/examples/database/update-document.md similarity index 100% rename from app/sdks/server-python/docs/examples/database/update-document.md rename to app/sdks/0.6.2/server-python/docs/examples/database/update-document.md diff --git a/app/sdks/server-python/docs/examples/functions/create-execution.md b/app/sdks/0.6.2/server-python/docs/examples/functions/create-execution.md similarity index 100% rename from app/sdks/server-python/docs/examples/functions/create-execution.md rename to app/sdks/0.6.2/server-python/docs/examples/functions/create-execution.md diff --git a/app/sdks/server-python/docs/examples/functions/create-tag.md b/app/sdks/0.6.2/server-python/docs/examples/functions/create-tag.md similarity index 100% rename from app/sdks/server-python/docs/examples/functions/create-tag.md rename to app/sdks/0.6.2/server-python/docs/examples/functions/create-tag.md diff --git a/app/sdks/server-python/docs/examples/functions/create.md b/app/sdks/0.6.2/server-python/docs/examples/functions/create.md similarity index 100% rename from app/sdks/server-python/docs/examples/functions/create.md rename to app/sdks/0.6.2/server-python/docs/examples/functions/create.md diff --git a/app/sdks/server-python/docs/examples/functions/delete-tag.md b/app/sdks/0.6.2/server-python/docs/examples/functions/delete-tag.md similarity index 100% rename from app/sdks/server-python/docs/examples/functions/delete-tag.md rename to app/sdks/0.6.2/server-python/docs/examples/functions/delete-tag.md diff --git a/app/sdks/server-python/docs/examples/functions/delete.md b/app/sdks/0.6.2/server-python/docs/examples/functions/delete.md similarity index 100% rename from app/sdks/server-python/docs/examples/functions/delete.md rename to app/sdks/0.6.2/server-python/docs/examples/functions/delete.md diff --git a/app/sdks/server-python/docs/examples/functions/get-execution.md b/app/sdks/0.6.2/server-python/docs/examples/functions/get-execution.md similarity index 100% rename from app/sdks/server-python/docs/examples/functions/get-execution.md rename to app/sdks/0.6.2/server-python/docs/examples/functions/get-execution.md diff --git a/app/sdks/server-python/docs/examples/functions/get-tag.md b/app/sdks/0.6.2/server-python/docs/examples/functions/get-tag.md similarity index 100% rename from app/sdks/server-python/docs/examples/functions/get-tag.md rename to app/sdks/0.6.2/server-python/docs/examples/functions/get-tag.md diff --git a/app/sdks/server-python/docs/examples/functions/get.md b/app/sdks/0.6.2/server-python/docs/examples/functions/get.md similarity index 100% rename from app/sdks/server-python/docs/examples/functions/get.md rename to app/sdks/0.6.2/server-python/docs/examples/functions/get.md diff --git a/app/sdks/server-python/docs/examples/functions/list-executions.md b/app/sdks/0.6.2/server-python/docs/examples/functions/list-executions.md similarity index 100% rename from app/sdks/server-python/docs/examples/functions/list-executions.md rename to app/sdks/0.6.2/server-python/docs/examples/functions/list-executions.md diff --git a/app/sdks/server-python/docs/examples/functions/list-tags.md b/app/sdks/0.6.2/server-python/docs/examples/functions/list-tags.md similarity index 100% rename from app/sdks/server-python/docs/examples/functions/list-tags.md rename to app/sdks/0.6.2/server-python/docs/examples/functions/list-tags.md diff --git a/app/sdks/server-python/docs/examples/functions/list.md b/app/sdks/0.6.2/server-python/docs/examples/functions/list.md similarity index 100% rename from app/sdks/server-python/docs/examples/functions/list.md rename to app/sdks/0.6.2/server-python/docs/examples/functions/list.md diff --git a/app/sdks/server-python/docs/examples/functions/update-active.md b/app/sdks/0.6.2/server-python/docs/examples/functions/update-active.md similarity index 100% rename from app/sdks/server-python/docs/examples/functions/update-active.md rename to app/sdks/0.6.2/server-python/docs/examples/functions/update-active.md diff --git a/app/sdks/server-python/docs/examples/functions/update-tag.md b/app/sdks/0.6.2/server-python/docs/examples/functions/update-tag.md similarity index 100% rename from app/sdks/server-python/docs/examples/functions/update-tag.md rename to app/sdks/0.6.2/server-python/docs/examples/functions/update-tag.md diff --git a/app/sdks/server-python/docs/examples/functions/update.md b/app/sdks/0.6.2/server-python/docs/examples/functions/update.md similarity index 100% rename from app/sdks/server-python/docs/examples/functions/update.md rename to app/sdks/0.6.2/server-python/docs/examples/functions/update.md diff --git a/app/sdks/server-python/docs/examples/health/get-anti-virus.md b/app/sdks/0.6.2/server-python/docs/examples/health/get-anti-virus.md similarity index 100% rename from app/sdks/server-python/docs/examples/health/get-anti-virus.md rename to app/sdks/0.6.2/server-python/docs/examples/health/get-anti-virus.md diff --git a/app/sdks/server-python/docs/examples/health/get-cache.md b/app/sdks/0.6.2/server-python/docs/examples/health/get-cache.md similarity index 100% rename from app/sdks/server-python/docs/examples/health/get-cache.md rename to app/sdks/0.6.2/server-python/docs/examples/health/get-cache.md diff --git a/app/sdks/server-python/docs/examples/health/get-d-b.md b/app/sdks/0.6.2/server-python/docs/examples/health/get-d-b.md similarity index 100% rename from app/sdks/server-python/docs/examples/health/get-d-b.md rename to app/sdks/0.6.2/server-python/docs/examples/health/get-d-b.md diff --git a/app/sdks/server-python/docs/examples/health/get-queue-certificates.md b/app/sdks/0.6.2/server-python/docs/examples/health/get-queue-certificates.md similarity index 100% rename from app/sdks/server-python/docs/examples/health/get-queue-certificates.md rename to app/sdks/0.6.2/server-python/docs/examples/health/get-queue-certificates.md diff --git a/app/sdks/server-python/docs/examples/health/get-queue-functions.md b/app/sdks/0.6.2/server-python/docs/examples/health/get-queue-functions.md similarity index 100% rename from app/sdks/server-python/docs/examples/health/get-queue-functions.md rename to app/sdks/0.6.2/server-python/docs/examples/health/get-queue-functions.md diff --git a/app/sdks/server-python/docs/examples/health/get-queue-logs.md b/app/sdks/0.6.2/server-python/docs/examples/health/get-queue-logs.md similarity index 100% rename from app/sdks/server-python/docs/examples/health/get-queue-logs.md rename to app/sdks/0.6.2/server-python/docs/examples/health/get-queue-logs.md diff --git a/app/sdks/server-python/docs/examples/health/get-queue-tasks.md b/app/sdks/0.6.2/server-python/docs/examples/health/get-queue-tasks.md similarity index 100% rename from app/sdks/server-python/docs/examples/health/get-queue-tasks.md rename to app/sdks/0.6.2/server-python/docs/examples/health/get-queue-tasks.md diff --git a/app/sdks/server-python/docs/examples/health/get-queue-usage.md b/app/sdks/0.6.2/server-python/docs/examples/health/get-queue-usage.md similarity index 100% rename from app/sdks/server-python/docs/examples/health/get-queue-usage.md rename to app/sdks/0.6.2/server-python/docs/examples/health/get-queue-usage.md diff --git a/app/sdks/server-python/docs/examples/health/get-queue-webhooks.md b/app/sdks/0.6.2/server-python/docs/examples/health/get-queue-webhooks.md similarity index 100% rename from app/sdks/server-python/docs/examples/health/get-queue-webhooks.md rename to app/sdks/0.6.2/server-python/docs/examples/health/get-queue-webhooks.md diff --git a/app/sdks/server-python/docs/examples/health/get-storage-anti-virus.md b/app/sdks/0.6.2/server-python/docs/examples/health/get-storage-anti-virus.md similarity index 100% rename from app/sdks/server-python/docs/examples/health/get-storage-anti-virus.md rename to app/sdks/0.6.2/server-python/docs/examples/health/get-storage-anti-virus.md diff --git a/app/sdks/server-python/docs/examples/health/get-storage-local.md b/app/sdks/0.6.2/server-python/docs/examples/health/get-storage-local.md similarity index 100% rename from app/sdks/server-python/docs/examples/health/get-storage-local.md rename to app/sdks/0.6.2/server-python/docs/examples/health/get-storage-local.md diff --git a/app/sdks/server-python/docs/examples/health/get-time.md b/app/sdks/0.6.2/server-python/docs/examples/health/get-time.md similarity index 100% rename from app/sdks/server-python/docs/examples/health/get-time.md rename to app/sdks/0.6.2/server-python/docs/examples/health/get-time.md diff --git a/app/sdks/server-python/docs/examples/health/get.md b/app/sdks/0.6.2/server-python/docs/examples/health/get.md similarity index 100% rename from app/sdks/server-python/docs/examples/health/get.md rename to app/sdks/0.6.2/server-python/docs/examples/health/get.md diff --git a/app/sdks/server-python/docs/examples/locale/get-continents.md b/app/sdks/0.6.2/server-python/docs/examples/locale/get-continents.md similarity index 100% rename from app/sdks/server-python/docs/examples/locale/get-continents.md rename to app/sdks/0.6.2/server-python/docs/examples/locale/get-continents.md diff --git a/app/sdks/server-python/docs/examples/locale/get-countries-e-u.md b/app/sdks/0.6.2/server-python/docs/examples/locale/get-countries-e-u.md similarity index 100% rename from app/sdks/server-python/docs/examples/locale/get-countries-e-u.md rename to app/sdks/0.6.2/server-python/docs/examples/locale/get-countries-e-u.md diff --git a/app/sdks/server-python/docs/examples/locale/get-countries-phones.md b/app/sdks/0.6.2/server-python/docs/examples/locale/get-countries-phones.md similarity index 100% rename from app/sdks/server-python/docs/examples/locale/get-countries-phones.md rename to app/sdks/0.6.2/server-python/docs/examples/locale/get-countries-phones.md diff --git a/app/sdks/server-python/docs/examples/locale/get-countries.md b/app/sdks/0.6.2/server-python/docs/examples/locale/get-countries.md similarity index 100% rename from app/sdks/server-python/docs/examples/locale/get-countries.md rename to app/sdks/0.6.2/server-python/docs/examples/locale/get-countries.md diff --git a/app/sdks/server-python/docs/examples/locale/get-currencies.md b/app/sdks/0.6.2/server-python/docs/examples/locale/get-currencies.md similarity index 100% rename from app/sdks/server-python/docs/examples/locale/get-currencies.md rename to app/sdks/0.6.2/server-python/docs/examples/locale/get-currencies.md diff --git a/app/sdks/server-python/docs/examples/locale/get.md b/app/sdks/0.6.2/server-python/docs/examples/locale/get.md similarity index 100% rename from app/sdks/server-python/docs/examples/locale/get.md rename to app/sdks/0.6.2/server-python/docs/examples/locale/get.md diff --git a/app/sdks/server-python/docs/examples/storage/create-file.md b/app/sdks/0.6.2/server-python/docs/examples/storage/create-file.md similarity index 100% rename from app/sdks/server-python/docs/examples/storage/create-file.md rename to app/sdks/0.6.2/server-python/docs/examples/storage/create-file.md diff --git a/app/sdks/server-python/docs/examples/storage/delete-file.md b/app/sdks/0.6.2/server-python/docs/examples/storage/delete-file.md similarity index 100% rename from app/sdks/server-python/docs/examples/storage/delete-file.md rename to app/sdks/0.6.2/server-python/docs/examples/storage/delete-file.md diff --git a/app/sdks/server-python/docs/examples/storage/get-file-download.md b/app/sdks/0.6.2/server-python/docs/examples/storage/get-file-download.md similarity index 100% rename from app/sdks/server-python/docs/examples/storage/get-file-download.md rename to app/sdks/0.6.2/server-python/docs/examples/storage/get-file-download.md diff --git a/app/sdks/server-python/docs/examples/storage/get-file-preview.md b/app/sdks/0.6.2/server-python/docs/examples/storage/get-file-preview.md similarity index 100% rename from app/sdks/server-python/docs/examples/storage/get-file-preview.md rename to app/sdks/0.6.2/server-python/docs/examples/storage/get-file-preview.md diff --git a/app/sdks/server-python/docs/examples/storage/get-file-view.md b/app/sdks/0.6.2/server-python/docs/examples/storage/get-file-view.md similarity index 100% rename from app/sdks/server-python/docs/examples/storage/get-file-view.md rename to app/sdks/0.6.2/server-python/docs/examples/storage/get-file-view.md diff --git a/app/sdks/server-python/docs/examples/storage/get-file.md b/app/sdks/0.6.2/server-python/docs/examples/storage/get-file.md similarity index 100% rename from app/sdks/server-python/docs/examples/storage/get-file.md rename to app/sdks/0.6.2/server-python/docs/examples/storage/get-file.md diff --git a/app/sdks/server-python/docs/examples/storage/list-files.md b/app/sdks/0.6.2/server-python/docs/examples/storage/list-files.md similarity index 100% rename from app/sdks/server-python/docs/examples/storage/list-files.md rename to app/sdks/0.6.2/server-python/docs/examples/storage/list-files.md diff --git a/app/sdks/server-python/docs/examples/storage/update-file.md b/app/sdks/0.6.2/server-python/docs/examples/storage/update-file.md similarity index 100% rename from app/sdks/server-python/docs/examples/storage/update-file.md rename to app/sdks/0.6.2/server-python/docs/examples/storage/update-file.md diff --git a/app/sdks/server-python/docs/examples/teams/create-membership.md b/app/sdks/0.6.2/server-python/docs/examples/teams/create-membership.md similarity index 100% rename from app/sdks/server-python/docs/examples/teams/create-membership.md rename to app/sdks/0.6.2/server-python/docs/examples/teams/create-membership.md diff --git a/app/sdks/server-python/docs/examples/teams/create.md b/app/sdks/0.6.2/server-python/docs/examples/teams/create.md similarity index 100% rename from app/sdks/server-python/docs/examples/teams/create.md rename to app/sdks/0.6.2/server-python/docs/examples/teams/create.md diff --git a/app/sdks/server-python/docs/examples/teams/delete-membership.md b/app/sdks/0.6.2/server-python/docs/examples/teams/delete-membership.md similarity index 100% rename from app/sdks/server-python/docs/examples/teams/delete-membership.md rename to app/sdks/0.6.2/server-python/docs/examples/teams/delete-membership.md diff --git a/app/sdks/server-python/docs/examples/teams/delete.md b/app/sdks/0.6.2/server-python/docs/examples/teams/delete.md similarity index 100% rename from app/sdks/server-python/docs/examples/teams/delete.md rename to app/sdks/0.6.2/server-python/docs/examples/teams/delete.md diff --git a/app/sdks/server-python/docs/examples/teams/get-memberships.md b/app/sdks/0.6.2/server-python/docs/examples/teams/get-memberships.md similarity index 100% rename from app/sdks/server-python/docs/examples/teams/get-memberships.md rename to app/sdks/0.6.2/server-python/docs/examples/teams/get-memberships.md diff --git a/app/sdks/server-python/docs/examples/teams/get.md b/app/sdks/0.6.2/server-python/docs/examples/teams/get.md similarity index 100% rename from app/sdks/server-python/docs/examples/teams/get.md rename to app/sdks/0.6.2/server-python/docs/examples/teams/get.md diff --git a/app/sdks/server-python/docs/examples/teams/list.md b/app/sdks/0.6.2/server-python/docs/examples/teams/list.md similarity index 100% rename from app/sdks/server-python/docs/examples/teams/list.md rename to app/sdks/0.6.2/server-python/docs/examples/teams/list.md diff --git a/app/sdks/server-python/docs/examples/teams/update.md b/app/sdks/0.6.2/server-python/docs/examples/teams/update.md similarity index 100% rename from app/sdks/server-python/docs/examples/teams/update.md rename to app/sdks/0.6.2/server-python/docs/examples/teams/update.md diff --git a/app/sdks/server-python/docs/examples/users/create.md b/app/sdks/0.6.2/server-python/docs/examples/users/create.md similarity index 100% rename from app/sdks/server-python/docs/examples/users/create.md rename to app/sdks/0.6.2/server-python/docs/examples/users/create.md diff --git a/app/sdks/server-python/docs/examples/users/delete-session.md b/app/sdks/0.6.2/server-python/docs/examples/users/delete-session.md similarity index 100% rename from app/sdks/server-python/docs/examples/users/delete-session.md rename to app/sdks/0.6.2/server-python/docs/examples/users/delete-session.md diff --git a/app/sdks/server-python/docs/examples/users/delete-sessions.md b/app/sdks/0.6.2/server-python/docs/examples/users/delete-sessions.md similarity index 100% rename from app/sdks/server-python/docs/examples/users/delete-sessions.md rename to app/sdks/0.6.2/server-python/docs/examples/users/delete-sessions.md diff --git a/app/sdks/server-python/docs/examples/users/get-logs.md b/app/sdks/0.6.2/server-python/docs/examples/users/get-logs.md similarity index 100% rename from app/sdks/server-python/docs/examples/users/get-logs.md rename to app/sdks/0.6.2/server-python/docs/examples/users/get-logs.md diff --git a/app/sdks/server-python/docs/examples/users/get-prefs.md b/app/sdks/0.6.2/server-python/docs/examples/users/get-prefs.md similarity index 100% rename from app/sdks/server-python/docs/examples/users/get-prefs.md rename to app/sdks/0.6.2/server-python/docs/examples/users/get-prefs.md diff --git a/app/sdks/server-python/docs/examples/users/get-sessions.md b/app/sdks/0.6.2/server-python/docs/examples/users/get-sessions.md similarity index 100% rename from app/sdks/server-python/docs/examples/users/get-sessions.md rename to app/sdks/0.6.2/server-python/docs/examples/users/get-sessions.md diff --git a/app/sdks/server-python/docs/examples/users/get.md b/app/sdks/0.6.2/server-python/docs/examples/users/get.md similarity index 100% rename from app/sdks/server-python/docs/examples/users/get.md rename to app/sdks/0.6.2/server-python/docs/examples/users/get.md diff --git a/app/sdks/server-python/docs/examples/users/list.md b/app/sdks/0.6.2/server-python/docs/examples/users/list.md similarity index 100% rename from app/sdks/server-python/docs/examples/users/list.md rename to app/sdks/0.6.2/server-python/docs/examples/users/list.md diff --git a/app/sdks/server-python/docs/examples/users/update-prefs.md b/app/sdks/0.6.2/server-python/docs/examples/users/update-prefs.md similarity index 100% rename from app/sdks/server-python/docs/examples/users/update-prefs.md rename to app/sdks/0.6.2/server-python/docs/examples/users/update-prefs.md diff --git a/app/sdks/server-python/docs/examples/users/update-status.md b/app/sdks/0.6.2/server-python/docs/examples/users/update-status.md similarity index 100% rename from app/sdks/server-python/docs/examples/users/update-status.md rename to app/sdks/0.6.2/server-python/docs/examples/users/update-status.md diff --git a/app/sdks/server-python/requirements.txt b/app/sdks/0.6.2/server-python/requirements.txt similarity index 100% rename from app/sdks/server-python/requirements.txt rename to app/sdks/0.6.2/server-python/requirements.txt diff --git a/app/sdks/server-python/setup.cfg b/app/sdks/0.6.2/server-python/setup.cfg similarity index 100% rename from app/sdks/server-python/setup.cfg rename to app/sdks/0.6.2/server-python/setup.cfg diff --git a/app/sdks/server-python/setup.py b/app/sdks/0.6.2/server-python/setup.py similarity index 100% rename from app/sdks/server-python/setup.py rename to app/sdks/0.6.2/server-python/setup.py diff --git a/app/sdks/server-ruby/CHANGELOG.md b/app/sdks/0.6.2/server-ruby/CHANGELOG.md similarity index 100% rename from app/sdks/server-ruby/CHANGELOG.md rename to app/sdks/0.6.2/server-ruby/CHANGELOG.md diff --git a/app/sdks/server-ruby/Gemfile b/app/sdks/0.6.2/server-ruby/Gemfile similarity index 100% rename from app/sdks/server-ruby/Gemfile rename to app/sdks/0.6.2/server-ruby/Gemfile diff --git a/app/sdks/server-ruby/LICENSE b/app/sdks/0.6.2/server-ruby/LICENSE similarity index 100% rename from app/sdks/server-ruby/LICENSE rename to app/sdks/0.6.2/server-ruby/LICENSE diff --git a/app/sdks/server-ruby/README.md b/app/sdks/0.6.2/server-ruby/README.md similarity index 100% rename from app/sdks/server-ruby/README.md rename to app/sdks/0.6.2/server-ruby/README.md diff --git a/app/sdks/server-ruby/appwrite.gemspec b/app/sdks/0.6.2/server-ruby/appwrite.gemspec similarity index 100% rename from app/sdks/server-ruby/appwrite.gemspec rename to app/sdks/0.6.2/server-ruby/appwrite.gemspec diff --git a/app/sdks/server-ruby/docs/examples/avatars/get-browser.md b/app/sdks/0.6.2/server-ruby/docs/examples/avatars/get-browser.md similarity index 100% rename from app/sdks/server-ruby/docs/examples/avatars/get-browser.md rename to app/sdks/0.6.2/server-ruby/docs/examples/avatars/get-browser.md diff --git a/app/sdks/server-ruby/docs/examples/avatars/get-credit-card.md b/app/sdks/0.6.2/server-ruby/docs/examples/avatars/get-credit-card.md similarity index 100% rename from app/sdks/server-ruby/docs/examples/avatars/get-credit-card.md rename to app/sdks/0.6.2/server-ruby/docs/examples/avatars/get-credit-card.md diff --git a/app/sdks/server-ruby/docs/examples/avatars/get-favicon.md b/app/sdks/0.6.2/server-ruby/docs/examples/avatars/get-favicon.md similarity index 100% rename from app/sdks/server-ruby/docs/examples/avatars/get-favicon.md rename to app/sdks/0.6.2/server-ruby/docs/examples/avatars/get-favicon.md diff --git a/app/sdks/server-ruby/docs/examples/avatars/get-flag.md b/app/sdks/0.6.2/server-ruby/docs/examples/avatars/get-flag.md similarity index 100% rename from app/sdks/server-ruby/docs/examples/avatars/get-flag.md rename to app/sdks/0.6.2/server-ruby/docs/examples/avatars/get-flag.md diff --git a/app/sdks/server-ruby/docs/examples/avatars/get-image.md b/app/sdks/0.6.2/server-ruby/docs/examples/avatars/get-image.md similarity index 100% rename from app/sdks/server-ruby/docs/examples/avatars/get-image.md rename to app/sdks/0.6.2/server-ruby/docs/examples/avatars/get-image.md diff --git a/app/sdks/server-ruby/docs/examples/avatars/get-q-r.md b/app/sdks/0.6.2/server-ruby/docs/examples/avatars/get-q-r.md similarity index 100% rename from app/sdks/server-ruby/docs/examples/avatars/get-q-r.md rename to app/sdks/0.6.2/server-ruby/docs/examples/avatars/get-q-r.md diff --git a/app/sdks/server-ruby/docs/examples/database/create-collection.md b/app/sdks/0.6.2/server-ruby/docs/examples/database/create-collection.md similarity index 100% rename from app/sdks/server-ruby/docs/examples/database/create-collection.md rename to app/sdks/0.6.2/server-ruby/docs/examples/database/create-collection.md diff --git a/app/sdks/server-ruby/docs/examples/database/create-document.md b/app/sdks/0.6.2/server-ruby/docs/examples/database/create-document.md similarity index 100% rename from app/sdks/server-ruby/docs/examples/database/create-document.md rename to app/sdks/0.6.2/server-ruby/docs/examples/database/create-document.md diff --git a/app/sdks/server-ruby/docs/examples/database/delete-collection.md b/app/sdks/0.6.2/server-ruby/docs/examples/database/delete-collection.md similarity index 100% rename from app/sdks/server-ruby/docs/examples/database/delete-collection.md rename to app/sdks/0.6.2/server-ruby/docs/examples/database/delete-collection.md diff --git a/app/sdks/server-ruby/docs/examples/database/delete-document.md b/app/sdks/0.6.2/server-ruby/docs/examples/database/delete-document.md similarity index 100% rename from app/sdks/server-ruby/docs/examples/database/delete-document.md rename to app/sdks/0.6.2/server-ruby/docs/examples/database/delete-document.md diff --git a/app/sdks/server-ruby/docs/examples/database/get-collection-logs.md b/app/sdks/0.6.2/server-ruby/docs/examples/database/get-collection-logs.md similarity index 100% rename from app/sdks/server-ruby/docs/examples/database/get-collection-logs.md rename to app/sdks/0.6.2/server-ruby/docs/examples/database/get-collection-logs.md diff --git a/app/sdks/server-ruby/docs/examples/database/get-collection.md b/app/sdks/0.6.2/server-ruby/docs/examples/database/get-collection.md similarity index 100% rename from app/sdks/server-ruby/docs/examples/database/get-collection.md rename to app/sdks/0.6.2/server-ruby/docs/examples/database/get-collection.md diff --git a/app/sdks/server-ruby/docs/examples/database/get-document.md b/app/sdks/0.6.2/server-ruby/docs/examples/database/get-document.md similarity index 100% rename from app/sdks/server-ruby/docs/examples/database/get-document.md rename to app/sdks/0.6.2/server-ruby/docs/examples/database/get-document.md diff --git a/app/sdks/server-ruby/docs/examples/database/list-collections.md b/app/sdks/0.6.2/server-ruby/docs/examples/database/list-collections.md similarity index 100% rename from app/sdks/server-ruby/docs/examples/database/list-collections.md rename to app/sdks/0.6.2/server-ruby/docs/examples/database/list-collections.md diff --git a/app/sdks/server-ruby/docs/examples/database/list-documents.md b/app/sdks/0.6.2/server-ruby/docs/examples/database/list-documents.md similarity index 100% rename from app/sdks/server-ruby/docs/examples/database/list-documents.md rename to app/sdks/0.6.2/server-ruby/docs/examples/database/list-documents.md diff --git a/app/sdks/server-ruby/docs/examples/database/update-collection.md b/app/sdks/0.6.2/server-ruby/docs/examples/database/update-collection.md similarity index 100% rename from app/sdks/server-ruby/docs/examples/database/update-collection.md rename to app/sdks/0.6.2/server-ruby/docs/examples/database/update-collection.md diff --git a/app/sdks/server-ruby/docs/examples/database/update-document.md b/app/sdks/0.6.2/server-ruby/docs/examples/database/update-document.md similarity index 100% rename from app/sdks/server-ruby/docs/examples/database/update-document.md rename to app/sdks/0.6.2/server-ruby/docs/examples/database/update-document.md diff --git a/app/sdks/server-ruby/docs/examples/health/get-anti-virus.md b/app/sdks/0.6.2/server-ruby/docs/examples/health/get-anti-virus.md similarity index 100% rename from app/sdks/server-ruby/docs/examples/health/get-anti-virus.md rename to app/sdks/0.6.2/server-ruby/docs/examples/health/get-anti-virus.md diff --git a/app/sdks/server-ruby/docs/examples/health/get-cache.md b/app/sdks/0.6.2/server-ruby/docs/examples/health/get-cache.md similarity index 100% rename from app/sdks/server-ruby/docs/examples/health/get-cache.md rename to app/sdks/0.6.2/server-ruby/docs/examples/health/get-cache.md diff --git a/app/sdks/server-ruby/docs/examples/health/get-d-b.md b/app/sdks/0.6.2/server-ruby/docs/examples/health/get-d-b.md similarity index 100% rename from app/sdks/server-ruby/docs/examples/health/get-d-b.md rename to app/sdks/0.6.2/server-ruby/docs/examples/health/get-d-b.md diff --git a/app/sdks/server-ruby/docs/examples/health/get-queue-certificates.md b/app/sdks/0.6.2/server-ruby/docs/examples/health/get-queue-certificates.md similarity index 100% rename from app/sdks/server-ruby/docs/examples/health/get-queue-certificates.md rename to app/sdks/0.6.2/server-ruby/docs/examples/health/get-queue-certificates.md diff --git a/app/sdks/server-ruby/docs/examples/health/get-queue-functions.md b/app/sdks/0.6.2/server-ruby/docs/examples/health/get-queue-functions.md similarity index 100% rename from app/sdks/server-ruby/docs/examples/health/get-queue-functions.md rename to app/sdks/0.6.2/server-ruby/docs/examples/health/get-queue-functions.md diff --git a/app/sdks/server-ruby/docs/examples/health/get-queue-logs.md b/app/sdks/0.6.2/server-ruby/docs/examples/health/get-queue-logs.md similarity index 100% rename from app/sdks/server-ruby/docs/examples/health/get-queue-logs.md rename to app/sdks/0.6.2/server-ruby/docs/examples/health/get-queue-logs.md diff --git a/app/sdks/server-ruby/docs/examples/health/get-queue-tasks.md b/app/sdks/0.6.2/server-ruby/docs/examples/health/get-queue-tasks.md similarity index 100% rename from app/sdks/server-ruby/docs/examples/health/get-queue-tasks.md rename to app/sdks/0.6.2/server-ruby/docs/examples/health/get-queue-tasks.md diff --git a/app/sdks/server-ruby/docs/examples/health/get-queue-usage.md b/app/sdks/0.6.2/server-ruby/docs/examples/health/get-queue-usage.md similarity index 100% rename from app/sdks/server-ruby/docs/examples/health/get-queue-usage.md rename to app/sdks/0.6.2/server-ruby/docs/examples/health/get-queue-usage.md diff --git a/app/sdks/server-ruby/docs/examples/health/get-queue-webhooks.md b/app/sdks/0.6.2/server-ruby/docs/examples/health/get-queue-webhooks.md similarity index 100% rename from app/sdks/server-ruby/docs/examples/health/get-queue-webhooks.md rename to app/sdks/0.6.2/server-ruby/docs/examples/health/get-queue-webhooks.md diff --git a/app/sdks/server-ruby/docs/examples/health/get-storage-local.md b/app/sdks/0.6.2/server-ruby/docs/examples/health/get-storage-local.md similarity index 100% rename from app/sdks/server-ruby/docs/examples/health/get-storage-local.md rename to app/sdks/0.6.2/server-ruby/docs/examples/health/get-storage-local.md diff --git a/app/sdks/server-ruby/docs/examples/health/get-time.md b/app/sdks/0.6.2/server-ruby/docs/examples/health/get-time.md similarity index 100% rename from app/sdks/server-ruby/docs/examples/health/get-time.md rename to app/sdks/0.6.2/server-ruby/docs/examples/health/get-time.md diff --git a/app/sdks/server-ruby/docs/examples/health/get.md b/app/sdks/0.6.2/server-ruby/docs/examples/health/get.md similarity index 100% rename from app/sdks/server-ruby/docs/examples/health/get.md rename to app/sdks/0.6.2/server-ruby/docs/examples/health/get.md diff --git a/app/sdks/server-ruby/docs/examples/locale/get-continents.md b/app/sdks/0.6.2/server-ruby/docs/examples/locale/get-continents.md similarity index 100% rename from app/sdks/server-ruby/docs/examples/locale/get-continents.md rename to app/sdks/0.6.2/server-ruby/docs/examples/locale/get-continents.md diff --git a/app/sdks/server-ruby/docs/examples/locale/get-countries-e-u.md b/app/sdks/0.6.2/server-ruby/docs/examples/locale/get-countries-e-u.md similarity index 100% rename from app/sdks/server-ruby/docs/examples/locale/get-countries-e-u.md rename to app/sdks/0.6.2/server-ruby/docs/examples/locale/get-countries-e-u.md diff --git a/app/sdks/server-ruby/docs/examples/locale/get-countries-phones.md b/app/sdks/0.6.2/server-ruby/docs/examples/locale/get-countries-phones.md similarity index 100% rename from app/sdks/server-ruby/docs/examples/locale/get-countries-phones.md rename to app/sdks/0.6.2/server-ruby/docs/examples/locale/get-countries-phones.md diff --git a/app/sdks/server-ruby/docs/examples/locale/get-countries.md b/app/sdks/0.6.2/server-ruby/docs/examples/locale/get-countries.md similarity index 100% rename from app/sdks/server-ruby/docs/examples/locale/get-countries.md rename to app/sdks/0.6.2/server-ruby/docs/examples/locale/get-countries.md diff --git a/app/sdks/server-ruby/docs/examples/locale/get-currencies.md b/app/sdks/0.6.2/server-ruby/docs/examples/locale/get-currencies.md similarity index 100% rename from app/sdks/server-ruby/docs/examples/locale/get-currencies.md rename to app/sdks/0.6.2/server-ruby/docs/examples/locale/get-currencies.md diff --git a/app/sdks/server-ruby/docs/examples/locale/get.md b/app/sdks/0.6.2/server-ruby/docs/examples/locale/get.md similarity index 100% rename from app/sdks/server-ruby/docs/examples/locale/get.md rename to app/sdks/0.6.2/server-ruby/docs/examples/locale/get.md diff --git a/app/sdks/server-ruby/docs/examples/storage/create-file.md b/app/sdks/0.6.2/server-ruby/docs/examples/storage/create-file.md similarity index 100% rename from app/sdks/server-ruby/docs/examples/storage/create-file.md rename to app/sdks/0.6.2/server-ruby/docs/examples/storage/create-file.md diff --git a/app/sdks/server-ruby/docs/examples/storage/delete-file.md b/app/sdks/0.6.2/server-ruby/docs/examples/storage/delete-file.md similarity index 100% rename from app/sdks/server-ruby/docs/examples/storage/delete-file.md rename to app/sdks/0.6.2/server-ruby/docs/examples/storage/delete-file.md diff --git a/app/sdks/server-ruby/docs/examples/storage/get-file-download.md b/app/sdks/0.6.2/server-ruby/docs/examples/storage/get-file-download.md similarity index 100% rename from app/sdks/server-ruby/docs/examples/storage/get-file-download.md rename to app/sdks/0.6.2/server-ruby/docs/examples/storage/get-file-download.md diff --git a/app/sdks/server-ruby/docs/examples/storage/get-file-preview.md b/app/sdks/0.6.2/server-ruby/docs/examples/storage/get-file-preview.md similarity index 100% rename from app/sdks/server-ruby/docs/examples/storage/get-file-preview.md rename to app/sdks/0.6.2/server-ruby/docs/examples/storage/get-file-preview.md diff --git a/app/sdks/server-ruby/docs/examples/storage/get-file-view.md b/app/sdks/0.6.2/server-ruby/docs/examples/storage/get-file-view.md similarity index 100% rename from app/sdks/server-ruby/docs/examples/storage/get-file-view.md rename to app/sdks/0.6.2/server-ruby/docs/examples/storage/get-file-view.md diff --git a/app/sdks/server-ruby/docs/examples/storage/get-file.md b/app/sdks/0.6.2/server-ruby/docs/examples/storage/get-file.md similarity index 100% rename from app/sdks/server-ruby/docs/examples/storage/get-file.md rename to app/sdks/0.6.2/server-ruby/docs/examples/storage/get-file.md diff --git a/app/sdks/server-ruby/docs/examples/storage/list-files.md b/app/sdks/0.6.2/server-ruby/docs/examples/storage/list-files.md similarity index 100% rename from app/sdks/server-ruby/docs/examples/storage/list-files.md rename to app/sdks/0.6.2/server-ruby/docs/examples/storage/list-files.md diff --git a/app/sdks/server-ruby/docs/examples/storage/update-file.md b/app/sdks/0.6.2/server-ruby/docs/examples/storage/update-file.md similarity index 100% rename from app/sdks/server-ruby/docs/examples/storage/update-file.md rename to app/sdks/0.6.2/server-ruby/docs/examples/storage/update-file.md diff --git a/app/sdks/server-ruby/docs/examples/teams/create-membership.md b/app/sdks/0.6.2/server-ruby/docs/examples/teams/create-membership.md similarity index 100% rename from app/sdks/server-ruby/docs/examples/teams/create-membership.md rename to app/sdks/0.6.2/server-ruby/docs/examples/teams/create-membership.md diff --git a/app/sdks/server-ruby/docs/examples/teams/create.md b/app/sdks/0.6.2/server-ruby/docs/examples/teams/create.md similarity index 100% rename from app/sdks/server-ruby/docs/examples/teams/create.md rename to app/sdks/0.6.2/server-ruby/docs/examples/teams/create.md diff --git a/app/sdks/server-ruby/docs/examples/teams/delete-membership.md b/app/sdks/0.6.2/server-ruby/docs/examples/teams/delete-membership.md similarity index 100% rename from app/sdks/server-ruby/docs/examples/teams/delete-membership.md rename to app/sdks/0.6.2/server-ruby/docs/examples/teams/delete-membership.md diff --git a/app/sdks/server-ruby/docs/examples/teams/delete.md b/app/sdks/0.6.2/server-ruby/docs/examples/teams/delete.md similarity index 100% rename from app/sdks/server-ruby/docs/examples/teams/delete.md rename to app/sdks/0.6.2/server-ruby/docs/examples/teams/delete.md diff --git a/app/sdks/server-ruby/docs/examples/teams/get-memberships.md b/app/sdks/0.6.2/server-ruby/docs/examples/teams/get-memberships.md similarity index 100% rename from app/sdks/server-ruby/docs/examples/teams/get-memberships.md rename to app/sdks/0.6.2/server-ruby/docs/examples/teams/get-memberships.md diff --git a/app/sdks/server-ruby/docs/examples/teams/get.md b/app/sdks/0.6.2/server-ruby/docs/examples/teams/get.md similarity index 100% rename from app/sdks/server-ruby/docs/examples/teams/get.md rename to app/sdks/0.6.2/server-ruby/docs/examples/teams/get.md diff --git a/app/sdks/server-ruby/docs/examples/teams/list.md b/app/sdks/0.6.2/server-ruby/docs/examples/teams/list.md similarity index 100% rename from app/sdks/server-ruby/docs/examples/teams/list.md rename to app/sdks/0.6.2/server-ruby/docs/examples/teams/list.md diff --git a/app/sdks/server-ruby/docs/examples/teams/update.md b/app/sdks/0.6.2/server-ruby/docs/examples/teams/update.md similarity index 100% rename from app/sdks/server-ruby/docs/examples/teams/update.md rename to app/sdks/0.6.2/server-ruby/docs/examples/teams/update.md diff --git a/app/sdks/server-ruby/docs/examples/users/create.md b/app/sdks/0.6.2/server-ruby/docs/examples/users/create.md similarity index 100% rename from app/sdks/server-ruby/docs/examples/users/create.md rename to app/sdks/0.6.2/server-ruby/docs/examples/users/create.md diff --git a/app/sdks/server-ruby/docs/examples/users/delete-session.md b/app/sdks/0.6.2/server-ruby/docs/examples/users/delete-session.md similarity index 100% rename from app/sdks/server-ruby/docs/examples/users/delete-session.md rename to app/sdks/0.6.2/server-ruby/docs/examples/users/delete-session.md diff --git a/app/sdks/server-ruby/docs/examples/users/delete-sessions.md b/app/sdks/0.6.2/server-ruby/docs/examples/users/delete-sessions.md similarity index 100% rename from app/sdks/server-ruby/docs/examples/users/delete-sessions.md rename to app/sdks/0.6.2/server-ruby/docs/examples/users/delete-sessions.md diff --git a/app/sdks/server-ruby/docs/examples/users/get-logs.md b/app/sdks/0.6.2/server-ruby/docs/examples/users/get-logs.md similarity index 100% rename from app/sdks/server-ruby/docs/examples/users/get-logs.md rename to app/sdks/0.6.2/server-ruby/docs/examples/users/get-logs.md diff --git a/app/sdks/server-ruby/docs/examples/users/get-prefs.md b/app/sdks/0.6.2/server-ruby/docs/examples/users/get-prefs.md similarity index 100% rename from app/sdks/server-ruby/docs/examples/users/get-prefs.md rename to app/sdks/0.6.2/server-ruby/docs/examples/users/get-prefs.md diff --git a/app/sdks/server-ruby/docs/examples/users/get-sessions.md b/app/sdks/0.6.2/server-ruby/docs/examples/users/get-sessions.md similarity index 100% rename from app/sdks/server-ruby/docs/examples/users/get-sessions.md rename to app/sdks/0.6.2/server-ruby/docs/examples/users/get-sessions.md diff --git a/app/sdks/server-ruby/docs/examples/users/get.md b/app/sdks/0.6.2/server-ruby/docs/examples/users/get.md similarity index 100% rename from app/sdks/server-ruby/docs/examples/users/get.md rename to app/sdks/0.6.2/server-ruby/docs/examples/users/get.md diff --git a/app/sdks/server-ruby/docs/examples/users/list.md b/app/sdks/0.6.2/server-ruby/docs/examples/users/list.md similarity index 100% rename from app/sdks/server-ruby/docs/examples/users/list.md rename to app/sdks/0.6.2/server-ruby/docs/examples/users/list.md diff --git a/app/sdks/server-ruby/docs/examples/users/update-prefs.md b/app/sdks/0.6.2/server-ruby/docs/examples/users/update-prefs.md similarity index 100% rename from app/sdks/server-ruby/docs/examples/users/update-prefs.md rename to app/sdks/0.6.2/server-ruby/docs/examples/users/update-prefs.md diff --git a/app/sdks/server-ruby/docs/examples/users/update-status.md b/app/sdks/0.6.2/server-ruby/docs/examples/users/update-status.md similarity index 100% rename from app/sdks/server-ruby/docs/examples/users/update-status.md rename to app/sdks/0.6.2/server-ruby/docs/examples/users/update-status.md diff --git a/app/sdks/server-ruby/lib/appwrite.rb b/app/sdks/0.6.2/server-ruby/lib/appwrite.rb similarity index 100% rename from app/sdks/server-ruby/lib/appwrite.rb rename to app/sdks/0.6.2/server-ruby/lib/appwrite.rb diff --git a/app/sdks/server-ruby/lib/appwrite/client.rb b/app/sdks/0.6.2/server-ruby/lib/appwrite/client.rb similarity index 100% rename from app/sdks/server-ruby/lib/appwrite/client.rb rename to app/sdks/0.6.2/server-ruby/lib/appwrite/client.rb diff --git a/app/sdks/server-ruby/lib/appwrite/service.rb b/app/sdks/0.6.2/server-ruby/lib/appwrite/service.rb similarity index 100% rename from app/sdks/server-ruby/lib/appwrite/service.rb rename to app/sdks/0.6.2/server-ruby/lib/appwrite/service.rb diff --git a/app/sdks/server-ruby/lib/appwrite/services/avatars.rb b/app/sdks/0.6.2/server-ruby/lib/appwrite/services/avatars.rb similarity index 100% rename from app/sdks/server-ruby/lib/appwrite/services/avatars.rb rename to app/sdks/0.6.2/server-ruby/lib/appwrite/services/avatars.rb diff --git a/app/sdks/server-ruby/lib/appwrite/services/database.rb b/app/sdks/0.6.2/server-ruby/lib/appwrite/services/database.rb similarity index 100% rename from app/sdks/server-ruby/lib/appwrite/services/database.rb rename to app/sdks/0.6.2/server-ruby/lib/appwrite/services/database.rb diff --git a/app/sdks/server-ruby/lib/appwrite/services/functions.rb b/app/sdks/0.6.2/server-ruby/lib/appwrite/services/functions.rb similarity index 100% rename from app/sdks/server-ruby/lib/appwrite/services/functions.rb rename to app/sdks/0.6.2/server-ruby/lib/appwrite/services/functions.rb diff --git a/app/sdks/server-ruby/lib/appwrite/services/health.rb b/app/sdks/0.6.2/server-ruby/lib/appwrite/services/health.rb similarity index 100% rename from app/sdks/server-ruby/lib/appwrite/services/health.rb rename to app/sdks/0.6.2/server-ruby/lib/appwrite/services/health.rb diff --git a/app/sdks/server-ruby/lib/appwrite/services/locale.rb b/app/sdks/0.6.2/server-ruby/lib/appwrite/services/locale.rb similarity index 100% rename from app/sdks/server-ruby/lib/appwrite/services/locale.rb rename to app/sdks/0.6.2/server-ruby/lib/appwrite/services/locale.rb diff --git a/app/sdks/server-ruby/lib/appwrite/services/storage.rb b/app/sdks/0.6.2/server-ruby/lib/appwrite/services/storage.rb similarity index 100% rename from app/sdks/server-ruby/lib/appwrite/services/storage.rb rename to app/sdks/0.6.2/server-ruby/lib/appwrite/services/storage.rb diff --git a/app/sdks/server-ruby/lib/appwrite/services/teams.rb b/app/sdks/0.6.2/server-ruby/lib/appwrite/services/teams.rb similarity index 100% rename from app/sdks/server-ruby/lib/appwrite/services/teams.rb rename to app/sdks/0.6.2/server-ruby/lib/appwrite/services/teams.rb diff --git a/app/sdks/server-ruby/lib/appwrite/services/users.rb b/app/sdks/0.6.2/server-ruby/lib/appwrite/services/users.rb similarity index 100% rename from app/sdks/server-ruby/lib/appwrite/services/users.rb rename to app/sdks/0.6.2/server-ruby/lib/appwrite/services/users.rb diff --git a/app/sdks/0.7.0/client-flutter-dev/CHANGELOG.md b/app/sdks/0.7.0/client-flutter-dev/CHANGELOG.md new file mode 100644 index 0000000000..2e9b0e0a91 --- /dev/null +++ b/app/sdks/0.7.0/client-flutter-dev/CHANGELOG.md @@ -0,0 +1,64 @@ +## 0.3.2 + +- Fixed package namespaces + +## 0.3.1 + +- Downgraded meta package version to 1.1.8 + +## 0.3.0 + +- Updated package dependencies (@lohanidamodar) +- Added Flutter for Web compatibility (@lohanidamodar) + +## 0.2.3 + +- Fixed OAuth2 cookie bug, where a new session cookie couldn't overwrite an old cookie + +## 0.2.2 + +- Fixed an error that happend when the OAuth session creation request was sent before any other API call +- Fixed a bug in the Avatars service where location URL generation had syntax error + +## 0.2.1 + +- Fixed callback scheme + +## 0.2.0 + +- Updated flutter_web_auth plugin to version 0.2.4 +- Added per project unique callback for OAuth2 redirects to aviod conflicts between multiple Appwrite projects + +## 0.1.1 + +- Updated flutter_web_auth version + +## 0.1.0 + +- Added examples file +- Some minor style fixes + +## 0.0.14 + +- Using MultipartFile for file uploads + +## 0.0.13 + +- Fix for file upload method + +## 0.0.12 + +- Added file upload support for storage service + +## 0.0.11 + +- Added integration with web auth plugin to support Appwrite OAuth API + +## 0.0.9 + +- Updated deafult params + +## 0.0.8 + +- Fixed compilation error in Client class +- Shorter description for package \ No newline at end of file diff --git a/app/sdks/0.7.0/client-flutter-dev/LICENSE b/app/sdks/0.7.0/client-flutter-dev/LICENSE new file mode 100644 index 0000000000..fc7c051a91 --- /dev/null +++ b/app/sdks/0.7.0/client-flutter-dev/LICENSE @@ -0,0 +1,12 @@ +Copyright (c) 2019 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: + + 1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. + + 2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. + + 3. Neither the name Appwrite nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. \ No newline at end of file diff --git a/app/sdks/0.7.0/client-flutter-dev/README.md b/app/sdks/0.7.0/client-flutter-dev/README.md new file mode 100644 index 0000000000..2c0ba754c3 --- /dev/null +++ b/app/sdks/0.7.0/client-flutter-dev/README.md @@ -0,0 +1,38 @@ +# Appwrite Flutter (Dev Channel) SDK + +[![pub package](https://img.shields.io/pub/v/appwrite.svg)](https://pub.dartlang.org/packages/appwrite) +![License](https://img.shields.io/github/license/appwrite/sdk-for-flutter-dev.svg?v=1) +![Version](https://img.shields.io/badge/api%20version-0.6.2-blue.svg?v=1) + +**This SDK is compatible with Appwrite server version 0.6.2. For older versions, please check previous releases.** + +Appwrite is an open-source backend as a service server that abstract and simplify complex and repetitive development tasks behind a very simple to use REST API. Appwrite aims to help you develop your apps faster and in a more secure way. + Use the Flutter (Dev Channel) SDK to integrate your app with the Appwrite server to easily start interacting with all of Appwrite backend APIs and tools. + For full API documentation and tutorials go to [https://appwrite.io/docs](https://appwrite.io/docs) + + + +![Appwrite](https://appwrite.io/images/github.png) + +## Installation + +Add this to your package's `pubspec.yaml` file: + +```yml +dependencies: + appwrite_dev: ^0.3.2 +``` + +You can install packages from the command line: + +```bash +pub get appwrite_dev +``` + +## Contribution + +This library is auto-generated by Appwrite custom [SDK Generator](https://github.com/appwrite/sdk-generator). To learn more about how you can help us improve this SDK, please check the [contribution guide](https://github.com/appwrite/sdk-generator/blob/master/CONTRIBUTING.md) before sending a pull-request. + +## License + +Please see the [BSD-3-Clause license](https://raw.githubusercontent.com/appwrite/appwrite/master/LICENSE) file for more information. \ No newline at end of file diff --git a/app/sdks/0.7.0/client-flutter-dev/docs/examples/account/create-o-auth2session.md b/app/sdks/0.7.0/client-flutter-dev/docs/examples/account/create-o-auth2session.md new file mode 100644 index 0000000000..aae9d5f9a0 --- /dev/null +++ b/app/sdks/0.7.0/client-flutter-dev/docs/examples/account/create-o-auth2session.md @@ -0,0 +1,22 @@ +import 'package:appwrite_dev/appwrite_dev.dart'; + +void main() { // Init SDK + Client client = Client(); + Account account = Account(client); + + client + .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID + ; + + Future result = account.createOAuth2Session( + provider: 'bitbucket', + ); + + result + .then((response) { + print(response); + }).catchError((error) { + print(error.response); + }); +} \ No newline at end of file diff --git a/app/sdks/0.7.0/client-flutter-dev/docs/examples/account/create-recovery.md b/app/sdks/0.7.0/client-flutter-dev/docs/examples/account/create-recovery.md new file mode 100644 index 0000000000..32fe469cff --- /dev/null +++ b/app/sdks/0.7.0/client-flutter-dev/docs/examples/account/create-recovery.md @@ -0,0 +1,23 @@ +import 'package:appwrite_dev/appwrite_dev.dart'; + +void main() { // Init SDK + Client client = Client(); + Account account = Account(client); + + client + .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID + ; + + Future result = account.createRecovery( + email: 'email@example.com', + url: 'https://example.com', + ); + + result + .then((response) { + print(response); + }).catchError((error) { + print(error.response); + }); +} \ No newline at end of file diff --git a/app/sdks/0.7.0/client-flutter-dev/docs/examples/account/create-session.md b/app/sdks/0.7.0/client-flutter-dev/docs/examples/account/create-session.md new file mode 100644 index 0000000000..a5930877f4 --- /dev/null +++ b/app/sdks/0.7.0/client-flutter-dev/docs/examples/account/create-session.md @@ -0,0 +1,23 @@ +import 'package:appwrite_dev/appwrite_dev.dart'; + +void main() { // Init SDK + Client client = Client(); + Account account = Account(client); + + client + .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID + ; + + Future result = account.createSession( + email: 'email@example.com', + password: 'password', + ); + + result + .then((response) { + print(response); + }).catchError((error) { + print(error.response); + }); +} \ No newline at end of file diff --git a/app/sdks/0.7.0/client-flutter-dev/docs/examples/account/create-verification.md b/app/sdks/0.7.0/client-flutter-dev/docs/examples/account/create-verification.md new file mode 100644 index 0000000000..738f22df42 --- /dev/null +++ b/app/sdks/0.7.0/client-flutter-dev/docs/examples/account/create-verification.md @@ -0,0 +1,22 @@ +import 'package:appwrite_dev/appwrite_dev.dart'; + +void main() { // Init SDK + Client client = Client(); + Account account = Account(client); + + client + .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID + ; + + Future result = account.createVerification( + url: 'https://example.com', + ); + + result + .then((response) { + print(response); + }).catchError((error) { + print(error.response); + }); +} \ No newline at end of file diff --git a/app/sdks/0.7.0/client-flutter-dev/docs/examples/account/create.md b/app/sdks/0.7.0/client-flutter-dev/docs/examples/account/create.md new file mode 100644 index 0000000000..1f92976c39 --- /dev/null +++ b/app/sdks/0.7.0/client-flutter-dev/docs/examples/account/create.md @@ -0,0 +1,23 @@ +import 'package:appwrite_dev/appwrite_dev.dart'; + +void main() { // Init SDK + Client client = Client(); + Account account = Account(client); + + client + .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID + ; + + Future result = account.create( + email: 'email@example.com', + password: 'password', + ); + + result + .then((response) { + print(response); + }).catchError((error) { + print(error.response); + }); +} \ No newline at end of file diff --git a/app/sdks/0.7.0/client-flutter-dev/docs/examples/account/delete-session.md b/app/sdks/0.7.0/client-flutter-dev/docs/examples/account/delete-session.md new file mode 100644 index 0000000000..95b3641387 --- /dev/null +++ b/app/sdks/0.7.0/client-flutter-dev/docs/examples/account/delete-session.md @@ -0,0 +1,22 @@ +import 'package:appwrite_dev/appwrite_dev.dart'; + +void main() { // Init SDK + Client client = Client(); + Account account = Account(client); + + client + .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID + ; + + Future result = account.deleteSession( + sessionId: '[SESSION_ID]', + ); + + result + .then((response) { + print(response); + }).catchError((error) { + print(error.response); + }); +} \ No newline at end of file diff --git a/app/sdks/0.7.0/client-flutter-dev/docs/examples/account/delete-sessions.md b/app/sdks/0.7.0/client-flutter-dev/docs/examples/account/delete-sessions.md new file mode 100644 index 0000000000..b9cbb46fd2 --- /dev/null +++ b/app/sdks/0.7.0/client-flutter-dev/docs/examples/account/delete-sessions.md @@ -0,0 +1,20 @@ +import 'package:appwrite_dev/appwrite_dev.dart'; + +void main() { // Init SDK + Client client = Client(); + Account account = Account(client); + + client + .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID + ; + + Future result = account.deleteSessions( ); + + result + .then((response) { + print(response); + }).catchError((error) { + print(error.response); + }); +} \ No newline at end of file diff --git a/app/sdks/0.7.0/client-flutter-dev/docs/examples/account/delete.md b/app/sdks/0.7.0/client-flutter-dev/docs/examples/account/delete.md new file mode 100644 index 0000000000..8c99b2ac61 --- /dev/null +++ b/app/sdks/0.7.0/client-flutter-dev/docs/examples/account/delete.md @@ -0,0 +1,20 @@ +import 'package:appwrite_dev/appwrite_dev.dart'; + +void main() { // Init SDK + Client client = Client(); + Account account = Account(client); + + client + .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID + ; + + Future result = account.delete( ); + + result + .then((response) { + print(response); + }).catchError((error) { + print(error.response); + }); +} \ No newline at end of file diff --git a/app/sdks/0.7.0/client-flutter-dev/docs/examples/account/get-logs.md b/app/sdks/0.7.0/client-flutter-dev/docs/examples/account/get-logs.md new file mode 100644 index 0000000000..2ed66d88ce --- /dev/null +++ b/app/sdks/0.7.0/client-flutter-dev/docs/examples/account/get-logs.md @@ -0,0 +1,20 @@ +import 'package:appwrite_dev/appwrite_dev.dart'; + +void main() { // Init SDK + Client client = Client(); + Account account = Account(client); + + client + .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID + ; + + Future result = account.getLogs( ); + + result + .then((response) { + print(response); + }).catchError((error) { + print(error.response); + }); +} \ No newline at end of file diff --git a/app/sdks/0.7.0/client-flutter-dev/docs/examples/account/get-prefs.md b/app/sdks/0.7.0/client-flutter-dev/docs/examples/account/get-prefs.md new file mode 100644 index 0000000000..961a24dc19 --- /dev/null +++ b/app/sdks/0.7.0/client-flutter-dev/docs/examples/account/get-prefs.md @@ -0,0 +1,20 @@ +import 'package:appwrite_dev/appwrite_dev.dart'; + +void main() { // Init SDK + Client client = Client(); + Account account = Account(client); + + client + .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID + ; + + Future result = account.getPrefs( ); + + result + .then((response) { + print(response); + }).catchError((error) { + print(error.response); + }); +} \ No newline at end of file diff --git a/app/sdks/0.7.0/client-flutter-dev/docs/examples/account/get-sessions.md b/app/sdks/0.7.0/client-flutter-dev/docs/examples/account/get-sessions.md new file mode 100644 index 0000000000..76a566b959 --- /dev/null +++ b/app/sdks/0.7.0/client-flutter-dev/docs/examples/account/get-sessions.md @@ -0,0 +1,20 @@ +import 'package:appwrite_dev/appwrite_dev.dart'; + +void main() { // Init SDK + Client client = Client(); + Account account = Account(client); + + client + .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID + ; + + Future result = account.getSessions( ); + + result + .then((response) { + print(response); + }).catchError((error) { + print(error.response); + }); +} \ No newline at end of file diff --git a/app/sdks/0.7.0/client-flutter-dev/docs/examples/account/get.md b/app/sdks/0.7.0/client-flutter-dev/docs/examples/account/get.md new file mode 100644 index 0000000000..cd05062a69 --- /dev/null +++ b/app/sdks/0.7.0/client-flutter-dev/docs/examples/account/get.md @@ -0,0 +1,20 @@ +import 'package:appwrite_dev/appwrite_dev.dart'; + +void main() { // Init SDK + Client client = Client(); + Account account = Account(client); + + client + .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID + ; + + Future result = account.get( ); + + result + .then((response) { + print(response); + }).catchError((error) { + print(error.response); + }); +} \ No newline at end of file diff --git a/app/sdks/0.7.0/client-flutter-dev/docs/examples/account/update-email.md b/app/sdks/0.7.0/client-flutter-dev/docs/examples/account/update-email.md new file mode 100644 index 0000000000..9fc86a7aae --- /dev/null +++ b/app/sdks/0.7.0/client-flutter-dev/docs/examples/account/update-email.md @@ -0,0 +1,23 @@ +import 'package:appwrite_dev/appwrite_dev.dart'; + +void main() { // Init SDK + Client client = Client(); + Account account = Account(client); + + client + .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID + ; + + Future result = account.updateEmail( + email: 'email@example.com', + password: 'password', + ); + + result + .then((response) { + print(response); + }).catchError((error) { + print(error.response); + }); +} \ No newline at end of file diff --git a/app/sdks/0.7.0/client-flutter-dev/docs/examples/account/update-name.md b/app/sdks/0.7.0/client-flutter-dev/docs/examples/account/update-name.md new file mode 100644 index 0000000000..e5e218a515 --- /dev/null +++ b/app/sdks/0.7.0/client-flutter-dev/docs/examples/account/update-name.md @@ -0,0 +1,22 @@ +import 'package:appwrite_dev/appwrite_dev.dart'; + +void main() { // Init SDK + Client client = Client(); + Account account = Account(client); + + client + .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID + ; + + Future result = account.updateName( + name: '[NAME]', + ); + + result + .then((response) { + print(response); + }).catchError((error) { + print(error.response); + }); +} \ No newline at end of file diff --git a/app/sdks/0.7.0/client-flutter-dev/docs/examples/account/update-password.md b/app/sdks/0.7.0/client-flutter-dev/docs/examples/account/update-password.md new file mode 100644 index 0000000000..869b4d9a30 --- /dev/null +++ b/app/sdks/0.7.0/client-flutter-dev/docs/examples/account/update-password.md @@ -0,0 +1,23 @@ +import 'package:appwrite_dev/appwrite_dev.dart'; + +void main() { // Init SDK + Client client = Client(); + Account account = Account(client); + + client + .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID + ; + + Future result = account.updatePassword( + password: 'password', + oldPassword: 'password', + ); + + result + .then((response) { + print(response); + }).catchError((error) { + print(error.response); + }); +} \ No newline at end of file diff --git a/app/sdks/0.7.0/client-flutter-dev/docs/examples/account/update-prefs.md b/app/sdks/0.7.0/client-flutter-dev/docs/examples/account/update-prefs.md new file mode 100644 index 0000000000..0d50469742 --- /dev/null +++ b/app/sdks/0.7.0/client-flutter-dev/docs/examples/account/update-prefs.md @@ -0,0 +1,22 @@ +import 'package:appwrite_dev/appwrite_dev.dart'; + +void main() { // Init SDK + Client client = Client(); + Account account = Account(client); + + client + .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID + ; + + Future result = account.updatePrefs( + prefs: {}, + ); + + result + .then((response) { + print(response); + }).catchError((error) { + print(error.response); + }); +} \ No newline at end of file diff --git a/app/sdks/0.7.0/client-flutter-dev/docs/examples/account/update-recovery.md b/app/sdks/0.7.0/client-flutter-dev/docs/examples/account/update-recovery.md new file mode 100644 index 0000000000..e028e60a7d --- /dev/null +++ b/app/sdks/0.7.0/client-flutter-dev/docs/examples/account/update-recovery.md @@ -0,0 +1,25 @@ +import 'package:appwrite_dev/appwrite_dev.dart'; + +void main() { // Init SDK + Client client = Client(); + Account account = Account(client); + + client + .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID + ; + + Future result = account.updateRecovery( + userId: '[USER_ID]', + secret: '[SECRET]', + password: 'password', + passwordAgain: 'password', + ); + + result + .then((response) { + print(response); + }).catchError((error) { + print(error.response); + }); +} \ No newline at end of file diff --git a/app/sdks/0.7.0/client-flutter-dev/docs/examples/account/update-verification.md b/app/sdks/0.7.0/client-flutter-dev/docs/examples/account/update-verification.md new file mode 100644 index 0000000000..48d669efcc --- /dev/null +++ b/app/sdks/0.7.0/client-flutter-dev/docs/examples/account/update-verification.md @@ -0,0 +1,23 @@ +import 'package:appwrite_dev/appwrite_dev.dart'; + +void main() { // Init SDK + Client client = Client(); + Account account = Account(client); + + client + .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID + ; + + Future result = account.updateVerification( + userId: '[USER_ID]', + secret: '[SECRET]', + ); + + result + .then((response) { + print(response); + }).catchError((error) { + print(error.response); + }); +} \ No newline at end of file diff --git a/app/sdks/0.7.0/client-flutter-dev/docs/examples/avatars/get-browser.md b/app/sdks/0.7.0/client-flutter-dev/docs/examples/avatars/get-browser.md new file mode 100644 index 0000000000..dec7863b1f --- /dev/null +++ b/app/sdks/0.7.0/client-flutter-dev/docs/examples/avatars/get-browser.md @@ -0,0 +1,17 @@ +import 'package:appwrite_dev/appwrite_dev.dart'; + +void main() { // Init SDK + Client client = Client(); + Avatars avatars = Avatars(client); + + client + .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID + ; + + String result = avatars.getBrowser( + code: 'aa', + ); + + print(result); // Resource URL string +} \ No newline at end of file diff --git a/app/sdks/0.7.0/client-flutter-dev/docs/examples/avatars/get-credit-card.md b/app/sdks/0.7.0/client-flutter-dev/docs/examples/avatars/get-credit-card.md new file mode 100644 index 0000000000..e2746c4999 --- /dev/null +++ b/app/sdks/0.7.0/client-flutter-dev/docs/examples/avatars/get-credit-card.md @@ -0,0 +1,17 @@ +import 'package:appwrite_dev/appwrite_dev.dart'; + +void main() { // Init SDK + Client client = Client(); + Avatars avatars = Avatars(client); + + client + .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID + ; + + String result = avatars.getCreditCard( + code: 'amex', + ); + + print(result); // Resource URL string +} \ No newline at end of file diff --git a/app/sdks/0.7.0/client-flutter-dev/docs/examples/avatars/get-favicon.md b/app/sdks/0.7.0/client-flutter-dev/docs/examples/avatars/get-favicon.md new file mode 100644 index 0000000000..1c56335b9f --- /dev/null +++ b/app/sdks/0.7.0/client-flutter-dev/docs/examples/avatars/get-favicon.md @@ -0,0 +1,17 @@ +import 'package:appwrite_dev/appwrite_dev.dart'; + +void main() { // Init SDK + Client client = Client(); + Avatars avatars = Avatars(client); + + client + .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID + ; + + String result = avatars.getFavicon( + url: 'https://example.com', + ); + + print(result); // Resource URL string +} \ No newline at end of file diff --git a/app/sdks/0.7.0/client-flutter-dev/docs/examples/avatars/get-flag.md b/app/sdks/0.7.0/client-flutter-dev/docs/examples/avatars/get-flag.md new file mode 100644 index 0000000000..8a91f608ce --- /dev/null +++ b/app/sdks/0.7.0/client-flutter-dev/docs/examples/avatars/get-flag.md @@ -0,0 +1,17 @@ +import 'package:appwrite_dev/appwrite_dev.dart'; + +void main() { // Init SDK + Client client = Client(); + Avatars avatars = Avatars(client); + + client + .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID + ; + + String result = avatars.getFlag( + code: 'af', + ); + + print(result); // Resource URL string +} \ No newline at end of file diff --git a/app/sdks/0.7.0/client-flutter-dev/docs/examples/avatars/get-image.md b/app/sdks/0.7.0/client-flutter-dev/docs/examples/avatars/get-image.md new file mode 100644 index 0000000000..a2cbea98e3 --- /dev/null +++ b/app/sdks/0.7.0/client-flutter-dev/docs/examples/avatars/get-image.md @@ -0,0 +1,17 @@ +import 'package:appwrite_dev/appwrite_dev.dart'; + +void main() { // Init SDK + Client client = Client(); + Avatars avatars = Avatars(client); + + client + .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID + ; + + String result = avatars.getImage( + url: 'https://example.com', + ); + + print(result); // Resource URL string +} \ No newline at end of file diff --git a/app/sdks/0.7.0/client-flutter-dev/docs/examples/avatars/get-q-r.md b/app/sdks/0.7.0/client-flutter-dev/docs/examples/avatars/get-q-r.md new file mode 100644 index 0000000000..2737297082 --- /dev/null +++ b/app/sdks/0.7.0/client-flutter-dev/docs/examples/avatars/get-q-r.md @@ -0,0 +1,17 @@ +import 'package:appwrite_dev/appwrite_dev.dart'; + +void main() { // Init SDK + Client client = Client(); + Avatars avatars = Avatars(client); + + client + .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID + ; + + String result = avatars.getQR( + text: '[TEXT]', + ); + + print(result); // Resource URL string +} \ No newline at end of file diff --git a/app/sdks/0.7.0/client-flutter-dev/docs/examples/database/create-document.md b/app/sdks/0.7.0/client-flutter-dev/docs/examples/database/create-document.md new file mode 100644 index 0000000000..6fc27bdfbb --- /dev/null +++ b/app/sdks/0.7.0/client-flutter-dev/docs/examples/database/create-document.md @@ -0,0 +1,25 @@ +import 'package:appwrite_dev/appwrite_dev.dart'; + +void main() { // Init SDK + Client client = Client(); + Database database = Database(client); + + client + .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID + ; + + Future result = database.createDocument( + collectionId: '[COLLECTION_ID]', + data: {}, + read: [], + write: [], + ); + + result + .then((response) { + print(response); + }).catchError((error) { + print(error.response); + }); +} \ No newline at end of file diff --git a/app/sdks/0.7.0/client-flutter-dev/docs/examples/database/delete-document.md b/app/sdks/0.7.0/client-flutter-dev/docs/examples/database/delete-document.md new file mode 100644 index 0000000000..74bcd69d9a --- /dev/null +++ b/app/sdks/0.7.0/client-flutter-dev/docs/examples/database/delete-document.md @@ -0,0 +1,23 @@ +import 'package:appwrite_dev/appwrite_dev.dart'; + +void main() { // Init SDK + Client client = Client(); + Database database = Database(client); + + client + .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID + ; + + Future result = database.deleteDocument( + collectionId: '[COLLECTION_ID]', + documentId: '[DOCUMENT_ID]', + ); + + result + .then((response) { + print(response); + }).catchError((error) { + print(error.response); + }); +} \ No newline at end of file diff --git a/app/sdks/0.7.0/client-flutter-dev/docs/examples/database/get-document.md b/app/sdks/0.7.0/client-flutter-dev/docs/examples/database/get-document.md new file mode 100644 index 0000000000..639209ed3c --- /dev/null +++ b/app/sdks/0.7.0/client-flutter-dev/docs/examples/database/get-document.md @@ -0,0 +1,23 @@ +import 'package:appwrite_dev/appwrite_dev.dart'; + +void main() { // Init SDK + Client client = Client(); + Database database = Database(client); + + client + .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID + ; + + Future result = database.getDocument( + collectionId: '[COLLECTION_ID]', + documentId: '[DOCUMENT_ID]', + ); + + result + .then((response) { + print(response); + }).catchError((error) { + print(error.response); + }); +} \ No newline at end of file diff --git a/app/sdks/0.7.0/client-flutter-dev/docs/examples/database/list-documents.md b/app/sdks/0.7.0/client-flutter-dev/docs/examples/database/list-documents.md new file mode 100644 index 0000000000..41eac5dd9a --- /dev/null +++ b/app/sdks/0.7.0/client-flutter-dev/docs/examples/database/list-documents.md @@ -0,0 +1,22 @@ +import 'package:appwrite_dev/appwrite_dev.dart'; + +void main() { // Init SDK + Client client = Client(); + Database database = Database(client); + + client + .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID + ; + + Future result = database.listDocuments( + collectionId: '[COLLECTION_ID]', + ); + + result + .then((response) { + print(response); + }).catchError((error) { + print(error.response); + }); +} \ No newline at end of file diff --git a/app/sdks/0.7.0/client-flutter-dev/docs/examples/database/update-document.md b/app/sdks/0.7.0/client-flutter-dev/docs/examples/database/update-document.md new file mode 100644 index 0000000000..0b153b1595 --- /dev/null +++ b/app/sdks/0.7.0/client-flutter-dev/docs/examples/database/update-document.md @@ -0,0 +1,26 @@ +import 'package:appwrite_dev/appwrite_dev.dart'; + +void main() { // Init SDK + Client client = Client(); + Database database = Database(client); + + client + .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID + ; + + Future result = database.updateDocument( + collectionId: '[COLLECTION_ID]', + documentId: '[DOCUMENT_ID]', + data: {}, + read: [], + write: [], + ); + + result + .then((response) { + print(response); + }).catchError((error) { + print(error.response); + }); +} \ No newline at end of file diff --git a/app/sdks/0.7.0/client-flutter-dev/docs/examples/locale/get-continents.md b/app/sdks/0.7.0/client-flutter-dev/docs/examples/locale/get-continents.md new file mode 100644 index 0000000000..2c6bd7389f --- /dev/null +++ b/app/sdks/0.7.0/client-flutter-dev/docs/examples/locale/get-continents.md @@ -0,0 +1,20 @@ +import 'package:appwrite_dev/appwrite_dev.dart'; + +void main() { // Init SDK + Client client = Client(); + Locale locale = Locale(client); + + client + .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID + ; + + Future result = locale.getContinents( ); + + result + .then((response) { + print(response); + }).catchError((error) { + print(error.response); + }); +} \ No newline at end of file diff --git a/app/sdks/0.7.0/client-flutter-dev/docs/examples/locale/get-countries-e-u.md b/app/sdks/0.7.0/client-flutter-dev/docs/examples/locale/get-countries-e-u.md new file mode 100644 index 0000000000..443fb2d115 --- /dev/null +++ b/app/sdks/0.7.0/client-flutter-dev/docs/examples/locale/get-countries-e-u.md @@ -0,0 +1,20 @@ +import 'package:appwrite_dev/appwrite_dev.dart'; + +void main() { // Init SDK + Client client = Client(); + Locale locale = Locale(client); + + client + .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID + ; + + Future result = locale.getCountriesEU( ); + + result + .then((response) { + print(response); + }).catchError((error) { + print(error.response); + }); +} \ No newline at end of file diff --git a/app/sdks/0.7.0/client-flutter-dev/docs/examples/locale/get-countries-phones.md b/app/sdks/0.7.0/client-flutter-dev/docs/examples/locale/get-countries-phones.md new file mode 100644 index 0000000000..e08e2bca47 --- /dev/null +++ b/app/sdks/0.7.0/client-flutter-dev/docs/examples/locale/get-countries-phones.md @@ -0,0 +1,20 @@ +import 'package:appwrite_dev/appwrite_dev.dart'; + +void main() { // Init SDK + Client client = Client(); + Locale locale = Locale(client); + + client + .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID + ; + + Future result = locale.getCountriesPhones( ); + + result + .then((response) { + print(response); + }).catchError((error) { + print(error.response); + }); +} \ No newline at end of file diff --git a/app/sdks/0.7.0/client-flutter-dev/docs/examples/locale/get-countries.md b/app/sdks/0.7.0/client-flutter-dev/docs/examples/locale/get-countries.md new file mode 100644 index 0000000000..a64a23c666 --- /dev/null +++ b/app/sdks/0.7.0/client-flutter-dev/docs/examples/locale/get-countries.md @@ -0,0 +1,20 @@ +import 'package:appwrite_dev/appwrite_dev.dart'; + +void main() { // Init SDK + Client client = Client(); + Locale locale = Locale(client); + + client + .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID + ; + + Future result = locale.getCountries( ); + + result + .then((response) { + print(response); + }).catchError((error) { + print(error.response); + }); +} \ No newline at end of file diff --git a/app/sdks/0.7.0/client-flutter-dev/docs/examples/locale/get-currencies.md b/app/sdks/0.7.0/client-flutter-dev/docs/examples/locale/get-currencies.md new file mode 100644 index 0000000000..e086245ffd --- /dev/null +++ b/app/sdks/0.7.0/client-flutter-dev/docs/examples/locale/get-currencies.md @@ -0,0 +1,20 @@ +import 'package:appwrite_dev/appwrite_dev.dart'; + +void main() { // Init SDK + Client client = Client(); + Locale locale = Locale(client); + + client + .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID + ; + + Future result = locale.getCurrencies( ); + + result + .then((response) { + print(response); + }).catchError((error) { + print(error.response); + }); +} \ No newline at end of file diff --git a/app/sdks/0.7.0/client-flutter-dev/docs/examples/locale/get.md b/app/sdks/0.7.0/client-flutter-dev/docs/examples/locale/get.md new file mode 100644 index 0000000000..5cb8ae176e --- /dev/null +++ b/app/sdks/0.7.0/client-flutter-dev/docs/examples/locale/get.md @@ -0,0 +1,20 @@ +import 'package:appwrite_dev/appwrite_dev.dart'; + +void main() { // Init SDK + Client client = Client(); + Locale locale = Locale(client); + + client + .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID + ; + + Future result = locale.get( ); + + result + .then((response) { + print(response); + }).catchError((error) { + print(error.response); + }); +} \ No newline at end of file diff --git a/app/sdks/0.7.0/client-flutter-dev/docs/examples/storage/create-file.md b/app/sdks/0.7.0/client-flutter-dev/docs/examples/storage/create-file.md new file mode 100644 index 0000000000..d824bd5831 --- /dev/null +++ b/app/sdks/0.7.0/client-flutter-dev/docs/examples/storage/create-file.md @@ -0,0 +1,25 @@ +import 'dart:io'; +import 'package:appwrite_dev/appwrite_dev.dart'; + +void main() { // Init SDK + Client client = Client(); + Storage storage = Storage(client); + + client + .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID + ; + + Future result = storage.createFile( + file: await MultipartFile.fromFile('./path-to-files/image.jpg', 'image.jpg'), + read: [], + write: [], + ); + + result + .then((response) { + print(response); + }).catchError((error) { + print(error.response); + }); +} \ No newline at end of file diff --git a/app/sdks/0.7.0/client-flutter-dev/docs/examples/storage/delete-file.md b/app/sdks/0.7.0/client-flutter-dev/docs/examples/storage/delete-file.md new file mode 100644 index 0000000000..88e7b8815c --- /dev/null +++ b/app/sdks/0.7.0/client-flutter-dev/docs/examples/storage/delete-file.md @@ -0,0 +1,22 @@ +import 'package:appwrite_dev/appwrite_dev.dart'; + +void main() { // Init SDK + Client client = Client(); + Storage storage = Storage(client); + + client + .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID + ; + + Future result = storage.deleteFile( + fileId: '[FILE_ID]', + ); + + result + .then((response) { + print(response); + }).catchError((error) { + print(error.response); + }); +} \ No newline at end of file diff --git a/app/sdks/0.7.0/client-flutter-dev/docs/examples/storage/get-file-download.md b/app/sdks/0.7.0/client-flutter-dev/docs/examples/storage/get-file-download.md new file mode 100644 index 0000000000..483340e24a --- /dev/null +++ b/app/sdks/0.7.0/client-flutter-dev/docs/examples/storage/get-file-download.md @@ -0,0 +1,17 @@ +import 'package:appwrite_dev/appwrite_dev.dart'; + +void main() { // Init SDK + Client client = Client(); + Storage storage = Storage(client); + + client + .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID + ; + + String result = storage.getFileDownload( + fileId: '[FILE_ID]', + ); + + print(result); // Resource URL string +} \ No newline at end of file diff --git a/app/sdks/0.7.0/client-flutter-dev/docs/examples/storage/get-file-preview.md b/app/sdks/0.7.0/client-flutter-dev/docs/examples/storage/get-file-preview.md new file mode 100644 index 0000000000..dd8d924fe7 --- /dev/null +++ b/app/sdks/0.7.0/client-flutter-dev/docs/examples/storage/get-file-preview.md @@ -0,0 +1,17 @@ +import 'package:appwrite_dev/appwrite_dev.dart'; + +void main() { // Init SDK + Client client = Client(); + Storage storage = Storage(client); + + client + .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID + ; + + String result = storage.getFilePreview( + fileId: '[FILE_ID]', + ); + + print(result); // Resource URL string +} \ No newline at end of file diff --git a/app/sdks/0.7.0/client-flutter-dev/docs/examples/storage/get-file-view.md b/app/sdks/0.7.0/client-flutter-dev/docs/examples/storage/get-file-view.md new file mode 100644 index 0000000000..8ed6a946e0 --- /dev/null +++ b/app/sdks/0.7.0/client-flutter-dev/docs/examples/storage/get-file-view.md @@ -0,0 +1,17 @@ +import 'package:appwrite_dev/appwrite_dev.dart'; + +void main() { // Init SDK + Client client = Client(); + Storage storage = Storage(client); + + client + .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID + ; + + String result = storage.getFileView( + fileId: '[FILE_ID]', + ); + + print(result); // Resource URL string +} \ No newline at end of file diff --git a/app/sdks/0.7.0/client-flutter-dev/docs/examples/storage/get-file.md b/app/sdks/0.7.0/client-flutter-dev/docs/examples/storage/get-file.md new file mode 100644 index 0000000000..4e398f88fd --- /dev/null +++ b/app/sdks/0.7.0/client-flutter-dev/docs/examples/storage/get-file.md @@ -0,0 +1,22 @@ +import 'package:appwrite_dev/appwrite_dev.dart'; + +void main() { // Init SDK + Client client = Client(); + Storage storage = Storage(client); + + client + .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID + ; + + Future result = storage.getFile( + fileId: '[FILE_ID]', + ); + + result + .then((response) { + print(response); + }).catchError((error) { + print(error.response); + }); +} \ No newline at end of file diff --git a/app/sdks/0.7.0/client-flutter-dev/docs/examples/storage/list-files.md b/app/sdks/0.7.0/client-flutter-dev/docs/examples/storage/list-files.md new file mode 100644 index 0000000000..d72ba29e03 --- /dev/null +++ b/app/sdks/0.7.0/client-flutter-dev/docs/examples/storage/list-files.md @@ -0,0 +1,21 @@ +import 'package:appwrite_dev/appwrite_dev.dart'; + +void main() { // Init SDK + Client client = Client(); + Storage storage = Storage(client); + + client + .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID + ; + + Future result = storage.listFiles( + ); + + result + .then((response) { + print(response); + }).catchError((error) { + print(error.response); + }); +} \ No newline at end of file diff --git a/app/sdks/0.7.0/client-flutter-dev/docs/examples/storage/update-file.md b/app/sdks/0.7.0/client-flutter-dev/docs/examples/storage/update-file.md new file mode 100644 index 0000000000..95e213ddc2 --- /dev/null +++ b/app/sdks/0.7.0/client-flutter-dev/docs/examples/storage/update-file.md @@ -0,0 +1,24 @@ +import 'package:appwrite_dev/appwrite_dev.dart'; + +void main() { // Init SDK + Client client = Client(); + Storage storage = Storage(client); + + client + .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID + ; + + Future result = storage.updateFile( + fileId: '[FILE_ID]', + read: [], + write: [], + ); + + result + .then((response) { + print(response); + }).catchError((error) { + print(error.response); + }); +} \ No newline at end of file diff --git a/app/sdks/0.7.0/client-flutter-dev/docs/examples/teams/create-membership.md b/app/sdks/0.7.0/client-flutter-dev/docs/examples/teams/create-membership.md new file mode 100644 index 0000000000..31bf7ec1af --- /dev/null +++ b/app/sdks/0.7.0/client-flutter-dev/docs/examples/teams/create-membership.md @@ -0,0 +1,25 @@ +import 'package:appwrite_dev/appwrite_dev.dart'; + +void main() { // Init SDK + Client client = Client(); + Teams teams = Teams(client); + + client + .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID + ; + + Future result = teams.createMembership( + teamId: '[TEAM_ID]', + email: 'email@example.com', + roles: [], + url: 'https://example.com', + ); + + result + .then((response) { + print(response); + }).catchError((error) { + print(error.response); + }); +} \ No newline at end of file diff --git a/app/sdks/0.7.0/client-flutter-dev/docs/examples/teams/create.md b/app/sdks/0.7.0/client-flutter-dev/docs/examples/teams/create.md new file mode 100644 index 0000000000..e50279de01 --- /dev/null +++ b/app/sdks/0.7.0/client-flutter-dev/docs/examples/teams/create.md @@ -0,0 +1,22 @@ +import 'package:appwrite_dev/appwrite_dev.dart'; + +void main() { // Init SDK + Client client = Client(); + Teams teams = Teams(client); + + client + .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID + ; + + Future result = teams.create( + name: '[NAME]', + ); + + result + .then((response) { + print(response); + }).catchError((error) { + print(error.response); + }); +} \ No newline at end of file diff --git a/app/sdks/0.7.0/client-flutter-dev/docs/examples/teams/delete-membership.md b/app/sdks/0.7.0/client-flutter-dev/docs/examples/teams/delete-membership.md new file mode 100644 index 0000000000..015507d3a2 --- /dev/null +++ b/app/sdks/0.7.0/client-flutter-dev/docs/examples/teams/delete-membership.md @@ -0,0 +1,23 @@ +import 'package:appwrite_dev/appwrite_dev.dart'; + +void main() { // Init SDK + Client client = Client(); + Teams teams = Teams(client); + + client + .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID + ; + + Future result = teams.deleteMembership( + teamId: '[TEAM_ID]', + inviteId: '[INVITE_ID]', + ); + + result + .then((response) { + print(response); + }).catchError((error) { + print(error.response); + }); +} \ No newline at end of file diff --git a/app/sdks/0.7.0/client-flutter-dev/docs/examples/teams/delete.md b/app/sdks/0.7.0/client-flutter-dev/docs/examples/teams/delete.md new file mode 100644 index 0000000000..6cc1367f9b --- /dev/null +++ b/app/sdks/0.7.0/client-flutter-dev/docs/examples/teams/delete.md @@ -0,0 +1,22 @@ +import 'package:appwrite_dev/appwrite_dev.dart'; + +void main() { // Init SDK + Client client = Client(); + Teams teams = Teams(client); + + client + .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID + ; + + Future result = teams.delete( + teamId: '[TEAM_ID]', + ); + + result + .then((response) { + print(response); + }).catchError((error) { + print(error.response); + }); +} \ No newline at end of file diff --git a/app/sdks/0.7.0/client-flutter-dev/docs/examples/teams/get-memberships.md b/app/sdks/0.7.0/client-flutter-dev/docs/examples/teams/get-memberships.md new file mode 100644 index 0000000000..d427c9ac47 --- /dev/null +++ b/app/sdks/0.7.0/client-flutter-dev/docs/examples/teams/get-memberships.md @@ -0,0 +1,22 @@ +import 'package:appwrite_dev/appwrite_dev.dart'; + +void main() { // Init SDK + Client client = Client(); + Teams teams = Teams(client); + + client + .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID + ; + + Future result = teams.getMemberships( + teamId: '[TEAM_ID]', + ); + + result + .then((response) { + print(response); + }).catchError((error) { + print(error.response); + }); +} \ No newline at end of file diff --git a/app/sdks/0.7.0/client-flutter-dev/docs/examples/teams/get.md b/app/sdks/0.7.0/client-flutter-dev/docs/examples/teams/get.md new file mode 100644 index 0000000000..1bca70a23f --- /dev/null +++ b/app/sdks/0.7.0/client-flutter-dev/docs/examples/teams/get.md @@ -0,0 +1,22 @@ +import 'package:appwrite_dev/appwrite_dev.dart'; + +void main() { // Init SDK + Client client = Client(); + Teams teams = Teams(client); + + client + .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID + ; + + Future result = teams.get( + teamId: '[TEAM_ID]', + ); + + result + .then((response) { + print(response); + }).catchError((error) { + print(error.response); + }); +} \ No newline at end of file diff --git a/app/sdks/0.7.0/client-flutter-dev/docs/examples/teams/list.md b/app/sdks/0.7.0/client-flutter-dev/docs/examples/teams/list.md new file mode 100644 index 0000000000..c56e7a5dd5 --- /dev/null +++ b/app/sdks/0.7.0/client-flutter-dev/docs/examples/teams/list.md @@ -0,0 +1,21 @@ +import 'package:appwrite_dev/appwrite_dev.dart'; + +void main() { // Init SDK + Client client = Client(); + Teams teams = Teams(client); + + client + .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID + ; + + Future result = teams.list( + ); + + result + .then((response) { + print(response); + }).catchError((error) { + print(error.response); + }); +} \ No newline at end of file diff --git a/app/sdks/0.7.0/client-flutter-dev/docs/examples/teams/update-membership-status.md b/app/sdks/0.7.0/client-flutter-dev/docs/examples/teams/update-membership-status.md new file mode 100644 index 0000000000..6098b38ed9 --- /dev/null +++ b/app/sdks/0.7.0/client-flutter-dev/docs/examples/teams/update-membership-status.md @@ -0,0 +1,25 @@ +import 'package:appwrite_dev/appwrite_dev.dart'; + +void main() { // Init SDK + Client client = Client(); + Teams teams = Teams(client); + + client + .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID + ; + + Future result = teams.updateMembershipStatus( + teamId: '[TEAM_ID]', + inviteId: '[INVITE_ID]', + userId: '[USER_ID]', + secret: '[SECRET]', + ); + + result + .then((response) { + print(response); + }).catchError((error) { + print(error.response); + }); +} \ No newline at end of file diff --git a/app/sdks/0.7.0/client-flutter-dev/docs/examples/teams/update.md b/app/sdks/0.7.0/client-flutter-dev/docs/examples/teams/update.md new file mode 100644 index 0000000000..2494f408d9 --- /dev/null +++ b/app/sdks/0.7.0/client-flutter-dev/docs/examples/teams/update.md @@ -0,0 +1,23 @@ +import 'package:appwrite_dev/appwrite_dev.dart'; + +void main() { // Init SDK + Client client = Client(); + Teams teams = Teams(client); + + client + .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID + ; + + Future result = teams.update( + teamId: '[TEAM_ID]', + name: '[NAME]', + ); + + result + .then((response) { + print(response); + }).catchError((error) { + print(error.response); + }); +} \ No newline at end of file diff --git a/app/sdks/0.7.0/client-flutter-dev/example/README.md b/app/sdks/0.7.0/client-flutter-dev/example/README.md new file mode 100644 index 0000000000..f6768a5f85 --- /dev/null +++ b/app/sdks/0.7.0/client-flutter-dev/example/README.md @@ -0,0 +1,55 @@ +# Examples + +Init your Appwrite client: + +```dart + Client client = Client(); + + client + .setEndpoint('https://localhost/v1') // Your Appwrite Endpoint + .setProject('5e8cf4f46b5e8') // Your project ID + .setSelfSigned() // Remove in production + ; + +``` + +Create a new user and session: + +```dart +Account account = Account(client); + +Response user = await account.create(email: 'me@appwrite.io', password: 'password', name: 'My Name'); + +Response session = await account.createSession(email: 'me@appwrite.io', password: 'password'); + +``` + +Fetch user profile: + +```dart +Account account = Account(client); + +Response profile = await account.get(); +``` + +Upload File: + +```dart +Storage storage = Storage(client); + +MultipartFile file = MultipartFile.fromFile('./path-to-file/image.jpg', filename: 'image.jpg'); + +storage.createFile( + file: file, + read: ['*'], + write: [] +) +.then((response) { + print(response); // File uploaded! +}) +.catchError((error) { + print(error.response); +}); +``` + +All examples and API features are available at the [official Appwrite docs](https://appwrite.io/docs) \ No newline at end of file diff --git a/app/sdks/0.7.0/client-flutter-dev/lib/appwrite.dart b/app/sdks/0.7.0/client-flutter-dev/lib/appwrite.dart new file mode 100644 index 0000000000..95d0b72cfe --- /dev/null +++ b/app/sdks/0.7.0/client-flutter-dev/lib/appwrite.dart @@ -0,0 +1,10 @@ +export 'package:dio/dio.dart' show Response; + +export 'client.dart'; +export 'enums.dart'; +export 'services/account.dart'; +export 'services/avatars.dart'; +export 'services/database.dart'; +export 'services/locale.dart'; +export 'services/storage.dart'; +export 'services/teams.dart'; diff --git a/app/sdks/0.7.0/client-flutter-dev/lib/appwrite_dev.dart b/app/sdks/0.7.0/client-flutter-dev/lib/appwrite_dev.dart new file mode 100644 index 0000000000..95d0b72cfe --- /dev/null +++ b/app/sdks/0.7.0/client-flutter-dev/lib/appwrite_dev.dart @@ -0,0 +1,10 @@ +export 'package:dio/dio.dart' show Response; + +export 'client.dart'; +export 'enums.dart'; +export 'services/account.dart'; +export 'services/avatars.dart'; +export 'services/database.dart'; +export 'services/locale.dart'; +export 'services/storage.dart'; +export 'services/teams.dart'; diff --git a/app/sdks/0.7.0/client-flutter-dev/lib/client.dart b/app/sdks/0.7.0/client-flutter-dev/lib/client.dart new file mode 100644 index 0000000000..a5583fcd00 --- /dev/null +++ b/app/sdks/0.7.0/client-flutter-dev/lib/client.dart @@ -0,0 +1,134 @@ +import 'dart:io'; + +import 'package:dio/dio.dart'; +import 'package:flutter/foundation.dart'; +import 'package:dio/adapter.dart'; +import 'package:dio_cookie_manager/dio_cookie_manager.dart'; +import 'package:cookie_jar/cookie_jar.dart'; +import 'package:path_provider/path_provider.dart'; +import 'package:package_info/package_info.dart'; + +import 'enums.dart'; + +class Client { + String endPoint; + String type = 'unknown'; + Map headers; + Map config; + bool selfSigned; + bool initialized = false; + Dio http; + PersistCookieJar cookieJar; + + Client({this.endPoint = 'https://appwrite.io/v1', this.selfSigned = false, Dio http}) : this.http = http ?? Dio() { + // Platform is not supported in web so if web, set type to web automatically and skip Platform check + if(kIsWeb) { + type = 'web'; + }else{ + type = (Platform.isIOS) ? 'ios' : type; + type = (Platform.isMacOS) ? 'macos' : type; + type = (Platform.isAndroid) ? 'android' : type; + type = (Platform.isLinux) ? 'linux' : type; + type = (Platform.isWindows) ? 'windows' : type; + type = (Platform.isFuchsia) ? 'fuchsia' : type; + } + + this.headers = { + 'content-type': 'application/json', + 'x-sdk-version': 'appwrite:flutter:0.3.2', + }; + + this.config = {}; + + assert(endPoint.startsWith(RegExp("http://|https://")), "endPoint $endPoint must start with 'http'"); + } + + Future _getCookiePath() async { + final directory = await getApplicationDocumentsDirectory(); + final path = directory.path; + final Directory dir = new Directory('$path/cookies'); + await dir.create(); + return dir; + } + + /// Your project ID + Client setProject(value) { + config['project'] = value; + addHeader('X-Appwrite-Project', value); + return this; + } + + Client setLocale(value) { + config['locale'] = value; + addHeader('X-Appwrite-Locale', value); + return this; + } + + Client setSelfSigned({bool status = true}) { + selfSigned = status; + return this; + } + + Client setEndpoint(String endPoint) { + this.endPoint = endPoint; + this.http.options.baseUrl = this.endPoint; + return this; + } + + Client addHeader(String key, String value) { + headers[key] = value; + + return this; + } + + Future init() async { + if(!initialized) { + // if web skip cookie implementation and origin header as those are automatically handled by browsers + if(!kIsWeb) { + final Directory cookieDir = await _getCookiePath(); + cookieJar = new PersistCookieJar(dir:cookieDir.path); + this.http.interceptors.add(CookieManager(cookieJar)); + PackageInfo packageInfo = await PackageInfo.fromPlatform(); + addHeader('Origin', 'appwrite-' + type + '://' + packageInfo.packageName); + }else{ + // if web set httpClientAdapter as BrowserHttpClientAdapter with withCredentials true to make cookies work + this.http.options.extra['withCredentials'] = true; + } + + this.http.options.baseUrl = this.endPoint; + this.http.options.validateStatus = (status) => status < 400; + } + } + + Future call(HttpMethod method, {String path = '', Map headers = const {}, Map params = const {}}) async { + if(selfSigned) { + // Allow self signed requests + (http.httpClientAdapter as DefaultHttpClientAdapter).onHttpClientCreate = (HttpClient client) { + client.badCertificateCallback = (X509Certificate cert, String host, int port) => true; + return client; + }; + } + + await this.init(); + + // Origin is hardcoded for testing + Options options = Options( + headers: {...this.headers, ...headers}, + method: method.name(), + ); + + if(headers['content-type'] == 'multipart/form-data') { + return http.request(path, data: FormData.fromMap(params), options: options); + } + + if (method == HttpMethod.get) { + params.keys.forEach((key) {if (params[key] is int || params[key] is double) { + params[key] = params[key].toString(); + }}); + + return http.get(path, queryParameters: params, options: options); + } else { + return http.request(path, data: params, options: options); + } + } +} \ No newline at end of file diff --git a/app/sdks/0.7.0/client-flutter-dev/lib/enums.dart b/app/sdks/0.7.0/client-flutter-dev/lib/enums.dart new file mode 100644 index 0000000000..2757f6073e --- /dev/null +++ b/app/sdks/0.7.0/client-flutter-dev/lib/enums.dart @@ -0,0 +1,15 @@ +enum HttpMethod { get, post, put, delete, patch } + +extension HttpMethodString on HttpMethod { + String name() { + return this.toString().split('.').last.toUpperCase(); + } +} + +enum OrderType { asc, desc } + +extension OrderTypeString on OrderType { + String name() { + return this.toString().split('.').last.toUpperCase(); + } +} diff --git a/app/sdks/0.7.0/client-flutter-dev/lib/service.dart b/app/sdks/0.7.0/client-flutter-dev/lib/service.dart new file mode 100644 index 0000000000..1ae319b705 --- /dev/null +++ b/app/sdks/0.7.0/client-flutter-dev/lib/service.dart @@ -0,0 +1,7 @@ +import 'client.dart'; + +class Service { + final Client client; + + const Service(this.client); +} diff --git a/app/sdks/0.7.0/client-flutter-dev/lib/services/account.dart b/app/sdks/0.7.0/client-flutter-dev/lib/services/account.dart new file mode 100644 index 0000000000..02fc33400e --- /dev/null +++ b/app/sdks/0.7.0/client-flutter-dev/lib/services/account.dart @@ -0,0 +1,424 @@ + +import 'dart:io'; + +import 'package:dio/dio.dart'; +import 'package:meta/meta.dart'; +import 'package:flutter_web_auth/flutter_web_auth.dart'; + +import "../client.dart"; +import '../enums.dart'; +import "../service.dart"; + +class Account extends Service { + Account(Client client): super(client); + + /// Get Account + /// + /// Get currently logged in user data as JSON object. + /// + Future get() { + final String path = '/account'; + + final Map params = { + }; + + final Map headers = { + 'content-type': 'application/json', + }; + + return client.call(HttpMethod.get, path: path, params: params, headers: headers); + } + + /// Create Account + /// + /// Use this endpoint to allow a new user to register a new account in your + /// project. After the user registration completes successfully, you can use + /// the [/account/verfication](/docs/client/account#createVerification) route + /// to start verifying the user email address. To allow your new user to login + /// to his new account, you need to create a new [account + /// session](/docs/client/account#createSession). + /// + Future create({@required String email, @required String password, String name = ''}) { + final String path = '/account'; + + final Map params = { + 'email': email, + 'password': password, + 'name': name, + }; + + final Map headers = { + 'content-type': 'application/json', + }; + + return client.call(HttpMethod.post, path: path, params: params, headers: headers); + } + + /// Delete Account + /// + /// Delete a currently logged in user account. Behind the scene, the user + /// record is not deleted but permanently blocked from any access. This is done + /// to avoid deleted accounts being overtaken by new users with the same email + /// address. Any user-related resources like documents or storage files should + /// be deleted separately. + /// + Future delete() { + final String path = '/account'; + + final Map params = { + }; + + final Map headers = { + 'content-type': 'application/json', + }; + + return client.call(HttpMethod.delete, path: path, params: params, headers: headers); + } + + /// Update Account Email + /// + /// Update currently logged in user account email address. After changing user + /// address, user confirmation status is being reset and a new confirmation + /// mail is sent. For security measures, user password is required to complete + /// this request. + /// + Future updateEmail({@required String email, @required String password}) { + final String path = '/account/email'; + + final Map params = { + 'email': email, + 'password': password, + }; + + final Map headers = { + 'content-type': 'application/json', + }; + + return client.call(HttpMethod.patch, path: path, params: params, headers: headers); + } + + /// Get Account Logs + /// + /// Get currently logged in user list of latest security activity logs. Each + /// log returns user IP address, location and date and time of log. + /// + Future getLogs() { + final String path = '/account/logs'; + + final Map params = { + }; + + final Map headers = { + 'content-type': 'application/json', + }; + + return client.call(HttpMethod.get, path: path, params: params, headers: headers); + } + + /// Update Account Name + /// + /// Update currently logged in user account name. + /// + Future updateName({@required String name}) { + final String path = '/account/name'; + + final Map params = { + 'name': name, + }; + + final Map headers = { + 'content-type': 'application/json', + }; + + return client.call(HttpMethod.patch, path: path, params: params, headers: headers); + } + + /// Update Account Password + /// + /// Update currently logged in user password. For validation, user is required + /// to pass the password twice. + /// + Future updatePassword({@required String password, @required String oldPassword}) { + final String path = '/account/password'; + + final Map params = { + 'password': password, + 'oldPassword': oldPassword, + }; + + final Map headers = { + 'content-type': 'application/json', + }; + + return client.call(HttpMethod.patch, path: path, params: params, headers: headers); + } + + /// Get Account Preferences + /// + /// Get currently logged in user preferences as a key-value object. + /// + Future getPrefs() { + final String path = '/account/prefs'; + + final Map params = { + }; + + final Map headers = { + 'content-type': 'application/json', + }; + + return client.call(HttpMethod.get, path: path, params: params, headers: headers); + } + + /// Update Account Preferences + /// + /// Update currently logged in user account preferences. You can pass only the + /// specific settings you wish to update. + /// + Future updatePrefs({@required dynamic prefs}) { + final String path = '/account/prefs'; + + final Map params = { + 'prefs': prefs, + }; + + final Map headers = { + 'content-type': 'application/json', + }; + + return client.call(HttpMethod.patch, path: path, params: params, headers: headers); + } + + /// Create Password Recovery + /// + /// Sends the user an email with a temporary secret key for password reset. + /// When the user clicks the confirmation link he is redirected back to your + /// app password reset URL with the secret key and email address values + /// attached to the URL query string. Use the query string params to submit a + /// request to the [PUT /account/recovery](/docs/client/account#updateRecovery) + /// endpoint to complete the process. + /// + Future createRecovery({@required String email, @required String url}) { + final String path = '/account/recovery'; + + final Map params = { + 'email': email, + 'url': url, + }; + + final Map headers = { + 'content-type': 'application/json', + }; + + return client.call(HttpMethod.post, path: path, params: params, headers: headers); + } + + /// Complete Password Recovery + /// + /// Use this endpoint to complete the user account password reset. Both the + /// **userId** and **secret** arguments will be passed as query parameters to + /// the redirect URL you have provided when sending your request to the [POST + /// /account/recovery](/docs/client/account#createRecovery) endpoint. + /// + /// Please note that in order to avoid a [Redirect + /// Attack](https://github.com/OWASP/CheatSheetSeries/blob/master/cheatsheets/Unvalidated_Redirects_and_Forwards_Cheat_Sheet.md) + /// the only valid redirect URLs are the ones from domains you have set when + /// adding your platforms in the console interface. + /// + Future updateRecovery({@required String userId, @required String secret, @required String password, @required String passwordAgain}) { + final String path = '/account/recovery'; + + final Map params = { + 'userId': userId, + 'secret': secret, + 'password': password, + 'passwordAgain': passwordAgain, + }; + + final Map headers = { + 'content-type': 'application/json', + }; + + return client.call(HttpMethod.put, path: path, params: params, headers: headers); + } + + /// Get Account Sessions + /// + /// Get currently logged in user list of active sessions across different + /// devices. + /// + Future getSessions() { + final String path = '/account/sessions'; + + final Map params = { + }; + + final Map headers = { + 'content-type': 'application/json', + }; + + return client.call(HttpMethod.get, path: path, params: params, headers: headers); + } + + /// Create Account Session + /// + /// Allow the user to login into his account by providing a valid email and + /// password combination. This route will create a new session for the user. + /// + Future createSession({@required String email, @required String password}) { + final String path = '/account/sessions'; + + final Map params = { + 'email': email, + 'password': password, + }; + + final Map headers = { + 'content-type': 'application/json', + }; + + return client.call(HttpMethod.post, path: path, params: params, headers: headers); + } + + /// Delete All Account Sessions + /// + /// Delete all sessions from the user account and remove any sessions cookies + /// from the end client. + /// + Future deleteSessions() { + final String path = '/account/sessions'; + + final Map params = { + }; + + final Map headers = { + 'content-type': 'application/json', + }; + + return client.call(HttpMethod.delete, path: path, params: params, headers: headers); + } + + /// Create Account Session with OAuth2 + /// + /// Allow the user to login to his account using the OAuth2 provider of his + /// choice. Each OAuth2 provider should be enabled from the Appwrite console + /// first. Use the success and failure arguments to provide a redirect URL's + /// back to your app when login is completed. + /// + Future createOAuth2Session({@required String provider, String success = 'https://appwrite.io/auth/oauth2/success', String failure = 'https://appwrite.io/auth/oauth2/failure'}) { + final String path = '/account/sessions/oauth2/{provider}'.replaceAll(RegExp('{provider}'), provider); + + final Map params = { + 'success': success, + 'failure': failure, + 'project': client.config['project'], + }; + + + final List query = []; + + params.forEach((key, value) { + if (value is List) { + for (var item in value) { + query.add(Uri.encodeComponent(key + '[]') + '=' + Uri.encodeComponent(item)); + } + } + else { + query.add(Uri.encodeComponent(key) + '=' + Uri.encodeComponent(value)); + } + }); + + Uri endpoint = Uri.parse(client.endPoint); + Uri url = new Uri(scheme: endpoint.scheme, + host: endpoint.host, + port: endpoint.port, + path: endpoint.path + path, + query: query.join('&') + ); + + return FlutterWebAuth.authenticate( + url: url.toString(), + callbackUrlScheme: "appwrite-callback-" + client.config['project'] + ).then((value) async { + Uri url = Uri.parse(value); + Cookie cookie = new Cookie(url.queryParameters['key'], url.queryParameters['secret']); + cookie.domain = Uri.parse(client.endPoint).host; + cookie.httpOnly = true; + cookie.path = '/'; + List cookies = [cookie]; + await client.init(); + client.cookieJar.saveFromResponse(Uri.parse(client.endPoint), cookies); + }); + } + + /// Delete Account Session + /// + /// Use this endpoint to log out the currently logged in user from all his + /// account sessions across all his different devices. When using the option id + /// argument, only the session unique ID provider will be deleted. + /// + Future deleteSession({@required String sessionId}) { + final String path = '/account/sessions/{sessionId}'.replaceAll(RegExp('{sessionId}'), sessionId); + + final Map params = { + }; + + final Map headers = { + 'content-type': 'application/json', + }; + + return client.call(HttpMethod.delete, path: path, params: params, headers: headers); + } + + /// Create Email Verification + /// + /// Use this endpoint to send a verification message to your user email address + /// to confirm they are the valid owners of that address. Both the **userId** + /// and **secret** arguments will be passed as query parameters to the URL you + /// have provider to be attached to the verification email. The provided URL + /// should redirect the user back for your app and allow you to complete the + /// verification process by verifying both the **userId** and **secret** + /// parameters. Learn more about how to [complete the verification + /// process](/docs/client/account#updateAccountVerification). + /// + /// Please note that in order to avoid a [Redirect + /// Attack](https://github.com/OWASP/CheatSheetSeries/blob/master/cheatsheets/Unvalidated_Redirects_and_Forwards_Cheat_Sheet.md) + /// the only valid redirect URLs are the ones from domains you have set when + /// adding your platforms in the console interface. + /// + Future createVerification({@required String url}) { + final String path = '/account/verification'; + + final Map params = { + 'url': url, + }; + + final Map headers = { + 'content-type': 'application/json', + }; + + return client.call(HttpMethod.post, path: path, params: params, headers: headers); + } + + /// Complete Email Verification + /// + /// Use this endpoint to complete the user email verification process. Use both + /// the **userId** and **secret** parameters that were attached to your app URL + /// to verify the user email ownership. If confirmed this route will return a + /// 200 status code. + /// + Future updateVerification({@required String userId, @required String secret}) { + final String path = '/account/verification'; + + final Map params = { + 'userId': userId, + 'secret': secret, + }; + + final Map headers = { + 'content-type': 'application/json', + }; + + return client.call(HttpMethod.put, path: path, params: params, headers: headers); + } +} \ No newline at end of file diff --git a/app/sdks/0.7.0/client-flutter-dev/lib/services/avatars.dart b/app/sdks/0.7.0/client-flutter-dev/lib/services/avatars.dart new file mode 100644 index 0000000000..828ea7dfb0 --- /dev/null +++ b/app/sdks/0.7.0/client-flutter-dev/lib/services/avatars.dart @@ -0,0 +1,198 @@ + + +import 'package:dio/dio.dart'; +import 'package:meta/meta.dart'; + +import "../client.dart"; +import '../enums.dart'; +import "../service.dart"; + +class Avatars extends Service { + Avatars(Client client): super(client); + + /// Get Browser Icon + /// + /// You can use this endpoint to show different browser icons to your users. + /// The code argument receives the browser code as it appears in your user + /// /account/sessions endpoint. Use width, height and quality arguments to + /// change the output settings. + /// + String getBrowser({@required String code, int width = 100, int height = 100, int quality = 100}) { + final String path = '/avatars/browsers/{code}'.replaceAll(RegExp('{code}'), code); + + final Map params = { + 'width': width, + 'height': height, + 'quality': quality, + 'project': client.config['project'], + }; + + params.keys.forEach((key) {if (params[key] is int || params[key] is double) { + params[key] = params[key].toString(); + }}); + + Uri endpoint = Uri.parse(client.endPoint); + Uri location = new Uri(scheme: endpoint.scheme, + host: endpoint.host, + port: endpoint.port, + path: endpoint.path + path, + queryParameters:params, + ); + + return location.toString(); + } + + /// Get Credit Card Icon + /// + /// Need to display your users with your billing method or their payment + /// methods? The credit card endpoint will return you the icon of the credit + /// card provider you need. Use width, height and quality arguments to change + /// the output settings. + /// + String getCreditCard({@required String code, int width = 100, int height = 100, int quality = 100}) { + final String path = '/avatars/credit-cards/{code}'.replaceAll(RegExp('{code}'), code); + + final Map params = { + 'width': width, + 'height': height, + 'quality': quality, + 'project': client.config['project'], + }; + + params.keys.forEach((key) {if (params[key] is int || params[key] is double) { + params[key] = params[key].toString(); + }}); + + Uri endpoint = Uri.parse(client.endPoint); + Uri location = new Uri(scheme: endpoint.scheme, + host: endpoint.host, + port: endpoint.port, + path: endpoint.path + path, + queryParameters:params, + ); + + return location.toString(); + } + + /// Get Favicon + /// + /// Use this endpoint to fetch the favorite icon (AKA favicon) of a any remote + /// website URL. + /// + String getFavicon({@required String url}) { + final String path = '/avatars/favicon'; + + final Map params = { + 'url': url, + 'project': client.config['project'], + }; + + params.keys.forEach((key) {if (params[key] is int || params[key] is double) { + params[key] = params[key].toString(); + }}); + + Uri endpoint = Uri.parse(client.endPoint); + Uri location = new Uri(scheme: endpoint.scheme, + host: endpoint.host, + port: endpoint.port, + path: endpoint.path + path, + queryParameters:params, + ); + + return location.toString(); + } + + /// Get Country Flag + /// + /// You can use this endpoint to show different country flags icons to your + /// users. The code argument receives the 2 letter country code. Use width, + /// height and quality arguments to change the output settings. + /// + String getFlag({@required String code, int width = 100, int height = 100, int quality = 100}) { + final String path = '/avatars/flags/{code}'.replaceAll(RegExp('{code}'), code); + + final Map params = { + 'width': width, + 'height': height, + 'quality': quality, + 'project': client.config['project'], + }; + + params.keys.forEach((key) {if (params[key] is int || params[key] is double) { + params[key] = params[key].toString(); + }}); + + Uri endpoint = Uri.parse(client.endPoint); + Uri location = new Uri(scheme: endpoint.scheme, + host: endpoint.host, + port: endpoint.port, + path: endpoint.path + path, + queryParameters:params, + ); + + return location.toString(); + } + + /// Get Image from URL + /// + /// Use this endpoint to fetch a remote image URL and crop it to any image size + /// you want. This endpoint is very useful if you need to crop and display + /// remote images in your app or in case you want to make sure a 3rd party + /// image is properly served using a TLS protocol. + /// + String getImage({@required String url, int width = 400, int height = 400}) { + final String path = '/avatars/image'; + + final Map params = { + 'url': url, + 'width': width, + 'height': height, + 'project': client.config['project'], + }; + + params.keys.forEach((key) {if (params[key] is int || params[key] is double) { + params[key] = params[key].toString(); + }}); + + Uri endpoint = Uri.parse(client.endPoint); + Uri location = new Uri(scheme: endpoint.scheme, + host: endpoint.host, + port: endpoint.port, + path: endpoint.path + path, + queryParameters:params, + ); + + return location.toString(); + } + + /// Get QR Code + /// + /// Converts a given plain text to a QR code image. You can use the query + /// parameters to change the size and style of the resulting image. + /// + String getQR({@required String text, int size = 400, int margin = 1, int download = 0}) { + final String path = '/avatars/qr'; + + final Map params = { + 'text': text, + 'size': size, + 'margin': margin, + 'download': download, + 'project': client.config['project'], + }; + + params.keys.forEach((key) {if (params[key] is int || params[key] is double) { + params[key] = params[key].toString(); + }}); + + Uri endpoint = Uri.parse(client.endPoint); + Uri location = new Uri(scheme: endpoint.scheme, + host: endpoint.host, + port: endpoint.port, + path: endpoint.path + path, + queryParameters:params, + ); + + return location.toString(); + } +} \ No newline at end of file diff --git a/app/sdks/0.7.0/client-flutter-dev/lib/services/database.dart b/app/sdks/0.7.0/client-flutter-dev/lib/services/database.dart new file mode 100644 index 0000000000..88082feef7 --- /dev/null +++ b/app/sdks/0.7.0/client-flutter-dev/lib/services/database.dart @@ -0,0 +1,121 @@ + + +import 'package:dio/dio.dart'; +import 'package:meta/meta.dart'; + +import "../client.dart"; +import '../enums.dart'; +import "../service.dart"; + +class Database extends Service { + Database(Client client): super(client); + + /// List Documents + /// + /// Get a list of all the user documents. You can use the query params to + /// filter your results. On admin mode, this endpoint will return a list of all + /// of the project documents. [Learn more about different API + /// modes](/docs/admin). + /// + Future listDocuments({@required String collectionId, List filters = const [], int offset = 0, int limit = 50, String orderField = '\$id', OrderType orderType = OrderType.asc, String orderCast = 'string', String search = '', int first = 0, int last = 0}) { + final String path = '/database/collections/{collectionId}/documents'.replaceAll(RegExp('{collectionId}'), collectionId); + + final Map params = { + 'filters': filters, + 'offset': offset, + 'limit': limit, + 'orderField': orderField, + 'orderType': orderType.name(), + 'orderCast': orderCast, + 'search': search, + 'first': first, + 'last': last, + }; + + final Map headers = { + 'content-type': 'application/json', + }; + + return client.call(HttpMethod.get, path: path, params: params, headers: headers); + } + + /// Create Document + /// + /// Create a new Document. Before using this route, you should create a new + /// collection resource using either a [server + /// integration](/docs/server/database?sdk=nodejs#createCollection) API or + /// directly from your database console. + /// + Future createDocument({@required String collectionId, @required dynamic data, @required List read, @required List write, String parentDocument = '', String parentProperty = '', String parentPropertyType = 'assign'}) { + final String path = '/database/collections/{collectionId}/documents'.replaceAll(RegExp('{collectionId}'), collectionId); + + final Map params = { + 'data': data, + 'read': read, + 'write': write, + 'parentDocument': parentDocument, + 'parentProperty': parentProperty, + 'parentPropertyType': parentPropertyType, + }; + + final Map headers = { + 'content-type': 'application/json', + }; + + return client.call(HttpMethod.post, path: path, params: params, headers: headers); + } + + /// Get Document + /// + /// Get document by its unique ID. This endpoint response returns a JSON object + /// with the document data. + /// + Future getDocument({@required String collectionId, @required String documentId}) { + final String path = '/database/collections/{collectionId}/documents/{documentId}'.replaceAll(RegExp('{collectionId}'), collectionId).replaceAll(RegExp('{documentId}'), documentId); + + final Map params = { + }; + + final Map headers = { + 'content-type': 'application/json', + }; + + return client.call(HttpMethod.get, path: path, params: params, headers: headers); + } + + /// Update Document + Future updateDocument({@required String collectionId, @required String documentId, @required dynamic data, @required List read, @required List write}) { + final String path = '/database/collections/{collectionId}/documents/{documentId}'.replaceAll(RegExp('{collectionId}'), collectionId).replaceAll(RegExp('{documentId}'), documentId); + + final Map params = { + 'data': data, + 'read': read, + 'write': write, + }; + + final Map headers = { + 'content-type': 'application/json', + }; + + return client.call(HttpMethod.patch, path: path, params: params, headers: headers); + } + + /// Delete Document + /// + /// Delete document by its unique ID. This endpoint deletes only the parent + /// documents, his attributes and relations to other documents. Child documents + /// **will not** be deleted. + /// + Future deleteDocument({@required String collectionId, @required String documentId}) { + final String path = '/database/collections/{collectionId}/documents/{documentId}'.replaceAll(RegExp('{collectionId}'), collectionId).replaceAll(RegExp('{documentId}'), documentId); + + final Map params = { + }; + + final Map headers = { + 'content-type': 'application/json', + }; + + return client.call(HttpMethod.delete, path: path, params: params, headers: headers); + } +} \ No newline at end of file diff --git a/app/sdks/0.7.0/client-flutter-dev/lib/services/locale.dart b/app/sdks/0.7.0/client-flutter-dev/lib/services/locale.dart new file mode 100644 index 0000000000..91ea1567ef --- /dev/null +++ b/app/sdks/0.7.0/client-flutter-dev/lib/services/locale.dart @@ -0,0 +1,125 @@ + + +import 'package:dio/dio.dart'; +import 'package:meta/meta.dart'; + +import "../client.dart"; +import '../enums.dart'; +import "../service.dart"; + +class Locale extends Service { + Locale(Client client): super(client); + + /// Get User Locale + /// + /// Get the current user location based on IP. Returns an object with user + /// country code, country name, continent name, continent code, ip address and + /// suggested currency. You can use the locale header to get the data in a + /// supported language. + /// + /// ([IP Geolocation by DB-IP](https://db-ip.com)) + /// + Future get() { + final String path = '/locale'; + + final Map params = { + }; + + final Map headers = { + 'content-type': 'application/json', + }; + + return client.call(HttpMethod.get, path: path, params: params, headers: headers); + } + + /// List Continents + /// + /// List of all continents. You can use the locale header to get the data in a + /// supported language. + /// + Future getContinents() { + final String path = '/locale/continents'; + + final Map params = { + }; + + final Map headers = { + 'content-type': 'application/json', + }; + + return client.call(HttpMethod.get, path: path, params: params, headers: headers); + } + + /// List Countries + /// + /// List of all countries. You can use the locale header to get the data in a + /// supported language. + /// + Future getCountries() { + final String path = '/locale/countries'; + + final Map params = { + }; + + final Map headers = { + 'content-type': 'application/json', + }; + + return client.call(HttpMethod.get, path: path, params: params, headers: headers); + } + + /// List EU Countries + /// + /// List of all countries that are currently members of the EU. You can use the + /// locale header to get the data in a supported language. + /// + Future getCountriesEU() { + final String path = '/locale/countries/eu'; + + final Map params = { + }; + + final Map headers = { + 'content-type': 'application/json', + }; + + return client.call(HttpMethod.get, path: path, params: params, headers: headers); + } + + /// List Countries Phone Codes + /// + /// List of all countries phone codes. You can use the locale header to get the + /// data in a supported language. + /// + Future getCountriesPhones() { + final String path = '/locale/countries/phones'; + + final Map params = { + }; + + final Map headers = { + 'content-type': 'application/json', + }; + + return client.call(HttpMethod.get, path: path, params: params, headers: headers); + } + + /// List Currencies + /// + /// List of all currencies, including currency symol, name, plural, and decimal + /// digits for all major and minor currencies. You can use the locale header to + /// get the data in a supported language. + /// + Future getCurrencies() { + final String path = '/locale/currencies'; + + final Map params = { + }; + + final Map headers = { + 'content-type': 'application/json', + }; + + return client.call(HttpMethod.get, path: path, params: params, headers: headers); + } +} \ No newline at end of file diff --git a/app/sdks/0.7.0/client-flutter-dev/lib/services/storage.dart b/app/sdks/0.7.0/client-flutter-dev/lib/services/storage.dart new file mode 100644 index 0000000000..51f9345050 --- /dev/null +++ b/app/sdks/0.7.0/client-flutter-dev/lib/services/storage.dart @@ -0,0 +1,203 @@ + + +import 'package:dio/dio.dart'; +import 'package:meta/meta.dart'; + +import "../client.dart"; +import '../enums.dart'; +import "../service.dart"; + +class Storage extends Service { + Storage(Client client): super(client); + + /// List Files + /// + /// Get a list of all the user files. You can use the query params to filter + /// your results. On admin mode, this endpoint will return a list of all of the + /// project files. [Learn more about different API modes](/docs/admin). + /// + Future listFiles({String search = '', int limit = 25, int offset = 0, OrderType orderType = OrderType.asc}) { + final String path = '/storage/files'; + + final Map params = { + 'search': search, + 'limit': limit, + 'offset': offset, + 'orderType': orderType.name(), + }; + + final Map headers = { + 'content-type': 'application/json', + }; + + return client.call(HttpMethod.get, path: path, params: params, headers: headers); + } + + /// Create File + /// + /// Create a new file. The user who creates the file will automatically be + /// assigned to read and write access unless he has passed custom values for + /// read and write arguments. + /// + Future createFile({@required MultipartFile file, @required List read, @required List write}) { + final String path = '/storage/files'; + + final Map params = { + 'file': file, + 'read': read, + 'write': write, + }; + + final Map headers = { + 'content-type': 'multipart/form-data', + }; + + return client.call(HttpMethod.post, path: path, params: params, headers: headers); + } + + /// Get File + /// + /// Get file by its unique ID. This endpoint response returns a JSON object + /// with the file metadata. + /// + Future getFile({@required String fileId}) { + final String path = '/storage/files/{fileId}'.replaceAll(RegExp('{fileId}'), fileId); + + final Map params = { + }; + + final Map headers = { + 'content-type': 'application/json', + }; + + return client.call(HttpMethod.get, path: path, params: params, headers: headers); + } + + /// Update File + /// + /// Update file by its unique ID. Only users with write permissions have access + /// to update this resource. + /// + Future updateFile({@required String fileId, @required List read, @required List write}) { + final String path = '/storage/files/{fileId}'.replaceAll(RegExp('{fileId}'), fileId); + + final Map params = { + 'read': read, + 'write': write, + }; + + final Map headers = { + 'content-type': 'application/json', + }; + + return client.call(HttpMethod.put, path: path, params: params, headers: headers); + } + + /// Delete File + /// + /// Delete a file by its unique ID. Only users with write permissions have + /// access to delete this resource. + /// + Future deleteFile({@required String fileId}) { + final String path = '/storage/files/{fileId}'.replaceAll(RegExp('{fileId}'), fileId); + + final Map params = { + }; + + final Map headers = { + 'content-type': 'application/json', + }; + + return client.call(HttpMethod.delete, path: path, params: params, headers: headers); + } + + /// Get File for Download + /// + /// Get file content by its unique ID. The endpoint response return with a + /// 'Content-Disposition: attachment' header that tells the browser to start + /// downloading the file to user downloads directory. + /// + String getFileDownload({@required String fileId}) { + final String path = '/storage/files/{fileId}/download'.replaceAll(RegExp('{fileId}'), fileId); + + final Map params = { + 'project': client.config['project'], + }; + + params.keys.forEach((key) {if (params[key] is int || params[key] is double) { + params[key] = params[key].toString(); + }}); + + Uri endpoint = Uri.parse(client.endPoint); + Uri location = new Uri(scheme: endpoint.scheme, + host: endpoint.host, + port: endpoint.port, + path: endpoint.path + path, + queryParameters:params, + ); + + return location.toString(); + } + + /// Get File Preview + /// + /// Get a file preview image. Currently, this method supports preview for image + /// files (jpg, png, and gif), other supported formats, like pdf, docs, slides, + /// and spreadsheets, will return the file icon image. You can also pass query + /// string arguments for cutting and resizing your preview image. + /// + String getFilePreview({@required String fileId, int width = 0, int height = 0, int quality = 100, String background = '', String output = ''}) { + final String path = '/storage/files/{fileId}/preview'.replaceAll(RegExp('{fileId}'), fileId); + + final Map params = { + 'width': width, + 'height': height, + 'quality': quality, + 'background': background, + 'output': output, + 'project': client.config['project'], + }; + + params.keys.forEach((key) {if (params[key] is int || params[key] is double) { + params[key] = params[key].toString(); + }}); + + Uri endpoint = Uri.parse(client.endPoint); + Uri location = new Uri(scheme: endpoint.scheme, + host: endpoint.host, + port: endpoint.port, + path: endpoint.path + path, + queryParameters:params, + ); + + return location.toString(); + } + + /// Get File for View + /// + /// Get file content by its unique ID. This endpoint is similar to the download + /// method but returns with no 'Content-Disposition: attachment' header. + /// + String getFileView({@required String fileId, String as = ''}) { + final String path = '/storage/files/{fileId}/view'.replaceAll(RegExp('{fileId}'), fileId); + + final Map params = { + 'as': as, + 'project': client.config['project'], + }; + + params.keys.forEach((key) {if (params[key] is int || params[key] is double) { + params[key] = params[key].toString(); + }}); + + Uri endpoint = Uri.parse(client.endPoint); + Uri location = new Uri(scheme: endpoint.scheme, + host: endpoint.host, + port: endpoint.port, + path: endpoint.path + path, + queryParameters:params, + ); + + return location.toString(); + } +} \ No newline at end of file diff --git a/app/sdks/0.7.0/client-flutter-dev/lib/services/teams.dart b/app/sdks/0.7.0/client-flutter-dev/lib/services/teams.dart new file mode 100644 index 0000000000..b98590b33d --- /dev/null +++ b/app/sdks/0.7.0/client-flutter-dev/lib/services/teams.dart @@ -0,0 +1,203 @@ + + +import 'package:dio/dio.dart'; +import 'package:meta/meta.dart'; + +import "../client.dart"; +import '../enums.dart'; +import "../service.dart"; + +class Teams extends Service { + Teams(Client client): super(client); + + /// List Teams + /// + /// Get a list of all the current user teams. You can use the query params to + /// filter your results. On admin mode, this endpoint will return a list of all + /// of the project teams. [Learn more about different API modes](/docs/admin). + /// + Future list({String search = '', int limit = 25, int offset = 0, OrderType orderType = OrderType.asc}) { + final String path = '/teams'; + + final Map params = { + 'search': search, + 'limit': limit, + 'offset': offset, + 'orderType': orderType.name(), + }; + + final Map headers = { + 'content-type': 'application/json', + }; + + return client.call(HttpMethod.get, path: path, params: params, headers: headers); + } + + /// Create Team + /// + /// Create a new team. The user who creates the team will automatically be + /// assigned as the owner of the team. The team owner can invite new members, + /// who will be able add new owners and update or delete the team from your + /// project. + /// + Future create({@required String name, List roles = const ["owner"]}) { + final String path = '/teams'; + + final Map params = { + 'name': name, + 'roles': roles, + }; + + final Map headers = { + 'content-type': 'application/json', + }; + + return client.call(HttpMethod.post, path: path, params: params, headers: headers); + } + + /// Get Team + /// + /// Get team by its unique ID. All team members have read access for this + /// resource. + /// + Future get({@required String teamId}) { + final String path = '/teams/{teamId}'.replaceAll(RegExp('{teamId}'), teamId); + + final Map params = { + }; + + final Map headers = { + 'content-type': 'application/json', + }; + + return client.call(HttpMethod.get, path: path, params: params, headers: headers); + } + + /// Update Team + /// + /// Update team by its unique ID. Only team owners have write access for this + /// resource. + /// + Future update({@required String teamId, @required String name}) { + final String path = '/teams/{teamId}'.replaceAll(RegExp('{teamId}'), teamId); + + final Map params = { + 'name': name, + }; + + final Map headers = { + 'content-type': 'application/json', + }; + + return client.call(HttpMethod.put, path: path, params: params, headers: headers); + } + + /// Delete Team + /// + /// Delete team by its unique ID. Only team owners have write access for this + /// resource. + /// + Future delete({@required String teamId}) { + final String path = '/teams/{teamId}'.replaceAll(RegExp('{teamId}'), teamId); + + final Map params = { + }; + + final Map headers = { + 'content-type': 'application/json', + }; + + return client.call(HttpMethod.delete, path: path, params: params, headers: headers); + } + + /// Get Team Memberships + /// + /// Get team members by the team unique ID. All team members have read access + /// for this list of resources. + /// + Future getMemberships({@required String teamId}) { + final String path = '/teams/{teamId}/memberships'.replaceAll(RegExp('{teamId}'), teamId); + + final Map params = { + }; + + final Map headers = { + 'content-type': 'application/json', + }; + + return client.call(HttpMethod.get, path: path, params: params, headers: headers); + } + + /// Create Team Membership + /// + /// Use this endpoint to invite a new member to join your team. An email with a + /// link to join the team will be sent to the new member email address if the + /// member doesn't exist in the project it will be created automatically. + /// + /// Use the 'URL' parameter to redirect the user from the invitation email back + /// to your app. When the user is redirected, use the [Update Team Membership + /// Status](/docs/client/teams#updateMembershipStatus) endpoint to allow the + /// user to accept the invitation to the team. + /// + /// Please note that in order to avoid a [Redirect + /// Attacks](https://github.com/OWASP/CheatSheetSeries/blob/master/cheatsheets/Unvalidated_Redirects_and_Forwards_Cheat_Sheet.md) + /// the only valid redirect URL's are the once from domains you have set when + /// added your platforms in the console interface. + /// + Future createMembership({@required String teamId, @required String email, @required List roles, @required String url, String name = ''}) { + final String path = '/teams/{teamId}/memberships'.replaceAll(RegExp('{teamId}'), teamId); + + final Map params = { + 'email': email, + 'name': name, + 'roles': roles, + 'url': url, + }; + + final Map headers = { + 'content-type': 'application/json', + }; + + return client.call(HttpMethod.post, path: path, params: params, headers: headers); + } + + /// Delete Team Membership + /// + /// This endpoint allows a user to leave a team or for a team owner to delete + /// the membership of any other team member. You can also use this endpoint to + /// delete a user membership even if he didn't accept it. + /// + Future deleteMembership({@required String teamId, @required String inviteId}) { + final String path = '/teams/{teamId}/memberships/{inviteId}'.replaceAll(RegExp('{teamId}'), teamId).replaceAll(RegExp('{inviteId}'), inviteId); + + final Map params = { + }; + + final Map headers = { + 'content-type': 'application/json', + }; + + return client.call(HttpMethod.delete, path: path, params: params, headers: headers); + } + + /// Update Team Membership Status + /// + /// Use this endpoint to allow a user to accept an invitation to join a team + /// after he is being redirected back to your app from the invitation email he + /// was sent. + /// + Future updateMembershipStatus({@required String teamId, @required String inviteId, @required String userId, @required String secret}) { + final String path = '/teams/{teamId}/memberships/{inviteId}/status'.replaceAll(RegExp('{teamId}'), teamId).replaceAll(RegExp('{inviteId}'), inviteId); + + final Map params = { + 'userId': userId, + 'secret': secret, + }; + + final Map headers = { + 'content-type': 'application/json', + }; + + return client.call(HttpMethod.patch, path: path, params: params, headers: headers); + } +} \ No newline at end of file diff --git a/app/sdks/0.7.0/client-flutter-dev/pubspec.yaml b/app/sdks/0.7.0/client-flutter-dev/pubspec.yaml new file mode 100644 index 0000000000..7d3646b8ee --- /dev/null +++ b/app/sdks/0.7.0/client-flutter-dev/pubspec.yaml @@ -0,0 +1,23 @@ +name: appwrite_dev +version: 0.3.2 +description: Appwrite is an open-source self-hosted backend server that abstract and simplify complex and repetitive development tasks behind a very simple REST API +homepage: https://appwrite.io +repository: https://github.com/appwrite/sdk-for-flutter-dev +issue_tracker: https://github.com/appwrite/sdk-generator/issues +documentation: https://appwrite.io/support +environment: + sdk: '>=2.6.0 <3.0.0' +dependencies: + meta: ^1.1.8 + path_provider: ^1.6.14 + package_info: ^0.4.3 + dio: ^3.0.10 + cookie_jar: ^1.0.1 + dio_cookie_manager: ^1.0.0 + flutter_web_auth: ^0.2.4 + flutter: + sdk: flutter + +dev_dependencies: + flutter_test: + sdk: flutter \ No newline at end of file diff --git a/app/sdks/0.7.0/client-flutter/CHANGELOG.md b/app/sdks/0.7.0/client-flutter/CHANGELOG.md new file mode 100644 index 0000000000..a584ad8b9a --- /dev/null +++ b/app/sdks/0.7.0/client-flutter/CHANGELOG.md @@ -0,0 +1,60 @@ +## 0.3.0-dev.2 + +- Fix for an error when using a self-signed certificate for Web + +## 0.3.0-dev.1 + +- Updated package dependencies (@lohanidamodar) +- Added Flutter for Web compatibility (@lohanidamodar) + +## 0.2.3 + +- Fixed OAuth2 cookie bug, where a new session cookie couldn't overwrite an old cookie + +## 0.2.2 + +- Fixed an error that happend when the OAuth session creation request was sent before any other API call +- Fixed a bug in the Avatars service where location URL generation had syntax error + +## 0.2.1 + +- Fixed callback scheme + +## 0.2.0 + +- Updated flutter_web_auth plugin to version 0.2.4 +- Added per project unique callback for OAuth2 redirects to aviod conflicts between multiple Appwrite projects + +## 0.1.1 + +- Updated flutter_web_auth version + +## 0.1.0 + +- Added examples file +- Some minor style fixes + +## 0.0.14 + +- Using MultipartFile for file uploads + +## 0.0.13 + +- Fix for file upload method + +## 0.0.12 + +- Added file upload support for storage service + +## 0.0.11 + +- Added integration with web auth plugin to support Appwrite OAuth API + +## 0.0.9 + +- Updated deafult params + +## 0.0.8 + +- Fixed compilation error in Client class +- Shorter description for package \ No newline at end of file diff --git a/app/sdks/0.7.0/client-flutter/LICENSE b/app/sdks/0.7.0/client-flutter/LICENSE new file mode 100644 index 0000000000..fc7c051a91 --- /dev/null +++ b/app/sdks/0.7.0/client-flutter/LICENSE @@ -0,0 +1,12 @@ +Copyright (c) 2019 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: + + 1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. + + 2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. + + 3. Neither the name Appwrite nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. \ No newline at end of file diff --git a/app/sdks/0.7.0/client-flutter/README.md b/app/sdks/0.7.0/client-flutter/README.md new file mode 100644 index 0000000000..d272426ee3 --- /dev/null +++ b/app/sdks/0.7.0/client-flutter/README.md @@ -0,0 +1,38 @@ +# Appwrite Flutter SDK + +[![pub package](https://img.shields.io/pub/v/appwrite.svg)](https://pub.dartlang.org/packages/appwrite) +![License](https://img.shields.io/github/license/appwrite/sdk-for-flutter.svg?v=1) +![Version](https://img.shields.io/badge/api%20version-0.6.2-blue.svg?v=1) + +**This SDK is compatible with Appwrite server version 0.6.2. For older versions, please check previous releases.** + +Appwrite is an open-source backend as a service server that abstract and simplify complex and repetitive development tasks behind a very simple to use REST API. Appwrite aims to help you develop your apps faster and in a more secure way. + Use the Flutter SDK to integrate your app with the Appwrite server to easily start interacting with all of Appwrite backend APIs and tools. + For full API documentation and tutorials go to [https://appwrite.io/docs](https://appwrite.io/docs) + + + +![Appwrite](https://appwrite.io/images/github.png) + +## Installation + +Add this to your package's `pubspec.yaml` file: + +```yml +dependencies: + appwrite: ^0.3.0-dev.2 +``` + +You can install packages from the command line: + +```bash +pub get appwrite +``` + +## Contribution + +This library is auto-generated by Appwrite custom [SDK Generator](https://github.com/appwrite/sdk-generator). To learn more about how you can help us improve this SDK, please check the [contribution guide](https://github.com/appwrite/sdk-generator/blob/master/CONTRIBUTING.md) before sending a pull-request. + +## License + +Please see the [BSD-3-Clause license](https://raw.githubusercontent.com/appwrite/appwrite/master/LICENSE) file for more information. \ No newline at end of file diff --git a/app/sdks/0.7.0/client-flutter/docs/examples/account/create-o-auth2session.md b/app/sdks/0.7.0/client-flutter/docs/examples/account/create-o-auth2session.md new file mode 100644 index 0000000000..0e26dd27af --- /dev/null +++ b/app/sdks/0.7.0/client-flutter/docs/examples/account/create-o-auth2session.md @@ -0,0 +1,22 @@ +import 'package:appwrite/appwrite.dart'; + +void main() { // Init SDK + Client client = Client(); + Account account = Account(client); + + client + .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID + ; + + Future result = account.createOAuth2Session( + provider: 'amazon', + ); + + result + .then((response) { + print(response); + }).catchError((error) { + print(error.response); + }); +} \ No newline at end of file diff --git a/app/sdks/0.7.0/client-flutter/docs/examples/account/create-recovery.md b/app/sdks/0.7.0/client-flutter/docs/examples/account/create-recovery.md new file mode 100644 index 0000000000..50db45b15d --- /dev/null +++ b/app/sdks/0.7.0/client-flutter/docs/examples/account/create-recovery.md @@ -0,0 +1,23 @@ +import 'package:appwrite/appwrite.dart'; + +void main() { // Init SDK + Client client = Client(); + Account account = Account(client); + + client + .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID + ; + + Future result = account.createRecovery( + email: 'email@example.com', + url: 'https://example.com', + ); + + result + .then((response) { + print(response); + }).catchError((error) { + print(error.response); + }); +} \ No newline at end of file diff --git a/app/sdks/0.7.0/client-flutter/docs/examples/account/create-session.md b/app/sdks/0.7.0/client-flutter/docs/examples/account/create-session.md new file mode 100644 index 0000000000..ef824b4eca --- /dev/null +++ b/app/sdks/0.7.0/client-flutter/docs/examples/account/create-session.md @@ -0,0 +1,23 @@ +import 'package:appwrite/appwrite.dart'; + +void main() { // Init SDK + Client client = Client(); + Account account = Account(client); + + client + .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID + ; + + Future result = account.createSession( + email: 'email@example.com', + password: 'password', + ); + + result + .then((response) { + print(response); + }).catchError((error) { + print(error.response); + }); +} \ No newline at end of file diff --git a/app/sdks/0.7.0/client-flutter/docs/examples/account/create-verification.md b/app/sdks/0.7.0/client-flutter/docs/examples/account/create-verification.md new file mode 100644 index 0000000000..6b9b1ace40 --- /dev/null +++ b/app/sdks/0.7.0/client-flutter/docs/examples/account/create-verification.md @@ -0,0 +1,22 @@ +import 'package:appwrite/appwrite.dart'; + +void main() { // Init SDK + Client client = Client(); + Account account = Account(client); + + client + .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID + ; + + Future result = account.createVerification( + url: 'https://example.com', + ); + + result + .then((response) { + print(response); + }).catchError((error) { + print(error.response); + }); +} \ No newline at end of file diff --git a/app/sdks/0.7.0/client-flutter/docs/examples/account/create.md b/app/sdks/0.7.0/client-flutter/docs/examples/account/create.md new file mode 100644 index 0000000000..384258ae68 --- /dev/null +++ b/app/sdks/0.7.0/client-flutter/docs/examples/account/create.md @@ -0,0 +1,23 @@ +import 'package:appwrite/appwrite.dart'; + +void main() { // Init SDK + Client client = Client(); + Account account = Account(client); + + client + .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID + ; + + Future result = account.create( + email: 'email@example.com', + password: 'password', + ); + + result + .then((response) { + print(response); + }).catchError((error) { + print(error.response); + }); +} \ No newline at end of file diff --git a/app/sdks/0.7.0/client-flutter/docs/examples/account/delete-session.md b/app/sdks/0.7.0/client-flutter/docs/examples/account/delete-session.md new file mode 100644 index 0000000000..80a3f505d0 --- /dev/null +++ b/app/sdks/0.7.0/client-flutter/docs/examples/account/delete-session.md @@ -0,0 +1,22 @@ +import 'package:appwrite/appwrite.dart'; + +void main() { // Init SDK + Client client = Client(); + Account account = Account(client); + + client + .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID + ; + + Future result = account.deleteSession( + sessionId: '[SESSION_ID]', + ); + + result + .then((response) { + print(response); + }).catchError((error) { + print(error.response); + }); +} \ No newline at end of file diff --git a/app/sdks/0.7.0/client-flutter/docs/examples/account/delete-sessions.md b/app/sdks/0.7.0/client-flutter/docs/examples/account/delete-sessions.md new file mode 100644 index 0000000000..5e947fabc2 --- /dev/null +++ b/app/sdks/0.7.0/client-flutter/docs/examples/account/delete-sessions.md @@ -0,0 +1,20 @@ +import 'package:appwrite/appwrite.dart'; + +void main() { // Init SDK + Client client = Client(); + Account account = Account(client); + + client + .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID + ; + + Future result = account.deleteSessions( ); + + result + .then((response) { + print(response); + }).catchError((error) { + print(error.response); + }); +} \ No newline at end of file diff --git a/app/sdks/0.7.0/client-flutter/docs/examples/account/delete.md b/app/sdks/0.7.0/client-flutter/docs/examples/account/delete.md new file mode 100644 index 0000000000..2853a1f437 --- /dev/null +++ b/app/sdks/0.7.0/client-flutter/docs/examples/account/delete.md @@ -0,0 +1,20 @@ +import 'package:appwrite/appwrite.dart'; + +void main() { // Init SDK + Client client = Client(); + Account account = Account(client); + + client + .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID + ; + + Future result = account.delete( ); + + result + .then((response) { + print(response); + }).catchError((error) { + print(error.response); + }); +} \ No newline at end of file diff --git a/app/sdks/0.7.0/client-flutter/docs/examples/account/get-logs.md b/app/sdks/0.7.0/client-flutter/docs/examples/account/get-logs.md new file mode 100644 index 0000000000..8f52f8220b --- /dev/null +++ b/app/sdks/0.7.0/client-flutter/docs/examples/account/get-logs.md @@ -0,0 +1,20 @@ +import 'package:appwrite/appwrite.dart'; + +void main() { // Init SDK + Client client = Client(); + Account account = Account(client); + + client + .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID + ; + + Future result = account.getLogs( ); + + result + .then((response) { + print(response); + }).catchError((error) { + print(error.response); + }); +} \ No newline at end of file diff --git a/app/sdks/0.7.0/client-flutter/docs/examples/account/get-prefs.md b/app/sdks/0.7.0/client-flutter/docs/examples/account/get-prefs.md new file mode 100644 index 0000000000..01d57a5499 --- /dev/null +++ b/app/sdks/0.7.0/client-flutter/docs/examples/account/get-prefs.md @@ -0,0 +1,20 @@ +import 'package:appwrite/appwrite.dart'; + +void main() { // Init SDK + Client client = Client(); + Account account = Account(client); + + client + .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID + ; + + Future result = account.getPrefs( ); + + result + .then((response) { + print(response); + }).catchError((error) { + print(error.response); + }); +} \ No newline at end of file diff --git a/app/sdks/0.7.0/client-flutter/docs/examples/account/get-sessions.md b/app/sdks/0.7.0/client-flutter/docs/examples/account/get-sessions.md new file mode 100644 index 0000000000..e921bda59b --- /dev/null +++ b/app/sdks/0.7.0/client-flutter/docs/examples/account/get-sessions.md @@ -0,0 +1,20 @@ +import 'package:appwrite/appwrite.dart'; + +void main() { // Init SDK + Client client = Client(); + Account account = Account(client); + + client + .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID + ; + + Future result = account.getSessions( ); + + result + .then((response) { + print(response); + }).catchError((error) { + print(error.response); + }); +} \ No newline at end of file diff --git a/app/sdks/0.7.0/client-flutter/docs/examples/account/get.md b/app/sdks/0.7.0/client-flutter/docs/examples/account/get.md new file mode 100644 index 0000000000..35241b5607 --- /dev/null +++ b/app/sdks/0.7.0/client-flutter/docs/examples/account/get.md @@ -0,0 +1,20 @@ +import 'package:appwrite/appwrite.dart'; + +void main() { // Init SDK + Client client = Client(); + Account account = Account(client); + + client + .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID + ; + + Future result = account.get( ); + + result + .then((response) { + print(response); + }).catchError((error) { + print(error.response); + }); +} \ No newline at end of file diff --git a/app/sdks/0.7.0/client-flutter/docs/examples/account/update-email.md b/app/sdks/0.7.0/client-flutter/docs/examples/account/update-email.md new file mode 100644 index 0000000000..4a1a002db4 --- /dev/null +++ b/app/sdks/0.7.0/client-flutter/docs/examples/account/update-email.md @@ -0,0 +1,23 @@ +import 'package:appwrite/appwrite.dart'; + +void main() { // Init SDK + Client client = Client(); + Account account = Account(client); + + client + .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID + ; + + Future result = account.updateEmail( + email: 'email@example.com', + password: 'password', + ); + + result + .then((response) { + print(response); + }).catchError((error) { + print(error.response); + }); +} \ No newline at end of file diff --git a/app/sdks/0.7.0/client-flutter/docs/examples/account/update-name.md b/app/sdks/0.7.0/client-flutter/docs/examples/account/update-name.md new file mode 100644 index 0000000000..fa432bb34a --- /dev/null +++ b/app/sdks/0.7.0/client-flutter/docs/examples/account/update-name.md @@ -0,0 +1,22 @@ +import 'package:appwrite/appwrite.dart'; + +void main() { // Init SDK + Client client = Client(); + Account account = Account(client); + + client + .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID + ; + + Future result = account.updateName( + name: '[NAME]', + ); + + result + .then((response) { + print(response); + }).catchError((error) { + print(error.response); + }); +} \ No newline at end of file diff --git a/app/sdks/0.7.0/client-flutter/docs/examples/account/update-password.md b/app/sdks/0.7.0/client-flutter/docs/examples/account/update-password.md new file mode 100644 index 0000000000..9bd8ad9b77 --- /dev/null +++ b/app/sdks/0.7.0/client-flutter/docs/examples/account/update-password.md @@ -0,0 +1,23 @@ +import 'package:appwrite/appwrite.dart'; + +void main() { // Init SDK + Client client = Client(); + Account account = Account(client); + + client + .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID + ; + + Future result = account.updatePassword( + password: 'password', + oldPassword: 'password', + ); + + result + .then((response) { + print(response); + }).catchError((error) { + print(error.response); + }); +} \ No newline at end of file diff --git a/app/sdks/0.7.0/client-flutter/docs/examples/account/update-prefs.md b/app/sdks/0.7.0/client-flutter/docs/examples/account/update-prefs.md new file mode 100644 index 0000000000..443252f89a --- /dev/null +++ b/app/sdks/0.7.0/client-flutter/docs/examples/account/update-prefs.md @@ -0,0 +1,22 @@ +import 'package:appwrite/appwrite.dart'; + +void main() { // Init SDK + Client client = Client(); + Account account = Account(client); + + client + .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID + ; + + Future result = account.updatePrefs( + prefs: {}, + ); + + result + .then((response) { + print(response); + }).catchError((error) { + print(error.response); + }); +} \ No newline at end of file diff --git a/app/sdks/0.7.0/client-flutter/docs/examples/account/update-recovery.md b/app/sdks/0.7.0/client-flutter/docs/examples/account/update-recovery.md new file mode 100644 index 0000000000..5140235d49 --- /dev/null +++ b/app/sdks/0.7.0/client-flutter/docs/examples/account/update-recovery.md @@ -0,0 +1,25 @@ +import 'package:appwrite/appwrite.dart'; + +void main() { // Init SDK + Client client = Client(); + Account account = Account(client); + + client + .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID + ; + + Future result = account.updateRecovery( + userId: '[USER_ID]', + secret: '[SECRET]', + password: 'password', + passwordAgain: 'password', + ); + + result + .then((response) { + print(response); + }).catchError((error) { + print(error.response); + }); +} \ No newline at end of file diff --git a/app/sdks/0.7.0/client-flutter/docs/examples/account/update-verification.md b/app/sdks/0.7.0/client-flutter/docs/examples/account/update-verification.md new file mode 100644 index 0000000000..b795cde92d --- /dev/null +++ b/app/sdks/0.7.0/client-flutter/docs/examples/account/update-verification.md @@ -0,0 +1,23 @@ +import 'package:appwrite/appwrite.dart'; + +void main() { // Init SDK + Client client = Client(); + Account account = Account(client); + + client + .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID + ; + + Future result = account.updateVerification( + userId: '[USER_ID]', + secret: '[SECRET]', + ); + + result + .then((response) { + print(response); + }).catchError((error) { + print(error.response); + }); +} \ No newline at end of file diff --git a/app/sdks/0.7.0/client-flutter/docs/examples/avatars/get-browser.md b/app/sdks/0.7.0/client-flutter/docs/examples/avatars/get-browser.md new file mode 100644 index 0000000000..464767c4c0 --- /dev/null +++ b/app/sdks/0.7.0/client-flutter/docs/examples/avatars/get-browser.md @@ -0,0 +1,17 @@ +import 'package:appwrite/appwrite.dart'; + +void main() { // Init SDK + Client client = Client(); + Avatars avatars = Avatars(client); + + client + .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID + ; + + String result = avatars.getBrowser( + code: 'aa', + ); + + print(result); // Resource URL string +} \ No newline at end of file diff --git a/app/sdks/0.7.0/client-flutter/docs/examples/avatars/get-credit-card.md b/app/sdks/0.7.0/client-flutter/docs/examples/avatars/get-credit-card.md new file mode 100644 index 0000000000..482c642402 --- /dev/null +++ b/app/sdks/0.7.0/client-flutter/docs/examples/avatars/get-credit-card.md @@ -0,0 +1,17 @@ +import 'package:appwrite/appwrite.dart'; + +void main() { // Init SDK + Client client = Client(); + Avatars avatars = Avatars(client); + + client + .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID + ; + + String result = avatars.getCreditCard( + code: 'amex', + ); + + print(result); // Resource URL string +} \ No newline at end of file diff --git a/app/sdks/0.7.0/client-flutter/docs/examples/avatars/get-favicon.md b/app/sdks/0.7.0/client-flutter/docs/examples/avatars/get-favicon.md new file mode 100644 index 0000000000..60397b0af2 --- /dev/null +++ b/app/sdks/0.7.0/client-flutter/docs/examples/avatars/get-favicon.md @@ -0,0 +1,17 @@ +import 'package:appwrite/appwrite.dart'; + +void main() { // Init SDK + Client client = Client(); + Avatars avatars = Avatars(client); + + client + .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID + ; + + String result = avatars.getFavicon( + url: 'https://example.com', + ); + + print(result); // Resource URL string +} \ No newline at end of file diff --git a/app/sdks/0.7.0/client-flutter/docs/examples/avatars/get-flag.md b/app/sdks/0.7.0/client-flutter/docs/examples/avatars/get-flag.md new file mode 100644 index 0000000000..a9f7a711d9 --- /dev/null +++ b/app/sdks/0.7.0/client-flutter/docs/examples/avatars/get-flag.md @@ -0,0 +1,17 @@ +import 'package:appwrite/appwrite.dart'; + +void main() { // Init SDK + Client client = Client(); + Avatars avatars = Avatars(client); + + client + .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID + ; + + String result = avatars.getFlag( + code: 'af', + ); + + print(result); // Resource URL string +} \ No newline at end of file diff --git a/app/sdks/0.7.0/client-flutter/docs/examples/avatars/get-image.md b/app/sdks/0.7.0/client-flutter/docs/examples/avatars/get-image.md new file mode 100644 index 0000000000..7cead1cb2f --- /dev/null +++ b/app/sdks/0.7.0/client-flutter/docs/examples/avatars/get-image.md @@ -0,0 +1,17 @@ +import 'package:appwrite/appwrite.dart'; + +void main() { // Init SDK + Client client = Client(); + Avatars avatars = Avatars(client); + + client + .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID + ; + + String result = avatars.getImage( + url: 'https://example.com', + ); + + print(result); // Resource URL string +} \ No newline at end of file diff --git a/app/sdks/0.7.0/client-flutter/docs/examples/avatars/get-initials.md b/app/sdks/0.7.0/client-flutter/docs/examples/avatars/get-initials.md new file mode 100644 index 0000000000..b2e70788d6 --- /dev/null +++ b/app/sdks/0.7.0/client-flutter/docs/examples/avatars/get-initials.md @@ -0,0 +1,16 @@ +import 'package:appwrite/appwrite.dart'; + +void main() { // Init SDK + Client client = Client(); + Avatars avatars = Avatars(client); + + client + .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID + ; + + String result = avatars.getInitials( + ); + + print(result); // Resource URL string +} \ No newline at end of file diff --git a/app/sdks/0.7.0/client-flutter/docs/examples/avatars/get-q-r.md b/app/sdks/0.7.0/client-flutter/docs/examples/avatars/get-q-r.md new file mode 100644 index 0000000000..a5bcfd2c05 --- /dev/null +++ b/app/sdks/0.7.0/client-flutter/docs/examples/avatars/get-q-r.md @@ -0,0 +1,17 @@ +import 'package:appwrite/appwrite.dart'; + +void main() { // Init SDK + Client client = Client(); + Avatars avatars = Avatars(client); + + client + .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID + ; + + String result = avatars.getQR( + text: '[TEXT]', + ); + + print(result); // Resource URL string +} \ No newline at end of file diff --git a/app/sdks/0.7.0/client-flutter/docs/examples/database/create-document.md b/app/sdks/0.7.0/client-flutter/docs/examples/database/create-document.md new file mode 100644 index 0000000000..b7d540bc2d --- /dev/null +++ b/app/sdks/0.7.0/client-flutter/docs/examples/database/create-document.md @@ -0,0 +1,25 @@ +import 'package:appwrite/appwrite.dart'; + +void main() { // Init SDK + Client client = Client(); + Database database = Database(client); + + client + .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID + ; + + Future result = database.createDocument( + collectionId: '[COLLECTION_ID]', + data: {}, + read: [], + write: [], + ); + + result + .then((response) { + print(response); + }).catchError((error) { + print(error.response); + }); +} \ No newline at end of file diff --git a/app/sdks/0.7.0/client-flutter/docs/examples/database/delete-document.md b/app/sdks/0.7.0/client-flutter/docs/examples/database/delete-document.md new file mode 100644 index 0000000000..40c1cbdfe2 --- /dev/null +++ b/app/sdks/0.7.0/client-flutter/docs/examples/database/delete-document.md @@ -0,0 +1,23 @@ +import 'package:appwrite/appwrite.dart'; + +void main() { // Init SDK + Client client = Client(); + Database database = Database(client); + + client + .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID + ; + + Future result = database.deleteDocument( + collectionId: '[COLLECTION_ID]', + documentId: '[DOCUMENT_ID]', + ); + + result + .then((response) { + print(response); + }).catchError((error) { + print(error.response); + }); +} \ No newline at end of file diff --git a/app/sdks/0.7.0/client-flutter/docs/examples/database/get-document.md b/app/sdks/0.7.0/client-flutter/docs/examples/database/get-document.md new file mode 100644 index 0000000000..0c98142315 --- /dev/null +++ b/app/sdks/0.7.0/client-flutter/docs/examples/database/get-document.md @@ -0,0 +1,23 @@ +import 'package:appwrite/appwrite.dart'; + +void main() { // Init SDK + Client client = Client(); + Database database = Database(client); + + client + .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID + ; + + Future result = database.getDocument( + collectionId: '[COLLECTION_ID]', + documentId: '[DOCUMENT_ID]', + ); + + result + .then((response) { + print(response); + }).catchError((error) { + print(error.response); + }); +} \ No newline at end of file diff --git a/app/sdks/0.7.0/client-flutter/docs/examples/database/list-documents.md b/app/sdks/0.7.0/client-flutter/docs/examples/database/list-documents.md new file mode 100644 index 0000000000..0685e7f1aa --- /dev/null +++ b/app/sdks/0.7.0/client-flutter/docs/examples/database/list-documents.md @@ -0,0 +1,22 @@ +import 'package:appwrite/appwrite.dart'; + +void main() { // Init SDK + Client client = Client(); + Database database = Database(client); + + client + .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID + ; + + Future result = database.listDocuments( + collectionId: '[COLLECTION_ID]', + ); + + result + .then((response) { + print(response); + }).catchError((error) { + print(error.response); + }); +} \ No newline at end of file diff --git a/app/sdks/0.7.0/client-flutter/docs/examples/database/update-document.md b/app/sdks/0.7.0/client-flutter/docs/examples/database/update-document.md new file mode 100644 index 0000000000..2f37cd767a --- /dev/null +++ b/app/sdks/0.7.0/client-flutter/docs/examples/database/update-document.md @@ -0,0 +1,26 @@ +import 'package:appwrite/appwrite.dart'; + +void main() { // Init SDK + Client client = Client(); + Database database = Database(client); + + client + .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID + ; + + Future result = database.updateDocument( + collectionId: '[COLLECTION_ID]', + documentId: '[DOCUMENT_ID]', + data: {}, + read: [], + write: [], + ); + + result + .then((response) { + print(response); + }).catchError((error) { + print(error.response); + }); +} \ No newline at end of file diff --git a/app/sdks/0.7.0/client-flutter/docs/examples/locale/get-continents.md b/app/sdks/0.7.0/client-flutter/docs/examples/locale/get-continents.md new file mode 100644 index 0000000000..2a6a6413ba --- /dev/null +++ b/app/sdks/0.7.0/client-flutter/docs/examples/locale/get-continents.md @@ -0,0 +1,20 @@ +import 'package:appwrite/appwrite.dart'; + +void main() { // Init SDK + Client client = Client(); + Locale locale = Locale(client); + + client + .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID + ; + + Future result = locale.getContinents( ); + + result + .then((response) { + print(response); + }).catchError((error) { + print(error.response); + }); +} \ No newline at end of file diff --git a/app/sdks/0.7.0/client-flutter/docs/examples/locale/get-countries-e-u.md b/app/sdks/0.7.0/client-flutter/docs/examples/locale/get-countries-e-u.md new file mode 100644 index 0000000000..1934fc6709 --- /dev/null +++ b/app/sdks/0.7.0/client-flutter/docs/examples/locale/get-countries-e-u.md @@ -0,0 +1,20 @@ +import 'package:appwrite/appwrite.dart'; + +void main() { // Init SDK + Client client = Client(); + Locale locale = Locale(client); + + client + .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID + ; + + Future result = locale.getCountriesEU( ); + + result + .then((response) { + print(response); + }).catchError((error) { + print(error.response); + }); +} \ No newline at end of file diff --git a/app/sdks/0.7.0/client-flutter/docs/examples/locale/get-countries-phones.md b/app/sdks/0.7.0/client-flutter/docs/examples/locale/get-countries-phones.md new file mode 100644 index 0000000000..f6b1f58749 --- /dev/null +++ b/app/sdks/0.7.0/client-flutter/docs/examples/locale/get-countries-phones.md @@ -0,0 +1,20 @@ +import 'package:appwrite/appwrite.dart'; + +void main() { // Init SDK + Client client = Client(); + Locale locale = Locale(client); + + client + .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID + ; + + Future result = locale.getCountriesPhones( ); + + result + .then((response) { + print(response); + }).catchError((error) { + print(error.response); + }); +} \ No newline at end of file diff --git a/app/sdks/0.7.0/client-flutter/docs/examples/locale/get-countries.md b/app/sdks/0.7.0/client-flutter/docs/examples/locale/get-countries.md new file mode 100644 index 0000000000..104584968f --- /dev/null +++ b/app/sdks/0.7.0/client-flutter/docs/examples/locale/get-countries.md @@ -0,0 +1,20 @@ +import 'package:appwrite/appwrite.dart'; + +void main() { // Init SDK + Client client = Client(); + Locale locale = Locale(client); + + client + .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID + ; + + Future result = locale.getCountries( ); + + result + .then((response) { + print(response); + }).catchError((error) { + print(error.response); + }); +} \ No newline at end of file diff --git a/app/sdks/0.7.0/client-flutter/docs/examples/locale/get-currencies.md b/app/sdks/0.7.0/client-flutter/docs/examples/locale/get-currencies.md new file mode 100644 index 0000000000..8dc01fc68e --- /dev/null +++ b/app/sdks/0.7.0/client-flutter/docs/examples/locale/get-currencies.md @@ -0,0 +1,20 @@ +import 'package:appwrite/appwrite.dart'; + +void main() { // Init SDK + Client client = Client(); + Locale locale = Locale(client); + + client + .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID + ; + + Future result = locale.getCurrencies( ); + + result + .then((response) { + print(response); + }).catchError((error) { + print(error.response); + }); +} \ No newline at end of file diff --git a/app/sdks/0.7.0/client-flutter/docs/examples/locale/get-languages.md b/app/sdks/0.7.0/client-flutter/docs/examples/locale/get-languages.md new file mode 100644 index 0000000000..a4124d3cbd --- /dev/null +++ b/app/sdks/0.7.0/client-flutter/docs/examples/locale/get-languages.md @@ -0,0 +1,20 @@ +import 'package:appwrite/appwrite.dart'; + +void main() { // Init SDK + Client client = Client(); + Locale locale = Locale(client); + + client + .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID + ; + + Future result = locale.getLanguages( ); + + result + .then((response) { + print(response); + }).catchError((error) { + print(error.response); + }); +} \ No newline at end of file diff --git a/app/sdks/0.7.0/client-flutter/docs/examples/locale/get.md b/app/sdks/0.7.0/client-flutter/docs/examples/locale/get.md new file mode 100644 index 0000000000..189fceb7d1 --- /dev/null +++ b/app/sdks/0.7.0/client-flutter/docs/examples/locale/get.md @@ -0,0 +1,20 @@ +import 'package:appwrite/appwrite.dart'; + +void main() { // Init SDK + Client client = Client(); + Locale locale = Locale(client); + + client + .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID + ; + + Future result = locale.get( ); + + result + .then((response) { + print(response); + }).catchError((error) { + print(error.response); + }); +} \ No newline at end of file diff --git a/app/sdks/0.7.0/client-flutter/docs/examples/storage/create-file.md b/app/sdks/0.7.0/client-flutter/docs/examples/storage/create-file.md new file mode 100644 index 0000000000..9f61be12f4 --- /dev/null +++ b/app/sdks/0.7.0/client-flutter/docs/examples/storage/create-file.md @@ -0,0 +1,25 @@ +import 'dart:io'; +import 'package:appwrite/appwrite.dart'; + +void main() { // Init SDK + Client client = Client(); + Storage storage = Storage(client); + + client + .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID + ; + + Future result = storage.createFile( + file: await MultipartFile.fromFile('./path-to-files/image.jpg', 'image.jpg'), + read: [], + write: [], + ); + + result + .then((response) { + print(response); + }).catchError((error) { + print(error.response); + }); +} \ No newline at end of file diff --git a/app/sdks/0.7.0/client-flutter/docs/examples/storage/delete-file.md b/app/sdks/0.7.0/client-flutter/docs/examples/storage/delete-file.md new file mode 100644 index 0000000000..271ed7b2dd --- /dev/null +++ b/app/sdks/0.7.0/client-flutter/docs/examples/storage/delete-file.md @@ -0,0 +1,22 @@ +import 'package:appwrite/appwrite.dart'; + +void main() { // Init SDK + Client client = Client(); + Storage storage = Storage(client); + + client + .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID + ; + + Future result = storage.deleteFile( + fileId: '[FILE_ID]', + ); + + result + .then((response) { + print(response); + }).catchError((error) { + print(error.response); + }); +} \ No newline at end of file diff --git a/app/sdks/0.7.0/client-flutter/docs/examples/storage/get-file-download.md b/app/sdks/0.7.0/client-flutter/docs/examples/storage/get-file-download.md new file mode 100644 index 0000000000..be3385a61b --- /dev/null +++ b/app/sdks/0.7.0/client-flutter/docs/examples/storage/get-file-download.md @@ -0,0 +1,17 @@ +import 'package:appwrite/appwrite.dart'; + +void main() { // Init SDK + Client client = Client(); + Storage storage = Storage(client); + + client + .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID + ; + + String result = storage.getFileDownload( + fileId: '[FILE_ID]', + ); + + print(result); // Resource URL string +} \ No newline at end of file diff --git a/app/sdks/0.7.0/client-flutter/docs/examples/storage/get-file-preview.md b/app/sdks/0.7.0/client-flutter/docs/examples/storage/get-file-preview.md new file mode 100644 index 0000000000..8bd1a47457 --- /dev/null +++ b/app/sdks/0.7.0/client-flutter/docs/examples/storage/get-file-preview.md @@ -0,0 +1,17 @@ +import 'package:appwrite/appwrite.dart'; + +void main() { // Init SDK + Client client = Client(); + Storage storage = Storage(client); + + client + .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID + ; + + String result = storage.getFilePreview( + fileId: '[FILE_ID]', + ); + + print(result); // Resource URL string +} \ No newline at end of file diff --git a/app/sdks/0.7.0/client-flutter/docs/examples/storage/get-file-view.md b/app/sdks/0.7.0/client-flutter/docs/examples/storage/get-file-view.md new file mode 100644 index 0000000000..5803fd409f --- /dev/null +++ b/app/sdks/0.7.0/client-flutter/docs/examples/storage/get-file-view.md @@ -0,0 +1,17 @@ +import 'package:appwrite/appwrite.dart'; + +void main() { // Init SDK + Client client = Client(); + Storage storage = Storage(client); + + client + .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID + ; + + String result = storage.getFileView( + fileId: '[FILE_ID]', + ); + + print(result); // Resource URL string +} \ No newline at end of file diff --git a/app/sdks/0.7.0/client-flutter/docs/examples/storage/get-file.md b/app/sdks/0.7.0/client-flutter/docs/examples/storage/get-file.md new file mode 100644 index 0000000000..feca667fa9 --- /dev/null +++ b/app/sdks/0.7.0/client-flutter/docs/examples/storage/get-file.md @@ -0,0 +1,22 @@ +import 'package:appwrite/appwrite.dart'; + +void main() { // Init SDK + Client client = Client(); + Storage storage = Storage(client); + + client + .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID + ; + + Future result = storage.getFile( + fileId: '[FILE_ID]', + ); + + result + .then((response) { + print(response); + }).catchError((error) { + print(error.response); + }); +} \ No newline at end of file diff --git a/app/sdks/0.7.0/client-flutter/docs/examples/storage/list-files.md b/app/sdks/0.7.0/client-flutter/docs/examples/storage/list-files.md new file mode 100644 index 0000000000..1963ec694d --- /dev/null +++ b/app/sdks/0.7.0/client-flutter/docs/examples/storage/list-files.md @@ -0,0 +1,21 @@ +import 'package:appwrite/appwrite.dart'; + +void main() { // Init SDK + Client client = Client(); + Storage storage = Storage(client); + + client + .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID + ; + + Future result = storage.listFiles( + ); + + result + .then((response) { + print(response); + }).catchError((error) { + print(error.response); + }); +} \ No newline at end of file diff --git a/app/sdks/0.7.0/client-flutter/docs/examples/storage/update-file.md b/app/sdks/0.7.0/client-flutter/docs/examples/storage/update-file.md new file mode 100644 index 0000000000..a5ecbfe987 --- /dev/null +++ b/app/sdks/0.7.0/client-flutter/docs/examples/storage/update-file.md @@ -0,0 +1,24 @@ +import 'package:appwrite/appwrite.dart'; + +void main() { // Init SDK + Client client = Client(); + Storage storage = Storage(client); + + client + .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID + ; + + Future result = storage.updateFile( + fileId: '[FILE_ID]', + read: [], + write: [], + ); + + result + .then((response) { + print(response); + }).catchError((error) { + print(error.response); + }); +} \ No newline at end of file diff --git a/app/sdks/0.7.0/client-flutter/docs/examples/teams/create-membership.md b/app/sdks/0.7.0/client-flutter/docs/examples/teams/create-membership.md new file mode 100644 index 0000000000..e5e82de7b4 --- /dev/null +++ b/app/sdks/0.7.0/client-flutter/docs/examples/teams/create-membership.md @@ -0,0 +1,25 @@ +import 'package:appwrite/appwrite.dart'; + +void main() { // Init SDK + Client client = Client(); + Teams teams = Teams(client); + + client + .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID + ; + + Future result = teams.createMembership( + teamId: '[TEAM_ID]', + email: 'email@example.com', + roles: [], + url: 'https://example.com', + ); + + result + .then((response) { + print(response); + }).catchError((error) { + print(error.response); + }); +} \ No newline at end of file diff --git a/app/sdks/0.7.0/client-flutter/docs/examples/teams/create.md b/app/sdks/0.7.0/client-flutter/docs/examples/teams/create.md new file mode 100644 index 0000000000..d11958ae6d --- /dev/null +++ b/app/sdks/0.7.0/client-flutter/docs/examples/teams/create.md @@ -0,0 +1,22 @@ +import 'package:appwrite/appwrite.dart'; + +void main() { // Init SDK + Client client = Client(); + Teams teams = Teams(client); + + client + .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID + ; + + Future result = teams.create( + name: '[NAME]', + ); + + result + .then((response) { + print(response); + }).catchError((error) { + print(error.response); + }); +} \ No newline at end of file diff --git a/app/sdks/0.7.0/client-flutter/docs/examples/teams/delete-membership.md b/app/sdks/0.7.0/client-flutter/docs/examples/teams/delete-membership.md new file mode 100644 index 0000000000..3f57b840fe --- /dev/null +++ b/app/sdks/0.7.0/client-flutter/docs/examples/teams/delete-membership.md @@ -0,0 +1,23 @@ +import 'package:appwrite/appwrite.dart'; + +void main() { // Init SDK + Client client = Client(); + Teams teams = Teams(client); + + client + .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID + ; + + Future result = teams.deleteMembership( + teamId: '[TEAM_ID]', + inviteId: '[INVITE_ID]', + ); + + result + .then((response) { + print(response); + }).catchError((error) { + print(error.response); + }); +} \ No newline at end of file diff --git a/app/sdks/0.7.0/client-flutter/docs/examples/teams/delete.md b/app/sdks/0.7.0/client-flutter/docs/examples/teams/delete.md new file mode 100644 index 0000000000..9fb488afec --- /dev/null +++ b/app/sdks/0.7.0/client-flutter/docs/examples/teams/delete.md @@ -0,0 +1,22 @@ +import 'package:appwrite/appwrite.dart'; + +void main() { // Init SDK + Client client = Client(); + Teams teams = Teams(client); + + client + .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID + ; + + Future result = teams.delete( + teamId: '[TEAM_ID]', + ); + + result + .then((response) { + print(response); + }).catchError((error) { + print(error.response); + }); +} \ No newline at end of file diff --git a/app/sdks/0.7.0/client-flutter/docs/examples/teams/get-memberships.md b/app/sdks/0.7.0/client-flutter/docs/examples/teams/get-memberships.md new file mode 100644 index 0000000000..4edadfa2b4 --- /dev/null +++ b/app/sdks/0.7.0/client-flutter/docs/examples/teams/get-memberships.md @@ -0,0 +1,22 @@ +import 'package:appwrite/appwrite.dart'; + +void main() { // Init SDK + Client client = Client(); + Teams teams = Teams(client); + + client + .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID + ; + + Future result = teams.getMemberships( + teamId: '[TEAM_ID]', + ); + + result + .then((response) { + print(response); + }).catchError((error) { + print(error.response); + }); +} \ No newline at end of file diff --git a/app/sdks/0.7.0/client-flutter/docs/examples/teams/get.md b/app/sdks/0.7.0/client-flutter/docs/examples/teams/get.md new file mode 100644 index 0000000000..083565f7a6 --- /dev/null +++ b/app/sdks/0.7.0/client-flutter/docs/examples/teams/get.md @@ -0,0 +1,22 @@ +import 'package:appwrite/appwrite.dart'; + +void main() { // Init SDK + Client client = Client(); + Teams teams = Teams(client); + + client + .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID + ; + + Future result = teams.get( + teamId: '[TEAM_ID]', + ); + + result + .then((response) { + print(response); + }).catchError((error) { + print(error.response); + }); +} \ No newline at end of file diff --git a/app/sdks/0.7.0/client-flutter/docs/examples/teams/list.md b/app/sdks/0.7.0/client-flutter/docs/examples/teams/list.md new file mode 100644 index 0000000000..665020e928 --- /dev/null +++ b/app/sdks/0.7.0/client-flutter/docs/examples/teams/list.md @@ -0,0 +1,21 @@ +import 'package:appwrite/appwrite.dart'; + +void main() { // Init SDK + Client client = Client(); + Teams teams = Teams(client); + + client + .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID + ; + + Future result = teams.list( + ); + + result + .then((response) { + print(response); + }).catchError((error) { + print(error.response); + }); +} \ No newline at end of file diff --git a/app/sdks/0.7.0/client-flutter/docs/examples/teams/update-membership-status.md b/app/sdks/0.7.0/client-flutter/docs/examples/teams/update-membership-status.md new file mode 100644 index 0000000000..616f64e148 --- /dev/null +++ b/app/sdks/0.7.0/client-flutter/docs/examples/teams/update-membership-status.md @@ -0,0 +1,25 @@ +import 'package:appwrite/appwrite.dart'; + +void main() { // Init SDK + Client client = Client(); + Teams teams = Teams(client); + + client + .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID + ; + + Future result = teams.updateMembershipStatus( + teamId: '[TEAM_ID]', + inviteId: '[INVITE_ID]', + userId: '[USER_ID]', + secret: '[SECRET]', + ); + + result + .then((response) { + print(response); + }).catchError((error) { + print(error.response); + }); +} \ No newline at end of file diff --git a/app/sdks/0.7.0/client-flutter/docs/examples/teams/update.md b/app/sdks/0.7.0/client-flutter/docs/examples/teams/update.md new file mode 100644 index 0000000000..915fb57d38 --- /dev/null +++ b/app/sdks/0.7.0/client-flutter/docs/examples/teams/update.md @@ -0,0 +1,23 @@ +import 'package:appwrite/appwrite.dart'; + +void main() { // Init SDK + Client client = Client(); + Teams teams = Teams(client); + + client + .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID + ; + + Future result = teams.update( + teamId: '[TEAM_ID]', + name: '[NAME]', + ); + + result + .then((response) { + print(response); + }).catchError((error) { + print(error.response); + }); +} \ No newline at end of file diff --git a/app/sdks/0.7.0/client-flutter/example/README.md b/app/sdks/0.7.0/client-flutter/example/README.md new file mode 100644 index 0000000000..f6768a5f85 --- /dev/null +++ b/app/sdks/0.7.0/client-flutter/example/README.md @@ -0,0 +1,55 @@ +# Examples + +Init your Appwrite client: + +```dart + Client client = Client(); + + client + .setEndpoint('https://localhost/v1') // Your Appwrite Endpoint + .setProject('5e8cf4f46b5e8') // Your project ID + .setSelfSigned() // Remove in production + ; + +``` + +Create a new user and session: + +```dart +Account account = Account(client); + +Response user = await account.create(email: 'me@appwrite.io', password: 'password', name: 'My Name'); + +Response session = await account.createSession(email: 'me@appwrite.io', password: 'password'); + +``` + +Fetch user profile: + +```dart +Account account = Account(client); + +Response profile = await account.get(); +``` + +Upload File: + +```dart +Storage storage = Storage(client); + +MultipartFile file = MultipartFile.fromFile('./path-to-file/image.jpg', filename: 'image.jpg'); + +storage.createFile( + file: file, + read: ['*'], + write: [] +) +.then((response) { + print(response); // File uploaded! +}) +.catchError((error) { + print(error.response); +}); +``` + +All examples and API features are available at the [official Appwrite docs](https://appwrite.io/docs) \ No newline at end of file diff --git a/app/sdks/0.7.0/client-flutter/lib/appwrite.dart b/app/sdks/0.7.0/client-flutter/lib/appwrite.dart new file mode 100644 index 0000000000..95d0b72cfe --- /dev/null +++ b/app/sdks/0.7.0/client-flutter/lib/appwrite.dart @@ -0,0 +1,10 @@ +export 'package:dio/dio.dart' show Response; + +export 'client.dart'; +export 'enums.dart'; +export 'services/account.dart'; +export 'services/avatars.dart'; +export 'services/database.dart'; +export 'services/locale.dart'; +export 'services/storage.dart'; +export 'services/teams.dart'; diff --git a/app/sdks/0.7.0/client-flutter/lib/client.dart b/app/sdks/0.7.0/client-flutter/lib/client.dart new file mode 100644 index 0000000000..ee55d8ba18 --- /dev/null +++ b/app/sdks/0.7.0/client-flutter/lib/client.dart @@ -0,0 +1,134 @@ +import 'dart:io'; + +import 'package:dio/dio.dart'; +import 'package:flutter/foundation.dart'; +import 'package:dio/adapter.dart'; +import 'package:dio_cookie_manager/dio_cookie_manager.dart'; +import 'package:cookie_jar/cookie_jar.dart'; +import 'package:path_provider/path_provider.dart'; +import 'package:package_info/package_info.dart'; + +import 'enums.dart'; + +class Client { + String endPoint; + String type = 'unknown'; + Map headers; + Map config; + bool selfSigned; + bool initialized = false; + Dio http; + PersistCookieJar cookieJar; + + Client({this.endPoint = 'https://appwrite.io/v1', this.selfSigned = false, Dio http}) : this.http = http ?? Dio() { + // Platform is not supported in web so if web, set type to web automatically and skip Platform check + if(kIsWeb) { + type = 'web'; + }else{ + type = (Platform.isIOS) ? 'ios' : type; + type = (Platform.isMacOS) ? 'macos' : type; + type = (Platform.isAndroid) ? 'android' : type; + type = (Platform.isLinux) ? 'linux' : type; + type = (Platform.isWindows) ? 'windows' : type; + type = (Platform.isFuchsia) ? 'fuchsia' : type; + } + + this.headers = { + 'content-type': 'application/json', + 'x-sdk-version': 'appwrite:flutter:0.3.0-dev.2', + }; + + this.config = {}; + + assert(endPoint.startsWith(RegExp("http://|https://")), "endPoint $endPoint must start with 'http'"); + } + + Future _getCookiePath() async { + final directory = await getApplicationDocumentsDirectory(); + final path = directory.path; + final Directory dir = new Directory('$path/cookies'); + await dir.create(); + return dir; + } + + /// Your project ID + Client setProject(value) { + config['project'] = value; + addHeader('X-Appwrite-Project', value); + return this; + } + + Client setLocale(value) { + config['locale'] = value; + addHeader('X-Appwrite-Locale', value); + return this; + } + + Client setSelfSigned({bool status = true}) { + selfSigned = status; + return this; + } + + Client setEndpoint(String endPoint) { + this.endPoint = endPoint; + this.http.options.baseUrl = this.endPoint; + return this; + } + + Client addHeader(String key, String value) { + headers[key] = value; + + return this; + } + + Future init() async { + if(!initialized) { + // if web skip cookie implementation and origin header as those are automatically handled by browsers + if(!kIsWeb) { + final Directory cookieDir = await _getCookiePath(); + cookieJar = new PersistCookieJar(dir:cookieDir.path); + this.http.interceptors.add(CookieManager(cookieJar)); + PackageInfo packageInfo = await PackageInfo.fromPlatform(); + addHeader('Origin', 'appwrite-' + type + '://' + packageInfo.packageName); + }else{ + // if web set httpClientAdapter as BrowserHttpClientAdapter with withCredentials true to make cookies work + this.http.options.extra['withCredentials'] = true; + } + + this.http.options.baseUrl = this.endPoint; + this.http.options.validateStatus = (status) => status < 400; + } + } + + Future call(HttpMethod method, {String path = '', Map headers = const {}, Map params = const {}}) async { + if(selfSigned && !kIsWeb) { + // Allow self signed requests + (http.httpClientAdapter as DefaultHttpClientAdapter).onHttpClientCreate = (HttpClient client) { + client.badCertificateCallback = (X509Certificate cert, String host, int port) => true; + return client; + }; + } + + await this.init(); + + // Origin is hardcoded for testing + Options options = Options( + headers: {...this.headers, ...headers}, + method: method.name(), + ); + + if(headers['content-type'] == 'multipart/form-data') { + return http.request(path, data: FormData.fromMap(params), options: options); + } + + if (method == HttpMethod.get) { + params.keys.forEach((key) {if (params[key] is int || params[key] is double) { + params[key] = params[key].toString(); + }}); + + return http.get(path, queryParameters: params, options: options); + } else { + return http.request(path, data: params, options: options); + } + } +} \ No newline at end of file diff --git a/app/sdks/0.7.0/client-flutter/lib/enums.dart b/app/sdks/0.7.0/client-flutter/lib/enums.dart new file mode 100644 index 0000000000..2757f6073e --- /dev/null +++ b/app/sdks/0.7.0/client-flutter/lib/enums.dart @@ -0,0 +1,15 @@ +enum HttpMethod { get, post, put, delete, patch } + +extension HttpMethodString on HttpMethod { + String name() { + return this.toString().split('.').last.toUpperCase(); + } +} + +enum OrderType { asc, desc } + +extension OrderTypeString on OrderType { + String name() { + return this.toString().split('.').last.toUpperCase(); + } +} diff --git a/app/sdks/0.7.0/client-flutter/lib/service.dart b/app/sdks/0.7.0/client-flutter/lib/service.dart new file mode 100644 index 0000000000..1ae319b705 --- /dev/null +++ b/app/sdks/0.7.0/client-flutter/lib/service.dart @@ -0,0 +1,7 @@ +import 'client.dart'; + +class Service { + final Client client; + + const Service(this.client); +} diff --git a/app/sdks/0.7.0/client-flutter/lib/services/account.dart b/app/sdks/0.7.0/client-flutter/lib/services/account.dart new file mode 100644 index 0000000000..890303a9d6 --- /dev/null +++ b/app/sdks/0.7.0/client-flutter/lib/services/account.dart @@ -0,0 +1,435 @@ + +import 'dart:io'; +import 'package:universal_html/html.dart' as html; + +import 'package:dio/dio.dart'; +import 'package:meta/meta.dart'; +import 'package:flutter/foundation.dart'; +import 'package:flutter_web_auth/flutter_web_auth.dart'; + +import "../client.dart"; +import '../enums.dart'; +import "../service.dart"; + +class Account extends Service { + Account(Client client): super(client); + + /// Get Account + /// + /// Get currently logged in user data as JSON object. + /// + Future get() { + final String path = '/account'; + + final Map params = { + }; + + final Map headers = { + 'content-type': 'application/json', + }; + + return client.call(HttpMethod.get, path: path, params: params, headers: headers); + } + + /// Create Account + /// + /// Use this endpoint to allow a new user to register a new account in your + /// project. After the user registration completes successfully, you can use + /// the [/account/verfication](/docs/client/account#createVerification) route + /// to start verifying the user email address. To allow your new user to login + /// to his new account, you need to create a new [account + /// session](/docs/client/account#createSession). + /// + Future create({@required String email, @required String password, String name = ''}) { + final String path = '/account'; + + final Map params = { + 'email': email, + 'password': password, + 'name': name, + }; + + final Map headers = { + 'content-type': 'application/json', + }; + + return client.call(HttpMethod.post, path: path, params: params, headers: headers); + } + + /// Delete Account + /// + /// Delete a currently logged in user account. Behind the scene, the user + /// record is not deleted but permanently blocked from any access. This is done + /// to avoid deleted accounts being overtaken by new users with the same email + /// address. Any user-related resources like documents or storage files should + /// be deleted separately. + /// + Future delete() { + final String path = '/account'; + + final Map params = { + }; + + final Map headers = { + 'content-type': 'application/json', + }; + + return client.call(HttpMethod.delete, path: path, params: params, headers: headers); + } + + /// Update Account Email + /// + /// Update currently logged in user account email address. After changing user + /// address, user confirmation status is being reset and a new confirmation + /// mail is sent. For security measures, user password is required to complete + /// this request. + /// + Future updateEmail({@required String email, @required String password}) { + final String path = '/account/email'; + + final Map params = { + 'email': email, + 'password': password, + }; + + final Map headers = { + 'content-type': 'application/json', + }; + + return client.call(HttpMethod.patch, path: path, params: params, headers: headers); + } + + /// Get Account Logs + /// + /// Get currently logged in user list of latest security activity logs. Each + /// log returns user IP address, location and date and time of log. + /// + Future getLogs() { + final String path = '/account/logs'; + + final Map params = { + }; + + final Map headers = { + 'content-type': 'application/json', + }; + + return client.call(HttpMethod.get, path: path, params: params, headers: headers); + } + + /// Update Account Name + /// + /// Update currently logged in user account name. + /// + Future updateName({@required String name}) { + final String path = '/account/name'; + + final Map params = { + 'name': name, + }; + + final Map headers = { + 'content-type': 'application/json', + }; + + return client.call(HttpMethod.patch, path: path, params: params, headers: headers); + } + + /// Update Account Password + /// + /// Update currently logged in user password. For validation, user is required + /// to pass the password twice. + /// + Future updatePassword({@required String password, @required String oldPassword}) { + final String path = '/account/password'; + + final Map params = { + 'password': password, + 'oldPassword': oldPassword, + }; + + final Map headers = { + 'content-type': 'application/json', + }; + + return client.call(HttpMethod.patch, path: path, params: params, headers: headers); + } + + /// Get Account Preferences + /// + /// Get currently logged in user preferences as a key-value object. + /// + Future getPrefs() { + final String path = '/account/prefs'; + + final Map params = { + }; + + final Map headers = { + 'content-type': 'application/json', + }; + + return client.call(HttpMethod.get, path: path, params: params, headers: headers); + } + + /// Update Account Preferences + /// + /// Update currently logged in user account preferences. You can pass only the + /// specific settings you wish to update. + /// + Future updatePrefs({@required dynamic prefs}) { + final String path = '/account/prefs'; + + final Map params = { + 'prefs': prefs, + }; + + final Map headers = { + 'content-type': 'application/json', + }; + + return client.call(HttpMethod.patch, path: path, params: params, headers: headers); + } + + /// Create Password Recovery + /// + /// Sends the user an email with a temporary secret key for password reset. + /// When the user clicks the confirmation link he is redirected back to your + /// app password reset URL with the secret key and email address values + /// attached to the URL query string. Use the query string params to submit a + /// request to the [PUT /account/recovery](/docs/client/account#updateRecovery) + /// endpoint to complete the process. + /// + Future createRecovery({@required String email, @required String url}) { + final String path = '/account/recovery'; + + final Map params = { + 'email': email, + 'url': url, + }; + + final Map headers = { + 'content-type': 'application/json', + }; + + return client.call(HttpMethod.post, path: path, params: params, headers: headers); + } + + /// Complete Password Recovery + /// + /// Use this endpoint to complete the user account password reset. Both the + /// **userId** and **secret** arguments will be passed as query parameters to + /// the redirect URL you have provided when sending your request to the [POST + /// /account/recovery](/docs/client/account#createRecovery) endpoint. + /// + /// Please note that in order to avoid a [Redirect + /// Attack](https://github.com/OWASP/CheatSheetSeries/blob/master/cheatsheets/Unvalidated_Redirects_and_Forwards_Cheat_Sheet.md) + /// the only valid redirect URLs are the ones from domains you have set when + /// adding your platforms in the console interface. + /// + Future updateRecovery({@required String userId, @required String secret, @required String password, @required String passwordAgain}) { + final String path = '/account/recovery'; + + final Map params = { + 'userId': userId, + 'secret': secret, + 'password': password, + 'passwordAgain': passwordAgain, + }; + + final Map headers = { + 'content-type': 'application/json', + }; + + return client.call(HttpMethod.put, path: path, params: params, headers: headers); + } + + /// Get Account Sessions + /// + /// Get currently logged in user list of active sessions across different + /// devices. + /// + Future getSessions() { + final String path = '/account/sessions'; + + final Map params = { + }; + + final Map headers = { + 'content-type': 'application/json', + }; + + return client.call(HttpMethod.get, path: path, params: params, headers: headers); + } + + /// Create Account Session + /// + /// Allow the user to login into his account by providing a valid email and + /// password combination. This route will create a new session for the user. + /// + Future createSession({@required String email, @required String password}) { + final String path = '/account/sessions'; + + final Map params = { + 'email': email, + 'password': password, + }; + + final Map headers = { + 'content-type': 'application/json', + }; + + return client.call(HttpMethod.post, path: path, params: params, headers: headers); + } + + /// Delete All Account Sessions + /// + /// Delete all sessions from the user account and remove any sessions cookies + /// from the end client. + /// + Future deleteSessions() { + final String path = '/account/sessions'; + + final Map params = { + }; + + final Map headers = { + 'content-type': 'application/json', + }; + + return client.call(HttpMethod.delete, path: path, params: params, headers: headers); + } + + /// Create Account Session with OAuth2 + /// + /// Allow the user to login to his account using the OAuth2 provider of his + /// choice. Each OAuth2 provider should be enabled from the Appwrite console + /// first. Use the success and failure arguments to provide a redirect URL's + /// back to your app when login is completed. + /// + Future createOAuth2Session({@required String provider, String success = 'https://appwrite.io/auth/oauth2/success', String failure = 'https://appwrite.io/auth/oauth2/failure', List scopes = const []}) { + final String path = '/account/sessions/oauth2/{provider}'.replaceAll(RegExp('{provider}'), provider); + + final Map params = { + 'success': success, + 'failure': failure, + 'scopes': scopes, + 'project': client.config['project'], + }; + + + final List query = []; + + params.forEach((key, value) { + if (value is List) { + for (var item in value) { + query.add(Uri.encodeComponent(key + '[]') + '=' + Uri.encodeComponent(item)); + } + } + else { + query.add(Uri.encodeComponent(key) + '=' + Uri.encodeComponent(value)); + } + }); + + Uri endpoint = Uri.parse(client.endPoint); + Uri url = new Uri(scheme: endpoint.scheme, + host: endpoint.host, + port: endpoint.port, + path: endpoint.path + path, + query: query.join('&') + ); + + if(kIsWeb) { + html.window.location.href = url.toString(); + return null; + }else{ + + return FlutterWebAuth.authenticate( + url: url.toString(), + callbackUrlScheme: "appwrite-callback-" + client.config['project'] + ).then((value) async { + Uri url = Uri.parse(value); + Cookie cookie = new Cookie(url.queryParameters['key'], url.queryParameters['secret']); + cookie.domain = Uri.parse(client.endPoint).host; + cookie.httpOnly = true; + cookie.path = '/'; + List cookies = [cookie]; + await client.init(); + client.cookieJar.saveFromResponse(Uri.parse(client.endPoint), cookies); + }); + } + + } + + /// Delete Account Session + /// + /// Use this endpoint to log out the currently logged in user from all his + /// account sessions across all his different devices. When using the option id + /// argument, only the session unique ID provider will be deleted. + /// + Future deleteSession({@required String sessionId}) { + final String path = '/account/sessions/{sessionId}'.replaceAll(RegExp('{sessionId}'), sessionId); + + final Map params = { + }; + + final Map headers = { + 'content-type': 'application/json', + }; + + return client.call(HttpMethod.delete, path: path, params: params, headers: headers); + } + + /// Create Email Verification + /// + /// Use this endpoint to send a verification message to your user email address + /// to confirm they are the valid owners of that address. Both the **userId** + /// and **secret** arguments will be passed as query parameters to the URL you + /// have provided to be attached to the verification email. The provided URL + /// should redirect the user back to your app and allow you to complete the + /// verification process by verifying both the **userId** and **secret** + /// parameters. Learn more about how to [complete the verification + /// process](/docs/client/account#updateAccountVerification). + /// + /// Please note that in order to avoid a [Redirect + /// Attack](https://github.com/OWASP/CheatSheetSeries/blob/master/cheatsheets/Unvalidated_Redirects_and_Forwards_Cheat_Sheet.md), + /// the only valid redirect URLs are the ones from domains you have set when + /// adding your platforms in the console interface. + /// + /// + Future createVerification({@required String url}) { + final String path = '/account/verification'; + + final Map params = { + 'url': url, + }; + + final Map headers = { + 'content-type': 'application/json', + }; + + return client.call(HttpMethod.post, path: path, params: params, headers: headers); + } + + /// Complete Email Verification + /// + /// Use this endpoint to complete the user email verification process. Use both + /// the **userId** and **secret** parameters that were attached to your app URL + /// to verify the user email ownership. If confirmed this route will return a + /// 200 status code. + /// + Future updateVerification({@required String userId, @required String secret}) { + final String path = '/account/verification'; + + final Map params = { + 'userId': userId, + 'secret': secret, + }; + + final Map headers = { + 'content-type': 'application/json', + }; + + return client.call(HttpMethod.put, path: path, params: params, headers: headers); + } +} \ No newline at end of file diff --git a/app/sdks/0.7.0/client-flutter/lib/services/avatars.dart b/app/sdks/0.7.0/client-flutter/lib/services/avatars.dart new file mode 100644 index 0000000000..b7fa6393ef --- /dev/null +++ b/app/sdks/0.7.0/client-flutter/lib/services/avatars.dart @@ -0,0 +1,238 @@ + + +import 'package:dio/dio.dart'; +import 'package:meta/meta.dart'; + +import "../client.dart"; +import '../enums.dart'; +import "../service.dart"; + +class Avatars extends Service { + Avatars(Client client): super(client); + + /// Get Browser Icon + /// + /// You can use this endpoint to show different browser icons to your users. + /// The code argument receives the browser code as it appears in your user + /// /account/sessions endpoint. Use width, height and quality arguments to + /// change the output settings. + /// + String getBrowser({@required String code, int width = 100, int height = 100, int quality = 100}) { + final String path = '/avatars/browsers/{code}'.replaceAll(RegExp('{code}'), code); + + final Map params = { + 'width': width, + 'height': height, + 'quality': quality, + 'project': client.config['project'], + }; + + params.keys.forEach((key) {if (params[key] is int || params[key] is double) { + params[key] = params[key].toString(); + }}); + + Uri endpoint = Uri.parse(client.endPoint); + Uri location = new Uri(scheme: endpoint.scheme, + host: endpoint.host, + port: endpoint.port, + path: endpoint.path + path, + queryParameters:params, + ); + + return location.toString(); + } + + /// Get Credit Card Icon + /// + /// Need to display your users with your billing method or their payment + /// methods? The credit card endpoint will return you the icon of the credit + /// card provider you need. Use width, height and quality arguments to change + /// the output settings. + /// + String getCreditCard({@required String code, int width = 100, int height = 100, int quality = 100}) { + final String path = '/avatars/credit-cards/{code}'.replaceAll(RegExp('{code}'), code); + + final Map params = { + 'width': width, + 'height': height, + 'quality': quality, + 'project': client.config['project'], + }; + + params.keys.forEach((key) {if (params[key] is int || params[key] is double) { + params[key] = params[key].toString(); + }}); + + Uri endpoint = Uri.parse(client.endPoint); + Uri location = new Uri(scheme: endpoint.scheme, + host: endpoint.host, + port: endpoint.port, + path: endpoint.path + path, + queryParameters:params, + ); + + return location.toString(); + } + + /// Get Favicon + /// + /// Use this endpoint to fetch the favorite icon (AKA favicon) of a any remote + /// website URL. + /// + String getFavicon({@required String url}) { + final String path = '/avatars/favicon'; + + final Map params = { + 'url': url, + 'project': client.config['project'], + }; + + params.keys.forEach((key) {if (params[key] is int || params[key] is double) { + params[key] = params[key].toString(); + }}); + + Uri endpoint = Uri.parse(client.endPoint); + Uri location = new Uri(scheme: endpoint.scheme, + host: endpoint.host, + port: endpoint.port, + path: endpoint.path + path, + queryParameters:params, + ); + + return location.toString(); + } + + /// Get Country Flag + /// + /// You can use this endpoint to show different country flags icons to your + /// users. The code argument receives the 2 letter country code. Use width, + /// height and quality arguments to change the output settings. + /// + String getFlag({@required String code, int width = 100, int height = 100, int quality = 100}) { + final String path = '/avatars/flags/{code}'.replaceAll(RegExp('{code}'), code); + + final Map params = { + 'width': width, + 'height': height, + 'quality': quality, + 'project': client.config['project'], + }; + + params.keys.forEach((key) {if (params[key] is int || params[key] is double) { + params[key] = params[key].toString(); + }}); + + Uri endpoint = Uri.parse(client.endPoint); + Uri location = new Uri(scheme: endpoint.scheme, + host: endpoint.host, + port: endpoint.port, + path: endpoint.path + path, + queryParameters:params, + ); + + return location.toString(); + } + + /// Get Image from URL + /// + /// Use this endpoint to fetch a remote image URL and crop it to any image size + /// you want. This endpoint is very useful if you need to crop and display + /// remote images in your app or in case you want to make sure a 3rd party + /// image is properly served using a TLS protocol. + /// + String getImage({@required String url, int width = 400, int height = 400}) { + final String path = '/avatars/image'; + + final Map params = { + 'url': url, + 'width': width, + 'height': height, + 'project': client.config['project'], + }; + + params.keys.forEach((key) {if (params[key] is int || params[key] is double) { + params[key] = params[key].toString(); + }}); + + Uri endpoint = Uri.parse(client.endPoint); + Uri location = new Uri(scheme: endpoint.scheme, + host: endpoint.host, + port: endpoint.port, + path: endpoint.path + path, + queryParameters:params, + ); + + return location.toString(); + } + + /// Get User Initials + /// + /// Use this endpoint to show your user initials avatar icon on your website or + /// app. By default, this route will try to print your logged-in user name or + /// email initials. You can also overwrite the user name if you pass the 'name' + /// parameter. If no name is given and no user is logged, an empty avatar will + /// be returned. + /// + /// You can use the color and background params to change the avatar colors. By + /// default, a random theme will be selected. The random theme will persist for + /// the user's initials when reloading the same theme will always return for + /// the same initials. + /// + String getInitials({String name = '', int width = 500, int height = 500, String color = '', String background = ''}) { + final String path = '/avatars/initials'; + + final Map params = { + 'name': name, + 'width': width, + 'height': height, + 'color': color, + 'background': background, + 'project': client.config['project'], + }; + + params.keys.forEach((key) {if (params[key] is int || params[key] is double) { + params[key] = params[key].toString(); + }}); + + Uri endpoint = Uri.parse(client.endPoint); + Uri location = new Uri(scheme: endpoint.scheme, + host: endpoint.host, + port: endpoint.port, + path: endpoint.path + path, + queryParameters:params, + ); + + return location.toString(); + } + + /// Get QR Code + /// + /// Converts a given plain text to a QR code image. You can use the query + /// parameters to change the size and style of the resulting image. + /// + String getQR({@required String text, int size = 400, int margin = 1, bool download = false}) { + final String path = '/avatars/qr'; + + final Map params = { + 'text': text, + 'size': size, + 'margin': margin, + 'download': download, + 'project': client.config['project'], + }; + + params.keys.forEach((key) {if (params[key] is int || params[key] is double) { + params[key] = params[key].toString(); + }}); + + Uri endpoint = Uri.parse(client.endPoint); + Uri location = new Uri(scheme: endpoint.scheme, + host: endpoint.host, + port: endpoint.port, + path: endpoint.path + path, + queryParameters:params, + ); + + return location.toString(); + } +} \ No newline at end of file diff --git a/app/sdks/0.7.0/client-flutter/lib/services/database.dart b/app/sdks/0.7.0/client-flutter/lib/services/database.dart new file mode 100644 index 0000000000..0fec1fb4d6 --- /dev/null +++ b/app/sdks/0.7.0/client-flutter/lib/services/database.dart @@ -0,0 +1,119 @@ + + +import 'package:dio/dio.dart'; +import 'package:meta/meta.dart'; + +import "../client.dart"; +import '../enums.dart'; +import "../service.dart"; + +class Database extends Service { + Database(Client client): super(client); + + /// List Documents + /// + /// Get a list of all the user documents. You can use the query params to + /// filter your results. On admin mode, this endpoint will return a list of all + /// of the project documents. [Learn more about different API + /// modes](/docs/admin). + /// + Future listDocuments({@required String collectionId, List filters = const [], int offset = 0, int limit = 50, String orderField = '\$id', OrderType orderType = OrderType.asc, String orderCast = 'string', String search = ''}) { + final String path = '/database/collections/{collectionId}/documents'.replaceAll(RegExp('{collectionId}'), collectionId); + + final Map params = { + 'filters': filters, + 'offset': offset, + 'limit': limit, + 'orderField': orderField, + 'orderType': orderType.name(), + 'orderCast': orderCast, + 'search': search, + }; + + final Map headers = { + 'content-type': 'application/json', + }; + + return client.call(HttpMethod.get, path: path, params: params, headers: headers); + } + + /// Create Document + /// + /// Create a new Document. Before using this route, you should create a new + /// collection resource using either a [server + /// integration](/docs/server/database?sdk=nodejs#createCollection) API or + /// directly from your database console. + /// + Future createDocument({@required String collectionId, @required dynamic data, @required List read, @required List write, String parentDocument = '', String parentProperty = '', String parentPropertyType = 'assign'}) { + final String path = '/database/collections/{collectionId}/documents'.replaceAll(RegExp('{collectionId}'), collectionId); + + final Map params = { + 'data': data, + 'read': read, + 'write': write, + 'parentDocument': parentDocument, + 'parentProperty': parentProperty, + 'parentPropertyType': parentPropertyType, + }; + + final Map headers = { + 'content-type': 'application/json', + }; + + return client.call(HttpMethod.post, path: path, params: params, headers: headers); + } + + /// Get Document + /// + /// Get document by its unique ID. This endpoint response returns a JSON object + /// with the document data. + /// + Future getDocument({@required String collectionId, @required String documentId}) { + final String path = '/database/collections/{collectionId}/documents/{documentId}'.replaceAll(RegExp('{collectionId}'), collectionId).replaceAll(RegExp('{documentId}'), documentId); + + final Map params = { + }; + + final Map headers = { + 'content-type': 'application/json', + }; + + return client.call(HttpMethod.get, path: path, params: params, headers: headers); + } + + /// Update Document + Future updateDocument({@required String collectionId, @required String documentId, @required dynamic data, @required List read, @required List write}) { + final String path = '/database/collections/{collectionId}/documents/{documentId}'.replaceAll(RegExp('{collectionId}'), collectionId).replaceAll(RegExp('{documentId}'), documentId); + + final Map params = { + 'data': data, + 'read': read, + 'write': write, + }; + + final Map headers = { + 'content-type': 'application/json', + }; + + return client.call(HttpMethod.patch, path: path, params: params, headers: headers); + } + + /// Delete Document + /// + /// Delete document by its unique ID. This endpoint deletes only the parent + /// documents, his attributes and relations to other documents. Child documents + /// **will not** be deleted. + /// + Future deleteDocument({@required String collectionId, @required String documentId}) { + final String path = '/database/collections/{collectionId}/documents/{documentId}'.replaceAll(RegExp('{collectionId}'), collectionId).replaceAll(RegExp('{documentId}'), documentId); + + final Map params = { + }; + + final Map headers = { + 'content-type': 'application/json', + }; + + return client.call(HttpMethod.delete, path: path, params: params, headers: headers); + } +} \ No newline at end of file diff --git a/app/sdks/0.7.0/client-flutter/lib/services/locale.dart b/app/sdks/0.7.0/client-flutter/lib/services/locale.dart new file mode 100644 index 0000000000..095af4792c --- /dev/null +++ b/app/sdks/0.7.0/client-flutter/lib/services/locale.dart @@ -0,0 +1,143 @@ + + +import 'package:dio/dio.dart'; +import 'package:meta/meta.dart'; + +import "../client.dart"; +import '../enums.dart'; +import "../service.dart"; + +class Locale extends Service { + Locale(Client client): super(client); + + /// Get User Locale + /// + /// Get the current user location based on IP. Returns an object with user + /// country code, country name, continent name, continent code, ip address and + /// suggested currency. You can use the locale header to get the data in a + /// supported language. + /// + /// ([IP Geolocation by DB-IP](https://db-ip.com)) + /// + Future get() { + final String path = '/locale'; + + final Map params = { + }; + + final Map headers = { + 'content-type': 'application/json', + }; + + return client.call(HttpMethod.get, path: path, params: params, headers: headers); + } + + /// List Continents + /// + /// List of all continents. You can use the locale header to get the data in a + /// supported language. + /// + Future getContinents() { + final String path = '/locale/continents'; + + final Map params = { + }; + + final Map headers = { + 'content-type': 'application/json', + }; + + return client.call(HttpMethod.get, path: path, params: params, headers: headers); + } + + /// List Countries + /// + /// List of all countries. You can use the locale header to get the data in a + /// supported language. + /// + Future getCountries() { + final String path = '/locale/countries'; + + final Map params = { + }; + + final Map headers = { + 'content-type': 'application/json', + }; + + return client.call(HttpMethod.get, path: path, params: params, headers: headers); + } + + /// List EU Countries + /// + /// List of all countries that are currently members of the EU. You can use the + /// locale header to get the data in a supported language. + /// + Future getCountriesEU() { + final String path = '/locale/countries/eu'; + + final Map params = { + }; + + final Map headers = { + 'content-type': 'application/json', + }; + + return client.call(HttpMethod.get, path: path, params: params, headers: headers); + } + + /// List Countries Phone Codes + /// + /// List of all countries phone codes. You can use the locale header to get the + /// data in a supported language. + /// + Future getCountriesPhones() { + final String path = '/locale/countries/phones'; + + final Map params = { + }; + + final Map headers = { + 'content-type': 'application/json', + }; + + return client.call(HttpMethod.get, path: path, params: params, headers: headers); + } + + /// List Currencies + /// + /// List of all currencies, including currency symbol, name, plural, and + /// decimal digits for all major and minor currencies. You can use the locale + /// header to get the data in a supported language. + /// + Future getCurrencies() { + final String path = '/locale/currencies'; + + final Map params = { + }; + + final Map headers = { + 'content-type': 'application/json', + }; + + return client.call(HttpMethod.get, path: path, params: params, headers: headers); + } + + /// List Languages + /// + /// List of all languages classified by ISO 639-1 including 2-letter code, name + /// in English, and name in the respective language. + /// + Future getLanguages() { + final String path = '/locale/languages'; + + final Map params = { + }; + + final Map headers = { + 'content-type': 'application/json', + }; + + return client.call(HttpMethod.get, path: path, params: params, headers: headers); + } +} \ No newline at end of file diff --git a/app/sdks/0.7.0/client-flutter/lib/services/storage.dart b/app/sdks/0.7.0/client-flutter/lib/services/storage.dart new file mode 100644 index 0000000000..51f9345050 --- /dev/null +++ b/app/sdks/0.7.0/client-flutter/lib/services/storage.dart @@ -0,0 +1,203 @@ + + +import 'package:dio/dio.dart'; +import 'package:meta/meta.dart'; + +import "../client.dart"; +import '../enums.dart'; +import "../service.dart"; + +class Storage extends Service { + Storage(Client client): super(client); + + /// List Files + /// + /// Get a list of all the user files. You can use the query params to filter + /// your results. On admin mode, this endpoint will return a list of all of the + /// project files. [Learn more about different API modes](/docs/admin). + /// + Future listFiles({String search = '', int limit = 25, int offset = 0, OrderType orderType = OrderType.asc}) { + final String path = '/storage/files'; + + final Map params = { + 'search': search, + 'limit': limit, + 'offset': offset, + 'orderType': orderType.name(), + }; + + final Map headers = { + 'content-type': 'application/json', + }; + + return client.call(HttpMethod.get, path: path, params: params, headers: headers); + } + + /// Create File + /// + /// Create a new file. The user who creates the file will automatically be + /// assigned to read and write access unless he has passed custom values for + /// read and write arguments. + /// + Future createFile({@required MultipartFile file, @required List read, @required List write}) { + final String path = '/storage/files'; + + final Map params = { + 'file': file, + 'read': read, + 'write': write, + }; + + final Map headers = { + 'content-type': 'multipart/form-data', + }; + + return client.call(HttpMethod.post, path: path, params: params, headers: headers); + } + + /// Get File + /// + /// Get file by its unique ID. This endpoint response returns a JSON object + /// with the file metadata. + /// + Future getFile({@required String fileId}) { + final String path = '/storage/files/{fileId}'.replaceAll(RegExp('{fileId}'), fileId); + + final Map params = { + }; + + final Map headers = { + 'content-type': 'application/json', + }; + + return client.call(HttpMethod.get, path: path, params: params, headers: headers); + } + + /// Update File + /// + /// Update file by its unique ID. Only users with write permissions have access + /// to update this resource. + /// + Future updateFile({@required String fileId, @required List read, @required List write}) { + final String path = '/storage/files/{fileId}'.replaceAll(RegExp('{fileId}'), fileId); + + final Map params = { + 'read': read, + 'write': write, + }; + + final Map headers = { + 'content-type': 'application/json', + }; + + return client.call(HttpMethod.put, path: path, params: params, headers: headers); + } + + /// Delete File + /// + /// Delete a file by its unique ID. Only users with write permissions have + /// access to delete this resource. + /// + Future deleteFile({@required String fileId}) { + final String path = '/storage/files/{fileId}'.replaceAll(RegExp('{fileId}'), fileId); + + final Map params = { + }; + + final Map headers = { + 'content-type': 'application/json', + }; + + return client.call(HttpMethod.delete, path: path, params: params, headers: headers); + } + + /// Get File for Download + /// + /// Get file content by its unique ID. The endpoint response return with a + /// 'Content-Disposition: attachment' header that tells the browser to start + /// downloading the file to user downloads directory. + /// + String getFileDownload({@required String fileId}) { + final String path = '/storage/files/{fileId}/download'.replaceAll(RegExp('{fileId}'), fileId); + + final Map params = { + 'project': client.config['project'], + }; + + params.keys.forEach((key) {if (params[key] is int || params[key] is double) { + params[key] = params[key].toString(); + }}); + + Uri endpoint = Uri.parse(client.endPoint); + Uri location = new Uri(scheme: endpoint.scheme, + host: endpoint.host, + port: endpoint.port, + path: endpoint.path + path, + queryParameters:params, + ); + + return location.toString(); + } + + /// Get File Preview + /// + /// Get a file preview image. Currently, this method supports preview for image + /// files (jpg, png, and gif), other supported formats, like pdf, docs, slides, + /// and spreadsheets, will return the file icon image. You can also pass query + /// string arguments for cutting and resizing your preview image. + /// + String getFilePreview({@required String fileId, int width = 0, int height = 0, int quality = 100, String background = '', String output = ''}) { + final String path = '/storage/files/{fileId}/preview'.replaceAll(RegExp('{fileId}'), fileId); + + final Map params = { + 'width': width, + 'height': height, + 'quality': quality, + 'background': background, + 'output': output, + 'project': client.config['project'], + }; + + params.keys.forEach((key) {if (params[key] is int || params[key] is double) { + params[key] = params[key].toString(); + }}); + + Uri endpoint = Uri.parse(client.endPoint); + Uri location = new Uri(scheme: endpoint.scheme, + host: endpoint.host, + port: endpoint.port, + path: endpoint.path + path, + queryParameters:params, + ); + + return location.toString(); + } + + /// Get File for View + /// + /// Get file content by its unique ID. This endpoint is similar to the download + /// method but returns with no 'Content-Disposition: attachment' header. + /// + String getFileView({@required String fileId, String as = ''}) { + final String path = '/storage/files/{fileId}/view'.replaceAll(RegExp('{fileId}'), fileId); + + final Map params = { + 'as': as, + 'project': client.config['project'], + }; + + params.keys.forEach((key) {if (params[key] is int || params[key] is double) { + params[key] = params[key].toString(); + }}); + + Uri endpoint = Uri.parse(client.endPoint); + Uri location = new Uri(scheme: endpoint.scheme, + host: endpoint.host, + port: endpoint.port, + path: endpoint.path + path, + queryParameters:params, + ); + + return location.toString(); + } +} \ No newline at end of file diff --git a/app/sdks/0.7.0/client-flutter/lib/services/teams.dart b/app/sdks/0.7.0/client-flutter/lib/services/teams.dart new file mode 100644 index 0000000000..b9205da455 --- /dev/null +++ b/app/sdks/0.7.0/client-flutter/lib/services/teams.dart @@ -0,0 +1,207 @@ + + +import 'package:dio/dio.dart'; +import 'package:meta/meta.dart'; + +import "../client.dart"; +import '../enums.dart'; +import "../service.dart"; + +class Teams extends Service { + Teams(Client client): super(client); + + /// List Teams + /// + /// Get a list of all the current user teams. You can use the query params to + /// filter your results. On admin mode, this endpoint will return a list of all + /// of the project teams. [Learn more about different API modes](/docs/admin). + /// + Future list({String search = '', int limit = 25, int offset = 0, OrderType orderType = OrderType.asc}) { + final String path = '/teams'; + + final Map params = { + 'search': search, + 'limit': limit, + 'offset': offset, + 'orderType': orderType.name(), + }; + + final Map headers = { + 'content-type': 'application/json', + }; + + return client.call(HttpMethod.get, path: path, params: params, headers: headers); + } + + /// Create Team + /// + /// Create a new team. The user who creates the team will automatically be + /// assigned as the owner of the team. The team owner can invite new members, + /// who will be able add new owners and update or delete the team from your + /// project. + /// + Future create({@required String name, List roles = const ["owner"]}) { + final String path = '/teams'; + + final Map params = { + 'name': name, + 'roles': roles, + }; + + final Map headers = { + 'content-type': 'application/json', + }; + + return client.call(HttpMethod.post, path: path, params: params, headers: headers); + } + + /// Get Team + /// + /// Get team by its unique ID. All team members have read access for this + /// resource. + /// + Future get({@required String teamId}) { + final String path = '/teams/{teamId}'.replaceAll(RegExp('{teamId}'), teamId); + + final Map params = { + }; + + final Map headers = { + 'content-type': 'application/json', + }; + + return client.call(HttpMethod.get, path: path, params: params, headers: headers); + } + + /// Update Team + /// + /// Update team by its unique ID. Only team owners have write access for this + /// resource. + /// + Future update({@required String teamId, @required String name}) { + final String path = '/teams/{teamId}'.replaceAll(RegExp('{teamId}'), teamId); + + final Map params = { + 'name': name, + }; + + final Map headers = { + 'content-type': 'application/json', + }; + + return client.call(HttpMethod.put, path: path, params: params, headers: headers); + } + + /// Delete Team + /// + /// Delete team by its unique ID. Only team owners have write access for this + /// resource. + /// + Future delete({@required String teamId}) { + final String path = '/teams/{teamId}'.replaceAll(RegExp('{teamId}'), teamId); + + final Map params = { + }; + + final Map headers = { + 'content-type': 'application/json', + }; + + return client.call(HttpMethod.delete, path: path, params: params, headers: headers); + } + + /// Get Team Memberships + /// + /// Get team members by the team unique ID. All team members have read access + /// for this list of resources. + /// + Future getMemberships({@required String teamId, String search = '', int limit = 25, int offset = 0, OrderType orderType = OrderType.asc}) { + final String path = '/teams/{teamId}/memberships'.replaceAll(RegExp('{teamId}'), teamId); + + final Map params = { + 'search': search, + 'limit': limit, + 'offset': offset, + 'orderType': orderType.name(), + }; + + final Map headers = { + 'content-type': 'application/json', + }; + + return client.call(HttpMethod.get, path: path, params: params, headers: headers); + } + + /// Create Team Membership + /// + /// Use this endpoint to invite a new member to join your team. An email with a + /// link to join the team will be sent to the new member email address if the + /// member doesn't exist in the project it will be created automatically. + /// + /// Use the 'URL' parameter to redirect the user from the invitation email back + /// to your app. When the user is redirected, use the [Update Team Membership + /// Status](/docs/client/teams#updateMembershipStatus) endpoint to allow the + /// user to accept the invitation to the team. + /// + /// Please note that in order to avoid a [Redirect + /// Attacks](https://github.com/OWASP/CheatSheetSeries/blob/master/cheatsheets/Unvalidated_Redirects_and_Forwards_Cheat_Sheet.md) + /// the only valid redirect URL's are the once from domains you have set when + /// added your platforms in the console interface. + /// + Future createMembership({@required String teamId, @required String email, @required List roles, @required String url, String name = ''}) { + final String path = '/teams/{teamId}/memberships'.replaceAll(RegExp('{teamId}'), teamId); + + final Map params = { + 'email': email, + 'name': name, + 'roles': roles, + 'url': url, + }; + + final Map headers = { + 'content-type': 'application/json', + }; + + return client.call(HttpMethod.post, path: path, params: params, headers: headers); + } + + /// Delete Team Membership + /// + /// This endpoint allows a user to leave a team or for a team owner to delete + /// the membership of any other team member. You can also use this endpoint to + /// delete a user membership even if he didn't accept it. + /// + Future deleteMembership({@required String teamId, @required String inviteId}) { + final String path = '/teams/{teamId}/memberships/{inviteId}'.replaceAll(RegExp('{teamId}'), teamId).replaceAll(RegExp('{inviteId}'), inviteId); + + final Map params = { + }; + + final Map headers = { + 'content-type': 'application/json', + }; + + return client.call(HttpMethod.delete, path: path, params: params, headers: headers); + } + + /// Update Team Membership Status + /// + /// Use this endpoint to allow a user to accept an invitation to join a team + /// after he is being redirected back to your app from the invitation email he + /// was sent. + /// + Future updateMembershipStatus({@required String teamId, @required String inviteId, @required String userId, @required String secret}) { + final String path = '/teams/{teamId}/memberships/{inviteId}/status'.replaceAll(RegExp('{teamId}'), teamId).replaceAll(RegExp('{inviteId}'), inviteId); + + final Map params = { + 'userId': userId, + 'secret': secret, + }; + + final Map headers = { + 'content-type': 'application/json', + }; + + return client.call(HttpMethod.patch, path: path, params: params, headers: headers); + } +} \ No newline at end of file diff --git a/app/sdks/0.7.0/client-flutter/pubspec.yaml b/app/sdks/0.7.0/client-flutter/pubspec.yaml new file mode 100644 index 0000000000..cabc271c5e --- /dev/null +++ b/app/sdks/0.7.0/client-flutter/pubspec.yaml @@ -0,0 +1,24 @@ +name: appwrite +version: 0.3.0-dev.2 +description: Appwrite is an open-source self-hosted backend server that abstract and simplify complex and repetitive development tasks behind a very simple REST API +homepage: https://appwrite.io +repository: https://github.com/appwrite/sdk-for-flutter +issue_tracker: https://github.com/appwrite/sdk-generator/issues +documentation: https://appwrite.io/support +environment: + sdk: '>=2.6.0 <3.0.0' +dependencies: + meta: ^1.1.8 + path_provider: ^1.6.14 + package_info: ^0.4.3 + dio: ^3.0.10 + cookie_jar: ^1.0.1 + dio_cookie_manager: ^1.0.0 + flutter_web_auth: ^0.2.4 + universal_html: ^1.2.3 + flutter: + sdk: flutter + +dev_dependencies: + flutter_test: + sdk: flutter \ No newline at end of file diff --git a/app/sdks/0.7.0/client-swift/CHANGELOG.md b/app/sdks/0.7.0/client-swift/CHANGELOG.md new file mode 100644 index 0000000000..fa4d35e687 --- /dev/null +++ b/app/sdks/0.7.0/client-swift/CHANGELOG.md @@ -0,0 +1 @@ +# Change Log \ No newline at end of file diff --git a/app/sdks/0.7.0/client-swift/LICENSE b/app/sdks/0.7.0/client-swift/LICENSE new file mode 100644 index 0000000000..fc7c051a91 --- /dev/null +++ b/app/sdks/0.7.0/client-swift/LICENSE @@ -0,0 +1,12 @@ +Copyright (c) 2019 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: + + 1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. + + 2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. + + 3. Neither the name Appwrite nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. \ No newline at end of file diff --git a/app/sdks/0.7.0/client-swift/Package.swift b/app/sdks/0.7.0/client-swift/Package.swift new file mode 100644 index 0000000000..5bea7f1c50 --- /dev/null +++ b/app/sdks/0.7.0/client-swift/Package.swift @@ -0,0 +1,35 @@ +// swift-tools-version:5.1 +// The swift-tools-version declares the minimum version of Swift required to build this package. +// +// Created by Armino +// GitHub: https://github.com/armino-dev/sdk-generator +// + +import PackageDescription + +let package = Package( + name: "Appwrite", + products: [ + // Products define the executables and libraries produced by a package, + // and make them visible to other packages. + .library( + name: "Appwrite", + targets: ["Appwrite"]), + ], + dependencies: [ + // Dependencies declare other packages that this package depends on. + // .package(url: /* package url */, from: "1.0.0"), + ], + targets: [ + // Targets are the basic building blocks of a package. + // A target can define a module or a test suite. + // Targets can depend on other targets in this package, + // and on products in packages which this package depends on. + .target( + name: "Appwrite", + dependencies: []), + .testTarget( + name: "AppwriteTests", + dependencies: [Appwrite]), + ] +) diff --git a/app/sdks/0.7.0/client-swift/README.md b/app/sdks/0.7.0/client-swift/README.md new file mode 100644 index 0000000000..d46757f068 --- /dev/null +++ b/app/sdks/0.7.0/client-swift/README.md @@ -0,0 +1,24 @@ +# Appwrite Swift SDK + +![License](https://img.shields.io/github/license/appwrite/sdk-for-swift.svg?v=1) +![Version](https://img.shields.io/badge/api%20version-0.7.0-blue.svg?v=1) + +Appwrite is an open-source backend as a service server that abstract and simplify complex and repetitive development tasks behind a very simple to use REST API. Appwrite aims to help you develop your apps faster and in a more secure way. + Use the Swift SDK to integrate your app with the Appwrite server to easily start interacting with all of Appwrite backend APIs and tools. + For full API documentation and tutorials go to [https://appwrite.io/docs](https://appwrite.io/docs) + + + +![Appwrite](https://appwrite.io/images/github.png) + +## Installation + +``` + git clone appwrite/sdk-for-swift + cd sdk-for-swift + swift run +``` + +## License + +Please see the [BSD-3-Clause license](https://raw.githubusercontent.com/appwrite/appwrite/master/LICENSE) file for more information. diff --git a/app/sdks/0.7.0/client-swift/Sources/Appwrite/Client.swift b/app/sdks/0.7.0/client-swift/Sources/Appwrite/Client.swift new file mode 100644 index 0000000000..8748fbc0f9 --- /dev/null +++ b/app/sdks/0.7.0/client-swift/Sources/Appwrite/Client.swift @@ -0,0 +1,231 @@ +// +// Client.swift +// +// Created by Armino +// GitHub: https://github.com/armino-dev/sdk-generator +// + +import Foundation + +open class Client { + + // MARK: Properties + + open var selfSigned = false + + open var endpoint = "https://appwrite.io/v1" + + open var headers: [String: String] = [ + "content-type": "", + "x-sdk-version": "appwrite:swift:" + ] + + + // MARK: Methods + + // default constructor + public init() { + + } + + /// + /// Set Project + /// + /// Your project ID + /// + /// @param String value + /// + /// @return Client + /// + open func setProject(value: String) -> Client { + + self.addHeader(key: "X-Appwrite-Project", value: value) + return self + } + + /// + /// Set Locale + /// + /// @param String value + /// + /// @return Client + /// + open func setLocale(value: String) -> Client { + + self.addHeader(key: "X-Appwrite-Locale", value: value) + return self + } + + + /// + /// @param Bool status + /// @return Client + /// + open func setSelfSigned(status: Bool = true) -> Client { + + self.selfSigned = status + return self + } + + /// + /// @param String endpoint + /// @return Client + /// + open func setEndpoint(endpoint: String) -> Client { + + self.endpoint = endpoint + return self + } + + /// + /// @param String key + /// @param String value + /// + open func addHeader(key: String, value: String) -> Client { + + self.headers[key.lowercased()] = value.lowercased() + + return self + } + + /// + open func httpBuildQuery(params: [String: Any], prefix: String = "") -> String { + var output: String = "" + for (key, value) in params { + let finalKey: String = prefix.isEmpty ? key : (prefix + "[" + key + "]") + if (value is AnyCollection) { + output += self.httpBuildQuery(params: value as! [String : Any], prefix: finalKey) + } else { + output += "\(value)" + } + output += "&" + } + return output + } + + /// + /// Make an API call + /// + /// @param String method + /// @param String path + /// @param Array params + /// @param Array headers + /// @return Array|String + /// @throws Exception + /// + func call(method:String, path:String = "", headers:[String: String] = [:], params:[String: Any] = [:]) -> Any { + + self.headers.merge(headers){(_, new) in new} + let targetURL:URL = URL(string: self.endpoint + path + (( method == HTTPMethod.get.rawValue && !params.isEmpty ) ? "?" + httpBuildQuery(params: params) : ""))! + + var query: String = "" + + var responseStatus: Int = HTTPStatus.unknown.rawValue + var responseType: String = "" + var responseBody: Any = "" + + switch (self.headers["content-type"]) { + case "application/json": + do { + let json = try JSONSerialization.data(withJSONObject:params, options: []) + query = String( data: json, encoding: String.Encoding.utf8)! + } catch { + print("Failed to parse json: \(error.localizedDescription)") + } + break + default: + query = self.httpBuildQuery(params: params) + break + } + + var request = URLRequest(url: targetURL) + let session = URLSession.shared + + for (key, value) in self.headers { + request.setValue(value, forHTTPHeaderField: key) + } + + request.httpMethod = method + if (method.uppercased() == "POST") { + request.httpBody = query.data(using: .utf8) + } + + let semaphore = DispatchSemaphore(value: 0) + + session.dataTask(with: request) { data, response, error in + if (error != nil) { + print(error!) + return + } + do { + let httpResponse = response as! HTTPURLResponse + responseStatus = httpResponse.statusCode + + if (responseStatus == HTTPStatus.internalServerError.rawValue) { + print(responseStatus) + return + } + + responseType = httpResponse.mimeType ?? "" + + if (responseType == "application/json") { + let json = try JSONSerialization.jsonObject(with: data!, options: []) + responseBody = json + } else { + responseBody = String(data: data!, encoding: String.Encoding.utf8)! + } + } catch { + print(error) + } + + semaphore.signal() + }.resume() + + _ = semaphore.wait(wallTimeout: .distantFuture) + + return responseBody + } + +} + +extension Client { + + public enum HTTPStatus: Int { + case unknown = -1 + + case ok = 200 + case created = 201 + case accepted = 202 + + case movedPermanently = 301 + case found = 302 + + case badRequest = 400 + case notAuthorized = 401 + case paymentRequired = 402 + case forbidden = 403 + case notFound = 404 + case methodNotAllowed = 405 + case notAcceptable = 406 + + case internalServerError = 500 + case notImplemented = 501 + } + + public enum HTTPMethod: String { + case get + + case post + case put + case patch + + case delete + + case head + case options + case connect + case trace + } + + +} diff --git a/app/sdks/0.7.0/client-swift/Sources/Appwrite/Service.swift b/app/sdks/0.7.0/client-swift/Sources/Appwrite/Service.swift new file mode 100644 index 0000000000..b11a067a5d --- /dev/null +++ b/app/sdks/0.7.0/client-swift/Sources/Appwrite/Service.swift @@ -0,0 +1,16 @@ +// +// Service.swift +// +// Created by Armino +// GitHub: https://github.com/armino-dev/sdk-generator +// + +open class Service { + + open var client: Client; + + public init(client: Client) + { + self.client = client + } +} diff --git a/app/sdks/0.7.0/client-swift/Sources/Appwrite/Services/Account.swift b/app/sdks/0.7.0/client-swift/Sources/Appwrite/Services/Account.swift new file mode 100644 index 0000000000..0ffb74df52 --- /dev/null +++ b/app/sdks/0.7.0/client-swift/Sources/Appwrite/Services/Account.swift @@ -0,0 +1,491 @@ + + +class Account: Service +{ + /** + * Get Account + * + * Get currently logged in user data as JSON object. + * + * @throws Exception + * @return array + */ + + func get() -> Array { + let path: String = "/account" + + + let params: [String: Any] = [:] + + + return [self.client.call(method: Client.HTTPMethod.get.rawValue, path: path, headers: [ + "content-type": "application/json", + ], params: params)]; + } + + /** + * Create Account + * + * Use this endpoint to allow a new user to register a new account in your + * project. After the user registration completes successfully, you can use + * the [/account/verfication](/docs/client/account#createVerification) route + * to start verifying the user email address. To allow your new user to login + * to his new account, you need to create a new [account + * session](/docs/client/account#createSession). + * + * @param String _email + * @param String _password + * @param String _name + * @throws Exception + * @return array + */ + + func create(_email: String, _password: String, _name: String = "") -> Array { + let path: String = "/account" + + + var params: [String: Any] = [:] + + params["email"] = _email + params["password"] = _password + params["name"] = _name + + return [self.client.call(method: Client.HTTPMethod.post.rawValue, path: path, headers: [ + "content-type": "application/json", + ], params: params)]; + } + + /** + * Delete Account + * + * Delete a currently logged in user account. Behind the scene, the user + * record is not deleted but permanently blocked from any access. This is done + * to avoid deleted accounts being overtaken by new users with the same email + * address. Any user-related resources like documents or storage files should + * be deleted separately. + * + * @throws Exception + * @return array + */ + + func delete() -> Array { + let path: String = "/account" + + + let params: [String: Any] = [:] + + + return [self.client.call(method: Client.HTTPMethod.delete.rawValue, path: path, headers: [ + "content-type": "application/json", + ], params: params)]; + } + + /** + * Update Account Email + * + * Update currently logged in user account email address. After changing user + * address, user confirmation status is being reset and a new confirmation + * mail is sent. For security measures, user password is required to complete + * this request. + * + * @param String _email + * @param String _password + * @throws Exception + * @return array + */ + + func updateEmail(_email: String, _password: String) -> Array { + let path: String = "/account/email" + + + var params: [String: Any] = [:] + + params["email"] = _email + params["password"] = _password + + return [self.client.call(method: Client.HTTPMethod.patch.rawValue, path: path, headers: [ + "content-type": "application/json", + ], params: params)]; + } + + /** + * Get Account Logs + * + * Get currently logged in user list of latest security activity logs. Each + * log returns user IP address, location and date and time of log. + * + * @throws Exception + * @return array + */ + + func getLogs() -> Array { + let path: String = "/account/logs" + + + let params: [String: Any] = [:] + + + return [self.client.call(method: Client.HTTPMethod.get.rawValue, path: path, headers: [ + "content-type": "application/json", + ], params: params)]; + } + + /** + * Update Account Name + * + * Update currently logged in user account name. + * + * @param String _name + * @throws Exception + * @return array + */ + + func updateName(_name: String) -> Array { + let path: String = "/account/name" + + + var params: [String: Any] = [:] + + params["name"] = _name + + return [self.client.call(method: Client.HTTPMethod.patch.rawValue, path: path, headers: [ + "content-type": "application/json", + ], params: params)]; + } + + /** + * Update Account Password + * + * Update currently logged in user password. For validation, user is required + * to pass the password twice. + * + * @param String _password + * @param String _oldPassword + * @throws Exception + * @return array + */ + + func updatePassword(_password: String, _oldPassword: String) -> Array { + let path: String = "/account/password" + + + var params: [String: Any] = [:] + + params["password"] = _password + params["oldPassword"] = _oldPassword + + return [self.client.call(method: Client.HTTPMethod.patch.rawValue, path: path, headers: [ + "content-type": "application/json", + ], params: params)]; + } + + /** + * Get Account Preferences + * + * Get currently logged in user preferences as a key-value object. + * + * @throws Exception + * @return array + */ + + func getPrefs() -> Array { + let path: String = "/account/prefs" + + + let params: [String: Any] = [:] + + + return [self.client.call(method: Client.HTTPMethod.get.rawValue, path: path, headers: [ + "content-type": "application/json", + ], params: params)]; + } + + /** + * Update Account Preferences + * + * Update currently logged in user account preferences. You can pass only the + * specific settings you wish to update. + * + * @param object _prefs + * @throws Exception + * @return array + */ + + func updatePrefs(_prefs: object) -> Array { + let path: String = "/account/prefs" + + + var params: [String: Any] = [:] + + params["prefs"] = _prefs + + return [self.client.call(method: Client.HTTPMethod.patch.rawValue, path: path, headers: [ + "content-type": "application/json", + ], params: params)]; + } + + /** + * Create Password Recovery + * + * Sends the user an email with a temporary secret key for password reset. + * When the user clicks the confirmation link he is redirected back to your + * app password reset URL with the secret key and email address values + * attached to the URL query string. Use the query string params to submit a + * request to the [PUT /account/recovery](/docs/client/account#updateRecovery) + * endpoint to complete the process. + * + * @param String _email + * @param String _url + * @throws Exception + * @return array + */ + + func createRecovery(_email: String, _url: String) -> Array { + let path: String = "/account/recovery" + + + var params: [String: Any] = [:] + + params["email"] = _email + params["url"] = _url + + return [self.client.call(method: Client.HTTPMethod.post.rawValue, path: path, headers: [ + "content-type": "application/json", + ], params: params)]; + } + + /** + * Complete Password Recovery + * + * Use this endpoint to complete the user account password reset. Both the + * **userId** and **secret** arguments will be passed as query parameters to + * the redirect URL you have provided when sending your request to the [POST + * /account/recovery](/docs/client/account#createRecovery) endpoint. + * + * Please note that in order to avoid a [Redirect + * Attack](https://github.com/OWASP/CheatSheetSeries/blob/master/cheatsheets/Unvalidated_Redirects_and_Forwards_Cheat_Sheet.md) + * the only valid redirect URLs are the ones from domains you have set when + * adding your platforms in the console interface. + * + * @param String _userId + * @param String _secret + * @param String _password + * @param String _passwordAgain + * @throws Exception + * @return array + */ + + func updateRecovery(_userId: String, _secret: String, _password: String, _passwordAgain: String) -> Array { + let path: String = "/account/recovery" + + + var params: [String: Any] = [:] + + params["userId"] = _userId + params["secret"] = _secret + params["password"] = _password + params["passwordAgain"] = _passwordAgain + + return [self.client.call(method: Client.HTTPMethod.put.rawValue, path: path, headers: [ + "content-type": "application/json", + ], params: params)]; + } + + /** + * Get Account Sessions + * + * Get currently logged in user list of active sessions across different + * devices. + * + * @throws Exception + * @return array + */ + + func getSessions() -> Array { + let path: String = "/account/sessions" + + + let params: [String: Any] = [:] + + + return [self.client.call(method: Client.HTTPMethod.get.rawValue, path: path, headers: [ + "content-type": "application/json", + ], params: params)]; + } + + /** + * Create Account Session + * + * Allow the user to login into his account by providing a valid email and + * password combination. This route will create a new session for the user. + * + * @param String _email + * @param String _password + * @throws Exception + * @return array + */ + + func createSession(_email: String, _password: String) -> Array { + let path: String = "/account/sessions" + + + var params: [String: Any] = [:] + + params["email"] = _email + params["password"] = _password + + return [self.client.call(method: Client.HTTPMethod.post.rawValue, path: path, headers: [ + "content-type": "application/json", + ], params: params)]; + } + + /** + * Delete All Account Sessions + * + * Delete all sessions from the user account and remove any sessions cookies + * from the end client. + * + * @throws Exception + * @return array + */ + + func deleteSessions() -> Array { + let path: String = "/account/sessions" + + + let params: [String: Any] = [:] + + + return [self.client.call(method: Client.HTTPMethod.delete.rawValue, path: path, headers: [ + "content-type": "application/json", + ], params: params)]; + } + + /** + * Create Account Session with OAuth2 + * + * Allow the user to login to his account using the OAuth2 provider of his + * choice. Each OAuth2 provider should be enabled from the Appwrite console + * first. Use the success and failure arguments to provide a redirect URL's + * back to your app when login is completed. + * + * @param String _provider + * @param String _success + * @param String _failure + * @param Array _scopes + * @throws Exception + * @return array + */ + + func createOAuth2Session(_provider: String, _success: String = "https://appwrite.io/auth/oauth2/success", _failure: String = "https://appwrite.io/auth/oauth2/failure", _scopes: Array = []) -> Array { + var path: String = "/account/sessions/oauth2/{provider}" + + path = path.replacingOccurrences( + of: "{provider}", + with: _provider + ) + + var params: [String: Any] = [:] + + params["success"] = _success + params["failure"] = _failure + params["scopes"] = _scopes + + return [self.client.call(method: Client.HTTPMethod.get.rawValue, path: path, headers: [ + "content-type": "application/json", + ], params: params)]; + } + + /** + * Delete Account Session + * + * Use this endpoint to log out the currently logged in user from all his + * account sessions across all his different devices. When using the option id + * argument, only the session unique ID provider will be deleted. + * + * @param String _sessionId + * @throws Exception + * @return array + */ + + func deleteSession(_sessionId: String) -> Array { + var path: String = "/account/sessions/{sessionId}" + + path = path.replacingOccurrences( + of: "{sessionId}", + with: _sessionId + ) + + let params: [String: Any] = [:] + + + return [self.client.call(method: Client.HTTPMethod.delete.rawValue, path: path, headers: [ + "content-type": "application/json", + ], params: params)]; + } + + /** + * Create Email Verification + * + * Use this endpoint to send a verification message to your user email address + * to confirm they are the valid owners of that address. Both the **userId** + * and **secret** arguments will be passed as query parameters to the URL you + * have provided to be attached to the verification email. The provided URL + * should redirect the user back to your app and allow you to complete the + * verification process by verifying both the **userId** and **secret** + * parameters. Learn more about how to [complete the verification + * process](/docs/client/account#updateAccountVerification). + * + * Please note that in order to avoid a [Redirect + * Attack](https://github.com/OWASP/CheatSheetSeries/blob/master/cheatsheets/Unvalidated_Redirects_and_Forwards_Cheat_Sheet.md), + * the only valid redirect URLs are the ones from domains you have set when + * adding your platforms in the console interface. + * + * + * @param String _url + * @throws Exception + * @return array + */ + + func createVerification(_url: String) -> Array { + let path: String = "/account/verification" + + + var params: [String: Any] = [:] + + params["url"] = _url + + return [self.client.call(method: Client.HTTPMethod.post.rawValue, path: path, headers: [ + "content-type": "application/json", + ], params: params)]; + } + + /** + * Complete Email Verification + * + * Use this endpoint to complete the user email verification process. Use both + * the **userId** and **secret** parameters that were attached to your app URL + * to verify the user email ownership. If confirmed this route will return a + * 200 status code. + * + * @param String _userId + * @param String _secret + * @throws Exception + * @return array + */ + + func updateVerification(_userId: String, _secret: String) -> Array { + let path: String = "/account/verification" + + + var params: [String: Any] = [:] + + params["userId"] = _userId + params["secret"] = _secret + + return [self.client.call(method: Client.HTTPMethod.put.rawValue, path: path, headers: [ + "content-type": "application/json", + ], params: params)]; + } + +} diff --git a/app/sdks/0.7.0/client-swift/Sources/Appwrite/Services/Avatars.swift b/app/sdks/0.7.0/client-swift/Sources/Appwrite/Services/Avatars.swift new file mode 100644 index 0000000000..867841bafd --- /dev/null +++ b/app/sdks/0.7.0/client-swift/Sources/Appwrite/Services/Avatars.swift @@ -0,0 +1,233 @@ + + +class Avatars: Service +{ + /** + * Get Browser Icon + * + * You can use this endpoint to show different browser icons to your users. + * The code argument receives the browser code as it appears in your user + * /account/sessions endpoint. Use width, height and quality arguments to + * change the output settings. + * + * @param String _code + * @param Int _width + * @param Int _height + * @param Int _quality + * @throws Exception + * @return array + */ + + func getBrowser(_code: String, _width: Int = 100, _height: Int = 100, _quality: Int = 100) -> Array { + var path: String = "/avatars/browsers/{code}" + + path = path.replacingOccurrences( + of: "{code}", + with: _code + ) + + var params: [String: Any] = [:] + + params["width"] = _width + params["height"] = _height + params["quality"] = _quality + + return [self.client.call(method: Client.HTTPMethod.get.rawValue, path: path, headers: [ + "content-type": "application/json", + ], params: params)]; + } + + /** + * Get Credit Card Icon + * + * Need to display your users with your billing method or their payment + * methods? The credit card endpoint will return you the icon of the credit + * card provider you need. Use width, height and quality arguments to change + * the output settings. + * + * @param String _code + * @param Int _width + * @param Int _height + * @param Int _quality + * @throws Exception + * @return array + */ + + func getCreditCard(_code: String, _width: Int = 100, _height: Int = 100, _quality: Int = 100) -> Array { + var path: String = "/avatars/credit-cards/{code}" + + path = path.replacingOccurrences( + of: "{code}", + with: _code + ) + + var params: [String: Any] = [:] + + params["width"] = _width + params["height"] = _height + params["quality"] = _quality + + return [self.client.call(method: Client.HTTPMethod.get.rawValue, path: path, headers: [ + "content-type": "application/json", + ], params: params)]; + } + + /** + * Get Favicon + * + * Use this endpoint to fetch the favorite icon (AKA favicon) of a any remote + * website URL. + * + * @param String _url + * @throws Exception + * @return array + */ + + func getFavicon(_url: String) -> Array { + let path: String = "/avatars/favicon" + + + var params: [String: Any] = [:] + + params["url"] = _url + + return [self.client.call(method: Client.HTTPMethod.get.rawValue, path: path, headers: [ + "content-type": "application/json", + ], params: params)]; + } + + /** + * Get Country Flag + * + * You can use this endpoint to show different country flags icons to your + * users. The code argument receives the 2 letter country code. Use width, + * height and quality arguments to change the output settings. + * + * @param String _code + * @param Int _width + * @param Int _height + * @param Int _quality + * @throws Exception + * @return array + */ + + func getFlag(_code: String, _width: Int = 100, _height: Int = 100, _quality: Int = 100) -> Array { + var path: String = "/avatars/flags/{code}" + + path = path.replacingOccurrences( + of: "{code}", + with: _code + ) + + var params: [String: Any] = [:] + + params["width"] = _width + params["height"] = _height + params["quality"] = _quality + + return [self.client.call(method: Client.HTTPMethod.get.rawValue, path: path, headers: [ + "content-type": "application/json", + ], params: params)]; + } + + /** + * Get Image from URL + * + * Use this endpoint to fetch a remote image URL and crop it to any image size + * you want. This endpoint is very useful if you need to crop and display + * remote images in your app or in case you want to make sure a 3rd party + * image is properly served using a TLS protocol. + * + * @param String _url + * @param Int _width + * @param Int _height + * @throws Exception + * @return array + */ + + func getImage(_url: String, _width: Int = 400, _height: Int = 400) -> Array { + let path: String = "/avatars/image" + + + var params: [String: Any] = [:] + + params["url"] = _url + params["width"] = _width + params["height"] = _height + + return [self.client.call(method: Client.HTTPMethod.get.rawValue, path: path, headers: [ + "content-type": "application/json", + ], params: params)]; + } + + /** + * Get User Initials + * + * Use this endpoint to show your user initials avatar icon on your website or + * app. By default, this route will try to print your logged-in user name or + * email initials. You can also overwrite the user name if you pass the 'name' + * parameter. If no name is given and no user is logged, an empty avatar will + * be returned. + * + * You can use the color and background params to change the avatar colors. By + * default, a random theme will be selected. The random theme will persist for + * the user's initials when reloading the same theme will always return for + * the same initials. + * + * @param String _name + * @param Int _width + * @param Int _height + * @param String _color + * @param String _background + * @throws Exception + * @return array + */ + + func getInitials(_name: String = "", _width: Int = 500, _height: Int = 500, _color: String = "", _background: String = "") -> Array { + let path: String = "/avatars/initials" + + + var params: [String: Any] = [:] + + params["name"] = _name + params["width"] = _width + params["height"] = _height + params["color"] = _color + params["background"] = _background + + return [self.client.call(method: Client.HTTPMethod.get.rawValue, path: path, headers: [ + "content-type": "application/json", + ], params: params)]; + } + + /** + * Get QR Code + * + * Converts a given plain text to a QR code image. You can use the query + * parameters to change the size and style of the resulting image. + * + * @param String _text + * @param Int _size + * @param Int _margin + * @param Bool _download + * @throws Exception + * @return array + */ + + func getQR(_text: String, _size: Int = 400, _margin: Int = 1, _download: Bool = false) -> Array { + let path: String = "/avatars/qr" + + + var params: [String: Any] = [:] + + params["text"] = _text + params["size"] = _size + params["margin"] = _margin + params["download"] = _download + + return [self.client.call(method: Client.HTTPMethod.get.rawValue, path: path, headers: [ + "content-type": "application/json", + ], params: params)]; + } + +} diff --git a/app/sdks/0.7.0/client-swift/Sources/Appwrite/Services/Database.swift b/app/sdks/0.7.0/client-swift/Sources/Appwrite/Services/Database.swift new file mode 100644 index 0000000000..8436985582 --- /dev/null +++ b/app/sdks/0.7.0/client-swift/Sources/Appwrite/Services/Database.swift @@ -0,0 +1,183 @@ + + +class Database: Service +{ + /** + * List Documents + * + * Get a list of all the user documents. You can use the query params to + * filter your results. On admin mode, this endpoint will return a list of all + * of the project documents. [Learn more about different API + * modes](/docs/admin). + * + * @param String _collectionId + * @param Array _filters + * @param Int _limit + * @param Int _offset + * @param String _orderField + * @param String _orderType + * @param String _orderCast + * @param String _search + * @throws Exception + * @return array + */ + + func listDocuments(_collectionId: String, _filters: Array = [], _limit: Int = 25, _offset: Int = 0, _orderField: String = "$id", _orderType: String = "ASC", _orderCast: String = "string", _search: String = "") -> Array { + var path: String = "/database/collections/{collectionId}/documents" + + path = path.replacingOccurrences( + of: "{collectionId}", + with: _collectionId + ) + + var params: [String: Any] = [:] + + params["filters"] = _filters + params["limit"] = _limit + params["offset"] = _offset + params["orderField"] = _orderField + params["orderType"] = _orderType + params["orderCast"] = _orderCast + params["search"] = _search + + return [self.client.call(method: Client.HTTPMethod.get.rawValue, path: path, headers: [ + "content-type": "application/json", + ], params: params)]; + } + + /** + * Create Document + * + * Create a new Document. Before using this route, you should create a new + * collection resource using either a [server + * integration](/docs/server/database?sdk=nodejs#createCollection) API or + * directly from your database console. + * + * @param String _collectionId + * @param object _data + * @param Array _read + * @param Array _write + * @throws Exception + * @return array + */ + + func createDocument(_collectionId: String, _data: object, _read: Array, _write: Array) -> Array { + var path: String = "/database/collections/{collectionId}/documents" + + path = path.replacingOccurrences( + of: "{collectionId}", + with: _collectionId + ) + + var params: [String: Any] = [:] + + params["data"] = _data + params["read"] = _read + params["write"] = _write + + return [self.client.call(method: Client.HTTPMethod.post.rawValue, path: path, headers: [ + "content-type": "application/json", + ], params: params)]; + } + + /** + * Get Document + * + * Get document by its unique ID. This endpoint response returns a JSON object + * with the document data. + * + * @param String _collectionId + * @param String _documentId + * @throws Exception + * @return array + */ + + func getDocument(_collectionId: String, _documentId: String) -> Array { + var path: String = "/database/collections/{collectionId}/documents/{documentId}" + + path = path.replacingOccurrences( + of: "{collectionId}", + with: _collectionId + ) + path = path.replacingOccurrences( + of: "{documentId}", + with: _documentId + ) + + let params: [String: Any] = [:] + + + return [self.client.call(method: Client.HTTPMethod.get.rawValue, path: path, headers: [ + "content-type": "application/json", + ], params: params)]; + } + + /** + * Update Document + * + * @param String _collectionId + * @param String _documentId + * @param object _data + * @param Array _read + * @param Array _write + * @throws Exception + * @return array + */ + + func updateDocument(_collectionId: String, _documentId: String, _data: object, _read: Array, _write: Array) -> Array { + var path: String = "/database/collections/{collectionId}/documents/{documentId}" + + path = path.replacingOccurrences( + of: "{collectionId}", + with: _collectionId + ) + path = path.replacingOccurrences( + of: "{documentId}", + with: _documentId + ) + + var params: [String: Any] = [:] + + params["data"] = _data + params["read"] = _read + params["write"] = _write + + return [self.client.call(method: Client.HTTPMethod.patch.rawValue, path: path, headers: [ + "content-type": "application/json", + ], params: params)]; + } + + /** + * Delete Document + * + * Delete document by its unique ID. This endpoint deletes only the parent + * documents, his attributes and relations to other documents. Child documents + * **will not** be deleted. + * + * @param String _collectionId + * @param String _documentId + * @throws Exception + * @return array + */ + + func deleteDocument(_collectionId: String, _documentId: String) -> Array { + var path: String = "/database/collections/{collectionId}/documents/{documentId}" + + path = path.replacingOccurrences( + of: "{collectionId}", + with: _collectionId + ) + path = path.replacingOccurrences( + of: "{documentId}", + with: _documentId + ) + + let params: [String: Any] = [:] + + + return [self.client.call(method: Client.HTTPMethod.delete.rawValue, path: path, headers: [ + "content-type": "application/json", + ], params: params)]; + } + +} diff --git a/app/sdks/0.7.0/client-swift/Sources/Appwrite/Services/Locale.swift b/app/sdks/0.7.0/client-swift/Sources/Appwrite/Services/Locale.swift new file mode 100644 index 0000000000..ef21554cbc --- /dev/null +++ b/app/sdks/0.7.0/client-swift/Sources/Appwrite/Services/Locale.swift @@ -0,0 +1,164 @@ + + +class Locale: Service +{ + /** + * Get User Locale + * + * Get the current user location based on IP. Returns an object with user + * country code, country name, continent name, continent code, ip address and + * suggested currency. You can use the locale header to get the data in a + * supported language. + * + * ([IP Geolocation by DB-IP](https://db-ip.com)) + * + * @throws Exception + * @return array + */ + + func get() -> Array { + let path: String = "/locale" + + + let params: [String: Any] = [:] + + + return [self.client.call(method: Client.HTTPMethod.get.rawValue, path: path, headers: [ + "content-type": "application/json", + ], params: params)]; + } + + /** + * List Continents + * + * List of all continents. You can use the locale header to get the data in a + * supported language. + * + * @throws Exception + * @return array + */ + + func getContinents() -> Array { + let path: String = "/locale/continents" + + + let params: [String: Any] = [:] + + + return [self.client.call(method: Client.HTTPMethod.get.rawValue, path: path, headers: [ + "content-type": "application/json", + ], params: params)]; + } + + /** + * List Countries + * + * List of all countries. You can use the locale header to get the data in a + * supported language. + * + * @throws Exception + * @return array + */ + + func getCountries() -> Array { + let path: String = "/locale/countries" + + + let params: [String: Any] = [:] + + + return [self.client.call(method: Client.HTTPMethod.get.rawValue, path: path, headers: [ + "content-type": "application/json", + ], params: params)]; + } + + /** + * List EU Countries + * + * List of all countries that are currently members of the EU. You can use the + * locale header to get the data in a supported language. + * + * @throws Exception + * @return array + */ + + func getCountriesEU() -> Array { + let path: String = "/locale/countries/eu" + + + let params: [String: Any] = [:] + + + return [self.client.call(method: Client.HTTPMethod.get.rawValue, path: path, headers: [ + "content-type": "application/json", + ], params: params)]; + } + + /** + * List Countries Phone Codes + * + * List of all countries phone codes. You can use the locale header to get the + * data in a supported language. + * + * @throws Exception + * @return array + */ + + func getCountriesPhones() -> Array { + let path: String = "/locale/countries/phones" + + + let params: [String: Any] = [:] + + + return [self.client.call(method: Client.HTTPMethod.get.rawValue, path: path, headers: [ + "content-type": "application/json", + ], params: params)]; + } + + /** + * List Currencies + * + * List of all currencies, including currency symbol, name, plural, and + * decimal digits for all major and minor currencies. You can use the locale + * header to get the data in a supported language. + * + * @throws Exception + * @return array + */ + + func getCurrencies() -> Array { + let path: String = "/locale/currencies" + + + let params: [String: Any] = [:] + + + return [self.client.call(method: Client.HTTPMethod.get.rawValue, path: path, headers: [ + "content-type": "application/json", + ], params: params)]; + } + + /** + * List Languages + * + * List of all languages classified by ISO 639-1 including 2-letter code, name + * in English, and name in the respective language. + * + * @throws Exception + * @return array + */ + + func getLanguages() -> Array { + let path: String = "/locale/languages" + + + let params: [String: Any] = [:] + + + return [self.client.call(method: Client.HTTPMethod.get.rawValue, path: path, headers: [ + "content-type": "application/json", + ], params: params)]; + } + +} diff --git a/app/sdks/0.7.0/client-swift/Sources/Appwrite/Services/Storage.swift b/app/sdks/0.7.0/client-swift/Sources/Appwrite/Services/Storage.swift new file mode 100644 index 0000000000..b6e98145f7 --- /dev/null +++ b/app/sdks/0.7.0/client-swift/Sources/Appwrite/Services/Storage.swift @@ -0,0 +1,246 @@ + + +class Storage: Service +{ + /** + * List Files + * + * Get a list of all the user files. You can use the query params to filter + * your results. On admin mode, this endpoint will return a list of all of the + * project files. [Learn more about different API modes](/docs/admin). + * + * @param String _search + * @param Int _limit + * @param Int _offset + * @param String _orderType + * @throws Exception + * @return array + */ + + func listFiles(_search: String = "", _limit: Int = 25, _offset: Int = 0, _orderType: String = "ASC") -> Array { + let path: String = "/storage/files" + + + var params: [String: Any] = [:] + + params["search"] = _search + params["limit"] = _limit + params["offset"] = _offset + params["orderType"] = _orderType + + return [self.client.call(method: Client.HTTPMethod.get.rawValue, path: path, headers: [ + "content-type": "application/json", + ], params: params)]; + } + + /** + * Create File + * + * Create a new file. The user who creates the file will automatically be + * assigned to read and write access unless he has passed custom values for + * read and write arguments. + * + * @param Array _file + * @param Array _read + * @param Array _write + * @throws Exception + * @return array + */ + + func createFile(_file: Array, _read: Array, _write: Array) -> Array { + let path: String = "/storage/files" + + + var params: [String: Any] = [:] + + params["file"] = _file + params["read"] = _read + params["write"] = _write + + return [self.client.call(method: Client.HTTPMethod.post.rawValue, path: path, headers: [ + "content-type": "multipart/form-data", + ], params: params)]; + } + + /** + * Get File + * + * Get file by its unique ID. This endpoint response returns a JSON object + * with the file metadata. + * + * @param String _fileId + * @throws Exception + * @return array + */ + + func getFile(_fileId: String) -> Array { + var path: String = "/storage/files/{fileId}" + + path = path.replacingOccurrences( + of: "{fileId}", + with: _fileId + ) + + let params: [String: Any] = [:] + + + return [self.client.call(method: Client.HTTPMethod.get.rawValue, path: path, headers: [ + "content-type": "application/json", + ], params: params)]; + } + + /** + * Update File + * + * Update file by its unique ID. Only users with write permissions have access + * to update this resource. + * + * @param String _fileId + * @param Array _read + * @param Array _write + * @throws Exception + * @return array + */ + + func updateFile(_fileId: String, _read: Array, _write: Array) -> Array { + var path: String = "/storage/files/{fileId}" + + path = path.replacingOccurrences( + of: "{fileId}", + with: _fileId + ) + + var params: [String: Any] = [:] + + params["read"] = _read + params["write"] = _write + + return [self.client.call(method: Client.HTTPMethod.put.rawValue, path: path, headers: [ + "content-type": "application/json", + ], params: params)]; + } + + /** + * Delete File + * + * Delete a file by its unique ID. Only users with write permissions have + * access to delete this resource. + * + * @param String _fileId + * @throws Exception + * @return array + */ + + func deleteFile(_fileId: String) -> Array { + var path: String = "/storage/files/{fileId}" + + path = path.replacingOccurrences( + of: "{fileId}", + with: _fileId + ) + + let params: [String: Any] = [:] + + + return [self.client.call(method: Client.HTTPMethod.delete.rawValue, path: path, headers: [ + "content-type": "application/json", + ], params: params)]; + } + + /** + * Get File for Download + * + * Get file content by its unique ID. The endpoint response return with a + * 'Content-Disposition: attachment' header that tells the browser to start + * downloading the file to user downloads directory. + * + * @param String _fileId + * @throws Exception + * @return array + */ + + func getFileDownload(_fileId: String) -> Array { + var path: String = "/storage/files/{fileId}/download" + + path = path.replacingOccurrences( + of: "{fileId}", + with: _fileId + ) + + let params: [String: Any] = [:] + + + return [self.client.call(method: Client.HTTPMethod.get.rawValue, path: path, headers: [ + "content-type": "application/json", + ], params: params)]; + } + + /** + * Get File Preview + * + * Get a file preview image. Currently, this method supports preview for image + * files (jpg, png, and gif), other supported formats, like pdf, docs, slides, + * and spreadsheets, will return the file icon image. You can also pass query + * string arguments for cutting and resizing your preview image. + * + * @param String _fileId + * @param Int _width + * @param Int _height + * @param Int _quality + * @param String _background + * @param String _output + * @throws Exception + * @return array + */ + + func getFilePreview(_fileId: String, _width: Int = 0, _height: Int = 0, _quality: Int = 100, _background: String = "", _output: String = "") -> Array { + var path: String = "/storage/files/{fileId}/preview" + + path = path.replacingOccurrences( + of: "{fileId}", + with: _fileId + ) + + var params: [String: Any] = [:] + + params["width"] = _width + params["height"] = _height + params["quality"] = _quality + params["background"] = _background + params["output"] = _output + + return [self.client.call(method: Client.HTTPMethod.get.rawValue, path: path, headers: [ + "content-type": "application/json", + ], params: params)]; + } + + /** + * Get File for View + * + * Get file content by its unique ID. This endpoint is similar to the download + * method but returns with no 'Content-Disposition: attachment' header. + * + * @param String _fileId + * @param String _as + * @throws Exception + * @return array + */ + + func getFileView(_fileId: String, _as: String = "") -> Array { + var path: String = "/storage/files/{fileId}/view" + + path = path.replacingOccurrences( + of: "{fileId}", + with: _fileId + ) + + var params: [String: Any] = [:] + + params["as"] = _as + + return [self.client.call(method: Client.HTTPMethod.get.rawValue, path: path, headers: [ + "content-type": "application/json", + ], params: params)]; + } + +} diff --git a/app/sdks/0.7.0/client-swift/Sources/Appwrite/Services/Teams.swift b/app/sdks/0.7.0/client-swift/Sources/Appwrite/Services/Teams.swift new file mode 100644 index 0000000000..50bee60273 --- /dev/null +++ b/app/sdks/0.7.0/client-swift/Sources/Appwrite/Services/Teams.swift @@ -0,0 +1,298 @@ + + +class Teams: Service +{ + /** + * List Teams + * + * Get a list of all the current user teams. You can use the query params to + * filter your results. On admin mode, this endpoint will return a list of all + * of the project teams. [Learn more about different API modes](/docs/admin). + * + * @param String _search + * @param Int _limit + * @param Int _offset + * @param String _orderType + * @throws Exception + * @return array + */ + + func list(_search: String = "", _limit: Int = 25, _offset: Int = 0, _orderType: String = "ASC") -> Array { + let path: String = "/teams" + + + var params: [String: Any] = [:] + + params["search"] = _search + params["limit"] = _limit + params["offset"] = _offset + params["orderType"] = _orderType + + return [self.client.call(method: Client.HTTPMethod.get.rawValue, path: path, headers: [ + "content-type": "application/json", + ], params: params)]; + } + + /** + * Create Team + * + * Create a new team. The user who creates the team will automatically be + * assigned as the owner of the team. The team owner can invite new members, + * who will be able add new owners and update or delete the team from your + * project. + * + * @param String _name + * @param Array _roles + * @throws Exception + * @return array + */ + + func create(_name: String, _roles: Array = ["owner"]) -> Array { + let path: String = "/teams" + + + var params: [String: Any] = [:] + + params["name"] = _name + params["roles"] = _roles + + return [self.client.call(method: Client.HTTPMethod.post.rawValue, path: path, headers: [ + "content-type": "application/json", + ], params: params)]; + } + + /** + * Get Team + * + * Get team by its unique ID. All team members have read access for this + * resource. + * + * @param String _teamId + * @throws Exception + * @return array + */ + + func get(_teamId: String) -> Array { + var path: String = "/teams/{teamId}" + + path = path.replacingOccurrences( + of: "{teamId}", + with: _teamId + ) + + let params: [String: Any] = [:] + + + return [self.client.call(method: Client.HTTPMethod.get.rawValue, path: path, headers: [ + "content-type": "application/json", + ], params: params)]; + } + + /** + * Update Team + * + * Update team by its unique ID. Only team owners have write access for this + * resource. + * + * @param String _teamId + * @param String _name + * @throws Exception + * @return array + */ + + func update(_teamId: String, _name: String) -> Array { + var path: String = "/teams/{teamId}" + + path = path.replacingOccurrences( + of: "{teamId}", + with: _teamId + ) + + var params: [String: Any] = [:] + + params["name"] = _name + + return [self.client.call(method: Client.HTTPMethod.put.rawValue, path: path, headers: [ + "content-type": "application/json", + ], params: params)]; + } + + /** + * Delete Team + * + * Delete team by its unique ID. Only team owners have write access for this + * resource. + * + * @param String _teamId + * @throws Exception + * @return array + */ + + func delete(_teamId: String) -> Array { + var path: String = "/teams/{teamId}" + + path = path.replacingOccurrences( + of: "{teamId}", + with: _teamId + ) + + let params: [String: Any] = [:] + + + return [self.client.call(method: Client.HTTPMethod.delete.rawValue, path: path, headers: [ + "content-type": "application/json", + ], params: params)]; + } + + /** + * Get Team Memberships + * + * Get team members by the team unique ID. All team members have read access + * for this list of resources. + * + * @param String _teamId + * @param String _search + * @param Int _limit + * @param Int _offset + * @param String _orderType + * @throws Exception + * @return array + */ + + func getMemberships(_teamId: String, _search: String = "", _limit: Int = 25, _offset: Int = 0, _orderType: String = "ASC") -> Array { + var path: String = "/teams/{teamId}/memberships" + + path = path.replacingOccurrences( + of: "{teamId}", + with: _teamId + ) + + var params: [String: Any] = [:] + + params["search"] = _search + params["limit"] = _limit + params["offset"] = _offset + params["orderType"] = _orderType + + return [self.client.call(method: Client.HTTPMethod.get.rawValue, path: path, headers: [ + "content-type": "application/json", + ], params: params)]; + } + + /** + * Create Team Membership + * + * Use this endpoint to invite a new member to join your team. An email with a + * link to join the team will be sent to the new member email address if the + * member doesn't exist in the project it will be created automatically. + * + * Use the 'URL' parameter to redirect the user from the invitation email back + * to your app. When the user is redirected, use the [Update Team Membership + * Status](/docs/client/teams#updateMembershipStatus) endpoint to allow the + * user to accept the invitation to the team. + * + * Please note that in order to avoid a [Redirect + * Attacks](https://github.com/OWASP/CheatSheetSeries/blob/master/cheatsheets/Unvalidated_Redirects_and_Forwards_Cheat_Sheet.md) + * the only valid redirect URL's are the once from domains you have set when + * added your platforms in the console interface. + * + * @param String _teamId + * @param String _email + * @param Array _roles + * @param String _url + * @param String _name + * @throws Exception + * @return array + */ + + func createMembership(_teamId: String, _email: String, _roles: Array, _url: String, _name: String = "") -> Array { + var path: String = "/teams/{teamId}/memberships" + + path = path.replacingOccurrences( + of: "{teamId}", + with: _teamId + ) + + var params: [String: Any] = [:] + + params["email"] = _email + params["name"] = _name + params["roles"] = _roles + params["url"] = _url + + return [self.client.call(method: Client.HTTPMethod.post.rawValue, path: path, headers: [ + "content-type": "application/json", + ], params: params)]; + } + + /** + * Delete Team Membership + * + * This endpoint allows a user to leave a team or for a team owner to delete + * the membership of any other team member. You can also use this endpoint to + * delete a user membership even if he didn't accept it. + * + * @param String _teamId + * @param String _inviteId + * @throws Exception + * @return array + */ + + func deleteMembership(_teamId: String, _inviteId: String) -> Array { + var path: String = "/teams/{teamId}/memberships/{inviteId}" + + path = path.replacingOccurrences( + of: "{teamId}", + with: _teamId + ) + path = path.replacingOccurrences( + of: "{inviteId}", + with: _inviteId + ) + + let params: [String: Any] = [:] + + + return [self.client.call(method: Client.HTTPMethod.delete.rawValue, path: path, headers: [ + "content-type": "application/json", + ], params: params)]; + } + + /** + * Update Team Membership Status + * + * Use this endpoint to allow a user to accept an invitation to join a team + * after he is being redirected back to your app from the invitation email he + * was sent. + * + * @param String _teamId + * @param String _inviteId + * @param String _userId + * @param String _secret + * @throws Exception + * @return array + */ + + func updateMembershipStatus(_teamId: String, _inviteId: String, _userId: String, _secret: String) -> Array { + var path: String = "/teams/{teamId}/memberships/{inviteId}/status" + + path = path.replacingOccurrences( + of: "{teamId}", + with: _teamId + ) + path = path.replacingOccurrences( + of: "{inviteId}", + with: _inviteId + ) + + var params: [String: Any] = [:] + + params["userId"] = _userId + params["secret"] = _secret + + return [self.client.call(method: Client.HTTPMethod.patch.rawValue, path: path, headers: [ + "content-type": "application/json", + ], params: params)]; + } + +} diff --git a/app/sdks/0.7.0/client-swift/docs/account.md b/app/sdks/0.7.0/client-swift/docs/account.md new file mode 100644 index 0000000000..48bc91d213 --- /dev/null +++ b/app/sdks/0.7.0/client-swift/docs/account.md @@ -0,0 +1,240 @@ +/// Swift Appwrite SDK +/// Produced by Appwrite SDK Generator +/// + +# Account Service + +## Get Account + +```http request +GET https://appwrite.io/v1/account +``` + +** Get currently logged in user data as JSON object. ** + +## Create Account + +```http request +POST https://appwrite.io/v1/account +``` + +** Use this endpoint to allow a new user to register a new account in your project. After the user registration completes successfully, you can use the [/account/verfication](/docs/client/account#createVerification) route to start verifying the user email address. To allow your new user to login to his new account, you need to create a new [account session](/docs/client/account#createSession). ** + +### Parameters + +| Field Name | Type | Description | Default | +| --- | --- | --- | --- | +| email | string | User email. | | +| password | string | User password. Must be between 6 to 32 chars. | | +| name | string | User name. | | + +## Delete Account + +```http request +DELETE https://appwrite.io/v1/account +``` + +** Delete a currently logged in user account. Behind the scene, the user record is not deleted but permanently blocked from any access. This is done to avoid deleted accounts being overtaken by new users with the same email address. Any user-related resources like documents or storage files should be deleted separately. ** + +## Update Account Email + +```http request +PATCH https://appwrite.io/v1/account/email +``` + +** Update currently logged in user account email address. After changing user address, user confirmation status is being reset and a new confirmation mail is sent. For security measures, user password is required to complete this request. ** + +### Parameters + +| Field Name | Type | Description | Default | +| --- | --- | --- | --- | +| email | string | User email. | | +| password | string | User password. Must be between 6 to 32 chars. | | + +## Get Account Logs + +```http request +GET https://appwrite.io/v1/account/logs +``` + +** Get currently logged in user list of latest security activity logs. Each log returns user IP address, location and date and time of log. ** + +## Update Account Name + +```http request +PATCH https://appwrite.io/v1/account/name +``` + +** Update currently logged in user account name. ** + +### Parameters + +| Field Name | Type | Description | Default | +| --- | --- | --- | --- | +| name | string | User name. | | + +## Update Account Password + +```http request +PATCH https://appwrite.io/v1/account/password +``` + +** Update currently logged in user password. For validation, user is required to pass the password twice. ** + +### Parameters + +| Field Name | Type | Description | Default | +| --- | --- | --- | --- | +| password | string | New user password. Must be between 6 to 32 chars. | | +| oldPassword | string | Old user password. Must be between 6 to 32 chars. | | + +## Get Account Preferences + +```http request +GET https://appwrite.io/v1/account/prefs +``` + +** Get currently logged in user preferences as a key-value object. ** + +## Update Account Preferences + +```http request +PATCH https://appwrite.io/v1/account/prefs +``` + +** Update currently logged in user account preferences. You can pass only the specific settings you wish to update. ** + +### Parameters + +| Field Name | Type | Description | Default | +| --- | --- | --- | --- | +| prefs | object | Prefs key-value JSON object. | | + +## Create Password Recovery + +```http request +POST https://appwrite.io/v1/account/recovery +``` + +** Sends the user an email with a temporary secret key for password reset. When the user clicks the confirmation link he is redirected back to your app password reset URL with the secret key and email address values attached to the URL query string. Use the query string params to submit a request to the [PUT /account/recovery](/docs/client/account#updateRecovery) endpoint to complete the process. ** + +### Parameters + +| Field Name | Type | Description | Default | +| --- | --- | --- | --- | +| email | string | User email. | | +| url | string | URL to redirect the user back to your app from the recovery email. Only URLs from hostnames in your project platform list are allowed. This requirement helps to prevent an [open redirect](https://cheatsheetseries.owasp.org/cheatsheets/Unvalidated_Redirects_and_Forwards_Cheat_Sheet.html) attack against your project API. | | + +## Complete Password Recovery + +```http request +PUT https://appwrite.io/v1/account/recovery +``` + +** Use this endpoint to complete the user account password reset. Both the **userId** and **secret** arguments will be passed as query parameters to the redirect URL you have provided when sending your request to the [POST /account/recovery](/docs/client/account#createRecovery) endpoint. + +Please note that in order to avoid a [Redirect Attack](https://github.com/OWASP/CheatSheetSeries/blob/master/cheatsheets/Unvalidated_Redirects_and_Forwards_Cheat_Sheet.md) the only valid redirect URLs are the ones from domains you have set when adding your platforms in the console interface. ** + +### Parameters + +| Field Name | Type | Description | Default | +| --- | --- | --- | --- | +| userId | string | User account UID address. | | +| secret | string | Valid reset token. | | +| password | string | New password. Must be between 6 to 32 chars. | | +| passwordAgain | string | New password again. Must be between 6 to 32 chars. | | + +## Get Account Sessions + +```http request +GET https://appwrite.io/v1/account/sessions +``` + +** Get currently logged in user list of active sessions across different devices. ** + +## Create Account Session + +```http request +POST https://appwrite.io/v1/account/sessions +``` + +** Allow the user to login into his account by providing a valid email and password combination. This route will create a new session for the user. ** + +### Parameters + +| Field Name | Type | Description | Default | +| --- | --- | --- | --- | +| email | string | User email. | | +| password | string | User password. Must be between 6 to 32 chars. | | + +## Delete All Account Sessions + +```http request +DELETE https://appwrite.io/v1/account/sessions +``` + +** Delete all sessions from the user account and remove any sessions cookies from the end client. ** + +## Create Account Session with OAuth2 + +```http request +GET https://appwrite.io/v1/account/sessions/oauth2/{provider} +``` + +** Allow the user to login to his account using the OAuth2 provider of his choice. Each OAuth2 provider should be enabled from the Appwrite console first. Use the success and failure arguments to provide a redirect URL's back to your app when login is completed. ** + +### Parameters + +| Field Name | Type | Description | Default | +| --- | --- | --- | --- | +| provider | string | **Required** OAuth2 Provider. Currently, supported providers are: amazon, apple, bitbucket, bitly, box, discord, dropbox, facebook, github, gitlab, google, linkedin, microsoft, paypal, paypalSandbox, salesforce, slack, spotify, twitch, vk, yahoo, yandex. | | +| success | string | URL to redirect back to your app after a successful login attempt. Only URLs from hostnames in your project platform list are allowed. This requirement helps to prevent an [open redirect](https://cheatsheetseries.owasp.org/cheatsheets/Unvalidated_Redirects_and_Forwards_Cheat_Sheet.html) attack against your project API. | https://appwrite.io/auth/oauth2/success | +| failure | string | URL to redirect back to your app after a failed login attempt. Only URLs from hostnames in your project platform list are allowed. This requirement helps to prevent an [open redirect](https://cheatsheetseries.owasp.org/cheatsheets/Unvalidated_Redirects_and_Forwards_Cheat_Sheet.html) attack against your project API. | https://appwrite.io/auth/oauth2/failure | +| scopes | array | A list of custom OAuth2 scopes. Check each provider internal docs for a list of supported scopes. | [] | + +## Delete Account Session + +```http request +DELETE https://appwrite.io/v1/account/sessions/{sessionId} +``` + +** Use this endpoint to log out the currently logged in user from all his account sessions across all his different devices. When using the option id argument, only the session unique ID provider will be deleted. ** + +### Parameters + +| Field Name | Type | Description | Default | +| --- | --- | --- | --- | +| sessionId | string | **Required** Session unique ID. Use the string 'current' to delete the current device session. | | + +## Create Email Verification + +```http request +POST https://appwrite.io/v1/account/verification +``` + +** Use this endpoint to send a verification message to your user email address to confirm they are the valid owners of that address. Both the **userId** and **secret** arguments will be passed as query parameters to the URL you have provided to be attached to the verification email. The provided URL should redirect the user back to your app and allow you to complete the verification process by verifying both the **userId** and **secret** parameters. Learn more about how to [complete the verification process](/docs/client/account#updateAccountVerification). + +Please note that in order to avoid a [Redirect Attack](https://github.com/OWASP/CheatSheetSeries/blob/master/cheatsheets/Unvalidated_Redirects_and_Forwards_Cheat_Sheet.md), the only valid redirect URLs are the ones from domains you have set when adding your platforms in the console interface. + ** + +### Parameters + +| Field Name | Type | Description | Default | +| --- | --- | --- | --- | +| url | string | URL to redirect the user back to your app from the verification email. Only URLs from hostnames in your project platform list are allowed. This requirement helps to prevent an [open redirect](https://cheatsheetseries.owasp.org/cheatsheets/Unvalidated_Redirects_and_Forwards_Cheat_Sheet.html) attack against your project API. | | + +## Complete Email Verification + +```http request +PUT https://appwrite.io/v1/account/verification +``` + +** Use this endpoint to complete the user email verification process. Use both the **userId** and **secret** parameters that were attached to your app URL to verify the user email ownership. If confirmed this route will return a 200 status code. ** + +### Parameters + +| Field Name | Type | Description | Default | +| --- | --- | --- | --- | +| userId | string | User unique ID. | | +| secret | string | Valid verification token. | | + diff --git a/app/sdks/0.7.0/client-swift/docs/avatars.md b/app/sdks/0.7.0/client-swift/docs/avatars.md new file mode 100644 index 0000000000..1e17a8e14a --- /dev/null +++ b/app/sdks/0.7.0/client-swift/docs/avatars.md @@ -0,0 +1,124 @@ +/// Swift Appwrite SDK +/// Produced by Appwrite SDK Generator +/// + +# Avatars Service + +## Get Browser Icon + +```http request +GET https://appwrite.io/v1/avatars/browsers/{code} +``` + +** You can use this endpoint to show different browser icons to your users. The code argument receives the browser code as it appears in your user /account/sessions endpoint. Use width, height and quality arguments to change the output settings. ** + +### Parameters + +| Field Name | Type | Description | Default | +| --- | --- | --- | --- | +| code | string | **Required** Browser Code. | | +| width | integer | Image width. Pass an integer between 0 to 2000. Defaults to 100. | 100 | +| height | integer | Image height. Pass an integer between 0 to 2000. Defaults to 100. | 100 | +| quality | integer | Image quality. Pass an integer between 0 to 100. Defaults to 100. | 100 | + +## Get Credit Card Icon + +```http request +GET https://appwrite.io/v1/avatars/credit-cards/{code} +``` + +** Need to display your users with your billing method or their payment methods? The credit card endpoint will return you the icon of the credit card provider you need. Use width, height and quality arguments to change the output settings. ** + +### Parameters + +| Field Name | Type | Description | Default | +| --- | --- | --- | --- | +| code | string | **Required** Credit Card Code. Possible values: amex, argencard, cabal, censosud, diners, discover, elo, hipercard, jcb, mastercard, naranja, targeta-shopping, union-china-pay, visa. | | +| width | integer | Image width. Pass an integer between 0 to 2000. Defaults to 100. | 100 | +| height | integer | Image height. Pass an integer between 0 to 2000. Defaults to 100. | 100 | +| quality | integer | Image quality. Pass an integer between 0 to 100. Defaults to 100. | 100 | + +## Get Favicon + +```http request +GET https://appwrite.io/v1/avatars/favicon +``` + +** Use this endpoint to fetch the favorite icon (AKA favicon) of a any remote website URL. ** + +### Parameters + +| Field Name | Type | Description | Default | +| --- | --- | --- | --- | +| url | string | **Required** Website URL which you want to fetch the favicon from. | | + +## Get Country Flag + +```http request +GET https://appwrite.io/v1/avatars/flags/{code} +``` + +** You can use this endpoint to show different country flags icons to your users. The code argument receives the 2 letter country code. Use width, height and quality arguments to change the output settings. ** + +### Parameters + +| Field Name | Type | Description | Default | +| --- | --- | --- | --- | +| code | string | **Required** Country Code. ISO Alpha-2 country code format. | | +| width | integer | Image width. Pass an integer between 0 to 2000. Defaults to 100. | 100 | +| height | integer | Image height. Pass an integer between 0 to 2000. Defaults to 100. | 100 | +| quality | integer | Image quality. Pass an integer between 0 to 100. Defaults to 100. | 100 | + +## Get Image from URL + +```http request +GET https://appwrite.io/v1/avatars/image +``` + +** Use this endpoint to fetch a remote image URL and crop it to any image size you want. This endpoint is very useful if you need to crop and display remote images in your app or in case you want to make sure a 3rd party image is properly served using a TLS protocol. ** + +### Parameters + +| Field Name | Type | Description | Default | +| --- | --- | --- | --- | +| url | string | **Required** Image URL which you want to crop. | | +| width | integer | Resize preview image width, Pass an integer between 0 to 2000. | 400 | +| height | integer | Resize preview image height, Pass an integer between 0 to 2000. | 400 | + +## Get User Initials + +```http request +GET https://appwrite.io/v1/avatars/initials +``` + +** Use this endpoint to show your user initials avatar icon on your website or app. By default, this route will try to print your logged-in user name or email initials. You can also overwrite the user name if you pass the 'name' parameter. If no name is given and no user is logged, an empty avatar will be returned. + +You can use the color and background params to change the avatar colors. By default, a random theme will be selected. The random theme will persist for the user's initials when reloading the same theme will always return for the same initials. ** + +### Parameters + +| Field Name | Type | Description | Default | +| --- | --- | --- | --- | +| name | string | Full Name. When empty, current user name or email will be used. | | +| width | integer | Image width. Pass an integer between 0 to 2000. Defaults to 100. | 500 | +| height | integer | Image height. Pass an integer between 0 to 2000. Defaults to 100. | 500 | +| color | string | Changes text color. By default a random color will be picked and stay will persistent to the given name. | | +| background | string | Changes background color. By default a random color will be picked and stay will persistent to the given name. | | + +## Get QR Code + +```http request +GET https://appwrite.io/v1/avatars/qr +``` + +** Converts a given plain text to a QR code image. You can use the query parameters to change the size and style of the resulting image. ** + +### Parameters + +| Field Name | Type | Description | Default | +| --- | --- | --- | --- | +| text | string | **Required** Plain text to be converted to QR code image. | | +| size | integer | QR code size. Pass an integer between 0 to 1000. Defaults to 400. | 400 | +| margin | integer | Margin from edge. Pass an integer between 0 to 10. Defaults to 1. | 1 | +| download | boolean | Return resulting image with 'Content-Disposition: attachment ' headers for the browser to start downloading it. Pass 0 for no header, or 1 for otherwise. Default value is set to 0. | | + diff --git a/app/sdks/0.7.0/client-swift/docs/database.md b/app/sdks/0.7.0/client-swift/docs/database.md new file mode 100644 index 0000000000..d734cb3c1c --- /dev/null +++ b/app/sdks/0.7.0/client-swift/docs/database.md @@ -0,0 +1,90 @@ +/// Swift Appwrite SDK +/// Produced by Appwrite SDK Generator +/// + +# Database Service + +## List Documents + +```http request +GET https://appwrite.io/v1/database/collections/{collectionId}/documents +``` + +** Get a list of all the user documents. You can use the query params to filter your results. On admin mode, this endpoint will return a list of all of the project documents. [Learn more about different API modes](/docs/admin). ** + +### Parameters + +| Field Name | Type | Description | Default | +| --- | --- | --- | --- | +| collectionId | string | **Required** Collection unique ID. You can create a new collection with validation rules using the Database service [server integration](/docs/server/database#createCollection). | | +| filters | array | Array of filter strings. Each filter is constructed from a key name, comparison operator (=, !=, >, <, <=, >=) and a value. You can also use a dot (.) separator in attribute names to filter by child document attributes. Examples: 'name=John Doe' or 'category.$id>=5bed2d152c362'. | [] | +| limit | integer | Maximum number of documents to return in response. Use this value to manage pagination. | 25 | +| offset | integer | Offset value. Use this value to manage pagination. | 0 | +| orderField | string | Document field that results will be sorted by. | $id | +| orderType | string | Order direction. Possible values are DESC for descending order, or ASC for ascending order. | ASC | +| orderCast | string | Order field type casting. Possible values are int, string, date, time or datetime. The database will attempt to cast the order field to the value you pass here. The default value is a string. | string | +| search | string | Search query. Enter any free text search. The database will try to find a match against all document attributes and children. | | + +## Create Document + +```http request +POST https://appwrite.io/v1/database/collections/{collectionId}/documents +``` + +** Create a new Document. Before using this route, you should create a new collection resource using either a [server integration](/docs/server/database?sdk=nodejs#createCollection) API or directly from your database console. ** + +### Parameters + +| Field Name | Type | Description | Default | +| --- | --- | --- | --- | +| collectionId | string | **Required** Collection unique ID. You can create a new collection with validation rules using the Database service [server integration](/docs/server/database#createCollection). | | +| data | object | Document data as JSON object. | | +| read | array | An array of strings with read permissions. By default no user is granted with any read permissions. [learn more about permissions](/docs/permissions) and get a full list of available permissions. | | +| write | array | An array of strings with write permissions. By default no user is granted with any write permissions. [learn more about permissions](/docs/permissions) and get a full list of available permissions. | | + +## Get Document + +```http request +GET https://appwrite.io/v1/database/collections/{collectionId}/documents/{documentId} +``` + +** Get document by its unique ID. This endpoint response returns a JSON object with the document data. ** + +### Parameters + +| Field Name | Type | Description | Default | +| --- | --- | --- | --- | +| collectionId | string | **Required** Collection unique ID. You can create a new collection with validation rules using the Database service [server integration](/docs/server/database#createCollection). | | +| documentId | string | **Required** Document unique ID. | | + +## Update Document + +```http request +PATCH https://appwrite.io/v1/database/collections/{collectionId}/documents/{documentId} +``` + +### Parameters + +| Field Name | Type | Description | Default | +| --- | --- | --- | --- | +| collectionId | string | **Required** Collection unique ID. You can create a new collection with validation rules using the Database service [server integration](/docs/server/database#createCollection). | | +| documentId | string | **Required** Document unique ID. | | +| data | object | Document data as JSON object. | | +| read | array | An array of strings with read permissions. By default no user is granted with any read permissions. [learn more about permissions](/docs/permissions) and get a full list of available permissions. | | +| write | array | An array of strings with write permissions. By default no user is granted with any write permissions. [learn more about permissions](/docs/permissions) and get a full list of available permissions. | | + +## Delete Document + +```http request +DELETE https://appwrite.io/v1/database/collections/{collectionId}/documents/{documentId} +``` + +** Delete document by its unique ID. This endpoint deletes only the parent documents, his attributes and relations to other documents. Child documents **will not** be deleted. ** + +### Parameters + +| Field Name | Type | Description | Default | +| --- | --- | --- | --- | +| collectionId | string | **Required** Collection unique ID. You can create a new collection with validation rules using the Database service [server integration](/docs/server/database#createCollection). | | +| documentId | string | **Required** Document unique ID. | | + diff --git a/app/sdks/0.7.0/client-swift/docs/examples/account/create-o-auth2session.md b/app/sdks/0.7.0/client-swift/docs/examples/account/create-o-auth2session.md new file mode 100644 index 0000000000..0b67257890 --- /dev/null +++ b/app/sdks/0.7.0/client-swift/docs/examples/account/create-o-auth2session.md @@ -0,0 +1,14 @@ +/// Swift Appwrite SDK +/// Produced by Appwrite SDK Generator +/// + + +var client: Client = Client() + +client + .setEndpoint(endpoint: "https://[HOSTNAME_OR_IP]/v1") // Your API Endpoint + .setProject(value: "5df5acd0d48c2") // Your project ID + +var account: Account = Account(client: client); + +var result = account.createOAuth2Session(_provider: "amazon"); diff --git a/app/sdks/0.7.0/client-swift/docs/examples/account/create-recovery.md b/app/sdks/0.7.0/client-swift/docs/examples/account/create-recovery.md new file mode 100644 index 0000000000..04fdcae541 --- /dev/null +++ b/app/sdks/0.7.0/client-swift/docs/examples/account/create-recovery.md @@ -0,0 +1,14 @@ +/// Swift Appwrite SDK +/// Produced by Appwrite SDK Generator +/// + + +var client: Client = Client() + +client + .setEndpoint(endpoint: "https://[HOSTNAME_OR_IP]/v1") // Your API Endpoint + .setProject(value: "5df5acd0d48c2") // Your project ID + +var account: Account = Account(client: client); + +var result = account.createRecovery(_email: "email@example.com", _url: "https://example.com"); diff --git a/app/sdks/0.7.0/client-swift/docs/examples/account/create-session.md b/app/sdks/0.7.0/client-swift/docs/examples/account/create-session.md new file mode 100644 index 0000000000..477b20199c --- /dev/null +++ b/app/sdks/0.7.0/client-swift/docs/examples/account/create-session.md @@ -0,0 +1,14 @@ +/// Swift Appwrite SDK +/// Produced by Appwrite SDK Generator +/// + + +var client: Client = Client() + +client + .setEndpoint(endpoint: "https://[HOSTNAME_OR_IP]/v1") // Your API Endpoint + .setProject(value: "5df5acd0d48c2") // Your project ID + +var account: Account = Account(client: client); + +var result = account.createSession(_email: "email@example.com", _password: "password"); diff --git a/app/sdks/0.7.0/client-swift/docs/examples/account/create-verification.md b/app/sdks/0.7.0/client-swift/docs/examples/account/create-verification.md new file mode 100644 index 0000000000..b0f8d6444e --- /dev/null +++ b/app/sdks/0.7.0/client-swift/docs/examples/account/create-verification.md @@ -0,0 +1,14 @@ +/// Swift Appwrite SDK +/// Produced by Appwrite SDK Generator +/// + + +var client: Client = Client() + +client + .setEndpoint(endpoint: "https://[HOSTNAME_OR_IP]/v1") // Your API Endpoint + .setProject(value: "5df5acd0d48c2") // Your project ID + +var account: Account = Account(client: client); + +var result = account.createVerification(_url: "https://example.com"); diff --git a/app/sdks/0.7.0/client-swift/docs/examples/account/create.md b/app/sdks/0.7.0/client-swift/docs/examples/account/create.md new file mode 100644 index 0000000000..176b192c5e --- /dev/null +++ b/app/sdks/0.7.0/client-swift/docs/examples/account/create.md @@ -0,0 +1,14 @@ +/// Swift Appwrite SDK +/// Produced by Appwrite SDK Generator +/// + + +var client: Client = Client() + +client + .setEndpoint(endpoint: "https://[HOSTNAME_OR_IP]/v1") // Your API Endpoint + .setProject(value: "5df5acd0d48c2") // Your project ID + +var account: Account = Account(client: client); + +var result = account.create(_email: "email@example.com", _password: "password"); diff --git a/app/sdks/0.7.0/client-swift/docs/examples/account/delete-session.md b/app/sdks/0.7.0/client-swift/docs/examples/account/delete-session.md new file mode 100644 index 0000000000..6f2373dc79 --- /dev/null +++ b/app/sdks/0.7.0/client-swift/docs/examples/account/delete-session.md @@ -0,0 +1,14 @@ +/// Swift Appwrite SDK +/// Produced by Appwrite SDK Generator +/// + + +var client: Client = Client() + +client + .setEndpoint(endpoint: "https://[HOSTNAME_OR_IP]/v1") // Your API Endpoint + .setProject(value: "5df5acd0d48c2") // Your project ID + +var account: Account = Account(client: client); + +var result = account.deleteSession(_sessionId: "[SESSION_ID]"); diff --git a/app/sdks/0.7.0/client-swift/docs/examples/account/delete-sessions.md b/app/sdks/0.7.0/client-swift/docs/examples/account/delete-sessions.md new file mode 100644 index 0000000000..6df71814c6 --- /dev/null +++ b/app/sdks/0.7.0/client-swift/docs/examples/account/delete-sessions.md @@ -0,0 +1,14 @@ +/// Swift Appwrite SDK +/// Produced by Appwrite SDK Generator +/// + + +var client: Client = Client() + +client + .setEndpoint(endpoint: "https://[HOSTNAME_OR_IP]/v1") // Your API Endpoint + .setProject(value: "5df5acd0d48c2") // Your project ID + +var account: Account = Account(client: client); + +var result = account.deleteSessions(); diff --git a/app/sdks/0.7.0/client-swift/docs/examples/account/delete.md b/app/sdks/0.7.0/client-swift/docs/examples/account/delete.md new file mode 100644 index 0000000000..f4123b0197 --- /dev/null +++ b/app/sdks/0.7.0/client-swift/docs/examples/account/delete.md @@ -0,0 +1,14 @@ +/// Swift Appwrite SDK +/// Produced by Appwrite SDK Generator +/// + + +var client: Client = Client() + +client + .setEndpoint(endpoint: "https://[HOSTNAME_OR_IP]/v1") // Your API Endpoint + .setProject(value: "5df5acd0d48c2") // Your project ID + +var account: Account = Account(client: client); + +var result = account.delete(); diff --git a/app/sdks/0.7.0/client-swift/docs/examples/account/get-logs.md b/app/sdks/0.7.0/client-swift/docs/examples/account/get-logs.md new file mode 100644 index 0000000000..8d3d965723 --- /dev/null +++ b/app/sdks/0.7.0/client-swift/docs/examples/account/get-logs.md @@ -0,0 +1,14 @@ +/// Swift Appwrite SDK +/// Produced by Appwrite SDK Generator +/// + + +var client: Client = Client() + +client + .setEndpoint(endpoint: "https://[HOSTNAME_OR_IP]/v1") // Your API Endpoint + .setProject(value: "5df5acd0d48c2") // Your project ID + +var account: Account = Account(client: client); + +var result = account.getLogs(); diff --git a/app/sdks/0.7.0/client-swift/docs/examples/account/get-prefs.md b/app/sdks/0.7.0/client-swift/docs/examples/account/get-prefs.md new file mode 100644 index 0000000000..e9746ab34b --- /dev/null +++ b/app/sdks/0.7.0/client-swift/docs/examples/account/get-prefs.md @@ -0,0 +1,14 @@ +/// Swift Appwrite SDK +/// Produced by Appwrite SDK Generator +/// + + +var client: Client = Client() + +client + .setEndpoint(endpoint: "https://[HOSTNAME_OR_IP]/v1") // Your API Endpoint + .setProject(value: "5df5acd0d48c2") // Your project ID + +var account: Account = Account(client: client); + +var result = account.getPrefs(); diff --git a/app/sdks/0.7.0/client-swift/docs/examples/account/get-sessions.md b/app/sdks/0.7.0/client-swift/docs/examples/account/get-sessions.md new file mode 100644 index 0000000000..988e91c8e5 --- /dev/null +++ b/app/sdks/0.7.0/client-swift/docs/examples/account/get-sessions.md @@ -0,0 +1,14 @@ +/// Swift Appwrite SDK +/// Produced by Appwrite SDK Generator +/// + + +var client: Client = Client() + +client + .setEndpoint(endpoint: "https://[HOSTNAME_OR_IP]/v1") // Your API Endpoint + .setProject(value: "5df5acd0d48c2") // Your project ID + +var account: Account = Account(client: client); + +var result = account.getSessions(); diff --git a/app/sdks/0.7.0/client-swift/docs/examples/account/get.md b/app/sdks/0.7.0/client-swift/docs/examples/account/get.md new file mode 100644 index 0000000000..b84096bdb8 --- /dev/null +++ b/app/sdks/0.7.0/client-swift/docs/examples/account/get.md @@ -0,0 +1,14 @@ +/// Swift Appwrite SDK +/// Produced by Appwrite SDK Generator +/// + + +var client: Client = Client() + +client + .setEndpoint(endpoint: "https://[HOSTNAME_OR_IP]/v1") // Your API Endpoint + .setProject(value: "5df5acd0d48c2") // Your project ID + +var account: Account = Account(client: client); + +var result = account.get(); diff --git a/app/sdks/0.7.0/client-swift/docs/examples/account/update-email.md b/app/sdks/0.7.0/client-swift/docs/examples/account/update-email.md new file mode 100644 index 0000000000..cec700b330 --- /dev/null +++ b/app/sdks/0.7.0/client-swift/docs/examples/account/update-email.md @@ -0,0 +1,14 @@ +/// Swift Appwrite SDK +/// Produced by Appwrite SDK Generator +/// + + +var client: Client = Client() + +client + .setEndpoint(endpoint: "https://[HOSTNAME_OR_IP]/v1") // Your API Endpoint + .setProject(value: "5df5acd0d48c2") // Your project ID + +var account: Account = Account(client: client); + +var result = account.updateEmail(_email: "email@example.com", _password: "password"); diff --git a/app/sdks/0.7.0/client-swift/docs/examples/account/update-name.md b/app/sdks/0.7.0/client-swift/docs/examples/account/update-name.md new file mode 100644 index 0000000000..dbc6f7d2b8 --- /dev/null +++ b/app/sdks/0.7.0/client-swift/docs/examples/account/update-name.md @@ -0,0 +1,14 @@ +/// Swift Appwrite SDK +/// Produced by Appwrite SDK Generator +/// + + +var client: Client = Client() + +client + .setEndpoint(endpoint: "https://[HOSTNAME_OR_IP]/v1") // Your API Endpoint + .setProject(value: "5df5acd0d48c2") // Your project ID + +var account: Account = Account(client: client); + +var result = account.updateName(_name: "[NAME]"); diff --git a/app/sdks/0.7.0/client-swift/docs/examples/account/update-password.md b/app/sdks/0.7.0/client-swift/docs/examples/account/update-password.md new file mode 100644 index 0000000000..1346102a32 --- /dev/null +++ b/app/sdks/0.7.0/client-swift/docs/examples/account/update-password.md @@ -0,0 +1,14 @@ +/// Swift Appwrite SDK +/// Produced by Appwrite SDK Generator +/// + + +var client: Client = Client() + +client + .setEndpoint(endpoint: "https://[HOSTNAME_OR_IP]/v1") // Your API Endpoint + .setProject(value: "5df5acd0d48c2") // Your project ID + +var account: Account = Account(client: client); + +var result = account.updatePassword(_password: "password", _oldPassword: "password"); diff --git a/app/sdks/0.7.0/client-swift/docs/examples/account/update-prefs.md b/app/sdks/0.7.0/client-swift/docs/examples/account/update-prefs.md new file mode 100644 index 0000000000..fea1a8d6ff --- /dev/null +++ b/app/sdks/0.7.0/client-swift/docs/examples/account/update-prefs.md @@ -0,0 +1,14 @@ +/// Swift Appwrite SDK +/// Produced by Appwrite SDK Generator +/// + + +var client: Client = Client() + +client + .setEndpoint(endpoint: "https://[HOSTNAME_OR_IP]/v1") // Your API Endpoint + .setProject(value: "5df5acd0d48c2") // Your project ID + +var account: Account = Account(client: client); + +var result = account.updatePrefs(_prefs: ); diff --git a/app/sdks/0.7.0/client-swift/docs/examples/account/update-recovery.md b/app/sdks/0.7.0/client-swift/docs/examples/account/update-recovery.md new file mode 100644 index 0000000000..6009d62e2c --- /dev/null +++ b/app/sdks/0.7.0/client-swift/docs/examples/account/update-recovery.md @@ -0,0 +1,14 @@ +/// Swift Appwrite SDK +/// Produced by Appwrite SDK Generator +/// + + +var client: Client = Client() + +client + .setEndpoint(endpoint: "https://[HOSTNAME_OR_IP]/v1") // Your API Endpoint + .setProject(value: "5df5acd0d48c2") // Your project ID + +var account: Account = Account(client: client); + +var result = account.updateRecovery(_userId: "[USER_ID]", _secret: "[SECRET]", _password: "password", _passwordAgain: "password"); diff --git a/app/sdks/0.7.0/client-swift/docs/examples/account/update-verification.md b/app/sdks/0.7.0/client-swift/docs/examples/account/update-verification.md new file mode 100644 index 0000000000..376a87a9c3 --- /dev/null +++ b/app/sdks/0.7.0/client-swift/docs/examples/account/update-verification.md @@ -0,0 +1,14 @@ +/// Swift Appwrite SDK +/// Produced by Appwrite SDK Generator +/// + + +var client: Client = Client() + +client + .setEndpoint(endpoint: "https://[HOSTNAME_OR_IP]/v1") // Your API Endpoint + .setProject(value: "5df5acd0d48c2") // Your project ID + +var account: Account = Account(client: client); + +var result = account.updateVerification(_userId: "[USER_ID]", _secret: "[SECRET]"); diff --git a/app/sdks/0.7.0/client-swift/docs/examples/avatars/get-browser.md b/app/sdks/0.7.0/client-swift/docs/examples/avatars/get-browser.md new file mode 100644 index 0000000000..874ef96d31 --- /dev/null +++ b/app/sdks/0.7.0/client-swift/docs/examples/avatars/get-browser.md @@ -0,0 +1,14 @@ +/// Swift Appwrite SDK +/// Produced by Appwrite SDK Generator +/// + + +var client: Client = Client() + +client + .setEndpoint(endpoint: "https://[HOSTNAME_OR_IP]/v1") // Your API Endpoint + .setProject(value: "5df5acd0d48c2") // Your project ID + +var avatars: Avatars = Avatars(client: client); + +var result = avatars.getBrowser(_code: "aa"); diff --git a/app/sdks/0.7.0/client-swift/docs/examples/avatars/get-credit-card.md b/app/sdks/0.7.0/client-swift/docs/examples/avatars/get-credit-card.md new file mode 100644 index 0000000000..797431f3dc --- /dev/null +++ b/app/sdks/0.7.0/client-swift/docs/examples/avatars/get-credit-card.md @@ -0,0 +1,14 @@ +/// Swift Appwrite SDK +/// Produced by Appwrite SDK Generator +/// + + +var client: Client = Client() + +client + .setEndpoint(endpoint: "https://[HOSTNAME_OR_IP]/v1") // Your API Endpoint + .setProject(value: "5df5acd0d48c2") // Your project ID + +var avatars: Avatars = Avatars(client: client); + +var result = avatars.getCreditCard(_code: "amex"); diff --git a/app/sdks/0.7.0/client-swift/docs/examples/avatars/get-favicon.md b/app/sdks/0.7.0/client-swift/docs/examples/avatars/get-favicon.md new file mode 100644 index 0000000000..5623468481 --- /dev/null +++ b/app/sdks/0.7.0/client-swift/docs/examples/avatars/get-favicon.md @@ -0,0 +1,14 @@ +/// Swift Appwrite SDK +/// Produced by Appwrite SDK Generator +/// + + +var client: Client = Client() + +client + .setEndpoint(endpoint: "https://[HOSTNAME_OR_IP]/v1") // Your API Endpoint + .setProject(value: "5df5acd0d48c2") // Your project ID + +var avatars: Avatars = Avatars(client: client); + +var result = avatars.getFavicon(_url: "https://example.com"); diff --git a/app/sdks/0.7.0/client-swift/docs/examples/avatars/get-flag.md b/app/sdks/0.7.0/client-swift/docs/examples/avatars/get-flag.md new file mode 100644 index 0000000000..fba93ae4d4 --- /dev/null +++ b/app/sdks/0.7.0/client-swift/docs/examples/avatars/get-flag.md @@ -0,0 +1,14 @@ +/// Swift Appwrite SDK +/// Produced by Appwrite SDK Generator +/// + + +var client: Client = Client() + +client + .setEndpoint(endpoint: "https://[HOSTNAME_OR_IP]/v1") // Your API Endpoint + .setProject(value: "5df5acd0d48c2") // Your project ID + +var avatars: Avatars = Avatars(client: client); + +var result = avatars.getFlag(_code: "af"); diff --git a/app/sdks/0.7.0/client-swift/docs/examples/avatars/get-image.md b/app/sdks/0.7.0/client-swift/docs/examples/avatars/get-image.md new file mode 100644 index 0000000000..4ebe561b3b --- /dev/null +++ b/app/sdks/0.7.0/client-swift/docs/examples/avatars/get-image.md @@ -0,0 +1,14 @@ +/// Swift Appwrite SDK +/// Produced by Appwrite SDK Generator +/// + + +var client: Client = Client() + +client + .setEndpoint(endpoint: "https://[HOSTNAME_OR_IP]/v1") // Your API Endpoint + .setProject(value: "5df5acd0d48c2") // Your project ID + +var avatars: Avatars = Avatars(client: client); + +var result = avatars.getImage(_url: "https://example.com"); diff --git a/app/sdks/0.7.0/client-swift/docs/examples/avatars/get-initials.md b/app/sdks/0.7.0/client-swift/docs/examples/avatars/get-initials.md new file mode 100644 index 0000000000..d317cfc5a8 --- /dev/null +++ b/app/sdks/0.7.0/client-swift/docs/examples/avatars/get-initials.md @@ -0,0 +1,14 @@ +/// Swift Appwrite SDK +/// Produced by Appwrite SDK Generator +/// + + +var client: Client = Client() + +client + .setEndpoint(endpoint: "https://[HOSTNAME_OR_IP]/v1") // Your API Endpoint + .setProject(value: "5df5acd0d48c2") // Your project ID + +var avatars: Avatars = Avatars(client: client); + +var result = avatars.getInitials(); diff --git a/app/sdks/0.7.0/client-swift/docs/examples/avatars/get-q-r.md b/app/sdks/0.7.0/client-swift/docs/examples/avatars/get-q-r.md new file mode 100644 index 0000000000..737acfc258 --- /dev/null +++ b/app/sdks/0.7.0/client-swift/docs/examples/avatars/get-q-r.md @@ -0,0 +1,14 @@ +/// Swift Appwrite SDK +/// Produced by Appwrite SDK Generator +/// + + +var client: Client = Client() + +client + .setEndpoint(endpoint: "https://[HOSTNAME_OR_IP]/v1") // Your API Endpoint + .setProject(value: "5df5acd0d48c2") // Your project ID + +var avatars: Avatars = Avatars(client: client); + +var result = avatars.getQR(_text: "[TEXT]"); diff --git a/app/sdks/0.7.0/client-swift/docs/examples/database/create-document.md b/app/sdks/0.7.0/client-swift/docs/examples/database/create-document.md new file mode 100644 index 0000000000..ebd59adc47 --- /dev/null +++ b/app/sdks/0.7.0/client-swift/docs/examples/database/create-document.md @@ -0,0 +1,14 @@ +/// Swift Appwrite SDK +/// Produced by Appwrite SDK Generator +/// + + +var client: Client = Client() + +client + .setEndpoint(endpoint: "https://[HOSTNAME_OR_IP]/v1") // Your API Endpoint + .setProject(value: "5df5acd0d48c2") // Your project ID + +var database: Database = Database(client: client); + +var result = database.createDocument(_collectionId: "[COLLECTION_ID]", _data: , _read: [], _write: []); diff --git a/app/sdks/0.7.0/client-swift/docs/examples/database/delete-document.md b/app/sdks/0.7.0/client-swift/docs/examples/database/delete-document.md new file mode 100644 index 0000000000..faec2ceee9 --- /dev/null +++ b/app/sdks/0.7.0/client-swift/docs/examples/database/delete-document.md @@ -0,0 +1,14 @@ +/// Swift Appwrite SDK +/// Produced by Appwrite SDK Generator +/// + + +var client: Client = Client() + +client + .setEndpoint(endpoint: "https://[HOSTNAME_OR_IP]/v1") // Your API Endpoint + .setProject(value: "5df5acd0d48c2") // Your project ID + +var database: Database = Database(client: client); + +var result = database.deleteDocument(_collectionId: "[COLLECTION_ID]", _documentId: "[DOCUMENT_ID]"); diff --git a/app/sdks/0.7.0/client-swift/docs/examples/database/get-document.md b/app/sdks/0.7.0/client-swift/docs/examples/database/get-document.md new file mode 100644 index 0000000000..0f3a05bfa5 --- /dev/null +++ b/app/sdks/0.7.0/client-swift/docs/examples/database/get-document.md @@ -0,0 +1,14 @@ +/// Swift Appwrite SDK +/// Produced by Appwrite SDK Generator +/// + + +var client: Client = Client() + +client + .setEndpoint(endpoint: "https://[HOSTNAME_OR_IP]/v1") // Your API Endpoint + .setProject(value: "5df5acd0d48c2") // Your project ID + +var database: Database = Database(client: client); + +var result = database.getDocument(_collectionId: "[COLLECTION_ID]", _documentId: "[DOCUMENT_ID]"); diff --git a/app/sdks/0.7.0/client-swift/docs/examples/database/list-documents.md b/app/sdks/0.7.0/client-swift/docs/examples/database/list-documents.md new file mode 100644 index 0000000000..2c9f4a2efa --- /dev/null +++ b/app/sdks/0.7.0/client-swift/docs/examples/database/list-documents.md @@ -0,0 +1,14 @@ +/// Swift Appwrite SDK +/// Produced by Appwrite SDK Generator +/// + + +var client: Client = Client() + +client + .setEndpoint(endpoint: "https://[HOSTNAME_OR_IP]/v1") // Your API Endpoint + .setProject(value: "5df5acd0d48c2") // Your project ID + +var database: Database = Database(client: client); + +var result = database.listDocuments(_collectionId: "[COLLECTION_ID]"); diff --git a/app/sdks/0.7.0/client-swift/docs/examples/database/update-document.md b/app/sdks/0.7.0/client-swift/docs/examples/database/update-document.md new file mode 100644 index 0000000000..bddaf61111 --- /dev/null +++ b/app/sdks/0.7.0/client-swift/docs/examples/database/update-document.md @@ -0,0 +1,14 @@ +/// Swift Appwrite SDK +/// Produced by Appwrite SDK Generator +/// + + +var client: Client = Client() + +client + .setEndpoint(endpoint: "https://[HOSTNAME_OR_IP]/v1") // Your API Endpoint + .setProject(value: "5df5acd0d48c2") // Your project ID + +var database: Database = Database(client: client); + +var result = database.updateDocument(_collectionId: "[COLLECTION_ID]", _documentId: "[DOCUMENT_ID]", _data: , _read: [], _write: []); diff --git a/app/sdks/0.7.0/client-swift/docs/examples/locale/get-continents.md b/app/sdks/0.7.0/client-swift/docs/examples/locale/get-continents.md new file mode 100644 index 0000000000..3f57d5eb0d --- /dev/null +++ b/app/sdks/0.7.0/client-swift/docs/examples/locale/get-continents.md @@ -0,0 +1,14 @@ +/// Swift Appwrite SDK +/// Produced by Appwrite SDK Generator +/// + + +var client: Client = Client() + +client + .setEndpoint(endpoint: "https://[HOSTNAME_OR_IP]/v1") // Your API Endpoint + .setProject(value: "5df5acd0d48c2") // Your project ID + +var locale: Locale = Locale(client: client); + +var result = locale.getContinents(); diff --git a/app/sdks/0.7.0/client-swift/docs/examples/locale/get-countries-e-u.md b/app/sdks/0.7.0/client-swift/docs/examples/locale/get-countries-e-u.md new file mode 100644 index 0000000000..9f2a26213c --- /dev/null +++ b/app/sdks/0.7.0/client-swift/docs/examples/locale/get-countries-e-u.md @@ -0,0 +1,14 @@ +/// Swift Appwrite SDK +/// Produced by Appwrite SDK Generator +/// + + +var client: Client = Client() + +client + .setEndpoint(endpoint: "https://[HOSTNAME_OR_IP]/v1") // Your API Endpoint + .setProject(value: "5df5acd0d48c2") // Your project ID + +var locale: Locale = Locale(client: client); + +var result = locale.getCountriesEU(); diff --git a/app/sdks/0.7.0/client-swift/docs/examples/locale/get-countries-phones.md b/app/sdks/0.7.0/client-swift/docs/examples/locale/get-countries-phones.md new file mode 100644 index 0000000000..2cc9c4a9a0 --- /dev/null +++ b/app/sdks/0.7.0/client-swift/docs/examples/locale/get-countries-phones.md @@ -0,0 +1,14 @@ +/// Swift Appwrite SDK +/// Produced by Appwrite SDK Generator +/// + + +var client: Client = Client() + +client + .setEndpoint(endpoint: "https://[HOSTNAME_OR_IP]/v1") // Your API Endpoint + .setProject(value: "5df5acd0d48c2") // Your project ID + +var locale: Locale = Locale(client: client); + +var result = locale.getCountriesPhones(); diff --git a/app/sdks/0.7.0/client-swift/docs/examples/locale/get-countries.md b/app/sdks/0.7.0/client-swift/docs/examples/locale/get-countries.md new file mode 100644 index 0000000000..df52194af1 --- /dev/null +++ b/app/sdks/0.7.0/client-swift/docs/examples/locale/get-countries.md @@ -0,0 +1,14 @@ +/// Swift Appwrite SDK +/// Produced by Appwrite SDK Generator +/// + + +var client: Client = Client() + +client + .setEndpoint(endpoint: "https://[HOSTNAME_OR_IP]/v1") // Your API Endpoint + .setProject(value: "5df5acd0d48c2") // Your project ID + +var locale: Locale = Locale(client: client); + +var result = locale.getCountries(); diff --git a/app/sdks/0.7.0/client-swift/docs/examples/locale/get-currencies.md b/app/sdks/0.7.0/client-swift/docs/examples/locale/get-currencies.md new file mode 100644 index 0000000000..cf5f403eba --- /dev/null +++ b/app/sdks/0.7.0/client-swift/docs/examples/locale/get-currencies.md @@ -0,0 +1,14 @@ +/// Swift Appwrite SDK +/// Produced by Appwrite SDK Generator +/// + + +var client: Client = Client() + +client + .setEndpoint(endpoint: "https://[HOSTNAME_OR_IP]/v1") // Your API Endpoint + .setProject(value: "5df5acd0d48c2") // Your project ID + +var locale: Locale = Locale(client: client); + +var result = locale.getCurrencies(); diff --git a/app/sdks/0.7.0/client-swift/docs/examples/locale/get-languages.md b/app/sdks/0.7.0/client-swift/docs/examples/locale/get-languages.md new file mode 100644 index 0000000000..e8296dd7ca --- /dev/null +++ b/app/sdks/0.7.0/client-swift/docs/examples/locale/get-languages.md @@ -0,0 +1,14 @@ +/// Swift Appwrite SDK +/// Produced by Appwrite SDK Generator +/// + + +var client: Client = Client() + +client + .setEndpoint(endpoint: "https://[HOSTNAME_OR_IP]/v1") // Your API Endpoint + .setProject(value: "5df5acd0d48c2") // Your project ID + +var locale: Locale = Locale(client: client); + +var result = locale.getLanguages(); diff --git a/app/sdks/0.7.0/client-swift/docs/examples/locale/get.md b/app/sdks/0.7.0/client-swift/docs/examples/locale/get.md new file mode 100644 index 0000000000..5685e89440 --- /dev/null +++ b/app/sdks/0.7.0/client-swift/docs/examples/locale/get.md @@ -0,0 +1,14 @@ +/// Swift Appwrite SDK +/// Produced by Appwrite SDK Generator +/// + + +var client: Client = Client() + +client + .setEndpoint(endpoint: "https://[HOSTNAME_OR_IP]/v1") // Your API Endpoint + .setProject(value: "5df5acd0d48c2") // Your project ID + +var locale: Locale = Locale(client: client); + +var result = locale.get(); diff --git a/app/sdks/0.7.0/client-swift/docs/examples/storage/create-file.md b/app/sdks/0.7.0/client-swift/docs/examples/storage/create-file.md new file mode 100644 index 0000000000..b4e15a4ec1 --- /dev/null +++ b/app/sdks/0.7.0/client-swift/docs/examples/storage/create-file.md @@ -0,0 +1,14 @@ +/// Swift Appwrite SDK +/// Produced by Appwrite SDK Generator +/// + + +var client: Client = Client() + +client + .setEndpoint(endpoint: "https://[HOSTNAME_OR_IP]/v1") // Your API Endpoint + .setProject(value: "5df5acd0d48c2") // Your project ID + +var storage: Storage = Storage(client: client); + +var result = storage.createFile(_file: nil, _read: [], _write: []); diff --git a/app/sdks/0.7.0/client-swift/docs/examples/storage/delete-file.md b/app/sdks/0.7.0/client-swift/docs/examples/storage/delete-file.md new file mode 100644 index 0000000000..83152d9194 --- /dev/null +++ b/app/sdks/0.7.0/client-swift/docs/examples/storage/delete-file.md @@ -0,0 +1,14 @@ +/// Swift Appwrite SDK +/// Produced by Appwrite SDK Generator +/// + + +var client: Client = Client() + +client + .setEndpoint(endpoint: "https://[HOSTNAME_OR_IP]/v1") // Your API Endpoint + .setProject(value: "5df5acd0d48c2") // Your project ID + +var storage: Storage = Storage(client: client); + +var result = storage.deleteFile(_fileId: "[FILE_ID]"); diff --git a/app/sdks/0.7.0/client-swift/docs/examples/storage/get-file-download.md b/app/sdks/0.7.0/client-swift/docs/examples/storage/get-file-download.md new file mode 100644 index 0000000000..023f1a2243 --- /dev/null +++ b/app/sdks/0.7.0/client-swift/docs/examples/storage/get-file-download.md @@ -0,0 +1,14 @@ +/// Swift Appwrite SDK +/// Produced by Appwrite SDK Generator +/// + + +var client: Client = Client() + +client + .setEndpoint(endpoint: "https://[HOSTNAME_OR_IP]/v1") // Your API Endpoint + .setProject(value: "5df5acd0d48c2") // Your project ID + +var storage: Storage = Storage(client: client); + +var result = storage.getFileDownload(_fileId: "[FILE_ID]"); diff --git a/app/sdks/0.7.0/client-swift/docs/examples/storage/get-file-preview.md b/app/sdks/0.7.0/client-swift/docs/examples/storage/get-file-preview.md new file mode 100644 index 0000000000..faaacd8e8c --- /dev/null +++ b/app/sdks/0.7.0/client-swift/docs/examples/storage/get-file-preview.md @@ -0,0 +1,14 @@ +/// Swift Appwrite SDK +/// Produced by Appwrite SDK Generator +/// + + +var client: Client = Client() + +client + .setEndpoint(endpoint: "https://[HOSTNAME_OR_IP]/v1") // Your API Endpoint + .setProject(value: "5df5acd0d48c2") // Your project ID + +var storage: Storage = Storage(client: client); + +var result = storage.getFilePreview(_fileId: "[FILE_ID]"); diff --git a/app/sdks/0.7.0/client-swift/docs/examples/storage/get-file-view.md b/app/sdks/0.7.0/client-swift/docs/examples/storage/get-file-view.md new file mode 100644 index 0000000000..d480377b06 --- /dev/null +++ b/app/sdks/0.7.0/client-swift/docs/examples/storage/get-file-view.md @@ -0,0 +1,14 @@ +/// Swift Appwrite SDK +/// Produced by Appwrite SDK Generator +/// + + +var client: Client = Client() + +client + .setEndpoint(endpoint: "https://[HOSTNAME_OR_IP]/v1") // Your API Endpoint + .setProject(value: "5df5acd0d48c2") // Your project ID + +var storage: Storage = Storage(client: client); + +var result = storage.getFileView(_fileId: "[FILE_ID]"); diff --git a/app/sdks/0.7.0/client-swift/docs/examples/storage/get-file.md b/app/sdks/0.7.0/client-swift/docs/examples/storage/get-file.md new file mode 100644 index 0000000000..15bf5f7241 --- /dev/null +++ b/app/sdks/0.7.0/client-swift/docs/examples/storage/get-file.md @@ -0,0 +1,14 @@ +/// Swift Appwrite SDK +/// Produced by Appwrite SDK Generator +/// + + +var client: Client = Client() + +client + .setEndpoint(endpoint: "https://[HOSTNAME_OR_IP]/v1") // Your API Endpoint + .setProject(value: "5df5acd0d48c2") // Your project ID + +var storage: Storage = Storage(client: client); + +var result = storage.getFile(_fileId: "[FILE_ID]"); diff --git a/app/sdks/0.7.0/client-swift/docs/examples/storage/list-files.md b/app/sdks/0.7.0/client-swift/docs/examples/storage/list-files.md new file mode 100644 index 0000000000..bfce4293e5 --- /dev/null +++ b/app/sdks/0.7.0/client-swift/docs/examples/storage/list-files.md @@ -0,0 +1,14 @@ +/// Swift Appwrite SDK +/// Produced by Appwrite SDK Generator +/// + + +var client: Client = Client() + +client + .setEndpoint(endpoint: "https://[HOSTNAME_OR_IP]/v1") // Your API Endpoint + .setProject(value: "5df5acd0d48c2") // Your project ID + +var storage: Storage = Storage(client: client); + +var result = storage.listFiles(); diff --git a/app/sdks/0.7.0/client-swift/docs/examples/storage/update-file.md b/app/sdks/0.7.0/client-swift/docs/examples/storage/update-file.md new file mode 100644 index 0000000000..6a14e47773 --- /dev/null +++ b/app/sdks/0.7.0/client-swift/docs/examples/storage/update-file.md @@ -0,0 +1,14 @@ +/// Swift Appwrite SDK +/// Produced by Appwrite SDK Generator +/// + + +var client: Client = Client() + +client + .setEndpoint(endpoint: "https://[HOSTNAME_OR_IP]/v1") // Your API Endpoint + .setProject(value: "5df5acd0d48c2") // Your project ID + +var storage: Storage = Storage(client: client); + +var result = storage.updateFile(_fileId: "[FILE_ID]", _read: [], _write: []); diff --git a/app/sdks/0.7.0/client-swift/docs/examples/teams/create-membership.md b/app/sdks/0.7.0/client-swift/docs/examples/teams/create-membership.md new file mode 100644 index 0000000000..4af13ae6ee --- /dev/null +++ b/app/sdks/0.7.0/client-swift/docs/examples/teams/create-membership.md @@ -0,0 +1,14 @@ +/// Swift Appwrite SDK +/// Produced by Appwrite SDK Generator +/// + + +var client: Client = Client() + +client + .setEndpoint(endpoint: "https://[HOSTNAME_OR_IP]/v1") // Your API Endpoint + .setProject(value: "5df5acd0d48c2") // Your project ID + +var teams: Teams = Teams(client: client); + +var result = teams.createMembership(_teamId: "[TEAM_ID]", _email: "email@example.com", _roles: [], _url: "https://example.com"); diff --git a/app/sdks/0.7.0/client-swift/docs/examples/teams/create.md b/app/sdks/0.7.0/client-swift/docs/examples/teams/create.md new file mode 100644 index 0000000000..a5cf829019 --- /dev/null +++ b/app/sdks/0.7.0/client-swift/docs/examples/teams/create.md @@ -0,0 +1,14 @@ +/// Swift Appwrite SDK +/// Produced by Appwrite SDK Generator +/// + + +var client: Client = Client() + +client + .setEndpoint(endpoint: "https://[HOSTNAME_OR_IP]/v1") // Your API Endpoint + .setProject(value: "5df5acd0d48c2") // Your project ID + +var teams: Teams = Teams(client: client); + +var result = teams.create(_name: "[NAME]"); diff --git a/app/sdks/0.7.0/client-swift/docs/examples/teams/delete-membership.md b/app/sdks/0.7.0/client-swift/docs/examples/teams/delete-membership.md new file mode 100644 index 0000000000..19bf8b2f7d --- /dev/null +++ b/app/sdks/0.7.0/client-swift/docs/examples/teams/delete-membership.md @@ -0,0 +1,14 @@ +/// Swift Appwrite SDK +/// Produced by Appwrite SDK Generator +/// + + +var client: Client = Client() + +client + .setEndpoint(endpoint: "https://[HOSTNAME_OR_IP]/v1") // Your API Endpoint + .setProject(value: "5df5acd0d48c2") // Your project ID + +var teams: Teams = Teams(client: client); + +var result = teams.deleteMembership(_teamId: "[TEAM_ID]", _inviteId: "[INVITE_ID]"); diff --git a/app/sdks/0.7.0/client-swift/docs/examples/teams/delete.md b/app/sdks/0.7.0/client-swift/docs/examples/teams/delete.md new file mode 100644 index 0000000000..50cc25892b --- /dev/null +++ b/app/sdks/0.7.0/client-swift/docs/examples/teams/delete.md @@ -0,0 +1,14 @@ +/// Swift Appwrite SDK +/// Produced by Appwrite SDK Generator +/// + + +var client: Client = Client() + +client + .setEndpoint(endpoint: "https://[HOSTNAME_OR_IP]/v1") // Your API Endpoint + .setProject(value: "5df5acd0d48c2") // Your project ID + +var teams: Teams = Teams(client: client); + +var result = teams.delete(_teamId: "[TEAM_ID]"); diff --git a/app/sdks/0.7.0/client-swift/docs/examples/teams/get-memberships.md b/app/sdks/0.7.0/client-swift/docs/examples/teams/get-memberships.md new file mode 100644 index 0000000000..089ea8f717 --- /dev/null +++ b/app/sdks/0.7.0/client-swift/docs/examples/teams/get-memberships.md @@ -0,0 +1,14 @@ +/// Swift Appwrite SDK +/// Produced by Appwrite SDK Generator +/// + + +var client: Client = Client() + +client + .setEndpoint(endpoint: "https://[HOSTNAME_OR_IP]/v1") // Your API Endpoint + .setProject(value: "5df5acd0d48c2") // Your project ID + +var teams: Teams = Teams(client: client); + +var result = teams.getMemberships(_teamId: "[TEAM_ID]"); diff --git a/app/sdks/0.7.0/client-swift/docs/examples/teams/get.md b/app/sdks/0.7.0/client-swift/docs/examples/teams/get.md new file mode 100644 index 0000000000..25bf212a45 --- /dev/null +++ b/app/sdks/0.7.0/client-swift/docs/examples/teams/get.md @@ -0,0 +1,14 @@ +/// Swift Appwrite SDK +/// Produced by Appwrite SDK Generator +/// + + +var client: Client = Client() + +client + .setEndpoint(endpoint: "https://[HOSTNAME_OR_IP]/v1") // Your API Endpoint + .setProject(value: "5df5acd0d48c2") // Your project ID + +var teams: Teams = Teams(client: client); + +var result = teams.get(_teamId: "[TEAM_ID]"); diff --git a/app/sdks/0.7.0/client-swift/docs/examples/teams/list.md b/app/sdks/0.7.0/client-swift/docs/examples/teams/list.md new file mode 100644 index 0000000000..8333d1fe43 --- /dev/null +++ b/app/sdks/0.7.0/client-swift/docs/examples/teams/list.md @@ -0,0 +1,14 @@ +/// Swift Appwrite SDK +/// Produced by Appwrite SDK Generator +/// + + +var client: Client = Client() + +client + .setEndpoint(endpoint: "https://[HOSTNAME_OR_IP]/v1") // Your API Endpoint + .setProject(value: "5df5acd0d48c2") // Your project ID + +var teams: Teams = Teams(client: client); + +var result = teams.list(); diff --git a/app/sdks/0.7.0/client-swift/docs/examples/teams/update-membership-status.md b/app/sdks/0.7.0/client-swift/docs/examples/teams/update-membership-status.md new file mode 100644 index 0000000000..ae72e4c799 --- /dev/null +++ b/app/sdks/0.7.0/client-swift/docs/examples/teams/update-membership-status.md @@ -0,0 +1,14 @@ +/// Swift Appwrite SDK +/// Produced by Appwrite SDK Generator +/// + + +var client: Client = Client() + +client + .setEndpoint(endpoint: "https://[HOSTNAME_OR_IP]/v1") // Your API Endpoint + .setProject(value: "5df5acd0d48c2") // Your project ID + +var teams: Teams = Teams(client: client); + +var result = teams.updateMembershipStatus(_teamId: "[TEAM_ID]", _inviteId: "[INVITE_ID]", _userId: "[USER_ID]", _secret: "[SECRET]"); diff --git a/app/sdks/0.7.0/client-swift/docs/examples/teams/update.md b/app/sdks/0.7.0/client-swift/docs/examples/teams/update.md new file mode 100644 index 0000000000..fafd98b881 --- /dev/null +++ b/app/sdks/0.7.0/client-swift/docs/examples/teams/update.md @@ -0,0 +1,14 @@ +/// Swift Appwrite SDK +/// Produced by Appwrite SDK Generator +/// + + +var client: Client = Client() + +client + .setEndpoint(endpoint: "https://[HOSTNAME_OR_IP]/v1") // Your API Endpoint + .setProject(value: "5df5acd0d48c2") // Your project ID + +var teams: Teams = Teams(client: client); + +var result = teams.update(_teamId: "[TEAM_ID]", _name: "[NAME]"); diff --git a/app/sdks/0.7.0/client-swift/docs/locale.md b/app/sdks/0.7.0/client-swift/docs/locale.md new file mode 100644 index 0000000000..efe5a690e2 --- /dev/null +++ b/app/sdks/0.7.0/client-swift/docs/locale.md @@ -0,0 +1,64 @@ +/// Swift Appwrite SDK +/// Produced by Appwrite SDK Generator +/// + +# Locale Service + +## Get User Locale + +```http request +GET https://appwrite.io/v1/locale +``` + +** Get the current user location based on IP. Returns an object with user country code, country name, continent name, continent code, ip address and suggested currency. You can use the locale header to get the data in a supported language. + +([IP Geolocation by DB-IP](https://db-ip.com)) ** + +## List Continents + +```http request +GET https://appwrite.io/v1/locale/continents +``` + +** List of all continents. You can use the locale header to get the data in a supported language. ** + +## List Countries + +```http request +GET https://appwrite.io/v1/locale/countries +``` + +** List of all countries. You can use the locale header to get the data in a supported language. ** + +## List EU Countries + +```http request +GET https://appwrite.io/v1/locale/countries/eu +``` + +** List of all countries that are currently members of the EU. You can use the locale header to get the data in a supported language. ** + +## List Countries Phone Codes + +```http request +GET https://appwrite.io/v1/locale/countries/phones +``` + +** List of all countries phone codes. You can use the locale header to get the data in a supported language. ** + +## List Currencies + +```http request +GET https://appwrite.io/v1/locale/currencies +``` + +** List of all currencies, including currency symbol, name, plural, and decimal digits for all major and minor currencies. You can use the locale header to get the data in a supported language. ** + +## List Languages + +```http request +GET https://appwrite.io/v1/locale/languages +``` + +** List of all languages classified by ISO 639-1 including 2-letter code, name in English, and name in the respective language. ** + diff --git a/app/sdks/0.7.0/client-swift/docs/storage.md b/app/sdks/0.7.0/client-swift/docs/storage.md new file mode 100644 index 0000000000..f902ebd2e9 --- /dev/null +++ b/app/sdks/0.7.0/client-swift/docs/storage.md @@ -0,0 +1,131 @@ +/// Swift Appwrite SDK +/// Produced by Appwrite SDK Generator +/// + +# Storage Service + +## List Files + +```http request +GET https://appwrite.io/v1/storage/files +``` + +** Get a list of all the user files. You can use the query params to filter your results. On admin mode, this endpoint will return a list of all of the project files. [Learn more about different API modes](/docs/admin). ** + +### Parameters + +| Field Name | Type | Description | Default | +| --- | --- | --- | --- | +| search | string | Search term to filter your list results. | | +| limit | integer | Results limit value. By default will return maximum 25 results. Maximum of 100 results allowed per request. | 25 | +| offset | integer | Results offset. The default value is 0. Use this param to manage pagination. | 0 | +| orderType | string | Order result by ASC or DESC order. | ASC | + +## Create File + +```http request +POST https://appwrite.io/v1/storage/files +``` + +** Create a new file. The user who creates the file will automatically be assigned to read and write access unless he has passed custom values for read and write arguments. ** + +### Parameters + +| Field Name | Type | Description | Default | +| --- | --- | --- | --- | +| file | file | Binary file. | | +| read | array | An array of strings with read permissions. By default no user is granted with any read permissions. [learn more about permissions](/docs/permissions) and get a full list of available permissions. | | +| write | array | An array of strings with write permissions. By default no user is granted with any write permissions. [learn more about permissions](/docs/permissions) and get a full list of available permissions. | | + +## Get File + +```http request +GET https://appwrite.io/v1/storage/files/{fileId} +``` + +** Get file by its unique ID. This endpoint response returns a JSON object with the file metadata. ** + +### Parameters + +| Field Name | Type | Description | Default | +| --- | --- | --- | --- | +| fileId | string | **Required** File unique ID. | | + +## Update File + +```http request +PUT https://appwrite.io/v1/storage/files/{fileId} +``` + +** Update file by its unique ID. Only users with write permissions have access to update this resource. ** + +### Parameters + +| Field Name | Type | Description | Default | +| --- | --- | --- | --- | +| fileId | string | **Required** File unique ID. | | +| read | array | An array of strings with read permissions. By default no user is granted with any read permissions. [learn more about permissions](/docs/permissions) and get a full list of available permissions. | | +| write | array | An array of strings with write permissions. By default no user is granted with any write permissions. [learn more about permissions](/docs/permissions) and get a full list of available permissions. | | + +## Delete File + +```http request +DELETE https://appwrite.io/v1/storage/files/{fileId} +``` + +** Delete a file by its unique ID. Only users with write permissions have access to delete this resource. ** + +### Parameters + +| Field Name | Type | Description | Default | +| --- | --- | --- | --- | +| fileId | string | **Required** File unique ID. | | + +## Get File for Download + +```http request +GET https://appwrite.io/v1/storage/files/{fileId}/download +``` + +** Get file content by its unique ID. The endpoint response return with a 'Content-Disposition: attachment' header that tells the browser to start downloading the file to user downloads directory. ** + +### Parameters + +| Field Name | Type | Description | Default | +| --- | --- | --- | --- | +| fileId | string | **Required** File unique ID. | | + +## Get File Preview + +```http request +GET https://appwrite.io/v1/storage/files/{fileId}/preview +``` + +** Get a file preview image. Currently, this method supports preview for image files (jpg, png, and gif), other supported formats, like pdf, docs, slides, and spreadsheets, will return the file icon image. You can also pass query string arguments for cutting and resizing your preview image. ** + +### Parameters + +| Field Name | Type | Description | Default | +| --- | --- | --- | --- | +| fileId | string | **Required** File unique ID | | +| width | integer | Resize preview image width, Pass an integer between 0 to 4000. | 0 | +| height | integer | Resize preview image height, Pass an integer between 0 to 4000. | 0 | +| quality | integer | Preview image quality. Pass an integer between 0 to 100. Defaults to 100. | 100 | +| background | string | Preview image background color. Only works with transparent images (png). Use a valid HEX color, no # is needed for prefix. | | +| output | string | Output format type (jpeg, jpg, png, gif and webp). | | + +## Get File for View + +```http request +GET https://appwrite.io/v1/storage/files/{fileId}/view +``` + +** Get file content by its unique ID. This endpoint is similar to the download method but returns with no 'Content-Disposition: attachment' header. ** + +### Parameters + +| Field Name | Type | Description | Default | +| --- | --- | --- | --- | +| fileId | string | **Required** File unique ID. | | +| as | string | Choose a file format to convert your file to. Currently you can only convert word and pdf files to pdf or txt. This option is currently experimental only, use at your own risk. | | + diff --git a/app/sdks/0.7.0/client-swift/docs/teams.md b/app/sdks/0.7.0/client-swift/docs/teams.md new file mode 100644 index 0000000000..7f8b4238a7 --- /dev/null +++ b/app/sdks/0.7.0/client-swift/docs/teams.md @@ -0,0 +1,153 @@ +/// Swift Appwrite SDK +/// Produced by Appwrite SDK Generator +/// + +# Teams Service + +## List Teams + +```http request +GET https://appwrite.io/v1/teams +``` + +** Get a list of all the current user teams. You can use the query params to filter your results. On admin mode, this endpoint will return a list of all of the project teams. [Learn more about different API modes](/docs/admin). ** + +### Parameters + +| Field Name | Type | Description | Default | +| --- | --- | --- | --- | +| search | string | Search term to filter your list results. | | +| limit | integer | Results limit value. By default will return maximum 25 results. Maximum of 100 results allowed per request. | 25 | +| offset | integer | Results offset. The default value is 0. Use this param to manage pagination. | 0 | +| orderType | string | Order result by ASC or DESC order. | ASC | + +## Create Team + +```http request +POST https://appwrite.io/v1/teams +``` + +** Create a new team. The user who creates the team will automatically be assigned as the owner of the team. The team owner can invite new members, who will be able add new owners and update or delete the team from your project. ** + +### Parameters + +| Field Name | Type | Description | Default | +| --- | --- | --- | --- | +| name | string | Team name. | | +| roles | array | Array of strings. Use this param to set the roles in the team for the user who created it. The default role is **owner**. A role can be any string. Learn more about [roles and permissions](/docs/permissions). | ["owner"] | + +## Get Team + +```http request +GET https://appwrite.io/v1/teams/{teamId} +``` + +** Get team by its unique ID. All team members have read access for this resource. ** + +### Parameters + +| Field Name | Type | Description | Default | +| --- | --- | --- | --- | +| teamId | string | **Required** Team unique ID. | | + +## Update Team + +```http request +PUT https://appwrite.io/v1/teams/{teamId} +``` + +** Update team by its unique ID. Only team owners have write access for this resource. ** + +### Parameters + +| Field Name | Type | Description | Default | +| --- | --- | --- | --- | +| teamId | string | **Required** Team unique ID. | | +| name | string | Team name. | | + +## Delete Team + +```http request +DELETE https://appwrite.io/v1/teams/{teamId} +``` + +** Delete team by its unique ID. Only team owners have write access for this resource. ** + +### Parameters + +| Field Name | Type | Description | Default | +| --- | --- | --- | --- | +| teamId | string | **Required** Team unique ID. | | + +## Get Team Memberships + +```http request +GET https://appwrite.io/v1/teams/{teamId}/memberships +``` + +** Get team members by the team unique ID. All team members have read access for this list of resources. ** + +### Parameters + +| Field Name | Type | Description | Default | +| --- | --- | --- | --- | +| teamId | string | **Required** Team unique ID. | | +| search | string | Search term to filter your list results. | | +| limit | integer | Results limit value. By default will return maximum 25 results. Maximum of 100 results allowed per request. | 25 | +| offset | integer | Results offset. The default value is 0. Use this param to manage pagination. | 0 | +| orderType | string | Order result by ASC or DESC order. | ASC | + +## Create Team Membership + +```http request +POST https://appwrite.io/v1/teams/{teamId}/memberships +``` + +** Use this endpoint to invite a new member to join your team. An email with a link to join the team will be sent to the new member email address if the member doesn't exist in the project it will be created automatically. + +Use the 'URL' parameter to redirect the user from the invitation email back to your app. When the user is redirected, use the [Update Team Membership Status](/docs/client/teams#updateMembershipStatus) endpoint to allow the user to accept the invitation to the team. + +Please note that in order to avoid a [Redirect Attacks](https://github.com/OWASP/CheatSheetSeries/blob/master/cheatsheets/Unvalidated_Redirects_and_Forwards_Cheat_Sheet.md) the only valid redirect URL's are the once from domains you have set when added your platforms in the console interface. ** + +### Parameters + +| Field Name | Type | Description | Default | +| --- | --- | --- | --- | +| teamId | string | **Required** Team unique ID. | | +| email | string | New team member email. | | +| name | string | New team member name. | | +| roles | array | Array of strings. Use this param to set the user roles in the team. A role can be any string. Learn more about [roles and permissions](/docs/permissions). | | +| url | string | URL to redirect the user back to your app from the invitation email. Only URLs from hostnames in your project platform list are allowed. This requirement helps to prevent an [open redirect](https://cheatsheetseries.owasp.org/cheatsheets/Unvalidated_Redirects_and_Forwards_Cheat_Sheet.html) attack against your project API. | | + +## Delete Team Membership + +```http request +DELETE https://appwrite.io/v1/teams/{teamId}/memberships/{inviteId} +``` + +** This endpoint allows a user to leave a team or for a team owner to delete the membership of any other team member. You can also use this endpoint to delete a user membership even if he didn't accept it. ** + +### Parameters + +| Field Name | Type | Description | Default | +| --- | --- | --- | --- | +| teamId | string | **Required** Team unique ID. | | +| inviteId | string | **Required** Invite unique ID. | | + +## Update Team Membership Status + +```http request +PATCH https://appwrite.io/v1/teams/{teamId}/memberships/{inviteId}/status +``` + +** Use this endpoint to allow a user to accept an invitation to join a team after he is being redirected back to your app from the invitation email he was sent. ** + +### Parameters + +| Field Name | Type | Description | Default | +| --- | --- | --- | --- | +| teamId | string | **Required** Team unique ID. | | +| inviteId | string | **Required** Invite unique ID. | | +| userId | string | User unique ID. | | +| secret | string | Secret key. | | + diff --git a/app/sdks/0.7.0/client-web/CHANGELOG.md b/app/sdks/0.7.0/client-web/CHANGELOG.md new file mode 100644 index 0000000000..fa4d35e687 --- /dev/null +++ b/app/sdks/0.7.0/client-web/CHANGELOG.md @@ -0,0 +1 @@ +# Change Log \ No newline at end of file diff --git a/app/sdks/0.7.0/client-web/LICENSE b/app/sdks/0.7.0/client-web/LICENSE new file mode 100644 index 0000000000..fc7c051a91 --- /dev/null +++ b/app/sdks/0.7.0/client-web/LICENSE @@ -0,0 +1,12 @@ +Copyright (c) 2019 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: + + 1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. + + 2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. + + 3. Neither the name Appwrite nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. \ No newline at end of file diff --git a/app/sdks/0.7.0/client-web/README.md b/app/sdks/0.7.0/client-web/README.md new file mode 100644 index 0000000000..41e939b017 --- /dev/null +++ b/app/sdks/0.7.0/client-web/README.md @@ -0,0 +1,44 @@ +# Appwrite Web SDK + +![License](https://img.shields.io/github/license/appwrite/sdk-for-js.svg?v=1) +![Version](https://img.shields.io/badge/api%20version-0.7.0-blue.svg?v=1) + +Appwrite is an open-source backend as a service server that abstract and simplify complex and repetitive development tasks behind a very simple to use REST API. Appwrite aims to help you develop your apps faster and in a more secure way. + Use the Web SDK to integrate your app with the Appwrite server to easily start interacting with all of Appwrite backend APIs and tools. + For full API documentation and tutorials go to [https://appwrite.io/docs](https://appwrite.io/docs) + +![Appwrite](https://appwrite.io/images/github.png) + +## Installation + +### NPM + +To install via [NPM](https://www.npmjs.com/): + +```bash +npm install appwrite --save +``` + +If you're using a bundler (like [Browserify](http://browserify.org/) or [webpack](https://webpack.js.org/)), you can import the Appwrite module when you need it: + +```js +import * as Appwrite from "appwrite"; +``` + +### CDN + +To install with a CDN (content delivery network) add the following scripts to the bottom of your tag, but before you use any Appwrite services: + +```html + +``` + + + +## Contribution + +This library is auto-generated by Appwrite custom [SDK Generator](https://github.com/appwrite/sdk-generator). To learn more about how you can help us improve this SDK, please check the [contribution guide](https://github.com/appwrite/sdk-generator/blob/master/CONTRIBUTING.md) before sending a pull-request. + +## License + +Please see the [BSD-3-Clause license](https://raw.githubusercontent.com/appwrite/appwrite/master/LICENSE) file for more information. \ No newline at end of file diff --git a/app/sdks/0.7.0/client-web/docs/examples/account/create-o-auth2session.md b/app/sdks/0.7.0/client-web/docs/examples/account/create-o-auth2session.md new file mode 100644 index 0000000000..25b02e632e --- /dev/null +++ b/app/sdks/0.7.0/client-web/docs/examples/account/create-o-auth2session.md @@ -0,0 +1,10 @@ +let sdk = new Appwrite(); + +sdk + .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID +; + +// Go to OAuth provider login page +sdk.account.createOAuth2Session('amazon'); + diff --git a/app/sdks/0.7.0/client-web/docs/examples/account/create-recovery.md b/app/sdks/0.7.0/client-web/docs/examples/account/create-recovery.md new file mode 100644 index 0000000000..72130f4de4 --- /dev/null +++ b/app/sdks/0.7.0/client-web/docs/examples/account/create-recovery.md @@ -0,0 +1,14 @@ +let sdk = new Appwrite(); + +sdk + .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID +; + +let promise = sdk.account.createRecovery('email@example.com', 'https://example.com'); + +promise.then(function (response) { + console.log(response); // Success +}, function (error) { + console.log(error); // Failure +}); \ No newline at end of file diff --git a/app/sdks/0.7.0/client-web/docs/examples/account/create-session.md b/app/sdks/0.7.0/client-web/docs/examples/account/create-session.md new file mode 100644 index 0000000000..4a7682c13d --- /dev/null +++ b/app/sdks/0.7.0/client-web/docs/examples/account/create-session.md @@ -0,0 +1,14 @@ +let sdk = new Appwrite(); + +sdk + .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID +; + +let promise = sdk.account.createSession('email@example.com', 'password'); + +promise.then(function (response) { + console.log(response); // Success +}, function (error) { + console.log(error); // Failure +}); \ No newline at end of file diff --git a/app/sdks/0.7.0/client-web/docs/examples/account/create-verification.md b/app/sdks/0.7.0/client-web/docs/examples/account/create-verification.md new file mode 100644 index 0000000000..7903384a9f --- /dev/null +++ b/app/sdks/0.7.0/client-web/docs/examples/account/create-verification.md @@ -0,0 +1,14 @@ +let sdk = new Appwrite(); + +sdk + .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID +; + +let promise = sdk.account.createVerification('https://example.com'); + +promise.then(function (response) { + console.log(response); // Success +}, function (error) { + console.log(error); // Failure +}); \ No newline at end of file diff --git a/app/sdks/0.7.0/client-web/docs/examples/account/create.md b/app/sdks/0.7.0/client-web/docs/examples/account/create.md new file mode 100644 index 0000000000..c9ce798b6a --- /dev/null +++ b/app/sdks/0.7.0/client-web/docs/examples/account/create.md @@ -0,0 +1,14 @@ +let sdk = new Appwrite(); + +sdk + .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID +; + +let promise = sdk.account.create('email@example.com', 'password'); + +promise.then(function (response) { + console.log(response); // Success +}, function (error) { + console.log(error); // Failure +}); \ No newline at end of file diff --git a/app/sdks/0.7.0/client-web/docs/examples/account/delete-session.md b/app/sdks/0.7.0/client-web/docs/examples/account/delete-session.md new file mode 100644 index 0000000000..581e5d132d --- /dev/null +++ b/app/sdks/0.7.0/client-web/docs/examples/account/delete-session.md @@ -0,0 +1,14 @@ +let sdk = new Appwrite(); + +sdk + .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID +; + +let promise = sdk.account.deleteSession('[SESSION_ID]'); + +promise.then(function (response) { + console.log(response); // Success +}, function (error) { + console.log(error); // Failure +}); \ No newline at end of file diff --git a/app/sdks/0.7.0/client-web/docs/examples/account/delete-sessions.md b/app/sdks/0.7.0/client-web/docs/examples/account/delete-sessions.md new file mode 100644 index 0000000000..d037673eb3 --- /dev/null +++ b/app/sdks/0.7.0/client-web/docs/examples/account/delete-sessions.md @@ -0,0 +1,14 @@ +let sdk = new Appwrite(); + +sdk + .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID +; + +let promise = sdk.account.deleteSessions(); + +promise.then(function (response) { + console.log(response); // Success +}, function (error) { + console.log(error); // Failure +}); \ No newline at end of file diff --git a/app/sdks/0.7.0/client-web/docs/examples/account/delete.md b/app/sdks/0.7.0/client-web/docs/examples/account/delete.md new file mode 100644 index 0000000000..d952d77d7a --- /dev/null +++ b/app/sdks/0.7.0/client-web/docs/examples/account/delete.md @@ -0,0 +1,14 @@ +let sdk = new Appwrite(); + +sdk + .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID +; + +let promise = sdk.account.delete(); + +promise.then(function (response) { + console.log(response); // Success +}, function (error) { + console.log(error); // Failure +}); \ No newline at end of file diff --git a/app/sdks/0.7.0/client-web/docs/examples/account/get-logs.md b/app/sdks/0.7.0/client-web/docs/examples/account/get-logs.md new file mode 100644 index 0000000000..c53e0446e9 --- /dev/null +++ b/app/sdks/0.7.0/client-web/docs/examples/account/get-logs.md @@ -0,0 +1,14 @@ +let sdk = new Appwrite(); + +sdk + .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID +; + +let promise = sdk.account.getLogs(); + +promise.then(function (response) { + console.log(response); // Success +}, function (error) { + console.log(error); // Failure +}); \ No newline at end of file diff --git a/app/sdks/0.7.0/client-web/docs/examples/account/get-prefs.md b/app/sdks/0.7.0/client-web/docs/examples/account/get-prefs.md new file mode 100644 index 0000000000..75835e37fb --- /dev/null +++ b/app/sdks/0.7.0/client-web/docs/examples/account/get-prefs.md @@ -0,0 +1,14 @@ +let sdk = new Appwrite(); + +sdk + .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID +; + +let promise = sdk.account.getPrefs(); + +promise.then(function (response) { + console.log(response); // Success +}, function (error) { + console.log(error); // Failure +}); \ No newline at end of file diff --git a/app/sdks/0.7.0/client-web/docs/examples/account/get-sessions.md b/app/sdks/0.7.0/client-web/docs/examples/account/get-sessions.md new file mode 100644 index 0000000000..b4434de336 --- /dev/null +++ b/app/sdks/0.7.0/client-web/docs/examples/account/get-sessions.md @@ -0,0 +1,14 @@ +let sdk = new Appwrite(); + +sdk + .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID +; + +let promise = sdk.account.getSessions(); + +promise.then(function (response) { + console.log(response); // Success +}, function (error) { + console.log(error); // Failure +}); \ No newline at end of file diff --git a/app/sdks/0.7.0/client-web/docs/examples/account/get.md b/app/sdks/0.7.0/client-web/docs/examples/account/get.md new file mode 100644 index 0000000000..f0184a8513 --- /dev/null +++ b/app/sdks/0.7.0/client-web/docs/examples/account/get.md @@ -0,0 +1,14 @@ +let sdk = new Appwrite(); + +sdk + .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID +; + +let promise = sdk.account.get(); + +promise.then(function (response) { + console.log(response); // Success +}, function (error) { + console.log(error); // Failure +}); \ No newline at end of file diff --git a/app/sdks/0.7.0/client-web/docs/examples/account/update-email.md b/app/sdks/0.7.0/client-web/docs/examples/account/update-email.md new file mode 100644 index 0000000000..f48fed78bc --- /dev/null +++ b/app/sdks/0.7.0/client-web/docs/examples/account/update-email.md @@ -0,0 +1,14 @@ +let sdk = new Appwrite(); + +sdk + .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID +; + +let promise = sdk.account.updateEmail('email@example.com', 'password'); + +promise.then(function (response) { + console.log(response); // Success +}, function (error) { + console.log(error); // Failure +}); \ No newline at end of file diff --git a/app/sdks/0.7.0/client-web/docs/examples/account/update-name.md b/app/sdks/0.7.0/client-web/docs/examples/account/update-name.md new file mode 100644 index 0000000000..e03e72c4b2 --- /dev/null +++ b/app/sdks/0.7.0/client-web/docs/examples/account/update-name.md @@ -0,0 +1,14 @@ +let sdk = new Appwrite(); + +sdk + .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID +; + +let promise = sdk.account.updateName('[NAME]'); + +promise.then(function (response) { + console.log(response); // Success +}, function (error) { + console.log(error); // Failure +}); \ No newline at end of file diff --git a/app/sdks/0.7.0/client-web/docs/examples/account/update-password.md b/app/sdks/0.7.0/client-web/docs/examples/account/update-password.md new file mode 100644 index 0000000000..22539f3f64 --- /dev/null +++ b/app/sdks/0.7.0/client-web/docs/examples/account/update-password.md @@ -0,0 +1,14 @@ +let sdk = new Appwrite(); + +sdk + .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID +; + +let promise = sdk.account.updatePassword('password', 'password'); + +promise.then(function (response) { + console.log(response); // Success +}, function (error) { + console.log(error); // Failure +}); \ No newline at end of file diff --git a/app/sdks/0.7.0/client-web/docs/examples/account/update-prefs.md b/app/sdks/0.7.0/client-web/docs/examples/account/update-prefs.md new file mode 100644 index 0000000000..b2d4ff175e --- /dev/null +++ b/app/sdks/0.7.0/client-web/docs/examples/account/update-prefs.md @@ -0,0 +1,14 @@ +let sdk = new Appwrite(); + +sdk + .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID +; + +let promise = sdk.account.updatePrefs({}); + +promise.then(function (response) { + console.log(response); // Success +}, function (error) { + console.log(error); // Failure +}); \ No newline at end of file diff --git a/app/sdks/0.7.0/client-web/docs/examples/account/update-recovery.md b/app/sdks/0.7.0/client-web/docs/examples/account/update-recovery.md new file mode 100644 index 0000000000..33cf1b63c9 --- /dev/null +++ b/app/sdks/0.7.0/client-web/docs/examples/account/update-recovery.md @@ -0,0 +1,14 @@ +let sdk = new Appwrite(); + +sdk + .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID +; + +let promise = sdk.account.updateRecovery('[USER_ID]', '[SECRET]', 'password', 'password'); + +promise.then(function (response) { + console.log(response); // Success +}, function (error) { + console.log(error); // Failure +}); \ No newline at end of file diff --git a/app/sdks/0.7.0/client-web/docs/examples/account/update-verification.md b/app/sdks/0.7.0/client-web/docs/examples/account/update-verification.md new file mode 100644 index 0000000000..a80e125e30 --- /dev/null +++ b/app/sdks/0.7.0/client-web/docs/examples/account/update-verification.md @@ -0,0 +1,14 @@ +let sdk = new Appwrite(); + +sdk + .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID +; + +let promise = sdk.account.updateVerification('[USER_ID]', '[SECRET]'); + +promise.then(function (response) { + console.log(response); // Success +}, function (error) { + console.log(error); // Failure +}); \ No newline at end of file diff --git a/app/sdks/0.7.0/client-web/docs/examples/avatars/get-browser.md b/app/sdks/0.7.0/client-web/docs/examples/avatars/get-browser.md new file mode 100644 index 0000000000..0855209f58 --- /dev/null +++ b/app/sdks/0.7.0/client-web/docs/examples/avatars/get-browser.md @@ -0,0 +1,10 @@ +let sdk = new Appwrite(); + +sdk + .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID +; + +let result = sdk.avatars.getBrowser('aa'); + +console.log(result); // Resource URL \ No newline at end of file diff --git a/app/sdks/0.7.0/client-web/docs/examples/avatars/get-credit-card.md b/app/sdks/0.7.0/client-web/docs/examples/avatars/get-credit-card.md new file mode 100644 index 0000000000..1aa595bd65 --- /dev/null +++ b/app/sdks/0.7.0/client-web/docs/examples/avatars/get-credit-card.md @@ -0,0 +1,10 @@ +let sdk = new Appwrite(); + +sdk + .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID +; + +let result = sdk.avatars.getCreditCard('amex'); + +console.log(result); // Resource URL \ No newline at end of file diff --git a/app/sdks/0.7.0/client-web/docs/examples/avatars/get-favicon.md b/app/sdks/0.7.0/client-web/docs/examples/avatars/get-favicon.md new file mode 100644 index 0000000000..a945e50bb2 --- /dev/null +++ b/app/sdks/0.7.0/client-web/docs/examples/avatars/get-favicon.md @@ -0,0 +1,10 @@ +let sdk = new Appwrite(); + +sdk + .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID +; + +let result = sdk.avatars.getFavicon('https://example.com'); + +console.log(result); // Resource URL \ No newline at end of file diff --git a/app/sdks/0.7.0/client-web/docs/examples/avatars/get-flag.md b/app/sdks/0.7.0/client-web/docs/examples/avatars/get-flag.md new file mode 100644 index 0000000000..222b388afc --- /dev/null +++ b/app/sdks/0.7.0/client-web/docs/examples/avatars/get-flag.md @@ -0,0 +1,10 @@ +let sdk = new Appwrite(); + +sdk + .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID +; + +let result = sdk.avatars.getFlag('af'); + +console.log(result); // Resource URL \ No newline at end of file diff --git a/app/sdks/0.7.0/client-web/docs/examples/avatars/get-image.md b/app/sdks/0.7.0/client-web/docs/examples/avatars/get-image.md new file mode 100644 index 0000000000..3f15981c71 --- /dev/null +++ b/app/sdks/0.7.0/client-web/docs/examples/avatars/get-image.md @@ -0,0 +1,10 @@ +let sdk = new Appwrite(); + +sdk + .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID +; + +let result = sdk.avatars.getImage('https://example.com'); + +console.log(result); // Resource URL \ No newline at end of file diff --git a/app/sdks/0.7.0/client-web/docs/examples/avatars/get-initials.md b/app/sdks/0.7.0/client-web/docs/examples/avatars/get-initials.md new file mode 100644 index 0000000000..ef04988e2d --- /dev/null +++ b/app/sdks/0.7.0/client-web/docs/examples/avatars/get-initials.md @@ -0,0 +1,10 @@ +let sdk = new Appwrite(); + +sdk + .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID +; + +let result = sdk.avatars.getInitials(); + +console.log(result); // Resource URL \ No newline at end of file diff --git a/app/sdks/0.7.0/client-web/docs/examples/avatars/get-q-r.md b/app/sdks/0.7.0/client-web/docs/examples/avatars/get-q-r.md new file mode 100644 index 0000000000..9d9ee3fea2 --- /dev/null +++ b/app/sdks/0.7.0/client-web/docs/examples/avatars/get-q-r.md @@ -0,0 +1,10 @@ +let sdk = new Appwrite(); + +sdk + .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID +; + +let result = sdk.avatars.getQR('[TEXT]'); + +console.log(result); // Resource URL \ No newline at end of file diff --git a/app/sdks/0.7.0/client-web/docs/examples/database/create-document.md b/app/sdks/0.7.0/client-web/docs/examples/database/create-document.md new file mode 100644 index 0000000000..e04f73f73e --- /dev/null +++ b/app/sdks/0.7.0/client-web/docs/examples/database/create-document.md @@ -0,0 +1,14 @@ +let sdk = new Appwrite(); + +sdk + .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID +; + +let promise = sdk.database.createDocument('[COLLECTION_ID]', {}, [], []); + +promise.then(function (response) { + console.log(response); // Success +}, function (error) { + console.log(error); // Failure +}); \ No newline at end of file diff --git a/app/sdks/0.7.0/client-web/docs/examples/database/delete-document.md b/app/sdks/0.7.0/client-web/docs/examples/database/delete-document.md new file mode 100644 index 0000000000..79799b6907 --- /dev/null +++ b/app/sdks/0.7.0/client-web/docs/examples/database/delete-document.md @@ -0,0 +1,14 @@ +let sdk = new Appwrite(); + +sdk + .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID +; + +let promise = sdk.database.deleteDocument('[COLLECTION_ID]', '[DOCUMENT_ID]'); + +promise.then(function (response) { + console.log(response); // Success +}, function (error) { + console.log(error); // Failure +}); \ No newline at end of file diff --git a/app/sdks/0.7.0/client-web/docs/examples/database/get-document.md b/app/sdks/0.7.0/client-web/docs/examples/database/get-document.md new file mode 100644 index 0000000000..b9605dccc6 --- /dev/null +++ b/app/sdks/0.7.0/client-web/docs/examples/database/get-document.md @@ -0,0 +1,14 @@ +let sdk = new Appwrite(); + +sdk + .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID +; + +let promise = sdk.database.getDocument('[COLLECTION_ID]', '[DOCUMENT_ID]'); + +promise.then(function (response) { + console.log(response); // Success +}, function (error) { + console.log(error); // Failure +}); \ No newline at end of file diff --git a/app/sdks/0.7.0/client-web/docs/examples/database/list-documents.md b/app/sdks/0.7.0/client-web/docs/examples/database/list-documents.md new file mode 100644 index 0000000000..14f8a423a1 --- /dev/null +++ b/app/sdks/0.7.0/client-web/docs/examples/database/list-documents.md @@ -0,0 +1,14 @@ +let sdk = new Appwrite(); + +sdk + .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID +; + +let promise = sdk.database.listDocuments('[COLLECTION_ID]'); + +promise.then(function (response) { + console.log(response); // Success +}, function (error) { + console.log(error); // Failure +}); \ No newline at end of file diff --git a/app/sdks/0.7.0/client-web/docs/examples/database/update-document.md b/app/sdks/0.7.0/client-web/docs/examples/database/update-document.md new file mode 100644 index 0000000000..9104b77a71 --- /dev/null +++ b/app/sdks/0.7.0/client-web/docs/examples/database/update-document.md @@ -0,0 +1,14 @@ +let sdk = new Appwrite(); + +sdk + .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID +; + +let promise = sdk.database.updateDocument('[COLLECTION_ID]', '[DOCUMENT_ID]', {}, [], []); + +promise.then(function (response) { + console.log(response); // Success +}, function (error) { + console.log(error); // Failure +}); \ No newline at end of file diff --git a/app/sdks/0.7.0/client-web/docs/examples/locale/get-continents.md b/app/sdks/0.7.0/client-web/docs/examples/locale/get-continents.md new file mode 100644 index 0000000000..1dfdf8013b --- /dev/null +++ b/app/sdks/0.7.0/client-web/docs/examples/locale/get-continents.md @@ -0,0 +1,14 @@ +let sdk = new Appwrite(); + +sdk + .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID +; + +let promise = sdk.locale.getContinents(); + +promise.then(function (response) { + console.log(response); // Success +}, function (error) { + console.log(error); // Failure +}); \ No newline at end of file diff --git a/app/sdks/0.7.0/client-web/docs/examples/locale/get-countries-e-u.md b/app/sdks/0.7.0/client-web/docs/examples/locale/get-countries-e-u.md new file mode 100644 index 0000000000..6b3f210a1e --- /dev/null +++ b/app/sdks/0.7.0/client-web/docs/examples/locale/get-countries-e-u.md @@ -0,0 +1,14 @@ +let sdk = new Appwrite(); + +sdk + .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID +; + +let promise = sdk.locale.getCountriesEU(); + +promise.then(function (response) { + console.log(response); // Success +}, function (error) { + console.log(error); // Failure +}); \ No newline at end of file diff --git a/app/sdks/0.7.0/client-web/docs/examples/locale/get-countries-phones.md b/app/sdks/0.7.0/client-web/docs/examples/locale/get-countries-phones.md new file mode 100644 index 0000000000..f35e2152e4 --- /dev/null +++ b/app/sdks/0.7.0/client-web/docs/examples/locale/get-countries-phones.md @@ -0,0 +1,14 @@ +let sdk = new Appwrite(); + +sdk + .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID +; + +let promise = sdk.locale.getCountriesPhones(); + +promise.then(function (response) { + console.log(response); // Success +}, function (error) { + console.log(error); // Failure +}); \ No newline at end of file diff --git a/app/sdks/0.7.0/client-web/docs/examples/locale/get-countries.md b/app/sdks/0.7.0/client-web/docs/examples/locale/get-countries.md new file mode 100644 index 0000000000..53b96375a1 --- /dev/null +++ b/app/sdks/0.7.0/client-web/docs/examples/locale/get-countries.md @@ -0,0 +1,14 @@ +let sdk = new Appwrite(); + +sdk + .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID +; + +let promise = sdk.locale.getCountries(); + +promise.then(function (response) { + console.log(response); // Success +}, function (error) { + console.log(error); // Failure +}); \ No newline at end of file diff --git a/app/sdks/0.7.0/client-web/docs/examples/locale/get-currencies.md b/app/sdks/0.7.0/client-web/docs/examples/locale/get-currencies.md new file mode 100644 index 0000000000..57db66401f --- /dev/null +++ b/app/sdks/0.7.0/client-web/docs/examples/locale/get-currencies.md @@ -0,0 +1,14 @@ +let sdk = new Appwrite(); + +sdk + .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID +; + +let promise = sdk.locale.getCurrencies(); + +promise.then(function (response) { + console.log(response); // Success +}, function (error) { + console.log(error); // Failure +}); \ No newline at end of file diff --git a/app/sdks/0.7.0/client-web/docs/examples/locale/get-languages.md b/app/sdks/0.7.0/client-web/docs/examples/locale/get-languages.md new file mode 100644 index 0000000000..04e3063ee7 --- /dev/null +++ b/app/sdks/0.7.0/client-web/docs/examples/locale/get-languages.md @@ -0,0 +1,14 @@ +let sdk = new Appwrite(); + +sdk + .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID +; + +let promise = sdk.locale.getLanguages(); + +promise.then(function (response) { + console.log(response); // Success +}, function (error) { + console.log(error); // Failure +}); \ No newline at end of file diff --git a/app/sdks/0.7.0/client-web/docs/examples/locale/get.md b/app/sdks/0.7.0/client-web/docs/examples/locale/get.md new file mode 100644 index 0000000000..469a046dbc --- /dev/null +++ b/app/sdks/0.7.0/client-web/docs/examples/locale/get.md @@ -0,0 +1,14 @@ +let sdk = new Appwrite(); + +sdk + .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID +; + +let promise = sdk.locale.get(); + +promise.then(function (response) { + console.log(response); // Success +}, function (error) { + console.log(error); // Failure +}); \ No newline at end of file diff --git a/app/sdks/0.7.0/client-web/docs/examples/storage/create-file.md b/app/sdks/0.7.0/client-web/docs/examples/storage/create-file.md new file mode 100644 index 0000000000..b23c47027a --- /dev/null +++ b/app/sdks/0.7.0/client-web/docs/examples/storage/create-file.md @@ -0,0 +1,14 @@ +let sdk = new Appwrite(); + +sdk + .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID +; + +let promise = sdk.storage.createFile(document.getElementById('uploader').files[0], [], []); + +promise.then(function (response) { + console.log(response); // Success +}, function (error) { + console.log(error); // Failure +}); \ No newline at end of file diff --git a/app/sdks/0.7.0/client-web/docs/examples/storage/delete-file.md b/app/sdks/0.7.0/client-web/docs/examples/storage/delete-file.md new file mode 100644 index 0000000000..c38ab4ba9c --- /dev/null +++ b/app/sdks/0.7.0/client-web/docs/examples/storage/delete-file.md @@ -0,0 +1,14 @@ +let sdk = new Appwrite(); + +sdk + .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID +; + +let promise = sdk.storage.deleteFile('[FILE_ID]'); + +promise.then(function (response) { + console.log(response); // Success +}, function (error) { + console.log(error); // Failure +}); \ No newline at end of file diff --git a/app/sdks/0.7.0/client-web/docs/examples/storage/get-file-download.md b/app/sdks/0.7.0/client-web/docs/examples/storage/get-file-download.md new file mode 100644 index 0000000000..1323b8b8df --- /dev/null +++ b/app/sdks/0.7.0/client-web/docs/examples/storage/get-file-download.md @@ -0,0 +1,10 @@ +let sdk = new Appwrite(); + +sdk + .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID +; + +let result = sdk.storage.getFileDownload('[FILE_ID]'); + +console.log(result); // Resource URL \ No newline at end of file diff --git a/app/sdks/0.7.0/client-web/docs/examples/storage/get-file-preview.md b/app/sdks/0.7.0/client-web/docs/examples/storage/get-file-preview.md new file mode 100644 index 0000000000..5ede9fdb93 --- /dev/null +++ b/app/sdks/0.7.0/client-web/docs/examples/storage/get-file-preview.md @@ -0,0 +1,10 @@ +let sdk = new Appwrite(); + +sdk + .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID +; + +let result = sdk.storage.getFilePreview('[FILE_ID]'); + +console.log(result); // Resource URL \ No newline at end of file diff --git a/app/sdks/0.7.0/client-web/docs/examples/storage/get-file-view.md b/app/sdks/0.7.0/client-web/docs/examples/storage/get-file-view.md new file mode 100644 index 0000000000..53877ae352 --- /dev/null +++ b/app/sdks/0.7.0/client-web/docs/examples/storage/get-file-view.md @@ -0,0 +1,10 @@ +let sdk = new Appwrite(); + +sdk + .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID +; + +let result = sdk.storage.getFileView('[FILE_ID]'); + +console.log(result); // Resource URL \ No newline at end of file diff --git a/app/sdks/0.7.0/client-web/docs/examples/storage/get-file.md b/app/sdks/0.7.0/client-web/docs/examples/storage/get-file.md new file mode 100644 index 0000000000..a1f94c08a6 --- /dev/null +++ b/app/sdks/0.7.0/client-web/docs/examples/storage/get-file.md @@ -0,0 +1,14 @@ +let sdk = new Appwrite(); + +sdk + .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID +; + +let promise = sdk.storage.getFile('[FILE_ID]'); + +promise.then(function (response) { + console.log(response); // Success +}, function (error) { + console.log(error); // Failure +}); \ No newline at end of file diff --git a/app/sdks/0.7.0/client-web/docs/examples/storage/list-files.md b/app/sdks/0.7.0/client-web/docs/examples/storage/list-files.md new file mode 100644 index 0000000000..c489a0b46d --- /dev/null +++ b/app/sdks/0.7.0/client-web/docs/examples/storage/list-files.md @@ -0,0 +1,14 @@ +let sdk = new Appwrite(); + +sdk + .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID +; + +let promise = sdk.storage.listFiles(); + +promise.then(function (response) { + console.log(response); // Success +}, function (error) { + console.log(error); // Failure +}); \ No newline at end of file diff --git a/app/sdks/0.7.0/client-web/docs/examples/storage/update-file.md b/app/sdks/0.7.0/client-web/docs/examples/storage/update-file.md new file mode 100644 index 0000000000..2a2f579b3b --- /dev/null +++ b/app/sdks/0.7.0/client-web/docs/examples/storage/update-file.md @@ -0,0 +1,14 @@ +let sdk = new Appwrite(); + +sdk + .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID +; + +let promise = sdk.storage.updateFile('[FILE_ID]', [], []); + +promise.then(function (response) { + console.log(response); // Success +}, function (error) { + console.log(error); // Failure +}); \ No newline at end of file diff --git a/app/sdks/0.7.0/client-web/docs/examples/teams/create-membership.md b/app/sdks/0.7.0/client-web/docs/examples/teams/create-membership.md new file mode 100644 index 0000000000..78b2d7fa77 --- /dev/null +++ b/app/sdks/0.7.0/client-web/docs/examples/teams/create-membership.md @@ -0,0 +1,14 @@ +let sdk = new Appwrite(); + +sdk + .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID +; + +let promise = sdk.teams.createMembership('[TEAM_ID]', 'email@example.com', [], 'https://example.com'); + +promise.then(function (response) { + console.log(response); // Success +}, function (error) { + console.log(error); // Failure +}); \ No newline at end of file diff --git a/app/sdks/0.7.0/client-web/docs/examples/teams/create.md b/app/sdks/0.7.0/client-web/docs/examples/teams/create.md new file mode 100644 index 0000000000..43205ba888 --- /dev/null +++ b/app/sdks/0.7.0/client-web/docs/examples/teams/create.md @@ -0,0 +1,14 @@ +let sdk = new Appwrite(); + +sdk + .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID +; + +let promise = sdk.teams.create('[NAME]'); + +promise.then(function (response) { + console.log(response); // Success +}, function (error) { + console.log(error); // Failure +}); \ No newline at end of file diff --git a/app/sdks/0.7.0/client-web/docs/examples/teams/delete-membership.md b/app/sdks/0.7.0/client-web/docs/examples/teams/delete-membership.md new file mode 100644 index 0000000000..1b85ef08da --- /dev/null +++ b/app/sdks/0.7.0/client-web/docs/examples/teams/delete-membership.md @@ -0,0 +1,14 @@ +let sdk = new Appwrite(); + +sdk + .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID +; + +let promise = sdk.teams.deleteMembership('[TEAM_ID]', '[INVITE_ID]'); + +promise.then(function (response) { + console.log(response); // Success +}, function (error) { + console.log(error); // Failure +}); \ No newline at end of file diff --git a/app/sdks/0.7.0/client-web/docs/examples/teams/delete.md b/app/sdks/0.7.0/client-web/docs/examples/teams/delete.md new file mode 100644 index 0000000000..4665ad5773 --- /dev/null +++ b/app/sdks/0.7.0/client-web/docs/examples/teams/delete.md @@ -0,0 +1,14 @@ +let sdk = new Appwrite(); + +sdk + .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID +; + +let promise = sdk.teams.delete('[TEAM_ID]'); + +promise.then(function (response) { + console.log(response); // Success +}, function (error) { + console.log(error); // Failure +}); \ No newline at end of file diff --git a/app/sdks/0.7.0/client-web/docs/examples/teams/get-memberships.md b/app/sdks/0.7.0/client-web/docs/examples/teams/get-memberships.md new file mode 100644 index 0000000000..6235ce33f4 --- /dev/null +++ b/app/sdks/0.7.0/client-web/docs/examples/teams/get-memberships.md @@ -0,0 +1,14 @@ +let sdk = new Appwrite(); + +sdk + .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID +; + +let promise = sdk.teams.getMemberships('[TEAM_ID]'); + +promise.then(function (response) { + console.log(response); // Success +}, function (error) { + console.log(error); // Failure +}); \ No newline at end of file diff --git a/app/sdks/0.7.0/client-web/docs/examples/teams/get.md b/app/sdks/0.7.0/client-web/docs/examples/teams/get.md new file mode 100644 index 0000000000..f4b0f040b1 --- /dev/null +++ b/app/sdks/0.7.0/client-web/docs/examples/teams/get.md @@ -0,0 +1,14 @@ +let sdk = new Appwrite(); + +sdk + .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID +; + +let promise = sdk.teams.get('[TEAM_ID]'); + +promise.then(function (response) { + console.log(response); // Success +}, function (error) { + console.log(error); // Failure +}); \ No newline at end of file diff --git a/app/sdks/0.7.0/client-web/docs/examples/teams/list.md b/app/sdks/0.7.0/client-web/docs/examples/teams/list.md new file mode 100644 index 0000000000..c4229e2400 --- /dev/null +++ b/app/sdks/0.7.0/client-web/docs/examples/teams/list.md @@ -0,0 +1,14 @@ +let sdk = new Appwrite(); + +sdk + .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID +; + +let promise = sdk.teams.list(); + +promise.then(function (response) { + console.log(response); // Success +}, function (error) { + console.log(error); // Failure +}); \ No newline at end of file diff --git a/app/sdks/0.7.0/client-web/docs/examples/teams/update-membership-status.md b/app/sdks/0.7.0/client-web/docs/examples/teams/update-membership-status.md new file mode 100644 index 0000000000..e8b3de0a0b --- /dev/null +++ b/app/sdks/0.7.0/client-web/docs/examples/teams/update-membership-status.md @@ -0,0 +1,14 @@ +let sdk = new Appwrite(); + +sdk + .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID +; + +let promise = sdk.teams.updateMembershipStatus('[TEAM_ID]', '[INVITE_ID]', '[USER_ID]', '[SECRET]'); + +promise.then(function (response) { + console.log(response); // Success +}, function (error) { + console.log(error); // Failure +}); \ No newline at end of file diff --git a/app/sdks/0.7.0/client-web/docs/examples/teams/update.md b/app/sdks/0.7.0/client-web/docs/examples/teams/update.md new file mode 100644 index 0000000000..bbab80937d --- /dev/null +++ b/app/sdks/0.7.0/client-web/docs/examples/teams/update.md @@ -0,0 +1,14 @@ +let sdk = new Appwrite(); + +sdk + .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID +; + +let promise = sdk.teams.update('[TEAM_ID]', '[NAME]'); + +promise.then(function (response) { + console.log(response); // Success +}, function (error) { + console.log(error); // Failure +}); \ No newline at end of file diff --git a/app/sdks/0.7.0/client-web/package.json b/app/sdks/0.7.0/client-web/package.json new file mode 100644 index 0000000000..26dd06fb94 --- /dev/null +++ b/app/sdks/0.7.0/client-web/package.json @@ -0,0 +1,17 @@ +{ + "name": "appwrite", + "homepage": "https://appwrite.io/support", + "description": "Appwrite is an open-source self-hosted backend server that abstract and simplify complex and repetitive development tasks behind a very simple REST API", + "version": "1.1.0", + "license": "BSD-3-Clause", + "main": "src/sdk.js", + "types": "types/index.d.ts", + "repository": { + "type": "git", + "url": "https://github.com/appwrite/sdk-for-js" + }, + "devDependencies": { + "typescript": "^3.6.4" + }, + "dependencies": {} +} \ No newline at end of file diff --git a/app/sdks/0.7.0/client-web/src/sdk.js b/app/sdks/0.7.0/client-web/src/sdk.js new file mode 100644 index 0000000000..90c9b8021b --- /dev/null +++ b/app/sdks/0.7.0/client-web/src/sdk.js @@ -0,0 +1,2386 @@ +(function (window) { + + 'use strict'; + + window.Appwrite = function () { + + let config = { + endpoint: 'https://appwrite.io/v1', + project: '', + locale: '', + }; + + /** + * @param {string} endpoint + * @returns {this} + */ + let setEndpoint = function(endpoint) { + config.endpoint = endpoint; + + return this; + }; + + /** + * Set Project + * + * Your project ID + * + * @param value string + * + * @return this + */ + let setProject = function (value) + { + http.addGlobalHeader('X-Appwrite-Project', value); + + config.project = value; + + return this; + }; + + /** + * Set Locale + * + * @param value string + * + * @return this + */ + let setLocale = function (value) + { + http.addGlobalHeader('X-Appwrite-Locale', value); + + config.locale = value; + + return this; + }; + + let http = function(document) { + let globalParams = [], + globalHeaders = []; + + let addParam = function (url, param, value) { + let a = document.createElement('a'), regex = /(?:\?|&|&)+([^=]+)(?:=([^&]*))*/g; + let match, str = []; + a.href = url; + param = encodeURIComponent(param); + + while (match = regex.exec(a.search)) if (param !== match[1]) str.push(match[1] + (match[2] ? "=" + match[2] : "")); + + str.push(param + (value ? "=" + encodeURIComponent(value) : "")); + + a.search = str.join("&"); + + return a.href; + }; + + /** + * @param {Object} params + * @returns {string} + */ + let buildQuery = function(params) { + let str = []; + + for (let p in params) { + if(Array.isArray(params[p])) { + for (let index = 0; index < params[p].length; index++) { + let param = params[p][index]; + str.push(encodeURIComponent(p + '[]') + "=" + encodeURIComponent(param)); + } + } + else { + str.push(encodeURIComponent(p) + "=" + encodeURIComponent(params[p])); + } + } + + return str.join("&"); + }; + + let addGlobalHeader = function(key, value) { + globalHeaders[key] = {key: key.toLowerCase(), value: value.toLowerCase()}; + }; + + let addGlobalParam = function(key, value) { + globalParams.push({key: key, value: value}); + }; + + addGlobalHeader('x-sdk-version', 'appwrite:javascript:1.1.0'); + addGlobalHeader('content-type', ''); + + /** + * @param {string} method + * @param {string} path string + * @param {Object} headers + * @param {Object} params + * @param {function} progress + * @returns {Promise} + */ + let call = function (method, path, headers = {}, params = {}, progress = null) { + let i; + + path = config.endpoint + path; + + if (-1 === ['GET', 'POST', 'PUT', 'DELETE', 'TRACE', 'HEAD', 'OPTIONS', 'CONNECT', 'PATCH'].indexOf(method)) { + throw new Error('var method must contain a valid HTTP method name'); + } + + if (typeof path !== 'string') { + throw new Error('var path must be of type string'); + } + + if (typeof headers !== 'object') { + throw new Error('var headers must be of type object'); + } + + for (i = 0; i < globalParams.length; i++) { // Add global params to URL + path = addParam(path, globalParams[i].key, globalParams[i].value); + } + + if(window.localStorage && window.localStorage.getItem('cookieFallback')) { + headers['X-Fallback-Cookies'] = window.localStorage.getItem('cookieFallback'); + } + + for (let key in globalHeaders) { // Add Global Headers + if (globalHeaders.hasOwnProperty(key)) { + if (!headers[globalHeaders[key].key]) { + headers[globalHeaders[key].key] = globalHeaders[key].value; + } + } + } + + if(method === 'GET') { + for (let param in params) { + if (param.hasOwnProperty(key)) { + path = addParam(path, key + (Array.isArray(param) ? '[]' : ''), params[key]); + } + } + } + + switch (headers['content-type']) { // Parse request by content type + case 'application/json': + params = JSON.stringify(params); + break; + + case 'multipart/form-data': + let formData = new FormData(); + + Object.keys(params).forEach(function(key) { + let param = params[key]; + formData.append(key + (Array.isArray(param) ? '[]' : ''), param); + }); + + params = formData; + break; + } + + return new Promise(function (resolve, reject) { + + let request = new XMLHttpRequest(), key; + + request.withCredentials = true; + request.open(method, path, true); + + for (key in headers) { // Set Headers + if (headers.hasOwnProperty(key)) { + if (key === 'content-type' && headers[key] === 'multipart/form-data') { // Skip to avoid missing boundary + continue; + } + + request.setRequestHeader(key, headers[key]); + } + } + + request.onload = function () { + let data = request.response; + let contentType = this.getResponseHeader('content-type') || ''; + contentType = contentType.substring(0, contentType.indexOf(';')); + + switch (contentType) { + case 'application/json': + data = JSON.parse(data); + break; + } + + let cookieFallback = this.getResponseHeader('X-Fallback-Cookies') || ''; + + if(window.localStorage && cookieFallback) { + window.console.warn('Appwrite is using localStorage for session management. Increase your security by adding a custom domain as your API endpoint.'); + window.localStorage.setItem('cookieFallback', cookieFallback); + } + + if (4 === request.readyState && 399 >= request.status) { + resolve(data); + } else { + reject(data); + } + }; + + if (progress) { + request.addEventListener('progress', progress); + request.upload.addEventListener('progress', progress, false); + } + + // Handle network errors + request.onerror = function () { + reject(new Error("Network Error")); + }; + + request.send(params); + }) + }; + + return { + 'get': function(path, headers = {}, params = {}) { + return call('GET', path + ((Object.keys(params).length > 0) ? '?' + buildQuery(params) : ''), headers, {}); + }, + 'post': function(path, headers = {}, params = {}, progress = null) { + return call('POST', path, headers, params, progress); + }, + 'put': function(path, headers = {}, params = {}, progress = null) { + return call('PUT', path, headers, params, progress); + }, + 'patch': function(path, headers = {}, params = {}, progress = null) { + return call('PATCH', path, headers, params, progress); + }, + 'delete': function(path, headers = {}, params = {}, progress = null) { + return call('DELETE', path, headers, params, progress); + }, + 'addGlobalParam': addGlobalParam, + 'addGlobalHeader': addGlobalHeader + } + }(window.document); + + let account = { + + /** + * Get Account + * + * Get currently logged in user data as JSON object. + * + * @throws {Error} + * @return {Promise} + */ + get: function() { + let path = '/account'; + + let payload = {}; + + return http + .get(path, { + 'content-type': 'application/json', + }, payload); + }, + + /** + * Create Account + * + * Use this endpoint to allow a new user to register a new account in your + * project. After the user registration completes successfully, you can use + * the [/account/verfication](/docs/client/account#createVerification) route + * to start verifying the user email address. To allow your new user to login + * to his new account, you need to create a new [account + * session](/docs/client/account#createSession). + * + * @param {string} email + * @param {string} password + * @param {string} name + * @throws {Error} + * @return {Promise} + */ + create: function(email, password, name = '') { + if(email === undefined) { + throw new Error('Missing required parameter: "email"'); + } + + if(password === undefined) { + throw new Error('Missing required parameter: "password"'); + } + + let path = '/account'; + + let payload = {}; + + if(email) { + payload['email'] = email; + } + + if(password) { + payload['password'] = password; + } + + if(name) { + payload['name'] = name; + } + + return http + .post(path, { + 'content-type': 'application/json', + }, payload); + }, + + /** + * Delete Account + * + * Delete a currently logged in user account. Behind the scene, the user + * record is not deleted but permanently blocked from any access. This is done + * to avoid deleted accounts being overtaken by new users with the same email + * address. Any user-related resources like documents or storage files should + * be deleted separately. + * + * @throws {Error} + * @return {Promise} + */ + delete: function() { + let path = '/account'; + + let payload = {}; + + return http + .delete(path, { + 'content-type': 'application/json', + }, payload); + }, + + /** + * Update Account Email + * + * Update currently logged in user account email address. After changing user + * address, user confirmation status is being reset and a new confirmation + * mail is sent. For security measures, user password is required to complete + * this request. + * + * @param {string} email + * @param {string} password + * @throws {Error} + * @return {Promise} + */ + updateEmail: function(email, password) { + if(email === undefined) { + throw new Error('Missing required parameter: "email"'); + } + + if(password === undefined) { + throw new Error('Missing required parameter: "password"'); + } + + let path = '/account/email'; + + let payload = {}; + + if(email) { + payload['email'] = email; + } + + if(password) { + payload['password'] = password; + } + + return http + .patch(path, { + 'content-type': 'application/json', + }, payload); + }, + + /** + * Get Account Logs + * + * Get currently logged in user list of latest security activity logs. Each + * log returns user IP address, location and date and time of log. + * + * @throws {Error} + * @return {Promise} + */ + getLogs: function() { + let path = '/account/logs'; + + let payload = {}; + + return http + .get(path, { + 'content-type': 'application/json', + }, payload); + }, + + /** + * Update Account Name + * + * Update currently logged in user account name. + * + * @param {string} name + * @throws {Error} + * @return {Promise} + */ + updateName: function(name) { + if(name === undefined) { + throw new Error('Missing required parameter: "name"'); + } + + let path = '/account/name'; + + let payload = {}; + + if(name) { + payload['name'] = name; + } + + return http + .patch(path, { + 'content-type': 'application/json', + }, payload); + }, + + /** + * Update Account Password + * + * Update currently logged in user password. For validation, user is required + * to pass the password twice. + * + * @param {string} password + * @param {string} oldPassword + * @throws {Error} + * @return {Promise} + */ + updatePassword: function(password, oldPassword) { + if(password === undefined) { + throw new Error('Missing required parameter: "password"'); + } + + if(oldPassword === undefined) { + throw new Error('Missing required parameter: "oldPassword"'); + } + + let path = '/account/password'; + + let payload = {}; + + if(password) { + payload['password'] = password; + } + + if(oldPassword) { + payload['oldPassword'] = oldPassword; + } + + return http + .patch(path, { + 'content-type': 'application/json', + }, payload); + }, + + /** + * Get Account Preferences + * + * Get currently logged in user preferences as a key-value object. + * + * @throws {Error} + * @return {Promise} + */ + getPrefs: function() { + let path = '/account/prefs'; + + let payload = {}; + + return http + .get(path, { + 'content-type': 'application/json', + }, payload); + }, + + /** + * Update Account Preferences + * + * Update currently logged in user account preferences. You can pass only the + * specific settings you wish to update. + * + * @param {object} prefs + * @throws {Error} + * @return {Promise} + */ + updatePrefs: function(prefs) { + if(prefs === undefined) { + throw new Error('Missing required parameter: "prefs"'); + } + + let path = '/account/prefs'; + + let payload = {}; + + if(prefs) { + payload['prefs'] = prefs; + } + + return http + .patch(path, { + 'content-type': 'application/json', + }, payload); + }, + + /** + * Create Password Recovery + * + * Sends the user an email with a temporary secret key for password reset. + * When the user clicks the confirmation link he is redirected back to your + * app password reset URL with the secret key and email address values + * attached to the URL query string. Use the query string params to submit a + * request to the [PUT /account/recovery](/docs/client/account#updateRecovery) + * endpoint to complete the process. + * + * @param {string} email + * @param {string} url + * @throws {Error} + * @return {Promise} + */ + createRecovery: function(email, url) { + if(email === undefined) { + throw new Error('Missing required parameter: "email"'); + } + + if(url === undefined) { + throw new Error('Missing required parameter: "url"'); + } + + let path = '/account/recovery'; + + let payload = {}; + + if(email) { + payload['email'] = email; + } + + if(url) { + payload['url'] = url; + } + + return http + .post(path, { + 'content-type': 'application/json', + }, payload); + }, + + /** + * Complete Password Recovery + * + * Use this endpoint to complete the user account password reset. Both the + * **userId** and **secret** arguments will be passed as query parameters to + * the redirect URL you have provided when sending your request to the [POST + * /account/recovery](/docs/client/account#createRecovery) endpoint. + * + * Please note that in order to avoid a [Redirect + * Attack](https://github.com/OWASP/CheatSheetSeries/blob/master/cheatsheets/Unvalidated_Redirects_and_Forwards_Cheat_Sheet.md) + * the only valid redirect URLs are the ones from domains you have set when + * adding your platforms in the console interface. + * + * @param {string} userId + * @param {string} secret + * @param {string} password + * @param {string} passwordAgain + * @throws {Error} + * @return {Promise} + */ + updateRecovery: function(userId, secret, password, passwordAgain) { + if(userId === undefined) { + throw new Error('Missing required parameter: "userId"'); + } + + if(secret === undefined) { + throw new Error('Missing required parameter: "secret"'); + } + + if(password === undefined) { + throw new Error('Missing required parameter: "password"'); + } + + if(passwordAgain === undefined) { + throw new Error('Missing required parameter: "passwordAgain"'); + } + + let path = '/account/recovery'; + + let payload = {}; + + if(userId) { + payload['userId'] = userId; + } + + if(secret) { + payload['secret'] = secret; + } + + if(password) { + payload['password'] = password; + } + + if(passwordAgain) { + payload['passwordAgain'] = passwordAgain; + } + + return http + .put(path, { + 'content-type': 'application/json', + }, payload); + }, + + /** + * Get Account Sessions + * + * Get currently logged in user list of active sessions across different + * devices. + * + * @throws {Error} + * @return {Promise} + */ + getSessions: function() { + let path = '/account/sessions'; + + let payload = {}; + + return http + .get(path, { + 'content-type': 'application/json', + }, payload); + }, + + /** + * Create Account Session + * + * Allow the user to login into his account by providing a valid email and + * password combination. This route will create a new session for the user. + * + * @param {string} email + * @param {string} password + * @throws {Error} + * @return {Promise} + */ + createSession: function(email, password) { + if(email === undefined) { + throw new Error('Missing required parameter: "email"'); + } + + if(password === undefined) { + throw new Error('Missing required parameter: "password"'); + } + + let path = '/account/sessions'; + + let payload = {}; + + if(email) { + payload['email'] = email; + } + + if(password) { + payload['password'] = password; + } + + return http + .post(path, { + 'content-type': 'application/json', + }, payload); + }, + + /** + * Delete All Account Sessions + * + * Delete all sessions from the user account and remove any sessions cookies + * from the end client. + * + * @throws {Error} + * @return {Promise} + */ + deleteSessions: function() { + let path = '/account/sessions'; + + let payload = {}; + + return http + .delete(path, { + 'content-type': 'application/json', + }, payload); + }, + + /** + * Create Account Session with OAuth2 + * + * Allow the user to login to his account using the OAuth2 provider of his + * choice. Each OAuth2 provider should be enabled from the Appwrite console + * first. Use the success and failure arguments to provide a redirect URL's + * back to your app when login is completed. + * + * @param {string} provider + * @param {string} success + * @param {string} failure + * @param {string[]} scopes + * @throws {Error} + * @return {Promise} + */ + createOAuth2Session: function(provider, success = 'https://appwrite.io/auth/oauth2/success', failure = 'https://appwrite.io/auth/oauth2/failure', scopes = []) { + if(provider === undefined) { + throw new Error('Missing required parameter: "provider"'); + } + + let path = '/account/sessions/oauth2/{provider}'.replace(new RegExp('{provider}', 'g'), provider); + + let payload = {}; + + if(success) { + payload['success'] = success; + } + + if(failure) { + payload['failure'] = failure; + } + + if(scopes) { + payload['scopes'] = scopes; + } + + payload['project'] = config.project; + + + let query = []; + + for (let p in payload) { + if(Array.isArray(payload[p])) { + for (let index = 0; index < payload[p].length; index++) { + let param = payload[p][index]; + query.push(encodeURIComponent(p + '[]') + "=" + encodeURIComponent(param)); + } + } + else { + query.push(encodeURIComponent(p) + "=" + encodeURIComponent(payload[p])); + } + } + + query = query.join("&"); + + window.location = config.endpoint + path + ((query) ? '?' + query : ''); + }, + + /** + * Delete Account Session + * + * Use this endpoint to log out the currently logged in user from all his + * account sessions across all his different devices. When using the option id + * argument, only the session unique ID provider will be deleted. + * + * @param {string} sessionId + * @throws {Error} + * @return {Promise} + */ + deleteSession: function(sessionId) { + if(sessionId === undefined) { + throw new Error('Missing required parameter: "sessionId"'); + } + + let path = '/account/sessions/{sessionId}'.replace(new RegExp('{sessionId}', 'g'), sessionId); + + let payload = {}; + + return http + .delete(path, { + 'content-type': 'application/json', + }, payload); + }, + + /** + * Create Email Verification + * + * Use this endpoint to send a verification message to your user email address + * to confirm they are the valid owners of that address. Both the **userId** + * and **secret** arguments will be passed as query parameters to the URL you + * have provided to be attached to the verification email. The provided URL + * should redirect the user back to your app and allow you to complete the + * verification process by verifying both the **userId** and **secret** + * parameters. Learn more about how to [complete the verification + * process](/docs/client/account#updateAccountVerification). + * + * Please note that in order to avoid a [Redirect + * Attack](https://github.com/OWASP/CheatSheetSeries/blob/master/cheatsheets/Unvalidated_Redirects_and_Forwards_Cheat_Sheet.md), + * the only valid redirect URLs are the ones from domains you have set when + * adding your platforms in the console interface. + * + * + * @param {string} url + * @throws {Error} + * @return {Promise} + */ + createVerification: function(url) { + if(url === undefined) { + throw new Error('Missing required parameter: "url"'); + } + + let path = '/account/verification'; + + let payload = {}; + + if(url) { + payload['url'] = url; + } + + return http + .post(path, { + 'content-type': 'application/json', + }, payload); + }, + + /** + * Complete Email Verification + * + * Use this endpoint to complete the user email verification process. Use both + * the **userId** and **secret** parameters that were attached to your app URL + * to verify the user email ownership. If confirmed this route will return a + * 200 status code. + * + * @param {string} userId + * @param {string} secret + * @throws {Error} + * @return {Promise} + */ + updateVerification: function(userId, secret) { + if(userId === undefined) { + throw new Error('Missing required parameter: "userId"'); + } + + if(secret === undefined) { + throw new Error('Missing required parameter: "secret"'); + } + + let path = '/account/verification'; + + let payload = {}; + + if(userId) { + payload['userId'] = userId; + } + + if(secret) { + payload['secret'] = secret; + } + + return http + .put(path, { + 'content-type': 'application/json', + }, payload); + } + }; + + let avatars = { + + /** + * Get Browser Icon + * + * You can use this endpoint to show different browser icons to your users. + * The code argument receives the browser code as it appears in your user + * /account/sessions endpoint. Use width, height and quality arguments to + * change the output settings. + * + * @param {string} code + * @param {number} width + * @param {number} height + * @param {number} quality + * @throws {Error} + * @return {string} + */ + getBrowser: function(code, width = 100, height = 100, quality = 100) { + if(code === undefined) { + throw new Error('Missing required parameter: "code"'); + } + + let path = '/avatars/browsers/{code}'.replace(new RegExp('{code}', 'g'), code); + + let payload = {}; + + if(width) { + payload['width'] = width; + } + + if(height) { + payload['height'] = height; + } + + if(quality) { + payload['quality'] = quality; + } + + payload['project'] = config.project; + + + let query = []; + + for (let p in payload) { + if(Array.isArray(payload[p])) { + for (let index = 0; index < payload[p].length; index++) { + let param = payload[p][index]; + query.push(encodeURIComponent(p + '[]') + "=" + encodeURIComponent(param)); + } + } + else { + query.push(encodeURIComponent(p) + "=" + encodeURIComponent(payload[p])); + } + } + + query = query.join("&"); + + return config.endpoint + path + ((query) ? '?' + query : ''); + }, + + /** + * Get Credit Card Icon + * + * Need to display your users with your billing method or their payment + * methods? The credit card endpoint will return you the icon of the credit + * card provider you need. Use width, height and quality arguments to change + * the output settings. + * + * @param {string} code + * @param {number} width + * @param {number} height + * @param {number} quality + * @throws {Error} + * @return {string} + */ + getCreditCard: function(code, width = 100, height = 100, quality = 100) { + if(code === undefined) { + throw new Error('Missing required parameter: "code"'); + } + + let path = '/avatars/credit-cards/{code}'.replace(new RegExp('{code}', 'g'), code); + + let payload = {}; + + if(width) { + payload['width'] = width; + } + + if(height) { + payload['height'] = height; + } + + if(quality) { + payload['quality'] = quality; + } + + payload['project'] = config.project; + + + let query = []; + + for (let p in payload) { + if(Array.isArray(payload[p])) { + for (let index = 0; index < payload[p].length; index++) { + let param = payload[p][index]; + query.push(encodeURIComponent(p + '[]') + "=" + encodeURIComponent(param)); + } + } + else { + query.push(encodeURIComponent(p) + "=" + encodeURIComponent(payload[p])); + } + } + + query = query.join("&"); + + return config.endpoint + path + ((query) ? '?' + query : ''); + }, + + /** + * Get Favicon + * + * Use this endpoint to fetch the favorite icon (AKA favicon) of a any remote + * website URL. + * + * @param {string} url + * @throws {Error} + * @return {string} + */ + getFavicon: function(url) { + if(url === undefined) { + throw new Error('Missing required parameter: "url"'); + } + + let path = '/avatars/favicon'; + + let payload = {}; + + if(url) { + payload['url'] = url; + } + + payload['project'] = config.project; + + + let query = []; + + for (let p in payload) { + if(Array.isArray(payload[p])) { + for (let index = 0; index < payload[p].length; index++) { + let param = payload[p][index]; + query.push(encodeURIComponent(p + '[]') + "=" + encodeURIComponent(param)); + } + } + else { + query.push(encodeURIComponent(p) + "=" + encodeURIComponent(payload[p])); + } + } + + query = query.join("&"); + + return config.endpoint + path + ((query) ? '?' + query : ''); + }, + + /** + * Get Country Flag + * + * You can use this endpoint to show different country flags icons to your + * users. The code argument receives the 2 letter country code. Use width, + * height and quality arguments to change the output settings. + * + * @param {string} code + * @param {number} width + * @param {number} height + * @param {number} quality + * @throws {Error} + * @return {string} + */ + getFlag: function(code, width = 100, height = 100, quality = 100) { + if(code === undefined) { + throw new Error('Missing required parameter: "code"'); + } + + let path = '/avatars/flags/{code}'.replace(new RegExp('{code}', 'g'), code); + + let payload = {}; + + if(width) { + payload['width'] = width; + } + + if(height) { + payload['height'] = height; + } + + if(quality) { + payload['quality'] = quality; + } + + payload['project'] = config.project; + + + let query = []; + + for (let p in payload) { + if(Array.isArray(payload[p])) { + for (let index = 0; index < payload[p].length; index++) { + let param = payload[p][index]; + query.push(encodeURIComponent(p + '[]') + "=" + encodeURIComponent(param)); + } + } + else { + query.push(encodeURIComponent(p) + "=" + encodeURIComponent(payload[p])); + } + } + + query = query.join("&"); + + return config.endpoint + path + ((query) ? '?' + query : ''); + }, + + /** + * Get Image from URL + * + * Use this endpoint to fetch a remote image URL and crop it to any image size + * you want. This endpoint is very useful if you need to crop and display + * remote images in your app or in case you want to make sure a 3rd party + * image is properly served using a TLS protocol. + * + * @param {string} url + * @param {number} width + * @param {number} height + * @throws {Error} + * @return {string} + */ + getImage: function(url, width = 400, height = 400) { + if(url === undefined) { + throw new Error('Missing required parameter: "url"'); + } + + let path = '/avatars/image'; + + let payload = {}; + + if(url) { + payload['url'] = url; + } + + if(width) { + payload['width'] = width; + } + + if(height) { + payload['height'] = height; + } + + payload['project'] = config.project; + + + let query = []; + + for (let p in payload) { + if(Array.isArray(payload[p])) { + for (let index = 0; index < payload[p].length; index++) { + let param = payload[p][index]; + query.push(encodeURIComponent(p + '[]') + "=" + encodeURIComponent(param)); + } + } + else { + query.push(encodeURIComponent(p) + "=" + encodeURIComponent(payload[p])); + } + } + + query = query.join("&"); + + return config.endpoint + path + ((query) ? '?' + query : ''); + }, + + /** + * Get User Initials + * + * Use this endpoint to show your user initials avatar icon on your website or + * app. By default, this route will try to print your logged-in user name or + * email initials. You can also overwrite the user name if you pass the 'name' + * parameter. If no name is given and no user is logged, an empty avatar will + * be returned. + * + * You can use the color and background params to change the avatar colors. By + * default, a random theme will be selected. The random theme will persist for + * the user's initials when reloading the same theme will always return for + * the same initials. + * + * @param {string} name + * @param {number} width + * @param {number} height + * @param {string} color + * @param {string} background + * @throws {Error} + * @return {string} + */ + getInitials: function(name = '', width = 500, height = 500, color = '', background = '') { + let path = '/avatars/initials'; + + let payload = {}; + + if(name) { + payload['name'] = name; + } + + if(width) { + payload['width'] = width; + } + + if(height) { + payload['height'] = height; + } + + if(color) { + payload['color'] = color; + } + + if(background) { + payload['background'] = background; + } + + payload['project'] = config.project; + + + let query = []; + + for (let p in payload) { + if(Array.isArray(payload[p])) { + for (let index = 0; index < payload[p].length; index++) { + let param = payload[p][index]; + query.push(encodeURIComponent(p + '[]') + "=" + encodeURIComponent(param)); + } + } + else { + query.push(encodeURIComponent(p) + "=" + encodeURIComponent(payload[p])); + } + } + + query = query.join("&"); + + return config.endpoint + path + ((query) ? '?' + query : ''); + }, + + /** + * Get QR Code + * + * Converts a given plain text to a QR code image. You can use the query + * parameters to change the size and style of the resulting image. + * + * @param {string} text + * @param {number} size + * @param {number} margin + * @param {boolean} download + * @throws {Error} + * @return {string} + */ + getQR: function(text, size = 400, margin = 1, download = false) { + if(text === undefined) { + throw new Error('Missing required parameter: "text"'); + } + + let path = '/avatars/qr'; + + let payload = {}; + + if(text) { + payload['text'] = text; + } + + if(size) { + payload['size'] = size; + } + + if(margin) { + payload['margin'] = margin; + } + + if(download) { + payload['download'] = download; + } + + payload['project'] = config.project; + + + let query = []; + + for (let p in payload) { + if(Array.isArray(payload[p])) { + for (let index = 0; index < payload[p].length; index++) { + let param = payload[p][index]; + query.push(encodeURIComponent(p + '[]') + "=" + encodeURIComponent(param)); + } + } + else { + query.push(encodeURIComponent(p) + "=" + encodeURIComponent(payload[p])); + } + } + + query = query.join("&"); + + return config.endpoint + path + ((query) ? '?' + query : ''); + } + }; + + let database = { + + /** + * List Documents + * + * Get a list of all the user documents. You can use the query params to + * filter your results. On admin mode, this endpoint will return a list of all + * of the project documents. [Learn more about different API + * modes](/docs/admin). + * + * @param {string} collectionId + * @param {string[]} filters + * @param {number} limit + * @param {number} offset + * @param {string} orderField + * @param {string} orderType + * @param {string} orderCast + * @param {string} search + * @throws {Error} + * @return {Promise} + */ + listDocuments: function(collectionId, filters = [], limit = 25, offset = 0, orderField = '$id', orderType = 'ASC', orderCast = 'string', search = '') { + if(collectionId === undefined) { + throw new Error('Missing required parameter: "collectionId"'); + } + + let path = '/database/collections/{collectionId}/documents'.replace(new RegExp('{collectionId}', 'g'), collectionId); + + let payload = {}; + + if(filters) { + payload['filters'] = filters; + } + + if(limit) { + payload['limit'] = limit; + } + + if(offset) { + payload['offset'] = offset; + } + + if(orderField) { + payload['orderField'] = orderField; + } + + if(orderType) { + payload['orderType'] = orderType; + } + + if(orderCast) { + payload['orderCast'] = orderCast; + } + + if(search) { + payload['search'] = search; + } + + return http + .get(path, { + 'content-type': 'application/json', + }, payload); + }, + + /** + * Create Document + * + * Create a new Document. Before using this route, you should create a new + * collection resource using either a [server + * integration](/docs/server/database?sdk=nodejs#createCollection) API or + * directly from your database console. + * + * @param {string} collectionId + * @param {object} data + * @param {string[]} read + * @param {string[]} write + * @param {string} parentDocument + * @param {string} parentProperty + * @param {string} parentPropertyType + * @throws {Error} + * @return {Promise} + */ + createDocument: function(collectionId, data, read, write, parentDocument = '', parentProperty = '', parentPropertyType = 'assign') { + if(collectionId === undefined) { + throw new Error('Missing required parameter: "collectionId"'); + } + + if(data === undefined) { + throw new Error('Missing required parameter: "data"'); + } + + if(read === undefined) { + throw new Error('Missing required parameter: "read"'); + } + + if(write === undefined) { + throw new Error('Missing required parameter: "write"'); + } + + let path = '/database/collections/{collectionId}/documents'.replace(new RegExp('{collectionId}', 'g'), collectionId); + + let payload = {}; + + if(data) { + payload['data'] = data; + } + + if(read) { + payload['read'] = read; + } + + if(write) { + payload['write'] = write; + } + + if(parentDocument) { + payload['parentDocument'] = parentDocument; + } + + if(parentProperty) { + payload['parentProperty'] = parentProperty; + } + + if(parentPropertyType) { + payload['parentPropertyType'] = parentPropertyType; + } + + return http + .post(path, { + 'content-type': 'application/json', + }, payload); + }, + + /** + * Get Document + * + * Get document by its unique ID. This endpoint response returns a JSON object + * with the document data. + * + * @param {string} collectionId + * @param {string} documentId + * @throws {Error} + * @return {Promise} + */ + getDocument: function(collectionId, documentId) { + if(collectionId === undefined) { + throw new Error('Missing required parameter: "collectionId"'); + } + + if(documentId === undefined) { + throw new Error('Missing required parameter: "documentId"'); + } + + let path = '/database/collections/{collectionId}/documents/{documentId}'.replace(new RegExp('{collectionId}', 'g'), collectionId).replace(new RegExp('{documentId}', 'g'), documentId); + + let payload = {}; + + return http + .get(path, { + 'content-type': 'application/json', + }, payload); + }, + + /** + * Update Document + * + * + * @param {string} collectionId + * @param {string} documentId + * @param {object} data + * @param {string[]} read + * @param {string[]} write + * @throws {Error} + * @return {Promise} + */ + updateDocument: function(collectionId, documentId, data, read, write) { + if(collectionId === undefined) { + throw new Error('Missing required parameter: "collectionId"'); + } + + if(documentId === undefined) { + throw new Error('Missing required parameter: "documentId"'); + } + + if(data === undefined) { + throw new Error('Missing required parameter: "data"'); + } + + if(read === undefined) { + throw new Error('Missing required parameter: "read"'); + } + + if(write === undefined) { + throw new Error('Missing required parameter: "write"'); + } + + let path = '/database/collections/{collectionId}/documents/{documentId}'.replace(new RegExp('{collectionId}', 'g'), collectionId).replace(new RegExp('{documentId}', 'g'), documentId); + + let payload = {}; + + if(data) { + payload['data'] = data; + } + + if(read) { + payload['read'] = read; + } + + if(write) { + payload['write'] = write; + } + + return http + .patch(path, { + 'content-type': 'application/json', + }, payload); + }, + + /** + * Delete Document + * + * Delete document by its unique ID. This endpoint deletes only the parent + * documents, his attributes and relations to other documents. Child documents + * **will not** be deleted. + * + * @param {string} collectionId + * @param {string} documentId + * @throws {Error} + * @return {Promise} + */ + deleteDocument: function(collectionId, documentId) { + if(collectionId === undefined) { + throw new Error('Missing required parameter: "collectionId"'); + } + + if(documentId === undefined) { + throw new Error('Missing required parameter: "documentId"'); + } + + let path = '/database/collections/{collectionId}/documents/{documentId}'.replace(new RegExp('{collectionId}', 'g'), collectionId).replace(new RegExp('{documentId}', 'g'), documentId); + + let payload = {}; + + return http + .delete(path, { + 'content-type': 'application/json', + }, payload); + } + }; + + let locale = { + + /** + * Get User Locale + * + * Get the current user location based on IP. Returns an object with user + * country code, country name, continent name, continent code, ip address and + * suggested currency. You can use the locale header to get the data in a + * supported language. + * + * ([IP Geolocation by DB-IP](https://db-ip.com)) + * + * @throws {Error} + * @return {Promise} + */ + get: function() { + let path = '/locale'; + + let payload = {}; + + return http + .get(path, { + 'content-type': 'application/json', + }, payload); + }, + + /** + * List Continents + * + * List of all continents. You can use the locale header to get the data in a + * supported language. + * + * @throws {Error} + * @return {Promise} + */ + getContinents: function() { + let path = '/locale/continents'; + + let payload = {}; + + return http + .get(path, { + 'content-type': 'application/json', + }, payload); + }, + + /** + * List Countries + * + * List of all countries. You can use the locale header to get the data in a + * supported language. + * + * @throws {Error} + * @return {Promise} + */ + getCountries: function() { + let path = '/locale/countries'; + + let payload = {}; + + return http + .get(path, { + 'content-type': 'application/json', + }, payload); + }, + + /** + * List EU Countries + * + * List of all countries that are currently members of the EU. You can use the + * locale header to get the data in a supported language. + * + * @throws {Error} + * @return {Promise} + */ + getCountriesEU: function() { + let path = '/locale/countries/eu'; + + let payload = {}; + + return http + .get(path, { + 'content-type': 'application/json', + }, payload); + }, + + /** + * List Countries Phone Codes + * + * List of all countries phone codes. You can use the locale header to get the + * data in a supported language. + * + * @throws {Error} + * @return {Promise} + */ + getCountriesPhones: function() { + let path = '/locale/countries/phones'; + + let payload = {}; + + return http + .get(path, { + 'content-type': 'application/json', + }, payload); + }, + + /** + * List Currencies + * + * List of all currencies, including currency symbol, name, plural, and + * decimal digits for all major and minor currencies. You can use the locale + * header to get the data in a supported language. + * + * @throws {Error} + * @return {Promise} + */ + getCurrencies: function() { + let path = '/locale/currencies'; + + let payload = {}; + + return http + .get(path, { + 'content-type': 'application/json', + }, payload); + }, + + /** + * List Languages + * + * List of all languages classified by ISO 639-1 including 2-letter code, name + * in English, and name in the respective language. + * + * @throws {Error} + * @return {Promise} + */ + getLanguages: function() { + let path = '/locale/languages'; + + let payload = {}; + + return http + .get(path, { + 'content-type': 'application/json', + }, payload); + } + }; + + let storage = { + + /** + * List Files + * + * Get a list of all the user files. You can use the query params to filter + * your results. On admin mode, this endpoint will return a list of all of the + * project files. [Learn more about different API modes](/docs/admin). + * + * @param {string} search + * @param {number} limit + * @param {number} offset + * @param {string} orderType + * @throws {Error} + * @return {Promise} + */ + listFiles: function(search = '', limit = 25, offset = 0, orderType = 'ASC') { + let path = '/storage/files'; + + let payload = {}; + + if(search) { + payload['search'] = search; + } + + if(limit) { + payload['limit'] = limit; + } + + if(offset) { + payload['offset'] = offset; + } + + if(orderType) { + payload['orderType'] = orderType; + } + + return http + .get(path, { + 'content-type': 'application/json', + }, payload); + }, + + /** + * Create File + * + * Create a new file. The user who creates the file will automatically be + * assigned to read and write access unless he has passed custom values for + * read and write arguments. + * + * @param {File} file + * @param {string[]} read + * @param {string[]} write + * @throws {Error} + * @return {Promise} + */ + createFile: function(file, read, write) { + if(file === undefined) { + throw new Error('Missing required parameter: "file"'); + } + + if(read === undefined) { + throw new Error('Missing required parameter: "read"'); + } + + if(write === undefined) { + throw new Error('Missing required parameter: "write"'); + } + + let path = '/storage/files'; + + let payload = {}; + + if(file) { + payload['file'] = file; + } + + if(read) { + payload['read'] = read; + } + + if(write) { + payload['write'] = write; + } + + return http + .post(path, { + 'content-type': 'multipart/form-data', + }, payload); + }, + + /** + * Get File + * + * Get file by its unique ID. This endpoint response returns a JSON object + * with the file metadata. + * + * @param {string} fileId + * @throws {Error} + * @return {Promise} + */ + getFile: function(fileId) { + if(fileId === undefined) { + throw new Error('Missing required parameter: "fileId"'); + } + + let path = '/storage/files/{fileId}'.replace(new RegExp('{fileId}', 'g'), fileId); + + let payload = {}; + + return http + .get(path, { + 'content-type': 'application/json', + }, payload); + }, + + /** + * Update File + * + * Update file by its unique ID. Only users with write permissions have access + * to update this resource. + * + * @param {string} fileId + * @param {string[]} read + * @param {string[]} write + * @throws {Error} + * @return {Promise} + */ + updateFile: function(fileId, read, write) { + if(fileId === undefined) { + throw new Error('Missing required parameter: "fileId"'); + } + + if(read === undefined) { + throw new Error('Missing required parameter: "read"'); + } + + if(write === undefined) { + throw new Error('Missing required parameter: "write"'); + } + + let path = '/storage/files/{fileId}'.replace(new RegExp('{fileId}', 'g'), fileId); + + let payload = {}; + + if(read) { + payload['read'] = read; + } + + if(write) { + payload['write'] = write; + } + + return http + .put(path, { + 'content-type': 'application/json', + }, payload); + }, + + /** + * Delete File + * + * Delete a file by its unique ID. Only users with write permissions have + * access to delete this resource. + * + * @param {string} fileId + * @throws {Error} + * @return {Promise} + */ + deleteFile: function(fileId) { + if(fileId === undefined) { + throw new Error('Missing required parameter: "fileId"'); + } + + let path = '/storage/files/{fileId}'.replace(new RegExp('{fileId}', 'g'), fileId); + + let payload = {}; + + return http + .delete(path, { + 'content-type': 'application/json', + }, payload); + }, + + /** + * Get File for Download + * + * Get file content by its unique ID. The endpoint response return with a + * 'Content-Disposition: attachment' header that tells the browser to start + * downloading the file to user downloads directory. + * + * @param {string} fileId + * @throws {Error} + * @return {string} + */ + getFileDownload: function(fileId) { + if(fileId === undefined) { + throw new Error('Missing required parameter: "fileId"'); + } + + let path = '/storage/files/{fileId}/download'.replace(new RegExp('{fileId}', 'g'), fileId); + + let payload = {}; + + payload['project'] = config.project; + + + let query = []; + + for (let p in payload) { + if(Array.isArray(payload[p])) { + for (let index = 0; index < payload[p].length; index++) { + let param = payload[p][index]; + query.push(encodeURIComponent(p + '[]') + "=" + encodeURIComponent(param)); + } + } + else { + query.push(encodeURIComponent(p) + "=" + encodeURIComponent(payload[p])); + } + } + + query = query.join("&"); + + return config.endpoint + path + ((query) ? '?' + query : ''); + }, + + /** + * Get File Preview + * + * Get a file preview image. Currently, this method supports preview for image + * files (jpg, png, and gif), other supported formats, like pdf, docs, slides, + * and spreadsheets, will return the file icon image. You can also pass query + * string arguments for cutting and resizing your preview image. + * + * @param {string} fileId + * @param {number} width + * @param {number} height + * @param {number} quality + * @param {string} background + * @param {string} output + * @throws {Error} + * @return {string} + */ + getFilePreview: function(fileId, width = 0, height = 0, quality = 100, background = '', output = '') { + if(fileId === undefined) { + throw new Error('Missing required parameter: "fileId"'); + } + + let path = '/storage/files/{fileId}/preview'.replace(new RegExp('{fileId}', 'g'), fileId); + + let payload = {}; + + if(width) { + payload['width'] = width; + } + + if(height) { + payload['height'] = height; + } + + if(quality) { + payload['quality'] = quality; + } + + if(background) { + payload['background'] = background; + } + + if(output) { + payload['output'] = output; + } + + payload['project'] = config.project; + + + let query = []; + + for (let p in payload) { + if(Array.isArray(payload[p])) { + for (let index = 0; index < payload[p].length; index++) { + let param = payload[p][index]; + query.push(encodeURIComponent(p + '[]') + "=" + encodeURIComponent(param)); + } + } + else { + query.push(encodeURIComponent(p) + "=" + encodeURIComponent(payload[p])); + } + } + + query = query.join("&"); + + return config.endpoint + path + ((query) ? '?' + query : ''); + }, + + /** + * Get File for View + * + * Get file content by its unique ID. This endpoint is similar to the download + * method but returns with no 'Content-Disposition: attachment' header. + * + * @param {string} fileId + * @param {string} as + * @throws {Error} + * @return {string} + */ + getFileView: function(fileId, as = '') { + if(fileId === undefined) { + throw new Error('Missing required parameter: "fileId"'); + } + + let path = '/storage/files/{fileId}/view'.replace(new RegExp('{fileId}', 'g'), fileId); + + let payload = {}; + + if(as) { + payload['as'] = as; + } + + payload['project'] = config.project; + + + let query = []; + + for (let p in payload) { + if(Array.isArray(payload[p])) { + for (let index = 0; index < payload[p].length; index++) { + let param = payload[p][index]; + query.push(encodeURIComponent(p + '[]') + "=" + encodeURIComponent(param)); + } + } + else { + query.push(encodeURIComponent(p) + "=" + encodeURIComponent(payload[p])); + } + } + + query = query.join("&"); + + return config.endpoint + path + ((query) ? '?' + query : ''); + } + }; + + let teams = { + + /** + * List Teams + * + * Get a list of all the current user teams. You can use the query params to + * filter your results. On admin mode, this endpoint will return a list of all + * of the project teams. [Learn more about different API modes](/docs/admin). + * + * @param {string} search + * @param {number} limit + * @param {number} offset + * @param {string} orderType + * @throws {Error} + * @return {Promise} + */ + list: function(search = '', limit = 25, offset = 0, orderType = 'ASC') { + let path = '/teams'; + + let payload = {}; + + if(search) { + payload['search'] = search; + } + + if(limit) { + payload['limit'] = limit; + } + + if(offset) { + payload['offset'] = offset; + } + + if(orderType) { + payload['orderType'] = orderType; + } + + return http + .get(path, { + 'content-type': 'application/json', + }, payload); + }, + + /** + * Create Team + * + * Create a new team. The user who creates the team will automatically be + * assigned as the owner of the team. The team owner can invite new members, + * who will be able add new owners and update or delete the team from your + * project. + * + * @param {string} name + * @param {string[]} roles + * @throws {Error} + * @return {Promise} + */ + create: function(name, roles = ["owner"]) { + if(name === undefined) { + throw new Error('Missing required parameter: "name"'); + } + + let path = '/teams'; + + let payload = {}; + + if(name) { + payload['name'] = name; + } + + if(roles) { + payload['roles'] = roles; + } + + return http + .post(path, { + 'content-type': 'application/json', + }, payload); + }, + + /** + * Get Team + * + * Get team by its unique ID. All team members have read access for this + * resource. + * + * @param {string} teamId + * @throws {Error} + * @return {Promise} + */ + get: function(teamId) { + if(teamId === undefined) { + throw new Error('Missing required parameter: "teamId"'); + } + + let path = '/teams/{teamId}'.replace(new RegExp('{teamId}', 'g'), teamId); + + let payload = {}; + + return http + .get(path, { + 'content-type': 'application/json', + }, payload); + }, + + /** + * Update Team + * + * Update team by its unique ID. Only team owners have write access for this + * resource. + * + * @param {string} teamId + * @param {string} name + * @throws {Error} + * @return {Promise} + */ + update: function(teamId, name) { + if(teamId === undefined) { + throw new Error('Missing required parameter: "teamId"'); + } + + if(name === undefined) { + throw new Error('Missing required parameter: "name"'); + } + + let path = '/teams/{teamId}'.replace(new RegExp('{teamId}', 'g'), teamId); + + let payload = {}; + + if(name) { + payload['name'] = name; + } + + return http + .put(path, { + 'content-type': 'application/json', + }, payload); + }, + + /** + * Delete Team + * + * Delete team by its unique ID. Only team owners have write access for this + * resource. + * + * @param {string} teamId + * @throws {Error} + * @return {Promise} + */ + delete: function(teamId) { + if(teamId === undefined) { + throw new Error('Missing required parameter: "teamId"'); + } + + let path = '/teams/{teamId}'.replace(new RegExp('{teamId}', 'g'), teamId); + + let payload = {}; + + return http + .delete(path, { + 'content-type': 'application/json', + }, payload); + }, + + /** + * Get Team Memberships + * + * Get team members by the team unique ID. All team members have read access + * for this list of resources. + * + * @param {string} teamId + * @param {string} search + * @param {number} limit + * @param {number} offset + * @param {string} orderType + * @throws {Error} + * @return {Promise} + */ + getMemberships: function(teamId, search = '', limit = 25, offset = 0, orderType = 'ASC') { + if(teamId === undefined) { + throw new Error('Missing required parameter: "teamId"'); + } + + let path = '/teams/{teamId}/memberships'.replace(new RegExp('{teamId}', 'g'), teamId); + + let payload = {}; + + if(search) { + payload['search'] = search; + } + + if(limit) { + payload['limit'] = limit; + } + + if(offset) { + payload['offset'] = offset; + } + + if(orderType) { + payload['orderType'] = orderType; + } + + return http + .get(path, { + 'content-type': 'application/json', + }, payload); + }, + + /** + * Create Team Membership + * + * Use this endpoint to invite a new member to join your team. An email with a + * link to join the team will be sent to the new member email address if the + * member doesn't exist in the project it will be created automatically. + * + * Use the 'URL' parameter to redirect the user from the invitation email back + * to your app. When the user is redirected, use the [Update Team Membership + * Status](/docs/client/teams#updateMembershipStatus) endpoint to allow the + * user to accept the invitation to the team. + * + * Please note that in order to avoid a [Redirect + * Attacks](https://github.com/OWASP/CheatSheetSeries/blob/master/cheatsheets/Unvalidated_Redirects_and_Forwards_Cheat_Sheet.md) + * the only valid redirect URL's are the once from domains you have set when + * added your platforms in the console interface. + * + * @param {string} teamId + * @param {string} email + * @param {string[]} roles + * @param {string} url + * @param {string} name + * @throws {Error} + * @return {Promise} + */ + createMembership: function(teamId, email, roles, url, name = '') { + if(teamId === undefined) { + throw new Error('Missing required parameter: "teamId"'); + } + + if(email === undefined) { + throw new Error('Missing required parameter: "email"'); + } + + if(roles === undefined) { + throw new Error('Missing required parameter: "roles"'); + } + + if(url === undefined) { + throw new Error('Missing required parameter: "url"'); + } + + let path = '/teams/{teamId}/memberships'.replace(new RegExp('{teamId}', 'g'), teamId); + + let payload = {}; + + if(email) { + payload['email'] = email; + } + + if(name) { + payload['name'] = name; + } + + if(roles) { + payload['roles'] = roles; + } + + if(url) { + payload['url'] = url; + } + + return http + .post(path, { + 'content-type': 'application/json', + }, payload); + }, + + /** + * Delete Team Membership + * + * This endpoint allows a user to leave a team or for a team owner to delete + * the membership of any other team member. You can also use this endpoint to + * delete a user membership even if he didn't accept it. + * + * @param {string} teamId + * @param {string} inviteId + * @throws {Error} + * @return {Promise} + */ + deleteMembership: function(teamId, inviteId) { + if(teamId === undefined) { + throw new Error('Missing required parameter: "teamId"'); + } + + if(inviteId === undefined) { + throw new Error('Missing required parameter: "inviteId"'); + } + + let path = '/teams/{teamId}/memberships/{inviteId}'.replace(new RegExp('{teamId}', 'g'), teamId).replace(new RegExp('{inviteId}', 'g'), inviteId); + + let payload = {}; + + return http + .delete(path, { + 'content-type': 'application/json', + }, payload); + }, + + /** + * Update Team Membership Status + * + * Use this endpoint to allow a user to accept an invitation to join a team + * after he is being redirected back to your app from the invitation email he + * was sent. + * + * @param {string} teamId + * @param {string} inviteId + * @param {string} userId + * @param {string} secret + * @throws {Error} + * @return {Promise} + */ + updateMembershipStatus: function(teamId, inviteId, userId, secret) { + if(teamId === undefined) { + throw new Error('Missing required parameter: "teamId"'); + } + + if(inviteId === undefined) { + throw new Error('Missing required parameter: "inviteId"'); + } + + if(userId === undefined) { + throw new Error('Missing required parameter: "userId"'); + } + + if(secret === undefined) { + throw new Error('Missing required parameter: "secret"'); + } + + let path = '/teams/{teamId}/memberships/{inviteId}/status'.replace(new RegExp('{teamId}', 'g'), teamId).replace(new RegExp('{inviteId}', 'g'), inviteId); + + let payload = {}; + + if(userId) { + payload['userId'] = userId; + } + + if(secret) { + payload['secret'] = secret; + } + + return http + .patch(path, { + 'content-type': 'application/json', + }, payload); + } + }; + + return { + setEndpoint: setEndpoint, + setProject: setProject, + setLocale: setLocale, + account: account, + avatars: avatars, + database: database, + locale: locale, + storage: storage, + teams: teams + }; + }; + + if(typeof module !== "undefined") { + module.exports = window.Appwrite; + } + +})((typeof window !== "undefined") ? window : {}); \ No newline at end of file diff --git a/app/sdks/0.7.0/client-web/src/sdk.min.js b/app/sdks/0.7.0/client-web/src/sdk.min.js new file mode 100644 index 0000000000..2bc06cc935 --- /dev/null +++ b/app/sdks/0.7.0/client-web/src/sdk.min.js @@ -0,0 +1,187 @@ +(function(window){'use strict';window.Appwrite=function(){let config={endpoint:'https://appwrite.io/v1',project:'',locale:'',};let setEndpoint=function(endpoint){config.endpoint=endpoint;return this};let setProject=function(value){http.addGlobalHeader('X-Appwrite-Project',value);config.project=value;return this};let setLocale=function(value){http.addGlobalHeader('X-Appwrite-Locale',value);config.locale=value;return this};let http=function(document){let globalParams=[],globalHeaders=[];let addParam=function(url,param,value){let a=document.createElement('a'),regex=/(?:\?|&|&)+([^=]+)(?:=([^&]*))*/g;let match,str=[];a.href=url;param=encodeURIComponent(param);while(match=regex.exec(a.search))if(param!==match[1])str.push(match[1]+(match[2]?"="+match[2]:""));str.push(param+(value?"="+encodeURIComponent(value):""));a.search=str.join("&");return a.href};let buildQuery=function(params){let str=[];for(let p in params){if(Array.isArray(params[p])){for(let index=0;index=request.status){resolve(data)}else{reject(data)}};if(progress){request.addEventListener('progress',progress);request.upload.addEventListener('progress',progress,!1)} +request.onerror=function(){reject(new Error("Network Error"))};request.send(params)})};return{'get':function(path,headers={},params={}){return call('GET',path+((Object.keys(params).length>0)?'?'+buildQuery(params):''),headers,{})},'post':function(path,headers={},params={},progress=null){return call('POST',path,headers,params,progress)},'put':function(path,headers={},params={},progress=null){return call('PUT',path,headers,params,progress)},'patch':function(path,headers={},params={},progress=null){return call('PATCH',path,headers,params,progress)},'delete':function(path,headers={},params={},progress=null){return call('DELETE',path,headers,params,progress)},'addGlobalParam':addGlobalParam,'addGlobalHeader':addGlobalHeader}}(window.document);let account={get:function(){let path='/account';let payload={};return http.get(path,{'content-type':'application/json',},payload)},create:function(email,password,name=''){if(email===undefined){throw new Error('Missing required parameter: "email"')} +if(password===undefined){throw new Error('Missing required parameter: "password"')} +let path='/account';let payload={};if(email){payload.email=email} +if(password){payload.password=password} +if(name){payload.name=name} +return http.post(path,{'content-type':'application/json',},payload)},delete:function(){let path='/account';let payload={};return http.delete(path,{'content-type':'application/json',},payload)},updateEmail:function(email,password){if(email===undefined){throw new Error('Missing required parameter: "email"')} +if(password===undefined){throw new Error('Missing required parameter: "password"')} +let path='/account/email';let payload={};if(email){payload.email=email} +if(password){payload.password=password} +return http.patch(path,{'content-type':'application/json',},payload)},getLogs:function(){let path='/account/logs';let payload={};return http.get(path,{'content-type':'application/json',},payload)},updateName:function(name){if(name===undefined){throw new Error('Missing required parameter: "name"')} +let path='/account/name';let payload={};if(name){payload.name=name} +return http.patch(path,{'content-type':'application/json',},payload)},updatePassword:function(password,oldPassword){if(password===undefined){throw new Error('Missing required parameter: "password"')} +if(oldPassword===undefined){throw new Error('Missing required parameter: "oldPassword"')} +let path='/account/password';let payload={};if(password){payload.password=password} +if(oldPassword){payload.oldPassword=oldPassword} +return http.patch(path,{'content-type':'application/json',},payload)},getPrefs:function(){let path='/account/prefs';let payload={};return http.get(path,{'content-type':'application/json',},payload)},updatePrefs:function(prefs){if(prefs===undefined){throw new Error('Missing required parameter: "prefs"')} +let path='/account/prefs';let payload={};if(prefs){payload.prefs=prefs} +return http.patch(path,{'content-type':'application/json',},payload)},createRecovery:function(email,url){if(email===undefined){throw new Error('Missing required parameter: "email"')} +if(url===undefined){throw new Error('Missing required parameter: "url"')} +let path='/account/recovery';let payload={};if(email){payload.email=email} +if(url){payload.url=url} +return http.post(path,{'content-type':'application/json',},payload)},updateRecovery:function(userId,secret,password,passwordAgain){if(userId===undefined){throw new Error('Missing required parameter: "userId"')} +if(secret===undefined){throw new Error('Missing required parameter: "secret"')} +if(password===undefined){throw new Error('Missing required parameter: "password"')} +if(passwordAgain===undefined){throw new Error('Missing required parameter: "passwordAgain"')} +let path='/account/recovery';let payload={};if(userId){payload.userId=userId} +if(secret){payload.secret=secret} +if(password){payload.password=password} +if(passwordAgain){payload.passwordAgain=passwordAgain} +return http.put(path,{'content-type':'application/json',},payload)},getSessions:function(){let path='/account/sessions';let payload={};return http.get(path,{'content-type':'application/json',},payload)},createSession:function(email,password){if(email===undefined){throw new Error('Missing required parameter: "email"')} +if(password===undefined){throw new Error('Missing required parameter: "password"')} +let path='/account/sessions';let payload={};if(email){payload.email=email} +if(password){payload.password=password} +return http.post(path,{'content-type':'application/json',},payload)},deleteSessions:function(){let path='/account/sessions';let payload={};return http.delete(path,{'content-type':'application/json',},payload)},createOAuth2Session:function(provider,success='https://appwrite.io/auth/oauth2/success',failure='https://appwrite.io/auth/oauth2/failure',scopes=[]){if(provider===undefined){throw new Error('Missing required parameter: "provider"')} +let path='/account/sessions/oauth2/{provider}'.replace(new RegExp('{provider}','g'),provider);let payload={};if(success){payload.success=success} +if(failure){payload.failure=failure} +if(scopes){payload.scopes=scopes} +payload.project=config.project;let query=[];for(let p in payload){if(Array.isArray(payload[p])){for(let index=0;index; + + /** + * Create Account + * + * Use this endpoint to allow a new user to register a new account in your + * project. After the user registration completes successfully, you can use + * the [/account/verfication](/docs/client/account#createVerification) route + * to start verifying the user email address. To allow your new user to login + * to his new account, you need to create a new [account + * session](/docs/client/account#createSession). + * + * @param {string} email + * @param {string} password + * @param {string} name + * @throws {Error} + * @return {Promise} + */ + create(email: string, password: string, name: string): Promise; + + /** + * Delete Account + * + * Delete a currently logged in user account. Behind the scene, the user + * record is not deleted but permanently blocked from any access. This is done + * to avoid deleted accounts being overtaken by new users with the same email + * address. Any user-related resources like documents or storage files should + * be deleted separately. + * + * @throws {Error} + * @return {Promise} + */ + delete(): Promise; + + /** + * Update Account Email + * + * Update currently logged in user account email address. After changing user + * address, user confirmation status is being reset and a new confirmation + * mail is sent. For security measures, user password is required to complete + * this request. + * + * @param {string} email + * @param {string} password + * @throws {Error} + * @return {Promise} + */ + updateEmail(email: string, password: string): Promise; + + /** + * Get Account Logs + * + * Get currently logged in user list of latest security activity logs. Each + * log returns user IP address, location and date and time of log. + * + * @throws {Error} + * @return {Promise} + */ + getLogs(): Promise; + + /** + * Update Account Name + * + * Update currently logged in user account name. + * + * @param {string} name + * @throws {Error} + * @return {Promise} + */ + updateName(name: string): Promise; + + /** + * Update Account Password + * + * Update currently logged in user password. For validation, user is required + * to pass the password twice. + * + * @param {string} password + * @param {string} oldPassword + * @throws {Error} + * @return {Promise} + */ + updatePassword(password: string, oldPassword: string): Promise; + + /** + * Get Account Preferences + * + * Get currently logged in user preferences as a key-value object. + * + * @throws {Error} + * @return {Promise} + */ + getPrefs(): Promise; + + /** + * Update Account Preferences + * + * Update currently logged in user account preferences. You can pass only the + * specific settings you wish to update. + * + * @param {object} prefs + * @throws {Error} + * @return {Promise} + */ + updatePrefs(prefs: object): Promise; + + /** + * Create Password Recovery + * + * Sends the user an email with a temporary secret key for password reset. + * When the user clicks the confirmation link he is redirected back to your + * app password reset URL with the secret key and email address values + * attached to the URL query string. Use the query string params to submit a + * request to the [PUT /account/recovery](/docs/client/account#updateRecovery) + * endpoint to complete the process. + * + * @param {string} email + * @param {string} url + * @throws {Error} + * @return {Promise} + */ + createRecovery(email: string, url: string): Promise; + + /** + * Complete Password Recovery + * + * Use this endpoint to complete the user account password reset. Both the + * **userId** and **secret** arguments will be passed as query parameters to + * the redirect URL you have provided when sending your request to the [POST + * /account/recovery](/docs/client/account#createRecovery) endpoint. + * + * Please note that in order to avoid a [Redirect + * Attack](https://github.com/OWASP/CheatSheetSeries/blob/master/cheatsheets/Unvalidated_Redirects_and_Forwards_Cheat_Sheet.md) + * the only valid redirect URLs are the ones from domains you have set when + * adding your platforms in the console interface. + * + * @param {string} userId + * @param {string} secret + * @param {string} password + * @param {string} passwordAgain + * @throws {Error} + * @return {Promise} + */ + updateRecovery(userId: string, secret: string, password: string, passwordAgain: string): Promise; + + /** + * Get Account Sessions + * + * Get currently logged in user list of active sessions across different + * devices. + * + * @throws {Error} + * @return {Promise} + */ + getSessions(): Promise; + + /** + * Create Account Session + * + * Allow the user to login into his account by providing a valid email and + * password combination. This route will create a new session for the user. + * + * @param {string} email + * @param {string} password + * @throws {Error} + * @return {Promise} + */ + createSession(email: string, password: string): Promise; + + /** + * Delete All Account Sessions + * + * Delete all sessions from the user account and remove any sessions cookies + * from the end client. + * + * @throws {Error} + * @return {Promise} + */ + deleteSessions(): Promise; + + /** + * Create Account Session with OAuth2 + * + * Allow the user to login to his account using the OAuth2 provider of his + * choice. Each OAuth2 provider should be enabled from the Appwrite console + * first. Use the success and failure arguments to provide a redirect URL's + * back to your app when login is completed. + * + * @param {string} provider + * @param {string} success + * @param {string} failure + * @param {string[]} scopes + * @throws {Error} + * @return {Promise} + */ + createOAuth2Session(provider: string, success: string, failure: string, scopes: string[]): Promise; + + /** + * Delete Account Session + * + * Use this endpoint to log out the currently logged in user from all his + * account sessions across all his different devices. When using the option id + * argument, only the session unique ID provider will be deleted. + * + * @param {string} sessionId + * @throws {Error} + * @return {Promise} + */ + deleteSession(sessionId: string): Promise; + + /** + * Create Email Verification + * + * Use this endpoint to send a verification message to your user email address + * to confirm they are the valid owners of that address. Both the **userId** + * and **secret** arguments will be passed as query parameters to the URL you + * have provided to be attached to the verification email. The provided URL + * should redirect the user back to your app and allow you to complete the + * verification process by verifying both the **userId** and **secret** + * parameters. Learn more about how to [complete the verification + * process](/docs/client/account#updateAccountVerification). + * + * Please note that in order to avoid a [Redirect + * Attack](https://github.com/OWASP/CheatSheetSeries/blob/master/cheatsheets/Unvalidated_Redirects_and_Forwards_Cheat_Sheet.md), + * the only valid redirect URLs are the ones from domains you have set when + * adding your platforms in the console interface. + * + * + * @param {string} url + * @throws {Error} + * @return {Promise} + */ + createVerification(url: string): Promise; + + /** + * Complete Email Verification + * + * Use this endpoint to complete the user email verification process. Use both + * the **userId** and **secret** parameters that were attached to your app URL + * to verify the user email ownership. If confirmed this route will return a + * 200 status code. + * + * @param {string} userId + * @param {string} secret + * @throws {Error} + * @return {Promise} + */ + updateVerification(userId: string, secret: string): Promise; + + } + + export interface Avatars { + + /** + * Get Browser Icon + * + * You can use this endpoint to show different browser icons to your users. + * The code argument receives the browser code as it appears in your user + * /account/sessions endpoint. Use width, height and quality arguments to + * change the output settings. + * + * @param {string} code + * @param {number} width + * @param {number} height + * @param {number} quality + * @throws {Error} + * @return {string} + */ + getBrowser(code: string, width: number, height: number, quality: number): string; + + /** + * Get Credit Card Icon + * + * Need to display your users with your billing method or their payment + * methods? The credit card endpoint will return you the icon of the credit + * card provider you need. Use width, height and quality arguments to change + * the output settings. + * + * @param {string} code + * @param {number} width + * @param {number} height + * @param {number} quality + * @throws {Error} + * @return {string} + */ + getCreditCard(code: string, width: number, height: number, quality: number): string; + + /** + * Get Favicon + * + * Use this endpoint to fetch the favorite icon (AKA favicon) of a any remote + * website URL. + * + * @param {string} url + * @throws {Error} + * @return {string} + */ + getFavicon(url: string): string; + + /** + * Get Country Flag + * + * You can use this endpoint to show different country flags icons to your + * users. The code argument receives the 2 letter country code. Use width, + * height and quality arguments to change the output settings. + * + * @param {string} code + * @param {number} width + * @param {number} height + * @param {number} quality + * @throws {Error} + * @return {string} + */ + getFlag(code: string, width: number, height: number, quality: number): string; + + /** + * Get Image from URL + * + * Use this endpoint to fetch a remote image URL and crop it to any image size + * you want. This endpoint is very useful if you need to crop and display + * remote images in your app or in case you want to make sure a 3rd party + * image is properly served using a TLS protocol. + * + * @param {string} url + * @param {number} width + * @param {number} height + * @throws {Error} + * @return {string} + */ + getImage(url: string, width: number, height: number): string; + + /** + * Get User Initials + * + * Use this endpoint to show your user initials avatar icon on your website or + * app. By default, this route will try to print your logged-in user name or + * email initials. You can also overwrite the user name if you pass the 'name' + * parameter. If no name is given and no user is logged, an empty avatar will + * be returned. + * + * You can use the color and background params to change the avatar colors. By + * default, a random theme will be selected. The random theme will persist for + * the user's initials when reloading the same theme will always return for + * the same initials. + * + * @param {string} name + * @param {number} width + * @param {number} height + * @param {string} color + * @param {string} background + * @throws {Error} + * @return {string} + */ + getInitials(name: string, width: number, height: number, color: string, background: string): string; + + /** + * Get QR Code + * + * Converts a given plain text to a QR code image. You can use the query + * parameters to change the size and style of the resulting image. + * + * @param {string} text + * @param {number} size + * @param {number} margin + * @param {boolean} download + * @throws {Error} + * @return {string} + */ + getQR(text: string, size: number, margin: number, download: boolean): string; + + } + + export interface Database { + + /** + * List Documents + * + * Get a list of all the user documents. You can use the query params to + * filter your results. On admin mode, this endpoint will return a list of all + * of the project documents. [Learn more about different API + * modes](/docs/admin). + * + * @param {string} collectionId + * @param {string[]} filters + * @param {number} limit + * @param {number} offset + * @param {string} orderField + * @param {string} orderType + * @param {string} orderCast + * @param {string} search + * @throws {Error} + * @return {Promise} + */ + listDocuments(collectionId: string, filters: string[], limit: number, offset: number, orderField: string, orderType: string, orderCast: string, search: string): Promise; + + /** + * Create Document + * + * Create a new Document. Before using this route, you should create a new + * collection resource using either a [server + * integration](/docs/server/database?sdk=nodejs#createCollection) API or + * directly from your database console. + * + * @param {string} collectionId + * @param {object} data + * @param {string[]} read + * @param {string[]} write + * @param {string} parentDocument + * @param {string} parentProperty + * @param {string} parentPropertyType + * @throws {Error} + * @return {Promise} + */ + createDocument(collectionId: string, data: object, read: string[], write: string[], parentDocument: string, parentProperty: string, parentPropertyType: string): Promise; + + /** + * Get Document + * + * Get document by its unique ID. This endpoint response returns a JSON object + * with the document data. + * + * @param {string} collectionId + * @param {string} documentId + * @throws {Error} + * @return {Promise} + */ + getDocument(collectionId: string, documentId: string): Promise; + + /** + * Update Document + * + * + * @param {string} collectionId + * @param {string} documentId + * @param {object} data + * @param {string[]} read + * @param {string[]} write + * @throws {Error} + * @return {Promise} + */ + updateDocument(collectionId: string, documentId: string, data: object, read: string[], write: string[]): Promise; + + /** + * Delete Document + * + * Delete document by its unique ID. This endpoint deletes only the parent + * documents, his attributes and relations to other documents. Child documents + * **will not** be deleted. + * + * @param {string} collectionId + * @param {string} documentId + * @throws {Error} + * @return {Promise} + */ + deleteDocument(collectionId: string, documentId: string): Promise; + + } + + export interface Locale { + + /** + * Get User Locale + * + * Get the current user location based on IP. Returns an object with user + * country code, country name, continent name, continent code, ip address and + * suggested currency. You can use the locale header to get the data in a + * supported language. + * + * ([IP Geolocation by DB-IP](https://db-ip.com)) + * + * @throws {Error} + * @return {Promise} + */ + get(): Promise; + + /** + * List Continents + * + * List of all continents. You can use the locale header to get the data in a + * supported language. + * + * @throws {Error} + * @return {Promise} + */ + getContinents(): Promise; + + /** + * List Countries + * + * List of all countries. You can use the locale header to get the data in a + * supported language. + * + * @throws {Error} + * @return {Promise} + */ + getCountries(): Promise; + + /** + * List EU Countries + * + * List of all countries that are currently members of the EU. You can use the + * locale header to get the data in a supported language. + * + * @throws {Error} + * @return {Promise} + */ + getCountriesEU(): Promise; + + /** + * List Countries Phone Codes + * + * List of all countries phone codes. You can use the locale header to get the + * data in a supported language. + * + * @throws {Error} + * @return {Promise} + */ + getCountriesPhones(): Promise; + + /** + * List Currencies + * + * List of all currencies, including currency symbol, name, plural, and + * decimal digits for all major and minor currencies. You can use the locale + * header to get the data in a supported language. + * + * @throws {Error} + * @return {Promise} + */ + getCurrencies(): Promise; + + /** + * List Languages + * + * List of all languages classified by ISO 639-1 including 2-letter code, name + * in English, and name in the respective language. + * + * @throws {Error} + * @return {Promise} + */ + getLanguages(): Promise; + + } + + export interface Storage { + + /** + * List Files + * + * Get a list of all the user files. You can use the query params to filter + * your results. On admin mode, this endpoint will return a list of all of the + * project files. [Learn more about different API modes](/docs/admin). + * + * @param {string} search + * @param {number} limit + * @param {number} offset + * @param {string} orderType + * @throws {Error} + * @return {Promise} + */ + listFiles(search: string, limit: number, offset: number, orderType: string): Promise; + + /** + * Create File + * + * Create a new file. The user who creates the file will automatically be + * assigned to read and write access unless he has passed custom values for + * read and write arguments. + * + * @param {File} file + * @param {string[]} read + * @param {string[]} write + * @throws {Error} + * @return {Promise} + */ + createFile(file: File, read: string[], write: string[]): Promise; + + /** + * Get File + * + * Get file by its unique ID. This endpoint response returns a JSON object + * with the file metadata. + * + * @param {string} fileId + * @throws {Error} + * @return {Promise} + */ + getFile(fileId: string): Promise; + + /** + * Update File + * + * Update file by its unique ID. Only users with write permissions have access + * to update this resource. + * + * @param {string} fileId + * @param {string[]} read + * @param {string[]} write + * @throws {Error} + * @return {Promise} + */ + updateFile(fileId: string, read: string[], write: string[]): Promise; + + /** + * Delete File + * + * Delete a file by its unique ID. Only users with write permissions have + * access to delete this resource. + * + * @param {string} fileId + * @throws {Error} + * @return {Promise} + */ + deleteFile(fileId: string): Promise; + + /** + * Get File for Download + * + * Get file content by its unique ID. The endpoint response return with a + * 'Content-Disposition: attachment' header that tells the browser to start + * downloading the file to user downloads directory. + * + * @param {string} fileId + * @throws {Error} + * @return {string} + */ + getFileDownload(fileId: string): string; + + /** + * Get File Preview + * + * Get a file preview image. Currently, this method supports preview for image + * files (jpg, png, and gif), other supported formats, like pdf, docs, slides, + * and spreadsheets, will return the file icon image. You can also pass query + * string arguments for cutting and resizing your preview image. + * + * @param {string} fileId + * @param {number} width + * @param {number} height + * @param {number} quality + * @param {string} background + * @param {string} output + * @throws {Error} + * @return {string} + */ + getFilePreview(fileId: string, width: number, height: number, quality: number, background: string, output: string): string; + + /** + * Get File for View + * + * Get file content by its unique ID. This endpoint is similar to the download + * method but returns with no 'Content-Disposition: attachment' header. + * + * @param {string} fileId + * @param {string} as + * @throws {Error} + * @return {string} + */ + getFileView(fileId: string, as: string): string; + + } + + export interface Teams { + + /** + * List Teams + * + * Get a list of all the current user teams. You can use the query params to + * filter your results. On admin mode, this endpoint will return a list of all + * of the project teams. [Learn more about different API modes](/docs/admin). + * + * @param {string} search + * @param {number} limit + * @param {number} offset + * @param {string} orderType + * @throws {Error} + * @return {Promise} + */ + list(search: string, limit: number, offset: number, orderType: string): Promise; + + /** + * Create Team + * + * Create a new team. The user who creates the team will automatically be + * assigned as the owner of the team. The team owner can invite new members, + * who will be able add new owners and update or delete the team from your + * project. + * + * @param {string} name + * @param {string[]} roles + * @throws {Error} + * @return {Promise} + */ + create(name: string, roles: string[]): Promise; + + /** + * Get Team + * + * Get team by its unique ID. All team members have read access for this + * resource. + * + * @param {string} teamId + * @throws {Error} + * @return {Promise} + */ + get(teamId: string): Promise; + + /** + * Update Team + * + * Update team by its unique ID. Only team owners have write access for this + * resource. + * + * @param {string} teamId + * @param {string} name + * @throws {Error} + * @return {Promise} + */ + update(teamId: string, name: string): Promise; + + /** + * Delete Team + * + * Delete team by its unique ID. Only team owners have write access for this + * resource. + * + * @param {string} teamId + * @throws {Error} + * @return {Promise} + */ + delete(teamId: string): Promise; + + /** + * Get Team Memberships + * + * Get team members by the team unique ID. All team members have read access + * for this list of resources. + * + * @param {string} teamId + * @param {string} search + * @param {number} limit + * @param {number} offset + * @param {string} orderType + * @throws {Error} + * @return {Promise} + */ + getMemberships(teamId: string, search: string, limit: number, offset: number, orderType: string): Promise; + + /** + * Create Team Membership + * + * Use this endpoint to invite a new member to join your team. An email with a + * link to join the team will be sent to the new member email address if the + * member doesn't exist in the project it will be created automatically. + * + * Use the 'URL' parameter to redirect the user from the invitation email back + * to your app. When the user is redirected, use the [Update Team Membership + * Status](/docs/client/teams#updateMembershipStatus) endpoint to allow the + * user to accept the invitation to the team. + * + * Please note that in order to avoid a [Redirect + * Attacks](https://github.com/OWASP/CheatSheetSeries/blob/master/cheatsheets/Unvalidated_Redirects_and_Forwards_Cheat_Sheet.md) + * the only valid redirect URL's are the once from domains you have set when + * added your platforms in the console interface. + * + * @param {string} teamId + * @param {string} email + * @param {string[]} roles + * @param {string} url + * @param {string} name + * @throws {Error} + * @return {Promise} + */ + createMembership(teamId: string, email: string, roles: string[], url: string, name: string): Promise; + + /** + * Delete Team Membership + * + * This endpoint allows a user to leave a team or for a team owner to delete + * the membership of any other team member. You can also use this endpoint to + * delete a user membership even if he didn't accept it. + * + * @param {string} teamId + * @param {string} inviteId + * @throws {Error} + * @return {Promise} + */ + deleteMembership(teamId: string, inviteId: string): Promise; + + /** + * Update Team Membership Status + * + * Use this endpoint to allow a user to accept an invitation to join a team + * after he is being redirected back to your app from the invitation email he + * was sent. + * + * @param {string} teamId + * @param {string} inviteId + * @param {string} userId + * @param {string} secret + * @throws {Error} + * @return {Promise} + */ + updateMembershipStatus(teamId: string, inviteId: string, userId: string, secret: string): Promise; + + } + + +} \ No newline at end of file diff --git a/app/sdks/0.7.0/console-web/CHANGELOG.md b/app/sdks/0.7.0/console-web/CHANGELOG.md new file mode 100644 index 0000000000..fa4d35e687 --- /dev/null +++ b/app/sdks/0.7.0/console-web/CHANGELOG.md @@ -0,0 +1 @@ +# Change Log \ No newline at end of file diff --git a/app/sdks/0.7.0/console-web/LICENSE b/app/sdks/0.7.0/console-web/LICENSE new file mode 100644 index 0000000000..fc7c051a91 --- /dev/null +++ b/app/sdks/0.7.0/console-web/LICENSE @@ -0,0 +1,12 @@ +Copyright (c) 2019 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: + + 1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. + + 2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. + + 3. Neither the name Appwrite nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. \ No newline at end of file diff --git a/app/sdks/0.7.0/console-web/README.md b/app/sdks/0.7.0/console-web/README.md new file mode 100644 index 0000000000..000e4988f1 --- /dev/null +++ b/app/sdks/0.7.0/console-web/README.md @@ -0,0 +1,44 @@ +# Appwrite Console SDK + +![License](https://img.shields.io/github/license/appwrite/sdk-for-console.svg?v=1) +![Version](https://img.shields.io/badge/api%20version-0.7.0-blue.svg?v=1) + +Appwrite is an open-source backend as a service server that abstract and simplify complex and repetitive development tasks behind a very simple to use REST API. Appwrite aims to help you develop your apps faster and in a more secure way. + Use the Console SDK to integrate your app with the Appwrite server to easily start interacting with all of Appwrite backend APIs and tools. + For full API documentation and tutorials go to [https://appwrite.io/docs](https://appwrite.io/docs) + +![Appwrite](https://appwrite.io/images/github.png) + +## Installation + +### NPM + +To install via [NPM](https://www.npmjs.com/): + +```bash +npm install appwrite --save +``` + +If you're using a bundler (like [Browserify](http://browserify.org/) or [webpack](https://webpack.js.org/)), you can import the Appwrite module when you need it: + +```js +import * as Appwrite from "appwrite"; +``` + +### CDN + +To install with a CDN (content delivery network) add the following scripts to the bottom of your tag, but before you use any Appwrite services: + +```html + +``` + + + +## Contribution + +This library is auto-generated by Appwrite custom [SDK Generator](https://github.com/appwrite/sdk-generator). To learn more about how you can help us improve this SDK, please check the [contribution guide](https://github.com/appwrite/sdk-generator/blob/master/CONTRIBUTING.md) before sending a pull-request. + +## License + +Please see the [BSD-3-Clause license](https://raw.githubusercontent.com/appwrite/appwrite/master/LICENSE) file for more information. \ No newline at end of file diff --git a/app/sdks/0.7.0/console-web/docs/examples/account/create-o-auth2session.md b/app/sdks/0.7.0/console-web/docs/examples/account/create-o-auth2session.md new file mode 100644 index 0000000000..3a2dcba651 --- /dev/null +++ b/app/sdks/0.7.0/console-web/docs/examples/account/create-o-auth2session.md @@ -0,0 +1,11 @@ +let sdk = new Appwrite(); + +sdk + .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID + .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key +; + +// Go to OAuth provider login page +sdk.account.createOAuth2Session('amazon'); + diff --git a/app/sdks/0.7.0/console-web/docs/examples/account/create-recovery.md b/app/sdks/0.7.0/console-web/docs/examples/account/create-recovery.md new file mode 100644 index 0000000000..d69269b351 --- /dev/null +++ b/app/sdks/0.7.0/console-web/docs/examples/account/create-recovery.md @@ -0,0 +1,15 @@ +let sdk = new Appwrite(); + +sdk + .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID + .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key +; + +let promise = sdk.account.createRecovery('email@example.com', 'https://example.com'); + +promise.then(function (response) { + console.log(response); // Success +}, function (error) { + console.log(error); // Failure +}); \ No newline at end of file diff --git a/app/sdks/0.7.0/console-web/docs/examples/account/create-session.md b/app/sdks/0.7.0/console-web/docs/examples/account/create-session.md new file mode 100644 index 0000000000..0734a84aaa --- /dev/null +++ b/app/sdks/0.7.0/console-web/docs/examples/account/create-session.md @@ -0,0 +1,15 @@ +let sdk = new Appwrite(); + +sdk + .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID + .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key +; + +let promise = sdk.account.createSession('email@example.com', 'password'); + +promise.then(function (response) { + console.log(response); // Success +}, function (error) { + console.log(error); // Failure +}); \ No newline at end of file diff --git a/app/sdks/0.7.0/console-web/docs/examples/account/create-verification.md b/app/sdks/0.7.0/console-web/docs/examples/account/create-verification.md new file mode 100644 index 0000000000..1211b5c642 --- /dev/null +++ b/app/sdks/0.7.0/console-web/docs/examples/account/create-verification.md @@ -0,0 +1,15 @@ +let sdk = new Appwrite(); + +sdk + .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID + .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key +; + +let promise = sdk.account.createVerification('https://example.com'); + +promise.then(function (response) { + console.log(response); // Success +}, function (error) { + console.log(error); // Failure +}); \ No newline at end of file diff --git a/app/sdks/0.7.0/console-web/docs/examples/account/create.md b/app/sdks/0.7.0/console-web/docs/examples/account/create.md new file mode 100644 index 0000000000..e61b1fbac4 --- /dev/null +++ b/app/sdks/0.7.0/console-web/docs/examples/account/create.md @@ -0,0 +1,15 @@ +let sdk = new Appwrite(); + +sdk + .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID + .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key +; + +let promise = sdk.account.create('email@example.com', 'password'); + +promise.then(function (response) { + console.log(response); // Success +}, function (error) { + console.log(error); // Failure +}); \ No newline at end of file diff --git a/app/sdks/0.7.0/console-web/docs/examples/account/delete-session.md b/app/sdks/0.7.0/console-web/docs/examples/account/delete-session.md new file mode 100644 index 0000000000..84505281f0 --- /dev/null +++ b/app/sdks/0.7.0/console-web/docs/examples/account/delete-session.md @@ -0,0 +1,15 @@ +let sdk = new Appwrite(); + +sdk + .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID + .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key +; + +let promise = sdk.account.deleteSession('[SESSION_ID]'); + +promise.then(function (response) { + console.log(response); // Success +}, function (error) { + console.log(error); // Failure +}); \ No newline at end of file diff --git a/app/sdks/0.7.0/console-web/docs/examples/account/delete-sessions.md b/app/sdks/0.7.0/console-web/docs/examples/account/delete-sessions.md new file mode 100644 index 0000000000..61bec86399 --- /dev/null +++ b/app/sdks/0.7.0/console-web/docs/examples/account/delete-sessions.md @@ -0,0 +1,15 @@ +let sdk = new Appwrite(); + +sdk + .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID + .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key +; + +let promise = sdk.account.deleteSessions(); + +promise.then(function (response) { + console.log(response); // Success +}, function (error) { + console.log(error); // Failure +}); \ No newline at end of file diff --git a/app/sdks/0.7.0/console-web/docs/examples/account/delete.md b/app/sdks/0.7.0/console-web/docs/examples/account/delete.md new file mode 100644 index 0000000000..dbb8dbf250 --- /dev/null +++ b/app/sdks/0.7.0/console-web/docs/examples/account/delete.md @@ -0,0 +1,15 @@ +let sdk = new Appwrite(); + +sdk + .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID + .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key +; + +let promise = sdk.account.delete(); + +promise.then(function (response) { + console.log(response); // Success +}, function (error) { + console.log(error); // Failure +}); \ No newline at end of file diff --git a/app/sdks/0.7.0/console-web/docs/examples/account/get-logs.md b/app/sdks/0.7.0/console-web/docs/examples/account/get-logs.md new file mode 100644 index 0000000000..12e6656c96 --- /dev/null +++ b/app/sdks/0.7.0/console-web/docs/examples/account/get-logs.md @@ -0,0 +1,15 @@ +let sdk = new Appwrite(); + +sdk + .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID + .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key +; + +let promise = sdk.account.getLogs(); + +promise.then(function (response) { + console.log(response); // Success +}, function (error) { + console.log(error); // Failure +}); \ No newline at end of file diff --git a/app/sdks/0.7.0/console-web/docs/examples/account/get-prefs.md b/app/sdks/0.7.0/console-web/docs/examples/account/get-prefs.md new file mode 100644 index 0000000000..e328baba32 --- /dev/null +++ b/app/sdks/0.7.0/console-web/docs/examples/account/get-prefs.md @@ -0,0 +1,15 @@ +let sdk = new Appwrite(); + +sdk + .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID + .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key +; + +let promise = sdk.account.getPrefs(); + +promise.then(function (response) { + console.log(response); // Success +}, function (error) { + console.log(error); // Failure +}); \ No newline at end of file diff --git a/app/sdks/0.7.0/console-web/docs/examples/account/get-sessions.md b/app/sdks/0.7.0/console-web/docs/examples/account/get-sessions.md new file mode 100644 index 0000000000..cb281dd4db --- /dev/null +++ b/app/sdks/0.7.0/console-web/docs/examples/account/get-sessions.md @@ -0,0 +1,15 @@ +let sdk = new Appwrite(); + +sdk + .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID + .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key +; + +let promise = sdk.account.getSessions(); + +promise.then(function (response) { + console.log(response); // Success +}, function (error) { + console.log(error); // Failure +}); \ No newline at end of file diff --git a/app/sdks/0.7.0/console-web/docs/examples/account/get.md b/app/sdks/0.7.0/console-web/docs/examples/account/get.md new file mode 100644 index 0000000000..82c96fb9db --- /dev/null +++ b/app/sdks/0.7.0/console-web/docs/examples/account/get.md @@ -0,0 +1,15 @@ +let sdk = new Appwrite(); + +sdk + .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID + .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key +; + +let promise = sdk.account.get(); + +promise.then(function (response) { + console.log(response); // Success +}, function (error) { + console.log(error); // Failure +}); \ No newline at end of file diff --git a/app/sdks/0.7.0/console-web/docs/examples/account/update-email.md b/app/sdks/0.7.0/console-web/docs/examples/account/update-email.md new file mode 100644 index 0000000000..c2caaf060e --- /dev/null +++ b/app/sdks/0.7.0/console-web/docs/examples/account/update-email.md @@ -0,0 +1,15 @@ +let sdk = new Appwrite(); + +sdk + .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID + .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key +; + +let promise = sdk.account.updateEmail('email@example.com', 'password'); + +promise.then(function (response) { + console.log(response); // Success +}, function (error) { + console.log(error); // Failure +}); \ No newline at end of file diff --git a/app/sdks/0.7.0/console-web/docs/examples/account/update-name.md b/app/sdks/0.7.0/console-web/docs/examples/account/update-name.md new file mode 100644 index 0000000000..047eba688b --- /dev/null +++ b/app/sdks/0.7.0/console-web/docs/examples/account/update-name.md @@ -0,0 +1,15 @@ +let sdk = new Appwrite(); + +sdk + .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID + .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key +; + +let promise = sdk.account.updateName('[NAME]'); + +promise.then(function (response) { + console.log(response); // Success +}, function (error) { + console.log(error); // Failure +}); \ No newline at end of file diff --git a/app/sdks/0.7.0/console-web/docs/examples/account/update-password.md b/app/sdks/0.7.0/console-web/docs/examples/account/update-password.md new file mode 100644 index 0000000000..d305031fa0 --- /dev/null +++ b/app/sdks/0.7.0/console-web/docs/examples/account/update-password.md @@ -0,0 +1,15 @@ +let sdk = new Appwrite(); + +sdk + .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID + .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key +; + +let promise = sdk.account.updatePassword('password', 'password'); + +promise.then(function (response) { + console.log(response); // Success +}, function (error) { + console.log(error); // Failure +}); \ No newline at end of file diff --git a/app/sdks/0.7.0/console-web/docs/examples/account/update-prefs.md b/app/sdks/0.7.0/console-web/docs/examples/account/update-prefs.md new file mode 100644 index 0000000000..8c4e402ae1 --- /dev/null +++ b/app/sdks/0.7.0/console-web/docs/examples/account/update-prefs.md @@ -0,0 +1,15 @@ +let sdk = new Appwrite(); + +sdk + .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID + .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key +; + +let promise = sdk.account.updatePrefs({}); + +promise.then(function (response) { + console.log(response); // Success +}, function (error) { + console.log(error); // Failure +}); \ No newline at end of file diff --git a/app/sdks/0.7.0/console-web/docs/examples/account/update-recovery.md b/app/sdks/0.7.0/console-web/docs/examples/account/update-recovery.md new file mode 100644 index 0000000000..235a4db481 --- /dev/null +++ b/app/sdks/0.7.0/console-web/docs/examples/account/update-recovery.md @@ -0,0 +1,15 @@ +let sdk = new Appwrite(); + +sdk + .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID + .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key +; + +let promise = sdk.account.updateRecovery('[USER_ID]', '[SECRET]', 'password', 'password'); + +promise.then(function (response) { + console.log(response); // Success +}, function (error) { + console.log(error); // Failure +}); \ No newline at end of file diff --git a/app/sdks/0.7.0/console-web/docs/examples/account/update-verification.md b/app/sdks/0.7.0/console-web/docs/examples/account/update-verification.md new file mode 100644 index 0000000000..ef2c384853 --- /dev/null +++ b/app/sdks/0.7.0/console-web/docs/examples/account/update-verification.md @@ -0,0 +1,15 @@ +let sdk = new Appwrite(); + +sdk + .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID + .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key +; + +let promise = sdk.account.updateVerification('[USER_ID]', '[SECRET]'); + +promise.then(function (response) { + console.log(response); // Success +}, function (error) { + console.log(error); // Failure +}); \ No newline at end of file diff --git a/app/sdks/0.7.0/console-web/docs/examples/avatars/get-browser.md b/app/sdks/0.7.0/console-web/docs/examples/avatars/get-browser.md new file mode 100644 index 0000000000..bbbdb9738f --- /dev/null +++ b/app/sdks/0.7.0/console-web/docs/examples/avatars/get-browser.md @@ -0,0 +1,11 @@ +let sdk = new Appwrite(); + +sdk + .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID + .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key +; + +let result = sdk.avatars.getBrowser('aa'); + +console.log(result); // Resource URL \ No newline at end of file diff --git a/app/sdks/0.7.0/console-web/docs/examples/avatars/get-credit-card.md b/app/sdks/0.7.0/console-web/docs/examples/avatars/get-credit-card.md new file mode 100644 index 0000000000..e1fab01cf2 --- /dev/null +++ b/app/sdks/0.7.0/console-web/docs/examples/avatars/get-credit-card.md @@ -0,0 +1,11 @@ +let sdk = new Appwrite(); + +sdk + .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID + .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key +; + +let result = sdk.avatars.getCreditCard('amex'); + +console.log(result); // Resource URL \ No newline at end of file diff --git a/app/sdks/0.7.0/console-web/docs/examples/avatars/get-favicon.md b/app/sdks/0.7.0/console-web/docs/examples/avatars/get-favicon.md new file mode 100644 index 0000000000..397986b11a --- /dev/null +++ b/app/sdks/0.7.0/console-web/docs/examples/avatars/get-favicon.md @@ -0,0 +1,11 @@ +let sdk = new Appwrite(); + +sdk + .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID + .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key +; + +let result = sdk.avatars.getFavicon('https://example.com'); + +console.log(result); // Resource URL \ No newline at end of file diff --git a/app/sdks/0.7.0/console-web/docs/examples/avatars/get-flag.md b/app/sdks/0.7.0/console-web/docs/examples/avatars/get-flag.md new file mode 100644 index 0000000000..6e90b72feb --- /dev/null +++ b/app/sdks/0.7.0/console-web/docs/examples/avatars/get-flag.md @@ -0,0 +1,11 @@ +let sdk = new Appwrite(); + +sdk + .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID + .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key +; + +let result = sdk.avatars.getFlag('af'); + +console.log(result); // Resource URL \ No newline at end of file diff --git a/app/sdks/0.7.0/console-web/docs/examples/avatars/get-image.md b/app/sdks/0.7.0/console-web/docs/examples/avatars/get-image.md new file mode 100644 index 0000000000..afd1a17cb5 --- /dev/null +++ b/app/sdks/0.7.0/console-web/docs/examples/avatars/get-image.md @@ -0,0 +1,11 @@ +let sdk = new Appwrite(); + +sdk + .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID + .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key +; + +let result = sdk.avatars.getImage('https://example.com'); + +console.log(result); // Resource URL \ No newline at end of file diff --git a/app/sdks/0.7.0/console-web/docs/examples/avatars/get-initials.md b/app/sdks/0.7.0/console-web/docs/examples/avatars/get-initials.md new file mode 100644 index 0000000000..dab6417ca5 --- /dev/null +++ b/app/sdks/0.7.0/console-web/docs/examples/avatars/get-initials.md @@ -0,0 +1,11 @@ +let sdk = new Appwrite(); + +sdk + .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID + .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key +; + +let result = sdk.avatars.getInitials(); + +console.log(result); // Resource URL \ No newline at end of file diff --git a/app/sdks/0.7.0/console-web/docs/examples/avatars/get-q-r.md b/app/sdks/0.7.0/console-web/docs/examples/avatars/get-q-r.md new file mode 100644 index 0000000000..31f490cedd --- /dev/null +++ b/app/sdks/0.7.0/console-web/docs/examples/avatars/get-q-r.md @@ -0,0 +1,11 @@ +let sdk = new Appwrite(); + +sdk + .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID + .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key +; + +let result = sdk.avatars.getQR('[TEXT]'); + +console.log(result); // Resource URL \ No newline at end of file diff --git a/app/sdks/0.7.0/console-web/docs/examples/bar/delete.md b/app/sdks/0.7.0/console-web/docs/examples/bar/delete.md new file mode 100644 index 0000000000..c60d7a75f0 --- /dev/null +++ b/app/sdks/0.7.0/console-web/docs/examples/bar/delete.md @@ -0,0 +1,15 @@ +let sdk = new Appwrite(); + +sdk + .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID + .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key +; + +let promise = sdk.bar.delete('[]', null, []); + +promise.then(function (response) { + console.log(response); // Success +}, function (error) { + console.log(error); // Failure +}); \ No newline at end of file diff --git a/app/sdks/0.7.0/console-web/docs/examples/bar/get.md b/app/sdks/0.7.0/console-web/docs/examples/bar/get.md new file mode 100644 index 0000000000..a690ffc039 --- /dev/null +++ b/app/sdks/0.7.0/console-web/docs/examples/bar/get.md @@ -0,0 +1,15 @@ +let sdk = new Appwrite(); + +sdk + .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID + .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key +; + +let promise = sdk.bar.get('[]', null, []); + +promise.then(function (response) { + console.log(response); // Success +}, function (error) { + console.log(error); // Failure +}); \ No newline at end of file diff --git a/app/sdks/0.7.0/console-web/docs/examples/bar/patch.md b/app/sdks/0.7.0/console-web/docs/examples/bar/patch.md new file mode 100644 index 0000000000..46ac2d7438 --- /dev/null +++ b/app/sdks/0.7.0/console-web/docs/examples/bar/patch.md @@ -0,0 +1,15 @@ +let sdk = new Appwrite(); + +sdk + .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID + .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key +; + +let promise = sdk.bar.patch('[]', null, []); + +promise.then(function (response) { + console.log(response); // Success +}, function (error) { + console.log(error); // Failure +}); \ No newline at end of file diff --git a/app/sdks/0.7.0/console-web/docs/examples/bar/post.md b/app/sdks/0.7.0/console-web/docs/examples/bar/post.md new file mode 100644 index 0000000000..4b21090c3f --- /dev/null +++ b/app/sdks/0.7.0/console-web/docs/examples/bar/post.md @@ -0,0 +1,15 @@ +let sdk = new Appwrite(); + +sdk + .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID + .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key +; + +let promise = sdk.bar.post('[]', null, []); + +promise.then(function (response) { + console.log(response); // Success +}, function (error) { + console.log(error); // Failure +}); \ No newline at end of file diff --git a/app/sdks/0.7.0/console-web/docs/examples/bar/put.md b/app/sdks/0.7.0/console-web/docs/examples/bar/put.md new file mode 100644 index 0000000000..8eac3ebad8 --- /dev/null +++ b/app/sdks/0.7.0/console-web/docs/examples/bar/put.md @@ -0,0 +1,15 @@ +let sdk = new Appwrite(); + +sdk + .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID + .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key +; + +let promise = sdk.bar.put('[]', null, []); + +promise.then(function (response) { + console.log(response); // Success +}, function (error) { + console.log(error); // Failure +}); \ No newline at end of file diff --git a/app/sdks/0.7.0/console-web/docs/examples/database/create-collection.md b/app/sdks/0.7.0/console-web/docs/examples/database/create-collection.md new file mode 100644 index 0000000000..a7a4b90197 --- /dev/null +++ b/app/sdks/0.7.0/console-web/docs/examples/database/create-collection.md @@ -0,0 +1,15 @@ +let sdk = new Appwrite(); + +sdk + .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID + .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key +; + +let promise = sdk.database.createCollection('[NAME]', [], [], []); + +promise.then(function (response) { + console.log(response); // Success +}, function (error) { + console.log(error); // Failure +}); \ No newline at end of file diff --git a/app/sdks/0.7.0/console-web/docs/examples/database/create-document.md b/app/sdks/0.7.0/console-web/docs/examples/database/create-document.md new file mode 100644 index 0000000000..64809c6156 --- /dev/null +++ b/app/sdks/0.7.0/console-web/docs/examples/database/create-document.md @@ -0,0 +1,15 @@ +let sdk = new Appwrite(); + +sdk + .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID + .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key +; + +let promise = sdk.database.createDocument('[COLLECTION_ID]', {}, [], []); + +promise.then(function (response) { + console.log(response); // Success +}, function (error) { + console.log(error); // Failure +}); \ No newline at end of file diff --git a/app/sdks/0.7.0/console-web/docs/examples/database/delete-collection.md b/app/sdks/0.7.0/console-web/docs/examples/database/delete-collection.md new file mode 100644 index 0000000000..bfb0706bf5 --- /dev/null +++ b/app/sdks/0.7.0/console-web/docs/examples/database/delete-collection.md @@ -0,0 +1,15 @@ +let sdk = new Appwrite(); + +sdk + .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID + .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key +; + +let promise = sdk.database.deleteCollection('[COLLECTION_ID]'); + +promise.then(function (response) { + console.log(response); // Success +}, function (error) { + console.log(error); // Failure +}); \ No newline at end of file diff --git a/app/sdks/0.7.0/console-web/docs/examples/database/delete-document.md b/app/sdks/0.7.0/console-web/docs/examples/database/delete-document.md new file mode 100644 index 0000000000..356a71a437 --- /dev/null +++ b/app/sdks/0.7.0/console-web/docs/examples/database/delete-document.md @@ -0,0 +1,15 @@ +let sdk = new Appwrite(); + +sdk + .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID + .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key +; + +let promise = sdk.database.deleteDocument('[COLLECTION_ID]', '[DOCUMENT_ID]'); + +promise.then(function (response) { + console.log(response); // Success +}, function (error) { + console.log(error); // Failure +}); \ No newline at end of file diff --git a/app/sdks/0.7.0/console-web/docs/examples/database/get-collection-logs.md b/app/sdks/0.7.0/console-web/docs/examples/database/get-collection-logs.md new file mode 100644 index 0000000000..8934910901 --- /dev/null +++ b/app/sdks/0.7.0/console-web/docs/examples/database/get-collection-logs.md @@ -0,0 +1,15 @@ +let sdk = new Appwrite(); + +sdk + .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID + .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key +; + +let promise = sdk.database.getCollectionLogs('[COLLECTION_ID]'); + +promise.then(function (response) { + console.log(response); // Success +}, function (error) { + console.log(error); // Failure +}); \ No newline at end of file diff --git a/app/sdks/0.7.0/console-web/docs/examples/database/get-collection.md b/app/sdks/0.7.0/console-web/docs/examples/database/get-collection.md new file mode 100644 index 0000000000..d74d4b3225 --- /dev/null +++ b/app/sdks/0.7.0/console-web/docs/examples/database/get-collection.md @@ -0,0 +1,15 @@ +let sdk = new Appwrite(); + +sdk + .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID + .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key +; + +let promise = sdk.database.getCollection('[COLLECTION_ID]'); + +promise.then(function (response) { + console.log(response); // Success +}, function (error) { + console.log(error); // Failure +}); \ No newline at end of file diff --git a/app/sdks/0.7.0/console-web/docs/examples/database/get-document.md b/app/sdks/0.7.0/console-web/docs/examples/database/get-document.md new file mode 100644 index 0000000000..51638880c5 --- /dev/null +++ b/app/sdks/0.7.0/console-web/docs/examples/database/get-document.md @@ -0,0 +1,15 @@ +let sdk = new Appwrite(); + +sdk + .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID + .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key +; + +let promise = sdk.database.getDocument('[COLLECTION_ID]', '[DOCUMENT_ID]'); + +promise.then(function (response) { + console.log(response); // Success +}, function (error) { + console.log(error); // Failure +}); \ No newline at end of file diff --git a/app/sdks/0.7.0/console-web/docs/examples/database/list-collections.md b/app/sdks/0.7.0/console-web/docs/examples/database/list-collections.md new file mode 100644 index 0000000000..8a18249748 --- /dev/null +++ b/app/sdks/0.7.0/console-web/docs/examples/database/list-collections.md @@ -0,0 +1,15 @@ +let sdk = new Appwrite(); + +sdk + .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID + .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key +; + +let promise = sdk.database.listCollections(); + +promise.then(function (response) { + console.log(response); // Success +}, function (error) { + console.log(error); // Failure +}); \ No newline at end of file diff --git a/app/sdks/0.7.0/console-web/docs/examples/database/list-documents.md b/app/sdks/0.7.0/console-web/docs/examples/database/list-documents.md new file mode 100644 index 0000000000..1d895a566a --- /dev/null +++ b/app/sdks/0.7.0/console-web/docs/examples/database/list-documents.md @@ -0,0 +1,15 @@ +let sdk = new Appwrite(); + +sdk + .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID + .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key +; + +let promise = sdk.database.listDocuments('[COLLECTION_ID]'); + +promise.then(function (response) { + console.log(response); // Success +}, function (error) { + console.log(error); // Failure +}); \ No newline at end of file diff --git a/app/sdks/0.7.0/console-web/docs/examples/database/update-collection.md b/app/sdks/0.7.0/console-web/docs/examples/database/update-collection.md new file mode 100644 index 0000000000..f00a6c6f8c --- /dev/null +++ b/app/sdks/0.7.0/console-web/docs/examples/database/update-collection.md @@ -0,0 +1,15 @@ +let sdk = new Appwrite(); + +sdk + .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID + .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key +; + +let promise = sdk.database.updateCollection('[COLLECTION_ID]', '[NAME]', [], []); + +promise.then(function (response) { + console.log(response); // Success +}, function (error) { + console.log(error); // Failure +}); \ No newline at end of file diff --git a/app/sdks/0.7.0/console-web/docs/examples/database/update-document.md b/app/sdks/0.7.0/console-web/docs/examples/database/update-document.md new file mode 100644 index 0000000000..52c172ab6a --- /dev/null +++ b/app/sdks/0.7.0/console-web/docs/examples/database/update-document.md @@ -0,0 +1,15 @@ +let sdk = new Appwrite(); + +sdk + .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID + .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key +; + +let promise = sdk.database.updateDocument('[COLLECTION_ID]', '[DOCUMENT_ID]', {}, [], []); + +promise.then(function (response) { + console.log(response); // Success +}, function (error) { + console.log(error); // Failure +}); \ No newline at end of file diff --git a/app/sdks/0.7.0/console-web/docs/examples/foo/delete.md b/app/sdks/0.7.0/console-web/docs/examples/foo/delete.md new file mode 100644 index 0000000000..715289a5b8 --- /dev/null +++ b/app/sdks/0.7.0/console-web/docs/examples/foo/delete.md @@ -0,0 +1,15 @@ +let sdk = new Appwrite(); + +sdk + .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID + .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key +; + +let promise = sdk.foo.delete('[]', null, []); + +promise.then(function (response) { + console.log(response); // Success +}, function (error) { + console.log(error); // Failure +}); \ No newline at end of file diff --git a/app/sdks/0.7.0/console-web/docs/examples/foo/get.md b/app/sdks/0.7.0/console-web/docs/examples/foo/get.md new file mode 100644 index 0000000000..cb3ee31c9d --- /dev/null +++ b/app/sdks/0.7.0/console-web/docs/examples/foo/get.md @@ -0,0 +1,15 @@ +let sdk = new Appwrite(); + +sdk + .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID + .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key +; + +let promise = sdk.foo.get('[]', null, []); + +promise.then(function (response) { + console.log(response); // Success +}, function (error) { + console.log(error); // Failure +}); \ No newline at end of file diff --git a/app/sdks/0.7.0/console-web/docs/examples/foo/patch.md b/app/sdks/0.7.0/console-web/docs/examples/foo/patch.md new file mode 100644 index 0000000000..e39222e71d --- /dev/null +++ b/app/sdks/0.7.0/console-web/docs/examples/foo/patch.md @@ -0,0 +1,15 @@ +let sdk = new Appwrite(); + +sdk + .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID + .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key +; + +let promise = sdk.foo.patch('[]', null, []); + +promise.then(function (response) { + console.log(response); // Success +}, function (error) { + console.log(error); // Failure +}); \ No newline at end of file diff --git a/app/sdks/0.7.0/console-web/docs/examples/foo/post.md b/app/sdks/0.7.0/console-web/docs/examples/foo/post.md new file mode 100644 index 0000000000..4c236776f6 --- /dev/null +++ b/app/sdks/0.7.0/console-web/docs/examples/foo/post.md @@ -0,0 +1,15 @@ +let sdk = new Appwrite(); + +sdk + .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID + .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key +; + +let promise = sdk.foo.post('[]', null, []); + +promise.then(function (response) { + console.log(response); // Success +}, function (error) { + console.log(error); // Failure +}); \ No newline at end of file diff --git a/app/sdks/0.7.0/console-web/docs/examples/foo/put.md b/app/sdks/0.7.0/console-web/docs/examples/foo/put.md new file mode 100644 index 0000000000..d13c4c44ff --- /dev/null +++ b/app/sdks/0.7.0/console-web/docs/examples/foo/put.md @@ -0,0 +1,15 @@ +let sdk = new Appwrite(); + +sdk + .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID + .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key +; + +let promise = sdk.foo.put('[]', null, []); + +promise.then(function (response) { + console.log(response); // Success +}, function (error) { + console.log(error); // Failure +}); \ No newline at end of file diff --git a/app/sdks/0.7.0/console-web/docs/examples/functions/create-execution.md b/app/sdks/0.7.0/console-web/docs/examples/functions/create-execution.md new file mode 100644 index 0000000000..e70d7f931a --- /dev/null +++ b/app/sdks/0.7.0/console-web/docs/examples/functions/create-execution.md @@ -0,0 +1,15 @@ +let sdk = new Appwrite(); + +sdk + .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID + .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key +; + +let promise = sdk.functions.createExecution('[FUNCTION_ID]'); + +promise.then(function (response) { + console.log(response); // Success +}, function (error) { + console.log(error); // Failure +}); \ No newline at end of file diff --git a/app/sdks/0.7.0/console-web/docs/examples/functions/create-tag.md b/app/sdks/0.7.0/console-web/docs/examples/functions/create-tag.md new file mode 100644 index 0000000000..743517ff1a --- /dev/null +++ b/app/sdks/0.7.0/console-web/docs/examples/functions/create-tag.md @@ -0,0 +1,15 @@ +let sdk = new Appwrite(); + +sdk + .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID + .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key +; + +let promise = sdk.functions.createTag('[FUNCTION_ID]', '[COMMAND]', document.getElementById('uploader').files[0]); + +promise.then(function (response) { + console.log(response); // Success +}, function (error) { + console.log(error); // Failure +}); \ No newline at end of file diff --git a/app/sdks/0.7.0/console-web/docs/examples/functions/create.md b/app/sdks/0.7.0/console-web/docs/examples/functions/create.md new file mode 100644 index 0000000000..6fb506816f --- /dev/null +++ b/app/sdks/0.7.0/console-web/docs/examples/functions/create.md @@ -0,0 +1,15 @@ +let sdk = new Appwrite(); + +sdk + .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID + .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key +; + +let promise = sdk.functions.create('[NAME]', 'node-14'); + +promise.then(function (response) { + console.log(response); // Success +}, function (error) { + console.log(error); // Failure +}); \ No newline at end of file diff --git a/app/sdks/0.7.0/console-web/docs/examples/functions/delete-tag.md b/app/sdks/0.7.0/console-web/docs/examples/functions/delete-tag.md new file mode 100644 index 0000000000..9c1b5cdda3 --- /dev/null +++ b/app/sdks/0.7.0/console-web/docs/examples/functions/delete-tag.md @@ -0,0 +1,15 @@ +let sdk = new Appwrite(); + +sdk + .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID + .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key +; + +let promise = sdk.functions.deleteTag('[FUNCTION_ID]', '[TAG_ID]'); + +promise.then(function (response) { + console.log(response); // Success +}, function (error) { + console.log(error); // Failure +}); \ No newline at end of file diff --git a/app/sdks/0.7.0/console-web/docs/examples/functions/delete.md b/app/sdks/0.7.0/console-web/docs/examples/functions/delete.md new file mode 100644 index 0000000000..f76f809c2b --- /dev/null +++ b/app/sdks/0.7.0/console-web/docs/examples/functions/delete.md @@ -0,0 +1,15 @@ +let sdk = new Appwrite(); + +sdk + .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID + .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key +; + +let promise = sdk.functions.delete('[FUNCTION_ID]'); + +promise.then(function (response) { + console.log(response); // Success +}, function (error) { + console.log(error); // Failure +}); \ No newline at end of file diff --git a/app/sdks/0.7.0/console-web/docs/examples/functions/get-execution.md b/app/sdks/0.7.0/console-web/docs/examples/functions/get-execution.md new file mode 100644 index 0000000000..8287c4709e --- /dev/null +++ b/app/sdks/0.7.0/console-web/docs/examples/functions/get-execution.md @@ -0,0 +1,15 @@ +let sdk = new Appwrite(); + +sdk + .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID + .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key +; + +let promise = sdk.functions.getExecution('[FUNCTION_ID]', '[EXECUTION_ID]'); + +promise.then(function (response) { + console.log(response); // Success +}, function (error) { + console.log(error); // Failure +}); \ No newline at end of file diff --git a/app/sdks/0.7.0/console-web/docs/examples/functions/get-tag.md b/app/sdks/0.7.0/console-web/docs/examples/functions/get-tag.md new file mode 100644 index 0000000000..c6021ccdac --- /dev/null +++ b/app/sdks/0.7.0/console-web/docs/examples/functions/get-tag.md @@ -0,0 +1,15 @@ +let sdk = new Appwrite(); + +sdk + .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID + .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key +; + +let promise = sdk.functions.getTag('[FUNCTION_ID]', '[TAG_ID]'); + +promise.then(function (response) { + console.log(response); // Success +}, function (error) { + console.log(error); // Failure +}); \ No newline at end of file diff --git a/app/sdks/0.7.0/console-web/docs/examples/functions/get.md b/app/sdks/0.7.0/console-web/docs/examples/functions/get.md new file mode 100644 index 0000000000..dc068ffa09 --- /dev/null +++ b/app/sdks/0.7.0/console-web/docs/examples/functions/get.md @@ -0,0 +1,15 @@ +let sdk = new Appwrite(); + +sdk + .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID + .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key +; + +let promise = sdk.functions.get('[FUNCTION_ID]'); + +promise.then(function (response) { + console.log(response); // Success +}, function (error) { + console.log(error); // Failure +}); \ No newline at end of file diff --git a/app/sdks/0.7.0/console-web/docs/examples/functions/list-executions.md b/app/sdks/0.7.0/console-web/docs/examples/functions/list-executions.md new file mode 100644 index 0000000000..9367a9eb52 --- /dev/null +++ b/app/sdks/0.7.0/console-web/docs/examples/functions/list-executions.md @@ -0,0 +1,15 @@ +let sdk = new Appwrite(); + +sdk + .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID + .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key +; + +let promise = sdk.functions.listExecutions('[FUNCTION_ID]'); + +promise.then(function (response) { + console.log(response); // Success +}, function (error) { + console.log(error); // Failure +}); \ No newline at end of file diff --git a/app/sdks/0.7.0/console-web/docs/examples/functions/list-tags.md b/app/sdks/0.7.0/console-web/docs/examples/functions/list-tags.md new file mode 100644 index 0000000000..4542bae44b --- /dev/null +++ b/app/sdks/0.7.0/console-web/docs/examples/functions/list-tags.md @@ -0,0 +1,15 @@ +let sdk = new Appwrite(); + +sdk + .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID + .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key +; + +let promise = sdk.functions.listTags('[FUNCTION_ID]'); + +promise.then(function (response) { + console.log(response); // Success +}, function (error) { + console.log(error); // Failure +}); \ No newline at end of file diff --git a/app/sdks/0.7.0/console-web/docs/examples/functions/list.md b/app/sdks/0.7.0/console-web/docs/examples/functions/list.md new file mode 100644 index 0000000000..e2ce2511e0 --- /dev/null +++ b/app/sdks/0.7.0/console-web/docs/examples/functions/list.md @@ -0,0 +1,15 @@ +let sdk = new Appwrite(); + +sdk + .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID + .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key +; + +let promise = sdk.functions.list(); + +promise.then(function (response) { + console.log(response); // Success +}, function (error) { + console.log(error); // Failure +}); \ No newline at end of file diff --git a/app/sdks/0.7.0/console-web/docs/examples/functions/update-active.md b/app/sdks/0.7.0/console-web/docs/examples/functions/update-active.md new file mode 100644 index 0000000000..eed2be885c --- /dev/null +++ b/app/sdks/0.7.0/console-web/docs/examples/functions/update-active.md @@ -0,0 +1,14 @@ +let sdk = new Appwrite(); + +sdk + .setProject('5df5acd0d48c2') // Your project ID + .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key +; + +let promise = sdk.functions.updateActive('[FUNCTION_ID]', '[ACTIVE]'); + +promise.then(function (response) { + console.log(response); // Success +}, function (error) { + console.log(error); // Failure +}); \ No newline at end of file diff --git a/app/sdks/0.7.0/console-web/docs/examples/functions/update-tag.md b/app/sdks/0.7.0/console-web/docs/examples/functions/update-tag.md new file mode 100644 index 0000000000..7ea2ba1808 --- /dev/null +++ b/app/sdks/0.7.0/console-web/docs/examples/functions/update-tag.md @@ -0,0 +1,15 @@ +let sdk = new Appwrite(); + +sdk + .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID + .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key +; + +let promise = sdk.functions.updateTag('[FUNCTION_ID]', '[TAG]'); + +promise.then(function (response) { + console.log(response); // Success +}, function (error) { + console.log(error); // Failure +}); \ No newline at end of file diff --git a/app/sdks/0.7.0/console-web/docs/examples/functions/update.md b/app/sdks/0.7.0/console-web/docs/examples/functions/update.md new file mode 100644 index 0000000000..c6a34cff5c --- /dev/null +++ b/app/sdks/0.7.0/console-web/docs/examples/functions/update.md @@ -0,0 +1,15 @@ +let sdk = new Appwrite(); + +sdk + .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID + .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key +; + +let promise = sdk.functions.update('[FUNCTION_ID]', '[NAME]'); + +promise.then(function (response) { + console.log(response); // Success +}, function (error) { + console.log(error); // Failure +}); \ No newline at end of file diff --git a/app/sdks/0.7.0/console-web/docs/examples/general/empty.md b/app/sdks/0.7.0/console-web/docs/examples/general/empty.md new file mode 100644 index 0000000000..50fd0e8a5c --- /dev/null +++ b/app/sdks/0.7.0/console-web/docs/examples/general/empty.md @@ -0,0 +1,15 @@ +let sdk = new Appwrite(); + +sdk + .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID + .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key +; + +let promise = sdk.general.empty(); + +promise.then(function (response) { + console.log(response); // Success +}, function (error) { + console.log(error); // Failure +}); \ No newline at end of file diff --git a/app/sdks/0.7.0/console-web/docs/examples/general/get-cookie.md b/app/sdks/0.7.0/console-web/docs/examples/general/get-cookie.md new file mode 100644 index 0000000000..5785a0323f --- /dev/null +++ b/app/sdks/0.7.0/console-web/docs/examples/general/get-cookie.md @@ -0,0 +1,15 @@ +let sdk = new Appwrite(); + +sdk + .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID + .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key +; + +let promise = sdk.general.getCookie(); + +promise.then(function (response) { + console.log(response); // Success +}, function (error) { + console.log(error); // Failure +}); \ No newline at end of file diff --git a/app/sdks/0.7.0/console-web/docs/examples/general/redirect.md b/app/sdks/0.7.0/console-web/docs/examples/general/redirect.md new file mode 100644 index 0000000000..769533f6f6 --- /dev/null +++ b/app/sdks/0.7.0/console-web/docs/examples/general/redirect.md @@ -0,0 +1,15 @@ +let sdk = new Appwrite(); + +sdk + .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID + .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key +; + +let promise = sdk.general.redirect(); + +promise.then(function (response) { + console.log(response); // Success +}, function (error) { + console.log(error); // Failure +}); \ No newline at end of file diff --git a/app/sdks/0.7.0/console-web/docs/examples/general/redirected.md b/app/sdks/0.7.0/console-web/docs/examples/general/redirected.md new file mode 100644 index 0000000000..712e614ac9 --- /dev/null +++ b/app/sdks/0.7.0/console-web/docs/examples/general/redirected.md @@ -0,0 +1,15 @@ +let sdk = new Appwrite(); + +sdk + .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID + .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key +; + +let promise = sdk.general.redirected(); + +promise.then(function (response) { + console.log(response); // Success +}, function (error) { + console.log(error); // Failure +}); \ No newline at end of file diff --git a/app/sdks/0.7.0/console-web/docs/examples/general/set-cookie.md b/app/sdks/0.7.0/console-web/docs/examples/general/set-cookie.md new file mode 100644 index 0000000000..ee0f85cc1f --- /dev/null +++ b/app/sdks/0.7.0/console-web/docs/examples/general/set-cookie.md @@ -0,0 +1,15 @@ +let sdk = new Appwrite(); + +sdk + .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID + .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key +; + +let promise = sdk.general.setCookie(); + +promise.then(function (response) { + console.log(response); // Success +}, function (error) { + console.log(error); // Failure +}); \ No newline at end of file diff --git a/app/sdks/0.7.0/console-web/docs/examples/general/upload.md b/app/sdks/0.7.0/console-web/docs/examples/general/upload.md new file mode 100644 index 0000000000..bbc2bee92a --- /dev/null +++ b/app/sdks/0.7.0/console-web/docs/examples/general/upload.md @@ -0,0 +1,15 @@ +let sdk = new Appwrite(); + +sdk + .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID + .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key +; + +let promise = sdk.general.upload('[]', null, [], document.getElementById('uploader').files[0]); + +promise.then(function (response) { + console.log(response); // Success +}, function (error) { + console.log(error); // Failure +}); \ No newline at end of file diff --git a/app/sdks/0.7.0/console-web/docs/examples/health/get-anti-virus.md b/app/sdks/0.7.0/console-web/docs/examples/health/get-anti-virus.md new file mode 100644 index 0000000000..95b671992b --- /dev/null +++ b/app/sdks/0.7.0/console-web/docs/examples/health/get-anti-virus.md @@ -0,0 +1,15 @@ +let sdk = new Appwrite(); + +sdk + .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID + .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key +; + +let promise = sdk.health.getAntiVirus(); + +promise.then(function (response) { + console.log(response); // Success +}, function (error) { + console.log(error); // Failure +}); \ No newline at end of file diff --git a/app/sdks/0.7.0/console-web/docs/examples/health/get-cache.md b/app/sdks/0.7.0/console-web/docs/examples/health/get-cache.md new file mode 100644 index 0000000000..5c41d81868 --- /dev/null +++ b/app/sdks/0.7.0/console-web/docs/examples/health/get-cache.md @@ -0,0 +1,15 @@ +let sdk = new Appwrite(); + +sdk + .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID + .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key +; + +let promise = sdk.health.getCache(); + +promise.then(function (response) { + console.log(response); // Success +}, function (error) { + console.log(error); // Failure +}); \ No newline at end of file diff --git a/app/sdks/0.7.0/console-web/docs/examples/health/get-d-b.md b/app/sdks/0.7.0/console-web/docs/examples/health/get-d-b.md new file mode 100644 index 0000000000..407f87e2a1 --- /dev/null +++ b/app/sdks/0.7.0/console-web/docs/examples/health/get-d-b.md @@ -0,0 +1,15 @@ +let sdk = new Appwrite(); + +sdk + .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID + .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key +; + +let promise = sdk.health.getDB(); + +promise.then(function (response) { + console.log(response); // Success +}, function (error) { + console.log(error); // Failure +}); \ No newline at end of file diff --git a/app/sdks/0.7.0/console-web/docs/examples/health/get-queue-certificates.md b/app/sdks/0.7.0/console-web/docs/examples/health/get-queue-certificates.md new file mode 100644 index 0000000000..a115c869ba --- /dev/null +++ b/app/sdks/0.7.0/console-web/docs/examples/health/get-queue-certificates.md @@ -0,0 +1,15 @@ +let sdk = new Appwrite(); + +sdk + .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID + .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key +; + +let promise = sdk.health.getQueueCertificates(); + +promise.then(function (response) { + console.log(response); // Success +}, function (error) { + console.log(error); // Failure +}); \ No newline at end of file diff --git a/app/sdks/0.7.0/console-web/docs/examples/health/get-queue-functions.md b/app/sdks/0.7.0/console-web/docs/examples/health/get-queue-functions.md new file mode 100644 index 0000000000..3c0dc33acf --- /dev/null +++ b/app/sdks/0.7.0/console-web/docs/examples/health/get-queue-functions.md @@ -0,0 +1,15 @@ +let sdk = new Appwrite(); + +sdk + .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID + .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key +; + +let promise = sdk.health.getQueueFunctions(); + +promise.then(function (response) { + console.log(response); // Success +}, function (error) { + console.log(error); // Failure +}); \ No newline at end of file diff --git a/app/sdks/0.7.0/console-web/docs/examples/health/get-queue-logs.md b/app/sdks/0.7.0/console-web/docs/examples/health/get-queue-logs.md new file mode 100644 index 0000000000..b3d41b49c6 --- /dev/null +++ b/app/sdks/0.7.0/console-web/docs/examples/health/get-queue-logs.md @@ -0,0 +1,15 @@ +let sdk = new Appwrite(); + +sdk + .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID + .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key +; + +let promise = sdk.health.getQueueLogs(); + +promise.then(function (response) { + console.log(response); // Success +}, function (error) { + console.log(error); // Failure +}); \ No newline at end of file diff --git a/app/sdks/0.7.0/console-web/docs/examples/health/get-queue-tasks.md b/app/sdks/0.7.0/console-web/docs/examples/health/get-queue-tasks.md new file mode 100644 index 0000000000..4f34f670a6 --- /dev/null +++ b/app/sdks/0.7.0/console-web/docs/examples/health/get-queue-tasks.md @@ -0,0 +1,15 @@ +let sdk = new Appwrite(); + +sdk + .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID + .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key +; + +let promise = sdk.health.getQueueTasks(); + +promise.then(function (response) { + console.log(response); // Success +}, function (error) { + console.log(error); // Failure +}); \ No newline at end of file diff --git a/app/sdks/0.7.0/console-web/docs/examples/health/get-queue-usage.md b/app/sdks/0.7.0/console-web/docs/examples/health/get-queue-usage.md new file mode 100644 index 0000000000..3d234be2de --- /dev/null +++ b/app/sdks/0.7.0/console-web/docs/examples/health/get-queue-usage.md @@ -0,0 +1,15 @@ +let sdk = new Appwrite(); + +sdk + .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID + .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key +; + +let promise = sdk.health.getQueueUsage(); + +promise.then(function (response) { + console.log(response); // Success +}, function (error) { + console.log(error); // Failure +}); \ No newline at end of file diff --git a/app/sdks/0.7.0/console-web/docs/examples/health/get-queue-webhooks.md b/app/sdks/0.7.0/console-web/docs/examples/health/get-queue-webhooks.md new file mode 100644 index 0000000000..c5825dcf6c --- /dev/null +++ b/app/sdks/0.7.0/console-web/docs/examples/health/get-queue-webhooks.md @@ -0,0 +1,15 @@ +let sdk = new Appwrite(); + +sdk + .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID + .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key +; + +let promise = sdk.health.getQueueWebhooks(); + +promise.then(function (response) { + console.log(response); // Success +}, function (error) { + console.log(error); // Failure +}); \ No newline at end of file diff --git a/app/sdks/0.7.0/console-web/docs/examples/health/get-storage-local.md b/app/sdks/0.7.0/console-web/docs/examples/health/get-storage-local.md new file mode 100644 index 0000000000..7287745704 --- /dev/null +++ b/app/sdks/0.7.0/console-web/docs/examples/health/get-storage-local.md @@ -0,0 +1,15 @@ +let sdk = new Appwrite(); + +sdk + .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID + .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key +; + +let promise = sdk.health.getStorageLocal(); + +promise.then(function (response) { + console.log(response); // Success +}, function (error) { + console.log(error); // Failure +}); \ No newline at end of file diff --git a/app/sdks/0.7.0/console-web/docs/examples/health/get-time.md b/app/sdks/0.7.0/console-web/docs/examples/health/get-time.md new file mode 100644 index 0000000000..b6087b73d5 --- /dev/null +++ b/app/sdks/0.7.0/console-web/docs/examples/health/get-time.md @@ -0,0 +1,15 @@ +let sdk = new Appwrite(); + +sdk + .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID + .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key +; + +let promise = sdk.health.getTime(); + +promise.then(function (response) { + console.log(response); // Success +}, function (error) { + console.log(error); // Failure +}); \ No newline at end of file diff --git a/app/sdks/0.7.0/console-web/docs/examples/health/get.md b/app/sdks/0.7.0/console-web/docs/examples/health/get.md new file mode 100644 index 0000000000..1e7d6fe4e8 --- /dev/null +++ b/app/sdks/0.7.0/console-web/docs/examples/health/get.md @@ -0,0 +1,15 @@ +let sdk = new Appwrite(); + +sdk + .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID + .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key +; + +let promise = sdk.health.get(); + +promise.then(function (response) { + console.log(response); // Success +}, function (error) { + console.log(error); // Failure +}); \ No newline at end of file diff --git a/app/sdks/0.7.0/console-web/docs/examples/locale/get-continents.md b/app/sdks/0.7.0/console-web/docs/examples/locale/get-continents.md new file mode 100644 index 0000000000..93144335ea --- /dev/null +++ b/app/sdks/0.7.0/console-web/docs/examples/locale/get-continents.md @@ -0,0 +1,15 @@ +let sdk = new Appwrite(); + +sdk + .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID + .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key +; + +let promise = sdk.locale.getContinents(); + +promise.then(function (response) { + console.log(response); // Success +}, function (error) { + console.log(error); // Failure +}); \ No newline at end of file diff --git a/app/sdks/0.7.0/console-web/docs/examples/locale/get-countries-e-u.md b/app/sdks/0.7.0/console-web/docs/examples/locale/get-countries-e-u.md new file mode 100644 index 0000000000..fffc8696e8 --- /dev/null +++ b/app/sdks/0.7.0/console-web/docs/examples/locale/get-countries-e-u.md @@ -0,0 +1,15 @@ +let sdk = new Appwrite(); + +sdk + .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID + .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key +; + +let promise = sdk.locale.getCountriesEU(); + +promise.then(function (response) { + console.log(response); // Success +}, function (error) { + console.log(error); // Failure +}); \ No newline at end of file diff --git a/app/sdks/0.7.0/console-web/docs/examples/locale/get-countries-phones.md b/app/sdks/0.7.0/console-web/docs/examples/locale/get-countries-phones.md new file mode 100644 index 0000000000..751f4f6cc4 --- /dev/null +++ b/app/sdks/0.7.0/console-web/docs/examples/locale/get-countries-phones.md @@ -0,0 +1,15 @@ +let sdk = new Appwrite(); + +sdk + .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID + .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key +; + +let promise = sdk.locale.getCountriesPhones(); + +promise.then(function (response) { + console.log(response); // Success +}, function (error) { + console.log(error); // Failure +}); \ No newline at end of file diff --git a/app/sdks/0.7.0/console-web/docs/examples/locale/get-countries.md b/app/sdks/0.7.0/console-web/docs/examples/locale/get-countries.md new file mode 100644 index 0000000000..30b1dd95c7 --- /dev/null +++ b/app/sdks/0.7.0/console-web/docs/examples/locale/get-countries.md @@ -0,0 +1,15 @@ +let sdk = new Appwrite(); + +sdk + .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID + .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key +; + +let promise = sdk.locale.getCountries(); + +promise.then(function (response) { + console.log(response); // Success +}, function (error) { + console.log(error); // Failure +}); \ No newline at end of file diff --git a/app/sdks/0.7.0/console-web/docs/examples/locale/get-currencies.md b/app/sdks/0.7.0/console-web/docs/examples/locale/get-currencies.md new file mode 100644 index 0000000000..4c92714062 --- /dev/null +++ b/app/sdks/0.7.0/console-web/docs/examples/locale/get-currencies.md @@ -0,0 +1,15 @@ +let sdk = new Appwrite(); + +sdk + .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID + .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key +; + +let promise = sdk.locale.getCurrencies(); + +promise.then(function (response) { + console.log(response); // Success +}, function (error) { + console.log(error); // Failure +}); \ No newline at end of file diff --git a/app/sdks/0.7.0/console-web/docs/examples/locale/get-languages.md b/app/sdks/0.7.0/console-web/docs/examples/locale/get-languages.md new file mode 100644 index 0000000000..2d1f713eeb --- /dev/null +++ b/app/sdks/0.7.0/console-web/docs/examples/locale/get-languages.md @@ -0,0 +1,15 @@ +let sdk = new Appwrite(); + +sdk + .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID + .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key +; + +let promise = sdk.locale.getLanguages(); + +promise.then(function (response) { + console.log(response); // Success +}, function (error) { + console.log(error); // Failure +}); \ No newline at end of file diff --git a/app/sdks/0.7.0/console-web/docs/examples/locale/get.md b/app/sdks/0.7.0/console-web/docs/examples/locale/get.md new file mode 100644 index 0000000000..1fba9877b5 --- /dev/null +++ b/app/sdks/0.7.0/console-web/docs/examples/locale/get.md @@ -0,0 +1,15 @@ +let sdk = new Appwrite(); + +sdk + .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID + .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key +; + +let promise = sdk.locale.get(); + +promise.then(function (response) { + console.log(response); // Success +}, function (error) { + console.log(error); // Failure +}); \ No newline at end of file diff --git a/app/sdks/0.7.0/console-web/docs/examples/projects/create-domain.md b/app/sdks/0.7.0/console-web/docs/examples/projects/create-domain.md new file mode 100644 index 0000000000..756b869a85 --- /dev/null +++ b/app/sdks/0.7.0/console-web/docs/examples/projects/create-domain.md @@ -0,0 +1,15 @@ +let sdk = new Appwrite(); + +sdk + .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID + .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key +; + +let promise = sdk.projects.createDomain('[PROJECT_ID]', ''); + +promise.then(function (response) { + console.log(response); // Success +}, function (error) { + console.log(error); // Failure +}); \ No newline at end of file diff --git a/app/sdks/0.7.0/console-web/docs/examples/projects/create-key.md b/app/sdks/0.7.0/console-web/docs/examples/projects/create-key.md new file mode 100644 index 0000000000..9556f5b7f7 --- /dev/null +++ b/app/sdks/0.7.0/console-web/docs/examples/projects/create-key.md @@ -0,0 +1,15 @@ +let sdk = new Appwrite(); + +sdk + .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID + .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key +; + +let promise = sdk.projects.createKey('[PROJECT_ID]', '[NAME]', []); + +promise.then(function (response) { + console.log(response); // Success +}, function (error) { + console.log(error); // Failure +}); \ No newline at end of file diff --git a/app/sdks/0.7.0/console-web/docs/examples/projects/create-platform.md b/app/sdks/0.7.0/console-web/docs/examples/projects/create-platform.md new file mode 100644 index 0000000000..f4476fe599 --- /dev/null +++ b/app/sdks/0.7.0/console-web/docs/examples/projects/create-platform.md @@ -0,0 +1,15 @@ +let sdk = new Appwrite(); + +sdk + .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID + .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key +; + +let promise = sdk.projects.createPlatform('[PROJECT_ID]', 'web', '[NAME]'); + +promise.then(function (response) { + console.log(response); // Success +}, function (error) { + console.log(error); // Failure +}); \ No newline at end of file diff --git a/app/sdks/0.7.0/console-web/docs/examples/projects/create-task.md b/app/sdks/0.7.0/console-web/docs/examples/projects/create-task.md new file mode 100644 index 0000000000..9b0f3c1e03 --- /dev/null +++ b/app/sdks/0.7.0/console-web/docs/examples/projects/create-task.md @@ -0,0 +1,15 @@ +let sdk = new Appwrite(); + +sdk + .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID + .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key +; + +let promise = sdk.projects.createTask('[PROJECT_ID]', '[NAME]', 'play', '', false, 'GET', 'https://example.com'); + +promise.then(function (response) { + console.log(response); // Success +}, function (error) { + console.log(error); // Failure +}); \ No newline at end of file diff --git a/app/sdks/0.7.0/console-web/docs/examples/projects/create-webhook.md b/app/sdks/0.7.0/console-web/docs/examples/projects/create-webhook.md new file mode 100644 index 0000000000..be722f3dbe --- /dev/null +++ b/app/sdks/0.7.0/console-web/docs/examples/projects/create-webhook.md @@ -0,0 +1,15 @@ +let sdk = new Appwrite(); + +sdk + .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID + .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key +; + +let promise = sdk.projects.createWebhook('[PROJECT_ID]', '[NAME]', [], 'https://example.com', false); + +promise.then(function (response) { + console.log(response); // Success +}, function (error) { + console.log(error); // Failure +}); \ No newline at end of file diff --git a/app/sdks/0.7.0/console-web/docs/examples/projects/create.md b/app/sdks/0.7.0/console-web/docs/examples/projects/create.md new file mode 100644 index 0000000000..8041ed154e --- /dev/null +++ b/app/sdks/0.7.0/console-web/docs/examples/projects/create.md @@ -0,0 +1,15 @@ +let sdk = new Appwrite(); + +sdk + .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID + .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key +; + +let promise = sdk.projects.create('[NAME]', '[TEAM_ID]'); + +promise.then(function (response) { + console.log(response); // Success +}, function (error) { + console.log(error); // Failure +}); \ No newline at end of file diff --git a/app/sdks/0.7.0/console-web/docs/examples/projects/delete-domain.md b/app/sdks/0.7.0/console-web/docs/examples/projects/delete-domain.md new file mode 100644 index 0000000000..1b3df9363b --- /dev/null +++ b/app/sdks/0.7.0/console-web/docs/examples/projects/delete-domain.md @@ -0,0 +1,15 @@ +let sdk = new Appwrite(); + +sdk + .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID + .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key +; + +let promise = sdk.projects.deleteDomain('[PROJECT_ID]', '[DOMAIN_ID]'); + +promise.then(function (response) { + console.log(response); // Success +}, function (error) { + console.log(error); // Failure +}); \ No newline at end of file diff --git a/app/sdks/0.7.0/console-web/docs/examples/projects/delete-key.md b/app/sdks/0.7.0/console-web/docs/examples/projects/delete-key.md new file mode 100644 index 0000000000..dc855bcc30 --- /dev/null +++ b/app/sdks/0.7.0/console-web/docs/examples/projects/delete-key.md @@ -0,0 +1,15 @@ +let sdk = new Appwrite(); + +sdk + .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID + .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key +; + +let promise = sdk.projects.deleteKey('[PROJECT_ID]', '[KEY_ID]'); + +promise.then(function (response) { + console.log(response); // Success +}, function (error) { + console.log(error); // Failure +}); \ No newline at end of file diff --git a/app/sdks/0.7.0/console-web/docs/examples/projects/delete-platform.md b/app/sdks/0.7.0/console-web/docs/examples/projects/delete-platform.md new file mode 100644 index 0000000000..2a180c47e4 --- /dev/null +++ b/app/sdks/0.7.0/console-web/docs/examples/projects/delete-platform.md @@ -0,0 +1,15 @@ +let sdk = new Appwrite(); + +sdk + .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID + .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key +; + +let promise = sdk.projects.deletePlatform('[PROJECT_ID]', '[PLATFORM_ID]'); + +promise.then(function (response) { + console.log(response); // Success +}, function (error) { + console.log(error); // Failure +}); \ No newline at end of file diff --git a/app/sdks/0.7.0/console-web/docs/examples/projects/delete-task.md b/app/sdks/0.7.0/console-web/docs/examples/projects/delete-task.md new file mode 100644 index 0000000000..b7f9ad3e47 --- /dev/null +++ b/app/sdks/0.7.0/console-web/docs/examples/projects/delete-task.md @@ -0,0 +1,15 @@ +let sdk = new Appwrite(); + +sdk + .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID + .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key +; + +let promise = sdk.projects.deleteTask('[PROJECT_ID]', '[TASK_ID]'); + +promise.then(function (response) { + console.log(response); // Success +}, function (error) { + console.log(error); // Failure +}); \ No newline at end of file diff --git a/app/sdks/0.7.0/console-web/docs/examples/projects/delete-webhook.md b/app/sdks/0.7.0/console-web/docs/examples/projects/delete-webhook.md new file mode 100644 index 0000000000..c5e0588ad1 --- /dev/null +++ b/app/sdks/0.7.0/console-web/docs/examples/projects/delete-webhook.md @@ -0,0 +1,15 @@ +let sdk = new Appwrite(); + +sdk + .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID + .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key +; + +let promise = sdk.projects.deleteWebhook('[PROJECT_ID]', '[WEBHOOK_ID]'); + +promise.then(function (response) { + console.log(response); // Success +}, function (error) { + console.log(error); // Failure +}); \ No newline at end of file diff --git a/app/sdks/0.7.0/console-web/docs/examples/projects/delete.md b/app/sdks/0.7.0/console-web/docs/examples/projects/delete.md new file mode 100644 index 0000000000..20b67370f0 --- /dev/null +++ b/app/sdks/0.7.0/console-web/docs/examples/projects/delete.md @@ -0,0 +1,15 @@ +let sdk = new Appwrite(); + +sdk + .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID + .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key +; + +let promise = sdk.projects.delete('[PROJECT_ID]', '[PASSWORD]'); + +promise.then(function (response) { + console.log(response); // Success +}, function (error) { + console.log(error); // Failure +}); \ No newline at end of file diff --git a/app/sdks/0.7.0/console-web/docs/examples/projects/get-domain.md b/app/sdks/0.7.0/console-web/docs/examples/projects/get-domain.md new file mode 100644 index 0000000000..1622546719 --- /dev/null +++ b/app/sdks/0.7.0/console-web/docs/examples/projects/get-domain.md @@ -0,0 +1,15 @@ +let sdk = new Appwrite(); + +sdk + .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID + .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key +; + +let promise = sdk.projects.getDomain('[PROJECT_ID]', '[DOMAIN_ID]'); + +promise.then(function (response) { + console.log(response); // Success +}, function (error) { + console.log(error); // Failure +}); \ No newline at end of file diff --git a/app/sdks/0.7.0/console-web/docs/examples/projects/get-key.md b/app/sdks/0.7.0/console-web/docs/examples/projects/get-key.md new file mode 100644 index 0000000000..8bb458c335 --- /dev/null +++ b/app/sdks/0.7.0/console-web/docs/examples/projects/get-key.md @@ -0,0 +1,15 @@ +let sdk = new Appwrite(); + +sdk + .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID + .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key +; + +let promise = sdk.projects.getKey('[PROJECT_ID]', '[KEY_ID]'); + +promise.then(function (response) { + console.log(response); // Success +}, function (error) { + console.log(error); // Failure +}); \ No newline at end of file diff --git a/app/sdks/0.7.0/console-web/docs/examples/projects/get-platform.md b/app/sdks/0.7.0/console-web/docs/examples/projects/get-platform.md new file mode 100644 index 0000000000..bfeb49393b --- /dev/null +++ b/app/sdks/0.7.0/console-web/docs/examples/projects/get-platform.md @@ -0,0 +1,15 @@ +let sdk = new Appwrite(); + +sdk + .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID + .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key +; + +let promise = sdk.projects.getPlatform('[PROJECT_ID]', '[PLATFORM_ID]'); + +promise.then(function (response) { + console.log(response); // Success +}, function (error) { + console.log(error); // Failure +}); \ No newline at end of file diff --git a/app/sdks/0.7.0/console-web/docs/examples/projects/get-task.md b/app/sdks/0.7.0/console-web/docs/examples/projects/get-task.md new file mode 100644 index 0000000000..c405299d74 --- /dev/null +++ b/app/sdks/0.7.0/console-web/docs/examples/projects/get-task.md @@ -0,0 +1,15 @@ +let sdk = new Appwrite(); + +sdk + .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID + .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key +; + +let promise = sdk.projects.getTask('[PROJECT_ID]', '[TASK_ID]'); + +promise.then(function (response) { + console.log(response); // Success +}, function (error) { + console.log(error); // Failure +}); \ No newline at end of file diff --git a/app/sdks/0.7.0/console-web/docs/examples/projects/get-usage.md b/app/sdks/0.7.0/console-web/docs/examples/projects/get-usage.md new file mode 100644 index 0000000000..e024a2966c --- /dev/null +++ b/app/sdks/0.7.0/console-web/docs/examples/projects/get-usage.md @@ -0,0 +1,15 @@ +let sdk = new Appwrite(); + +sdk + .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID + .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key +; + +let promise = sdk.projects.getUsage('[PROJECT_ID]'); + +promise.then(function (response) { + console.log(response); // Success +}, function (error) { + console.log(error); // Failure +}); \ No newline at end of file diff --git a/app/sdks/0.7.0/console-web/docs/examples/projects/get-webhook.md b/app/sdks/0.7.0/console-web/docs/examples/projects/get-webhook.md new file mode 100644 index 0000000000..2629d4424d --- /dev/null +++ b/app/sdks/0.7.0/console-web/docs/examples/projects/get-webhook.md @@ -0,0 +1,15 @@ +let sdk = new Appwrite(); + +sdk + .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID + .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key +; + +let promise = sdk.projects.getWebhook('[PROJECT_ID]', '[WEBHOOK_ID]'); + +promise.then(function (response) { + console.log(response); // Success +}, function (error) { + console.log(error); // Failure +}); \ No newline at end of file diff --git a/app/sdks/0.7.0/console-web/docs/examples/projects/get.md b/app/sdks/0.7.0/console-web/docs/examples/projects/get.md new file mode 100644 index 0000000000..bcfb35186b --- /dev/null +++ b/app/sdks/0.7.0/console-web/docs/examples/projects/get.md @@ -0,0 +1,15 @@ +let sdk = new Appwrite(); + +sdk + .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID + .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key +; + +let promise = sdk.projects.get('[PROJECT_ID]'); + +promise.then(function (response) { + console.log(response); // Success +}, function (error) { + console.log(error); // Failure +}); \ No newline at end of file diff --git a/app/sdks/0.7.0/console-web/docs/examples/projects/list-domains.md b/app/sdks/0.7.0/console-web/docs/examples/projects/list-domains.md new file mode 100644 index 0000000000..5ddfec49b5 --- /dev/null +++ b/app/sdks/0.7.0/console-web/docs/examples/projects/list-domains.md @@ -0,0 +1,15 @@ +let sdk = new Appwrite(); + +sdk + .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID + .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key +; + +let promise = sdk.projects.listDomains('[PROJECT_ID]'); + +promise.then(function (response) { + console.log(response); // Success +}, function (error) { + console.log(error); // Failure +}); \ No newline at end of file diff --git a/app/sdks/0.7.0/console-web/docs/examples/projects/list-keys.md b/app/sdks/0.7.0/console-web/docs/examples/projects/list-keys.md new file mode 100644 index 0000000000..497ddf9bac --- /dev/null +++ b/app/sdks/0.7.0/console-web/docs/examples/projects/list-keys.md @@ -0,0 +1,15 @@ +let sdk = new Appwrite(); + +sdk + .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID + .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key +; + +let promise = sdk.projects.listKeys('[PROJECT_ID]'); + +promise.then(function (response) { + console.log(response); // Success +}, function (error) { + console.log(error); // Failure +}); \ No newline at end of file diff --git a/app/sdks/0.7.0/console-web/docs/examples/projects/list-platforms.md b/app/sdks/0.7.0/console-web/docs/examples/projects/list-platforms.md new file mode 100644 index 0000000000..4fd2d311f3 --- /dev/null +++ b/app/sdks/0.7.0/console-web/docs/examples/projects/list-platforms.md @@ -0,0 +1,15 @@ +let sdk = new Appwrite(); + +sdk + .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID + .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key +; + +let promise = sdk.projects.listPlatforms('[PROJECT_ID]'); + +promise.then(function (response) { + console.log(response); // Success +}, function (error) { + console.log(error); // Failure +}); \ No newline at end of file diff --git a/app/sdks/0.7.0/console-web/docs/examples/projects/list-tasks.md b/app/sdks/0.7.0/console-web/docs/examples/projects/list-tasks.md new file mode 100644 index 0000000000..d42efc2b80 --- /dev/null +++ b/app/sdks/0.7.0/console-web/docs/examples/projects/list-tasks.md @@ -0,0 +1,15 @@ +let sdk = new Appwrite(); + +sdk + .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID + .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key +; + +let promise = sdk.projects.listTasks('[PROJECT_ID]'); + +promise.then(function (response) { + console.log(response); // Success +}, function (error) { + console.log(error); // Failure +}); \ No newline at end of file diff --git a/app/sdks/0.7.0/console-web/docs/examples/projects/list-webhooks.md b/app/sdks/0.7.0/console-web/docs/examples/projects/list-webhooks.md new file mode 100644 index 0000000000..6c45849399 --- /dev/null +++ b/app/sdks/0.7.0/console-web/docs/examples/projects/list-webhooks.md @@ -0,0 +1,15 @@ +let sdk = new Appwrite(); + +sdk + .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID + .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key +; + +let promise = sdk.projects.listWebhooks('[PROJECT_ID]'); + +promise.then(function (response) { + console.log(response); // Success +}, function (error) { + console.log(error); // Failure +}); \ No newline at end of file diff --git a/app/sdks/0.7.0/console-web/docs/examples/projects/list.md b/app/sdks/0.7.0/console-web/docs/examples/projects/list.md new file mode 100644 index 0000000000..428fc4545f --- /dev/null +++ b/app/sdks/0.7.0/console-web/docs/examples/projects/list.md @@ -0,0 +1,15 @@ +let sdk = new Appwrite(); + +sdk + .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID + .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key +; + +let promise = sdk.projects.list(); + +promise.then(function (response) { + console.log(response); // Success +}, function (error) { + console.log(error); // Failure +}); \ No newline at end of file diff --git a/app/sdks/0.7.0/console-web/docs/examples/projects/update-domain-verification.md b/app/sdks/0.7.0/console-web/docs/examples/projects/update-domain-verification.md new file mode 100644 index 0000000000..ea53295bcf --- /dev/null +++ b/app/sdks/0.7.0/console-web/docs/examples/projects/update-domain-verification.md @@ -0,0 +1,15 @@ +let sdk = new Appwrite(); + +sdk + .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID + .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key +; + +let promise = sdk.projects.updateDomainVerification('[PROJECT_ID]', '[DOMAIN_ID]'); + +promise.then(function (response) { + console.log(response); // Success +}, function (error) { + console.log(error); // Failure +}); \ No newline at end of file diff --git a/app/sdks/0.7.0/console-web/docs/examples/projects/update-key.md b/app/sdks/0.7.0/console-web/docs/examples/projects/update-key.md new file mode 100644 index 0000000000..f19b593c9f --- /dev/null +++ b/app/sdks/0.7.0/console-web/docs/examples/projects/update-key.md @@ -0,0 +1,15 @@ +let sdk = new Appwrite(); + +sdk + .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID + .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key +; + +let promise = sdk.projects.updateKey('[PROJECT_ID]', '[KEY_ID]', '[NAME]', []); + +promise.then(function (response) { + console.log(response); // Success +}, function (error) { + console.log(error); // Failure +}); \ No newline at end of file diff --git a/app/sdks/0.7.0/console-web/docs/examples/projects/update-o-auth2.md b/app/sdks/0.7.0/console-web/docs/examples/projects/update-o-auth2.md new file mode 100644 index 0000000000..479c5e9d30 --- /dev/null +++ b/app/sdks/0.7.0/console-web/docs/examples/projects/update-o-auth2.md @@ -0,0 +1,15 @@ +let sdk = new Appwrite(); + +sdk + .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID + .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key +; + +let promise = sdk.projects.updateOAuth2('[PROJECT_ID]', 'amazon'); + +promise.then(function (response) { + console.log(response); // Success +}, function (error) { + console.log(error); // Failure +}); \ No newline at end of file diff --git a/app/sdks/0.7.0/console-web/docs/examples/projects/update-platform.md b/app/sdks/0.7.0/console-web/docs/examples/projects/update-platform.md new file mode 100644 index 0000000000..0e22080ed0 --- /dev/null +++ b/app/sdks/0.7.0/console-web/docs/examples/projects/update-platform.md @@ -0,0 +1,15 @@ +let sdk = new Appwrite(); + +sdk + .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID + .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key +; + +let promise = sdk.projects.updatePlatform('[PROJECT_ID]', '[PLATFORM_ID]', '[NAME]'); + +promise.then(function (response) { + console.log(response); // Success +}, function (error) { + console.log(error); // Failure +}); \ No newline at end of file diff --git a/app/sdks/0.7.0/console-web/docs/examples/projects/update-task.md b/app/sdks/0.7.0/console-web/docs/examples/projects/update-task.md new file mode 100644 index 0000000000..38744a36bd --- /dev/null +++ b/app/sdks/0.7.0/console-web/docs/examples/projects/update-task.md @@ -0,0 +1,15 @@ +let sdk = new Appwrite(); + +sdk + .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID + .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key +; + +let promise = sdk.projects.updateTask('[PROJECT_ID]', '[TASK_ID]', '[NAME]', 'play', '', false, 'GET', 'https://example.com'); + +promise.then(function (response) { + console.log(response); // Success +}, function (error) { + console.log(error); // Failure +}); \ No newline at end of file diff --git a/app/sdks/0.7.0/console-web/docs/examples/projects/update-webhook.md b/app/sdks/0.7.0/console-web/docs/examples/projects/update-webhook.md new file mode 100644 index 0000000000..cdef2ec479 --- /dev/null +++ b/app/sdks/0.7.0/console-web/docs/examples/projects/update-webhook.md @@ -0,0 +1,15 @@ +let sdk = new Appwrite(); + +sdk + .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID + .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key +; + +let promise = sdk.projects.updateWebhook('[PROJECT_ID]', '[WEBHOOK_ID]', '[NAME]', [], 'https://example.com', false); + +promise.then(function (response) { + console.log(response); // Success +}, function (error) { + console.log(error); // Failure +}); \ No newline at end of file diff --git a/app/sdks/0.7.0/console-web/docs/examples/projects/update.md b/app/sdks/0.7.0/console-web/docs/examples/projects/update.md new file mode 100644 index 0000000000..9d06850534 --- /dev/null +++ b/app/sdks/0.7.0/console-web/docs/examples/projects/update.md @@ -0,0 +1,15 @@ +let sdk = new Appwrite(); + +sdk + .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID + .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key +; + +let promise = sdk.projects.update('[PROJECT_ID]', '[NAME]'); + +promise.then(function (response) { + console.log(response); // Success +}, function (error) { + console.log(error); // Failure +}); \ No newline at end of file diff --git a/app/sdks/0.7.0/console-web/docs/examples/storage/create-file.md b/app/sdks/0.7.0/console-web/docs/examples/storage/create-file.md new file mode 100644 index 0000000000..673777e380 --- /dev/null +++ b/app/sdks/0.7.0/console-web/docs/examples/storage/create-file.md @@ -0,0 +1,15 @@ +let sdk = new Appwrite(); + +sdk + .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID + .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key +; + +let promise = sdk.storage.createFile(document.getElementById('uploader').files[0], [], []); + +promise.then(function (response) { + console.log(response); // Success +}, function (error) { + console.log(error); // Failure +}); \ No newline at end of file diff --git a/app/sdks/0.7.0/console-web/docs/examples/storage/delete-file.md b/app/sdks/0.7.0/console-web/docs/examples/storage/delete-file.md new file mode 100644 index 0000000000..7278b682ae --- /dev/null +++ b/app/sdks/0.7.0/console-web/docs/examples/storage/delete-file.md @@ -0,0 +1,15 @@ +let sdk = new Appwrite(); + +sdk + .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID + .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key +; + +let promise = sdk.storage.deleteFile('[FILE_ID]'); + +promise.then(function (response) { + console.log(response); // Success +}, function (error) { + console.log(error); // Failure +}); \ No newline at end of file diff --git a/app/sdks/0.7.0/console-web/docs/examples/storage/get-file-download.md b/app/sdks/0.7.0/console-web/docs/examples/storage/get-file-download.md new file mode 100644 index 0000000000..0a4677fe80 --- /dev/null +++ b/app/sdks/0.7.0/console-web/docs/examples/storage/get-file-download.md @@ -0,0 +1,11 @@ +let sdk = new Appwrite(); + +sdk + .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID + .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key +; + +let result = sdk.storage.getFileDownload('[FILE_ID]'); + +console.log(result); // Resource URL \ No newline at end of file diff --git a/app/sdks/0.7.0/console-web/docs/examples/storage/get-file-preview.md b/app/sdks/0.7.0/console-web/docs/examples/storage/get-file-preview.md new file mode 100644 index 0000000000..a44cb6479c --- /dev/null +++ b/app/sdks/0.7.0/console-web/docs/examples/storage/get-file-preview.md @@ -0,0 +1,11 @@ +let sdk = new Appwrite(); + +sdk + .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID + .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key +; + +let result = sdk.storage.getFilePreview('[FILE_ID]'); + +console.log(result); // Resource URL \ No newline at end of file diff --git a/app/sdks/0.7.0/console-web/docs/examples/storage/get-file-view.md b/app/sdks/0.7.0/console-web/docs/examples/storage/get-file-view.md new file mode 100644 index 0000000000..adfb6320c3 --- /dev/null +++ b/app/sdks/0.7.0/console-web/docs/examples/storage/get-file-view.md @@ -0,0 +1,11 @@ +let sdk = new Appwrite(); + +sdk + .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID + .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key +; + +let result = sdk.storage.getFileView('[FILE_ID]'); + +console.log(result); // Resource URL \ No newline at end of file diff --git a/app/sdks/0.7.0/console-web/docs/examples/storage/get-file.md b/app/sdks/0.7.0/console-web/docs/examples/storage/get-file.md new file mode 100644 index 0000000000..9691be3056 --- /dev/null +++ b/app/sdks/0.7.0/console-web/docs/examples/storage/get-file.md @@ -0,0 +1,15 @@ +let sdk = new Appwrite(); + +sdk + .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID + .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key +; + +let promise = sdk.storage.getFile('[FILE_ID]'); + +promise.then(function (response) { + console.log(response); // Success +}, function (error) { + console.log(error); // Failure +}); \ No newline at end of file diff --git a/app/sdks/0.7.0/console-web/docs/examples/storage/list-files.md b/app/sdks/0.7.0/console-web/docs/examples/storage/list-files.md new file mode 100644 index 0000000000..5c2560d06d --- /dev/null +++ b/app/sdks/0.7.0/console-web/docs/examples/storage/list-files.md @@ -0,0 +1,15 @@ +let sdk = new Appwrite(); + +sdk + .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID + .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key +; + +let promise = sdk.storage.listFiles(); + +promise.then(function (response) { + console.log(response); // Success +}, function (error) { + console.log(error); // Failure +}); \ No newline at end of file diff --git a/app/sdks/0.7.0/console-web/docs/examples/storage/update-file.md b/app/sdks/0.7.0/console-web/docs/examples/storage/update-file.md new file mode 100644 index 0000000000..c053d60470 --- /dev/null +++ b/app/sdks/0.7.0/console-web/docs/examples/storage/update-file.md @@ -0,0 +1,15 @@ +let sdk = new Appwrite(); + +sdk + .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID + .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key +; + +let promise = sdk.storage.updateFile('[FILE_ID]', [], []); + +promise.then(function (response) { + console.log(response); // Success +}, function (error) { + console.log(error); // Failure +}); \ No newline at end of file diff --git a/app/sdks/0.7.0/console-web/docs/examples/teams/create-membership.md b/app/sdks/0.7.0/console-web/docs/examples/teams/create-membership.md new file mode 100644 index 0000000000..534577ead3 --- /dev/null +++ b/app/sdks/0.7.0/console-web/docs/examples/teams/create-membership.md @@ -0,0 +1,15 @@ +let sdk = new Appwrite(); + +sdk + .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID + .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key +; + +let promise = sdk.teams.createMembership('[TEAM_ID]', 'email@example.com', [], 'https://example.com'); + +promise.then(function (response) { + console.log(response); // Success +}, function (error) { + console.log(error); // Failure +}); \ No newline at end of file diff --git a/app/sdks/0.7.0/console-web/docs/examples/teams/create.md b/app/sdks/0.7.0/console-web/docs/examples/teams/create.md new file mode 100644 index 0000000000..6f7232b9c5 --- /dev/null +++ b/app/sdks/0.7.0/console-web/docs/examples/teams/create.md @@ -0,0 +1,15 @@ +let sdk = new Appwrite(); + +sdk + .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID + .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key +; + +let promise = sdk.teams.create('[NAME]'); + +promise.then(function (response) { + console.log(response); // Success +}, function (error) { + console.log(error); // Failure +}); \ No newline at end of file diff --git a/app/sdks/0.7.0/console-web/docs/examples/teams/delete-membership.md b/app/sdks/0.7.0/console-web/docs/examples/teams/delete-membership.md new file mode 100644 index 0000000000..fa1efe401b --- /dev/null +++ b/app/sdks/0.7.0/console-web/docs/examples/teams/delete-membership.md @@ -0,0 +1,15 @@ +let sdk = new Appwrite(); + +sdk + .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID + .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key +; + +let promise = sdk.teams.deleteMembership('[TEAM_ID]', '[INVITE_ID]'); + +promise.then(function (response) { + console.log(response); // Success +}, function (error) { + console.log(error); // Failure +}); \ No newline at end of file diff --git a/app/sdks/0.7.0/console-web/docs/examples/teams/delete.md b/app/sdks/0.7.0/console-web/docs/examples/teams/delete.md new file mode 100644 index 0000000000..cacad26c02 --- /dev/null +++ b/app/sdks/0.7.0/console-web/docs/examples/teams/delete.md @@ -0,0 +1,15 @@ +let sdk = new Appwrite(); + +sdk + .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID + .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key +; + +let promise = sdk.teams.delete('[TEAM_ID]'); + +promise.then(function (response) { + console.log(response); // Success +}, function (error) { + console.log(error); // Failure +}); \ No newline at end of file diff --git a/app/sdks/0.7.0/console-web/docs/examples/teams/get-memberships.md b/app/sdks/0.7.0/console-web/docs/examples/teams/get-memberships.md new file mode 100644 index 0000000000..e1b959d1eb --- /dev/null +++ b/app/sdks/0.7.0/console-web/docs/examples/teams/get-memberships.md @@ -0,0 +1,15 @@ +let sdk = new Appwrite(); + +sdk + .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID + .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key +; + +let promise = sdk.teams.getMemberships('[TEAM_ID]'); + +promise.then(function (response) { + console.log(response); // Success +}, function (error) { + console.log(error); // Failure +}); \ No newline at end of file diff --git a/app/sdks/0.7.0/console-web/docs/examples/teams/get.md b/app/sdks/0.7.0/console-web/docs/examples/teams/get.md new file mode 100644 index 0000000000..a8496ad76d --- /dev/null +++ b/app/sdks/0.7.0/console-web/docs/examples/teams/get.md @@ -0,0 +1,15 @@ +let sdk = new Appwrite(); + +sdk + .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID + .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key +; + +let promise = sdk.teams.get('[TEAM_ID]'); + +promise.then(function (response) { + console.log(response); // Success +}, function (error) { + console.log(error); // Failure +}); \ No newline at end of file diff --git a/app/sdks/0.7.0/console-web/docs/examples/teams/list.md b/app/sdks/0.7.0/console-web/docs/examples/teams/list.md new file mode 100644 index 0000000000..b94d6c32ff --- /dev/null +++ b/app/sdks/0.7.0/console-web/docs/examples/teams/list.md @@ -0,0 +1,15 @@ +let sdk = new Appwrite(); + +sdk + .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID + .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key +; + +let promise = sdk.teams.list(); + +promise.then(function (response) { + console.log(response); // Success +}, function (error) { + console.log(error); // Failure +}); \ No newline at end of file diff --git a/app/sdks/0.7.0/console-web/docs/examples/teams/update-membership-status.md b/app/sdks/0.7.0/console-web/docs/examples/teams/update-membership-status.md new file mode 100644 index 0000000000..4931f02689 --- /dev/null +++ b/app/sdks/0.7.0/console-web/docs/examples/teams/update-membership-status.md @@ -0,0 +1,15 @@ +let sdk = new Appwrite(); + +sdk + .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID + .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key +; + +let promise = sdk.teams.updateMembershipStatus('[TEAM_ID]', '[INVITE_ID]', '[USER_ID]', '[SECRET]'); + +promise.then(function (response) { + console.log(response); // Success +}, function (error) { + console.log(error); // Failure +}); \ No newline at end of file diff --git a/app/sdks/0.7.0/console-web/docs/examples/teams/update.md b/app/sdks/0.7.0/console-web/docs/examples/teams/update.md new file mode 100644 index 0000000000..5b73121518 --- /dev/null +++ b/app/sdks/0.7.0/console-web/docs/examples/teams/update.md @@ -0,0 +1,15 @@ +let sdk = new Appwrite(); + +sdk + .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID + .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key +; + +let promise = sdk.teams.update('[TEAM_ID]', '[NAME]'); + +promise.then(function (response) { + console.log(response); // Success +}, function (error) { + console.log(error); // Failure +}); \ No newline at end of file diff --git a/app/sdks/0.7.0/console-web/docs/examples/users/create.md b/app/sdks/0.7.0/console-web/docs/examples/users/create.md new file mode 100644 index 0000000000..9adc060ff5 --- /dev/null +++ b/app/sdks/0.7.0/console-web/docs/examples/users/create.md @@ -0,0 +1,15 @@ +let sdk = new Appwrite(); + +sdk + .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID + .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key +; + +let promise = sdk.users.create('email@example.com', 'password'); + +promise.then(function (response) { + console.log(response); // Success +}, function (error) { + console.log(error); // Failure +}); \ No newline at end of file diff --git a/app/sdks/0.7.0/console-web/docs/examples/users/delete-session.md b/app/sdks/0.7.0/console-web/docs/examples/users/delete-session.md new file mode 100644 index 0000000000..96a9b5c94f --- /dev/null +++ b/app/sdks/0.7.0/console-web/docs/examples/users/delete-session.md @@ -0,0 +1,15 @@ +let sdk = new Appwrite(); + +sdk + .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID + .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key +; + +let promise = sdk.users.deleteSession('[USER_ID]', '[SESSION_ID]'); + +promise.then(function (response) { + console.log(response); // Success +}, function (error) { + console.log(error); // Failure +}); \ No newline at end of file diff --git a/app/sdks/0.7.0/console-web/docs/examples/users/delete-sessions.md b/app/sdks/0.7.0/console-web/docs/examples/users/delete-sessions.md new file mode 100644 index 0000000000..56092ab5fc --- /dev/null +++ b/app/sdks/0.7.0/console-web/docs/examples/users/delete-sessions.md @@ -0,0 +1,15 @@ +let sdk = new Appwrite(); + +sdk + .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID + .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key +; + +let promise = sdk.users.deleteSessions('[USER_ID]'); + +promise.then(function (response) { + console.log(response); // Success +}, function (error) { + console.log(error); // Failure +}); \ No newline at end of file diff --git a/app/sdks/0.7.0/console-web/docs/examples/users/delete-user.md b/app/sdks/0.7.0/console-web/docs/examples/users/delete-user.md new file mode 100644 index 0000000000..40f33e34c2 --- /dev/null +++ b/app/sdks/0.7.0/console-web/docs/examples/users/delete-user.md @@ -0,0 +1,15 @@ +let sdk = new Appwrite(); + +sdk + .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID + .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key +; + +let promise = sdk.users.deleteUser('[USER_ID]'); + +promise.then(function (response) { + console.log(response); // Success +}, function (error) { + console.log(error); // Failure +}); \ No newline at end of file diff --git a/app/sdks/0.7.0/console-web/docs/examples/users/get-logs.md b/app/sdks/0.7.0/console-web/docs/examples/users/get-logs.md new file mode 100644 index 0000000000..c349383ec1 --- /dev/null +++ b/app/sdks/0.7.0/console-web/docs/examples/users/get-logs.md @@ -0,0 +1,15 @@ +let sdk = new Appwrite(); + +sdk + .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID + .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key +; + +let promise = sdk.users.getLogs('[USER_ID]'); + +promise.then(function (response) { + console.log(response); // Success +}, function (error) { + console.log(error); // Failure +}); \ No newline at end of file diff --git a/app/sdks/0.7.0/console-web/docs/examples/users/get-prefs.md b/app/sdks/0.7.0/console-web/docs/examples/users/get-prefs.md new file mode 100644 index 0000000000..7d8a3cd33f --- /dev/null +++ b/app/sdks/0.7.0/console-web/docs/examples/users/get-prefs.md @@ -0,0 +1,15 @@ +let sdk = new Appwrite(); + +sdk + .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID + .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key +; + +let promise = sdk.users.getPrefs('[USER_ID]'); + +promise.then(function (response) { + console.log(response); // Success +}, function (error) { + console.log(error); // Failure +}); \ No newline at end of file diff --git a/app/sdks/0.7.0/console-web/docs/examples/users/get-sessions.md b/app/sdks/0.7.0/console-web/docs/examples/users/get-sessions.md new file mode 100644 index 0000000000..1b7535855e --- /dev/null +++ b/app/sdks/0.7.0/console-web/docs/examples/users/get-sessions.md @@ -0,0 +1,15 @@ +let sdk = new Appwrite(); + +sdk + .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID + .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key +; + +let promise = sdk.users.getSessions('[USER_ID]'); + +promise.then(function (response) { + console.log(response); // Success +}, function (error) { + console.log(error); // Failure +}); \ No newline at end of file diff --git a/app/sdks/0.7.0/console-web/docs/examples/users/get.md b/app/sdks/0.7.0/console-web/docs/examples/users/get.md new file mode 100644 index 0000000000..751798de39 --- /dev/null +++ b/app/sdks/0.7.0/console-web/docs/examples/users/get.md @@ -0,0 +1,15 @@ +let sdk = new Appwrite(); + +sdk + .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID + .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key +; + +let promise = sdk.users.get('[USER_ID]'); + +promise.then(function (response) { + console.log(response); // Success +}, function (error) { + console.log(error); // Failure +}); \ No newline at end of file diff --git a/app/sdks/0.7.0/console-web/docs/examples/users/list.md b/app/sdks/0.7.0/console-web/docs/examples/users/list.md new file mode 100644 index 0000000000..bbc4895412 --- /dev/null +++ b/app/sdks/0.7.0/console-web/docs/examples/users/list.md @@ -0,0 +1,15 @@ +let sdk = new Appwrite(); + +sdk + .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID + .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key +; + +let promise = sdk.users.list(); + +promise.then(function (response) { + console.log(response); // Success +}, function (error) { + console.log(error); // Failure +}); \ No newline at end of file diff --git a/app/sdks/0.7.0/console-web/docs/examples/users/update-prefs.md b/app/sdks/0.7.0/console-web/docs/examples/users/update-prefs.md new file mode 100644 index 0000000000..877aa309a1 --- /dev/null +++ b/app/sdks/0.7.0/console-web/docs/examples/users/update-prefs.md @@ -0,0 +1,15 @@ +let sdk = new Appwrite(); + +sdk + .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID + .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key +; + +let promise = sdk.users.updatePrefs('[USER_ID]', {}); + +promise.then(function (response) { + console.log(response); // Success +}, function (error) { + console.log(error); // Failure +}); \ No newline at end of file diff --git a/app/sdks/0.7.0/console-web/docs/examples/users/update-status.md b/app/sdks/0.7.0/console-web/docs/examples/users/update-status.md new file mode 100644 index 0000000000..6c432ff4c6 --- /dev/null +++ b/app/sdks/0.7.0/console-web/docs/examples/users/update-status.md @@ -0,0 +1,15 @@ +let sdk = new Appwrite(); + +sdk + .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID + .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key +; + +let promise = sdk.users.updateStatus('[USER_ID]', '1'); + +promise.then(function (response) { + console.log(response); // Success +}, function (error) { + console.log(error); // Failure +}); \ No newline at end of file diff --git a/app/sdks/0.7.0/console-web/package.json b/app/sdks/0.7.0/console-web/package.json new file mode 100644 index 0000000000..6c53a70307 --- /dev/null +++ b/app/sdks/0.7.0/console-web/package.json @@ -0,0 +1,17 @@ +{ + "name": "appwrite", + "homepage": "https://appwrite.io/support", + "description": "Appwrite is an open-source self-hosted backend server that abstract and simplify complex and repetitive development tasks behind a very simple REST API", + "version": "1.0.0", + "license": "BSD-3-Clause", + "main": "src/sdk.js", + "types": "types/index.d.ts", + "repository": { + "type": "git", + "url": "https://github.com/appwrite/sdk-for-console" + }, + "devDependencies": { + "typescript": "^3.6.4" + }, + "dependencies": {} +} \ No newline at end of file diff --git a/app/sdks/0.7.0/console-web/src/sdk.js b/app/sdks/0.7.0/console-web/src/sdk.js new file mode 100644 index 0000000000..fc8da5a1c2 --- /dev/null +++ b/app/sdks/0.7.0/console-web/src/sdk.js @@ -0,0 +1,4993 @@ +(function (window) { + + 'use strict'; + + window.Appwrite = function () { + + let config = { + endpoint: 'https://appwrite.io/v1', + project: '', + key: '', + locale: '', + mode: '', + }; + + /** + * @param {string} endpoint + * @returns {this} + */ + let setEndpoint = function(endpoint) { + config.endpoint = endpoint; + + return this; + }; + + /** + * Set Project + * + * Your project ID + * + * @param value string + * + * @return this + */ + let setProject = function (value) + { + http.addGlobalHeader('X-Appwrite-Project', value); + + config.project = value; + + return this; + }; + + /** + * Set Key + * + * Your secret API key + * + * @param value string + * + * @return this + */ + let setKey = function (value) + { + http.addGlobalHeader('X-Appwrite-Key', value); + + config.key = value; + + return this; + }; + + /** + * Set Locale + * + * @param value string + * + * @return this + */ + let setLocale = function (value) + { + http.addGlobalHeader('X-Appwrite-Locale', value); + + config.locale = value; + + return this; + }; + + /** + * Set Mode + * + * @param value string + * + * @return this + */ + let setMode = function (value) + { + http.addGlobalHeader('X-Appwrite-Mode', value); + + config.mode = value; + + return this; + }; + + let http = function(document) { + let globalParams = [], + globalHeaders = []; + + let addParam = function (url, param, value) { + let a = document.createElement('a'), regex = /(?:\?|&|&)+([^=]+)(?:=([^&]*))*/g; + let match, str = []; + a.href = url; + param = encodeURIComponent(param); + + while (match = regex.exec(a.search)) if (param !== match[1]) str.push(match[1] + (match[2] ? "=" + match[2] : "")); + + str.push(param + (value ? "=" + encodeURIComponent(value) : "")); + + a.search = str.join("&"); + + return a.href; + }; + + /** + * @param {Object} params + * @returns {string} + */ + let buildQuery = function(params) { + let str = []; + + for (let p in params) { + if(Array.isArray(params[p])) { + for (let index = 0; index < params[p].length; index++) { + let param = params[p][index]; + str.push(encodeURIComponent(p + '[]') + "=" + encodeURIComponent(param)); + } + } + else { + str.push(encodeURIComponent(p) + "=" + encodeURIComponent(params[p])); + } + } + + return str.join("&"); + }; + + let addGlobalHeader = function(key, value) { + globalHeaders[key] = {key: key.toLowerCase(), value: value.toLowerCase()}; + }; + + let addGlobalParam = function(key, value) { + globalParams.push({key: key, value: value}); + }; + + addGlobalHeader('x-sdk-version', 'appwrite:javascript:1.0.0'); + addGlobalHeader('content-type', ''); + + /** + * @param {string} method + * @param {string} path string + * @param {Object} headers + * @param {Object} params + * @param {function} progress + * @returns {Promise} + */ + let call = function (method, path, headers = {}, params = {}, progress = null) { + let i; + + path = config.endpoint + path; + + if (-1 === ['GET', 'POST', 'PUT', 'DELETE', 'TRACE', 'HEAD', 'OPTIONS', 'CONNECT', 'PATCH'].indexOf(method)) { + throw new Error('var method must contain a valid HTTP method name'); + } + + if (typeof path !== 'string') { + throw new Error('var path must be of type string'); + } + + if (typeof headers !== 'object') { + throw new Error('var headers must be of type object'); + } + + for (i = 0; i < globalParams.length; i++) { // Add global params to URL + path = addParam(path, globalParams[i].key, globalParams[i].value); + } + + if(window.localStorage && window.localStorage.getItem('cookieFallback')) { + headers['X-Fallback-Cookies'] = window.localStorage.getItem('cookieFallback'); + } + + for (let key in globalHeaders) { // Add Global Headers + if (globalHeaders.hasOwnProperty(key)) { + if (!headers[globalHeaders[key].key]) { + headers[globalHeaders[key].key] = globalHeaders[key].value; + } + } + } + + if(method === 'GET') { + for (let param in params) { + if (param.hasOwnProperty(key)) { + path = addParam(path, key + (Array.isArray(param) ? '[]' : ''), params[key]); + } + } + } + + switch (headers['content-type']) { // Parse request by content type + case 'application/json': + params = JSON.stringify(params); + break; + + case 'multipart/form-data': + let formData = new FormData(); + + Object.keys(params).forEach(function(key) { + let param = params[key]; + formData.append(key + (Array.isArray(param) ? '[]' : ''), param); + }); + + params = formData; + break; + } + + return new Promise(function (resolve, reject) { + + let request = new XMLHttpRequest(), key; + + request.withCredentials = true; + request.open(method, path, true); + + for (key in headers) { // Set Headers + if (headers.hasOwnProperty(key)) { + if (key === 'content-type' && headers[key] === 'multipart/form-data') { // Skip to avoid missing boundary + continue; + } + + request.setRequestHeader(key, headers[key]); + } + } + + request.onload = function () { + let data = request.response; + let contentType = this.getResponseHeader('content-type') || ''; + contentType = contentType.substring(0, contentType.indexOf(';')); + + switch (contentType) { + case 'application/json': + data = JSON.parse(data); + break; + } + + let cookieFallback = this.getResponseHeader('X-Fallback-Cookies') || ''; + + if(window.localStorage && cookieFallback) { + window.console.warn('Appwrite is using localStorage for session management. Increase your security by adding a custom domain as your API endpoint.'); + window.localStorage.setItem('cookieFallback', cookieFallback); + } + + if (4 === request.readyState && 399 >= request.status) { + resolve(data); + } else { + reject(data); + } + }; + + if (progress) { + request.addEventListener('progress', progress); + request.upload.addEventListener('progress', progress, false); + } + + // Handle network errors + request.onerror = function () { + reject(new Error("Network Error")); + }; + + request.send(params); + }) + }; + + return { + 'get': function(path, headers = {}, params = {}) { + return call('GET', path + ((Object.keys(params).length > 0) ? '?' + buildQuery(params) : ''), headers, {}); + }, + 'post': function(path, headers = {}, params = {}, progress = null) { + return call('POST', path, headers, params, progress); + }, + 'put': function(path, headers = {}, params = {}, progress = null) { + return call('PUT', path, headers, params, progress); + }, + 'patch': function(path, headers = {}, params = {}, progress = null) { + return call('PATCH', path, headers, params, progress); + }, + 'delete': function(path, headers = {}, params = {}, progress = null) { + return call('DELETE', path, headers, params, progress); + }, + 'addGlobalParam': addGlobalParam, + 'addGlobalHeader': addGlobalHeader + } + }(window.document); + + let account = { + + /** + * Get Account + * + * Get currently logged in user data as JSON object. + * + * @throws {Error} + * @return {Promise} + */ + get: function() { + let path = '/account'; + + let payload = {}; + + return http + .get(path, { + 'content-type': 'application/json', + }, payload); + }, + + /** + * Create Account + * + * Use this endpoint to allow a new user to register a new account in your + * project. After the user registration completes successfully, you can use + * the [/account/verfication](/docs/client/account#createVerification) route + * to start verifying the user email address. To allow your new user to login + * to his new account, you need to create a new [account + * session](/docs/client/account#createSession). + * + * @param {string} email + * @param {string} password + * @param {string} name + * @throws {Error} + * @return {Promise} + */ + create: function(email, password, name = '') { + if(email === undefined) { + throw new Error('Missing required parameter: "email"'); + } + + if(password === undefined) { + throw new Error('Missing required parameter: "password"'); + } + + let path = '/account'; + + let payload = {}; + + if(email) { + payload['email'] = email; + } + + if(password) { + payload['password'] = password; + } + + if(name) { + payload['name'] = name; + } + + return http + .post(path, { + 'content-type': 'application/json', + }, payload); + }, + + /** + * Delete Account + * + * Delete a currently logged in user account. Behind the scene, the user + * record is not deleted but permanently blocked from any access. This is done + * to avoid deleted accounts being overtaken by new users with the same email + * address. Any user-related resources like documents or storage files should + * be deleted separately. + * + * @throws {Error} + * @return {Promise} + */ + delete: function() { + let path = '/account'; + + let payload = {}; + + return http + .delete(path, { + 'content-type': 'application/json', + }, payload); + }, + + /** + * Update Account Email + * + * Update currently logged in user account email address. After changing user + * address, user confirmation status is being reset and a new confirmation + * mail is sent. For security measures, user password is required to complete + * this request. + * + * @param {string} email + * @param {string} password + * @throws {Error} + * @return {Promise} + */ + updateEmail: function(email, password) { + if(email === undefined) { + throw new Error('Missing required parameter: "email"'); + } + + if(password === undefined) { + throw new Error('Missing required parameter: "password"'); + } + + let path = '/account/email'; + + let payload = {}; + + if(email) { + payload['email'] = email; + } + + if(password) { + payload['password'] = password; + } + + return http + .patch(path, { + 'content-type': 'application/json', + }, payload); + }, + + /** + * Get Account Logs + * + * Get currently logged in user list of latest security activity logs. Each + * log returns user IP address, location and date and time of log. + * + * @throws {Error} + * @return {Promise} + */ + getLogs: function() { + let path = '/account/logs'; + + let payload = {}; + + return http + .get(path, { + 'content-type': 'application/json', + }, payload); + }, + + /** + * Update Account Name + * + * Update currently logged in user account name. + * + * @param {string} name + * @throws {Error} + * @return {Promise} + */ + updateName: function(name) { + if(name === undefined) { + throw new Error('Missing required parameter: "name"'); + } + + let path = '/account/name'; + + let payload = {}; + + if(name) { + payload['name'] = name; + } + + return http + .patch(path, { + 'content-type': 'application/json', + }, payload); + }, + + /** + * Update Account Password + * + * Update currently logged in user password. For validation, user is required + * to pass the password twice. + * + * @param {string} password + * @param {string} oldPassword + * @throws {Error} + * @return {Promise} + */ + updatePassword: function(password, oldPassword) { + if(password === undefined) { + throw new Error('Missing required parameter: "password"'); + } + + if(oldPassword === undefined) { + throw new Error('Missing required parameter: "oldPassword"'); + } + + let path = '/account/password'; + + let payload = {}; + + if(password) { + payload['password'] = password; + } + + if(oldPassword) { + payload['oldPassword'] = oldPassword; + } + + return http + .patch(path, { + 'content-type': 'application/json', + }, payload); + }, + + /** + * Get Account Preferences + * + * Get currently logged in user preferences as a key-value object. + * + * @throws {Error} + * @return {Promise} + */ + getPrefs: function() { + let path = '/account/prefs'; + + let payload = {}; + + return http + .get(path, { + 'content-type': 'application/json', + }, payload); + }, + + /** + * Update Account Preferences + * + * Update currently logged in user account preferences. You can pass only the + * specific settings you wish to update. + * + * @param {object} prefs + * @throws {Error} + * @return {Promise} + */ + updatePrefs: function(prefs) { + if(prefs === undefined) { + throw new Error('Missing required parameter: "prefs"'); + } + + let path = '/account/prefs'; + + let payload = {}; + + if(prefs) { + payload['prefs'] = prefs; + } + + return http + .patch(path, { + 'content-type': 'application/json', + }, payload); + }, + + /** + * Create Password Recovery + * + * Sends the user an email with a temporary secret key for password reset. + * When the user clicks the confirmation link he is redirected back to your + * app password reset URL with the secret key and email address values + * attached to the URL query string. Use the query string params to submit a + * request to the [PUT /account/recovery](/docs/client/account#updateRecovery) + * endpoint to complete the process. + * + * @param {string} email + * @param {string} url + * @throws {Error} + * @return {Promise} + */ + createRecovery: function(email, url) { + if(email === undefined) { + throw new Error('Missing required parameter: "email"'); + } + + if(url === undefined) { + throw new Error('Missing required parameter: "url"'); + } + + let path = '/account/recovery'; + + let payload = {}; + + if(email) { + payload['email'] = email; + } + + if(url) { + payload['url'] = url; + } + + return http + .post(path, { + 'content-type': 'application/json', + }, payload); + }, + + /** + * Complete Password Recovery + * + * Use this endpoint to complete the user account password reset. Both the + * **userId** and **secret** arguments will be passed as query parameters to + * the redirect URL you have provided when sending your request to the [POST + * /account/recovery](/docs/client/account#createRecovery) endpoint. + * + * Please note that in order to avoid a [Redirect + * Attack](https://github.com/OWASP/CheatSheetSeries/blob/master/cheatsheets/Unvalidated_Redirects_and_Forwards_Cheat_Sheet.md) + * the only valid redirect URLs are the ones from domains you have set when + * adding your platforms in the console interface. + * + * @param {string} userId + * @param {string} secret + * @param {string} password + * @param {string} passwordAgain + * @throws {Error} + * @return {Promise} + */ + updateRecovery: function(userId, secret, password, passwordAgain) { + if(userId === undefined) { + throw new Error('Missing required parameter: "userId"'); + } + + if(secret === undefined) { + throw new Error('Missing required parameter: "secret"'); + } + + if(password === undefined) { + throw new Error('Missing required parameter: "password"'); + } + + if(passwordAgain === undefined) { + throw new Error('Missing required parameter: "passwordAgain"'); + } + + let path = '/account/recovery'; + + let payload = {}; + + if(userId) { + payload['userId'] = userId; + } + + if(secret) { + payload['secret'] = secret; + } + + if(password) { + payload['password'] = password; + } + + if(passwordAgain) { + payload['passwordAgain'] = passwordAgain; + } + + return http + .put(path, { + 'content-type': 'application/json', + }, payload); + }, + + /** + * Get Account Sessions + * + * Get currently logged in user list of active sessions across different + * devices. + * + * @throws {Error} + * @return {Promise} + */ + getSessions: function() { + let path = '/account/sessions'; + + let payload = {}; + + return http + .get(path, { + 'content-type': 'application/json', + }, payload); + }, + + /** + * Create Account Session + * + * Allow the user to login into his account by providing a valid email and + * password combination. This route will create a new session for the user. + * + * @param {string} email + * @param {string} password + * @throws {Error} + * @return {Promise} + */ + createSession: function(email, password) { + if(email === undefined) { + throw new Error('Missing required parameter: "email"'); + } + + if(password === undefined) { + throw new Error('Missing required parameter: "password"'); + } + + let path = '/account/sessions'; + + let payload = {}; + + if(email) { + payload['email'] = email; + } + + if(password) { + payload['password'] = password; + } + + return http + .post(path, { + 'content-type': 'application/json', + }, payload); + }, + + /** + * Delete All Account Sessions + * + * Delete all sessions from the user account and remove any sessions cookies + * from the end client. + * + * @throws {Error} + * @return {Promise} + */ + deleteSessions: function() { + let path = '/account/sessions'; + + let payload = {}; + + return http + .delete(path, { + 'content-type': 'application/json', + }, payload); + }, + + /** + * Create Account Session with OAuth2 + * + * Allow the user to login to his account using the OAuth2 provider of his + * choice. Each OAuth2 provider should be enabled from the Appwrite console + * first. Use the success and failure arguments to provide a redirect URL's + * back to your app when login is completed. + * + * @param {string} provider + * @param {string} success + * @param {string} failure + * @param {string[]} scopes + * @throws {Error} + * @return {Promise} + */ + createOAuth2Session: function(provider, success = 'https://appwrite.io/auth/oauth2/success', failure = 'https://appwrite.io/auth/oauth2/failure', scopes = []) { + if(provider === undefined) { + throw new Error('Missing required parameter: "provider"'); + } + + let path = '/account/sessions/oauth2/{provider}'.replace(new RegExp('{provider}', 'g'), provider); + + let payload = {}; + + if(success) { + payload['success'] = success; + } + + if(failure) { + payload['failure'] = failure; + } + + if(scopes) { + payload['scopes'] = scopes; + } + + payload['project'] = config.project; + + payload['key'] = config.key; + + + let query = []; + + for (let p in payload) { + if(Array.isArray(payload[p])) { + for (let index = 0; index < payload[p].length; index++) { + let param = payload[p][index]; + query.push(encodeURIComponent(p + '[]') + "=" + encodeURIComponent(param)); + } + } + else { + query.push(encodeURIComponent(p) + "=" + encodeURIComponent(payload[p])); + } + } + + query = query.join("&"); + + window.location = config.endpoint + path + ((query) ? '?' + query : ''); + }, + + /** + * Delete Account Session + * + * Use this endpoint to log out the currently logged in user from all his + * account sessions across all his different devices. When using the option id + * argument, only the session unique ID provider will be deleted. + * + * @param {string} sessionId + * @throws {Error} + * @return {Promise} + */ + deleteSession: function(sessionId) { + if(sessionId === undefined) { + throw new Error('Missing required parameter: "sessionId"'); + } + + let path = '/account/sessions/{sessionId}'.replace(new RegExp('{sessionId}', 'g'), sessionId); + + let payload = {}; + + return http + .delete(path, { + 'content-type': 'application/json', + }, payload); + }, + + /** + * Create Email Verification + * + * Use this endpoint to send a verification message to your user email address + * to confirm they are the valid owners of that address. Both the **userId** + * and **secret** arguments will be passed as query parameters to the URL you + * have provided to be attached to the verification email. The provided URL + * should redirect the user back to your app and allow you to complete the + * verification process by verifying both the **userId** and **secret** + * parameters. Learn more about how to [complete the verification + * process](/docs/client/account#updateAccountVerification). + * + * Please note that in order to avoid a [Redirect + * Attack](https://github.com/OWASP/CheatSheetSeries/blob/master/cheatsheets/Unvalidated_Redirects_and_Forwards_Cheat_Sheet.md), + * the only valid redirect URLs are the ones from domains you have set when + * adding your platforms in the console interface. + * + * + * @param {string} url + * @throws {Error} + * @return {Promise} + */ + createVerification: function(url) { + if(url === undefined) { + throw new Error('Missing required parameter: "url"'); + } + + let path = '/account/verification'; + + let payload = {}; + + if(url) { + payload['url'] = url; + } + + return http + .post(path, { + 'content-type': 'application/json', + }, payload); + }, + + /** + * Complete Email Verification + * + * Use this endpoint to complete the user email verification process. Use both + * the **userId** and **secret** parameters that were attached to your app URL + * to verify the user email ownership. If confirmed this route will return a + * 200 status code. + * + * @param {string} userId + * @param {string} secret + * @throws {Error} + * @return {Promise} + */ + updateVerification: function(userId, secret) { + if(userId === undefined) { + throw new Error('Missing required parameter: "userId"'); + } + + if(secret === undefined) { + throw new Error('Missing required parameter: "secret"'); + } + + let path = '/account/verification'; + + let payload = {}; + + if(userId) { + payload['userId'] = userId; + } + + if(secret) { + payload['secret'] = secret; + } + + return http + .put(path, { + 'content-type': 'application/json', + }, payload); + } + }; + + let avatars = { + + /** + * Get Browser Icon + * + * You can use this endpoint to show different browser icons to your users. + * The code argument receives the browser code as it appears in your user + * /account/sessions endpoint. Use width, height and quality arguments to + * change the output settings. + * + * @param {string} code + * @param {number} width + * @param {number} height + * @param {number} quality + * @throws {Error} + * @return {string} + */ + getBrowser: function(code, width = 100, height = 100, quality = 100) { + if(code === undefined) { + throw new Error('Missing required parameter: "code"'); + } + + let path = '/avatars/browsers/{code}'.replace(new RegExp('{code}', 'g'), code); + + let payload = {}; + + if(width) { + payload['width'] = width; + } + + if(height) { + payload['height'] = height; + } + + if(quality) { + payload['quality'] = quality; + } + + payload['project'] = config.project; + + payload['key'] = config.key; + + + let query = []; + + for (let p in payload) { + if(Array.isArray(payload[p])) { + for (let index = 0; index < payload[p].length; index++) { + let param = payload[p][index]; + query.push(encodeURIComponent(p + '[]') + "=" + encodeURIComponent(param)); + } + } + else { + query.push(encodeURIComponent(p) + "=" + encodeURIComponent(payload[p])); + } + } + + query = query.join("&"); + + return config.endpoint + path + ((query) ? '?' + query : ''); + }, + + /** + * Get Credit Card Icon + * + * Need to display your users with your billing method or their payment + * methods? The credit card endpoint will return you the icon of the credit + * card provider you need. Use width, height and quality arguments to change + * the output settings. + * + * @param {string} code + * @param {number} width + * @param {number} height + * @param {number} quality + * @throws {Error} + * @return {string} + */ + getCreditCard: function(code, width = 100, height = 100, quality = 100) { + if(code === undefined) { + throw new Error('Missing required parameter: "code"'); + } + + let path = '/avatars/credit-cards/{code}'.replace(new RegExp('{code}', 'g'), code); + + let payload = {}; + + if(width) { + payload['width'] = width; + } + + if(height) { + payload['height'] = height; + } + + if(quality) { + payload['quality'] = quality; + } + + payload['project'] = config.project; + + payload['key'] = config.key; + + + let query = []; + + for (let p in payload) { + if(Array.isArray(payload[p])) { + for (let index = 0; index < payload[p].length; index++) { + let param = payload[p][index]; + query.push(encodeURIComponent(p + '[]') + "=" + encodeURIComponent(param)); + } + } + else { + query.push(encodeURIComponent(p) + "=" + encodeURIComponent(payload[p])); + } + } + + query = query.join("&"); + + return config.endpoint + path + ((query) ? '?' + query : ''); + }, + + /** + * Get Favicon + * + * Use this endpoint to fetch the favorite icon (AKA favicon) of a any remote + * website URL. + * + * @param {string} url + * @throws {Error} + * @return {string} + */ + getFavicon: function(url) { + if(url === undefined) { + throw new Error('Missing required parameter: "url"'); + } + + let path = '/avatars/favicon'; + + let payload = {}; + + if(url) { + payload['url'] = url; + } + + payload['project'] = config.project; + + payload['key'] = config.key; + + + let query = []; + + for (let p in payload) { + if(Array.isArray(payload[p])) { + for (let index = 0; index < payload[p].length; index++) { + let param = payload[p][index]; + query.push(encodeURIComponent(p + '[]') + "=" + encodeURIComponent(param)); + } + } + else { + query.push(encodeURIComponent(p) + "=" + encodeURIComponent(payload[p])); + } + } + + query = query.join("&"); + + return config.endpoint + path + ((query) ? '?' + query : ''); + }, + + /** + * Get Country Flag + * + * You can use this endpoint to show different country flags icons to your + * users. The code argument receives the 2 letter country code. Use width, + * height and quality arguments to change the output settings. + * + * @param {string} code + * @param {number} width + * @param {number} height + * @param {number} quality + * @throws {Error} + * @return {string} + */ + getFlag: function(code, width = 100, height = 100, quality = 100) { + if(code === undefined) { + throw new Error('Missing required parameter: "code"'); + } + + let path = '/avatars/flags/{code}'.replace(new RegExp('{code}', 'g'), code); + + let payload = {}; + + if(width) { + payload['width'] = width; + } + + if(height) { + payload['height'] = height; + } + + if(quality) { + payload['quality'] = quality; + } + + payload['project'] = config.project; + + payload['key'] = config.key; + + + let query = []; + + for (let p in payload) { + if(Array.isArray(payload[p])) { + for (let index = 0; index < payload[p].length; index++) { + let param = payload[p][index]; + query.push(encodeURIComponent(p + '[]') + "=" + encodeURIComponent(param)); + } + } + else { + query.push(encodeURIComponent(p) + "=" + encodeURIComponent(payload[p])); + } + } + + query = query.join("&"); + + return config.endpoint + path + ((query) ? '?' + query : ''); + }, + + /** + * Get Image from URL + * + * Use this endpoint to fetch a remote image URL and crop it to any image size + * you want. This endpoint is very useful if you need to crop and display + * remote images in your app or in case you want to make sure a 3rd party + * image is properly served using a TLS protocol. + * + * @param {string} url + * @param {number} width + * @param {number} height + * @throws {Error} + * @return {string} + */ + getImage: function(url, width = 400, height = 400) { + if(url === undefined) { + throw new Error('Missing required parameter: "url"'); + } + + let path = '/avatars/image'; + + let payload = {}; + + if(url) { + payload['url'] = url; + } + + if(width) { + payload['width'] = width; + } + + if(height) { + payload['height'] = height; + } + + payload['project'] = config.project; + + payload['key'] = config.key; + + + let query = []; + + for (let p in payload) { + if(Array.isArray(payload[p])) { + for (let index = 0; index < payload[p].length; index++) { + let param = payload[p][index]; + query.push(encodeURIComponent(p + '[]') + "=" + encodeURIComponent(param)); + } + } + else { + query.push(encodeURIComponent(p) + "=" + encodeURIComponent(payload[p])); + } + } + + query = query.join("&"); + + return config.endpoint + path + ((query) ? '?' + query : ''); + }, + + /** + * Get User Initials + * + * Use this endpoint to show your user initials avatar icon on your website or + * app. By default, this route will try to print your logged-in user name or + * email initials. You can also overwrite the user name if you pass the 'name' + * parameter. If no name is given and no user is logged, an empty avatar will + * be returned. + * + * You can use the color and background params to change the avatar colors. By + * default, a random theme will be selected. The random theme will persist for + * the user's initials when reloading the same theme will always return for + * the same initials. + * + * @param {string} name + * @param {number} width + * @param {number} height + * @param {string} color + * @param {string} background + * @throws {Error} + * @return {string} + */ + getInitials: function(name = '', width = 500, height = 500, color = '', background = '') { + let path = '/avatars/initials'; + + let payload = {}; + + if(name) { + payload['name'] = name; + } + + if(width) { + payload['width'] = width; + } + + if(height) { + payload['height'] = height; + } + + if(color) { + payload['color'] = color; + } + + if(background) { + payload['background'] = background; + } + + payload['project'] = config.project; + + payload['key'] = config.key; + + + let query = []; + + for (let p in payload) { + if(Array.isArray(payload[p])) { + for (let index = 0; index < payload[p].length; index++) { + let param = payload[p][index]; + query.push(encodeURIComponent(p + '[]') + "=" + encodeURIComponent(param)); + } + } + else { + query.push(encodeURIComponent(p) + "=" + encodeURIComponent(payload[p])); + } + } + + query = query.join("&"); + + return config.endpoint + path + ((query) ? '?' + query : ''); + }, + + /** + * Get QR Code + * + * Converts a given plain text to a QR code image. You can use the query + * parameters to change the size and style of the resulting image. + * + * @param {string} text + * @param {number} size + * @param {number} margin + * @param {boolean} download + * @throws {Error} + * @return {string} + */ + getQR: function(text, size = 400, margin = 1, download = false) { + if(text === undefined) { + throw new Error('Missing required parameter: "text"'); + } + + let path = '/avatars/qr'; + + let payload = {}; + + if(text) { + payload['text'] = text; + } + + if(size) { + payload['size'] = size; + } + + if(margin) { + payload['margin'] = margin; + } + + if(download) { + payload['download'] = download; + } + + payload['project'] = config.project; + + payload['key'] = config.key; + + + let query = []; + + for (let p in payload) { + if(Array.isArray(payload[p])) { + for (let index = 0; index < payload[p].length; index++) { + let param = payload[p][index]; + query.push(encodeURIComponent(p + '[]') + "=" + encodeURIComponent(param)); + } + } + else { + query.push(encodeURIComponent(p) + "=" + encodeURIComponent(payload[p])); + } + } + + query = query.join("&"); + + return config.endpoint + path + ((query) ? '?' + query : ''); + } + }; + + let database = { + + /** + * List Collections + * + * Get a list of all the user collections. You can use the query params to + * filter your results. On admin mode, this endpoint will return a list of all + * of the project collections. [Learn more about different API + * modes](/docs/admin). + * + * @param {string} search + * @param {number} limit + * @param {number} offset + * @param {string} orderType + * @throws {Error} + * @return {Promise} + */ + listCollections: function(search = '', limit = 25, offset = 0, orderType = 'ASC') { + let path = '/database/collections'; + + let payload = {}; + + if(search) { + payload['search'] = search; + } + + if(limit) { + payload['limit'] = limit; + } + + if(offset) { + payload['offset'] = offset; + } + + if(orderType) { + payload['orderType'] = orderType; + } + + return http + .get(path, { + 'content-type': 'application/json', + }, payload); + }, + + /** + * Create Collection + * + * Create a new Collection. + * + * @param {string} name + * @param {string[]} read + * @param {string[]} write + * @param {string[]} rules + * @throws {Error} + * @return {Promise} + */ + createCollection: function(name, read, write, rules) { + if(name === undefined) { + throw new Error('Missing required parameter: "name"'); + } + + if(read === undefined) { + throw new Error('Missing required parameter: "read"'); + } + + if(write === undefined) { + throw new Error('Missing required parameter: "write"'); + } + + if(rules === undefined) { + throw new Error('Missing required parameter: "rules"'); + } + + let path = '/database/collections'; + + let payload = {}; + + if(name) { + payload['name'] = name; + } + + if(read) { + payload['read'] = read; + } + + if(write) { + payload['write'] = write; + } + + if(rules) { + payload['rules'] = rules; + } + + return http + .post(path, { + 'content-type': 'application/json', + }, payload); + }, + + /** + * Get Collection + * + * Get collection by its unique ID. This endpoint response returns a JSON + * object with the collection metadata. + * + * @param {string} collectionId + * @throws {Error} + * @return {Promise} + */ + getCollection: function(collectionId) { + if(collectionId === undefined) { + throw new Error('Missing required parameter: "collectionId"'); + } + + let path = '/database/collections/{collectionId}'.replace(new RegExp('{collectionId}', 'g'), collectionId); + + let payload = {}; + + return http + .get(path, { + 'content-type': 'application/json', + }, payload); + }, + + /** + * Update Collection + * + * Update collection by its unique ID. + * + * @param {string} collectionId + * @param {string} name + * @param {string[]} read + * @param {string[]} write + * @param {string[]} rules + * @throws {Error} + * @return {Promise} + */ + updateCollection: function(collectionId, name, read, write, rules = []) { + if(collectionId === undefined) { + throw new Error('Missing required parameter: "collectionId"'); + } + + if(name === undefined) { + throw new Error('Missing required parameter: "name"'); + } + + if(read === undefined) { + throw new Error('Missing required parameter: "read"'); + } + + if(write === undefined) { + throw new Error('Missing required parameter: "write"'); + } + + let path = '/database/collections/{collectionId}'.replace(new RegExp('{collectionId}', 'g'), collectionId); + + let payload = {}; + + if(name) { + payload['name'] = name; + } + + if(read) { + payload['read'] = read; + } + + if(write) { + payload['write'] = write; + } + + if(rules) { + payload['rules'] = rules; + } + + return http + .put(path, { + 'content-type': 'application/json', + }, payload); + }, + + /** + * Delete Collection + * + * Delete a collection by its unique ID. Only users with write permissions + * have access to delete this resource. + * + * @param {string} collectionId + * @throws {Error} + * @return {Promise} + */ + deleteCollection: function(collectionId) { + if(collectionId === undefined) { + throw new Error('Missing required parameter: "collectionId"'); + } + + let path = '/database/collections/{collectionId}'.replace(new RegExp('{collectionId}', 'g'), collectionId); + + let payload = {}; + + return http + .delete(path, { + 'content-type': 'application/json', + }, payload); + }, + + /** + * List Documents + * + * Get a list of all the user documents. You can use the query params to + * filter your results. On admin mode, this endpoint will return a list of all + * of the project documents. [Learn more about different API + * modes](/docs/admin). + * + * @param {string} collectionId + * @param {string[]} filters + * @param {number} limit + * @param {number} offset + * @param {string} orderField + * @param {string} orderType + * @param {string} orderCast + * @param {string} search + * @throws {Error} + * @return {Promise} + */ + listDocuments: function(collectionId, filters = [], limit = 25, offset = 0, orderField = '$id', orderType = 'ASC', orderCast = 'string', search = '') { + if(collectionId === undefined) { + throw new Error('Missing required parameter: "collectionId"'); + } + + let path = '/database/collections/{collectionId}/documents'.replace(new RegExp('{collectionId}', 'g'), collectionId); + + let payload = {}; + + if(filters) { + payload['filters'] = filters; + } + + if(limit) { + payload['limit'] = limit; + } + + if(offset) { + payload['offset'] = offset; + } + + if(orderField) { + payload['orderField'] = orderField; + } + + if(orderType) { + payload['orderType'] = orderType; + } + + if(orderCast) { + payload['orderCast'] = orderCast; + } + + if(search) { + payload['search'] = search; + } + + return http + .get(path, { + 'content-type': 'application/json', + }, payload); + }, + + /** + * Create Document + * + * Create a new Document. Before using this route, you should create a new + * collection resource using either a [server + * integration](/docs/server/database?sdk=nodejs#createCollection) API or + * directly from your database console. + * + * @param {string} collectionId + * @param {object} data + * @param {string[]} read + * @param {string[]} write + * @param {string} parentDocument + * @param {string} parentProperty + * @param {string} parentPropertyType + * @throws {Error} + * @return {Promise} + */ + createDocument: function(collectionId, data, read, write, parentDocument = '', parentProperty = '', parentPropertyType = 'assign') { + if(collectionId === undefined) { + throw new Error('Missing required parameter: "collectionId"'); + } + + if(data === undefined) { + throw new Error('Missing required parameter: "data"'); + } + + if(read === undefined) { + throw new Error('Missing required parameter: "read"'); + } + + if(write === undefined) { + throw new Error('Missing required parameter: "write"'); + } + + let path = '/database/collections/{collectionId}/documents'.replace(new RegExp('{collectionId}', 'g'), collectionId); + + let payload = {}; + + if(data) { + payload['data'] = data; + } + + if(read) { + payload['read'] = read; + } + + if(write) { + payload['write'] = write; + } + + if(parentDocument) { + payload['parentDocument'] = parentDocument; + } + + if(parentProperty) { + payload['parentProperty'] = parentProperty; + } + + if(parentPropertyType) { + payload['parentPropertyType'] = parentPropertyType; + } + + return http + .post(path, { + 'content-type': 'application/json', + }, payload); + }, + + /** + * Get Document + * + * Get document by its unique ID. This endpoint response returns a JSON object + * with the document data. + * + * @param {string} collectionId + * @param {string} documentId + * @throws {Error} + * @return {Promise} + */ + getDocument: function(collectionId, documentId) { + if(collectionId === undefined) { + throw new Error('Missing required parameter: "collectionId"'); + } + + if(documentId === undefined) { + throw new Error('Missing required parameter: "documentId"'); + } + + let path = '/database/collections/{collectionId}/documents/{documentId}'.replace(new RegExp('{collectionId}', 'g'), collectionId).replace(new RegExp('{documentId}', 'g'), documentId); + + let payload = {}; + + return http + .get(path, { + 'content-type': 'application/json', + }, payload); + }, + + /** + * Update Document + * + * + * @param {string} collectionId + * @param {string} documentId + * @param {object} data + * @param {string[]} read + * @param {string[]} write + * @throws {Error} + * @return {Promise} + */ + updateDocument: function(collectionId, documentId, data, read, write) { + if(collectionId === undefined) { + throw new Error('Missing required parameter: "collectionId"'); + } + + if(documentId === undefined) { + throw new Error('Missing required parameter: "documentId"'); + } + + if(data === undefined) { + throw new Error('Missing required parameter: "data"'); + } + + if(read === undefined) { + throw new Error('Missing required parameter: "read"'); + } + + if(write === undefined) { + throw new Error('Missing required parameter: "write"'); + } + + let path = '/database/collections/{collectionId}/documents/{documentId}'.replace(new RegExp('{collectionId}', 'g'), collectionId).replace(new RegExp('{documentId}', 'g'), documentId); + + let payload = {}; + + if(data) { + payload['data'] = data; + } + + if(read) { + payload['read'] = read; + } + + if(write) { + payload['write'] = write; + } + + return http + .patch(path, { + 'content-type': 'application/json', + }, payload); + }, + + /** + * Delete Document + * + * Delete document by its unique ID. This endpoint deletes only the parent + * documents, his attributes and relations to other documents. Child documents + * **will not** be deleted. + * + * @param {string} collectionId + * @param {string} documentId + * @throws {Error} + * @return {Promise} + */ + deleteDocument: function(collectionId, documentId) { + if(collectionId === undefined) { + throw new Error('Missing required parameter: "collectionId"'); + } + + if(documentId === undefined) { + throw new Error('Missing required parameter: "documentId"'); + } + + let path = '/database/collections/{collectionId}/documents/{documentId}'.replace(new RegExp('{collectionId}', 'g'), collectionId).replace(new RegExp('{documentId}', 'g'), documentId); + + let payload = {}; + + return http + .delete(path, { + 'content-type': 'application/json', + }, payload); + } + }; + + let functions = { + + /** + * List Functions + * + * + * @param {string} search + * @param {number} limit + * @param {number} offset + * @param {string} orderType + * @throws {Error} + * @return {Promise} + */ + list: function(search = '', limit = 25, offset = 0, orderType = 'ASC') { + let path = '/functions'; + + let payload = {}; + + if(search) { + payload['search'] = search; + } + + if(limit) { + payload['limit'] = limit; + } + + if(offset) { + payload['offset'] = offset; + } + + if(orderType) { + payload['orderType'] = orderType; + } + + return http + .get(path, { + 'content-type': 'application/json', + }, payload); + }, + + /** + * Create Function + * + * + * @param {string} name + * @param {string} env + * @param {object} vars + * @param {string[]} events + * @param {string} schedule + * @param {number} timeout + * @throws {Error} + * @return {Promise} + */ + create: function(name, env, vars = [], events = [], schedule = '', timeout = 15) { + if(name === undefined) { + throw new Error('Missing required parameter: "name"'); + } + + if(env === undefined) { + throw new Error('Missing required parameter: "env"'); + } + + let path = '/functions'; + + let payload = {}; + + if(name) { + payload['name'] = name; + } + + if(env) { + payload['env'] = env; + } + + if(vars) { + payload['vars'] = vars; + } + + if(events) { + payload['events'] = events; + } + + if(schedule) { + payload['schedule'] = schedule; + } + + if(timeout) { + payload['timeout'] = timeout; + } + + return http + .post(path, { + 'content-type': 'application/json', + }, payload); + }, + + /** + * Get Function + * + * + * @param {string} functionId + * @throws {Error} + * @return {Promise} + */ + get: function(functionId) { + if(functionId === undefined) { + throw new Error('Missing required parameter: "functionId"'); + } + + let path = '/functions/{functionId}'.replace(new RegExp('{functionId}', 'g'), functionId); + + let payload = {}; + + return http + .get(path, { + 'content-type': 'application/json', + }, payload); + }, + + /** + * Update Function + * + * + * @param {string} functionId + * @param {string} name + * @param {object} vars + * @param {string[]} events + * @param {string} schedule + * @param {number} timeout + * @throws {Error} + * @return {Promise} + */ + update: function(functionId, name, vars = [], events = [], schedule = '', timeout = 15) { + if(functionId === undefined) { + throw new Error('Missing required parameter: "functionId"'); + } + + if(name === undefined) { + throw new Error('Missing required parameter: "name"'); + } + + let path = '/functions/{functionId}'.replace(new RegExp('{functionId}', 'g'), functionId); + + let payload = {}; + + if(name) { + payload['name'] = name; + } + + if(vars) { + payload['vars'] = vars; + } + + if(events) { + payload['events'] = events; + } + + if(schedule) { + payload['schedule'] = schedule; + } + + if(timeout) { + payload['timeout'] = timeout; + } + + return http + .put(path, { + 'content-type': 'application/json', + }, payload); + }, + + /** + * Delete Function + * + * + * @param {string} functionId + * @throws {Error} + * @return {Promise} + */ + delete: function(functionId) { + if(functionId === undefined) { + throw new Error('Missing required parameter: "functionId"'); + } + + let path = '/functions/{functionId}'.replace(new RegExp('{functionId}', 'g'), functionId); + + let payload = {}; + + return http + .delete(path, { + 'content-type': 'application/json', + }, payload); + }, + + /** + * List Executions + * + * + * @param {string} functionId + * @param {string} search + * @param {number} limit + * @param {number} offset + * @param {string} orderType + * @throws {Error} + * @return {Promise} + */ + listExecutions: function(functionId, search = '', limit = 25, offset = 0, orderType = 'ASC') { + if(functionId === undefined) { + throw new Error('Missing required parameter: "functionId"'); + } + + let path = '/functions/{functionId}/executions'.replace(new RegExp('{functionId}', 'g'), functionId); + + let payload = {}; + + if(search) { + payload['search'] = search; + } + + if(limit) { + payload['limit'] = limit; + } + + if(offset) { + payload['offset'] = offset; + } + + if(orderType) { + payload['orderType'] = orderType; + } + + return http + .get(path, { + 'content-type': 'application/json', + }, payload); + }, + + /** + * Create Execution + * + * + * @param {string} functionId + * @param {number} async + * @throws {Error} + * @return {Promise} + */ + createExecution: function(functionId, async = 1) { + if(functionId === undefined) { + throw new Error('Missing required parameter: "functionId"'); + } + + let path = '/functions/{functionId}/executions'.replace(new RegExp('{functionId}', 'g'), functionId); + + let payload = {}; + + if(async) { + payload['async'] = async; + } + + return http + .post(path, { + 'content-type': 'application/json', + }, payload); + }, + + /** + * Get Execution + * + * + * @param {string} functionId + * @param {string} executionId + * @throws {Error} + * @return {Promise} + */ + getExecution: function(functionId, executionId) { + if(functionId === undefined) { + throw new Error('Missing required parameter: "functionId"'); + } + + if(executionId === undefined) { + throw new Error('Missing required parameter: "executionId"'); + } + + let path = '/functions/{functionId}/executions/{executionId}'.replace(new RegExp('{functionId}', 'g'), functionId).replace(new RegExp('{executionId}', 'g'), executionId); + + let payload = {}; + + return http + .get(path, { + 'content-type': 'application/json', + }, payload); + }, + + /** + * Update Function Tag + * + * + * @param {string} functionId + * @param {string} tag + * @throws {Error} + * @return {Promise} + */ + updateTag: function(functionId, tag) { + if(functionId === undefined) { + throw new Error('Missing required parameter: "functionId"'); + } + + if(tag === undefined) { + throw new Error('Missing required parameter: "tag"'); + } + + let path = '/functions/{functionId}/tag'.replace(new RegExp('{functionId}', 'g'), functionId); + + let payload = {}; + + if(tag) { + payload['tag'] = tag; + } + + return http + .patch(path, { + 'content-type': 'application/json', + }, payload); + }, + + /** + * List Tags + * + * + * @param {string} functionId + * @param {string} search + * @param {number} limit + * @param {number} offset + * @param {string} orderType + * @throws {Error} + * @return {Promise} + */ + listTags: function(functionId, search = '', limit = 25, offset = 0, orderType = 'ASC') { + if(functionId === undefined) { + throw new Error('Missing required parameter: "functionId"'); + } + + let path = '/functions/{functionId}/tags'.replace(new RegExp('{functionId}', 'g'), functionId); + + let payload = {}; + + if(search) { + payload['search'] = search; + } + + if(limit) { + payload['limit'] = limit; + } + + if(offset) { + payload['offset'] = offset; + } + + if(orderType) { + payload['orderType'] = orderType; + } + + return http + .get(path, { + 'content-type': 'application/json', + }, payload); + }, + + /** + * Create Tag + * + * + * @param {string} functionId + * @param {string} command + * @param {File} code + * @throws {Error} + * @return {Promise} + */ + createTag: function(functionId, command, code) { + if(functionId === undefined) { + throw new Error('Missing required parameter: "functionId"'); + } + + if(command === undefined) { + throw new Error('Missing required parameter: "command"'); + } + + if(code === undefined) { + throw new Error('Missing required parameter: "code"'); + } + + let path = '/functions/{functionId}/tags'.replace(new RegExp('{functionId}', 'g'), functionId); + + let payload = {}; + + if(command) { + payload['command'] = command; + } + + if(code) { + payload['code'] = code; + } + + return http + .post(path, { + 'content-type': 'multipart/form-data', + }, payload); + }, + + /** + * Get Tag + * + * + * @param {string} functionId + * @param {string} tagId + * @throws {Error} + * @return {Promise} + */ + getTag: function(functionId, tagId) { + if(functionId === undefined) { + throw new Error('Missing required parameter: "functionId"'); + } + + if(tagId === undefined) { + throw new Error('Missing required parameter: "tagId"'); + } + + let path = '/functions/{functionId}/tags/{tagId}'.replace(new RegExp('{functionId}', 'g'), functionId).replace(new RegExp('{tagId}', 'g'), tagId); + + let payload = {}; + + return http + .get(path, { + 'content-type': 'application/json', + }, payload); + }, + + /** + * Delete Tag + * + * + * @param {string} functionId + * @param {string} tagId + * @throws {Error} + * @return {Promise} + */ + deleteTag: function(functionId, tagId) { + if(functionId === undefined) { + throw new Error('Missing required parameter: "functionId"'); + } + + if(tagId === undefined) { + throw new Error('Missing required parameter: "tagId"'); + } + + let path = '/functions/{functionId}/tags/{tagId}'.replace(new RegExp('{functionId}', 'g'), functionId).replace(new RegExp('{tagId}', 'g'), tagId); + + let payload = {}; + + return http + .delete(path, { + 'content-type': 'application/json', + }, payload); + } + }; + + let health = { + + /** + * Get HTTP + * + * Check the Appwrite HTTP server is up and responsive. + * + * @throws {Error} + * @return {Promise} + */ + get: function() { + let path = '/health'; + + let payload = {}; + + return http + .get(path, { + 'content-type': 'application/json', + }, payload); + }, + + /** + * Get Anti virus + * + * Check the Appwrite Anti Virus server is up and connection is successful. + * + * @throws {Error} + * @return {Promise} + */ + getAntiVirus: function() { + let path = '/health/anti-virus'; + + let payload = {}; + + return http + .get(path, { + 'content-type': 'application/json', + }, payload); + }, + + /** + * Get Cache + * + * Check the Appwrite in-memory cache server is up and connection is + * successful. + * + * @throws {Error} + * @return {Promise} + */ + getCache: function() { + let path = '/health/cache'; + + let payload = {}; + + return http + .get(path, { + 'content-type': 'application/json', + }, payload); + }, + + /** + * Get DB + * + * Check the Appwrite database server is up and connection is successful. + * + * @throws {Error} + * @return {Promise} + */ + getDB: function() { + let path = '/health/db'; + + let payload = {}; + + return http + .get(path, { + 'content-type': 'application/json', + }, payload); + }, + + /** + * Get Certificate Queue + * + * Get the number of certificates that are waiting to be issued against + * [Letsencrypt](https://letsencrypt.org/) in the Appwrite internal queue + * server. + * + * @throws {Error} + * @return {Promise} + */ + getQueueCertificates: function() { + let path = '/health/queue/certificates'; + + let payload = {}; + + return http + .get(path, { + 'content-type': 'application/json', + }, payload); + }, + + /** + * Get Functions Queue + * + * + * @throws {Error} + * @return {Promise} + */ + getQueueFunctions: function() { + let path = '/health/queue/functions'; + + let payload = {}; + + return http + .get(path, { + 'content-type': 'application/json', + }, payload); + }, + + /** + * Get Logs Queue + * + * Get the number of logs that are waiting to be processed in the Appwrite + * internal queue server. + * + * @throws {Error} + * @return {Promise} + */ + getQueueLogs: function() { + let path = '/health/queue/logs'; + + let payload = {}; + + return http + .get(path, { + 'content-type': 'application/json', + }, payload); + }, + + /** + * Get Tasks Queue + * + * Get the number of tasks that are waiting to be processed in the Appwrite + * internal queue server. + * + * @throws {Error} + * @return {Promise} + */ + getQueueTasks: function() { + let path = '/health/queue/tasks'; + + let payload = {}; + + return http + .get(path, { + 'content-type': 'application/json', + }, payload); + }, + + /** + * Get Usage Queue + * + * Get the number of usage stats that are waiting to be processed in the + * Appwrite internal queue server. + * + * @throws {Error} + * @return {Promise} + */ + getQueueUsage: function() { + let path = '/health/queue/usage'; + + let payload = {}; + + return http + .get(path, { + 'content-type': 'application/json', + }, payload); + }, + + /** + * Get Webhooks Queue + * + * Get the number of webhooks that are waiting to be processed in the Appwrite + * internal queue server. + * + * @throws {Error} + * @return {Promise} + */ + getQueueWebhooks: function() { + let path = '/health/queue/webhooks'; + + let payload = {}; + + return http + .get(path, { + 'content-type': 'application/json', + }, payload); + }, + + /** + * Get Local Storage + * + * Check the Appwrite local storage device is up and connection is successful. + * + * @throws {Error} + * @return {Promise} + */ + getStorageLocal: function() { + let path = '/health/storage/local'; + + let payload = {}; + + return http + .get(path, { + 'content-type': 'application/json', + }, payload); + }, + + /** + * Get Time + * + * Check the Appwrite server time is synced with Google remote NTP server. We + * use this technology to smoothly handle leap seconds with no disruptive + * events. The [Network Time + * Protocol](https://en.wikipedia.org/wiki/Network_Time_Protocol) (NTP) is + * used by hundreds of millions of computers and devices to synchronize their + * clocks over the Internet. If your computer sets its own clock, it likely + * uses NTP. + * + * @throws {Error} + * @return {Promise} + */ + getTime: function() { + let path = '/health/time'; + + let payload = {}; + + return http + .get(path, { + 'content-type': 'application/json', + }, payload); + } + }; + + let locale = { + + /** + * Get User Locale + * + * Get the current user location based on IP. Returns an object with user + * country code, country name, continent name, continent code, ip address and + * suggested currency. You can use the locale header to get the data in a + * supported language. + * + * ([IP Geolocation by DB-IP](https://db-ip.com)) + * + * @throws {Error} + * @return {Promise} + */ + get: function() { + let path = '/locale'; + + let payload = {}; + + return http + .get(path, { + 'content-type': 'application/json', + }, payload); + }, + + /** + * List Continents + * + * List of all continents. You can use the locale header to get the data in a + * supported language. + * + * @throws {Error} + * @return {Promise} + */ + getContinents: function() { + let path = '/locale/continents'; + + let payload = {}; + + return http + .get(path, { + 'content-type': 'application/json', + }, payload); + }, + + /** + * List Countries + * + * List of all countries. You can use the locale header to get the data in a + * supported language. + * + * @throws {Error} + * @return {Promise} + */ + getCountries: function() { + let path = '/locale/countries'; + + let payload = {}; + + return http + .get(path, { + 'content-type': 'application/json', + }, payload); + }, + + /** + * List EU Countries + * + * List of all countries that are currently members of the EU. You can use the + * locale header to get the data in a supported language. + * + * @throws {Error} + * @return {Promise} + */ + getCountriesEU: function() { + let path = '/locale/countries/eu'; + + let payload = {}; + + return http + .get(path, { + 'content-type': 'application/json', + }, payload); + }, + + /** + * List Countries Phone Codes + * + * List of all countries phone codes. You can use the locale header to get the + * data in a supported language. + * + * @throws {Error} + * @return {Promise} + */ + getCountriesPhones: function() { + let path = '/locale/countries/phones'; + + let payload = {}; + + return http + .get(path, { + 'content-type': 'application/json', + }, payload); + }, + + /** + * List Currencies + * + * List of all currencies, including currency symbol, name, plural, and + * decimal digits for all major and minor currencies. You can use the locale + * header to get the data in a supported language. + * + * @throws {Error} + * @return {Promise} + */ + getCurrencies: function() { + let path = '/locale/currencies'; + + let payload = {}; + + return http + .get(path, { + 'content-type': 'application/json', + }, payload); + }, + + /** + * List Languages + * + * List of all languages classified by ISO 639-1 including 2-letter code, name + * in English, and name in the respective language. + * + * @throws {Error} + * @return {Promise} + */ + getLanguages: function() { + let path = '/locale/languages'; + + let payload = {}; + + return http + .get(path, { + 'content-type': 'application/json', + }, payload); + } + }; + + let projects = { + + /** + * List Projects + * + * + * @param {string} search + * @param {number} limit + * @param {number} offset + * @param {string} orderType + * @throws {Error} + * @return {Promise} + */ + list: function(search = '', limit = 25, offset = 0, orderType = 'ASC') { + let path = '/projects'; + + let payload = {}; + + if(search) { + payload['search'] = search; + } + + if(limit) { + payload['limit'] = limit; + } + + if(offset) { + payload['offset'] = offset; + } + + if(orderType) { + payload['orderType'] = orderType; + } + + return http + .get(path, { + 'content-type': 'application/json', + }, payload); + }, + + /** + * Create Project + * + * + * @param {string} name + * @param {string} teamId + * @param {string} description + * @param {string} logo + * @param {string} url + * @param {string} legalName + * @param {string} legalCountry + * @param {string} legalState + * @param {string} legalCity + * @param {string} legalAddress + * @param {string} legalTaxId + * @throws {Error} + * @return {Promise} + */ + create: function(name, teamId, description = '', logo = '', url = '', legalName = '', legalCountry = '', legalState = '', legalCity = '', legalAddress = '', legalTaxId = '') { + if(name === undefined) { + throw new Error('Missing required parameter: "name"'); + } + + if(teamId === undefined) { + throw new Error('Missing required parameter: "teamId"'); + } + + let path = '/projects'; + + let payload = {}; + + if(name) { + payload['name'] = name; + } + + if(teamId) { + payload['teamId'] = teamId; + } + + if(description) { + payload['description'] = description; + } + + if(logo) { + payload['logo'] = logo; + } + + if(url) { + payload['url'] = url; + } + + if(legalName) { + payload['legalName'] = legalName; + } + + if(legalCountry) { + payload['legalCountry'] = legalCountry; + } + + if(legalState) { + payload['legalState'] = legalState; + } + + if(legalCity) { + payload['legalCity'] = legalCity; + } + + if(legalAddress) { + payload['legalAddress'] = legalAddress; + } + + if(legalTaxId) { + payload['legalTaxId'] = legalTaxId; + } + + return http + .post(path, { + 'content-type': 'application/json', + }, payload); + }, + + /** + * Get Project + * + * + * @param {string} projectId + * @throws {Error} + * @return {Promise} + */ + get: function(projectId) { + if(projectId === undefined) { + throw new Error('Missing required parameter: "projectId"'); + } + + let path = '/projects/{projectId}'.replace(new RegExp('{projectId}', 'g'), projectId); + + let payload = {}; + + return http + .get(path, { + 'content-type': 'application/json', + }, payload); + }, + + /** + * Update Project + * + * + * @param {string} projectId + * @param {string} name + * @param {string} description + * @param {string} logo + * @param {string} url + * @param {string} legalName + * @param {string} legalCountry + * @param {string} legalState + * @param {string} legalCity + * @param {string} legalAddress + * @param {string} legalTaxId + * @throws {Error} + * @return {Promise} + */ + update: function(projectId, name, description = '', logo = '', url = '', legalName = '', legalCountry = '', legalState = '', legalCity = '', legalAddress = '', legalTaxId = '') { + if(projectId === undefined) { + throw new Error('Missing required parameter: "projectId"'); + } + + if(name === undefined) { + throw new Error('Missing required parameter: "name"'); + } + + let path = '/projects/{projectId}'.replace(new RegExp('{projectId}', 'g'), projectId); + + let payload = {}; + + if(name) { + payload['name'] = name; + } + + if(description) { + payload['description'] = description; + } + + if(logo) { + payload['logo'] = logo; + } + + if(url) { + payload['url'] = url; + } + + if(legalName) { + payload['legalName'] = legalName; + } + + if(legalCountry) { + payload['legalCountry'] = legalCountry; + } + + if(legalState) { + payload['legalState'] = legalState; + } + + if(legalCity) { + payload['legalCity'] = legalCity; + } + + if(legalAddress) { + payload['legalAddress'] = legalAddress; + } + + if(legalTaxId) { + payload['legalTaxId'] = legalTaxId; + } + + return http + .patch(path, { + 'content-type': 'application/json', + }, payload); + }, + + /** + * Delete Project + * + * + * @param {string} projectId + * @param {string} password + * @throws {Error} + * @return {Promise} + */ + delete: function(projectId, password) { + if(projectId === undefined) { + throw new Error('Missing required parameter: "projectId"'); + } + + if(password === undefined) { + throw new Error('Missing required parameter: "password"'); + } + + let path = '/projects/{projectId}'.replace(new RegExp('{projectId}', 'g'), projectId); + + let payload = {}; + + if(password) { + payload['password'] = password; + } + + return http + .delete(path, { + 'content-type': 'application/json', + }, payload); + }, + + /** + * List Domains + * + * + * @param {string} projectId + * @throws {Error} + * @return {Promise} + */ + listDomains: function(projectId) { + if(projectId === undefined) { + throw new Error('Missing required parameter: "projectId"'); + } + + let path = '/projects/{projectId}/domains'.replace(new RegExp('{projectId}', 'g'), projectId); + + let payload = {}; + + return http + .get(path, { + 'content-type': 'application/json', + }, payload); + }, + + /** + * Create Domain + * + * + * @param {string} projectId + * @param {string} domain + * @throws {Error} + * @return {Promise} + */ + createDomain: function(projectId, domain) { + if(projectId === undefined) { + throw new Error('Missing required parameter: "projectId"'); + } + + if(domain === undefined) { + throw new Error('Missing required parameter: "domain"'); + } + + let path = '/projects/{projectId}/domains'.replace(new RegExp('{projectId}', 'g'), projectId); + + let payload = {}; + + if(domain) { + payload['domain'] = domain; + } + + return http + .post(path, { + 'content-type': 'application/json', + }, payload); + }, + + /** + * Get Domain + * + * + * @param {string} projectId + * @param {string} domainId + * @throws {Error} + * @return {Promise} + */ + getDomain: function(projectId, domainId) { + if(projectId === undefined) { + throw new Error('Missing required parameter: "projectId"'); + } + + if(domainId === undefined) { + throw new Error('Missing required parameter: "domainId"'); + } + + let path = '/projects/{projectId}/domains/{domainId}'.replace(new RegExp('{projectId}', 'g'), projectId).replace(new RegExp('{domainId}', 'g'), domainId); + + let payload = {}; + + return http + .get(path, { + 'content-type': 'application/json', + }, payload); + }, + + /** + * Delete Domain + * + * + * @param {string} projectId + * @param {string} domainId + * @throws {Error} + * @return {Promise} + */ + deleteDomain: function(projectId, domainId) { + if(projectId === undefined) { + throw new Error('Missing required parameter: "projectId"'); + } + + if(domainId === undefined) { + throw new Error('Missing required parameter: "domainId"'); + } + + let path = '/projects/{projectId}/domains/{domainId}'.replace(new RegExp('{projectId}', 'g'), projectId).replace(new RegExp('{domainId}', 'g'), domainId); + + let payload = {}; + + return http + .delete(path, { + 'content-type': 'application/json', + }, payload); + }, + + /** + * Update Domain Verification Status + * + * + * @param {string} projectId + * @param {string} domainId + * @throws {Error} + * @return {Promise} + */ + updateDomainVerification: function(projectId, domainId) { + if(projectId === undefined) { + throw new Error('Missing required parameter: "projectId"'); + } + + if(domainId === undefined) { + throw new Error('Missing required parameter: "domainId"'); + } + + let path = '/projects/{projectId}/domains/{domainId}/verification'.replace(new RegExp('{projectId}', 'g'), projectId).replace(new RegExp('{domainId}', 'g'), domainId); + + let payload = {}; + + return http + .patch(path, { + 'content-type': 'application/json', + }, payload); + }, + + /** + * List Keys + * + * + * @param {string} projectId + * @throws {Error} + * @return {Promise} + */ + listKeys: function(projectId) { + if(projectId === undefined) { + throw new Error('Missing required parameter: "projectId"'); + } + + let path = '/projects/{projectId}/keys'.replace(new RegExp('{projectId}', 'g'), projectId); + + let payload = {}; + + return http + .get(path, { + 'content-type': 'application/json', + }, payload); + }, + + /** + * Create Key + * + * + * @param {string} projectId + * @param {string} name + * @param {string[]} scopes + * @throws {Error} + * @return {Promise} + */ + createKey: function(projectId, name, scopes) { + if(projectId === undefined) { + throw new Error('Missing required parameter: "projectId"'); + } + + if(name === undefined) { + throw new Error('Missing required parameter: "name"'); + } + + if(scopes === undefined) { + throw new Error('Missing required parameter: "scopes"'); + } + + let path = '/projects/{projectId}/keys'.replace(new RegExp('{projectId}', 'g'), projectId); + + let payload = {}; + + if(name) { + payload['name'] = name; + } + + if(scopes) { + payload['scopes'] = scopes; + } + + return http + .post(path, { + 'content-type': 'application/json', + }, payload); + }, + + /** + * Get Key + * + * + * @param {string} projectId + * @param {string} keyId + * @throws {Error} + * @return {Promise} + */ + getKey: function(projectId, keyId) { + if(projectId === undefined) { + throw new Error('Missing required parameter: "projectId"'); + } + + if(keyId === undefined) { + throw new Error('Missing required parameter: "keyId"'); + } + + let path = '/projects/{projectId}/keys/{keyId}'.replace(new RegExp('{projectId}', 'g'), projectId).replace(new RegExp('{keyId}', 'g'), keyId); + + let payload = {}; + + return http + .get(path, { + 'content-type': 'application/json', + }, payload); + }, + + /** + * Update Key + * + * + * @param {string} projectId + * @param {string} keyId + * @param {string} name + * @param {string[]} scopes + * @throws {Error} + * @return {Promise} + */ + updateKey: function(projectId, keyId, name, scopes) { + if(projectId === undefined) { + throw new Error('Missing required parameter: "projectId"'); + } + + if(keyId === undefined) { + throw new Error('Missing required parameter: "keyId"'); + } + + if(name === undefined) { + throw new Error('Missing required parameter: "name"'); + } + + if(scopes === undefined) { + throw new Error('Missing required parameter: "scopes"'); + } + + let path = '/projects/{projectId}/keys/{keyId}'.replace(new RegExp('{projectId}', 'g'), projectId).replace(new RegExp('{keyId}', 'g'), keyId); + + let payload = {}; + + if(name) { + payload['name'] = name; + } + + if(scopes) { + payload['scopes'] = scopes; + } + + return http + .put(path, { + 'content-type': 'application/json', + }, payload); + }, + + /** + * Delete Key + * + * + * @param {string} projectId + * @param {string} keyId + * @throws {Error} + * @return {Promise} + */ + deleteKey: function(projectId, keyId) { + if(projectId === undefined) { + throw new Error('Missing required parameter: "projectId"'); + } + + if(keyId === undefined) { + throw new Error('Missing required parameter: "keyId"'); + } + + let path = '/projects/{projectId}/keys/{keyId}'.replace(new RegExp('{projectId}', 'g'), projectId).replace(new RegExp('{keyId}', 'g'), keyId); + + let payload = {}; + + return http + .delete(path, { + 'content-type': 'application/json', + }, payload); + }, + + /** + * Update Project OAuth2 + * + * + * @param {string} projectId + * @param {string} provider + * @param {string} appId + * @param {string} secret + * @throws {Error} + * @return {Promise} + */ + updateOAuth2: function(projectId, provider, appId = '', secret = '') { + if(projectId === undefined) { + throw new Error('Missing required parameter: "projectId"'); + } + + if(provider === undefined) { + throw new Error('Missing required parameter: "provider"'); + } + + let path = '/projects/{projectId}/oauth2'.replace(new RegExp('{projectId}', 'g'), projectId); + + let payload = {}; + + if(provider) { + payload['provider'] = provider; + } + + if(appId) { + payload['appId'] = appId; + } + + if(secret) { + payload['secret'] = secret; + } + + return http + .patch(path, { + 'content-type': 'application/json', + }, payload); + }, + + /** + * List Platforms + * + * + * @param {string} projectId + * @throws {Error} + * @return {Promise} + */ + listPlatforms: function(projectId) { + if(projectId === undefined) { + throw new Error('Missing required parameter: "projectId"'); + } + + let path = '/projects/{projectId}/platforms'.replace(new RegExp('{projectId}', 'g'), projectId); + + let payload = {}; + + return http + .get(path, { + 'content-type': 'application/json', + }, payload); + }, + + /** + * Create Platform + * + * + * @param {string} projectId + * @param {string} type + * @param {string} name + * @param {string} key + * @param {string} store + * @param {string} hostname + * @throws {Error} + * @return {Promise} + */ + createPlatform: function(projectId, type, name, key = '', store = '', hostname = '') { + if(projectId === undefined) { + throw new Error('Missing required parameter: "projectId"'); + } + + if(type === undefined) { + throw new Error('Missing required parameter: "type"'); + } + + if(name === undefined) { + throw new Error('Missing required parameter: "name"'); + } + + let path = '/projects/{projectId}/platforms'.replace(new RegExp('{projectId}', 'g'), projectId); + + let payload = {}; + + if(type) { + payload['type'] = type; + } + + if(name) { + payload['name'] = name; + } + + if(key) { + payload['key'] = key; + } + + if(store) { + payload['store'] = store; + } + + if(hostname) { + payload['hostname'] = hostname; + } + + return http + .post(path, { + 'content-type': 'application/json', + }, payload); + }, + + /** + * Get Platform + * + * + * @param {string} projectId + * @param {string} platformId + * @throws {Error} + * @return {Promise} + */ + getPlatform: function(projectId, platformId) { + if(projectId === undefined) { + throw new Error('Missing required parameter: "projectId"'); + } + + if(platformId === undefined) { + throw new Error('Missing required parameter: "platformId"'); + } + + let path = '/projects/{projectId}/platforms/{platformId}'.replace(new RegExp('{projectId}', 'g'), projectId).replace(new RegExp('{platformId}', 'g'), platformId); + + let payload = {}; + + return http + .get(path, { + 'content-type': 'application/json', + }, payload); + }, + + /** + * Update Platform + * + * + * @param {string} projectId + * @param {string} platformId + * @param {string} name + * @param {string} key + * @param {string} store + * @param {string} hostname + * @throws {Error} + * @return {Promise} + */ + updatePlatform: function(projectId, platformId, name, key = '', store = '', hostname = '') { + if(projectId === undefined) { + throw new Error('Missing required parameter: "projectId"'); + } + + if(platformId === undefined) { + throw new Error('Missing required parameter: "platformId"'); + } + + if(name === undefined) { + throw new Error('Missing required parameter: "name"'); + } + + let path = '/projects/{projectId}/platforms/{platformId}'.replace(new RegExp('{projectId}', 'g'), projectId).replace(new RegExp('{platformId}', 'g'), platformId); + + let payload = {}; + + if(name) { + payload['name'] = name; + } + + if(key) { + payload['key'] = key; + } + + if(store) { + payload['store'] = store; + } + + if(hostname) { + payload['hostname'] = hostname; + } + + return http + .put(path, { + 'content-type': 'application/json', + }, payload); + }, + + /** + * Delete Platform + * + * + * @param {string} projectId + * @param {string} platformId + * @throws {Error} + * @return {Promise} + */ + deletePlatform: function(projectId, platformId) { + if(projectId === undefined) { + throw new Error('Missing required parameter: "projectId"'); + } + + if(platformId === undefined) { + throw new Error('Missing required parameter: "platformId"'); + } + + let path = '/projects/{projectId}/platforms/{platformId}'.replace(new RegExp('{projectId}', 'g'), projectId).replace(new RegExp('{platformId}', 'g'), platformId); + + let payload = {}; + + return http + .delete(path, { + 'content-type': 'application/json', + }, payload); + }, + + /** + * List Tasks + * + * + * @param {string} projectId + * @throws {Error} + * @return {Promise} + */ + listTasks: function(projectId) { + if(projectId === undefined) { + throw new Error('Missing required parameter: "projectId"'); + } + + let path = '/projects/{projectId}/tasks'.replace(new RegExp('{projectId}', 'g'), projectId); + + let payload = {}; + + return http + .get(path, { + 'content-type': 'application/json', + }, payload); + }, + + /** + * Create Task + * + * + * @param {string} projectId + * @param {string} name + * @param {string} status + * @param {string} schedule + * @param {boolean} security + * @param {string} httpMethod + * @param {string} httpUrl + * @param {string[]} httpHeaders + * @param {string} httpUser + * @param {string} httpPass + * @throws {Error} + * @return {Promise} + */ + createTask: function(projectId, name, status, schedule, security, httpMethod, httpUrl, httpHeaders = [], httpUser = '', httpPass = '') { + if(projectId === undefined) { + throw new Error('Missing required parameter: "projectId"'); + } + + if(name === undefined) { + throw new Error('Missing required parameter: "name"'); + } + + if(status === undefined) { + throw new Error('Missing required parameter: "status"'); + } + + if(schedule === undefined) { + throw new Error('Missing required parameter: "schedule"'); + } + + if(security === undefined) { + throw new Error('Missing required parameter: "security"'); + } + + if(httpMethod === undefined) { + throw new Error('Missing required parameter: "httpMethod"'); + } + + if(httpUrl === undefined) { + throw new Error('Missing required parameter: "httpUrl"'); + } + + let path = '/projects/{projectId}/tasks'.replace(new RegExp('{projectId}', 'g'), projectId); + + let payload = {}; + + if(name) { + payload['name'] = name; + } + + if(status) { + payload['status'] = status; + } + + if(schedule) { + payload['schedule'] = schedule; + } + + if(security) { + payload['security'] = security; + } + + if(httpMethod) { + payload['httpMethod'] = httpMethod; + } + + if(httpUrl) { + payload['httpUrl'] = httpUrl; + } + + if(httpHeaders) { + payload['httpHeaders'] = httpHeaders; + } + + if(httpUser) { + payload['httpUser'] = httpUser; + } + + if(httpPass) { + payload['httpPass'] = httpPass; + } + + return http + .post(path, { + 'content-type': 'application/json', + }, payload); + }, + + /** + * Get Task + * + * + * @param {string} projectId + * @param {string} taskId + * @throws {Error} + * @return {Promise} + */ + getTask: function(projectId, taskId) { + if(projectId === undefined) { + throw new Error('Missing required parameter: "projectId"'); + } + + if(taskId === undefined) { + throw new Error('Missing required parameter: "taskId"'); + } + + let path = '/projects/{projectId}/tasks/{taskId}'.replace(new RegExp('{projectId}', 'g'), projectId).replace(new RegExp('{taskId}', 'g'), taskId); + + let payload = {}; + + return http + .get(path, { + 'content-type': 'application/json', + }, payload); + }, + + /** + * Update Task + * + * + * @param {string} projectId + * @param {string} taskId + * @param {string} name + * @param {string} status + * @param {string} schedule + * @param {boolean} security + * @param {string} httpMethod + * @param {string} httpUrl + * @param {string[]} httpHeaders + * @param {string} httpUser + * @param {string} httpPass + * @throws {Error} + * @return {Promise} + */ + updateTask: function(projectId, taskId, name, status, schedule, security, httpMethod, httpUrl, httpHeaders = [], httpUser = '', httpPass = '') { + if(projectId === undefined) { + throw new Error('Missing required parameter: "projectId"'); + } + + if(taskId === undefined) { + throw new Error('Missing required parameter: "taskId"'); + } + + if(name === undefined) { + throw new Error('Missing required parameter: "name"'); + } + + if(status === undefined) { + throw new Error('Missing required parameter: "status"'); + } + + if(schedule === undefined) { + throw new Error('Missing required parameter: "schedule"'); + } + + if(security === undefined) { + throw new Error('Missing required parameter: "security"'); + } + + if(httpMethod === undefined) { + throw new Error('Missing required parameter: "httpMethod"'); + } + + if(httpUrl === undefined) { + throw new Error('Missing required parameter: "httpUrl"'); + } + + let path = '/projects/{projectId}/tasks/{taskId}'.replace(new RegExp('{projectId}', 'g'), projectId).replace(new RegExp('{taskId}', 'g'), taskId); + + let payload = {}; + + if(name) { + payload['name'] = name; + } + + if(status) { + payload['status'] = status; + } + + if(schedule) { + payload['schedule'] = schedule; + } + + if(security) { + payload['security'] = security; + } + + if(httpMethod) { + payload['httpMethod'] = httpMethod; + } + + if(httpUrl) { + payload['httpUrl'] = httpUrl; + } + + if(httpHeaders) { + payload['httpHeaders'] = httpHeaders; + } + + if(httpUser) { + payload['httpUser'] = httpUser; + } + + if(httpPass) { + payload['httpPass'] = httpPass; + } + + return http + .put(path, { + 'content-type': 'application/json', + }, payload); + }, + + /** + * Delete Task + * + * + * @param {string} projectId + * @param {string} taskId + * @throws {Error} + * @return {Promise} + */ + deleteTask: function(projectId, taskId) { + if(projectId === undefined) { + throw new Error('Missing required parameter: "projectId"'); + } + + if(taskId === undefined) { + throw new Error('Missing required parameter: "taskId"'); + } + + let path = '/projects/{projectId}/tasks/{taskId}'.replace(new RegExp('{projectId}', 'g'), projectId).replace(new RegExp('{taskId}', 'g'), taskId); + + let payload = {}; + + return http + .delete(path, { + 'content-type': 'application/json', + }, payload); + }, + + /** + * Get Project + * + * + * @param {string} projectId + * @param {string} range + * @throws {Error} + * @return {Promise} + */ + getUsage: function(projectId, range = 'last30') { + if(projectId === undefined) { + throw new Error('Missing required parameter: "projectId"'); + } + + let path = '/projects/{projectId}/usage'.replace(new RegExp('{projectId}', 'g'), projectId); + + let payload = {}; + + if(range) { + payload['range'] = range; + } + + return http + .get(path, { + 'content-type': 'application/json', + }, payload); + }, + + /** + * List Webhooks + * + * + * @param {string} projectId + * @throws {Error} + * @return {Promise} + */ + listWebhooks: function(projectId) { + if(projectId === undefined) { + throw new Error('Missing required parameter: "projectId"'); + } + + let path = '/projects/{projectId}/webhooks'.replace(new RegExp('{projectId}', 'g'), projectId); + + let payload = {}; + + return http + .get(path, { + 'content-type': 'application/json', + }, payload); + }, + + /** + * Create Webhook + * + * + * @param {string} projectId + * @param {string} name + * @param {string[]} events + * @param {string} url + * @param {boolean} security + * @param {string} httpUser + * @param {string} httpPass + * @throws {Error} + * @return {Promise} + */ + createWebhook: function(projectId, name, events, url, security, httpUser = '', httpPass = '') { + if(projectId === undefined) { + throw new Error('Missing required parameter: "projectId"'); + } + + if(name === undefined) { + throw new Error('Missing required parameter: "name"'); + } + + if(events === undefined) { + throw new Error('Missing required parameter: "events"'); + } + + if(url === undefined) { + throw new Error('Missing required parameter: "url"'); + } + + if(security === undefined) { + throw new Error('Missing required parameter: "security"'); + } + + let path = '/projects/{projectId}/webhooks'.replace(new RegExp('{projectId}', 'g'), projectId); + + let payload = {}; + + if(name) { + payload['name'] = name; + } + + if(events) { + payload['events'] = events; + } + + if(url) { + payload['url'] = url; + } + + if(security) { + payload['security'] = security; + } + + if(httpUser) { + payload['httpUser'] = httpUser; + } + + if(httpPass) { + payload['httpPass'] = httpPass; + } + + return http + .post(path, { + 'content-type': 'application/json', + }, payload); + }, + + /** + * Get Webhook + * + * + * @param {string} projectId + * @param {string} webhookId + * @throws {Error} + * @return {Promise} + */ + getWebhook: function(projectId, webhookId) { + if(projectId === undefined) { + throw new Error('Missing required parameter: "projectId"'); + } + + if(webhookId === undefined) { + throw new Error('Missing required parameter: "webhookId"'); + } + + let path = '/projects/{projectId}/webhooks/{webhookId}'.replace(new RegExp('{projectId}', 'g'), projectId).replace(new RegExp('{webhookId}', 'g'), webhookId); + + let payload = {}; + + return http + .get(path, { + 'content-type': 'application/json', + }, payload); + }, + + /** + * Update Webhook + * + * + * @param {string} projectId + * @param {string} webhookId + * @param {string} name + * @param {string[]} events + * @param {string} url + * @param {boolean} security + * @param {string} httpUser + * @param {string} httpPass + * @throws {Error} + * @return {Promise} + */ + updateWebhook: function(projectId, webhookId, name, events, url, security, httpUser = '', httpPass = '') { + if(projectId === undefined) { + throw new Error('Missing required parameter: "projectId"'); + } + + if(webhookId === undefined) { + throw new Error('Missing required parameter: "webhookId"'); + } + + if(name === undefined) { + throw new Error('Missing required parameter: "name"'); + } + + if(events === undefined) { + throw new Error('Missing required parameter: "events"'); + } + + if(url === undefined) { + throw new Error('Missing required parameter: "url"'); + } + + if(security === undefined) { + throw new Error('Missing required parameter: "security"'); + } + + let path = '/projects/{projectId}/webhooks/{webhookId}'.replace(new RegExp('{projectId}', 'g'), projectId).replace(new RegExp('{webhookId}', 'g'), webhookId); + + let payload = {}; + + if(name) { + payload['name'] = name; + } + + if(events) { + payload['events'] = events; + } + + if(url) { + payload['url'] = url; + } + + if(security) { + payload['security'] = security; + } + + if(httpUser) { + payload['httpUser'] = httpUser; + } + + if(httpPass) { + payload['httpPass'] = httpPass; + } + + return http + .put(path, { + 'content-type': 'application/json', + }, payload); + }, + + /** + * Delete Webhook + * + * + * @param {string} projectId + * @param {string} webhookId + * @throws {Error} + * @return {Promise} + */ + deleteWebhook: function(projectId, webhookId) { + if(projectId === undefined) { + throw new Error('Missing required parameter: "projectId"'); + } + + if(webhookId === undefined) { + throw new Error('Missing required parameter: "webhookId"'); + } + + let path = '/projects/{projectId}/webhooks/{webhookId}'.replace(new RegExp('{projectId}', 'g'), projectId).replace(new RegExp('{webhookId}', 'g'), webhookId); + + let payload = {}; + + return http + .delete(path, { + 'content-type': 'application/json', + }, payload); + } + }; + + let storage = { + + /** + * List Files + * + * Get a list of all the user files. You can use the query params to filter + * your results. On admin mode, this endpoint will return a list of all of the + * project files. [Learn more about different API modes](/docs/admin). + * + * @param {string} search + * @param {number} limit + * @param {number} offset + * @param {string} orderType + * @throws {Error} + * @return {Promise} + */ + listFiles: function(search = '', limit = 25, offset = 0, orderType = 'ASC') { + let path = '/storage/files'; + + let payload = {}; + + if(search) { + payload['search'] = search; + } + + if(limit) { + payload['limit'] = limit; + } + + if(offset) { + payload['offset'] = offset; + } + + if(orderType) { + payload['orderType'] = orderType; + } + + return http + .get(path, { + 'content-type': 'application/json', + }, payload); + }, + + /** + * Create File + * + * Create a new file. The user who creates the file will automatically be + * assigned to read and write access unless he has passed custom values for + * read and write arguments. + * + * @param {File} file + * @param {string[]} read + * @param {string[]} write + * @throws {Error} + * @return {Promise} + */ + createFile: function(file, read, write) { + if(file === undefined) { + throw new Error('Missing required parameter: "file"'); + } + + if(read === undefined) { + throw new Error('Missing required parameter: "read"'); + } + + if(write === undefined) { + throw new Error('Missing required parameter: "write"'); + } + + let path = '/storage/files'; + + let payload = {}; + + if(file) { + payload['file'] = file; + } + + if(read) { + payload['read'] = read; + } + + if(write) { + payload['write'] = write; + } + + return http + .post(path, { + 'content-type': 'multipart/form-data', + }, payload); + }, + + /** + * Get File + * + * Get file by its unique ID. This endpoint response returns a JSON object + * with the file metadata. + * + * @param {string} fileId + * @throws {Error} + * @return {Promise} + */ + getFile: function(fileId) { + if(fileId === undefined) { + throw new Error('Missing required parameter: "fileId"'); + } + + let path = '/storage/files/{fileId}'.replace(new RegExp('{fileId}', 'g'), fileId); + + let payload = {}; + + return http + .get(path, { + 'content-type': 'application/json', + }, payload); + }, + + /** + * Update File + * + * Update file by its unique ID. Only users with write permissions have access + * to update this resource. + * + * @param {string} fileId + * @param {string[]} read + * @param {string[]} write + * @throws {Error} + * @return {Promise} + */ + updateFile: function(fileId, read, write) { + if(fileId === undefined) { + throw new Error('Missing required parameter: "fileId"'); + } + + if(read === undefined) { + throw new Error('Missing required parameter: "read"'); + } + + if(write === undefined) { + throw new Error('Missing required parameter: "write"'); + } + + let path = '/storage/files/{fileId}'.replace(new RegExp('{fileId}', 'g'), fileId); + + let payload = {}; + + if(read) { + payload['read'] = read; + } + + if(write) { + payload['write'] = write; + } + + return http + .put(path, { + 'content-type': 'application/json', + }, payload); + }, + + /** + * Delete File + * + * Delete a file by its unique ID. Only users with write permissions have + * access to delete this resource. + * + * @param {string} fileId + * @throws {Error} + * @return {Promise} + */ + deleteFile: function(fileId) { + if(fileId === undefined) { + throw new Error('Missing required parameter: "fileId"'); + } + + let path = '/storage/files/{fileId}'.replace(new RegExp('{fileId}', 'g'), fileId); + + let payload = {}; + + return http + .delete(path, { + 'content-type': 'application/json', + }, payload); + }, + + /** + * Get File for Download + * + * Get file content by its unique ID. The endpoint response return with a + * 'Content-Disposition: attachment' header that tells the browser to start + * downloading the file to user downloads directory. + * + * @param {string} fileId + * @throws {Error} + * @return {string} + */ + getFileDownload: function(fileId) { + if(fileId === undefined) { + throw new Error('Missing required parameter: "fileId"'); + } + + let path = '/storage/files/{fileId}/download'.replace(new RegExp('{fileId}', 'g'), fileId); + + let payload = {}; + + payload['project'] = config.project; + + payload['key'] = config.key; + + + let query = []; + + for (let p in payload) { + if(Array.isArray(payload[p])) { + for (let index = 0; index < payload[p].length; index++) { + let param = payload[p][index]; + query.push(encodeURIComponent(p + '[]') + "=" + encodeURIComponent(param)); + } + } + else { + query.push(encodeURIComponent(p) + "=" + encodeURIComponent(payload[p])); + } + } + + query = query.join("&"); + + return config.endpoint + path + ((query) ? '?' + query : ''); + }, + + /** + * Get File Preview + * + * Get a file preview image. Currently, this method supports preview for image + * files (jpg, png, and gif), other supported formats, like pdf, docs, slides, + * and spreadsheets, will return the file icon image. You can also pass query + * string arguments for cutting and resizing your preview image. + * + * @param {string} fileId + * @param {number} width + * @param {number} height + * @param {number} quality + * @param {string} background + * @param {string} output + * @throws {Error} + * @return {string} + */ + getFilePreview: function(fileId, width = 0, height = 0, quality = 100, background = '', output = '') { + if(fileId === undefined) { + throw new Error('Missing required parameter: "fileId"'); + } + + let path = '/storage/files/{fileId}/preview'.replace(new RegExp('{fileId}', 'g'), fileId); + + let payload = {}; + + if(width) { + payload['width'] = width; + } + + if(height) { + payload['height'] = height; + } + + if(quality) { + payload['quality'] = quality; + } + + if(background) { + payload['background'] = background; + } + + if(output) { + payload['output'] = output; + } + + payload['project'] = config.project; + + payload['key'] = config.key; + + + let query = []; + + for (let p in payload) { + if(Array.isArray(payload[p])) { + for (let index = 0; index < payload[p].length; index++) { + let param = payload[p][index]; + query.push(encodeURIComponent(p + '[]') + "=" + encodeURIComponent(param)); + } + } + else { + query.push(encodeURIComponent(p) + "=" + encodeURIComponent(payload[p])); + } + } + + query = query.join("&"); + + return config.endpoint + path + ((query) ? '?' + query : ''); + }, + + /** + * Get File for View + * + * Get file content by its unique ID. This endpoint is similar to the download + * method but returns with no 'Content-Disposition: attachment' header. + * + * @param {string} fileId + * @param {string} as + * @throws {Error} + * @return {string} + */ + getFileView: function(fileId, as = '') { + if(fileId === undefined) { + throw new Error('Missing required parameter: "fileId"'); + } + + let path = '/storage/files/{fileId}/view'.replace(new RegExp('{fileId}', 'g'), fileId); + + let payload = {}; + + if(as) { + payload['as'] = as; + } + + payload['project'] = config.project; + + payload['key'] = config.key; + + + let query = []; + + for (let p in payload) { + if(Array.isArray(payload[p])) { + for (let index = 0; index < payload[p].length; index++) { + let param = payload[p][index]; + query.push(encodeURIComponent(p + '[]') + "=" + encodeURIComponent(param)); + } + } + else { + query.push(encodeURIComponent(p) + "=" + encodeURIComponent(payload[p])); + } + } + + query = query.join("&"); + + return config.endpoint + path + ((query) ? '?' + query : ''); + } + }; + + let teams = { + + /** + * List Teams + * + * Get a list of all the current user teams. You can use the query params to + * filter your results. On admin mode, this endpoint will return a list of all + * of the project teams. [Learn more about different API modes](/docs/admin). + * + * @param {string} search + * @param {number} limit + * @param {number} offset + * @param {string} orderType + * @throws {Error} + * @return {Promise} + */ + list: function(search = '', limit = 25, offset = 0, orderType = 'ASC') { + let path = '/teams'; + + let payload = {}; + + if(search) { + payload['search'] = search; + } + + if(limit) { + payload['limit'] = limit; + } + + if(offset) { + payload['offset'] = offset; + } + + if(orderType) { + payload['orderType'] = orderType; + } + + return http + .get(path, { + 'content-type': 'application/json', + }, payload); + }, + + /** + * Create Team + * + * Create a new team. The user who creates the team will automatically be + * assigned as the owner of the team. The team owner can invite new members, + * who will be able add new owners and update or delete the team from your + * project. + * + * @param {string} name + * @param {string[]} roles + * @throws {Error} + * @return {Promise} + */ + create: function(name, roles = ["owner"]) { + if(name === undefined) { + throw new Error('Missing required parameter: "name"'); + } + + let path = '/teams'; + + let payload = {}; + + if(name) { + payload['name'] = name; + } + + if(roles) { + payload['roles'] = roles; + } + + return http + .post(path, { + 'content-type': 'application/json', + }, payload); + }, + + /** + * Get Team + * + * Get team by its unique ID. All team members have read access for this + * resource. + * + * @param {string} teamId + * @throws {Error} + * @return {Promise} + */ + get: function(teamId) { + if(teamId === undefined) { + throw new Error('Missing required parameter: "teamId"'); + } + + let path = '/teams/{teamId}'.replace(new RegExp('{teamId}', 'g'), teamId); + + let payload = {}; + + return http + .get(path, { + 'content-type': 'application/json', + }, payload); + }, + + /** + * Update Team + * + * Update team by its unique ID. Only team owners have write access for this + * resource. + * + * @param {string} teamId + * @param {string} name + * @throws {Error} + * @return {Promise} + */ + update: function(teamId, name) { + if(teamId === undefined) { + throw new Error('Missing required parameter: "teamId"'); + } + + if(name === undefined) { + throw new Error('Missing required parameter: "name"'); + } + + let path = '/teams/{teamId}'.replace(new RegExp('{teamId}', 'g'), teamId); + + let payload = {}; + + if(name) { + payload['name'] = name; + } + + return http + .put(path, { + 'content-type': 'application/json', + }, payload); + }, + + /** + * Delete Team + * + * Delete team by its unique ID. Only team owners have write access for this + * resource. + * + * @param {string} teamId + * @throws {Error} + * @return {Promise} + */ + delete: function(teamId) { + if(teamId === undefined) { + throw new Error('Missing required parameter: "teamId"'); + } + + let path = '/teams/{teamId}'.replace(new RegExp('{teamId}', 'g'), teamId); + + let payload = {}; + + return http + .delete(path, { + 'content-type': 'application/json', + }, payload); + }, + + /** + * Get Team Memberships + * + * Get team members by the team unique ID. All team members have read access + * for this list of resources. + * + * @param {string} teamId + * @param {string} search + * @param {number} limit + * @param {number} offset + * @param {string} orderType + * @throws {Error} + * @return {Promise} + */ + getMemberships: function(teamId, search = '', limit = 25, offset = 0, orderType = 'ASC') { + if(teamId === undefined) { + throw new Error('Missing required parameter: "teamId"'); + } + + let path = '/teams/{teamId}/memberships'.replace(new RegExp('{teamId}', 'g'), teamId); + + let payload = {}; + + if(search) { + payload['search'] = search; + } + + if(limit) { + payload['limit'] = limit; + } + + if(offset) { + payload['offset'] = offset; + } + + if(orderType) { + payload['orderType'] = orderType; + } + + return http + .get(path, { + 'content-type': 'application/json', + }, payload); + }, + + /** + * Create Team Membership + * + * Use this endpoint to invite a new member to join your team. An email with a + * link to join the team will be sent to the new member email address if the + * member doesn't exist in the project it will be created automatically. + * + * Use the 'URL' parameter to redirect the user from the invitation email back + * to your app. When the user is redirected, use the [Update Team Membership + * Status](/docs/client/teams#updateMembershipStatus) endpoint to allow the + * user to accept the invitation to the team. + * + * Please note that in order to avoid a [Redirect + * Attacks](https://github.com/OWASP/CheatSheetSeries/blob/master/cheatsheets/Unvalidated_Redirects_and_Forwards_Cheat_Sheet.md) + * the only valid redirect URL's are the once from domains you have set when + * added your platforms in the console interface. + * + * @param {string} teamId + * @param {string} email + * @param {string[]} roles + * @param {string} url + * @param {string} name + * @throws {Error} + * @return {Promise} + */ + createMembership: function(teamId, email, roles, url, name = '') { + if(teamId === undefined) { + throw new Error('Missing required parameter: "teamId"'); + } + + if(email === undefined) { + throw new Error('Missing required parameter: "email"'); + } + + if(roles === undefined) { + throw new Error('Missing required parameter: "roles"'); + } + + if(url === undefined) { + throw new Error('Missing required parameter: "url"'); + } + + let path = '/teams/{teamId}/memberships'.replace(new RegExp('{teamId}', 'g'), teamId); + + let payload = {}; + + if(email) { + payload['email'] = email; + } + + if(name) { + payload['name'] = name; + } + + if(roles) { + payload['roles'] = roles; + } + + if(url) { + payload['url'] = url; + } + + return http + .post(path, { + 'content-type': 'application/json', + }, payload); + }, + + /** + * Delete Team Membership + * + * This endpoint allows a user to leave a team or for a team owner to delete + * the membership of any other team member. You can also use this endpoint to + * delete a user membership even if he didn't accept it. + * + * @param {string} teamId + * @param {string} inviteId + * @throws {Error} + * @return {Promise} + */ + deleteMembership: function(teamId, inviteId) { + if(teamId === undefined) { + throw new Error('Missing required parameter: "teamId"'); + } + + if(inviteId === undefined) { + throw new Error('Missing required parameter: "inviteId"'); + } + + let path = '/teams/{teamId}/memberships/{inviteId}'.replace(new RegExp('{teamId}', 'g'), teamId).replace(new RegExp('{inviteId}', 'g'), inviteId); + + let payload = {}; + + return http + .delete(path, { + 'content-type': 'application/json', + }, payload); + }, + + /** + * Update Team Membership Status + * + * Use this endpoint to allow a user to accept an invitation to join a team + * after he is being redirected back to your app from the invitation email he + * was sent. + * + * @param {string} teamId + * @param {string} inviteId + * @param {string} userId + * @param {string} secret + * @throws {Error} + * @return {Promise} + */ + updateMembershipStatus: function(teamId, inviteId, userId, secret) { + if(teamId === undefined) { + throw new Error('Missing required parameter: "teamId"'); + } + + if(inviteId === undefined) { + throw new Error('Missing required parameter: "inviteId"'); + } + + if(userId === undefined) { + throw new Error('Missing required parameter: "userId"'); + } + + if(secret === undefined) { + throw new Error('Missing required parameter: "secret"'); + } + + let path = '/teams/{teamId}/memberships/{inviteId}/status'.replace(new RegExp('{teamId}', 'g'), teamId).replace(new RegExp('{inviteId}', 'g'), inviteId); + + let payload = {}; + + if(userId) { + payload['userId'] = userId; + } + + if(secret) { + payload['secret'] = secret; + } + + return http + .patch(path, { + 'content-type': 'application/json', + }, payload); + } + }; + + let users = { + + /** + * List Users + * + * Get a list of all the project users. You can use the query params to filter + * your results. + * + * @param {string} search + * @param {number} limit + * @param {number} offset + * @param {string} orderType + * @throws {Error} + * @return {Promise} + */ + list: function(search = '', limit = 25, offset = 0, orderType = 'ASC') { + let path = '/users'; + + let payload = {}; + + if(search) { + payload['search'] = search; + } + + if(limit) { + payload['limit'] = limit; + } + + if(offset) { + payload['offset'] = offset; + } + + if(orderType) { + payload['orderType'] = orderType; + } + + return http + .get(path, { + 'content-type': 'application/json', + }, payload); + }, + + /** + * Create User + * + * Create a new user. + * + * @param {string} email + * @param {string} password + * @param {string} name + * @throws {Error} + * @return {Promise} + */ + create: function(email, password, name = '') { + if(email === undefined) { + throw new Error('Missing required parameter: "email"'); + } + + if(password === undefined) { + throw new Error('Missing required parameter: "password"'); + } + + let path = '/users'; + + let payload = {}; + + if(email) { + payload['email'] = email; + } + + if(password) { + payload['password'] = password; + } + + if(name) { + payload['name'] = name; + } + + return http + .post(path, { + 'content-type': 'application/json', + }, payload); + }, + + /** + * Get User + * + * Get user by its unique ID. + * + * @param {string} userId + * @throws {Error} + * @return {Promise} + */ + get: function(userId) { + if(userId === undefined) { + throw new Error('Missing required parameter: "userId"'); + } + + let path = '/users/{userId}'.replace(new RegExp('{userId}', 'g'), userId); + + let payload = {}; + + return http + .get(path, { + 'content-type': 'application/json', + }, payload); + }, + + /** + * Delete User + * + * Delete a user by its unique ID. + * + * @param {string} userId + * @throws {Error} + * @return {Promise} + */ + deleteUser: function(userId) { + if(userId === undefined) { + throw new Error('Missing required parameter: "userId"'); + } + + let path = '/users/{userId}'.replace(new RegExp('{userId}', 'g'), userId); + + let payload = {}; + + return http + .delete(path, { + 'content-type': 'application/json', + }, payload); + }, + + /** + * Get User Logs + * + * Get user activity logs list by its unique ID. + * + * @param {string} userId + * @throws {Error} + * @return {Promise} + */ + getLogs: function(userId) { + if(userId === undefined) { + throw new Error('Missing required parameter: "userId"'); + } + + let path = '/users/{userId}/logs'.replace(new RegExp('{userId}', 'g'), userId); + + let payload = {}; + + return http + .get(path, { + 'content-type': 'application/json', + }, payload); + }, + + /** + * Get User Preferences + * + * Get user preferences by its unique ID. + * + * @param {string} userId + * @throws {Error} + * @return {Promise} + */ + getPrefs: function(userId) { + if(userId === undefined) { + throw new Error('Missing required parameter: "userId"'); + } + + let path = '/users/{userId}/prefs'.replace(new RegExp('{userId}', 'g'), userId); + + let payload = {}; + + return http + .get(path, { + 'content-type': 'application/json', + }, payload); + }, + + /** + * Update User Preferences + * + * Update user preferences by its unique ID. You can pass only the specific + * settings you wish to update. + * + * @param {string} userId + * @param {object} prefs + * @throws {Error} + * @return {Promise} + */ + updatePrefs: function(userId, prefs) { + if(userId === undefined) { + throw new Error('Missing required parameter: "userId"'); + } + + if(prefs === undefined) { + throw new Error('Missing required parameter: "prefs"'); + } + + let path = '/users/{userId}/prefs'.replace(new RegExp('{userId}', 'g'), userId); + + let payload = {}; + + if(prefs) { + payload['prefs'] = prefs; + } + + return http + .patch(path, { + 'content-type': 'application/json', + }, payload); + }, + + /** + * Get User Sessions + * + * Get user sessions list by its unique ID. + * + * @param {string} userId + * @throws {Error} + * @return {Promise} + */ + getSessions: function(userId) { + if(userId === undefined) { + throw new Error('Missing required parameter: "userId"'); + } + + let path = '/users/{userId}/sessions'.replace(new RegExp('{userId}', 'g'), userId); + + let payload = {}; + + return http + .get(path, { + 'content-type': 'application/json', + }, payload); + }, + + /** + * Delete User Sessions + * + * Delete all user sessions by its unique ID. + * + * @param {string} userId + * @throws {Error} + * @return {Promise} + */ + deleteSessions: function(userId) { + if(userId === undefined) { + throw new Error('Missing required parameter: "userId"'); + } + + let path = '/users/{userId}/sessions'.replace(new RegExp('{userId}', 'g'), userId); + + let payload = {}; + + return http + .delete(path, { + 'content-type': 'application/json', + }, payload); + }, + + /** + * Delete User Session + * + * Delete user sessions by its unique ID. + * + * @param {string} userId + * @param {string} sessionId + * @throws {Error} + * @return {Promise} + */ + deleteSession: function(userId, sessionId) { + if(userId === undefined) { + throw new Error('Missing required parameter: "userId"'); + } + + if(sessionId === undefined) { + throw new Error('Missing required parameter: "sessionId"'); + } + + let path = '/users/{userId}/sessions/{sessionId}'.replace(new RegExp('{userId}', 'g'), userId).replace(new RegExp('{sessionId}', 'g'), sessionId); + + let payload = {}; + + return http + .delete(path, { + 'content-type': 'application/json', + }, payload); + }, + + /** + * Update User Status + * + * Update user status by its unique ID. + * + * @param {string} userId + * @param {string} status + * @throws {Error} + * @return {Promise} + */ + updateStatus: function(userId, status) { + if(userId === undefined) { + throw new Error('Missing required parameter: "userId"'); + } + + if(status === undefined) { + throw new Error('Missing required parameter: "status"'); + } + + let path = '/users/{userId}/status'.replace(new RegExp('{userId}', 'g'), userId); + + let payload = {}; + + if(status) { + payload['status'] = status; + } + + return http + .patch(path, { + 'content-type': 'application/json', + }, payload); + } + }; + + return { + setEndpoint: setEndpoint, + setProject: setProject, + setKey: setKey, + setLocale: setLocale, + setMode: setMode, + account: account, + avatars: avatars, + database: database, + functions: functions, + health: health, + locale: locale, + projects: projects, + storage: storage, + teams: teams, + users: users + }; + }; + + if(typeof module !== "undefined") { + module.exports = window.Appwrite; + } + +})((typeof window !== "undefined") ? window : {}); \ No newline at end of file diff --git a/app/sdks/0.7.0/console-web/src/sdk.min.js b/app/sdks/0.7.0/console-web/src/sdk.min.js new file mode 100644 index 0000000000..2413458654 --- /dev/null +++ b/app/sdks/0.7.0/console-web/src/sdk.min.js @@ -0,0 +1,431 @@ +(function(window){'use strict';window.Appwrite=function(){let config={endpoint:'https://appwrite.io/v1',project:'',key:'',locale:'',mode:'',};let setEndpoint=function(endpoint){config.endpoint=endpoint;return this};let setProject=function(value){http.addGlobalHeader('X-Appwrite-Project',value);config.project=value;return this};let setKey=function(value){http.addGlobalHeader('X-Appwrite-Key',value);config.key=value;return this};let setLocale=function(value){http.addGlobalHeader('X-Appwrite-Locale',value);config.locale=value;return this};let setMode=function(value){http.addGlobalHeader('X-Appwrite-Mode',value);config.mode=value;return this};let http=function(document){let globalParams=[],globalHeaders=[];let addParam=function(url,param,value){let a=document.createElement('a'),regex=/(?:\?|&|&)+([^=]+)(?:=([^&]*))*/g;let match,str=[];a.href=url;param=encodeURIComponent(param);while(match=regex.exec(a.search))if(param!==match[1])str.push(match[1]+(match[2]?"="+match[2]:""));str.push(param+(value?"="+encodeURIComponent(value):""));a.search=str.join("&");return a.href};let buildQuery=function(params){let str=[];for(let p in params){if(Array.isArray(params[p])){for(let index=0;index=request.status){resolve(data)}else{reject(data)}};if(progress){request.addEventListener('progress',progress);request.upload.addEventListener('progress',progress,!1)} +request.onerror=function(){reject(new Error("Network Error"))};request.send(params)})};return{'get':function(path,headers={},params={}){return call('GET',path+((Object.keys(params).length>0)?'?'+buildQuery(params):''),headers,{})},'post':function(path,headers={},params={},progress=null){return call('POST',path,headers,params,progress)},'put':function(path,headers={},params={},progress=null){return call('PUT',path,headers,params,progress)},'patch':function(path,headers={},params={},progress=null){return call('PATCH',path,headers,params,progress)},'delete':function(path,headers={},params={},progress=null){return call('DELETE',path,headers,params,progress)},'addGlobalParam':addGlobalParam,'addGlobalHeader':addGlobalHeader}}(window.document);let account={get:function(){let path='/account';let payload={};return http.get(path,{'content-type':'application/json',},payload)},create:function(email,password,name=''){if(email===undefined){throw new Error('Missing required parameter: "email"')} +if(password===undefined){throw new Error('Missing required parameter: "password"')} +let path='/account';let payload={};if(email){payload.email=email} +if(password){payload.password=password} +if(name){payload.name=name} +return http.post(path,{'content-type':'application/json',},payload)},delete:function(){let path='/account';let payload={};return http.delete(path,{'content-type':'application/json',},payload)},updateEmail:function(email,password){if(email===undefined){throw new Error('Missing required parameter: "email"')} +if(password===undefined){throw new Error('Missing required parameter: "password"')} +let path='/account/email';let payload={};if(email){payload.email=email} +if(password){payload.password=password} +return http.patch(path,{'content-type':'application/json',},payload)},getLogs:function(){let path='/account/logs';let payload={};return http.get(path,{'content-type':'application/json',},payload)},updateName:function(name){if(name===undefined){throw new Error('Missing required parameter: "name"')} +let path='/account/name';let payload={};if(name){payload.name=name} +return http.patch(path,{'content-type':'application/json',},payload)},updatePassword:function(password,oldPassword){if(password===undefined){throw new Error('Missing required parameter: "password"')} +if(oldPassword===undefined){throw new Error('Missing required parameter: "oldPassword"')} +let path='/account/password';let payload={};if(password){payload.password=password} +if(oldPassword){payload.oldPassword=oldPassword} +return http.patch(path,{'content-type':'application/json',},payload)},getPrefs:function(){let path='/account/prefs';let payload={};return http.get(path,{'content-type':'application/json',},payload)},updatePrefs:function(prefs){if(prefs===undefined){throw new Error('Missing required parameter: "prefs"')} +let path='/account/prefs';let payload={};if(prefs){payload.prefs=prefs} +return http.patch(path,{'content-type':'application/json',},payload)},createRecovery:function(email,url){if(email===undefined){throw new Error('Missing required parameter: "email"')} +if(url===undefined){throw new Error('Missing required parameter: "url"')} +let path='/account/recovery';let payload={};if(email){payload.email=email} +if(url){payload.url=url} +return http.post(path,{'content-type':'application/json',},payload)},updateRecovery:function(userId,secret,password,passwordAgain){if(userId===undefined){throw new Error('Missing required parameter: "userId"')} +if(secret===undefined){throw new Error('Missing required parameter: "secret"')} +if(password===undefined){throw new Error('Missing required parameter: "password"')} +if(passwordAgain===undefined){throw new Error('Missing required parameter: "passwordAgain"')} +let path='/account/recovery';let payload={};if(userId){payload.userId=userId} +if(secret){payload.secret=secret} +if(password){payload.password=password} +if(passwordAgain){payload.passwordAgain=passwordAgain} +return http.put(path,{'content-type':'application/json',},payload)},getSessions:function(){let path='/account/sessions';let payload={};return http.get(path,{'content-type':'application/json',},payload)},createSession:function(email,password){if(email===undefined){throw new Error('Missing required parameter: "email"')} +if(password===undefined){throw new Error('Missing required parameter: "password"')} +let path='/account/sessions';let payload={};if(email){payload.email=email} +if(password){payload.password=password} +return http.post(path,{'content-type':'application/json',},payload)},deleteSessions:function(){let path='/account/sessions';let payload={};return http.delete(path,{'content-type':'application/json',},payload)},createOAuth2Session:function(provider,success='https://appwrite.io/auth/oauth2/success',failure='https://appwrite.io/auth/oauth2/failure',scopes=[]){if(provider===undefined){throw new Error('Missing required parameter: "provider"')} +let path='/account/sessions/oauth2/{provider}'.replace(new RegExp('{provider}','g'),provider);let payload={};if(success){payload.success=success} +if(failure){payload.failure=failure} +if(scopes){payload.scopes=scopes} +payload.project=config.project;payload.key=config.key;let query=[];for(let p in payload){if(Array.isArray(payload[p])){for(let index=0;index; + + /** + * Create Account + * + * Use this endpoint to allow a new user to register a new account in your + * project. After the user registration completes successfully, you can use + * the [/account/verfication](/docs/client/account#createVerification) route + * to start verifying the user email address. To allow your new user to login + * to his new account, you need to create a new [account + * session](/docs/client/account#createSession). + * + * @param {string} email + * @param {string} password + * @param {string} name + * @throws {Error} + * @return {Promise} + */ + create(email: string, password: string, name: string): Promise; + + /** + * Delete Account + * + * Delete a currently logged in user account. Behind the scene, the user + * record is not deleted but permanently blocked from any access. This is done + * to avoid deleted accounts being overtaken by new users with the same email + * address. Any user-related resources like documents or storage files should + * be deleted separately. + * + * @throws {Error} + * @return {Promise} + */ + delete(): Promise; + + /** + * Update Account Email + * + * Update currently logged in user account email address. After changing user + * address, user confirmation status is being reset and a new confirmation + * mail is sent. For security measures, user password is required to complete + * this request. + * + * @param {string} email + * @param {string} password + * @throws {Error} + * @return {Promise} + */ + updateEmail(email: string, password: string): Promise; + + /** + * Get Account Logs + * + * Get currently logged in user list of latest security activity logs. Each + * log returns user IP address, location and date and time of log. + * + * @throws {Error} + * @return {Promise} + */ + getLogs(): Promise; + + /** + * Update Account Name + * + * Update currently logged in user account name. + * + * @param {string} name + * @throws {Error} + * @return {Promise} + */ + updateName(name: string): Promise; + + /** + * Update Account Password + * + * Update currently logged in user password. For validation, user is required + * to pass the password twice. + * + * @param {string} password + * @param {string} oldPassword + * @throws {Error} + * @return {Promise} + */ + updatePassword(password: string, oldPassword: string): Promise; + + /** + * Get Account Preferences + * + * Get currently logged in user preferences as a key-value object. + * + * @throws {Error} + * @return {Promise} + */ + getPrefs(): Promise; + + /** + * Update Account Preferences + * + * Update currently logged in user account preferences. You can pass only the + * specific settings you wish to update. + * + * @param {object} prefs + * @throws {Error} + * @return {Promise} + */ + updatePrefs(prefs: object): Promise; + + /** + * Create Password Recovery + * + * Sends the user an email with a temporary secret key for password reset. + * When the user clicks the confirmation link he is redirected back to your + * app password reset URL with the secret key and email address values + * attached to the URL query string. Use the query string params to submit a + * request to the [PUT /account/recovery](/docs/client/account#updateRecovery) + * endpoint to complete the process. + * + * @param {string} email + * @param {string} url + * @throws {Error} + * @return {Promise} + */ + createRecovery(email: string, url: string): Promise; + + /** + * Complete Password Recovery + * + * Use this endpoint to complete the user account password reset. Both the + * **userId** and **secret** arguments will be passed as query parameters to + * the redirect URL you have provided when sending your request to the [POST + * /account/recovery](/docs/client/account#createRecovery) endpoint. + * + * Please note that in order to avoid a [Redirect + * Attack](https://github.com/OWASP/CheatSheetSeries/blob/master/cheatsheets/Unvalidated_Redirects_and_Forwards_Cheat_Sheet.md) + * the only valid redirect URLs are the ones from domains you have set when + * adding your platforms in the console interface. + * + * @param {string} userId + * @param {string} secret + * @param {string} password + * @param {string} passwordAgain + * @throws {Error} + * @return {Promise} + */ + updateRecovery(userId: string, secret: string, password: string, passwordAgain: string): Promise; + + /** + * Get Account Sessions + * + * Get currently logged in user list of active sessions across different + * devices. + * + * @throws {Error} + * @return {Promise} + */ + getSessions(): Promise; + + /** + * Create Account Session + * + * Allow the user to login into his account by providing a valid email and + * password combination. This route will create a new session for the user. + * + * @param {string} email + * @param {string} password + * @throws {Error} + * @return {Promise} + */ + createSession(email: string, password: string): Promise; + + /** + * Delete All Account Sessions + * + * Delete all sessions from the user account and remove any sessions cookies + * from the end client. + * + * @throws {Error} + * @return {Promise} + */ + deleteSessions(): Promise; + + /** + * Create Account Session with OAuth2 + * + * Allow the user to login to his account using the OAuth2 provider of his + * choice. Each OAuth2 provider should be enabled from the Appwrite console + * first. Use the success and failure arguments to provide a redirect URL's + * back to your app when login is completed. + * + * @param {string} provider + * @param {string} success + * @param {string} failure + * @param {string[]} scopes + * @throws {Error} + * @return {Promise} + */ + createOAuth2Session(provider: string, success: string, failure: string, scopes: string[]): Promise; + + /** + * Delete Account Session + * + * Use this endpoint to log out the currently logged in user from all his + * account sessions across all his different devices. When using the option id + * argument, only the session unique ID provider will be deleted. + * + * @param {string} sessionId + * @throws {Error} + * @return {Promise} + */ + deleteSession(sessionId: string): Promise; + + /** + * Create Email Verification + * + * Use this endpoint to send a verification message to your user email address + * to confirm they are the valid owners of that address. Both the **userId** + * and **secret** arguments will be passed as query parameters to the URL you + * have provided to be attached to the verification email. The provided URL + * should redirect the user back to your app and allow you to complete the + * verification process by verifying both the **userId** and **secret** + * parameters. Learn more about how to [complete the verification + * process](/docs/client/account#updateAccountVerification). + * + * Please note that in order to avoid a [Redirect + * Attack](https://github.com/OWASP/CheatSheetSeries/blob/master/cheatsheets/Unvalidated_Redirects_and_Forwards_Cheat_Sheet.md), + * the only valid redirect URLs are the ones from domains you have set when + * adding your platforms in the console interface. + * + * + * @param {string} url + * @throws {Error} + * @return {Promise} + */ + createVerification(url: string): Promise; + + /** + * Complete Email Verification + * + * Use this endpoint to complete the user email verification process. Use both + * the **userId** and **secret** parameters that were attached to your app URL + * to verify the user email ownership. If confirmed this route will return a + * 200 status code. + * + * @param {string} userId + * @param {string} secret + * @throws {Error} + * @return {Promise} + */ + updateVerification(userId: string, secret: string): Promise; + + } + + export interface Avatars { + + /** + * Get Browser Icon + * + * You can use this endpoint to show different browser icons to your users. + * The code argument receives the browser code as it appears in your user + * /account/sessions endpoint. Use width, height and quality arguments to + * change the output settings. + * + * @param {string} code + * @param {number} width + * @param {number} height + * @param {number} quality + * @throws {Error} + * @return {string} + */ + getBrowser(code: string, width: number, height: number, quality: number): string; + + /** + * Get Credit Card Icon + * + * Need to display your users with your billing method or their payment + * methods? The credit card endpoint will return you the icon of the credit + * card provider you need. Use width, height and quality arguments to change + * the output settings. + * + * @param {string} code + * @param {number} width + * @param {number} height + * @param {number} quality + * @throws {Error} + * @return {string} + */ + getCreditCard(code: string, width: number, height: number, quality: number): string; + + /** + * Get Favicon + * + * Use this endpoint to fetch the favorite icon (AKA favicon) of a any remote + * website URL. + * + * @param {string} url + * @throws {Error} + * @return {string} + */ + getFavicon(url: string): string; + + /** + * Get Country Flag + * + * You can use this endpoint to show different country flags icons to your + * users. The code argument receives the 2 letter country code. Use width, + * height and quality arguments to change the output settings. + * + * @param {string} code + * @param {number} width + * @param {number} height + * @param {number} quality + * @throws {Error} + * @return {string} + */ + getFlag(code: string, width: number, height: number, quality: number): string; + + /** + * Get Image from URL + * + * Use this endpoint to fetch a remote image URL and crop it to any image size + * you want. This endpoint is very useful if you need to crop and display + * remote images in your app or in case you want to make sure a 3rd party + * image is properly served using a TLS protocol. + * + * @param {string} url + * @param {number} width + * @param {number} height + * @throws {Error} + * @return {string} + */ + getImage(url: string, width: number, height: number): string; + + /** + * Get User Initials + * + * Use this endpoint to show your user initials avatar icon on your website or + * app. By default, this route will try to print your logged-in user name or + * email initials. You can also overwrite the user name if you pass the 'name' + * parameter. If no name is given and no user is logged, an empty avatar will + * be returned. + * + * You can use the color and background params to change the avatar colors. By + * default, a random theme will be selected. The random theme will persist for + * the user's initials when reloading the same theme will always return for + * the same initials. + * + * @param {string} name + * @param {number} width + * @param {number} height + * @param {string} color + * @param {string} background + * @throws {Error} + * @return {string} + */ + getInitials(name: string, width: number, height: number, color: string, background: string): string; + + /** + * Get QR Code + * + * Converts a given plain text to a QR code image. You can use the query + * parameters to change the size and style of the resulting image. + * + * @param {string} text + * @param {number} size + * @param {number} margin + * @param {boolean} download + * @throws {Error} + * @return {string} + */ + getQR(text: string, size: number, margin: number, download: boolean): string; + + } + + export interface Database { + + /** + * List Collections + * + * Get a list of all the user collections. You can use the query params to + * filter your results. On admin mode, this endpoint will return a list of all + * of the project collections. [Learn more about different API + * modes](/docs/admin). + * + * @param {string} search + * @param {number} limit + * @param {number} offset + * @param {string} orderType + * @throws {Error} + * @return {Promise} + */ + listCollections(search: string, limit: number, offset: number, orderType: string): Promise; + + /** + * Create Collection + * + * Create a new Collection. + * + * @param {string} name + * @param {string[]} read + * @param {string[]} write + * @param {string[]} rules + * @throws {Error} + * @return {Promise} + */ + createCollection(name: string, read: string[], write: string[], rules: string[]): Promise; + + /** + * Get Collection + * + * Get collection by its unique ID. This endpoint response returns a JSON + * object with the collection metadata. + * + * @param {string} collectionId + * @throws {Error} + * @return {Promise} + */ + getCollection(collectionId: string): Promise; + + /** + * Update Collection + * + * Update collection by its unique ID. + * + * @param {string} collectionId + * @param {string} name + * @param {string[]} read + * @param {string[]} write + * @param {string[]} rules + * @throws {Error} + * @return {Promise} + */ + updateCollection(collectionId: string, name: string, read: string[], write: string[], rules: string[]): Promise; + + /** + * Delete Collection + * + * Delete a collection by its unique ID. Only users with write permissions + * have access to delete this resource. + * + * @param {string} collectionId + * @throws {Error} + * @return {Promise} + */ + deleteCollection(collectionId: string): Promise; + + /** + * List Documents + * + * Get a list of all the user documents. You can use the query params to + * filter your results. On admin mode, this endpoint will return a list of all + * of the project documents. [Learn more about different API + * modes](/docs/admin). + * + * @param {string} collectionId + * @param {string[]} filters + * @param {number} limit + * @param {number} offset + * @param {string} orderField + * @param {string} orderType + * @param {string} orderCast + * @param {string} search + * @throws {Error} + * @return {Promise} + */ + listDocuments(collectionId: string, filters: string[], limit: number, offset: number, orderField: string, orderType: string, orderCast: string, search: string): Promise; + + /** + * Create Document + * + * Create a new Document. Before using this route, you should create a new + * collection resource using either a [server + * integration](/docs/server/database?sdk=nodejs#createCollection) API or + * directly from your database console. + * + * @param {string} collectionId + * @param {object} data + * @param {string[]} read + * @param {string[]} write + * @param {string} parentDocument + * @param {string} parentProperty + * @param {string} parentPropertyType + * @throws {Error} + * @return {Promise} + */ + createDocument(collectionId: string, data: object, read: string[], write: string[], parentDocument: string, parentProperty: string, parentPropertyType: string): Promise; + + /** + * Get Document + * + * Get document by its unique ID. This endpoint response returns a JSON object + * with the document data. + * + * @param {string} collectionId + * @param {string} documentId + * @throws {Error} + * @return {Promise} + */ + getDocument(collectionId: string, documentId: string): Promise; + + /** + * Update Document + * + * + * @param {string} collectionId + * @param {string} documentId + * @param {object} data + * @param {string[]} read + * @param {string[]} write + * @throws {Error} + * @return {Promise} + */ + updateDocument(collectionId: string, documentId: string, data: object, read: string[], write: string[]): Promise; + + /** + * Delete Document + * + * Delete document by its unique ID. This endpoint deletes only the parent + * documents, his attributes and relations to other documents. Child documents + * **will not** be deleted. + * + * @param {string} collectionId + * @param {string} documentId + * @throws {Error} + * @return {Promise} + */ + deleteDocument(collectionId: string, documentId: string): Promise; + + } + + export interface Functions { + + /** + * List Functions + * + * + * @param {string} search + * @param {number} limit + * @param {number} offset + * @param {string} orderType + * @throws {Error} + * @return {Promise} + */ + list(search: string, limit: number, offset: number, orderType: string): Promise; + + /** + * Create Function + * + * + * @param {string} name + * @param {string} env + * @param {object} vars + * @param {string[]} events + * @param {string} schedule + * @param {number} timeout + * @throws {Error} + * @return {Promise} + */ + create(name: string, env: string, vars: object, events: string[], schedule: string, timeout: number): Promise; + + /** + * Get Function + * + * + * @param {string} functionId + * @throws {Error} + * @return {Promise} + */ + get(functionId: string): Promise; + + /** + * Update Function + * + * + * @param {string} functionId + * @param {string} name + * @param {object} vars + * @param {string[]} events + * @param {string} schedule + * @param {number} timeout + * @throws {Error} + * @return {Promise} + */ + update(functionId: string, name: string, vars: object, events: string[], schedule: string, timeout: number): Promise; + + /** + * Delete Function + * + * + * @param {string} functionId + * @throws {Error} + * @return {Promise} + */ + delete(functionId: string): Promise; + + /** + * List Executions + * + * + * @param {string} functionId + * @param {string} search + * @param {number} limit + * @param {number} offset + * @param {string} orderType + * @throws {Error} + * @return {Promise} + */ + listExecutions(functionId: string, search: string, limit: number, offset: number, orderType: string): Promise; + + /** + * Create Execution + * + * + * @param {string} functionId + * @param {number} async + * @throws {Error} + * @return {Promise} + */ + createExecution(functionId: string, async: number): Promise; + + /** + * Get Execution + * + * + * @param {string} functionId + * @param {string} executionId + * @throws {Error} + * @return {Promise} + */ + getExecution(functionId: string, executionId: string): Promise; + + /** + * Update Function Tag + * + * + * @param {string} functionId + * @param {string} tag + * @throws {Error} + * @return {Promise} + */ + updateTag(functionId: string, tag: string): Promise; + + /** + * List Tags + * + * + * @param {string} functionId + * @param {string} search + * @param {number} limit + * @param {number} offset + * @param {string} orderType + * @throws {Error} + * @return {Promise} + */ + listTags(functionId: string, search: string, limit: number, offset: number, orderType: string): Promise; + + /** + * Create Tag + * + * + * @param {string} functionId + * @param {string} command + * @param {File} code + * @throws {Error} + * @return {Promise} + */ + createTag(functionId: string, command: string, code: File): Promise; + + /** + * Get Tag + * + * + * @param {string} functionId + * @param {string} tagId + * @throws {Error} + * @return {Promise} + */ + getTag(functionId: string, tagId: string): Promise; + + /** + * Delete Tag + * + * + * @param {string} functionId + * @param {string} tagId + * @throws {Error} + * @return {Promise} + */ + deleteTag(functionId: string, tagId: string): Promise; + + } + + export interface Health { + + /** + * Get HTTP + * + * Check the Appwrite HTTP server is up and responsive. + * + * @throws {Error} + * @return {Promise} + */ + get(): Promise; + + /** + * Get Anti virus + * + * Check the Appwrite Anti Virus server is up and connection is successful. + * + * @throws {Error} + * @return {Promise} + */ + getAntiVirus(): Promise; + + /** + * Get Cache + * + * Check the Appwrite in-memory cache server is up and connection is + * successful. + * + * @throws {Error} + * @return {Promise} + */ + getCache(): Promise; + + /** + * Get DB + * + * Check the Appwrite database server is up and connection is successful. + * + * @throws {Error} + * @return {Promise} + */ + getDB(): Promise; + + /** + * Get Certificate Queue + * + * Get the number of certificates that are waiting to be issued against + * [Letsencrypt](https://letsencrypt.org/) in the Appwrite internal queue + * server. + * + * @throws {Error} + * @return {Promise} + */ + getQueueCertificates(): Promise; + + /** + * Get Functions Queue + * + * + * @throws {Error} + * @return {Promise} + */ + getQueueFunctions(): Promise; + + /** + * Get Logs Queue + * + * Get the number of logs that are waiting to be processed in the Appwrite + * internal queue server. + * + * @throws {Error} + * @return {Promise} + */ + getQueueLogs(): Promise; + + /** + * Get Tasks Queue + * + * Get the number of tasks that are waiting to be processed in the Appwrite + * internal queue server. + * + * @throws {Error} + * @return {Promise} + */ + getQueueTasks(): Promise; + + /** + * Get Usage Queue + * + * Get the number of usage stats that are waiting to be processed in the + * Appwrite internal queue server. + * + * @throws {Error} + * @return {Promise} + */ + getQueueUsage(): Promise; + + /** + * Get Webhooks Queue + * + * Get the number of webhooks that are waiting to be processed in the Appwrite + * internal queue server. + * + * @throws {Error} + * @return {Promise} + */ + getQueueWebhooks(): Promise; + + /** + * Get Local Storage + * + * Check the Appwrite local storage device is up and connection is successful. + * + * @throws {Error} + * @return {Promise} + */ + getStorageLocal(): Promise; + + /** + * Get Time + * + * Check the Appwrite server time is synced with Google remote NTP server. We + * use this technology to smoothly handle leap seconds with no disruptive + * events. The [Network Time + * Protocol](https://en.wikipedia.org/wiki/Network_Time_Protocol) (NTP) is + * used by hundreds of millions of computers and devices to synchronize their + * clocks over the Internet. If your computer sets its own clock, it likely + * uses NTP. + * + * @throws {Error} + * @return {Promise} + */ + getTime(): Promise; + + } + + export interface Locale { + + /** + * Get User Locale + * + * Get the current user location based on IP. Returns an object with user + * country code, country name, continent name, continent code, ip address and + * suggested currency. You can use the locale header to get the data in a + * supported language. + * + * ([IP Geolocation by DB-IP](https://db-ip.com)) + * + * @throws {Error} + * @return {Promise} + */ + get(): Promise; + + /** + * List Continents + * + * List of all continents. You can use the locale header to get the data in a + * supported language. + * + * @throws {Error} + * @return {Promise} + */ + getContinents(): Promise; + + /** + * List Countries + * + * List of all countries. You can use the locale header to get the data in a + * supported language. + * + * @throws {Error} + * @return {Promise} + */ + getCountries(): Promise; + + /** + * List EU Countries + * + * List of all countries that are currently members of the EU. You can use the + * locale header to get the data in a supported language. + * + * @throws {Error} + * @return {Promise} + */ + getCountriesEU(): Promise; + + /** + * List Countries Phone Codes + * + * List of all countries phone codes. You can use the locale header to get the + * data in a supported language. + * + * @throws {Error} + * @return {Promise} + */ + getCountriesPhones(): Promise; + + /** + * List Currencies + * + * List of all currencies, including currency symbol, name, plural, and + * decimal digits for all major and minor currencies. You can use the locale + * header to get the data in a supported language. + * + * @throws {Error} + * @return {Promise} + */ + getCurrencies(): Promise; + + /** + * List Languages + * + * List of all languages classified by ISO 639-1 including 2-letter code, name + * in English, and name in the respective language. + * + * @throws {Error} + * @return {Promise} + */ + getLanguages(): Promise; + + } + + export interface Projects { + + /** + * List Projects + * + * + * @param {string} search + * @param {number} limit + * @param {number} offset + * @param {string} orderType + * @throws {Error} + * @return {Promise} + */ + list(search: string, limit: number, offset: number, orderType: string): Promise; + + /** + * Create Project + * + * + * @param {string} name + * @param {string} teamId + * @param {string} description + * @param {string} logo + * @param {string} url + * @param {string} legalName + * @param {string} legalCountry + * @param {string} legalState + * @param {string} legalCity + * @param {string} legalAddress + * @param {string} legalTaxId + * @throws {Error} + * @return {Promise} + */ + create(name: string, teamId: string, description: string, logo: string, url: string, legalName: string, legalCountry: string, legalState: string, legalCity: string, legalAddress: string, legalTaxId: string): Promise; + + /** + * Get Project + * + * + * @param {string} projectId + * @throws {Error} + * @return {Promise} + */ + get(projectId: string): Promise; + + /** + * Update Project + * + * + * @param {string} projectId + * @param {string} name + * @param {string} description + * @param {string} logo + * @param {string} url + * @param {string} legalName + * @param {string} legalCountry + * @param {string} legalState + * @param {string} legalCity + * @param {string} legalAddress + * @param {string} legalTaxId + * @throws {Error} + * @return {Promise} + */ + update(projectId: string, name: string, description: string, logo: string, url: string, legalName: string, legalCountry: string, legalState: string, legalCity: string, legalAddress: string, legalTaxId: string): Promise; + + /** + * Delete Project + * + * + * @param {string} projectId + * @param {string} password + * @throws {Error} + * @return {Promise} + */ + delete(projectId: string, password: string): Promise; + + /** + * List Domains + * + * + * @param {string} projectId + * @throws {Error} + * @return {Promise} + */ + listDomains(projectId: string): Promise; + + /** + * Create Domain + * + * + * @param {string} projectId + * @param {string} domain + * @throws {Error} + * @return {Promise} + */ + createDomain(projectId: string, domain: string): Promise; + + /** + * Get Domain + * + * + * @param {string} projectId + * @param {string} domainId + * @throws {Error} + * @return {Promise} + */ + getDomain(projectId: string, domainId: string): Promise; + + /** + * Delete Domain + * + * + * @param {string} projectId + * @param {string} domainId + * @throws {Error} + * @return {Promise} + */ + deleteDomain(projectId: string, domainId: string): Promise; + + /** + * Update Domain Verification Status + * + * + * @param {string} projectId + * @param {string} domainId + * @throws {Error} + * @return {Promise} + */ + updateDomainVerification(projectId: string, domainId: string): Promise; + + /** + * List Keys + * + * + * @param {string} projectId + * @throws {Error} + * @return {Promise} + */ + listKeys(projectId: string): Promise; + + /** + * Create Key + * + * + * @param {string} projectId + * @param {string} name + * @param {string[]} scopes + * @throws {Error} + * @return {Promise} + */ + createKey(projectId: string, name: string, scopes: string[]): Promise; + + /** + * Get Key + * + * + * @param {string} projectId + * @param {string} keyId + * @throws {Error} + * @return {Promise} + */ + getKey(projectId: string, keyId: string): Promise; + + /** + * Update Key + * + * + * @param {string} projectId + * @param {string} keyId + * @param {string} name + * @param {string[]} scopes + * @throws {Error} + * @return {Promise} + */ + updateKey(projectId: string, keyId: string, name: string, scopes: string[]): Promise; + + /** + * Delete Key + * + * + * @param {string} projectId + * @param {string} keyId + * @throws {Error} + * @return {Promise} + */ + deleteKey(projectId: string, keyId: string): Promise; + + /** + * Update Project OAuth2 + * + * + * @param {string} projectId + * @param {string} provider + * @param {string} appId + * @param {string} secret + * @throws {Error} + * @return {Promise} + */ + updateOAuth2(projectId: string, provider: string, appId: string, secret: string): Promise; + + /** + * List Platforms + * + * + * @param {string} projectId + * @throws {Error} + * @return {Promise} + */ + listPlatforms(projectId: string): Promise; + + /** + * Create Platform + * + * + * @param {string} projectId + * @param {string} type + * @param {string} name + * @param {string} key + * @param {string} store + * @param {string} hostname + * @throws {Error} + * @return {Promise} + */ + createPlatform(projectId: string, type: string, name: string, key: string, store: string, hostname: string): Promise; + + /** + * Get Platform + * + * + * @param {string} projectId + * @param {string} platformId + * @throws {Error} + * @return {Promise} + */ + getPlatform(projectId: string, platformId: string): Promise; + + /** + * Update Platform + * + * + * @param {string} projectId + * @param {string} platformId + * @param {string} name + * @param {string} key + * @param {string} store + * @param {string} hostname + * @throws {Error} + * @return {Promise} + */ + updatePlatform(projectId: string, platformId: string, name: string, key: string, store: string, hostname: string): Promise; + + /** + * Delete Platform + * + * + * @param {string} projectId + * @param {string} platformId + * @throws {Error} + * @return {Promise} + */ + deletePlatform(projectId: string, platformId: string): Promise; + + /** + * List Tasks + * + * + * @param {string} projectId + * @throws {Error} + * @return {Promise} + */ + listTasks(projectId: string): Promise; + + /** + * Create Task + * + * + * @param {string} projectId + * @param {string} name + * @param {string} status + * @param {string} schedule + * @param {boolean} security + * @param {string} httpMethod + * @param {string} httpUrl + * @param {string[]} httpHeaders + * @param {string} httpUser + * @param {string} httpPass + * @throws {Error} + * @return {Promise} + */ + createTask(projectId: string, name: string, status: string, schedule: string, security: boolean, httpMethod: string, httpUrl: string, httpHeaders: string[], httpUser: string, httpPass: string): Promise; + + /** + * Get Task + * + * + * @param {string} projectId + * @param {string} taskId + * @throws {Error} + * @return {Promise} + */ + getTask(projectId: string, taskId: string): Promise; + + /** + * Update Task + * + * + * @param {string} projectId + * @param {string} taskId + * @param {string} name + * @param {string} status + * @param {string} schedule + * @param {boolean} security + * @param {string} httpMethod + * @param {string} httpUrl + * @param {string[]} httpHeaders + * @param {string} httpUser + * @param {string} httpPass + * @throws {Error} + * @return {Promise} + */ + updateTask(projectId: string, taskId: string, name: string, status: string, schedule: string, security: boolean, httpMethod: string, httpUrl: string, httpHeaders: string[], httpUser: string, httpPass: string): Promise; + + /** + * Delete Task + * + * + * @param {string} projectId + * @param {string} taskId + * @throws {Error} + * @return {Promise} + */ + deleteTask(projectId: string, taskId: string): Promise; + + /** + * Get Project + * + * + * @param {string} projectId + * @param {string} range + * @throws {Error} + * @return {Promise} + */ + getUsage(projectId: string, range: string): Promise; + + /** + * List Webhooks + * + * + * @param {string} projectId + * @throws {Error} + * @return {Promise} + */ + listWebhooks(projectId: string): Promise; + + /** + * Create Webhook + * + * + * @param {string} projectId + * @param {string} name + * @param {string[]} events + * @param {string} url + * @param {boolean} security + * @param {string} httpUser + * @param {string} httpPass + * @throws {Error} + * @return {Promise} + */ + createWebhook(projectId: string, name: string, events: string[], url: string, security: boolean, httpUser: string, httpPass: string): Promise; + + /** + * Get Webhook + * + * + * @param {string} projectId + * @param {string} webhookId + * @throws {Error} + * @return {Promise} + */ + getWebhook(projectId: string, webhookId: string): Promise; + + /** + * Update Webhook + * + * + * @param {string} projectId + * @param {string} webhookId + * @param {string} name + * @param {string[]} events + * @param {string} url + * @param {boolean} security + * @param {string} httpUser + * @param {string} httpPass + * @throws {Error} + * @return {Promise} + */ + updateWebhook(projectId: string, webhookId: string, name: string, events: string[], url: string, security: boolean, httpUser: string, httpPass: string): Promise; + + /** + * Delete Webhook + * + * + * @param {string} projectId + * @param {string} webhookId + * @throws {Error} + * @return {Promise} + */ + deleteWebhook(projectId: string, webhookId: string): Promise; + + } + + export interface Storage { + + /** + * List Files + * + * Get a list of all the user files. You can use the query params to filter + * your results. On admin mode, this endpoint will return a list of all of the + * project files. [Learn more about different API modes](/docs/admin). + * + * @param {string} search + * @param {number} limit + * @param {number} offset + * @param {string} orderType + * @throws {Error} + * @return {Promise} + */ + listFiles(search: string, limit: number, offset: number, orderType: string): Promise; + + /** + * Create File + * + * Create a new file. The user who creates the file will automatically be + * assigned to read and write access unless he has passed custom values for + * read and write arguments. + * + * @param {File} file + * @param {string[]} read + * @param {string[]} write + * @throws {Error} + * @return {Promise} + */ + createFile(file: File, read: string[], write: string[]): Promise; + + /** + * Get File + * + * Get file by its unique ID. This endpoint response returns a JSON object + * with the file metadata. + * + * @param {string} fileId + * @throws {Error} + * @return {Promise} + */ + getFile(fileId: string): Promise; + + /** + * Update File + * + * Update file by its unique ID. Only users with write permissions have access + * to update this resource. + * + * @param {string} fileId + * @param {string[]} read + * @param {string[]} write + * @throws {Error} + * @return {Promise} + */ + updateFile(fileId: string, read: string[], write: string[]): Promise; + + /** + * Delete File + * + * Delete a file by its unique ID. Only users with write permissions have + * access to delete this resource. + * + * @param {string} fileId + * @throws {Error} + * @return {Promise} + */ + deleteFile(fileId: string): Promise; + + /** + * Get File for Download + * + * Get file content by its unique ID. The endpoint response return with a + * 'Content-Disposition: attachment' header that tells the browser to start + * downloading the file to user downloads directory. + * + * @param {string} fileId + * @throws {Error} + * @return {string} + */ + getFileDownload(fileId: string): string; + + /** + * Get File Preview + * + * Get a file preview image. Currently, this method supports preview for image + * files (jpg, png, and gif), other supported formats, like pdf, docs, slides, + * and spreadsheets, will return the file icon image. You can also pass query + * string arguments for cutting and resizing your preview image. + * + * @param {string} fileId + * @param {number} width + * @param {number} height + * @param {number} quality + * @param {string} background + * @param {string} output + * @throws {Error} + * @return {string} + */ + getFilePreview(fileId: string, width: number, height: number, quality: number, background: string, output: string): string; + + /** + * Get File for View + * + * Get file content by its unique ID. This endpoint is similar to the download + * method but returns with no 'Content-Disposition: attachment' header. + * + * @param {string} fileId + * @param {string} as + * @throws {Error} + * @return {string} + */ + getFileView(fileId: string, as: string): string; + + } + + export interface Teams { + + /** + * List Teams + * + * Get a list of all the current user teams. You can use the query params to + * filter your results. On admin mode, this endpoint will return a list of all + * of the project teams. [Learn more about different API modes](/docs/admin). + * + * @param {string} search + * @param {number} limit + * @param {number} offset + * @param {string} orderType + * @throws {Error} + * @return {Promise} + */ + list(search: string, limit: number, offset: number, orderType: string): Promise; + + /** + * Create Team + * + * Create a new team. The user who creates the team will automatically be + * assigned as the owner of the team. The team owner can invite new members, + * who will be able add new owners and update or delete the team from your + * project. + * + * @param {string} name + * @param {string[]} roles + * @throws {Error} + * @return {Promise} + */ + create(name: string, roles: string[]): Promise; + + /** + * Get Team + * + * Get team by its unique ID. All team members have read access for this + * resource. + * + * @param {string} teamId + * @throws {Error} + * @return {Promise} + */ + get(teamId: string): Promise; + + /** + * Update Team + * + * Update team by its unique ID. Only team owners have write access for this + * resource. + * + * @param {string} teamId + * @param {string} name + * @throws {Error} + * @return {Promise} + */ + update(teamId: string, name: string): Promise; + + /** + * Delete Team + * + * Delete team by its unique ID. Only team owners have write access for this + * resource. + * + * @param {string} teamId + * @throws {Error} + * @return {Promise} + */ + delete(teamId: string): Promise; + + /** + * Get Team Memberships + * + * Get team members by the team unique ID. All team members have read access + * for this list of resources. + * + * @param {string} teamId + * @param {string} search + * @param {number} limit + * @param {number} offset + * @param {string} orderType + * @throws {Error} + * @return {Promise} + */ + getMemberships(teamId: string, search: string, limit: number, offset: number, orderType: string): Promise; + + /** + * Create Team Membership + * + * Use this endpoint to invite a new member to join your team. An email with a + * link to join the team will be sent to the new member email address if the + * member doesn't exist in the project it will be created automatically. + * + * Use the 'URL' parameter to redirect the user from the invitation email back + * to your app. When the user is redirected, use the [Update Team Membership + * Status](/docs/client/teams#updateMembershipStatus) endpoint to allow the + * user to accept the invitation to the team. + * + * Please note that in order to avoid a [Redirect + * Attacks](https://github.com/OWASP/CheatSheetSeries/blob/master/cheatsheets/Unvalidated_Redirects_and_Forwards_Cheat_Sheet.md) + * the only valid redirect URL's are the once from domains you have set when + * added your platforms in the console interface. + * + * @param {string} teamId + * @param {string} email + * @param {string[]} roles + * @param {string} url + * @param {string} name + * @throws {Error} + * @return {Promise} + */ + createMembership(teamId: string, email: string, roles: string[], url: string, name: string): Promise; + + /** + * Delete Team Membership + * + * This endpoint allows a user to leave a team or for a team owner to delete + * the membership of any other team member. You can also use this endpoint to + * delete a user membership even if he didn't accept it. + * + * @param {string} teamId + * @param {string} inviteId + * @throws {Error} + * @return {Promise} + */ + deleteMembership(teamId: string, inviteId: string): Promise; + + /** + * Update Team Membership Status + * + * Use this endpoint to allow a user to accept an invitation to join a team + * after he is being redirected back to your app from the invitation email he + * was sent. + * + * @param {string} teamId + * @param {string} inviteId + * @param {string} userId + * @param {string} secret + * @throws {Error} + * @return {Promise} + */ + updateMembershipStatus(teamId: string, inviteId: string, userId: string, secret: string): Promise; + + } + + export interface Users { + + /** + * List Users + * + * Get a list of all the project users. You can use the query params to filter + * your results. + * + * @param {string} search + * @param {number} limit + * @param {number} offset + * @param {string} orderType + * @throws {Error} + * @return {Promise} + */ + list(search: string, limit: number, offset: number, orderType: string): Promise; + + /** + * Create User + * + * Create a new user. + * + * @param {string} email + * @param {string} password + * @param {string} name + * @throws {Error} + * @return {Promise} + */ + create(email: string, password: string, name: string): Promise; + + /** + * Get User + * + * Get user by its unique ID. + * + * @param {string} userId + * @throws {Error} + * @return {Promise} + */ + get(userId: string): Promise; + + /** + * Delete User + * + * Delete a user by its unique ID. + * + * @param {string} userId + * @throws {Error} + * @return {Promise} + */ + deleteUser(userId: string): Promise; + + /** + * Get User Logs + * + * Get user activity logs list by its unique ID. + * + * @param {string} userId + * @throws {Error} + * @return {Promise} + */ + getLogs(userId: string): Promise; + + /** + * Get User Preferences + * + * Get user preferences by its unique ID. + * + * @param {string} userId + * @throws {Error} + * @return {Promise} + */ + getPrefs(userId: string): Promise; + + /** + * Update User Preferences + * + * Update user preferences by its unique ID. You can pass only the specific + * settings you wish to update. + * + * @param {string} userId + * @param {object} prefs + * @throws {Error} + * @return {Promise} + */ + updatePrefs(userId: string, prefs: object): Promise; + + /** + * Get User Sessions + * + * Get user sessions list by its unique ID. + * + * @param {string} userId + * @throws {Error} + * @return {Promise} + */ + getSessions(userId: string): Promise; + + /** + * Delete User Sessions + * + * Delete all user sessions by its unique ID. + * + * @param {string} userId + * @throws {Error} + * @return {Promise} + */ + deleteSessions(userId: string): Promise; + + /** + * Delete User Session + * + * Delete user sessions by its unique ID. + * + * @param {string} userId + * @param {string} sessionId + * @throws {Error} + * @return {Promise} + */ + deleteSession(userId: string, sessionId: string): Promise; + + /** + * Update User Status + * + * Update user status by its unique ID. + * + * @param {string} userId + * @param {string} status + * @throws {Error} + * @return {Promise} + */ + updateStatus(userId: string, status: string): Promise; + + } + + +} \ No newline at end of file diff --git a/app/sdks/0.7.0/server-deno/CHANGELOG.md b/app/sdks/0.7.0/server-deno/CHANGELOG.md new file mode 100644 index 0000000000..fa4d35e687 --- /dev/null +++ b/app/sdks/0.7.0/server-deno/CHANGELOG.md @@ -0,0 +1 @@ +# Change Log \ No newline at end of file diff --git a/app/sdks/0.7.0/server-deno/LICENSE b/app/sdks/0.7.0/server-deno/LICENSE new file mode 100644 index 0000000000..fc7c051a91 --- /dev/null +++ b/app/sdks/0.7.0/server-deno/LICENSE @@ -0,0 +1,12 @@ +Copyright (c) 2019 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: + + 1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. + + 2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. + + 3. Neither the name Appwrite nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. \ No newline at end of file diff --git a/app/sdks/0.7.0/server-deno/README.md b/app/sdks/0.7.0/server-deno/README.md new file mode 100644 index 0000000000..82bd02c8ef --- /dev/null +++ b/app/sdks/0.7.0/server-deno/README.md @@ -0,0 +1,28 @@ +# Appwrite Deno SDK + +![License](https://img.shields.io/github/license/appwrite/sdk-for-deno.svg?v=1) +![Version](https://img.shields.io/badge/api%20version-0.6.2-blue.svg?v=1) + +**This SDK is compatible with Appwrite server version 0.6.2. For older versions, please check previous releases.** + +Appwrite is an open-source backend as a service server that abstract and simplify complex and repetitive development tasks behind a very simple to use REST API. Appwrite aims to help you develop your apps faster and in a more secure way. + Use the Deno SDK to integrate your app with the Appwrite server to easily start interacting with all of Appwrite backend APIs and tools. + For full API documentation and tutorials go to [https://appwrite.io/docs](https://appwrite.io/docs) + + + +![Appwrite](https://appwrite.io/images/github.png) + +## Installation + +```javascript +import * as sdk from "https://deno.land/x/appwrite/mod.ts"; +``` + +## Contribution + +This library is auto-generated by Appwrite custom [SDK Generator](https://github.com/appwrite/sdk-generator). To learn more about how you can help us improve this SDK, please check the [contribution guide](https://github.com/appwrite/sdk-generator/blob/master/CONTRIBUTING.md) before sending a pull-request. + +## License + +Please see the [BSD-3-Clause license](https://raw.githubusercontent.com/appwrite/appwrite/master/LICENSE) file for more information. \ No newline at end of file diff --git a/app/sdks/0.7.0/server-deno/docs/examples/avatars/get-browser.md b/app/sdks/0.7.0/server-deno/docs/examples/avatars/get-browser.md new file mode 100644 index 0000000000..27c0336054 --- /dev/null +++ b/app/sdks/0.7.0/server-deno/docs/examples/avatars/get-browser.md @@ -0,0 +1,20 @@ +import * as sdk from "https://deno.land/x/appwrite/mod.ts"; + +// Init SDK +let client = new sdk.Client(); + +let avatars = new sdk.Avatars(client); + +client + .setProject('5df5acd0d48c2') // Your project ID + .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key +; + + +let promise = avatars.getBrowser('aa'); + +promise.then(function (response) { + console.log(response); +}, function (error) { + console.log(error); +}); \ No newline at end of file diff --git a/app/sdks/0.7.0/server-deno/docs/examples/avatars/get-credit-card.md b/app/sdks/0.7.0/server-deno/docs/examples/avatars/get-credit-card.md new file mode 100644 index 0000000000..998356a106 --- /dev/null +++ b/app/sdks/0.7.0/server-deno/docs/examples/avatars/get-credit-card.md @@ -0,0 +1,20 @@ +import * as sdk from "https://deno.land/x/appwrite/mod.ts"; + +// Init SDK +let client = new sdk.Client(); + +let avatars = new sdk.Avatars(client); + +client + .setProject('5df5acd0d48c2') // Your project ID + .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key +; + + +let promise = avatars.getCreditCard('amex'); + +promise.then(function (response) { + console.log(response); +}, function (error) { + console.log(error); +}); \ No newline at end of file diff --git a/app/sdks/0.7.0/server-deno/docs/examples/avatars/get-favicon.md b/app/sdks/0.7.0/server-deno/docs/examples/avatars/get-favicon.md new file mode 100644 index 0000000000..43afe096c4 --- /dev/null +++ b/app/sdks/0.7.0/server-deno/docs/examples/avatars/get-favicon.md @@ -0,0 +1,20 @@ +import * as sdk from "https://deno.land/x/appwrite/mod.ts"; + +// Init SDK +let client = new sdk.Client(); + +let avatars = new sdk.Avatars(client); + +client + .setProject('5df5acd0d48c2') // Your project ID + .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key +; + + +let promise = avatars.getFavicon('https://example.com'); + +promise.then(function (response) { + console.log(response); +}, function (error) { + console.log(error); +}); \ No newline at end of file diff --git a/app/sdks/0.7.0/server-deno/docs/examples/avatars/get-flag.md b/app/sdks/0.7.0/server-deno/docs/examples/avatars/get-flag.md new file mode 100644 index 0000000000..6b28e5db2f --- /dev/null +++ b/app/sdks/0.7.0/server-deno/docs/examples/avatars/get-flag.md @@ -0,0 +1,20 @@ +import * as sdk from "https://deno.land/x/appwrite/mod.ts"; + +// Init SDK +let client = new sdk.Client(); + +let avatars = new sdk.Avatars(client); + +client + .setProject('5df5acd0d48c2') // Your project ID + .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key +; + + +let promise = avatars.getFlag('af'); + +promise.then(function (response) { + console.log(response); +}, function (error) { + console.log(error); +}); \ No newline at end of file diff --git a/app/sdks/0.7.0/server-deno/docs/examples/avatars/get-image.md b/app/sdks/0.7.0/server-deno/docs/examples/avatars/get-image.md new file mode 100644 index 0000000000..0a2693c768 --- /dev/null +++ b/app/sdks/0.7.0/server-deno/docs/examples/avatars/get-image.md @@ -0,0 +1,20 @@ +import * as sdk from "https://deno.land/x/appwrite/mod.ts"; + +// Init SDK +let client = new sdk.Client(); + +let avatars = new sdk.Avatars(client); + +client + .setProject('5df5acd0d48c2') // Your project ID + .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key +; + + +let promise = avatars.getImage('https://example.com'); + +promise.then(function (response) { + console.log(response); +}, function (error) { + console.log(error); +}); \ No newline at end of file diff --git a/app/sdks/0.7.0/server-deno/docs/examples/avatars/get-q-r.md b/app/sdks/0.7.0/server-deno/docs/examples/avatars/get-q-r.md new file mode 100644 index 0000000000..6d8446b105 --- /dev/null +++ b/app/sdks/0.7.0/server-deno/docs/examples/avatars/get-q-r.md @@ -0,0 +1,20 @@ +import * as sdk from "https://deno.land/x/appwrite/mod.ts"; + +// Init SDK +let client = new sdk.Client(); + +let avatars = new sdk.Avatars(client); + +client + .setProject('5df5acd0d48c2') // Your project ID + .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key +; + + +let promise = avatars.getQR('[TEXT]'); + +promise.then(function (response) { + console.log(response); +}, function (error) { + console.log(error); +}); \ No newline at end of file diff --git a/app/sdks/0.7.0/server-deno/docs/examples/database/create-collection.md b/app/sdks/0.7.0/server-deno/docs/examples/database/create-collection.md new file mode 100644 index 0000000000..316ae6b222 --- /dev/null +++ b/app/sdks/0.7.0/server-deno/docs/examples/database/create-collection.md @@ -0,0 +1,20 @@ +import * as sdk from "https://deno.land/x/appwrite/mod.ts"; + +// Init SDK +let client = new sdk.Client(); + +let database = new sdk.Database(client); + +client + .setProject('5df5acd0d48c2') // Your project ID + .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key +; + + +let promise = database.createCollection('[NAME]', [], [], []); + +promise.then(function (response) { + console.log(response); +}, function (error) { + console.log(error); +}); \ No newline at end of file diff --git a/app/sdks/0.7.0/server-deno/docs/examples/database/create-document.md b/app/sdks/0.7.0/server-deno/docs/examples/database/create-document.md new file mode 100644 index 0000000000..ef78a839a4 --- /dev/null +++ b/app/sdks/0.7.0/server-deno/docs/examples/database/create-document.md @@ -0,0 +1,20 @@ +import * as sdk from "https://deno.land/x/appwrite/mod.ts"; + +// Init SDK +let client = new sdk.Client(); + +let database = new sdk.Database(client); + +client + .setProject('5df5acd0d48c2') // Your project ID + .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key +; + + +let promise = database.createDocument('[COLLECTION_ID]', {}, [], []); + +promise.then(function (response) { + console.log(response); +}, function (error) { + console.log(error); +}); \ No newline at end of file diff --git a/app/sdks/0.7.0/server-deno/docs/examples/database/delete-collection.md b/app/sdks/0.7.0/server-deno/docs/examples/database/delete-collection.md new file mode 100644 index 0000000000..e9b5d6392b --- /dev/null +++ b/app/sdks/0.7.0/server-deno/docs/examples/database/delete-collection.md @@ -0,0 +1,20 @@ +import * as sdk from "https://deno.land/x/appwrite/mod.ts"; + +// Init SDK +let client = new sdk.Client(); + +let database = new sdk.Database(client); + +client + .setProject('5df5acd0d48c2') // Your project ID + .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key +; + + +let promise = database.deleteCollection('[COLLECTION_ID]'); + +promise.then(function (response) { + console.log(response); +}, function (error) { + console.log(error); +}); \ No newline at end of file diff --git a/app/sdks/0.7.0/server-deno/docs/examples/database/delete-document.md b/app/sdks/0.7.0/server-deno/docs/examples/database/delete-document.md new file mode 100644 index 0000000000..b7d3f52c71 --- /dev/null +++ b/app/sdks/0.7.0/server-deno/docs/examples/database/delete-document.md @@ -0,0 +1,20 @@ +import * as sdk from "https://deno.land/x/appwrite/mod.ts"; + +// Init SDK +let client = new sdk.Client(); + +let database = new sdk.Database(client); + +client + .setProject('5df5acd0d48c2') // Your project ID + .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key +; + + +let promise = database.deleteDocument('[COLLECTION_ID]', '[DOCUMENT_ID]'); + +promise.then(function (response) { + console.log(response); +}, function (error) { + console.log(error); +}); \ No newline at end of file diff --git a/app/sdks/0.7.0/server-deno/docs/examples/database/get-collection-logs.md b/app/sdks/0.7.0/server-deno/docs/examples/database/get-collection-logs.md new file mode 100644 index 0000000000..a72c17bc16 --- /dev/null +++ b/app/sdks/0.7.0/server-deno/docs/examples/database/get-collection-logs.md @@ -0,0 +1,20 @@ +import * as sdk from "https://deno.land/x/appwrite/mod.ts"; + +// Init SDK +let client = new sdk.Client(); + +let database = new sdk.Database(client); + +client + .setProject('5df5acd0d48c2') // Your project ID + .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key +; + + +let promise = database.getCollectionLogs('[COLLECTION_ID]'); + +promise.then(function (response) { + console.log(response); +}, function (error) { + console.log(error); +}); \ No newline at end of file diff --git a/app/sdks/0.7.0/server-deno/docs/examples/database/get-collection.md b/app/sdks/0.7.0/server-deno/docs/examples/database/get-collection.md new file mode 100644 index 0000000000..323bc7ec74 --- /dev/null +++ b/app/sdks/0.7.0/server-deno/docs/examples/database/get-collection.md @@ -0,0 +1,20 @@ +import * as sdk from "https://deno.land/x/appwrite/mod.ts"; + +// Init SDK +let client = new sdk.Client(); + +let database = new sdk.Database(client); + +client + .setProject('5df5acd0d48c2') // Your project ID + .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key +; + + +let promise = database.getCollection('[COLLECTION_ID]'); + +promise.then(function (response) { + console.log(response); +}, function (error) { + console.log(error); +}); \ No newline at end of file diff --git a/app/sdks/0.7.0/server-deno/docs/examples/database/get-document.md b/app/sdks/0.7.0/server-deno/docs/examples/database/get-document.md new file mode 100644 index 0000000000..7a0332251a --- /dev/null +++ b/app/sdks/0.7.0/server-deno/docs/examples/database/get-document.md @@ -0,0 +1,20 @@ +import * as sdk from "https://deno.land/x/appwrite/mod.ts"; + +// Init SDK +let client = new sdk.Client(); + +let database = new sdk.Database(client); + +client + .setProject('5df5acd0d48c2') // Your project ID + .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key +; + + +let promise = database.getDocument('[COLLECTION_ID]', '[DOCUMENT_ID]'); + +promise.then(function (response) { + console.log(response); +}, function (error) { + console.log(error); +}); \ No newline at end of file diff --git a/app/sdks/0.7.0/server-deno/docs/examples/database/list-collections.md b/app/sdks/0.7.0/server-deno/docs/examples/database/list-collections.md new file mode 100644 index 0000000000..292e46f860 --- /dev/null +++ b/app/sdks/0.7.0/server-deno/docs/examples/database/list-collections.md @@ -0,0 +1,20 @@ +import * as sdk from "https://deno.land/x/appwrite/mod.ts"; + +// Init SDK +let client = new sdk.Client(); + +let database = new sdk.Database(client); + +client + .setProject('5df5acd0d48c2') // Your project ID + .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key +; + + +let promise = database.listCollections(); + +promise.then(function (response) { + console.log(response); +}, function (error) { + console.log(error); +}); \ No newline at end of file diff --git a/app/sdks/0.7.0/server-deno/docs/examples/database/list-documents.md b/app/sdks/0.7.0/server-deno/docs/examples/database/list-documents.md new file mode 100644 index 0000000000..bb22a3956a --- /dev/null +++ b/app/sdks/0.7.0/server-deno/docs/examples/database/list-documents.md @@ -0,0 +1,20 @@ +import * as sdk from "https://deno.land/x/appwrite/mod.ts"; + +// Init SDK +let client = new sdk.Client(); + +let database = new sdk.Database(client); + +client + .setProject('5df5acd0d48c2') // Your project ID + .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key +; + + +let promise = database.listDocuments('[COLLECTION_ID]'); + +promise.then(function (response) { + console.log(response); +}, function (error) { + console.log(error); +}); \ No newline at end of file diff --git a/app/sdks/0.7.0/server-deno/docs/examples/database/update-collection.md b/app/sdks/0.7.0/server-deno/docs/examples/database/update-collection.md new file mode 100644 index 0000000000..8239e45f28 --- /dev/null +++ b/app/sdks/0.7.0/server-deno/docs/examples/database/update-collection.md @@ -0,0 +1,20 @@ +import * as sdk from "https://deno.land/x/appwrite/mod.ts"; + +// Init SDK +let client = new sdk.Client(); + +let database = new sdk.Database(client); + +client + .setProject('5df5acd0d48c2') // Your project ID + .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key +; + + +let promise = database.updateCollection('[COLLECTION_ID]', '[NAME]', [], []); + +promise.then(function (response) { + console.log(response); +}, function (error) { + console.log(error); +}); \ No newline at end of file diff --git a/app/sdks/0.7.0/server-deno/docs/examples/database/update-document.md b/app/sdks/0.7.0/server-deno/docs/examples/database/update-document.md new file mode 100644 index 0000000000..cd079c8f2d --- /dev/null +++ b/app/sdks/0.7.0/server-deno/docs/examples/database/update-document.md @@ -0,0 +1,20 @@ +import * as sdk from "https://deno.land/x/appwrite/mod.ts"; + +// Init SDK +let client = new sdk.Client(); + +let database = new sdk.Database(client); + +client + .setProject('5df5acd0d48c2') // Your project ID + .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key +; + + +let promise = database.updateDocument('[COLLECTION_ID]', '[DOCUMENT_ID]', {}, [], []); + +promise.then(function (response) { + console.log(response); +}, function (error) { + console.log(error); +}); \ No newline at end of file diff --git a/app/sdks/0.7.0/server-deno/docs/examples/health/get-anti-virus.md b/app/sdks/0.7.0/server-deno/docs/examples/health/get-anti-virus.md new file mode 100644 index 0000000000..e06fbf86de --- /dev/null +++ b/app/sdks/0.7.0/server-deno/docs/examples/health/get-anti-virus.md @@ -0,0 +1,20 @@ +import * as sdk from "https://deno.land/x/appwrite/mod.ts"; + +// Init SDK +let client = new sdk.Client(); + +let health = new sdk.Health(client); + +client + .setProject('5df5acd0d48c2') // Your project ID + .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key +; + + +let promise = health.getAntiVirus(); + +promise.then(function (response) { + console.log(response); +}, function (error) { + console.log(error); +}); \ No newline at end of file diff --git a/app/sdks/0.7.0/server-deno/docs/examples/health/get-cache.md b/app/sdks/0.7.0/server-deno/docs/examples/health/get-cache.md new file mode 100644 index 0000000000..b58ca1bc15 --- /dev/null +++ b/app/sdks/0.7.0/server-deno/docs/examples/health/get-cache.md @@ -0,0 +1,20 @@ +import * as sdk from "https://deno.land/x/appwrite/mod.ts"; + +// Init SDK +let client = new sdk.Client(); + +let health = new sdk.Health(client); + +client + .setProject('5df5acd0d48c2') // Your project ID + .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key +; + + +let promise = health.getCache(); + +promise.then(function (response) { + console.log(response); +}, function (error) { + console.log(error); +}); \ No newline at end of file diff --git a/app/sdks/0.7.0/server-deno/docs/examples/health/get-d-b.md b/app/sdks/0.7.0/server-deno/docs/examples/health/get-d-b.md new file mode 100644 index 0000000000..946cfb03a8 --- /dev/null +++ b/app/sdks/0.7.0/server-deno/docs/examples/health/get-d-b.md @@ -0,0 +1,20 @@ +import * as sdk from "https://deno.land/x/appwrite/mod.ts"; + +// Init SDK +let client = new sdk.Client(); + +let health = new sdk.Health(client); + +client + .setProject('5df5acd0d48c2') // Your project ID + .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key +; + + +let promise = health.getDB(); + +promise.then(function (response) { + console.log(response); +}, function (error) { + console.log(error); +}); \ No newline at end of file diff --git a/app/sdks/0.7.0/server-deno/docs/examples/health/get-queue-certificates.md b/app/sdks/0.7.0/server-deno/docs/examples/health/get-queue-certificates.md new file mode 100644 index 0000000000..a86358bb22 --- /dev/null +++ b/app/sdks/0.7.0/server-deno/docs/examples/health/get-queue-certificates.md @@ -0,0 +1,20 @@ +import * as sdk from "https://deno.land/x/appwrite/mod.ts"; + +// Init SDK +let client = new sdk.Client(); + +let health = new sdk.Health(client); + +client + .setProject('5df5acd0d48c2') // Your project ID + .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key +; + + +let promise = health.getQueueCertificates(); + +promise.then(function (response) { + console.log(response); +}, function (error) { + console.log(error); +}); \ No newline at end of file diff --git a/app/sdks/0.7.0/server-deno/docs/examples/health/get-queue-functions.md b/app/sdks/0.7.0/server-deno/docs/examples/health/get-queue-functions.md new file mode 100644 index 0000000000..033248b118 --- /dev/null +++ b/app/sdks/0.7.0/server-deno/docs/examples/health/get-queue-functions.md @@ -0,0 +1,20 @@ +import * as sdk from "https://deno.land/x/appwrite/mod.ts"; + +// Init SDK +let client = new sdk.Client(); + +let health = new sdk.Health(client); + +client + .setProject('5df5acd0d48c2') // Your project ID + .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key +; + + +let promise = health.getQueueFunctions(); + +promise.then(function (response) { + console.log(response); +}, function (error) { + console.log(error); +}); \ No newline at end of file diff --git a/app/sdks/0.7.0/server-deno/docs/examples/health/get-queue-logs.md b/app/sdks/0.7.0/server-deno/docs/examples/health/get-queue-logs.md new file mode 100644 index 0000000000..d4c3300a35 --- /dev/null +++ b/app/sdks/0.7.0/server-deno/docs/examples/health/get-queue-logs.md @@ -0,0 +1,20 @@ +import * as sdk from "https://deno.land/x/appwrite/mod.ts"; + +// Init SDK +let client = new sdk.Client(); + +let health = new sdk.Health(client); + +client + .setProject('5df5acd0d48c2') // Your project ID + .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key +; + + +let promise = health.getQueueLogs(); + +promise.then(function (response) { + console.log(response); +}, function (error) { + console.log(error); +}); \ No newline at end of file diff --git a/app/sdks/0.7.0/server-deno/docs/examples/health/get-queue-tasks.md b/app/sdks/0.7.0/server-deno/docs/examples/health/get-queue-tasks.md new file mode 100644 index 0000000000..01e3094ffc --- /dev/null +++ b/app/sdks/0.7.0/server-deno/docs/examples/health/get-queue-tasks.md @@ -0,0 +1,20 @@ +import * as sdk from "https://deno.land/x/appwrite/mod.ts"; + +// Init SDK +let client = new sdk.Client(); + +let health = new sdk.Health(client); + +client + .setProject('5df5acd0d48c2') // Your project ID + .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key +; + + +let promise = health.getQueueTasks(); + +promise.then(function (response) { + console.log(response); +}, function (error) { + console.log(error); +}); \ No newline at end of file diff --git a/app/sdks/0.7.0/server-deno/docs/examples/health/get-queue-usage.md b/app/sdks/0.7.0/server-deno/docs/examples/health/get-queue-usage.md new file mode 100644 index 0000000000..d0d8faf7b6 --- /dev/null +++ b/app/sdks/0.7.0/server-deno/docs/examples/health/get-queue-usage.md @@ -0,0 +1,20 @@ +import * as sdk from "https://deno.land/x/appwrite/mod.ts"; + +// Init SDK +let client = new sdk.Client(); + +let health = new sdk.Health(client); + +client + .setProject('5df5acd0d48c2') // Your project ID + .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key +; + + +let promise = health.getQueueUsage(); + +promise.then(function (response) { + console.log(response); +}, function (error) { + console.log(error); +}); \ No newline at end of file diff --git a/app/sdks/0.7.0/server-deno/docs/examples/health/get-queue-webhooks.md b/app/sdks/0.7.0/server-deno/docs/examples/health/get-queue-webhooks.md new file mode 100644 index 0000000000..268c521373 --- /dev/null +++ b/app/sdks/0.7.0/server-deno/docs/examples/health/get-queue-webhooks.md @@ -0,0 +1,20 @@ +import * as sdk from "https://deno.land/x/appwrite/mod.ts"; + +// Init SDK +let client = new sdk.Client(); + +let health = new sdk.Health(client); + +client + .setProject('5df5acd0d48c2') // Your project ID + .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key +; + + +let promise = health.getQueueWebhooks(); + +promise.then(function (response) { + console.log(response); +}, function (error) { + console.log(error); +}); \ No newline at end of file diff --git a/app/sdks/0.7.0/server-deno/docs/examples/health/get-storage-local.md b/app/sdks/0.7.0/server-deno/docs/examples/health/get-storage-local.md new file mode 100644 index 0000000000..77bb658f9a --- /dev/null +++ b/app/sdks/0.7.0/server-deno/docs/examples/health/get-storage-local.md @@ -0,0 +1,20 @@ +import * as sdk from "https://deno.land/x/appwrite/mod.ts"; + +// Init SDK +let client = new sdk.Client(); + +let health = new sdk.Health(client); + +client + .setProject('5df5acd0d48c2') // Your project ID + .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key +; + + +let promise = health.getStorageLocal(); + +promise.then(function (response) { + console.log(response); +}, function (error) { + console.log(error); +}); \ No newline at end of file diff --git a/app/sdks/0.7.0/server-deno/docs/examples/health/get-time.md b/app/sdks/0.7.0/server-deno/docs/examples/health/get-time.md new file mode 100644 index 0000000000..0e5205b075 --- /dev/null +++ b/app/sdks/0.7.0/server-deno/docs/examples/health/get-time.md @@ -0,0 +1,20 @@ +import * as sdk from "https://deno.land/x/appwrite/mod.ts"; + +// Init SDK +let client = new sdk.Client(); + +let health = new sdk.Health(client); + +client + .setProject('5df5acd0d48c2') // Your project ID + .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key +; + + +let promise = health.getTime(); + +promise.then(function (response) { + console.log(response); +}, function (error) { + console.log(error); +}); \ No newline at end of file diff --git a/app/sdks/0.7.0/server-deno/docs/examples/health/get.md b/app/sdks/0.7.0/server-deno/docs/examples/health/get.md new file mode 100644 index 0000000000..c2e6ecdf65 --- /dev/null +++ b/app/sdks/0.7.0/server-deno/docs/examples/health/get.md @@ -0,0 +1,20 @@ +import * as sdk from "https://deno.land/x/appwrite/mod.ts"; + +// Init SDK +let client = new sdk.Client(); + +let health = new sdk.Health(client); + +client + .setProject('5df5acd0d48c2') // Your project ID + .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key +; + + +let promise = health.get(); + +promise.then(function (response) { + console.log(response); +}, function (error) { + console.log(error); +}); \ No newline at end of file diff --git a/app/sdks/0.7.0/server-deno/docs/examples/locale/get-continents.md b/app/sdks/0.7.0/server-deno/docs/examples/locale/get-continents.md new file mode 100644 index 0000000000..18221d44b4 --- /dev/null +++ b/app/sdks/0.7.0/server-deno/docs/examples/locale/get-continents.md @@ -0,0 +1,20 @@ +import * as sdk from "https://deno.land/x/appwrite/mod.ts"; + +// Init SDK +let client = new sdk.Client(); + +let locale = new sdk.Locale(client); + +client + .setProject('5df5acd0d48c2') // Your project ID + .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key +; + + +let promise = locale.getContinents(); + +promise.then(function (response) { + console.log(response); +}, function (error) { + console.log(error); +}); \ No newline at end of file diff --git a/app/sdks/0.7.0/server-deno/docs/examples/locale/get-countries-e-u.md b/app/sdks/0.7.0/server-deno/docs/examples/locale/get-countries-e-u.md new file mode 100644 index 0000000000..4a3e49f755 --- /dev/null +++ b/app/sdks/0.7.0/server-deno/docs/examples/locale/get-countries-e-u.md @@ -0,0 +1,20 @@ +import * as sdk from "https://deno.land/x/appwrite/mod.ts"; + +// Init SDK +let client = new sdk.Client(); + +let locale = new sdk.Locale(client); + +client + .setProject('5df5acd0d48c2') // Your project ID + .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key +; + + +let promise = locale.getCountriesEU(); + +promise.then(function (response) { + console.log(response); +}, function (error) { + console.log(error); +}); \ No newline at end of file diff --git a/app/sdks/0.7.0/server-deno/docs/examples/locale/get-countries-phones.md b/app/sdks/0.7.0/server-deno/docs/examples/locale/get-countries-phones.md new file mode 100644 index 0000000000..61a1790806 --- /dev/null +++ b/app/sdks/0.7.0/server-deno/docs/examples/locale/get-countries-phones.md @@ -0,0 +1,20 @@ +import * as sdk from "https://deno.land/x/appwrite/mod.ts"; + +// Init SDK +let client = new sdk.Client(); + +let locale = new sdk.Locale(client); + +client + .setProject('5df5acd0d48c2') // Your project ID + .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key +; + + +let promise = locale.getCountriesPhones(); + +promise.then(function (response) { + console.log(response); +}, function (error) { + console.log(error); +}); \ No newline at end of file diff --git a/app/sdks/0.7.0/server-deno/docs/examples/locale/get-countries.md b/app/sdks/0.7.0/server-deno/docs/examples/locale/get-countries.md new file mode 100644 index 0000000000..20f544e617 --- /dev/null +++ b/app/sdks/0.7.0/server-deno/docs/examples/locale/get-countries.md @@ -0,0 +1,20 @@ +import * as sdk from "https://deno.land/x/appwrite/mod.ts"; + +// Init SDK +let client = new sdk.Client(); + +let locale = new sdk.Locale(client); + +client + .setProject('5df5acd0d48c2') // Your project ID + .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key +; + + +let promise = locale.getCountries(); + +promise.then(function (response) { + console.log(response); +}, function (error) { + console.log(error); +}); \ No newline at end of file diff --git a/app/sdks/0.7.0/server-deno/docs/examples/locale/get-currencies.md b/app/sdks/0.7.0/server-deno/docs/examples/locale/get-currencies.md new file mode 100644 index 0000000000..13b975291d --- /dev/null +++ b/app/sdks/0.7.0/server-deno/docs/examples/locale/get-currencies.md @@ -0,0 +1,20 @@ +import * as sdk from "https://deno.land/x/appwrite/mod.ts"; + +// Init SDK +let client = new sdk.Client(); + +let locale = new sdk.Locale(client); + +client + .setProject('5df5acd0d48c2') // Your project ID + .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key +; + + +let promise = locale.getCurrencies(); + +promise.then(function (response) { + console.log(response); +}, function (error) { + console.log(error); +}); \ No newline at end of file diff --git a/app/sdks/0.7.0/server-deno/docs/examples/locale/get.md b/app/sdks/0.7.0/server-deno/docs/examples/locale/get.md new file mode 100644 index 0000000000..2336c3289d --- /dev/null +++ b/app/sdks/0.7.0/server-deno/docs/examples/locale/get.md @@ -0,0 +1,20 @@ +import * as sdk from "https://deno.land/x/appwrite/mod.ts"; + +// Init SDK +let client = new sdk.Client(); + +let locale = new sdk.Locale(client); + +client + .setProject('5df5acd0d48c2') // Your project ID + .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key +; + + +let promise = locale.get(); + +promise.then(function (response) { + console.log(response); +}, function (error) { + console.log(error); +}); \ No newline at end of file diff --git a/app/sdks/0.7.0/server-deno/docs/examples/storage/create-file.md b/app/sdks/0.7.0/server-deno/docs/examples/storage/create-file.md new file mode 100644 index 0000000000..5b446e1a38 --- /dev/null +++ b/app/sdks/0.7.0/server-deno/docs/examples/storage/create-file.md @@ -0,0 +1,20 @@ +import * as sdk from "https://deno.land/x/appwrite/mod.ts"; + +// Init SDK +let client = new sdk.Client(); + +let storage = new sdk.Storage(client); + +client + .setProject('5df5acd0d48c2') // Your project ID + .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key +; + + +let promise = storage.createFile(new File([fileBlob], 'file.png'), [], []); + +promise.then(function (response) { + console.log(response); +}, function (error) { + console.log(error); +}); \ No newline at end of file diff --git a/app/sdks/0.7.0/server-deno/docs/examples/storage/delete-file.md b/app/sdks/0.7.0/server-deno/docs/examples/storage/delete-file.md new file mode 100644 index 0000000000..6469308c74 --- /dev/null +++ b/app/sdks/0.7.0/server-deno/docs/examples/storage/delete-file.md @@ -0,0 +1,20 @@ +import * as sdk from "https://deno.land/x/appwrite/mod.ts"; + +// Init SDK +let client = new sdk.Client(); + +let storage = new sdk.Storage(client); + +client + .setProject('5df5acd0d48c2') // Your project ID + .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key +; + + +let promise = storage.deleteFile('[FILE_ID]'); + +promise.then(function (response) { + console.log(response); +}, function (error) { + console.log(error); +}); \ No newline at end of file diff --git a/app/sdks/0.7.0/server-deno/docs/examples/storage/get-file-download.md b/app/sdks/0.7.0/server-deno/docs/examples/storage/get-file-download.md new file mode 100644 index 0000000000..4510257bad --- /dev/null +++ b/app/sdks/0.7.0/server-deno/docs/examples/storage/get-file-download.md @@ -0,0 +1,20 @@ +import * as sdk from "https://deno.land/x/appwrite/mod.ts"; + +// Init SDK +let client = new sdk.Client(); + +let storage = new sdk.Storage(client); + +client + .setProject('5df5acd0d48c2') // Your project ID + .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key +; + + +let promise = storage.getFileDownload('[FILE_ID]'); + +promise.then(function (response) { + console.log(response); +}, function (error) { + console.log(error); +}); \ No newline at end of file diff --git a/app/sdks/0.7.0/server-deno/docs/examples/storage/get-file-preview.md b/app/sdks/0.7.0/server-deno/docs/examples/storage/get-file-preview.md new file mode 100644 index 0000000000..282fb30324 --- /dev/null +++ b/app/sdks/0.7.0/server-deno/docs/examples/storage/get-file-preview.md @@ -0,0 +1,20 @@ +import * as sdk from "https://deno.land/x/appwrite/mod.ts"; + +// Init SDK +let client = new sdk.Client(); + +let storage = new sdk.Storage(client); + +client + .setProject('5df5acd0d48c2') // Your project ID + .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key +; + + +let promise = storage.getFilePreview('[FILE_ID]'); + +promise.then(function (response) { + console.log(response); +}, function (error) { + console.log(error); +}); \ No newline at end of file diff --git a/app/sdks/0.7.0/server-deno/docs/examples/storage/get-file-view.md b/app/sdks/0.7.0/server-deno/docs/examples/storage/get-file-view.md new file mode 100644 index 0000000000..8af5391017 --- /dev/null +++ b/app/sdks/0.7.0/server-deno/docs/examples/storage/get-file-view.md @@ -0,0 +1,20 @@ +import * as sdk from "https://deno.land/x/appwrite/mod.ts"; + +// Init SDK +let client = new sdk.Client(); + +let storage = new sdk.Storage(client); + +client + .setProject('5df5acd0d48c2') // Your project ID + .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key +; + + +let promise = storage.getFileView('[FILE_ID]'); + +promise.then(function (response) { + console.log(response); +}, function (error) { + console.log(error); +}); \ No newline at end of file diff --git a/app/sdks/0.7.0/server-deno/docs/examples/storage/get-file.md b/app/sdks/0.7.0/server-deno/docs/examples/storage/get-file.md new file mode 100644 index 0000000000..393ce229cb --- /dev/null +++ b/app/sdks/0.7.0/server-deno/docs/examples/storage/get-file.md @@ -0,0 +1,20 @@ +import * as sdk from "https://deno.land/x/appwrite/mod.ts"; + +// Init SDK +let client = new sdk.Client(); + +let storage = new sdk.Storage(client); + +client + .setProject('5df5acd0d48c2') // Your project ID + .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key +; + + +let promise = storage.getFile('[FILE_ID]'); + +promise.then(function (response) { + console.log(response); +}, function (error) { + console.log(error); +}); \ No newline at end of file diff --git a/app/sdks/0.7.0/server-deno/docs/examples/storage/list-files.md b/app/sdks/0.7.0/server-deno/docs/examples/storage/list-files.md new file mode 100644 index 0000000000..0e57cd01de --- /dev/null +++ b/app/sdks/0.7.0/server-deno/docs/examples/storage/list-files.md @@ -0,0 +1,20 @@ +import * as sdk from "https://deno.land/x/appwrite/mod.ts"; + +// Init SDK +let client = new sdk.Client(); + +let storage = new sdk.Storage(client); + +client + .setProject('5df5acd0d48c2') // Your project ID + .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key +; + + +let promise = storage.listFiles(); + +promise.then(function (response) { + console.log(response); +}, function (error) { + console.log(error); +}); \ No newline at end of file diff --git a/app/sdks/0.7.0/server-deno/docs/examples/storage/update-file.md b/app/sdks/0.7.0/server-deno/docs/examples/storage/update-file.md new file mode 100644 index 0000000000..33b2263540 --- /dev/null +++ b/app/sdks/0.7.0/server-deno/docs/examples/storage/update-file.md @@ -0,0 +1,20 @@ +import * as sdk from "https://deno.land/x/appwrite/mod.ts"; + +// Init SDK +let client = new sdk.Client(); + +let storage = new sdk.Storage(client); + +client + .setProject('5df5acd0d48c2') // Your project ID + .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key +; + + +let promise = storage.updateFile('[FILE_ID]', [], []); + +promise.then(function (response) { + console.log(response); +}, function (error) { + console.log(error); +}); \ No newline at end of file diff --git a/app/sdks/0.7.0/server-deno/docs/examples/teams/create-membership.md b/app/sdks/0.7.0/server-deno/docs/examples/teams/create-membership.md new file mode 100644 index 0000000000..b277899c91 --- /dev/null +++ b/app/sdks/0.7.0/server-deno/docs/examples/teams/create-membership.md @@ -0,0 +1,20 @@ +import * as sdk from "https://deno.land/x/appwrite/mod.ts"; + +// Init SDK +let client = new sdk.Client(); + +let teams = new sdk.Teams(client); + +client + .setProject('5df5acd0d48c2') // Your project ID + .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key +; + + +let promise = teams.createMembership('[TEAM_ID]', 'email@example.com', [], 'https://example.com'); + +promise.then(function (response) { + console.log(response); +}, function (error) { + console.log(error); +}); \ No newline at end of file diff --git a/app/sdks/0.7.0/server-deno/docs/examples/teams/create.md b/app/sdks/0.7.0/server-deno/docs/examples/teams/create.md new file mode 100644 index 0000000000..1ef3e01b81 --- /dev/null +++ b/app/sdks/0.7.0/server-deno/docs/examples/teams/create.md @@ -0,0 +1,20 @@ +import * as sdk from "https://deno.land/x/appwrite/mod.ts"; + +// Init SDK +let client = new sdk.Client(); + +let teams = new sdk.Teams(client); + +client + .setProject('5df5acd0d48c2') // Your project ID + .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key +; + + +let promise = teams.create('[NAME]'); + +promise.then(function (response) { + console.log(response); +}, function (error) { + console.log(error); +}); \ No newline at end of file diff --git a/app/sdks/0.7.0/server-deno/docs/examples/teams/delete-membership.md b/app/sdks/0.7.0/server-deno/docs/examples/teams/delete-membership.md new file mode 100644 index 0000000000..911fa30075 --- /dev/null +++ b/app/sdks/0.7.0/server-deno/docs/examples/teams/delete-membership.md @@ -0,0 +1,20 @@ +import * as sdk from "https://deno.land/x/appwrite/mod.ts"; + +// Init SDK +let client = new sdk.Client(); + +let teams = new sdk.Teams(client); + +client + .setProject('5df5acd0d48c2') // Your project ID + .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key +; + + +let promise = teams.deleteMembership('[TEAM_ID]', '[INVITE_ID]'); + +promise.then(function (response) { + console.log(response); +}, function (error) { + console.log(error); +}); \ No newline at end of file diff --git a/app/sdks/0.7.0/server-deno/docs/examples/teams/delete.md b/app/sdks/0.7.0/server-deno/docs/examples/teams/delete.md new file mode 100644 index 0000000000..61ac03483f --- /dev/null +++ b/app/sdks/0.7.0/server-deno/docs/examples/teams/delete.md @@ -0,0 +1,20 @@ +import * as sdk from "https://deno.land/x/appwrite/mod.ts"; + +// Init SDK +let client = new sdk.Client(); + +let teams = new sdk.Teams(client); + +client + .setProject('5df5acd0d48c2') // Your project ID + .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key +; + + +let promise = teams.delete('[TEAM_ID]'); + +promise.then(function (response) { + console.log(response); +}, function (error) { + console.log(error); +}); \ No newline at end of file diff --git a/app/sdks/0.7.0/server-deno/docs/examples/teams/get-memberships.md b/app/sdks/0.7.0/server-deno/docs/examples/teams/get-memberships.md new file mode 100644 index 0000000000..b652f8e4e5 --- /dev/null +++ b/app/sdks/0.7.0/server-deno/docs/examples/teams/get-memberships.md @@ -0,0 +1,20 @@ +import * as sdk from "https://deno.land/x/appwrite/mod.ts"; + +// Init SDK +let client = new sdk.Client(); + +let teams = new sdk.Teams(client); + +client + .setProject('5df5acd0d48c2') // Your project ID + .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key +; + + +let promise = teams.getMemberships('[TEAM_ID]'); + +promise.then(function (response) { + console.log(response); +}, function (error) { + console.log(error); +}); \ No newline at end of file diff --git a/app/sdks/0.7.0/server-deno/docs/examples/teams/get.md b/app/sdks/0.7.0/server-deno/docs/examples/teams/get.md new file mode 100644 index 0000000000..69496e3eef --- /dev/null +++ b/app/sdks/0.7.0/server-deno/docs/examples/teams/get.md @@ -0,0 +1,20 @@ +import * as sdk from "https://deno.land/x/appwrite/mod.ts"; + +// Init SDK +let client = new sdk.Client(); + +let teams = new sdk.Teams(client); + +client + .setProject('5df5acd0d48c2') // Your project ID + .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key +; + + +let promise = teams.get('[TEAM_ID]'); + +promise.then(function (response) { + console.log(response); +}, function (error) { + console.log(error); +}); \ No newline at end of file diff --git a/app/sdks/0.7.0/server-deno/docs/examples/teams/list.md b/app/sdks/0.7.0/server-deno/docs/examples/teams/list.md new file mode 100644 index 0000000000..70851dda51 --- /dev/null +++ b/app/sdks/0.7.0/server-deno/docs/examples/teams/list.md @@ -0,0 +1,20 @@ +import * as sdk from "https://deno.land/x/appwrite/mod.ts"; + +// Init SDK +let client = new sdk.Client(); + +let teams = new sdk.Teams(client); + +client + .setProject('5df5acd0d48c2') // Your project ID + .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key +; + + +let promise = teams.list(); + +promise.then(function (response) { + console.log(response); +}, function (error) { + console.log(error); +}); \ No newline at end of file diff --git a/app/sdks/0.7.0/server-deno/docs/examples/teams/update.md b/app/sdks/0.7.0/server-deno/docs/examples/teams/update.md new file mode 100644 index 0000000000..7b815b4050 --- /dev/null +++ b/app/sdks/0.7.0/server-deno/docs/examples/teams/update.md @@ -0,0 +1,20 @@ +import * as sdk from "https://deno.land/x/appwrite/mod.ts"; + +// Init SDK +let client = new sdk.Client(); + +let teams = new sdk.Teams(client); + +client + .setProject('5df5acd0d48c2') // Your project ID + .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key +; + + +let promise = teams.update('[TEAM_ID]', '[NAME]'); + +promise.then(function (response) { + console.log(response); +}, function (error) { + console.log(error); +}); \ No newline at end of file diff --git a/app/sdks/0.7.0/server-deno/docs/examples/users/create.md b/app/sdks/0.7.0/server-deno/docs/examples/users/create.md new file mode 100644 index 0000000000..593eee6e9f --- /dev/null +++ b/app/sdks/0.7.0/server-deno/docs/examples/users/create.md @@ -0,0 +1,20 @@ +import * as sdk from "https://deno.land/x/appwrite/mod.ts"; + +// Init SDK +let client = new sdk.Client(); + +let users = new sdk.Users(client); + +client + .setProject('5df5acd0d48c2') // Your project ID + .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key +; + + +let promise = users.create('email@example.com', 'password'); + +promise.then(function (response) { + console.log(response); +}, function (error) { + console.log(error); +}); \ No newline at end of file diff --git a/app/sdks/0.7.0/server-deno/docs/examples/users/delete-session.md b/app/sdks/0.7.0/server-deno/docs/examples/users/delete-session.md new file mode 100644 index 0000000000..e4940773e4 --- /dev/null +++ b/app/sdks/0.7.0/server-deno/docs/examples/users/delete-session.md @@ -0,0 +1,20 @@ +import * as sdk from "https://deno.land/x/appwrite/mod.ts"; + +// Init SDK +let client = new sdk.Client(); + +let users = new sdk.Users(client); + +client + .setProject('5df5acd0d48c2') // Your project ID + .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key +; + + +let promise = users.deleteSession('[USER_ID]', '[SESSION_ID]'); + +promise.then(function (response) { + console.log(response); +}, function (error) { + console.log(error); +}); \ No newline at end of file diff --git a/app/sdks/0.7.0/server-deno/docs/examples/users/delete-sessions.md b/app/sdks/0.7.0/server-deno/docs/examples/users/delete-sessions.md new file mode 100644 index 0000000000..e772c00a5f --- /dev/null +++ b/app/sdks/0.7.0/server-deno/docs/examples/users/delete-sessions.md @@ -0,0 +1,20 @@ +import * as sdk from "https://deno.land/x/appwrite/mod.ts"; + +// Init SDK +let client = new sdk.Client(); + +let users = new sdk.Users(client); + +client + .setProject('5df5acd0d48c2') // Your project ID + .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key +; + + +let promise = users.deleteSessions('[USER_ID]'); + +promise.then(function (response) { + console.log(response); +}, function (error) { + console.log(error); +}); \ No newline at end of file diff --git a/app/sdks/0.7.0/server-deno/docs/examples/users/get-logs.md b/app/sdks/0.7.0/server-deno/docs/examples/users/get-logs.md new file mode 100644 index 0000000000..58cc4fc529 --- /dev/null +++ b/app/sdks/0.7.0/server-deno/docs/examples/users/get-logs.md @@ -0,0 +1,20 @@ +import * as sdk from "https://deno.land/x/appwrite/mod.ts"; + +// Init SDK +let client = new sdk.Client(); + +let users = new sdk.Users(client); + +client + .setProject('5df5acd0d48c2') // Your project ID + .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key +; + + +let promise = users.getLogs('[USER_ID]'); + +promise.then(function (response) { + console.log(response); +}, function (error) { + console.log(error); +}); \ No newline at end of file diff --git a/app/sdks/0.7.0/server-deno/docs/examples/users/get-prefs.md b/app/sdks/0.7.0/server-deno/docs/examples/users/get-prefs.md new file mode 100644 index 0000000000..4cda0bb73e --- /dev/null +++ b/app/sdks/0.7.0/server-deno/docs/examples/users/get-prefs.md @@ -0,0 +1,20 @@ +import * as sdk from "https://deno.land/x/appwrite/mod.ts"; + +// Init SDK +let client = new sdk.Client(); + +let users = new sdk.Users(client); + +client + .setProject('5df5acd0d48c2') // Your project ID + .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key +; + + +let promise = users.getPrefs('[USER_ID]'); + +promise.then(function (response) { + console.log(response); +}, function (error) { + console.log(error); +}); \ No newline at end of file diff --git a/app/sdks/0.7.0/server-deno/docs/examples/users/get-sessions.md b/app/sdks/0.7.0/server-deno/docs/examples/users/get-sessions.md new file mode 100644 index 0000000000..6686e21564 --- /dev/null +++ b/app/sdks/0.7.0/server-deno/docs/examples/users/get-sessions.md @@ -0,0 +1,20 @@ +import * as sdk from "https://deno.land/x/appwrite/mod.ts"; + +// Init SDK +let client = new sdk.Client(); + +let users = new sdk.Users(client); + +client + .setProject('5df5acd0d48c2') // Your project ID + .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key +; + + +let promise = users.getSessions('[USER_ID]'); + +promise.then(function (response) { + console.log(response); +}, function (error) { + console.log(error); +}); \ No newline at end of file diff --git a/app/sdks/0.7.0/server-deno/docs/examples/users/get.md b/app/sdks/0.7.0/server-deno/docs/examples/users/get.md new file mode 100644 index 0000000000..dce73d62c5 --- /dev/null +++ b/app/sdks/0.7.0/server-deno/docs/examples/users/get.md @@ -0,0 +1,20 @@ +import * as sdk from "https://deno.land/x/appwrite/mod.ts"; + +// Init SDK +let client = new sdk.Client(); + +let users = new sdk.Users(client); + +client + .setProject('5df5acd0d48c2') // Your project ID + .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key +; + + +let promise = users.get('[USER_ID]'); + +promise.then(function (response) { + console.log(response); +}, function (error) { + console.log(error); +}); \ No newline at end of file diff --git a/app/sdks/0.7.0/server-deno/docs/examples/users/list.md b/app/sdks/0.7.0/server-deno/docs/examples/users/list.md new file mode 100644 index 0000000000..b089c3e7e9 --- /dev/null +++ b/app/sdks/0.7.0/server-deno/docs/examples/users/list.md @@ -0,0 +1,20 @@ +import * as sdk from "https://deno.land/x/appwrite/mod.ts"; + +// Init SDK +let client = new sdk.Client(); + +let users = new sdk.Users(client); + +client + .setProject('5df5acd0d48c2') // Your project ID + .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key +; + + +let promise = users.list(); + +promise.then(function (response) { + console.log(response); +}, function (error) { + console.log(error); +}); \ No newline at end of file diff --git a/app/sdks/0.7.0/server-deno/docs/examples/users/update-prefs.md b/app/sdks/0.7.0/server-deno/docs/examples/users/update-prefs.md new file mode 100644 index 0000000000..b06185ee91 --- /dev/null +++ b/app/sdks/0.7.0/server-deno/docs/examples/users/update-prefs.md @@ -0,0 +1,20 @@ +import * as sdk from "https://deno.land/x/appwrite/mod.ts"; + +// Init SDK +let client = new sdk.Client(); + +let users = new sdk.Users(client); + +client + .setProject('5df5acd0d48c2') // Your project ID + .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key +; + + +let promise = users.updatePrefs('[USER_ID]', {}); + +promise.then(function (response) { + console.log(response); +}, function (error) { + console.log(error); +}); \ No newline at end of file diff --git a/app/sdks/0.7.0/server-deno/docs/examples/users/update-status.md b/app/sdks/0.7.0/server-deno/docs/examples/users/update-status.md new file mode 100644 index 0000000000..a0f028bde5 --- /dev/null +++ b/app/sdks/0.7.0/server-deno/docs/examples/users/update-status.md @@ -0,0 +1,20 @@ +import * as sdk from "https://deno.land/x/appwrite/mod.ts"; + +// Init SDK +let client = new sdk.Client(); + +let users = new sdk.Users(client); + +client + .setProject('5df5acd0d48c2') // Your project ID + .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key +; + + +let promise = users.updateStatus('[USER_ID]', '1'); + +promise.then(function (response) { + console.log(response); +}, function (error) { + console.log(error); +}); \ No newline at end of file diff --git a/app/sdks/0.7.0/server-deno/mod.ts b/app/sdks/0.7.0/server-deno/mod.ts new file mode 100644 index 0000000000..3e51466fe6 --- /dev/null +++ b/app/sdks/0.7.0/server-deno/mod.ts @@ -0,0 +1,19 @@ +import { Client } from "./src/client.ts"; +import { Avatars } from "./src/services/avatars.ts"; +import { Database } from "./src/services/database.ts"; +import { Health } from "./src/services/health.ts"; +import { Locale } from "./src/services/locale.ts"; +import { Storage } from "./src/services/storage.ts"; +import { Teams } from "./src/services/teams.ts"; +import { Users } from "./src/services/users.ts"; + +export { + Client, + Avatars, + Database, + Health, + Locale, + Storage, + Teams, + Users, +}; \ No newline at end of file diff --git a/app/sdks/0.7.0/server-deno/src/client.ts b/app/sdks/0.7.0/server-deno/src/client.ts new file mode 100644 index 0000000000..3bf22034b8 --- /dev/null +++ b/app/sdks/0.7.0/server-deno/src/client.ts @@ -0,0 +1,138 @@ +export interface DocumentData { + [key: string]: any; +} + +export class Client { + + endpoint: string = 'https://appwrite.io/v1'; + headers: DocumentData = { + 'content-type': '', + 'x-sdk-version': 'appwrite:deno:0.0.2', + }; + + /** + * Set Project + * + * Your project ID + * + * @param string value + * + * @return self + */ + setProject(value: string): this { + this.addHeader('X-Appwrite-Project', value); + + return this; + } + + /** + * Set Key + * + * Your secret API key + * + * @param string value + * + * @return self + */ + setKey(value: string): this { + this.addHeader('X-Appwrite-Key', value); + + return this; + } + + /** + * Set Locale + * + * @param string value + * + * @return self + */ + setLocale(value: string): this { + this.addHeader('X-Appwrite-Locale', value); + + return this; + } + + + /*** + * @param endpoint + * @return this + */ + setEndpoint(endpoint: string): this { + this.endpoint = endpoint; + + return this; + } + + /** + * @param key string + * @param value string + */ + addHeader(key: string, value: string): this { + this.headers[key.toLowerCase()] = value.toLowerCase(); + + return this; + } + + withoutHeader(key: string, headers: DocumentData): DocumentData { + return Object.keys(headers).reduce((acc: DocumentData, cv) => { + if (cv == 'content-type') return acc + acc[cv] = headers[cv] + return acc + }, {}) + } + + async call(method: string, path: string = '', headers: DocumentData = {}, params: DocumentData = {}) { + headers = Object.assign(this.headers, headers); + + let body; + const url = new URL(this.endpoint + path) + if (method.toUpperCase() === 'GET') { + url.search = new URLSearchParams(this.flatten(params)).toString() + body = null + } else if (headers['content-type'].toLowerCase().startsWith('multipart/form-data')) { + headers = this.withoutHeader('content-type', headers) + const formData = new FormData() + const flatParams = this.flatten(params) + for (const key in flatParams) { + formData.append(key, flatParams[key]); + } + body = formData + } else { + body = JSON.stringify(params) + } + + const options = { + method: method.toUpperCase(), + headers: headers, + body: body, + }; + + let response = await fetch(url.toString(), options); + const contentType = response.headers.get('content-type'); + + if (contentType && contentType.includes('application/json')) { + return response.json() + } + + return response; + } + + flatten(data: DocumentData, prefix = '') { + let output: DocumentData = {}; + + for (const key in data) { + let value = data[key]; + let finalKey = prefix ? prefix + '[' + key +']' : key; + + if (Array.isArray(value)) { + output = Object.assign(output, this.flatten(value, finalKey)); // @todo: handle name collision here if needed + } + else { + output[finalKey] = value; + } + } + + return output; + } +} \ No newline at end of file diff --git a/app/sdks/0.7.0/server-deno/src/service.ts b/app/sdks/0.7.0/server-deno/src/service.ts new file mode 100644 index 0000000000..ceedf1a0c3 --- /dev/null +++ b/app/sdks/0.7.0/server-deno/src/service.ts @@ -0,0 +1,13 @@ +import { Client } from "./client.ts"; + +export abstract class Service { + + client: Client; + + /** + * @param client + */ + constructor(client: Client) { + this.client = client; + } +} \ No newline at end of file diff --git a/app/sdks/0.7.0/server-deno/src/services/avatars.ts b/app/sdks/0.7.0/server-deno/src/services/avatars.ts new file mode 100644 index 0000000000..f70e950bed --- /dev/null +++ b/app/sdks/0.7.0/server-deno/src/services/avatars.ts @@ -0,0 +1,163 @@ +import { Service } from "../service.ts"; +import { DocumentData } from '../client.ts' + +export class Avatars extends Service { + + /** + * Get Browser Icon + * + * You can use this endpoint to show different browser icons to your users. + * The code argument receives the browser code as it appears in your user + * /account/sessions endpoint. Use width, height and quality arguments to + * change the output settings. + * + * @param string code + * @param number width + * @param number height + * @param number quality + * @throws Exception + * @return Promise + */ + async getBrowser(code: string, width: number = 100, height: number = 100, quality: number = 100): Promise { + let path = '/avatars/browsers/{code}'.replace(new RegExp('{code}', 'g'), code); + + return await this.client.call('get', path, { + 'content-type': 'application/json', + }, + { + 'width': width, + 'height': height, + 'quality': quality + }); + } + + /** + * Get Credit Card Icon + * + * Need to display your users with your billing method or their payment + * methods? The credit card endpoint will return you the icon of the credit + * card provider you need. Use width, height and quality arguments to change + * the output settings. + * + * @param string code + * @param number width + * @param number height + * @param number quality + * @throws Exception + * @return Promise + */ + async getCreditCard(code: string, width: number = 100, height: number = 100, quality: number = 100): Promise { + let path = '/avatars/credit-cards/{code}'.replace(new RegExp('{code}', 'g'), code); + + return await this.client.call('get', path, { + 'content-type': 'application/json', + }, + { + 'width': width, + 'height': height, + 'quality': quality + }); + } + + /** + * Get Favicon + * + * Use this endpoint to fetch the favorite icon (AKA favicon) of a any remote + * website URL. + * + * @param string url + * @throws Exception + * @return Promise + */ + async getFavicon(url: string): Promise { + let path = '/avatars/favicon'; + + return await this.client.call('get', path, { + 'content-type': 'application/json', + }, + { + 'url': url + }); + } + + /** + * Get Country Flag + * + * You can use this endpoint to show different country flags icons to your + * users. The code argument receives the 2 letter country code. Use width, + * height and quality arguments to change the output settings. + * + * @param string code + * @param number width + * @param number height + * @param number quality + * @throws Exception + * @return Promise + */ + async getFlag(code: string, width: number = 100, height: number = 100, quality: number = 100): Promise { + let path = '/avatars/flags/{code}'.replace(new RegExp('{code}', 'g'), code); + + return await this.client.call('get', path, { + 'content-type': 'application/json', + }, + { + 'width': width, + 'height': height, + 'quality': quality + }); + } + + /** + * Get Image from URL + * + * Use this endpoint to fetch a remote image URL and crop it to any image size + * you want. This endpoint is very useful if you need to crop and display + * remote images in your app or in case you want to make sure a 3rd party + * image is properly served using a TLS protocol. + * + * @param string url + * @param number width + * @param number height + * @throws Exception + * @return Promise + */ + async getImage(url: string, width: number = 400, height: number = 400): Promise { + let path = '/avatars/image'; + + return await this.client.call('get', path, { + 'content-type': 'application/json', + }, + { + 'url': url, + 'width': width, + 'height': height + }); + } + + /** + * Get QR Code + * + * Converts a given plain text to a QR code image. You can use the query + * parameters to change the size and style of the resulting image. + * + * @param string text + * @param number size + * @param number margin + * @param number download + * @throws Exception + * @return Promise + */ + async getQR(text: string, size: number = 400, margin: number = 1, download: number = 0): Promise { + let path = '/avatars/qr'; + + return await this.client.call('get', path, { + 'content-type': 'application/json', + }, + { + 'text': text, + 'size': size, + 'margin': margin, + 'download': download + }); + } +} \ No newline at end of file diff --git a/app/sdks/0.7.0/server-deno/src/services/database.ts b/app/sdks/0.7.0/server-deno/src/services/database.ts new file mode 100644 index 0000000000..164145ef82 --- /dev/null +++ b/app/sdks/0.7.0/server-deno/src/services/database.ts @@ -0,0 +1,285 @@ +import { Service } from "../service.ts"; +import { DocumentData } from '../client.ts' + +export class Database extends Service { + + /** + * List Collections + * + * Get a list of all the user collections. You can use the query params to + * filter your results. On admin mode, this endpoint will return a list of all + * of the project collections. [Learn more about different API + * modes](/docs/admin). + * + * @param string search + * @param number limit + * @param number offset + * @param string orderType + * @throws Exception + * @return Promise + */ + async listCollections(search: string = '', limit: number = 25, offset: number = 0, orderType: string = 'ASC'): Promise { + let path = '/database/collections'; + + return await this.client.call('get', path, { + 'content-type': 'application/json', + }, + { + 'search': search, + 'limit': limit, + 'offset': offset, + 'orderType': orderType + }); + } + + /** + * Create Collection + * + * Create a new Collection. + * + * @param string name + * @param Array read + * @param Array write + * @param Array rules + * @throws Exception + * @return Promise + */ + async createCollection(name: string, read: Array, write: Array, rules: Array): Promise { + let path = '/database/collections'; + + return await this.client.call('post', path, { + 'content-type': 'application/json', + }, + { + 'name': name, + 'read': read, + 'write': write, + 'rules': rules + }); + } + + /** + * Get Collection + * + * Get collection by its unique ID. This endpoint response returns a JSON + * object with the collection metadata. + * + * @param string collectionId + * @throws Exception + * @return Promise + */ + async getCollection(collectionId: string): Promise { + let path = '/database/collections/{collectionId}'.replace(new RegExp('{collectionId}', 'g'), collectionId); + + return await this.client.call('get', path, { + 'content-type': 'application/json', + }, + { + }); + } + + /** + * Update Collection + * + * Update collection by its unique ID. + * + * @param string collectionId + * @param string name + * @param Array read + * @param Array write + * @param Array rules + * @throws Exception + * @return Promise + */ + async updateCollection(collectionId: string, name: string, read: Array, write: Array, rules: Array = []): Promise { + let path = '/database/collections/{collectionId}'.replace(new RegExp('{collectionId}', 'g'), collectionId); + + return await this.client.call('put', path, { + 'content-type': 'application/json', + }, + { + 'name': name, + 'read': read, + 'write': write, + 'rules': rules + }); + } + + /** + * Delete Collection + * + * Delete a collection by its unique ID. Only users with write permissions + * have access to delete this resource. + * + * @param string collectionId + * @throws Exception + * @return Promise + */ + async deleteCollection(collectionId: string): Promise { + let path = '/database/collections/{collectionId}'.replace(new RegExp('{collectionId}', 'g'), collectionId); + + return await this.client.call('delete', path, { + 'content-type': 'application/json', + }, + { + }); + } + + /** + * List Documents + * + * Get a list of all the user documents. You can use the query params to + * filter your results. On admin mode, this endpoint will return a list of all + * of the project documents. [Learn more about different API + * modes](/docs/admin). + * + * @param string collectionId + * @param Array filters + * @param number offset + * @param number limit + * @param string orderField + * @param string orderType + * @param string orderCast + * @param string search + * @param number first + * @param number last + * @throws Exception + * @return Promise + */ + async listDocuments(collectionId: string, filters: Array = [], offset: number = 0, limit: number = 50, orderField: string = '$id', orderType: string = 'ASC', orderCast: string = 'string', search: string = '', first: number = 0, last: number = 0): Promise { + let path = '/database/collections/{collectionId}/documents'.replace(new RegExp('{collectionId}', 'g'), collectionId); + + return await this.client.call('get', path, { + 'content-type': 'application/json', + }, + { + 'filters': filters, + 'offset': offset, + 'limit': limit, + 'orderField': orderField, + 'orderType': orderType, + 'orderCast': orderCast, + 'search': search, + 'first': first, + 'last': last + }); + } + + /** + * Create Document + * + * Create a new Document. Before using this route, you should create a new + * collection resource using either a [server + * integration](/docs/server/database?sdk=nodejs#createCollection) API or + * directly from your database console. + * + * @param string collectionId + * @param DocumentData data + * @param Array read + * @param Array write + * @param string parentDocument + * @param string parentProperty + * @param string parentPropertyType + * @throws Exception + * @return Promise + */ + async createDocument(collectionId: string, data: DocumentData, read: Array, write: Array, parentDocument: string = '', parentProperty: string = '', parentPropertyType: string = 'assign'): Promise { + let path = '/database/collections/{collectionId}/documents'.replace(new RegExp('{collectionId}', 'g'), collectionId); + + return await this.client.call('post', path, { + 'content-type': 'application/json', + }, + { + 'data': data, + 'read': read, + 'write': write, + 'parentDocument': parentDocument, + 'parentProperty': parentProperty, + 'parentPropertyType': parentPropertyType + }); + } + + /** + * Get Document + * + * Get document by its unique ID. This endpoint response returns a JSON object + * with the document data. + * + * @param string collectionId + * @param string documentId + * @throws Exception + * @return Promise + */ + async getDocument(collectionId: string, documentId: string): Promise { + let path = '/database/collections/{collectionId}/documents/{documentId}'.replace(new RegExp('{collectionId}', 'g'), collectionId).replace(new RegExp('{documentId}', 'g'), documentId); + + return await this.client.call('get', path, { + 'content-type': 'application/json', + }, + { + }); + } + + /** + * Update Document + * + * @param string collectionId + * @param string documentId + * @param DocumentData data + * @param Array read + * @param Array write + * @throws Exception + * @return Promise + */ + async updateDocument(collectionId: string, documentId: string, data: DocumentData, read: Array, write: Array): Promise { + let path = '/database/collections/{collectionId}/documents/{documentId}'.replace(new RegExp('{collectionId}', 'g'), collectionId).replace(new RegExp('{documentId}', 'g'), documentId); + + return await this.client.call('patch', path, { + 'content-type': 'application/json', + }, + { + 'data': data, + 'read': read, + 'write': write + }); + } + + /** + * Delete Document + * + * Delete document by its unique ID. This endpoint deletes only the parent + * documents, his attributes and relations to other documents. Child documents + * **will not** be deleted. + * + * @param string collectionId + * @param string documentId + * @throws Exception + * @return Promise + */ + async deleteDocument(collectionId: string, documentId: string): Promise { + let path = '/database/collections/{collectionId}/documents/{documentId}'.replace(new RegExp('{collectionId}', 'g'), collectionId).replace(new RegExp('{documentId}', 'g'), documentId); + + return await this.client.call('delete', path, { + 'content-type': 'application/json', + }, + { + }); + } + + /** + * Get Collection Logs + * + * @param string collectionId + * @throws Exception + * @return Promise + */ + async getCollectionLogs(collectionId: string): Promise { + let path = '/database/collections/{collectionId}/logs'.replace(new RegExp('{collectionId}', 'g'), collectionId); + + return await this.client.call('get', path, { + 'content-type': 'application/json', + }, + { + }); + } +} \ No newline at end of file diff --git a/app/sdks/0.7.0/server-deno/src/services/health.ts b/app/sdks/0.7.0/server-deno/src/services/health.ts new file mode 100644 index 0000000000..df5c18a2cb --- /dev/null +++ b/app/sdks/0.7.0/server-deno/src/services/health.ts @@ -0,0 +1,232 @@ +import { Service } from "../service.ts"; +import { DocumentData } from '../client.ts' + +export class Health extends Service { + + /** + * Get HTTP + * + * Check the Appwrite HTTP server is up and responsive. + * + * @throws Exception + * @return Promise + */ + async get(): Promise { + let path = '/health'; + + return await this.client.call('get', path, { + 'content-type': 'application/json', + }, + { + }); + } + + /** + * Get Anti virus + * + * Check the Appwrite Anti Virus server is up and connection is successful. + * + * @throws Exception + * @return Promise + */ + async getAntiVirus(): Promise { + let path = '/health/anti-virus'; + + return await this.client.call('get', path, { + 'content-type': 'application/json', + }, + { + }); + } + + /** + * Get Cache + * + * Check the Appwrite in-memory cache server is up and connection is + * successful. + * + * @throws Exception + * @return Promise + */ + async getCache(): Promise { + let path = '/health/cache'; + + return await this.client.call('get', path, { + 'content-type': 'application/json', + }, + { + }); + } + + /** + * Get DB + * + * Check the Appwrite database server is up and connection is successful. + * + * @throws Exception + * @return Promise + */ + async getDB(): Promise { + let path = '/health/db'; + + return await this.client.call('get', path, { + 'content-type': 'application/json', + }, + { + }); + } + + /** + * Get Certificate Queue + * + * Get the number of certificates that are waiting to be issued against + * [Letsencrypt](https://letsencrypt.org/) in the Appwrite internal queue + * server. + * + * @throws Exception + * @return Promise + */ + async getQueueCertificates(): Promise { + let path = '/health/queue/certificates'; + + return await this.client.call('get', path, { + 'content-type': 'application/json', + }, + { + }); + } + + /** + * Get Functions Queue + * + * @throws Exception + * @return Promise + */ + async getQueueFunctions(): Promise { + let path = '/health/queue/functions'; + + return await this.client.call('get', path, { + 'content-type': 'application/json', + }, + { + }); + } + + /** + * Get Logs Queue + * + * Get the number of logs that are waiting to be processed in the Appwrite + * internal queue server. + * + * @throws Exception + * @return Promise + */ + async getQueueLogs(): Promise { + let path = '/health/queue/logs'; + + return await this.client.call('get', path, { + 'content-type': 'application/json', + }, + { + }); + } + + /** + * Get Tasks Queue + * + * Get the number of tasks that are waiting to be processed in the Appwrite + * internal queue server. + * + * @throws Exception + * @return Promise + */ + async getQueueTasks(): Promise { + let path = '/health/queue/tasks'; + + return await this.client.call('get', path, { + 'content-type': 'application/json', + }, + { + }); + } + + /** + * Get Usage Queue + * + * Get the number of usage stats that are waiting to be processed in the + * Appwrite internal queue server. + * + * @throws Exception + * @return Promise + */ + async getQueueUsage(): Promise { + let path = '/health/queue/usage'; + + return await this.client.call('get', path, { + 'content-type': 'application/json', + }, + { + }); + } + + /** + * Get Webhooks Queue + * + * Get the number of webhooks that are waiting to be processed in the Appwrite + * internal queue server. + * + * @throws Exception + * @return Promise + */ + async getQueueWebhooks(): Promise { + let path = '/health/queue/webhooks'; + + return await this.client.call('get', path, { + 'content-type': 'application/json', + }, + { + }); + } + + /** + * Get Local Storage + * + * Check the Appwrite local storage device is up and connection is successful. + * + * @throws Exception + * @return Promise + */ + async getStorageLocal(): Promise { + let path = '/health/storage/local'; + + return await this.client.call('get', path, { + 'content-type': 'application/json', + }, + { + }); + } + + /** + * Get Time + * + * Check the Appwrite server time is synced with Google remote NTP server. We + * use this technology to smoothly handle leap seconds with no disruptive + * events. The [Network Time + * Protocol](https://en.wikipedia.org/wiki/Network_Time_Protocol) (NTP) is + * used by hundreds of millions of computers and devices to synchronize their + * clocks over the Internet. If your computer sets its own clock, it likely + * uses NTP. + * + * @throws Exception + * @return Promise + */ + async getTime(): Promise { + let path = '/health/time'; + + return await this.client.call('get', path, { + 'content-type': 'application/json', + }, + { + }); + } +} \ No newline at end of file diff --git a/app/sdks/0.7.0/server-deno/src/services/locale.ts b/app/sdks/0.7.0/server-deno/src/services/locale.ts new file mode 100644 index 0000000000..0c42ac61d2 --- /dev/null +++ b/app/sdks/0.7.0/server-deno/src/services/locale.ts @@ -0,0 +1,124 @@ +import { Service } from "../service.ts"; +import { DocumentData } from '../client.ts' + +export class Locale extends Service { + + /** + * Get User Locale + * + * Get the current user location based on IP. Returns an object with user + * country code, country name, continent name, continent code, ip address and + * suggested currency. You can use the locale header to get the data in a + * supported language. + * + * ([IP Geolocation by DB-IP](https://db-ip.com)) + * + * @throws Exception + * @return Promise + */ + async get(): Promise { + let path = '/locale'; + + return await this.client.call('get', path, { + 'content-type': 'application/json', + }, + { + }); + } + + /** + * List Continents + * + * List of all continents. You can use the locale header to get the data in a + * supported language. + * + * @throws Exception + * @return Promise + */ + async getContinents(): Promise { + let path = '/locale/continents'; + + return await this.client.call('get', path, { + 'content-type': 'application/json', + }, + { + }); + } + + /** + * List Countries + * + * List of all countries. You can use the locale header to get the data in a + * supported language. + * + * @throws Exception + * @return Promise + */ + async getCountries(): Promise { + let path = '/locale/countries'; + + return await this.client.call('get', path, { + 'content-type': 'application/json', + }, + { + }); + } + + /** + * List EU Countries + * + * List of all countries that are currently members of the EU. You can use the + * locale header to get the data in a supported language. + * + * @throws Exception + * @return Promise + */ + async getCountriesEU(): Promise { + let path = '/locale/countries/eu'; + + return await this.client.call('get', path, { + 'content-type': 'application/json', + }, + { + }); + } + + /** + * List Countries Phone Codes + * + * List of all countries phone codes. You can use the locale header to get the + * data in a supported language. + * + * @throws Exception + * @return Promise + */ + async getCountriesPhones(): Promise { + let path = '/locale/countries/phones'; + + return await this.client.call('get', path, { + 'content-type': 'application/json', + }, + { + }); + } + + /** + * List Currencies + * + * List of all currencies, including currency symol, name, plural, and decimal + * digits for all major and minor currencies. You can use the locale header to + * get the data in a supported language. + * + * @throws Exception + * @return Promise + */ + async getCurrencies(): Promise { + let path = '/locale/currencies'; + + return await this.client.call('get', path, { + 'content-type': 'application/json', + }, + { + }); + } +} \ No newline at end of file diff --git a/app/sdks/0.7.0/server-deno/src/services/storage.ts b/app/sdks/0.7.0/server-deno/src/services/storage.ts new file mode 100644 index 0000000000..b663739e05 --- /dev/null +++ b/app/sdks/0.7.0/server-deno/src/services/storage.ts @@ -0,0 +1,198 @@ +import { Service } from "../service.ts"; +import { DocumentData } from '../client.ts' + +export class Storage extends Service { + + /** + * List Files + * + * Get a list of all the user files. You can use the query params to filter + * your results. On admin mode, this endpoint will return a list of all of the + * project files. [Learn more about different API modes](/docs/admin). + * + * @param string search + * @param number limit + * @param number offset + * @param string orderType + * @throws Exception + * @return Promise + */ + async listFiles(search: string = '', limit: number = 25, offset: number = 0, orderType: string = 'ASC'): Promise { + let path = '/storage/files'; + + return await this.client.call('get', path, { + 'content-type': 'application/json', + }, + { + 'search': search, + 'limit': limit, + 'offset': offset, + 'orderType': orderType + }); + } + + /** + * Create File + * + * Create a new file. The user who creates the file will automatically be + * assigned to read and write access unless he has passed custom values for + * read and write arguments. + * + * @param File | Blob file + * @param Array read + * @param Array write + * @throws Exception + * @return Promise + */ + async createFile(file: File | Blob, read: Array, write: Array): Promise { + let path = '/storage/files'; + + return await this.client.call('post', path, { + 'content-type': 'multipart/form-data', + }, + { + 'file': file, + 'read': read, + 'write': write + }); + } + + /** + * Get File + * + * Get file by its unique ID. This endpoint response returns a JSON object + * with the file metadata. + * + * @param string fileId + * @throws Exception + * @return Promise + */ + async getFile(fileId: string): Promise { + let path = '/storage/files/{fileId}'.replace(new RegExp('{fileId}', 'g'), fileId); + + return await this.client.call('get', path, { + 'content-type': 'application/json', + }, + { + }); + } + + /** + * Update File + * + * Update file by its unique ID. Only users with write permissions have access + * to update this resource. + * + * @param string fileId + * @param Array read + * @param Array write + * @throws Exception + * @return Promise + */ + async updateFile(fileId: string, read: Array, write: Array): Promise { + let path = '/storage/files/{fileId}'.replace(new RegExp('{fileId}', 'g'), fileId); + + return await this.client.call('put', path, { + 'content-type': 'application/json', + }, + { + 'read': read, + 'write': write + }); + } + + /** + * Delete File + * + * Delete a file by its unique ID. Only users with write permissions have + * access to delete this resource. + * + * @param string fileId + * @throws Exception + * @return Promise + */ + async deleteFile(fileId: string): Promise { + let path = '/storage/files/{fileId}'.replace(new RegExp('{fileId}', 'g'), fileId); + + return await this.client.call('delete', path, { + 'content-type': 'application/json', + }, + { + }); + } + + /** + * Get File for Download + * + * Get file content by its unique ID. The endpoint response return with a + * 'Content-Disposition: attachment' header that tells the browser to start + * downloading the file to user downloads directory. + * + * @param string fileId + * @throws Exception + * @return Promise + */ + async getFileDownload(fileId: string): Promise { + let path = '/storage/files/{fileId}/download'.replace(new RegExp('{fileId}', 'g'), fileId); + + return await this.client.call('get', path, { + 'content-type': 'application/json', + }, + { + }); + } + + /** + * Get File Preview + * + * Get a file preview image. Currently, this method supports preview for image + * files (jpg, png, and gif), other supported formats, like pdf, docs, slides, + * and spreadsheets, will return the file icon image. You can also pass query + * string arguments for cutting and resizing your preview image. + * + * @param string fileId + * @param number width + * @param number height + * @param number quality + * @param string background + * @param string output + * @throws Exception + * @return Promise + */ + async getFilePreview(fileId: string, width: number = 0, height: number = 0, quality: number = 100, background: string = '', output: string = ''): Promise { + let path = '/storage/files/{fileId}/preview'.replace(new RegExp('{fileId}', 'g'), fileId); + + return await this.client.call('get', path, { + 'content-type': 'application/json', + }, + { + 'width': width, + 'height': height, + 'quality': quality, + 'background': background, + 'output': output + }); + } + + /** + * Get File for View + * + * Get file content by its unique ID. This endpoint is similar to the download + * method but returns with no 'Content-Disposition: attachment' header. + * + * @param string fileId + * @param string as + * @throws Exception + * @return Promise + */ + async getFileView(fileId: string, as: string = ''): Promise { + let path = '/storage/files/{fileId}/view'.replace(new RegExp('{fileId}', 'g'), fileId); + + return await this.client.call('get', path, { + 'content-type': 'application/json', + }, + { + 'as': as + }); + } +} \ No newline at end of file diff --git a/app/sdks/0.7.0/server-deno/src/services/teams.ts b/app/sdks/0.7.0/server-deno/src/services/teams.ts new file mode 100644 index 0000000000..b80c2f6714 --- /dev/null +++ b/app/sdks/0.7.0/server-deno/src/services/teams.ts @@ -0,0 +1,201 @@ +import { Service } from "../service.ts"; +import { DocumentData } from '../client.ts' + +export class Teams extends Service { + + /** + * List Teams + * + * Get a list of all the current user teams. You can use the query params to + * filter your results. On admin mode, this endpoint will return a list of all + * of the project teams. [Learn more about different API modes](/docs/admin). + * + * @param string search + * @param number limit + * @param number offset + * @param string orderType + * @throws Exception + * @return Promise + */ + async list(search: string = '', limit: number = 25, offset: number = 0, orderType: string = 'ASC'): Promise { + let path = '/teams'; + + return await this.client.call('get', path, { + 'content-type': 'application/json', + }, + { + 'search': search, + 'limit': limit, + 'offset': offset, + 'orderType': orderType + }); + } + + /** + * Create Team + * + * Create a new team. The user who creates the team will automatically be + * assigned as the owner of the team. The team owner can invite new members, + * who will be able add new owners and update or delete the team from your + * project. + * + * @param string name + * @param Array roles + * @throws Exception + * @return Promise + */ + async create(name: string, roles: Array = ["owner"]): Promise { + let path = '/teams'; + + return await this.client.call('post', path, { + 'content-type': 'application/json', + }, + { + 'name': name, + 'roles': roles + }); + } + + /** + * Get Team + * + * Get team by its unique ID. All team members have read access for this + * resource. + * + * @param string teamId + * @throws Exception + * @return Promise + */ + async get(teamId: string): Promise { + let path = '/teams/{teamId}'.replace(new RegExp('{teamId}', 'g'), teamId); + + return await this.client.call('get', path, { + 'content-type': 'application/json', + }, + { + }); + } + + /** + * Update Team + * + * Update team by its unique ID. Only team owners have write access for this + * resource. + * + * @param string teamId + * @param string name + * @throws Exception + * @return Promise + */ + async update(teamId: string, name: string): Promise { + let path = '/teams/{teamId}'.replace(new RegExp('{teamId}', 'g'), teamId); + + return await this.client.call('put', path, { + 'content-type': 'application/json', + }, + { + 'name': name + }); + } + + /** + * Delete Team + * + * Delete team by its unique ID. Only team owners have write access for this + * resource. + * + * @param string teamId + * @throws Exception + * @return Promise + */ + async delete(teamId: string): Promise { + let path = '/teams/{teamId}'.replace(new RegExp('{teamId}', 'g'), teamId); + + return await this.client.call('delete', path, { + 'content-type': 'application/json', + }, + { + }); + } + + /** + * Get Team Memberships + * + * Get team members by the team unique ID. All team members have read access + * for this list of resources. + * + * @param string teamId + * @throws Exception + * @return Promise + */ + async getMemberships(teamId: string): Promise { + let path = '/teams/{teamId}/memberships'.replace(new RegExp('{teamId}', 'g'), teamId); + + return await this.client.call('get', path, { + 'content-type': 'application/json', + }, + { + }); + } + + /** + * Create Team Membership + * + * Use this endpoint to invite a new member to join your team. An email with a + * link to join the team will be sent to the new member email address if the + * member doesn't exist in the project it will be created automatically. + * + * Use the 'URL' parameter to redirect the user from the invitation email back + * to your app. When the user is redirected, use the [Update Team Membership + * Status](/docs/client/teams#updateMembershipStatus) endpoint to allow the + * user to accept the invitation to the team. + * + * Please note that in order to avoid a [Redirect + * Attacks](https://github.com/OWASP/CheatSheetSeries/blob/master/cheatsheets/Unvalidated_Redirects_and_Forwards_Cheat_Sheet.md) + * the only valid redirect URL's are the once from domains you have set when + * added your platforms in the console interface. + * + * @param string teamId + * @param string email + * @param Array roles + * @param string url + * @param string name + * @throws Exception + * @return Promise + */ + async createMembership(teamId: string, email: string, roles: Array, url: string, name: string = ''): Promise { + let path = '/teams/{teamId}/memberships'.replace(new RegExp('{teamId}', 'g'), teamId); + + return await this.client.call('post', path, { + 'content-type': 'application/json', + }, + { + 'email': email, + 'name': name, + 'roles': roles, + 'url': url + }); + } + + /** + * Delete Team Membership + * + * This endpoint allows a user to leave a team or for a team owner to delete + * the membership of any other team member. You can also use this endpoint to + * delete a user membership even if he didn't accept it. + * + * @param string teamId + * @param string inviteId + * @throws Exception + * @return Promise + */ + async deleteMembership(teamId: string, inviteId: string): Promise { + let path = '/teams/{teamId}/memberships/{inviteId}'.replace(new RegExp('{teamId}', 'g'), teamId).replace(new RegExp('{inviteId}', 'g'), inviteId); + + return await this.client.call('delete', path, { + 'content-type': 'application/json', + }, + { + }); + } +} \ No newline at end of file diff --git a/app/sdks/0.7.0/server-deno/src/services/users.ts b/app/sdks/0.7.0/server-deno/src/services/users.ts new file mode 100644 index 0000000000..ac48507f08 --- /dev/null +++ b/app/sdks/0.7.0/server-deno/src/services/users.ts @@ -0,0 +1,214 @@ +import { Service } from "../service.ts"; +import { DocumentData } from '../client.ts' + +export class Users extends Service { + + /** + * List Users + * + * Get a list of all the project users. You can use the query params to filter + * your results. + * + * @param string search + * @param number limit + * @param number offset + * @param string orderType + * @throws Exception + * @return Promise + */ + async list(search: string = '', limit: number = 25, offset: number = 0, orderType: string = 'ASC'): Promise { + let path = '/users'; + + return await this.client.call('get', path, { + 'content-type': 'application/json', + }, + { + 'search': search, + 'limit': limit, + 'offset': offset, + 'orderType': orderType + }); + } + + /** + * Create User + * + * Create a new user. + * + * @param string email + * @param string password + * @param string name + * @throws Exception + * @return Promise + */ + async create(email: string, password: string, name: string = ''): Promise { + let path = '/users'; + + return await this.client.call('post', path, { + 'content-type': 'application/json', + }, + { + 'email': email, + 'password': password, + 'name': name + }); + } + + /** + * Get User + * + * Get user by its unique ID. + * + * @param string userId + * @throws Exception + * @return Promise + */ + async get(userId: string): Promise { + let path = '/users/{userId}'.replace(new RegExp('{userId}', 'g'), userId); + + return await this.client.call('get', path, { + 'content-type': 'application/json', + }, + { + }); + } + + /** + * Get User Logs + * + * Get user activity logs list by its unique ID. + * + * @param string userId + * @throws Exception + * @return Promise + */ + async getLogs(userId: string): Promise { + let path = '/users/{userId}/logs'.replace(new RegExp('{userId}', 'g'), userId); + + return await this.client.call('get', path, { + 'content-type': 'application/json', + }, + { + }); + } + + /** + * Get User Preferences + * + * Get user preferences by its unique ID. + * + * @param string userId + * @throws Exception + * @return Promise + */ + async getPrefs(userId: string): Promise { + let path = '/users/{userId}/prefs'.replace(new RegExp('{userId}', 'g'), userId); + + return await this.client.call('get', path, { + 'content-type': 'application/json', + }, + { + }); + } + + /** + * Update User Preferences + * + * Update user preferences by its unique ID. You can pass only the specific + * settings you wish to update. + * + * @param string userId + * @param DocumentData prefs + * @throws Exception + * @return Promise + */ + async updatePrefs(userId: string, prefs: DocumentData): Promise { + let path = '/users/{userId}/prefs'.replace(new RegExp('{userId}', 'g'), userId); + + return await this.client.call('patch', path, { + 'content-type': 'application/json', + }, + { + 'prefs': prefs + }); + } + + /** + * Get User Sessions + * + * Get user sessions list by its unique ID. + * + * @param string userId + * @throws Exception + * @return Promise + */ + async getSessions(userId: string): Promise { + let path = '/users/{userId}/sessions'.replace(new RegExp('{userId}', 'g'), userId); + + return await this.client.call('get', path, { + 'content-type': 'application/json', + }, + { + }); + } + + /** + * Delete User Sessions + * + * Delete all user sessions by its unique ID. + * + * @param string userId + * @throws Exception + * @return Promise + */ + async deleteSessions(userId: string): Promise { + let path = '/users/{userId}/sessions'.replace(new RegExp('{userId}', 'g'), userId); + + return await this.client.call('delete', path, { + 'content-type': 'application/json', + }, + { + }); + } + + /** + * Delete User Session + * + * Delete user sessions by its unique ID. + * + * @param string userId + * @param string sessionId + * @throws Exception + * @return Promise + */ + async deleteSession(userId: string, sessionId: string): Promise { + let path = '/users/{userId}/sessions/{sessionId}'.replace(new RegExp('{userId}', 'g'), userId).replace(new RegExp('{sessionId}', 'g'), sessionId); + + return await this.client.call('delete', path, { + 'content-type': 'application/json', + }, + { + }); + } + + /** + * Update User Status + * + * Update user status by its unique ID. + * + * @param string userId + * @param string status + * @throws Exception + * @return Promise + */ + async updateStatus(userId: string, status: string): Promise { + let path = '/users/{userId}/status'.replace(new RegExp('{userId}', 'g'), userId); + + return await this.client.call('patch', path, { + 'content-type': 'application/json', + }, + { + 'status': status + }); + } +} \ No newline at end of file diff --git a/app/sdks/0.7.0/server-go/CHANGELOG.md b/app/sdks/0.7.0/server-go/CHANGELOG.md new file mode 100644 index 0000000000..fa4d35e687 --- /dev/null +++ b/app/sdks/0.7.0/server-go/CHANGELOG.md @@ -0,0 +1 @@ +# Change Log \ No newline at end of file diff --git a/app/sdks/0.7.0/server-go/LICENSE b/app/sdks/0.7.0/server-go/LICENSE new file mode 100644 index 0000000000..fc7c051a91 --- /dev/null +++ b/app/sdks/0.7.0/server-go/LICENSE @@ -0,0 +1,12 @@ +Copyright (c) 2019 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: + + 1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. + + 2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. + + 3. Neither the name Appwrite nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. \ No newline at end of file diff --git a/app/sdks/0.7.0/server-go/README.md b/app/sdks/0.7.0/server-go/README.md new file mode 100644 index 0000000000..3b46d51f79 --- /dev/null +++ b/app/sdks/0.7.0/server-go/README.md @@ -0,0 +1,30 @@ +# Appwrite SDK for Go + +![License](https://img.shields.io/github/license/appwrite/sdk-for-go.svg?v=1) +![Version](https://img.shields.io/badge/api%20version-0.6.0-blue.svg?v=1) + +**This SDK is compatible with Appwrite server version 0.6.0. For older versions, please check previous releases.** + +Appwrite is an open-source backend as a service server that abstract and simplify complex and repetitive development tasks behind a very simple to use REST API. Appwrite aims to help you develop your apps faster and in a more secure way. + Use the Go SDK to integrate your app with the Appwrite server to easily start interacting with all of Appwrite backend APIs and tools. + For full API documentation and tutorials go to [https://appwrite.io/docs](https://appwrite.io/docs) + + + +![Appwrite](https://appwrite.io/images/github.png) + +## Installation + +To install using `go get`: + +```bash +go get github.com/appwrite/sdk-for-go +``` + +## Contribution + +This library is auto-generated by Appwrite custom [SDK Generator](https://github.com/appwrite/sdk-generator). To learn more about how you can help us improve this SDK, please check the [contribution guide](https://github.com/appwrite/sdk-generator/blob/master/CONTRIBUTING.md) before sending a pull-request. + +## License + +Please see the [BSD-3-Clause license](https://raw.githubusercontent.com/appwrite/appwrite/master/LICENSE) file for more information. \ No newline at end of file diff --git a/app/sdks/0.7.0/server-go/avatars.go b/app/sdks/0.7.0/server-go/avatars.go new file mode 100644 index 0000000000..feafa9da31 --- /dev/null +++ b/app/sdks/0.7.0/server-go/avatars.go @@ -0,0 +1,111 @@ +package appwrite + +import ( + "strings" +) + +// Avatars service +type Avatars struct { + client Client +} + +func NewAvatars(clt Client) Avatars { + service := Avatars{ + client: clt, + } + + return service +} + +// GetBrowser you can use this endpoint to show different browser icons to +// your users. The code argument receives the browser code as it appears in +// your user /account/sessions endpoint. Use width, height and quality +// arguments to change the output settings. +func (srv *Avatars) GetBrowser(Code string, Width int, Height int, Quality int) (map[string]interface{}, error) { + r := strings.NewReplacer("{code}", Code) + path := r.Replace("/avatars/browsers/{code}") + + params := map[string]interface{}{ + "width": Width, + "height": Height, + "quality": Quality, + } + + return srv.client.Call("GET", path, nil, params) +} + +// GetCreditCard need to display your users with your billing method or their +// payment methods? The credit card endpoint will return you the icon of the +// credit card provider you need. Use width, height and quality arguments to +// change the output settings. +func (srv *Avatars) GetCreditCard(Code string, Width int, Height int, Quality int) (map[string]interface{}, error) { + r := strings.NewReplacer("{code}", Code) + path := r.Replace("/avatars/credit-cards/{code}") + + params := map[string]interface{}{ + "width": Width, + "height": Height, + "quality": Quality, + } + + return srv.client.Call("GET", path, nil, params) +} + +// GetFavicon use this endpoint to fetch the favorite icon (AKA favicon) of a +// any remote website URL. +func (srv *Avatars) GetFavicon(Url string) (map[string]interface{}, error) { + path := "/avatars/favicon" + + params := map[string]interface{}{ + "url": Url, + } + + return srv.client.Call("GET", path, nil, params) +} + +// GetFlag you can use this endpoint to show different country flags icons to +// your users. The code argument receives the 2 letter country code. Use +// width, height and quality arguments to change the output settings. +func (srv *Avatars) GetFlag(Code string, Width int, Height int, Quality int) (map[string]interface{}, error) { + r := strings.NewReplacer("{code}", Code) + path := r.Replace("/avatars/flags/{code}") + + params := map[string]interface{}{ + "width": Width, + "height": Height, + "quality": Quality, + } + + return srv.client.Call("GET", path, nil, params) +} + +// GetImage use this endpoint to fetch a remote image URL and crop it to any +// image size you want. This endpoint is very useful if you need to crop and +// display remote images in your app or in case you want to make sure a 3rd +// party image is properly served using a TLS protocol. +func (srv *Avatars) GetImage(Url string, Width int, Height int) (map[string]interface{}, error) { + path := "/avatars/image" + + params := map[string]interface{}{ + "url": Url, + "width": Width, + "height": Height, + } + + return srv.client.Call("GET", path, nil, params) +} + +// GetQR converts a given plain text to a QR code image. You can use the query +// parameters to change the size and style of the resulting image. +func (srv *Avatars) GetQR(Text string, Size int, Margin int, Download int) (map[string]interface{}, error) { + path := "/avatars/qr" + + params := map[string]interface{}{ + "text": Text, + "size": Size, + "margin": Margin, + "download": Download, + } + + return srv.client.Call("GET", path, nil, params) +} diff --git a/app/sdks/0.7.0/server-go/client.go b/app/sdks/0.7.0/server-go/client.go new file mode 100644 index 0000000000..bd21f5f347 --- /dev/null +++ b/app/sdks/0.7.0/server-go/client.go @@ -0,0 +1,113 @@ +package appwrite + +import ( + "encoding/json" + "io/ioutil" + "net/http" + "net/url" + "strings" +) + +// Client is the client struct to access Appwrite services +type Client struct { + client *http.Client + endpoint string + headers map[string]string + selfSigned bool +} + +// SetEndpoint sets the default endpoint to which the Client connects to +func (clt *Client) SetEndpoint(endpoint string) { + clt.endpoint = endpoint +} + +// SetSelfSigned sets the condition that specify if the Client should allow connections to a server using a self-signed certificate +func (clt *Client) SetSelfSigned(status bool) { + clt.selfSigned = status +} + +// AddHeader add a new custom header that the Client should send on each request +func (clt *Client) AddHeader(key string, value string) { + clt.headers[key] = value +} + +// Your project ID +func (clt *Client) SetProject(value string) { + clt.headers["X-Appwrite-Project"] = value +} + +// Your secret API key +func (clt *Client) SetKey(value string) { + clt.headers["X-Appwrite-Key"] = value +} + +func (clt *Client) SetLocale(value string) { + clt.headers["X-Appwrite-Locale"] = value +} + +// Call an API using Client +func (clt *Client) Call(method string, path string, headers map[string]interface{}, params map[string]interface{}) (map[string]interface{}, error) { + if clt.client == nil { + // Create HTTP client + clt.client = &http.Client{} + } + + if clt.selfSigned { + // Allow self signed requests + } + + urlPath := clt.endpoint + path + isGet := strings.ToUpper(method) == "GET" + + var reqBody *strings.Reader + if !isGet { + frm := url.Values{} + for key, val := range params { + frm.Add(key, ToString(val)) + } + reqBody = strings.NewReader(frm.Encode()) + } + + // Create and modify HTTP request before sending + req, err := http.NewRequest(method, urlPath, reqBody) + if err != nil { + return nil, err + } + + // Set Client headers + for key, val := range clt.headers { + req.Header.Set(key, ToString(val)) + } + + // Set Custom headers + for key, val := range headers { + req.Header.Set(key, ToString(val)) + } + + if isGet { + q := req.URL.Query() + for key, val := range params { + q.Add(key, ToString(val)) + } + req.URL.RawQuery = q.Encode() + } + + // Make request + response, err := clt.client.Do(req) + if err != nil { + return nil, err + } + + // Handle response + defer response.Body.Close() + + responseData, err := ioutil.ReadAll(response.Body) + if err != nil { + return nil, err + } + + var jsonResponse map[string]interface{} + json.Unmarshal(responseData, &jsonResponse) + + return jsonResponse, nil +} diff --git a/app/sdks/0.7.0/server-go/database.go b/app/sdks/0.7.0/server-go/database.go new file mode 100644 index 0000000000..d420d69fde --- /dev/null +++ b/app/sdks/0.7.0/server-go/database.go @@ -0,0 +1,178 @@ +package appwrite + +import ( + "strings" +) + +// Database service +type Database struct { + client Client +} + +func NewDatabase(clt Client) Database { + service := Database{ + client: clt, + } + + return service +} + +// ListCollections get a list of all the user collections. You can use the +// query params to filter your results. On admin mode, this endpoint will +// return a list of all of the project collections. [Learn more about +// different API modes](/docs/admin). +func (srv *Database) ListCollections(Search string, Limit int, Offset int, OrderType string) (map[string]interface{}, error) { + path := "/database/collections" + + params := map[string]interface{}{ + "search": Search, + "limit": Limit, + "offset": Offset, + "orderType": OrderType, + } + + return srv.client.Call("GET", path, nil, params) +} + +// CreateCollection create a new Collection. +func (srv *Database) CreateCollection(Name string, Read []interface{}, Write []interface{}, Rules []interface{}) (map[string]interface{}, error) { + path := "/database/collections" + + params := map[string]interface{}{ + "name": Name, + "read": Read, + "write": Write, + "rules": Rules, + } + + return srv.client.Call("POST", path, nil, params) +} + +// GetCollection get collection by its unique ID. This endpoint response +// returns a JSON object with the collection metadata. +func (srv *Database) GetCollection(CollectionId string) (map[string]interface{}, error) { + r := strings.NewReplacer("{collectionId}", CollectionId) + path := r.Replace("/database/collections/{collectionId}") + + params := map[string]interface{}{ + } + + return srv.client.Call("GET", path, nil, params) +} + +// UpdateCollection update collection by its unique ID. +func (srv *Database) UpdateCollection(CollectionId string, Name string, Read []interface{}, Write []interface{}, Rules []interface{}) (map[string]interface{}, error) { + r := strings.NewReplacer("{collectionId}", CollectionId) + path := r.Replace("/database/collections/{collectionId}") + + params := map[string]interface{}{ + "name": Name, + "read": Read, + "write": Write, + "rules": Rules, + } + + return srv.client.Call("PUT", path, nil, params) +} + +// DeleteCollection delete a collection by its unique ID. Only users with +// write permissions have access to delete this resource. +func (srv *Database) DeleteCollection(CollectionId string) (map[string]interface{}, error) { + r := strings.NewReplacer("{collectionId}", CollectionId) + path := r.Replace("/database/collections/{collectionId}") + + params := map[string]interface{}{ + } + + return srv.client.Call("DELETE", path, nil, params) +} + +// ListDocuments get a list of all the user documents. You can use the query +// params to filter your results. On admin mode, this endpoint will return a +// list of all of the project documents. [Learn more about different API +// modes](/docs/admin). +func (srv *Database) ListDocuments(CollectionId string, Filters []interface{}, Offset int, Limit int, OrderField string, OrderType string, OrderCast string, Search string, First int, Last int) (map[string]interface{}, error) { + r := strings.NewReplacer("{collectionId}", CollectionId) + path := r.Replace("/database/collections/{collectionId}/documents") + + params := map[string]interface{}{ + "filters": Filters, + "offset": Offset, + "limit": Limit, + "orderField": OrderField, + "orderType": OrderType, + "orderCast": OrderCast, + "search": Search, + "first": First, + "last": Last, + } + + return srv.client.Call("GET", path, nil, params) +} + +// CreateDocument create a new Document. +func (srv *Database) CreateDocument(CollectionId string, Data object, Read []interface{}, Write []interface{}, ParentDocument string, ParentProperty string, ParentPropertyType string) (map[string]interface{}, error) { + r := strings.NewReplacer("{collectionId}", CollectionId) + path := r.Replace("/database/collections/{collectionId}/documents") + + params := map[string]interface{}{ + "data": Data, + "read": Read, + "write": Write, + "parentDocument": ParentDocument, + "parentProperty": ParentProperty, + "parentPropertyType": ParentPropertyType, + } + + return srv.client.Call("POST", path, nil, params) +} + +// GetDocument get document by its unique ID. This endpoint response returns a +// JSON object with the document data. +func (srv *Database) GetDocument(CollectionId string, DocumentId string) (map[string]interface{}, error) { + r := strings.NewReplacer("{collectionId}", CollectionId, "{documentId}", DocumentId) + path := r.Replace("/database/collections/{collectionId}/documents/{documentId}") + + params := map[string]interface{}{ + } + + return srv.client.Call("GET", path, nil, params) +} + +// UpdateDocument +func (srv *Database) UpdateDocument(CollectionId string, DocumentId string, Data object, Read []interface{}, Write []interface{}) (map[string]interface{}, error) { + r := strings.NewReplacer("{collectionId}", CollectionId, "{documentId}", DocumentId) + path := r.Replace("/database/collections/{collectionId}/documents/{documentId}") + + params := map[string]interface{}{ + "data": Data, + "read": Read, + "write": Write, + } + + return srv.client.Call("PATCH", path, nil, params) +} + +// DeleteDocument delete document by its unique ID. This endpoint deletes only +// the parent documents, his attributes and relations to other documents. +// Child documents **will not** be deleted. +func (srv *Database) DeleteDocument(CollectionId string, DocumentId string) (map[string]interface{}, error) { + r := strings.NewReplacer("{collectionId}", CollectionId, "{documentId}", DocumentId) + path := r.Replace("/database/collections/{collectionId}/documents/{documentId}") + + params := map[string]interface{}{ + } + + return srv.client.Call("DELETE", path, nil, params) +} + +// GetCollectionLogs +func (srv *Database) GetCollectionLogs(CollectionId string) (map[string]interface{}, error) { + r := strings.NewReplacer("{collectionId}", CollectionId) + path := r.Replace("/database/collections/{collectionId}/logs") + + params := map[string]interface{}{ + } + + return srv.client.Call("GET", path, nil, params) +} diff --git a/app/sdks/0.7.0/server-go/docs/examples/avatars/get-browser.md b/app/sdks/0.7.0/server-go/docs/examples/avatars/get-browser.md new file mode 100644 index 0000000000..b307cd8dbc --- /dev/null +++ b/app/sdks/0.7.0/server-go/docs/examples/avatars/get-browser.md @@ -0,0 +1,25 @@ +package main + +import ( + "fmt" + "github.com/appwrite/sdk-for-go" +) + +func main() { + var client := appwrite.Client{} + + client.SetProject("5df5acd0d48c2") // Your project ID + client.SetKey("919c2d18fb5d4...a2ae413da83346ad2") // Your secret API key + + var service := appwrite.Avatars{ + client: &client + } + + var response, error := service.GetBrowser("aa", 0, 0, 0) + + if error != nil { + panic(error) + } + + fmt.Println(response) +} \ No newline at end of file diff --git a/app/sdks/0.7.0/server-go/docs/examples/avatars/get-credit-card.md b/app/sdks/0.7.0/server-go/docs/examples/avatars/get-credit-card.md new file mode 100644 index 0000000000..ffc748d052 --- /dev/null +++ b/app/sdks/0.7.0/server-go/docs/examples/avatars/get-credit-card.md @@ -0,0 +1,25 @@ +package main + +import ( + "fmt" + "github.com/appwrite/sdk-for-go" +) + +func main() { + var client := appwrite.Client{} + + client.SetProject("5df5acd0d48c2") // Your project ID + client.SetKey("919c2d18fb5d4...a2ae413da83346ad2") // Your secret API key + + var service := appwrite.Avatars{ + client: &client + } + + var response, error := service.GetCreditCard("amex", 0, 0, 0) + + if error != nil { + panic(error) + } + + fmt.Println(response) +} \ No newline at end of file diff --git a/app/sdks/0.7.0/server-go/docs/examples/avatars/get-favicon.md b/app/sdks/0.7.0/server-go/docs/examples/avatars/get-favicon.md new file mode 100644 index 0000000000..596a9d9fd3 --- /dev/null +++ b/app/sdks/0.7.0/server-go/docs/examples/avatars/get-favicon.md @@ -0,0 +1,25 @@ +package main + +import ( + "fmt" + "github.com/appwrite/sdk-for-go" +) + +func main() { + var client := appwrite.Client{} + + client.SetProject("5df5acd0d48c2") // Your project ID + client.SetKey("919c2d18fb5d4...a2ae413da83346ad2") // Your secret API key + + var service := appwrite.Avatars{ + client: &client + } + + var response, error := service.GetFavicon("https://example.com") + + if error != nil { + panic(error) + } + + fmt.Println(response) +} \ No newline at end of file diff --git a/app/sdks/0.7.0/server-go/docs/examples/avatars/get-flag.md b/app/sdks/0.7.0/server-go/docs/examples/avatars/get-flag.md new file mode 100644 index 0000000000..63042ef0a6 --- /dev/null +++ b/app/sdks/0.7.0/server-go/docs/examples/avatars/get-flag.md @@ -0,0 +1,25 @@ +package main + +import ( + "fmt" + "github.com/appwrite/sdk-for-go" +) + +func main() { + var client := appwrite.Client{} + + client.SetProject("5df5acd0d48c2") // Your project ID + client.SetKey("919c2d18fb5d4...a2ae413da83346ad2") // Your secret API key + + var service := appwrite.Avatars{ + client: &client + } + + var response, error := service.GetFlag("af", 0, 0, 0) + + if error != nil { + panic(error) + } + + fmt.Println(response) +} \ No newline at end of file diff --git a/app/sdks/0.7.0/server-go/docs/examples/avatars/get-image.md b/app/sdks/0.7.0/server-go/docs/examples/avatars/get-image.md new file mode 100644 index 0000000000..7095ee3658 --- /dev/null +++ b/app/sdks/0.7.0/server-go/docs/examples/avatars/get-image.md @@ -0,0 +1,25 @@ +package main + +import ( + "fmt" + "github.com/appwrite/sdk-for-go" +) + +func main() { + var client := appwrite.Client{} + + client.SetProject("5df5acd0d48c2") // Your project ID + client.SetKey("919c2d18fb5d4...a2ae413da83346ad2") // Your secret API key + + var service := appwrite.Avatars{ + client: &client + } + + var response, error := service.GetImage("https://example.com", 0, 0) + + if error != nil { + panic(error) + } + + fmt.Println(response) +} \ No newline at end of file diff --git a/app/sdks/0.7.0/server-go/docs/examples/avatars/get-q-r.md b/app/sdks/0.7.0/server-go/docs/examples/avatars/get-q-r.md new file mode 100644 index 0000000000..37425a463e --- /dev/null +++ b/app/sdks/0.7.0/server-go/docs/examples/avatars/get-q-r.md @@ -0,0 +1,25 @@ +package main + +import ( + "fmt" + "github.com/appwrite/sdk-for-go" +) + +func main() { + var client := appwrite.Client{} + + client.SetProject("5df5acd0d48c2") // Your project ID + client.SetKey("919c2d18fb5d4...a2ae413da83346ad2") // Your secret API key + + var service := appwrite.Avatars{ + client: &client + } + + var response, error := service.GetQR("[TEXT]", 0, 0, 0) + + if error != nil { + panic(error) + } + + fmt.Println(response) +} \ No newline at end of file diff --git a/app/sdks/0.7.0/server-go/docs/examples/database/create-collection.md b/app/sdks/0.7.0/server-go/docs/examples/database/create-collection.md new file mode 100644 index 0000000000..947ce799ff --- /dev/null +++ b/app/sdks/0.7.0/server-go/docs/examples/database/create-collection.md @@ -0,0 +1,25 @@ +package main + +import ( + "fmt" + "github.com/appwrite/sdk-for-go" +) + +func main() { + var client := appwrite.Client{} + + client.SetProject("5df5acd0d48c2") // Your project ID + client.SetKey("919c2d18fb5d4...a2ae413da83346ad2") // Your secret API key + + var service := appwrite.Database{ + client: &client + } + + var response, error := service.CreateCollection("[NAME]", [], [], []) + + if error != nil { + panic(error) + } + + fmt.Println(response) +} \ No newline at end of file diff --git a/app/sdks/0.7.0/server-go/docs/examples/database/create-document.md b/app/sdks/0.7.0/server-go/docs/examples/database/create-document.md new file mode 100644 index 0000000000..5b63002464 --- /dev/null +++ b/app/sdks/0.7.0/server-go/docs/examples/database/create-document.md @@ -0,0 +1,25 @@ +package main + +import ( + "fmt" + "github.com/appwrite/sdk-for-go" +) + +func main() { + var client := appwrite.Client{} + + client.SetProject("5df5acd0d48c2") // Your project ID + client.SetKey("919c2d18fb5d4...a2ae413da83346ad2") // Your secret API key + + var service := appwrite.Database{ + client: &client + } + + var response, error := service.CreateDocument("[COLLECTION_ID]", , [], [], "[PARENT_DOCUMENT]", "", "assign") + + if error != nil { + panic(error) + } + + fmt.Println(response) +} \ No newline at end of file diff --git a/app/sdks/0.7.0/server-go/docs/examples/database/delete-collection.md b/app/sdks/0.7.0/server-go/docs/examples/database/delete-collection.md new file mode 100644 index 0000000000..2b5744730b --- /dev/null +++ b/app/sdks/0.7.0/server-go/docs/examples/database/delete-collection.md @@ -0,0 +1,25 @@ +package main + +import ( + "fmt" + "github.com/appwrite/sdk-for-go" +) + +func main() { + var client := appwrite.Client{} + + client.SetProject("5df5acd0d48c2") // Your project ID + client.SetKey("919c2d18fb5d4...a2ae413da83346ad2") // Your secret API key + + var service := appwrite.Database{ + client: &client + } + + var response, error := service.DeleteCollection("[COLLECTION_ID]") + + if error != nil { + panic(error) + } + + fmt.Println(response) +} \ No newline at end of file diff --git a/app/sdks/0.7.0/server-go/docs/examples/database/delete-document.md b/app/sdks/0.7.0/server-go/docs/examples/database/delete-document.md new file mode 100644 index 0000000000..5dfa23e1b1 --- /dev/null +++ b/app/sdks/0.7.0/server-go/docs/examples/database/delete-document.md @@ -0,0 +1,25 @@ +package main + +import ( + "fmt" + "github.com/appwrite/sdk-for-go" +) + +func main() { + var client := appwrite.Client{} + + client.SetProject("5df5acd0d48c2") // Your project ID + client.SetKey("919c2d18fb5d4...a2ae413da83346ad2") // Your secret API key + + var service := appwrite.Database{ + client: &client + } + + var response, error := service.DeleteDocument("[COLLECTION_ID]", "[DOCUMENT_ID]") + + if error != nil { + panic(error) + } + + fmt.Println(response) +} \ No newline at end of file diff --git a/app/sdks/0.7.0/server-go/docs/examples/database/get-collection-logs.md b/app/sdks/0.7.0/server-go/docs/examples/database/get-collection-logs.md new file mode 100644 index 0000000000..4427295371 --- /dev/null +++ b/app/sdks/0.7.0/server-go/docs/examples/database/get-collection-logs.md @@ -0,0 +1,25 @@ +package main + +import ( + "fmt" + "github.com/appwrite/sdk-for-go" +) + +func main() { + var client := appwrite.Client{} + + client.SetProject("5df5acd0d48c2") // Your project ID + client.SetKey("919c2d18fb5d4...a2ae413da83346ad2") // Your secret API key + + var service := appwrite.Database{ + client: &client + } + + var response, error := service.GetCollectionLogs("[COLLECTION_ID]") + + if error != nil { + panic(error) + } + + fmt.Println(response) +} \ No newline at end of file diff --git a/app/sdks/0.7.0/server-go/docs/examples/database/get-collection.md b/app/sdks/0.7.0/server-go/docs/examples/database/get-collection.md new file mode 100644 index 0000000000..bc6d9f7746 --- /dev/null +++ b/app/sdks/0.7.0/server-go/docs/examples/database/get-collection.md @@ -0,0 +1,25 @@ +package main + +import ( + "fmt" + "github.com/appwrite/sdk-for-go" +) + +func main() { + var client := appwrite.Client{} + + client.SetProject("5df5acd0d48c2") // Your project ID + client.SetKey("919c2d18fb5d4...a2ae413da83346ad2") // Your secret API key + + var service := appwrite.Database{ + client: &client + } + + var response, error := service.GetCollection("[COLLECTION_ID]") + + if error != nil { + panic(error) + } + + fmt.Println(response) +} \ No newline at end of file diff --git a/app/sdks/0.7.0/server-go/docs/examples/database/get-document.md b/app/sdks/0.7.0/server-go/docs/examples/database/get-document.md new file mode 100644 index 0000000000..ba4b063f57 --- /dev/null +++ b/app/sdks/0.7.0/server-go/docs/examples/database/get-document.md @@ -0,0 +1,25 @@ +package main + +import ( + "fmt" + "github.com/appwrite/sdk-for-go" +) + +func main() { + var client := appwrite.Client{} + + client.SetProject("5df5acd0d48c2") // Your project ID + client.SetKey("919c2d18fb5d4...a2ae413da83346ad2") // Your secret API key + + var service := appwrite.Database{ + client: &client + } + + var response, error := service.GetDocument("[COLLECTION_ID]", "[DOCUMENT_ID]") + + if error != nil { + panic(error) + } + + fmt.Println(response) +} \ No newline at end of file diff --git a/app/sdks/0.7.0/server-go/docs/examples/database/list-collections.md b/app/sdks/0.7.0/server-go/docs/examples/database/list-collections.md new file mode 100644 index 0000000000..0dda37d5e3 --- /dev/null +++ b/app/sdks/0.7.0/server-go/docs/examples/database/list-collections.md @@ -0,0 +1,25 @@ +package main + +import ( + "fmt" + "github.com/appwrite/sdk-for-go" +) + +func main() { + var client := appwrite.Client{} + + client.SetProject("5df5acd0d48c2") // Your project ID + client.SetKey("919c2d18fb5d4...a2ae413da83346ad2") // Your secret API key + + var service := appwrite.Database{ + client: &client + } + + var response, error := service.ListCollections("[SEARCH]", 0, 0, "ASC") + + if error != nil { + panic(error) + } + + fmt.Println(response) +} \ No newline at end of file diff --git a/app/sdks/0.7.0/server-go/docs/examples/database/list-documents.md b/app/sdks/0.7.0/server-go/docs/examples/database/list-documents.md new file mode 100644 index 0000000000..9f2e36d591 --- /dev/null +++ b/app/sdks/0.7.0/server-go/docs/examples/database/list-documents.md @@ -0,0 +1,25 @@ +package main + +import ( + "fmt" + "github.com/appwrite/sdk-for-go" +) + +func main() { + var client := appwrite.Client{} + + client.SetProject("5df5acd0d48c2") // Your project ID + client.SetKey("919c2d18fb5d4...a2ae413da83346ad2") // Your secret API key + + var service := appwrite.Database{ + client: &client + } + + var response, error := service.ListDocuments("[COLLECTION_ID]", [], 0, 0, "[ORDER_FIELD]", "DESC", "int", "[SEARCH]", 0, 0) + + if error != nil { + panic(error) + } + + fmt.Println(response) +} \ No newline at end of file diff --git a/app/sdks/0.7.0/server-go/docs/examples/database/update-collection.md b/app/sdks/0.7.0/server-go/docs/examples/database/update-collection.md new file mode 100644 index 0000000000..2b5e7f6d37 --- /dev/null +++ b/app/sdks/0.7.0/server-go/docs/examples/database/update-collection.md @@ -0,0 +1,25 @@ +package main + +import ( + "fmt" + "github.com/appwrite/sdk-for-go" +) + +func main() { + var client := appwrite.Client{} + + client.SetProject("5df5acd0d48c2") // Your project ID + client.SetKey("919c2d18fb5d4...a2ae413da83346ad2") // Your secret API key + + var service := appwrite.Database{ + client: &client + } + + var response, error := service.UpdateCollection("[COLLECTION_ID]", "[NAME]", [], [], []) + + if error != nil { + panic(error) + } + + fmt.Println(response) +} \ No newline at end of file diff --git a/app/sdks/0.7.0/server-go/docs/examples/database/update-document.md b/app/sdks/0.7.0/server-go/docs/examples/database/update-document.md new file mode 100644 index 0000000000..65a3eefa4a --- /dev/null +++ b/app/sdks/0.7.0/server-go/docs/examples/database/update-document.md @@ -0,0 +1,25 @@ +package main + +import ( + "fmt" + "github.com/appwrite/sdk-for-go" +) + +func main() { + var client := appwrite.Client{} + + client.SetProject("5df5acd0d48c2") // Your project ID + client.SetKey("919c2d18fb5d4...a2ae413da83346ad2") // Your secret API key + + var service := appwrite.Database{ + client: &client + } + + var response, error := service.UpdateDocument("[COLLECTION_ID]", "[DOCUMENT_ID]", , [], []) + + if error != nil { + panic(error) + } + + fmt.Println(response) +} \ No newline at end of file diff --git a/app/sdks/0.7.0/server-go/docs/examples/functions/create-execution.md b/app/sdks/0.7.0/server-go/docs/examples/functions/create-execution.md new file mode 100644 index 0000000000..ea060d6f7f --- /dev/null +++ b/app/sdks/0.7.0/server-go/docs/examples/functions/create-execution.md @@ -0,0 +1,25 @@ +package main + +import ( + "fmt" + "github.com/appwrite/sdk-for-go" +) + +func main() { + var client := appwrite.Client{} + + client.SetProject("5df5acd0d48c2") // Your project ID + client.SetKey("919c2d18fb5d4...a2ae413da83346ad2") // Your secret API key + + var service := appwrite.Functions{ + client: &client + } + + var response, error := service.CreateExecution("[FUNCTION_ID]", 0) + + if error != nil { + panic(error) + } + + fmt.Println(response) +} \ No newline at end of file diff --git a/app/sdks/0.7.0/server-go/docs/examples/functions/create-tag.md b/app/sdks/0.7.0/server-go/docs/examples/functions/create-tag.md new file mode 100644 index 0000000000..84d5e80787 --- /dev/null +++ b/app/sdks/0.7.0/server-go/docs/examples/functions/create-tag.md @@ -0,0 +1,25 @@ +package main + +import ( + "fmt" + "github.com/appwrite/sdk-for-go" +) + +func main() { + var client := appwrite.Client{} + + client.SetProject("5df5acd0d48c2") // Your project ID + client.SetKey("919c2d18fb5d4...a2ae413da83346ad2") // Your secret API key + + var service := appwrite.Functions{ + client: &client + } + + var response, error := service.CreateTag("[FUNCTION_ID]", "node-14", "[COMMAND]", "[CODE]") + + if error != nil { + panic(error) + } + + fmt.Println(response) +} \ No newline at end of file diff --git a/app/sdks/0.7.0/server-go/docs/examples/functions/create.md b/app/sdks/0.7.0/server-go/docs/examples/functions/create.md new file mode 100644 index 0000000000..a87a23b944 --- /dev/null +++ b/app/sdks/0.7.0/server-go/docs/examples/functions/create.md @@ -0,0 +1,25 @@ +package main + +import ( + "fmt" + "github.com/appwrite/sdk-for-go" +) + +func main() { + var client := appwrite.Client{} + + client.SetProject("5df5acd0d48c2") // Your project ID + client.SetKey("919c2d18fb5d4...a2ae413da83346ad2") // Your secret API key + + var service := appwrite.Functions{ + client: &client + } + + var response, error := service.Create("[NAME]", , [], "", 0) + + if error != nil { + panic(error) + } + + fmt.Println(response) +} \ No newline at end of file diff --git a/app/sdks/0.7.0/server-go/docs/examples/functions/delete-tag.md b/app/sdks/0.7.0/server-go/docs/examples/functions/delete-tag.md new file mode 100644 index 0000000000..caf36146da --- /dev/null +++ b/app/sdks/0.7.0/server-go/docs/examples/functions/delete-tag.md @@ -0,0 +1,25 @@ +package main + +import ( + "fmt" + "github.com/appwrite/sdk-for-go" +) + +func main() { + var client := appwrite.Client{} + + client.SetProject("5df5acd0d48c2") // Your project ID + client.SetKey("919c2d18fb5d4...a2ae413da83346ad2") // Your secret API key + + var service := appwrite.Functions{ + client: &client + } + + var response, error := service.DeleteTag("[FUNCTION_ID]", "[TAG_ID]") + + if error != nil { + panic(error) + } + + fmt.Println(response) +} \ No newline at end of file diff --git a/app/sdks/0.7.0/server-go/docs/examples/functions/delete.md b/app/sdks/0.7.0/server-go/docs/examples/functions/delete.md new file mode 100644 index 0000000000..e49addb2b1 --- /dev/null +++ b/app/sdks/0.7.0/server-go/docs/examples/functions/delete.md @@ -0,0 +1,25 @@ +package main + +import ( + "fmt" + "github.com/appwrite/sdk-for-go" +) + +func main() { + var client := appwrite.Client{} + + client.SetProject("5df5acd0d48c2") // Your project ID + client.SetKey("919c2d18fb5d4...a2ae413da83346ad2") // Your secret API key + + var service := appwrite.Functions{ + client: &client + } + + var response, error := service.Delete("[FUNCTION_ID]") + + if error != nil { + panic(error) + } + + fmt.Println(response) +} \ No newline at end of file diff --git a/app/sdks/0.7.0/server-go/docs/examples/functions/get-execution.md b/app/sdks/0.7.0/server-go/docs/examples/functions/get-execution.md new file mode 100644 index 0000000000..13a3ad4685 --- /dev/null +++ b/app/sdks/0.7.0/server-go/docs/examples/functions/get-execution.md @@ -0,0 +1,25 @@ +package main + +import ( + "fmt" + "github.com/appwrite/sdk-for-go" +) + +func main() { + var client := appwrite.Client{} + + client.SetProject("5df5acd0d48c2") // Your project ID + client.SetKey("919c2d18fb5d4...a2ae413da83346ad2") // Your secret API key + + var service := appwrite.Functions{ + client: &client + } + + var response, error := service.GetExecution("[FUNCTION_ID]", "[EXECUTION_ID]") + + if error != nil { + panic(error) + } + + fmt.Println(response) +} \ No newline at end of file diff --git a/app/sdks/0.7.0/server-go/docs/examples/functions/get-tag.md b/app/sdks/0.7.0/server-go/docs/examples/functions/get-tag.md new file mode 100644 index 0000000000..640543d94b --- /dev/null +++ b/app/sdks/0.7.0/server-go/docs/examples/functions/get-tag.md @@ -0,0 +1,25 @@ +package main + +import ( + "fmt" + "github.com/appwrite/sdk-for-go" +) + +func main() { + var client := appwrite.Client{} + + client.SetProject("5df5acd0d48c2") // Your project ID + client.SetKey("919c2d18fb5d4...a2ae413da83346ad2") // Your secret API key + + var service := appwrite.Functions{ + client: &client + } + + var response, error := service.GetTag("[FUNCTION_ID]", "[TAG_ID]") + + if error != nil { + panic(error) + } + + fmt.Println(response) +} \ No newline at end of file diff --git a/app/sdks/0.7.0/server-go/docs/examples/functions/get.md b/app/sdks/0.7.0/server-go/docs/examples/functions/get.md new file mode 100644 index 0000000000..2bba5028c0 --- /dev/null +++ b/app/sdks/0.7.0/server-go/docs/examples/functions/get.md @@ -0,0 +1,25 @@ +package main + +import ( + "fmt" + "github.com/appwrite/sdk-for-go" +) + +func main() { + var client := appwrite.Client{} + + client.SetProject("5df5acd0d48c2") // Your project ID + client.SetKey("919c2d18fb5d4...a2ae413da83346ad2") // Your secret API key + + var service := appwrite.Functions{ + client: &client + } + + var response, error := service.Get("[FUNCTION_ID]") + + if error != nil { + panic(error) + } + + fmt.Println(response) +} \ No newline at end of file diff --git a/app/sdks/0.7.0/server-go/docs/examples/functions/list-executions.md b/app/sdks/0.7.0/server-go/docs/examples/functions/list-executions.md new file mode 100644 index 0000000000..5115928c29 --- /dev/null +++ b/app/sdks/0.7.0/server-go/docs/examples/functions/list-executions.md @@ -0,0 +1,25 @@ +package main + +import ( + "fmt" + "github.com/appwrite/sdk-for-go" +) + +func main() { + var client := appwrite.Client{} + + client.SetProject("5df5acd0d48c2") // Your project ID + client.SetKey("919c2d18fb5d4...a2ae413da83346ad2") // Your secret API key + + var service := appwrite.Functions{ + client: &client + } + + var response, error := service.ListExecutions("[FUNCTION_ID]", "[SEARCH]", 0, 0, "ASC") + + if error != nil { + panic(error) + } + + fmt.Println(response) +} \ No newline at end of file diff --git a/app/sdks/0.7.0/server-go/docs/examples/functions/list-tags.md b/app/sdks/0.7.0/server-go/docs/examples/functions/list-tags.md new file mode 100644 index 0000000000..b6e495988e --- /dev/null +++ b/app/sdks/0.7.0/server-go/docs/examples/functions/list-tags.md @@ -0,0 +1,25 @@ +package main + +import ( + "fmt" + "github.com/appwrite/sdk-for-go" +) + +func main() { + var client := appwrite.Client{} + + client.SetProject("5df5acd0d48c2") // Your project ID + client.SetKey("919c2d18fb5d4...a2ae413da83346ad2") // Your secret API key + + var service := appwrite.Functions{ + client: &client + } + + var response, error := service.ListTags("[FUNCTION_ID]", "[SEARCH]", 0, 0, "ASC") + + if error != nil { + panic(error) + } + + fmt.Println(response) +} \ No newline at end of file diff --git a/app/sdks/0.7.0/server-go/docs/examples/functions/list.md b/app/sdks/0.7.0/server-go/docs/examples/functions/list.md new file mode 100644 index 0000000000..0a208e367d --- /dev/null +++ b/app/sdks/0.7.0/server-go/docs/examples/functions/list.md @@ -0,0 +1,25 @@ +package main + +import ( + "fmt" + "github.com/appwrite/sdk-for-go" +) + +func main() { + var client := appwrite.Client{} + + client.SetProject("5df5acd0d48c2") // Your project ID + client.SetKey("919c2d18fb5d4...a2ae413da83346ad2") // Your secret API key + + var service := appwrite.Functions{ + client: &client + } + + var response, error := service.List("[SEARCH]", 0, 0, "ASC") + + if error != nil { + panic(error) + } + + fmt.Println(response) +} \ No newline at end of file diff --git a/app/sdks/0.7.0/server-go/docs/examples/functions/update-active.md b/app/sdks/0.7.0/server-go/docs/examples/functions/update-active.md new file mode 100644 index 0000000000..da3b0f1227 --- /dev/null +++ b/app/sdks/0.7.0/server-go/docs/examples/functions/update-active.md @@ -0,0 +1,25 @@ +package main + +import ( + "fmt" + "github.com/appwrite/sdk-for-go" +) + +func main() { + var client := appwrite.Client{} + + client.SetProject("5df5acd0d48c2") // Your project ID + client.SetKey("919c2d18fb5d4...a2ae413da83346ad2") // Your secret API key + + var service := appwrite.Functions{ + client: &client + } + + var response, error := service.UpdateActive("[FUNCTION_ID]", "[ACTIVE]") + + if error != nil { + panic(error) + } + + fmt.Println(response) +} \ No newline at end of file diff --git a/app/sdks/0.7.0/server-go/docs/examples/functions/update-tag.md b/app/sdks/0.7.0/server-go/docs/examples/functions/update-tag.md new file mode 100644 index 0000000000..299b095736 --- /dev/null +++ b/app/sdks/0.7.0/server-go/docs/examples/functions/update-tag.md @@ -0,0 +1,25 @@ +package main + +import ( + "fmt" + "github.com/appwrite/sdk-for-go" +) + +func main() { + var client := appwrite.Client{} + + client.SetProject("5df5acd0d48c2") // Your project ID + client.SetKey("919c2d18fb5d4...a2ae413da83346ad2") // Your secret API key + + var service := appwrite.Functions{ + client: &client + } + + var response, error := service.UpdateTag("[FUNCTION_ID]", "[TAG]") + + if error != nil { + panic(error) + } + + fmt.Println(response) +} \ No newline at end of file diff --git a/app/sdks/0.7.0/server-go/docs/examples/functions/update.md b/app/sdks/0.7.0/server-go/docs/examples/functions/update.md new file mode 100644 index 0000000000..0f8f9e0190 --- /dev/null +++ b/app/sdks/0.7.0/server-go/docs/examples/functions/update.md @@ -0,0 +1,25 @@ +package main + +import ( + "fmt" + "github.com/appwrite/sdk-for-go" +) + +func main() { + var client := appwrite.Client{} + + client.SetProject("5df5acd0d48c2") // Your project ID + client.SetKey("919c2d18fb5d4...a2ae413da83346ad2") // Your secret API key + + var service := appwrite.Functions{ + client: &client + } + + var response, error := service.Update("[FUNCTION_ID]", "[NAME]", , [], "", 0) + + if error != nil { + panic(error) + } + + fmt.Println(response) +} \ No newline at end of file diff --git a/app/sdks/0.7.0/server-go/docs/examples/health/get-anti-virus.md b/app/sdks/0.7.0/server-go/docs/examples/health/get-anti-virus.md new file mode 100644 index 0000000000..a6f363dde1 --- /dev/null +++ b/app/sdks/0.7.0/server-go/docs/examples/health/get-anti-virus.md @@ -0,0 +1,25 @@ +package main + +import ( + "fmt" + "github.com/appwrite/sdk-for-go" +) + +func main() { + var client := appwrite.Client{} + + client.SetProject("5df5acd0d48c2") // Your project ID + client.SetKey("919c2d18fb5d4...a2ae413da83346ad2") // Your secret API key + + var service := appwrite.Health{ + client: &client + } + + var response, error := service.GetAntiVirus() + + if error != nil { + panic(error) + } + + fmt.Println(response) +} \ No newline at end of file diff --git a/app/sdks/0.7.0/server-go/docs/examples/health/get-cache.md b/app/sdks/0.7.0/server-go/docs/examples/health/get-cache.md new file mode 100644 index 0000000000..ce7b1c6f93 --- /dev/null +++ b/app/sdks/0.7.0/server-go/docs/examples/health/get-cache.md @@ -0,0 +1,25 @@ +package main + +import ( + "fmt" + "github.com/appwrite/sdk-for-go" +) + +func main() { + var client := appwrite.Client{} + + client.SetProject("5df5acd0d48c2") // Your project ID + client.SetKey("919c2d18fb5d4...a2ae413da83346ad2") // Your secret API key + + var service := appwrite.Health{ + client: &client + } + + var response, error := service.GetCache() + + if error != nil { + panic(error) + } + + fmt.Println(response) +} \ No newline at end of file diff --git a/app/sdks/0.7.0/server-go/docs/examples/health/get-d-b.md b/app/sdks/0.7.0/server-go/docs/examples/health/get-d-b.md new file mode 100644 index 0000000000..6d86894417 --- /dev/null +++ b/app/sdks/0.7.0/server-go/docs/examples/health/get-d-b.md @@ -0,0 +1,25 @@ +package main + +import ( + "fmt" + "github.com/appwrite/sdk-for-go" +) + +func main() { + var client := appwrite.Client{} + + client.SetProject("5df5acd0d48c2") // Your project ID + client.SetKey("919c2d18fb5d4...a2ae413da83346ad2") // Your secret API key + + var service := appwrite.Health{ + client: &client + } + + var response, error := service.GetDB() + + if error != nil { + panic(error) + } + + fmt.Println(response) +} \ No newline at end of file diff --git a/app/sdks/0.7.0/server-go/docs/examples/health/get-queue-certificates.md b/app/sdks/0.7.0/server-go/docs/examples/health/get-queue-certificates.md new file mode 100644 index 0000000000..9954551580 --- /dev/null +++ b/app/sdks/0.7.0/server-go/docs/examples/health/get-queue-certificates.md @@ -0,0 +1,25 @@ +package main + +import ( + "fmt" + "github.com/appwrite/sdk-for-go" +) + +func main() { + var client := appwrite.Client{} + + client.SetProject("5df5acd0d48c2") // Your project ID + client.SetKey("919c2d18fb5d4...a2ae413da83346ad2") // Your secret API key + + var service := appwrite.Health{ + client: &client + } + + var response, error := service.GetQueueCertificates() + + if error != nil { + panic(error) + } + + fmt.Println(response) +} \ No newline at end of file diff --git a/app/sdks/0.7.0/server-go/docs/examples/health/get-queue-functions.md b/app/sdks/0.7.0/server-go/docs/examples/health/get-queue-functions.md new file mode 100644 index 0000000000..5df453068b --- /dev/null +++ b/app/sdks/0.7.0/server-go/docs/examples/health/get-queue-functions.md @@ -0,0 +1,25 @@ +package main + +import ( + "fmt" + "github.com/appwrite/sdk-for-go" +) + +func main() { + var client := appwrite.Client{} + + client.SetProject("5df5acd0d48c2") // Your project ID + client.SetKey("919c2d18fb5d4...a2ae413da83346ad2") // Your secret API key + + var service := appwrite.Health{ + client: &client + } + + var response, error := service.GetQueueFunctions() + + if error != nil { + panic(error) + } + + fmt.Println(response) +} \ No newline at end of file diff --git a/app/sdks/0.7.0/server-go/docs/examples/health/get-queue-logs.md b/app/sdks/0.7.0/server-go/docs/examples/health/get-queue-logs.md new file mode 100644 index 0000000000..0b6280a42a --- /dev/null +++ b/app/sdks/0.7.0/server-go/docs/examples/health/get-queue-logs.md @@ -0,0 +1,25 @@ +package main + +import ( + "fmt" + "github.com/appwrite/sdk-for-go" +) + +func main() { + var client := appwrite.Client{} + + client.SetProject("5df5acd0d48c2") // Your project ID + client.SetKey("919c2d18fb5d4...a2ae413da83346ad2") // Your secret API key + + var service := appwrite.Health{ + client: &client + } + + var response, error := service.GetQueueLogs() + + if error != nil { + panic(error) + } + + fmt.Println(response) +} \ No newline at end of file diff --git a/app/sdks/0.7.0/server-go/docs/examples/health/get-queue-tasks.md b/app/sdks/0.7.0/server-go/docs/examples/health/get-queue-tasks.md new file mode 100644 index 0000000000..28d615dc2c --- /dev/null +++ b/app/sdks/0.7.0/server-go/docs/examples/health/get-queue-tasks.md @@ -0,0 +1,25 @@ +package main + +import ( + "fmt" + "github.com/appwrite/sdk-for-go" +) + +func main() { + var client := appwrite.Client{} + + client.SetProject("5df5acd0d48c2") // Your project ID + client.SetKey("919c2d18fb5d4...a2ae413da83346ad2") // Your secret API key + + var service := appwrite.Health{ + client: &client + } + + var response, error := service.GetQueueTasks() + + if error != nil { + panic(error) + } + + fmt.Println(response) +} \ No newline at end of file diff --git a/app/sdks/0.7.0/server-go/docs/examples/health/get-queue-usage.md b/app/sdks/0.7.0/server-go/docs/examples/health/get-queue-usage.md new file mode 100644 index 0000000000..e9fe988aa2 --- /dev/null +++ b/app/sdks/0.7.0/server-go/docs/examples/health/get-queue-usage.md @@ -0,0 +1,25 @@ +package main + +import ( + "fmt" + "github.com/appwrite/sdk-for-go" +) + +func main() { + var client := appwrite.Client{} + + client.SetProject("5df5acd0d48c2") // Your project ID + client.SetKey("919c2d18fb5d4...a2ae413da83346ad2") // Your secret API key + + var service := appwrite.Health{ + client: &client + } + + var response, error := service.GetQueueUsage() + + if error != nil { + panic(error) + } + + fmt.Println(response) +} \ No newline at end of file diff --git a/app/sdks/0.7.0/server-go/docs/examples/health/get-queue-webhooks.md b/app/sdks/0.7.0/server-go/docs/examples/health/get-queue-webhooks.md new file mode 100644 index 0000000000..2f92835a12 --- /dev/null +++ b/app/sdks/0.7.0/server-go/docs/examples/health/get-queue-webhooks.md @@ -0,0 +1,25 @@ +package main + +import ( + "fmt" + "github.com/appwrite/sdk-for-go" +) + +func main() { + var client := appwrite.Client{} + + client.SetProject("5df5acd0d48c2") // Your project ID + client.SetKey("919c2d18fb5d4...a2ae413da83346ad2") // Your secret API key + + var service := appwrite.Health{ + client: &client + } + + var response, error := service.GetQueueWebhooks() + + if error != nil { + panic(error) + } + + fmt.Println(response) +} \ No newline at end of file diff --git a/app/sdks/0.7.0/server-go/docs/examples/health/get-storage-anti-virus.md b/app/sdks/0.7.0/server-go/docs/examples/health/get-storage-anti-virus.md new file mode 100644 index 0000000000..8369b5ba07 --- /dev/null +++ b/app/sdks/0.7.0/server-go/docs/examples/health/get-storage-anti-virus.md @@ -0,0 +1,25 @@ +package main + +import ( + "fmt" + "github.com/appwrite/sdk-for-go" +) + +func main() { + var client := appwrite.Client{} + + client.SetProject("5df5acd0d48c2") // Your project ID + client.SetKey("919c2d18fb5d4...a2ae413da83346ad2") // Your secret API key + + var service := appwrite.Health{ + client: &client + } + + var response, error := service.GetStorageAntiVirus() + + if error != nil { + panic(error) + } + + fmt.Println(response) +} \ No newline at end of file diff --git a/app/sdks/0.7.0/server-go/docs/examples/health/get-storage-local.md b/app/sdks/0.7.0/server-go/docs/examples/health/get-storage-local.md new file mode 100644 index 0000000000..db0d5a5b21 --- /dev/null +++ b/app/sdks/0.7.0/server-go/docs/examples/health/get-storage-local.md @@ -0,0 +1,25 @@ +package main + +import ( + "fmt" + "github.com/appwrite/sdk-for-go" +) + +func main() { + var client := appwrite.Client{} + + client.SetProject("5df5acd0d48c2") // Your project ID + client.SetKey("919c2d18fb5d4...a2ae413da83346ad2") // Your secret API key + + var service := appwrite.Health{ + client: &client + } + + var response, error := service.GetStorageLocal() + + if error != nil { + panic(error) + } + + fmt.Println(response) +} \ No newline at end of file diff --git a/app/sdks/0.7.0/server-go/docs/examples/health/get-time.md b/app/sdks/0.7.0/server-go/docs/examples/health/get-time.md new file mode 100644 index 0000000000..dd8486a484 --- /dev/null +++ b/app/sdks/0.7.0/server-go/docs/examples/health/get-time.md @@ -0,0 +1,25 @@ +package main + +import ( + "fmt" + "github.com/appwrite/sdk-for-go" +) + +func main() { + var client := appwrite.Client{} + + client.SetProject("5df5acd0d48c2") // Your project ID + client.SetKey("919c2d18fb5d4...a2ae413da83346ad2") // Your secret API key + + var service := appwrite.Health{ + client: &client + } + + var response, error := service.GetTime() + + if error != nil { + panic(error) + } + + fmt.Println(response) +} \ No newline at end of file diff --git a/app/sdks/0.7.0/server-go/docs/examples/health/get.md b/app/sdks/0.7.0/server-go/docs/examples/health/get.md new file mode 100644 index 0000000000..df1cb27243 --- /dev/null +++ b/app/sdks/0.7.0/server-go/docs/examples/health/get.md @@ -0,0 +1,25 @@ +package main + +import ( + "fmt" + "github.com/appwrite/sdk-for-go" +) + +func main() { + var client := appwrite.Client{} + + client.SetProject("5df5acd0d48c2") // Your project ID + client.SetKey("919c2d18fb5d4...a2ae413da83346ad2") // Your secret API key + + var service := appwrite.Health{ + client: &client + } + + var response, error := service.Get() + + if error != nil { + panic(error) + } + + fmt.Println(response) +} \ No newline at end of file diff --git a/app/sdks/0.7.0/server-go/docs/examples/locale/get-continents.md b/app/sdks/0.7.0/server-go/docs/examples/locale/get-continents.md new file mode 100644 index 0000000000..dd9b96ca66 --- /dev/null +++ b/app/sdks/0.7.0/server-go/docs/examples/locale/get-continents.md @@ -0,0 +1,25 @@ +package main + +import ( + "fmt" + "github.com/appwrite/sdk-for-go" +) + +func main() { + var client := appwrite.Client{} + + client.SetProject("5df5acd0d48c2") // Your project ID + client.SetKey("919c2d18fb5d4...a2ae413da83346ad2") // Your secret API key + + var service := appwrite.Locale{ + client: &client + } + + var response, error := service.GetContinents() + + if error != nil { + panic(error) + } + + fmt.Println(response) +} \ No newline at end of file diff --git a/app/sdks/0.7.0/server-go/docs/examples/locale/get-countries-e-u.md b/app/sdks/0.7.0/server-go/docs/examples/locale/get-countries-e-u.md new file mode 100644 index 0000000000..01a2fedc1b --- /dev/null +++ b/app/sdks/0.7.0/server-go/docs/examples/locale/get-countries-e-u.md @@ -0,0 +1,25 @@ +package main + +import ( + "fmt" + "github.com/appwrite/sdk-for-go" +) + +func main() { + var client := appwrite.Client{} + + client.SetProject("5df5acd0d48c2") // Your project ID + client.SetKey("919c2d18fb5d4...a2ae413da83346ad2") // Your secret API key + + var service := appwrite.Locale{ + client: &client + } + + var response, error := service.GetCountriesEU() + + if error != nil { + panic(error) + } + + fmt.Println(response) +} \ No newline at end of file diff --git a/app/sdks/0.7.0/server-go/docs/examples/locale/get-countries-phones.md b/app/sdks/0.7.0/server-go/docs/examples/locale/get-countries-phones.md new file mode 100644 index 0000000000..87de9bb2f5 --- /dev/null +++ b/app/sdks/0.7.0/server-go/docs/examples/locale/get-countries-phones.md @@ -0,0 +1,25 @@ +package main + +import ( + "fmt" + "github.com/appwrite/sdk-for-go" +) + +func main() { + var client := appwrite.Client{} + + client.SetProject("5df5acd0d48c2") // Your project ID + client.SetKey("919c2d18fb5d4...a2ae413da83346ad2") // Your secret API key + + var service := appwrite.Locale{ + client: &client + } + + var response, error := service.GetCountriesPhones() + + if error != nil { + panic(error) + } + + fmt.Println(response) +} \ No newline at end of file diff --git a/app/sdks/0.7.0/server-go/docs/examples/locale/get-countries.md b/app/sdks/0.7.0/server-go/docs/examples/locale/get-countries.md new file mode 100644 index 0000000000..58c74f5f73 --- /dev/null +++ b/app/sdks/0.7.0/server-go/docs/examples/locale/get-countries.md @@ -0,0 +1,25 @@ +package main + +import ( + "fmt" + "github.com/appwrite/sdk-for-go" +) + +func main() { + var client := appwrite.Client{} + + client.SetProject("5df5acd0d48c2") // Your project ID + client.SetKey("919c2d18fb5d4...a2ae413da83346ad2") // Your secret API key + + var service := appwrite.Locale{ + client: &client + } + + var response, error := service.GetCountries() + + if error != nil { + panic(error) + } + + fmt.Println(response) +} \ No newline at end of file diff --git a/app/sdks/0.7.0/server-go/docs/examples/locale/get-currencies.md b/app/sdks/0.7.0/server-go/docs/examples/locale/get-currencies.md new file mode 100644 index 0000000000..c736db8336 --- /dev/null +++ b/app/sdks/0.7.0/server-go/docs/examples/locale/get-currencies.md @@ -0,0 +1,25 @@ +package main + +import ( + "fmt" + "github.com/appwrite/sdk-for-go" +) + +func main() { + var client := appwrite.Client{} + + client.SetProject("5df5acd0d48c2") // Your project ID + client.SetKey("919c2d18fb5d4...a2ae413da83346ad2") // Your secret API key + + var service := appwrite.Locale{ + client: &client + } + + var response, error := service.GetCurrencies() + + if error != nil { + panic(error) + } + + fmt.Println(response) +} \ No newline at end of file diff --git a/app/sdks/0.7.0/server-go/docs/examples/locale/get.md b/app/sdks/0.7.0/server-go/docs/examples/locale/get.md new file mode 100644 index 0000000000..3245b79cb5 --- /dev/null +++ b/app/sdks/0.7.0/server-go/docs/examples/locale/get.md @@ -0,0 +1,25 @@ +package main + +import ( + "fmt" + "github.com/appwrite/sdk-for-go" +) + +func main() { + var client := appwrite.Client{} + + client.SetProject("5df5acd0d48c2") // Your project ID + client.SetKey("919c2d18fb5d4...a2ae413da83346ad2") // Your secret API key + + var service := appwrite.Locale{ + client: &client + } + + var response, error := service.Get() + + if error != nil { + panic(error) + } + + fmt.Println(response) +} \ No newline at end of file diff --git a/app/sdks/0.7.0/server-go/docs/examples/storage/create-file.md b/app/sdks/0.7.0/server-go/docs/examples/storage/create-file.md new file mode 100644 index 0000000000..1348acb40b --- /dev/null +++ b/app/sdks/0.7.0/server-go/docs/examples/storage/create-file.md @@ -0,0 +1,25 @@ +package main + +import ( + "fmt" + "github.com/appwrite/sdk-for-go" +) + +func main() { + var client := appwrite.Client{} + + client.SetProject("5df5acd0d48c2") // Your project ID + client.SetKey("919c2d18fb5d4...a2ae413da83346ad2") // Your secret API key + + var service := appwrite.Storage{ + client: &client + } + + var response, error := service.CreateFile(file, [], []) + + if error != nil { + panic(error) + } + + fmt.Println(response) +} \ No newline at end of file diff --git a/app/sdks/0.7.0/server-go/docs/examples/storage/delete-file.md b/app/sdks/0.7.0/server-go/docs/examples/storage/delete-file.md new file mode 100644 index 0000000000..6b00581d75 --- /dev/null +++ b/app/sdks/0.7.0/server-go/docs/examples/storage/delete-file.md @@ -0,0 +1,25 @@ +package main + +import ( + "fmt" + "github.com/appwrite/sdk-for-go" +) + +func main() { + var client := appwrite.Client{} + + client.SetProject("5df5acd0d48c2") // Your project ID + client.SetKey("919c2d18fb5d4...a2ae413da83346ad2") // Your secret API key + + var service := appwrite.Storage{ + client: &client + } + + var response, error := service.DeleteFile("[FILE_ID]") + + if error != nil { + panic(error) + } + + fmt.Println(response) +} \ No newline at end of file diff --git a/app/sdks/0.7.0/server-go/docs/examples/storage/get-file-download.md b/app/sdks/0.7.0/server-go/docs/examples/storage/get-file-download.md new file mode 100644 index 0000000000..6c68b14c3b --- /dev/null +++ b/app/sdks/0.7.0/server-go/docs/examples/storage/get-file-download.md @@ -0,0 +1,25 @@ +package main + +import ( + "fmt" + "github.com/appwrite/sdk-for-go" +) + +func main() { + var client := appwrite.Client{} + + client.SetProject("5df5acd0d48c2") // Your project ID + client.SetKey("919c2d18fb5d4...a2ae413da83346ad2") // Your secret API key + + var service := appwrite.Storage{ + client: &client + } + + var response, error := service.GetFileDownload("[FILE_ID]") + + if error != nil { + panic(error) + } + + fmt.Println(response) +} \ No newline at end of file diff --git a/app/sdks/0.7.0/server-go/docs/examples/storage/get-file-preview.md b/app/sdks/0.7.0/server-go/docs/examples/storage/get-file-preview.md new file mode 100644 index 0000000000..86212c82d3 --- /dev/null +++ b/app/sdks/0.7.0/server-go/docs/examples/storage/get-file-preview.md @@ -0,0 +1,25 @@ +package main + +import ( + "fmt" + "github.com/appwrite/sdk-for-go" +) + +func main() { + var client := appwrite.Client{} + + client.SetProject("5df5acd0d48c2") // Your project ID + client.SetKey("919c2d18fb5d4...a2ae413da83346ad2") // Your secret API key + + var service := appwrite.Storage{ + client: &client + } + + var response, error := service.GetFilePreview("[FILE_ID]", 0, 0, 0, "", "jpg") + + if error != nil { + panic(error) + } + + fmt.Println(response) +} \ No newline at end of file diff --git a/app/sdks/0.7.0/server-go/docs/examples/storage/get-file-view.md b/app/sdks/0.7.0/server-go/docs/examples/storage/get-file-view.md new file mode 100644 index 0000000000..b9ddb637de --- /dev/null +++ b/app/sdks/0.7.0/server-go/docs/examples/storage/get-file-view.md @@ -0,0 +1,25 @@ +package main + +import ( + "fmt" + "github.com/appwrite/sdk-for-go" +) + +func main() { + var client := appwrite.Client{} + + client.SetProject("5df5acd0d48c2") // Your project ID + client.SetKey("919c2d18fb5d4...a2ae413da83346ad2") // Your secret API key + + var service := appwrite.Storage{ + client: &client + } + + var response, error := service.GetFileView("[FILE_ID]", "pdf") + + if error != nil { + panic(error) + } + + fmt.Println(response) +} \ No newline at end of file diff --git a/app/sdks/0.7.0/server-go/docs/examples/storage/get-file.md b/app/sdks/0.7.0/server-go/docs/examples/storage/get-file.md new file mode 100644 index 0000000000..f9aaa6eb81 --- /dev/null +++ b/app/sdks/0.7.0/server-go/docs/examples/storage/get-file.md @@ -0,0 +1,25 @@ +package main + +import ( + "fmt" + "github.com/appwrite/sdk-for-go" +) + +func main() { + var client := appwrite.Client{} + + client.SetProject("5df5acd0d48c2") // Your project ID + client.SetKey("919c2d18fb5d4...a2ae413da83346ad2") // Your secret API key + + var service := appwrite.Storage{ + client: &client + } + + var response, error := service.GetFile("[FILE_ID]") + + if error != nil { + panic(error) + } + + fmt.Println(response) +} \ No newline at end of file diff --git a/app/sdks/0.7.0/server-go/docs/examples/storage/list-files.md b/app/sdks/0.7.0/server-go/docs/examples/storage/list-files.md new file mode 100644 index 0000000000..53e7e37d5c --- /dev/null +++ b/app/sdks/0.7.0/server-go/docs/examples/storage/list-files.md @@ -0,0 +1,25 @@ +package main + +import ( + "fmt" + "github.com/appwrite/sdk-for-go" +) + +func main() { + var client := appwrite.Client{} + + client.SetProject("5df5acd0d48c2") // Your project ID + client.SetKey("919c2d18fb5d4...a2ae413da83346ad2") // Your secret API key + + var service := appwrite.Storage{ + client: &client + } + + var response, error := service.ListFiles("[SEARCH]", 0, 0, "ASC") + + if error != nil { + panic(error) + } + + fmt.Println(response) +} \ No newline at end of file diff --git a/app/sdks/0.7.0/server-go/docs/examples/storage/update-file.md b/app/sdks/0.7.0/server-go/docs/examples/storage/update-file.md new file mode 100644 index 0000000000..1ec409de9f --- /dev/null +++ b/app/sdks/0.7.0/server-go/docs/examples/storage/update-file.md @@ -0,0 +1,25 @@ +package main + +import ( + "fmt" + "github.com/appwrite/sdk-for-go" +) + +func main() { + var client := appwrite.Client{} + + client.SetProject("5df5acd0d48c2") // Your project ID + client.SetKey("919c2d18fb5d4...a2ae413da83346ad2") // Your secret API key + + var service := appwrite.Storage{ + client: &client + } + + var response, error := service.UpdateFile("[FILE_ID]", [], []) + + if error != nil { + panic(error) + } + + fmt.Println(response) +} \ No newline at end of file diff --git a/app/sdks/0.7.0/server-go/docs/examples/teams/create-membership.md b/app/sdks/0.7.0/server-go/docs/examples/teams/create-membership.md new file mode 100644 index 0000000000..a346deaa64 --- /dev/null +++ b/app/sdks/0.7.0/server-go/docs/examples/teams/create-membership.md @@ -0,0 +1,25 @@ +package main + +import ( + "fmt" + "github.com/appwrite/sdk-for-go" +) + +func main() { + var client := appwrite.Client{} + + client.SetProject("5df5acd0d48c2") // Your project ID + client.SetKey("919c2d18fb5d4...a2ae413da83346ad2") // Your secret API key + + var service := appwrite.Teams{ + client: &client + } + + var response, error := service.CreateMembership("[TEAM_ID]", "email@example.com", [], "https://example.com", "[NAME]") + + if error != nil { + panic(error) + } + + fmt.Println(response) +} \ No newline at end of file diff --git a/app/sdks/0.7.0/server-go/docs/examples/teams/create.md b/app/sdks/0.7.0/server-go/docs/examples/teams/create.md new file mode 100644 index 0000000000..8e3a100573 --- /dev/null +++ b/app/sdks/0.7.0/server-go/docs/examples/teams/create.md @@ -0,0 +1,25 @@ +package main + +import ( + "fmt" + "github.com/appwrite/sdk-for-go" +) + +func main() { + var client := appwrite.Client{} + + client.SetProject("5df5acd0d48c2") // Your project ID + client.SetKey("919c2d18fb5d4...a2ae413da83346ad2") // Your secret API key + + var service := appwrite.Teams{ + client: &client + } + + var response, error := service.Create("[NAME]", []) + + if error != nil { + panic(error) + } + + fmt.Println(response) +} \ No newline at end of file diff --git a/app/sdks/0.7.0/server-go/docs/examples/teams/delete-membership.md b/app/sdks/0.7.0/server-go/docs/examples/teams/delete-membership.md new file mode 100644 index 0000000000..809413a3bf --- /dev/null +++ b/app/sdks/0.7.0/server-go/docs/examples/teams/delete-membership.md @@ -0,0 +1,25 @@ +package main + +import ( + "fmt" + "github.com/appwrite/sdk-for-go" +) + +func main() { + var client := appwrite.Client{} + + client.SetProject("5df5acd0d48c2") // Your project ID + client.SetKey("919c2d18fb5d4...a2ae413da83346ad2") // Your secret API key + + var service := appwrite.Teams{ + client: &client + } + + var response, error := service.DeleteMembership("[TEAM_ID]", "[INVITE_ID]") + + if error != nil { + panic(error) + } + + fmt.Println(response) +} \ No newline at end of file diff --git a/app/sdks/0.7.0/server-go/docs/examples/teams/delete.md b/app/sdks/0.7.0/server-go/docs/examples/teams/delete.md new file mode 100644 index 0000000000..5cf65c2f6f --- /dev/null +++ b/app/sdks/0.7.0/server-go/docs/examples/teams/delete.md @@ -0,0 +1,25 @@ +package main + +import ( + "fmt" + "github.com/appwrite/sdk-for-go" +) + +func main() { + var client := appwrite.Client{} + + client.SetProject("5df5acd0d48c2") // Your project ID + client.SetKey("919c2d18fb5d4...a2ae413da83346ad2") // Your secret API key + + var service := appwrite.Teams{ + client: &client + } + + var response, error := service.Delete("[TEAM_ID]") + + if error != nil { + panic(error) + } + + fmt.Println(response) +} \ No newline at end of file diff --git a/app/sdks/0.7.0/server-go/docs/examples/teams/get-memberships.md b/app/sdks/0.7.0/server-go/docs/examples/teams/get-memberships.md new file mode 100644 index 0000000000..b59a8ff33b --- /dev/null +++ b/app/sdks/0.7.0/server-go/docs/examples/teams/get-memberships.md @@ -0,0 +1,25 @@ +package main + +import ( + "fmt" + "github.com/appwrite/sdk-for-go" +) + +func main() { + var client := appwrite.Client{} + + client.SetProject("5df5acd0d48c2") // Your project ID + client.SetKey("919c2d18fb5d4...a2ae413da83346ad2") // Your secret API key + + var service := appwrite.Teams{ + client: &client + } + + var response, error := service.GetMemberships("[TEAM_ID]") + + if error != nil { + panic(error) + } + + fmt.Println(response) +} \ No newline at end of file diff --git a/app/sdks/0.7.0/server-go/docs/examples/teams/get.md b/app/sdks/0.7.0/server-go/docs/examples/teams/get.md new file mode 100644 index 0000000000..2920f547f2 --- /dev/null +++ b/app/sdks/0.7.0/server-go/docs/examples/teams/get.md @@ -0,0 +1,25 @@ +package main + +import ( + "fmt" + "github.com/appwrite/sdk-for-go" +) + +func main() { + var client := appwrite.Client{} + + client.SetProject("5df5acd0d48c2") // Your project ID + client.SetKey("919c2d18fb5d4...a2ae413da83346ad2") // Your secret API key + + var service := appwrite.Teams{ + client: &client + } + + var response, error := service.Get("[TEAM_ID]") + + if error != nil { + panic(error) + } + + fmt.Println(response) +} \ No newline at end of file diff --git a/app/sdks/0.7.0/server-go/docs/examples/teams/list.md b/app/sdks/0.7.0/server-go/docs/examples/teams/list.md new file mode 100644 index 0000000000..5cd9e3e29e --- /dev/null +++ b/app/sdks/0.7.0/server-go/docs/examples/teams/list.md @@ -0,0 +1,25 @@ +package main + +import ( + "fmt" + "github.com/appwrite/sdk-for-go" +) + +func main() { + var client := appwrite.Client{} + + client.SetProject("5df5acd0d48c2") // Your project ID + client.SetKey("919c2d18fb5d4...a2ae413da83346ad2") // Your secret API key + + var service := appwrite.Teams{ + client: &client + } + + var response, error := service.List("[SEARCH]", 0, 0, "ASC") + + if error != nil { + panic(error) + } + + fmt.Println(response) +} \ No newline at end of file diff --git a/app/sdks/0.7.0/server-go/docs/examples/teams/update.md b/app/sdks/0.7.0/server-go/docs/examples/teams/update.md new file mode 100644 index 0000000000..40178c8424 --- /dev/null +++ b/app/sdks/0.7.0/server-go/docs/examples/teams/update.md @@ -0,0 +1,25 @@ +package main + +import ( + "fmt" + "github.com/appwrite/sdk-for-go" +) + +func main() { + var client := appwrite.Client{} + + client.SetProject("5df5acd0d48c2") // Your project ID + client.SetKey("919c2d18fb5d4...a2ae413da83346ad2") // Your secret API key + + var service := appwrite.Teams{ + client: &client + } + + var response, error := service.Update("[TEAM_ID]", "[NAME]") + + if error != nil { + panic(error) + } + + fmt.Println(response) +} \ No newline at end of file diff --git a/app/sdks/0.7.0/server-go/docs/examples/users/create.md b/app/sdks/0.7.0/server-go/docs/examples/users/create.md new file mode 100644 index 0000000000..3a27b00f54 --- /dev/null +++ b/app/sdks/0.7.0/server-go/docs/examples/users/create.md @@ -0,0 +1,25 @@ +package main + +import ( + "fmt" + "github.com/appwrite/sdk-for-go" +) + +func main() { + var client := appwrite.Client{} + + client.SetProject("5df5acd0d48c2") // Your project ID + client.SetKey("919c2d18fb5d4...a2ae413da83346ad2") // Your secret API key + + var service := appwrite.Users{ + client: &client + } + + var response, error := service.Create("email@example.com", "password", "[NAME]") + + if error != nil { + panic(error) + } + + fmt.Println(response) +} \ No newline at end of file diff --git a/app/sdks/0.7.0/server-go/docs/examples/users/delete-session.md b/app/sdks/0.7.0/server-go/docs/examples/users/delete-session.md new file mode 100644 index 0000000000..e1840ba133 --- /dev/null +++ b/app/sdks/0.7.0/server-go/docs/examples/users/delete-session.md @@ -0,0 +1,25 @@ +package main + +import ( + "fmt" + "github.com/appwrite/sdk-for-go" +) + +func main() { + var client := appwrite.Client{} + + client.SetProject("5df5acd0d48c2") // Your project ID + client.SetKey("919c2d18fb5d4...a2ae413da83346ad2") // Your secret API key + + var service := appwrite.Users{ + client: &client + } + + var response, error := service.DeleteSession("[USER_ID]", "[SESSION_ID]") + + if error != nil { + panic(error) + } + + fmt.Println(response) +} \ No newline at end of file diff --git a/app/sdks/0.7.0/server-go/docs/examples/users/delete-sessions.md b/app/sdks/0.7.0/server-go/docs/examples/users/delete-sessions.md new file mode 100644 index 0000000000..682ea0cada --- /dev/null +++ b/app/sdks/0.7.0/server-go/docs/examples/users/delete-sessions.md @@ -0,0 +1,25 @@ +package main + +import ( + "fmt" + "github.com/appwrite/sdk-for-go" +) + +func main() { + var client := appwrite.Client{} + + client.SetProject("5df5acd0d48c2") // Your project ID + client.SetKey("919c2d18fb5d4...a2ae413da83346ad2") // Your secret API key + + var service := appwrite.Users{ + client: &client + } + + var response, error := service.DeleteSessions("[USER_ID]") + + if error != nil { + panic(error) + } + + fmt.Println(response) +} \ No newline at end of file diff --git a/app/sdks/0.7.0/server-go/docs/examples/users/get-logs.md b/app/sdks/0.7.0/server-go/docs/examples/users/get-logs.md new file mode 100644 index 0000000000..6917cc71db --- /dev/null +++ b/app/sdks/0.7.0/server-go/docs/examples/users/get-logs.md @@ -0,0 +1,25 @@ +package main + +import ( + "fmt" + "github.com/appwrite/sdk-for-go" +) + +func main() { + var client := appwrite.Client{} + + client.SetProject("5df5acd0d48c2") // Your project ID + client.SetKey("919c2d18fb5d4...a2ae413da83346ad2") // Your secret API key + + var service := appwrite.Users{ + client: &client + } + + var response, error := service.GetLogs("[USER_ID]") + + if error != nil { + panic(error) + } + + fmt.Println(response) +} \ No newline at end of file diff --git a/app/sdks/0.7.0/server-go/docs/examples/users/get-prefs.md b/app/sdks/0.7.0/server-go/docs/examples/users/get-prefs.md new file mode 100644 index 0000000000..17676eaa36 --- /dev/null +++ b/app/sdks/0.7.0/server-go/docs/examples/users/get-prefs.md @@ -0,0 +1,25 @@ +package main + +import ( + "fmt" + "github.com/appwrite/sdk-for-go" +) + +func main() { + var client := appwrite.Client{} + + client.SetProject("5df5acd0d48c2") // Your project ID + client.SetKey("919c2d18fb5d4...a2ae413da83346ad2") // Your secret API key + + var service := appwrite.Users{ + client: &client + } + + var response, error := service.GetPrefs("[USER_ID]") + + if error != nil { + panic(error) + } + + fmt.Println(response) +} \ No newline at end of file diff --git a/app/sdks/0.7.0/server-go/docs/examples/users/get-sessions.md b/app/sdks/0.7.0/server-go/docs/examples/users/get-sessions.md new file mode 100644 index 0000000000..cc53abfdab --- /dev/null +++ b/app/sdks/0.7.0/server-go/docs/examples/users/get-sessions.md @@ -0,0 +1,25 @@ +package main + +import ( + "fmt" + "github.com/appwrite/sdk-for-go" +) + +func main() { + var client := appwrite.Client{} + + client.SetProject("5df5acd0d48c2") // Your project ID + client.SetKey("919c2d18fb5d4...a2ae413da83346ad2") // Your secret API key + + var service := appwrite.Users{ + client: &client + } + + var response, error := service.GetSessions("[USER_ID]") + + if error != nil { + panic(error) + } + + fmt.Println(response) +} \ No newline at end of file diff --git a/app/sdks/0.7.0/server-go/docs/examples/users/get.md b/app/sdks/0.7.0/server-go/docs/examples/users/get.md new file mode 100644 index 0000000000..8809d1b29b --- /dev/null +++ b/app/sdks/0.7.0/server-go/docs/examples/users/get.md @@ -0,0 +1,25 @@ +package main + +import ( + "fmt" + "github.com/appwrite/sdk-for-go" +) + +func main() { + var client := appwrite.Client{} + + client.SetProject("5df5acd0d48c2") // Your project ID + client.SetKey("919c2d18fb5d4...a2ae413da83346ad2") // Your secret API key + + var service := appwrite.Users{ + client: &client + } + + var response, error := service.Get("[USER_ID]") + + if error != nil { + panic(error) + } + + fmt.Println(response) +} \ No newline at end of file diff --git a/app/sdks/0.7.0/server-go/docs/examples/users/list.md b/app/sdks/0.7.0/server-go/docs/examples/users/list.md new file mode 100644 index 0000000000..ad37e72219 --- /dev/null +++ b/app/sdks/0.7.0/server-go/docs/examples/users/list.md @@ -0,0 +1,25 @@ +package main + +import ( + "fmt" + "github.com/appwrite/sdk-for-go" +) + +func main() { + var client := appwrite.Client{} + + client.SetProject("5df5acd0d48c2") // Your project ID + client.SetKey("919c2d18fb5d4...a2ae413da83346ad2") // Your secret API key + + var service := appwrite.Users{ + client: &client + } + + var response, error := service.List("[SEARCH]", 0, 0, "ASC") + + if error != nil { + panic(error) + } + + fmt.Println(response) +} \ No newline at end of file diff --git a/app/sdks/0.7.0/server-go/docs/examples/users/update-prefs.md b/app/sdks/0.7.0/server-go/docs/examples/users/update-prefs.md new file mode 100644 index 0000000000..9789b90f25 --- /dev/null +++ b/app/sdks/0.7.0/server-go/docs/examples/users/update-prefs.md @@ -0,0 +1,25 @@ +package main + +import ( + "fmt" + "github.com/appwrite/sdk-for-go" +) + +func main() { + var client := appwrite.Client{} + + client.SetProject("5df5acd0d48c2") // Your project ID + client.SetKey("919c2d18fb5d4...a2ae413da83346ad2") // Your secret API key + + var service := appwrite.Users{ + client: &client + } + + var response, error := service.UpdatePrefs("[USER_ID]", ) + + if error != nil { + panic(error) + } + + fmt.Println(response) +} \ No newline at end of file diff --git a/app/sdks/0.7.0/server-go/docs/examples/users/update-status.md b/app/sdks/0.7.0/server-go/docs/examples/users/update-status.md new file mode 100644 index 0000000000..eff2fb5072 --- /dev/null +++ b/app/sdks/0.7.0/server-go/docs/examples/users/update-status.md @@ -0,0 +1,25 @@ +package main + +import ( + "fmt" + "github.com/appwrite/sdk-for-go" +) + +func main() { + var client := appwrite.Client{} + + client.SetProject("5df5acd0d48c2") // Your project ID + client.SetKey("919c2d18fb5d4...a2ae413da83346ad2") // Your secret API key + + var service := appwrite.Users{ + client: &client + } + + var response, error := service.UpdateStatus("[USER_ID]", "1") + + if error != nil { + panic(error) + } + + fmt.Println(response) +} \ No newline at end of file diff --git a/app/sdks/0.7.0/server-go/functions.go b/app/sdks/0.7.0/server-go/functions.go new file mode 100644 index 0000000000..3f82eb1fb2 --- /dev/null +++ b/app/sdks/0.7.0/server-go/functions.go @@ -0,0 +1,186 @@ +package appwrite + +import ( + "strings" +) + +// Functions service +type Functions struct { + client Client +} + +func NewFunctions(clt Client) Functions { + service := Functions{ + client: clt, + } + + return service +} + +// List +func (srv *Functions) List(Search string, Limit int, Offset int, OrderType string) (map[string]interface{}, error) { + path := "/functions" + + params := map[string]interface{}{ + "search": Search, + "limit": Limit, + "offset": Offset, + "orderType": OrderType, + } + + return srv.client.Call("GET", path, nil, params) +} + +// Create +func (srv *Functions) Create(Name string, Vars object, Events []interface{}, Schedule string, Timeout int) (map[string]interface{}, error) { + path := "/functions" + + params := map[string]interface{}{ + "name": Name, + "vars": Vars, + "events": Events, + "schedule": Schedule, + "timeout": Timeout, + } + + return srv.client.Call("POST", path, nil, params) +} + +// Get +func (srv *Functions) Get(FunctionId string) (map[string]interface{}, error) { + r := strings.NewReplacer("{functionId}", FunctionId) + path := r.Replace("/functions/{functionId}") + + params := map[string]interface{}{ + } + + return srv.client.Call("GET", path, nil, params) +} + +// Update +func (srv *Functions) Update(FunctionId string, Name string, Vars object, Events []interface{}, Schedule string, Timeout int) (map[string]interface{}, error) { + r := strings.NewReplacer("{functionId}", FunctionId) + path := r.Replace("/functions/{functionId}") + + params := map[string]interface{}{ + "name": Name, + "vars": Vars, + "events": Events, + "schedule": Schedule, + "timeout": Timeout, + } + + return srv.client.Call("PUT", path, nil, params) +} + +// Delete +func (srv *Functions) Delete(FunctionId string) (map[string]interface{}, error) { + r := strings.NewReplacer("{functionId}", FunctionId) + path := r.Replace("/functions/{functionId}") + + params := map[string]interface{}{ + } + + return srv.client.Call("DELETE", path, nil, params) +} + +// ListExecutions +func (srv *Functions) ListExecutions(FunctionId string, Search string, Limit int, Offset int, OrderType string) (map[string]interface{}, error) { + r := strings.NewReplacer("{functionId}", FunctionId) + path := r.Replace("/functions/{functionId}/executions") + + params := map[string]interface{}{ + "search": Search, + "limit": Limit, + "offset": Offset, + "orderType": OrderType, + } + + return srv.client.Call("GET", path, nil, params) +} + +// CreateExecution +func (srv *Functions) CreateExecution(FunctionId string, Async int) (map[string]interface{}, error) { + r := strings.NewReplacer("{functionId}", FunctionId) + path := r.Replace("/functions/{functionId}/executions") + + params := map[string]interface{}{ + "async": Async, + } + + return srv.client.Call("POST", path, nil, params) +} + +// GetExecution +func (srv *Functions) GetExecution(FunctionId string, ExecutionId string) (map[string]interface{}, error) { + r := strings.NewReplacer("{functionId}", FunctionId, "{executionId}", ExecutionId) + path := r.Replace("/functions/{functionId}/executions/{executionId}") + + params := map[string]interface{}{ + } + + return srv.client.Call("GET", path, nil, params) +} + +// UpdateTag +func (srv *Functions) UpdateTag(FunctionId string, Tag string) (map[string]interface{}, error) { + r := strings.NewReplacer("{functionId}", FunctionId) + path := r.Replace("/functions/{functionId}/tag") + + params := map[string]interface{}{ + "tag": Tag, + } + + return srv.client.Call("PATCH", path, nil, params) +} + +// ListTags +func (srv *Functions) ListTags(FunctionId string, Search string, Limit int, Offset int, OrderType string) (map[string]interface{}, error) { + r := strings.NewReplacer("{functionId}", FunctionId) + path := r.Replace("/functions/{functionId}/tags") + + params := map[string]interface{}{ + "search": Search, + "limit": Limit, + "offset": Offset, + "orderType": OrderType, + } + + return srv.client.Call("GET", path, nil, params) +} + +// CreateTag +func (srv *Functions) CreateTag(FunctionId string, Env string, Command string, Code string) (map[string]interface{}, error) { + r := strings.NewReplacer("{functionId}", FunctionId) + path := r.Replace("/functions/{functionId}/tags") + + params := map[string]interface{}{ + "env": Env, + "command": Command, + "code": Code, + } + + return srv.client.Call("POST", path, nil, params) +} + +// GetTag +func (srv *Functions) GetTag(FunctionId string, TagId string) (map[string]interface{}, error) { + r := strings.NewReplacer("{functionId}", FunctionId, "{tagId}", TagId) + path := r.Replace("/functions/{functionId}/tags/{tagId}") + + params := map[string]interface{}{ + } + + return srv.client.Call("GET", path, nil, params) +} + +// DeleteTag +func (srv *Functions) DeleteTag(FunctionId string, TagId string) (map[string]interface{}, error) { + r := strings.NewReplacer("{functionId}", FunctionId, "{tagId}", TagId) + path := r.Replace("/functions/{functionId}/tags/{tagId}") + + params := map[string]interface{}{ + } + + return srv.client.Call("DELETE", path, nil, params) +} diff --git a/app/sdks/0.7.0/server-go/health.go b/app/sdks/0.7.0/server-go/health.go new file mode 100644 index 0000000000..d3b6b3a926 --- /dev/null +++ b/app/sdks/0.7.0/server-go/health.go @@ -0,0 +1,153 @@ +package appwrite + +import ( +) + +// Health service +type Health struct { + client Client +} + +func NewHealth(clt Client) Health { + service := Health{ + client: clt, + } + + return service +} + +// Get check the Appwrite HTTP server is up and responsive. +func (srv *Health) Get() (map[string]interface{}, error) { + path := "/health" + + params := map[string]interface{}{ + } + + return srv.client.Call("GET", path, nil, params) +} + +// GetAntiVirus check the Appwrite Anti Virus server is up and connection is +// successful. +func (srv *Health) GetAntiVirus() (map[string]interface{}, error) { + path := "/health/anti-virus" + + params := map[string]interface{}{ + } + + return srv.client.Call("GET", path, nil, params) +} + +// GetCache check the Appwrite in-memory cache server is up and connection is +// successful. +func (srv *Health) GetCache() (map[string]interface{}, error) { + path := "/health/cache" + + params := map[string]interface{}{ + } + + return srv.client.Call("GET", path, nil, params) +} + +// GetDB check the Appwrite database server is up and connection is +// successful. +func (srv *Health) GetDB() (map[string]interface{}, error) { + path := "/health/db" + + params := map[string]interface{}{ + } + + return srv.client.Call("GET", path, nil, params) +} + +// GetQueueCertificates get the number of certificates that are waiting to be +// issued against [Letsencrypt](https://letsencrypt.org/) in the Appwrite +// internal queue server. +func (srv *Health) GetQueueCertificates() (map[string]interface{}, error) { + path := "/health/queue/certificates" + + params := map[string]interface{}{ + } + + return srv.client.Call("GET", path, nil, params) +} + +// GetQueueFunctions +func (srv *Health) GetQueueFunctions() (map[string]interface{}, error) { + path := "/health/queue/functions" + + params := map[string]interface{}{ + } + + return srv.client.Call("GET", path, nil, params) +} + +// GetQueueLogs get the number of logs that are waiting to be processed in the +// Appwrite internal queue server. +func (srv *Health) GetQueueLogs() (map[string]interface{}, error) { + path := "/health/queue/logs" + + params := map[string]interface{}{ + } + + return srv.client.Call("GET", path, nil, params) +} + +// GetQueueTasks get the number of tasks that are waiting to be processed in +// the Appwrite internal queue server. +func (srv *Health) GetQueueTasks() (map[string]interface{}, error) { + path := "/health/queue/tasks" + + params := map[string]interface{}{ + } + + return srv.client.Call("GET", path, nil, params) +} + +// GetQueueUsage get the number of usage stats that are waiting to be +// processed in the Appwrite internal queue server. +func (srv *Health) GetQueueUsage() (map[string]interface{}, error) { + path := "/health/queue/usage" + + params := map[string]interface{}{ + } + + return srv.client.Call("GET", path, nil, params) +} + +// GetQueueWebhooks get the number of webhooks that are waiting to be +// processed in the Appwrite internal queue server. +func (srv *Health) GetQueueWebhooks() (map[string]interface{}, error) { + path := "/health/queue/webhooks" + + params := map[string]interface{}{ + } + + return srv.client.Call("GET", path, nil, params) +} + +// GetStorageLocal check the Appwrite local storage device is up and +// connection is successful. +func (srv *Health) GetStorageLocal() (map[string]interface{}, error) { + path := "/health/storage/local" + + params := map[string]interface{}{ + } + + return srv.client.Call("GET", path, nil, params) +} + +// GetTime check the Appwrite server time is synced with Google remote NTP +// server. We use this technology to smoothly handle leap seconds with no +// disruptive events. The [Network Time +// Protocol](https://en.wikipedia.org/wiki/Network_Time_Protocol) (NTP) is +// used by hundreds of millions of computers and devices to synchronize their +// clocks over the Internet. If your computer sets its own clock, it likely +// uses NTP. +func (srv *Health) GetTime() (map[string]interface{}, error) { + path := "/health/time" + + params := map[string]interface{}{ + } + + return srv.client.Call("GET", path, nil, params) +} diff --git a/app/sdks/0.7.0/server-go/locale.go b/app/sdks/0.7.0/server-go/locale.go new file mode 100644 index 0000000000..ecadd889cb --- /dev/null +++ b/app/sdks/0.7.0/server-go/locale.go @@ -0,0 +1,88 @@ +package appwrite + +import ( +) + +// Locale service +type Locale struct { + client Client +} + +func NewLocale(clt Client) Locale { + service := Locale{ + client: clt, + } + + return service +} + +// Get get the current user location based on IP. Returns an object with user +// country code, country name, continent name, continent code, ip address and +// suggested currency. You can use the locale header to get the data in a +// supported language. +// +// ([IP Geolocation by DB-IP](https://db-ip.com)) +func (srv *Locale) Get() (map[string]interface{}, error) { + path := "/locale" + + params := map[string]interface{}{ + } + + return srv.client.Call("GET", path, nil, params) +} + +// GetContinents list of all continents. You can use the locale header to get +// the data in a supported language. +func (srv *Locale) GetContinents() (map[string]interface{}, error) { + path := "/locale/continents" + + params := map[string]interface{}{ + } + + return srv.client.Call("GET", path, nil, params) +} + +// GetCountries list of all countries. You can use the locale header to get +// the data in a supported language. +func (srv *Locale) GetCountries() (map[string]interface{}, error) { + path := "/locale/countries" + + params := map[string]interface{}{ + } + + return srv.client.Call("GET", path, nil, params) +} + +// GetCountriesEU list of all countries that are currently members of the EU. +// You can use the locale header to get the data in a supported language. +func (srv *Locale) GetCountriesEU() (map[string]interface{}, error) { + path := "/locale/countries/eu" + + params := map[string]interface{}{ + } + + return srv.client.Call("GET", path, nil, params) +} + +// GetCountriesPhones list of all countries phone codes. You can use the +// locale header to get the data in a supported language. +func (srv *Locale) GetCountriesPhones() (map[string]interface{}, error) { + path := "/locale/countries/phones" + + params := map[string]interface{}{ + } + + return srv.client.Call("GET", path, nil, params) +} + +// GetCurrencies list of all currencies, including currency symol, name, +// plural, and decimal digits for all major and minor currencies. You can use +// the locale header to get the data in a supported language. +func (srv *Locale) GetCurrencies() (map[string]interface{}, error) { + path := "/locale/currencies" + + params := map[string]interface{}{ + } + + return srv.client.Call("GET", path, nil, params) +} diff --git a/app/sdks/0.7.0/server-go/main.go b/app/sdks/0.7.0/server-go/main.go new file mode 100644 index 0000000000..13df7fc1b5 --- /dev/null +++ b/app/sdks/0.7.0/server-go/main.go @@ -0,0 +1,6 @@ +package appwrite + +// NewClient initializes a new Appwrite client +func NewClient() Client { + return Client{} +} diff --git a/app/sdks/0.7.0/server-go/storage.go b/app/sdks/0.7.0/server-go/storage.go new file mode 100644 index 0000000000..7ede9c3255 --- /dev/null +++ b/app/sdks/0.7.0/server-go/storage.go @@ -0,0 +1,134 @@ +package appwrite + +import ( + "strings" +) + +// Storage service +type Storage struct { + client Client +} + +func NewStorage(clt Client) Storage { + service := Storage{ + client: clt, + } + + return service +} + +// ListFiles get a list of all the user files. You can use the query params to +// filter your results. On admin mode, this endpoint will return a list of all +// of the project files. [Learn more about different API modes](/docs/admin). +func (srv *Storage) ListFiles(Search string, Limit int, Offset int, OrderType string) (map[string]interface{}, error) { + path := "/storage/files" + + params := map[string]interface{}{ + "search": Search, + "limit": Limit, + "offset": Offset, + "orderType": OrderType, + } + + return srv.client.Call("GET", path, nil, params) +} + +// CreateFile create a new file. The user who creates the file will +// automatically be assigned to read and write access unless he has passed +// custom values for read and write arguments. +func (srv *Storage) CreateFile(File string, Read []interface{}, Write []interface{}) (map[string]interface{}, error) { + path := "/storage/files" + + params := map[string]interface{}{ + "file": File, + "read": Read, + "write": Write, + } + + return srv.client.Call("POST", path, nil, params) +} + +// GetFile get file by its unique ID. This endpoint response returns a JSON +// object with the file metadata. +func (srv *Storage) GetFile(FileId string) (map[string]interface{}, error) { + r := strings.NewReplacer("{fileId}", FileId) + path := r.Replace("/storage/files/{fileId}") + + params := map[string]interface{}{ + } + + return srv.client.Call("GET", path, nil, params) +} + +// UpdateFile update file by its unique ID. Only users with write permissions +// have access to update this resource. +func (srv *Storage) UpdateFile(FileId string, Read []interface{}, Write []interface{}) (map[string]interface{}, error) { + r := strings.NewReplacer("{fileId}", FileId) + path := r.Replace("/storage/files/{fileId}") + + params := map[string]interface{}{ + "read": Read, + "write": Write, + } + + return srv.client.Call("PUT", path, nil, params) +} + +// DeleteFile delete a file by its unique ID. Only users with write +// permissions have access to delete this resource. +func (srv *Storage) DeleteFile(FileId string) (map[string]interface{}, error) { + r := strings.NewReplacer("{fileId}", FileId) + path := r.Replace("/storage/files/{fileId}") + + params := map[string]interface{}{ + } + + return srv.client.Call("DELETE", path, nil, params) +} + +// GetFileDownload get file content by its unique ID. The endpoint response +// return with a 'Content-Disposition: attachment' header that tells the +// browser to start downloading the file to user downloads directory. +func (srv *Storage) GetFileDownload(FileId string) (map[string]interface{}, error) { + r := strings.NewReplacer("{fileId}", FileId) + path := r.Replace("/storage/files/{fileId}/download") + + params := map[string]interface{}{ + } + + return srv.client.Call("GET", path, nil, params) +} + +// GetFilePreview get a file preview image. Currently, this method supports +// preview for image files (jpg, png, and gif), other supported formats, like +// pdf, docs, slides, and spreadsheets, will return the file icon image. You +// can also pass query string arguments for cutting and resizing your preview +// image. +func (srv *Storage) GetFilePreview(FileId string, Width int, Height int, Quality int, Background string, Output string) (map[string]interface{}, error) { + r := strings.NewReplacer("{fileId}", FileId) + path := r.Replace("/storage/files/{fileId}/preview") + + params := map[string]interface{}{ + "width": Width, + "height": Height, + "quality": Quality, + "background": Background, + "output": Output, + } + + return srv.client.Call("GET", path, nil, params) +} + +// GetFileView get file content by its unique ID. This endpoint is similar to +// the download method but returns with no 'Content-Disposition: attachment' +// header. +func (srv *Storage) GetFileView(FileId string, As string) (map[string]interface{}, error) { + r := strings.NewReplacer("{fileId}", FileId) + path := r.Replace("/storage/files/{fileId}/view") + + params := map[string]interface{}{ + "as": As, + } + + return srv.client.Call("GET", path, nil, params) +} diff --git a/app/sdks/0.7.0/server-go/teams.go b/app/sdks/0.7.0/server-go/teams.go new file mode 100644 index 0000000000..14b89e0dda --- /dev/null +++ b/app/sdks/0.7.0/server-go/teams.go @@ -0,0 +1,140 @@ +package appwrite + +import ( + "strings" +) + +// Teams service +type Teams struct { + client Client +} + +func NewTeams(clt Client) Teams { + service := Teams{ + client: clt, + } + + return service +} + +// List get a list of all the current user teams. You can use the query params +// to filter your results. On admin mode, this endpoint will return a list of +// all of the project teams. [Learn more about different API +// modes](/docs/admin). +func (srv *Teams) List(Search string, Limit int, Offset int, OrderType string) (map[string]interface{}, error) { + path := "/teams" + + params := map[string]interface{}{ + "search": Search, + "limit": Limit, + "offset": Offset, + "orderType": OrderType, + } + + return srv.client.Call("GET", path, nil, params) +} + +// Create create a new team. The user who creates the team will automatically +// be assigned as the owner of the team. The team owner can invite new +// members, who will be able add new owners and update or delete the team from +// your project. +func (srv *Teams) Create(Name string, Roles []interface{}) (map[string]interface{}, error) { + path := "/teams" + + params := map[string]interface{}{ + "name": Name, + "roles": Roles, + } + + return srv.client.Call("POST", path, nil, params) +} + +// Get get team by its unique ID. All team members have read access for this +// resource. +func (srv *Teams) Get(TeamId string) (map[string]interface{}, error) { + r := strings.NewReplacer("{teamId}", TeamId) + path := r.Replace("/teams/{teamId}") + + params := map[string]interface{}{ + } + + return srv.client.Call("GET", path, nil, params) +} + +// Update update team by its unique ID. Only team owners have write access for +// this resource. +func (srv *Teams) Update(TeamId string, Name string) (map[string]interface{}, error) { + r := strings.NewReplacer("{teamId}", TeamId) + path := r.Replace("/teams/{teamId}") + + params := map[string]interface{}{ + "name": Name, + } + + return srv.client.Call("PUT", path, nil, params) +} + +// Delete delete team by its unique ID. Only team owners have write access for +// this resource. +func (srv *Teams) Delete(TeamId string) (map[string]interface{}, error) { + r := strings.NewReplacer("{teamId}", TeamId) + path := r.Replace("/teams/{teamId}") + + params := map[string]interface{}{ + } + + return srv.client.Call("DELETE", path, nil, params) +} + +// GetMemberships get team members by the team unique ID. All team members +// have read access for this list of resources. +func (srv *Teams) GetMemberships(TeamId string) (map[string]interface{}, error) { + r := strings.NewReplacer("{teamId}", TeamId) + path := r.Replace("/teams/{teamId}/memberships") + + params := map[string]interface{}{ + } + + return srv.client.Call("GET", path, nil, params) +} + +// CreateMembership use this endpoint to invite a new member to join your +// team. An email with a link to join the team will be sent to the new member +// email address if the member doesn't exist in the project it will be created +// automatically. +// +// Use the 'URL' parameter to redirect the user from the invitation email back +// to your app. When the user is redirected, use the [Update Team Membership +// Status](/docs/teams#updateMembershipStatus) endpoint to allow the user to +// accept the invitation to the team. +// +// Please note that in order to avoid a [Redirect +// Attacks](https://github.com/OWASP/CheatSheetSeries/blob/master/cheatsheets/Unvalidated_Redirects_and_Forwards_Cheat_Sheet.md) +// the only valid redirect URL's are the once from domains you have set when +// added your platforms in the console interface. +func (srv *Teams) CreateMembership(TeamId string, Email string, Roles []interface{}, Url string, Name string) (map[string]interface{}, error) { + r := strings.NewReplacer("{teamId}", TeamId) + path := r.Replace("/teams/{teamId}/memberships") + + params := map[string]interface{}{ + "email": Email, + "name": Name, + "roles": Roles, + "url": Url, + } + + return srv.client.Call("POST", path, nil, params) +} + +// DeleteMembership this endpoint allows a user to leave a team or for a team +// owner to delete the membership of any other team member. You can also use +// this endpoint to delete a user membership even if he didn't accept it. +func (srv *Teams) DeleteMembership(TeamId string, InviteId string) (map[string]interface{}, error) { + r := strings.NewReplacer("{teamId}", TeamId, "{inviteId}", InviteId) + path := r.Replace("/teams/{teamId}/memberships/{inviteId}") + + params := map[string]interface{}{ + } + + return srv.client.Call("DELETE", path, nil, params) +} diff --git a/app/sdks/0.7.0/server-go/users.go b/app/sdks/0.7.0/server-go/users.go new file mode 100644 index 0000000000..405b5a3209 --- /dev/null +++ b/app/sdks/0.7.0/server-go/users.go @@ -0,0 +1,137 @@ +package appwrite + +import ( + "strings" +) + +// Users service +type Users struct { + client Client +} + +func NewUsers(clt Client) Users { + service := Users{ + client: clt, + } + + return service +} + +// List get a list of all the project users. You can use the query params to +// filter your results. +func (srv *Users) List(Search string, Limit int, Offset int, OrderType string) (map[string]interface{}, error) { + path := "/users" + + params := map[string]interface{}{ + "search": Search, + "limit": Limit, + "offset": Offset, + "orderType": OrderType, + } + + return srv.client.Call("GET", path, nil, params) +} + +// Create create a new user. +func (srv *Users) Create(Email string, Password string, Name string) (map[string]interface{}, error) { + path := "/users" + + params := map[string]interface{}{ + "email": Email, + "password": Password, + "name": Name, + } + + return srv.client.Call("POST", path, nil, params) +} + +// Get get user by its unique ID. +func (srv *Users) Get(UserId string) (map[string]interface{}, error) { + r := strings.NewReplacer("{userId}", UserId) + path := r.Replace("/users/{userId}") + + params := map[string]interface{}{ + } + + return srv.client.Call("GET", path, nil, params) +} + +// GetLogs get user activity logs list by its unique ID. +func (srv *Users) GetLogs(UserId string) (map[string]interface{}, error) { + r := strings.NewReplacer("{userId}", UserId) + path := r.Replace("/users/{userId}/logs") + + params := map[string]interface{}{ + } + + return srv.client.Call("GET", path, nil, params) +} + +// GetPrefs get user preferences by its unique ID. +func (srv *Users) GetPrefs(UserId string) (map[string]interface{}, error) { + r := strings.NewReplacer("{userId}", UserId) + path := r.Replace("/users/{userId}/prefs") + + params := map[string]interface{}{ + } + + return srv.client.Call("GET", path, nil, params) +} + +// UpdatePrefs update user preferences by its unique ID. You can pass only the +// specific settings you wish to update. +func (srv *Users) UpdatePrefs(UserId string, Prefs object) (map[string]interface{}, error) { + r := strings.NewReplacer("{userId}", UserId) + path := r.Replace("/users/{userId}/prefs") + + params := map[string]interface{}{ + "prefs": Prefs, + } + + return srv.client.Call("PATCH", path, nil, params) +} + +// GetSessions get user sessions list by its unique ID. +func (srv *Users) GetSessions(UserId string) (map[string]interface{}, error) { + r := strings.NewReplacer("{userId}", UserId) + path := r.Replace("/users/{userId}/sessions") + + params := map[string]interface{}{ + } + + return srv.client.Call("GET", path, nil, params) +} + +// DeleteSessions delete all user sessions by its unique ID. +func (srv *Users) DeleteSessions(UserId string) (map[string]interface{}, error) { + r := strings.NewReplacer("{userId}", UserId) + path := r.Replace("/users/{userId}/sessions") + + params := map[string]interface{}{ + } + + return srv.client.Call("DELETE", path, nil, params) +} + +// DeleteSession delete user sessions by its unique ID. +func (srv *Users) DeleteSession(UserId string, SessionId string) (map[string]interface{}, error) { + r := strings.NewReplacer("{userId}", UserId, "{sessionId}", SessionId) + path := r.Replace("/users/{userId}/sessions/{sessionId}") + + params := map[string]interface{}{ + } + + return srv.client.Call("DELETE", path, nil, params) +} + +// UpdateStatus update user status by its unique ID. +func (srv *Users) UpdateStatus(UserId string, Status string) (map[string]interface{}, error) { + r := strings.NewReplacer("{userId}", UserId) + path := r.Replace("/users/{userId}/status") + + params := map[string]interface{}{ + "status": Status, + } + + return srv.client.Call("PATCH", path, nil, params) +} diff --git a/app/sdks/0.7.0/server-go/utils.go b/app/sdks/0.7.0/server-go/utils.go new file mode 100644 index 0000000000..ca36149cf1 --- /dev/null +++ b/app/sdks/0.7.0/server-go/utils.go @@ -0,0 +1,36 @@ +package appwrite + +import ( + "fmt" + "reflect" + "strconv" +) + +// ToString changes arg to string +func ToString(arg interface{}) string { + var tmp = reflect.Indirect(reflect.ValueOf(arg)).Interface() + switch v := tmp.(type) { + case int: + return strconv.Itoa(v) + case int8: + return strconv.FormatInt(int64(v), 10) + case int16: + return strconv.FormatInt(int64(v), 10) + case int32: + return strconv.FormatInt(int64(v), 10) + case int64: + return strconv.FormatInt(v, 10) + case string: + return v + case float32: + return strconv.FormatFloat(float64(v), 'f', -1, 32) + case float64: + return strconv.FormatFloat(v, 'f', -1, 64) + case fmt.Stringer: + return v.String() + case reflect.Value: + return ToString(v.Interface()) + default: + return "" + } +} diff --git a/app/sdks/0.7.0/server-java/CHANGELOG.md b/app/sdks/0.7.0/server-java/CHANGELOG.md new file mode 100644 index 0000000000..fa4d35e687 --- /dev/null +++ b/app/sdks/0.7.0/server-java/CHANGELOG.md @@ -0,0 +1 @@ +# Change Log \ No newline at end of file diff --git a/app/sdks/0.7.0/server-java/LICENSE b/app/sdks/0.7.0/server-java/LICENSE new file mode 100644 index 0000000000..fc7c051a91 --- /dev/null +++ b/app/sdks/0.7.0/server-java/LICENSE @@ -0,0 +1,12 @@ +Copyright (c) 2019 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: + + 1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. + + 2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. + + 3. Neither the name Appwrite nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. \ No newline at end of file diff --git a/app/sdks/0.7.0/server-java/README.md b/app/sdks/0.7.0/server-java/README.md new file mode 100644 index 0000000000..05e7d85945 --- /dev/null +++ b/app/sdks/0.7.0/server-java/README.md @@ -0,0 +1,43 @@ +# Appwrite SDK for Java + +![License](https://img.shields.io/github/license/appwrite/sdk-for-java.svg?v=1) +![Version](https://img.shields.io/badge/api%20version-0.6.0-blue.svg?v=1) + +**This SDK is compatible with Appwrite server version 0.6.0. For older versions, please check previous releases.** + +Appwrite is an open-source backend as a service server that abstract and simplify complex and repetitive development tasks behind a very simple to use REST API. Appwrite aims to help you develop your apps faster and in a more secure way. + Use the Java SDK to integrate your app with the Appwrite server to easily start interacting with all of Appwrite backend APIs and tools. + For full API documentation and tutorials go to [https://appwrite.io/docs](https://appwrite.io/docs) + + + +![Appwrite](https://appwrite.io/images/github.png) + +## Installation + +### Maven +Add this to your project's `pom.xml` file: + +```xml + + + com.squareup.okhttp3 + appwrite + 0.0.1 + + +``` + +You can install packages from the command line: + +```bash +mvn install appwrite +``` + +## Contribution + +This library is auto-generated by Appwrite custom [SDK Generator](https://github.com/appwrite/sdk-generator). To learn more about how you can help us improve this SDK, please check the [contribution guide](https://github.com/appwrite/sdk-generator/blob/master/CONTRIBUTING.md) before sending a pull-request. + +## License + +Please see the [BSD-3-Clause license](https://raw.githubusercontent.com/appwrite/appwrite/master/LICENSE) file for more information. \ No newline at end of file diff --git a/app/sdks/0.7.0/server-java/pom.xml b/app/sdks/0.7.0/server-java/pom.xml new file mode 100644 index 0000000000..6d3098a6ea --- /dev/null +++ b/app/sdks/0.7.0/server-java/pom.xml @@ -0,0 +1,57 @@ + + + 4.0.0 + + + appwrite + 0.0.1 + + Appwrite is an open-source self-hosted backend server that abstract and simplify complex and repetitive development tasks behind a very simple REST API + https://appwrite.io + + + 1.9 + 1.9 + + + + + com.squareup.okhttp3 + okhttp + 4.5.0 + + + com.google.code.gson + gson + 2.8.2 + + + + org.junit.jupiter + junit-jupiter-api + 5.6.2 + test + + + org.junit.jupiter + junit-jupiter-engine + 5.6.2 + test + + + + + + + maven-surefire-plugin + 2.22.2 + + + maven-failsafe-plugin + 2.22.2 + + + + \ No newline at end of file diff --git a/app/sdks/0.7.0/server-java/src/main/java/Client.java b/app/sdks/0.7.0/server-java/src/main/java/Client.java new file mode 100644 index 0000000000..51c52aebb5 --- /dev/null +++ b/app/sdks/0.7.0/server-java/src/main/java/Client.java @@ -0,0 +1,143 @@ +package ; + +import com.google.gson.Gson; +import okhttp3.Call; +import okhttp3.CookieJar; +import okhttp3.Headers; +import okhttp3.HttpUrl; +import okhttp3.FormBody; +import okhttp3.MediaType; +import okhttp3.OkHttpClient; +import okhttp3.Request; +import okhttp3.RequestBody; + +import java.util.List; +import java.util.HashMap; +import java.util.Map; + +import static java.util.Map.entry; + +public class Client { + private final OkHttpClient http; + private final Map headers; + private final Map config; + private String endPoint; + private boolean selfSigned; + private CookieJar cookieJar = CookieJar.NO_COOKIES; + + public Client() { + this("https://appwrite.io/v1", false, new OkHttpClient()); + } + + public Client(String endPoint, boolean selfSigned, OkHttpClient http) { + this.endPoint = endPoint; + this.selfSigned = selfSigned; + this.headers = new HashMap<>(Map.ofEntries( + entry("content-type", "application/json"), + entry("x-sdk-version", "appwrite:java:0.0.1") + )); + this.config = new HashMap<>(); + this.http = http.newBuilder() + .cookieJar(cookieJar) + .build(); + } + + public String getEndPoint(){ + return endPoint; + } + + public Map getConfig(){ + return config; + } + +// private Future getCookiePath() { +// final directory = getApplicationDocumentsDirectory(); +// final path = directory.path; +// final Directory dir = new Directory("$path/cookies"); +// dir.create(); +// return dir; +// } + + /// Your project ID + public Client setProject(String value) { + config.put("project", value); + addHeader("X-Appwrite-Project", value); + return this; + } + + /// Your secret API key + public Client setKey(String value) { + config.put("key", value); + addHeader("X-Appwrite-Key", value); + return this; + } + + public Client setLocale(String value) { + config.put("locale", value); + addHeader("X-Appwrite-Locale", value); + return this; + } + + public Client setSelfSigned(boolean status) { + selfSigned = status; + return this; + } + + public Client setEndpoint(String endPoint) { + this.endPoint = endPoint; + return this; + } + + public Client addHeader(String key, String value) { + headers.put(key, value); + return this; + } + + public Call call(String method, String path, Map headers, Map params) { + if(selfSigned) { + // Allow self signed requests + + } + + Headers requestHeaders = Headers.of(this.headers).newBuilder() + .addAll(Headers.of(headers)) + .build(); + + HttpUrl.Builder httpBuilder = HttpUrl.get(endPoint + path).newBuilder(); + if("GET".equals(method)) { + params.forEach((k, v) -> { + if(v instanceof List){ + httpBuilder.addQueryParameter(k+"[]", v.toString()); + }else{ + httpBuilder.addQueryParameter(k, v.toString()); + } + }); + Request request = new Request.Builder() + .url(httpBuilder.build()) + .headers(requestHeaders) + .get() + .build(); + + return http.newCall(request); + } + + RequestBody body; + if("multipart/form-data".equals(headers.get("content-type"))) { + FormBody.Builder builder = new FormBody.Builder(); + params.forEach((k, v) -> builder.add(k, v.toString())); + body = builder.build(); + } else { + Gson gson = new Gson(); + String json = gson.toJson(params); + body = RequestBody.create(json, MediaType.get("application/json")); + } + + Request request = new Request.Builder() + .url(httpBuilder.build()) + .headers(requestHeaders) + .method(method, body) + .build(); + + return http.newCall(request); + } +} \ No newline at end of file diff --git a/app/sdks/0.7.0/server-java/src/main/java/enums/OrderType.java b/app/sdks/0.7.0/server-java/src/main/java/enums/OrderType.java new file mode 100644 index 0000000000..d4a73a3886 --- /dev/null +++ b/app/sdks/0.7.0/server-java/src/main/java/enums/OrderType.java @@ -0,0 +1,6 @@ +package .enums; + +public enum OrderType { + ASC, DESC +} + diff --git a/app/sdks/0.7.0/server-java/src/main/java/services/Avatars.java b/app/sdks/0.7.0/server-java/src/main/java/services/Avatars.java new file mode 100644 index 0000000000..3c0bb4e6c8 --- /dev/null +++ b/app/sdks/0.7.0/server-java/src/main/java/services/Avatars.java @@ -0,0 +1,164 @@ +package .services; + + + +import okhttp3.Call; +import .Client; +import .enums.OrderType; + +import java.io.File; +import java.util.List; +import java.util.HashMap; +import java.util.Map; + +import static java.util.Map.entry; + +public class Avatars extends Service { + public Avatars(Client client){ + super(client); + } + + /// Get Browser Icon + /* + * You can use this endpoint to show different browser icons to your users. + * The code argument receives the browser code as it appears in your user + * /account/sessions endpoint. Use width, height and quality arguments to + * change the output settings. + */ + public Call getBrowser(String code, int width, int height, int quality) { + final String path = "/avatars/browsers/{code}".replace("{code}", code); + + final Map params = Map.ofEntries( + entry("width", width), + entry("height", height), + entry("quality", quality) + ); + + + + final Map headers = Map.ofEntries( + entry("content-type", "application/json") + ); + + return client.call("GET", path, headers, params); + } + + /// Get Credit Card Icon + /* + * Need to display your users with your billing method or their payment + * methods? The credit card endpoint will return you the icon of the credit + * card provider you need. Use width, height and quality arguments to change + * the output settings. + */ + public Call getCreditCard(String code, int width, int height, int quality) { + final String path = "/avatars/credit-cards/{code}".replace("{code}", code); + + final Map params = Map.ofEntries( + entry("width", width), + entry("height", height), + entry("quality", quality) + ); + + + + final Map headers = Map.ofEntries( + entry("content-type", "application/json") + ); + + return client.call("GET", path, headers, params); + } + + /// Get Favicon + /* + * Use this endpoint to fetch the favorite icon (AKA favicon) of a any remote + * website URL. + */ + public Call getFavicon(String url) { + final String path = "/avatars/favicon"; + + final Map params = Map.ofEntries( + entry("url", url) + ); + + + + final Map headers = Map.ofEntries( + entry("content-type", "application/json") + ); + + return client.call("GET", path, headers, params); + } + + /// Get Country Flag + /* + * You can use this endpoint to show different country flags icons to your + * users. The code argument receives the 2 letter country code. Use width, + * height and quality arguments to change the output settings. + */ + public Call getFlag(String code, int width, int height, int quality) { + final String path = "/avatars/flags/{code}".replace("{code}", code); + + final Map params = Map.ofEntries( + entry("width", width), + entry("height", height), + entry("quality", quality) + ); + + + + final Map headers = Map.ofEntries( + entry("content-type", "application/json") + ); + + return client.call("GET", path, headers, params); + } + + /// Get Image from URL + /* + * Use this endpoint to fetch a remote image URL and crop it to any image size + * you want. This endpoint is very useful if you need to crop and display + * remote images in your app or in case you want to make sure a 3rd party + * image is properly served using a TLS protocol. + */ + public Call getImage(String url, int width, int height) { + final String path = "/avatars/image"; + + final Map params = Map.ofEntries( + entry("url", url), + entry("width", width), + entry("height", height) + ); + + + + final Map headers = Map.ofEntries( + entry("content-type", "application/json") + ); + + return client.call("GET", path, headers, params); + } + + /// Get QR Code + /* + * Converts a given plain text to a QR code image. You can use the query + * parameters to change the size and style of the resulting image. + */ + public Call getQR(String text, int size, int margin, int download) { + final String path = "/avatars/qr"; + + final Map params = Map.ofEntries( + entry("text", text), + entry("size", size), + entry("margin", margin), + entry("download", download) + ); + + + + final Map headers = Map.ofEntries( + entry("content-type", "application/json") + ); + + return client.call("GET", path, headers, params); + } +} \ No newline at end of file diff --git a/app/sdks/0.7.0/server-java/src/main/java/services/Database.java b/app/sdks/0.7.0/server-java/src/main/java/services/Database.java new file mode 100644 index 0000000000..84161de9fc --- /dev/null +++ b/app/sdks/0.7.0/server-java/src/main/java/services/Database.java @@ -0,0 +1,264 @@ +package .services; + + + +import okhttp3.Call; +import .Client; +import .enums.OrderType; + +import java.io.File; +import java.util.List; +import java.util.HashMap; +import java.util.Map; + +import static java.util.Map.entry; + +public class Database extends Service { + public Database(Client client){ + super(client); + } + + /// List Collections + /* + * Get a list of all the user collections. You can use the query params to + * filter your results. On admin mode, this endpoint will return a list of all + * of the project collections. [Learn more about different API + * modes](/docs/admin). + */ + public Call listCollections(String search, int limit, int offset, OrderType orderType) { + final String path = "/database/collections"; + + final Map params = Map.ofEntries( + entry("search", search), + entry("limit", limit), + entry("offset", offset), + entry("orderType", orderType.name()) + ); + + + + final Map headers = Map.ofEntries( + entry("content-type", "application/json") + ); + + return client.call("GET", path, headers, params); + } + + /// Create Collection + /* + * Create a new Collection. + */ + public Call createCollection(String name, List read, List write, List rules) { + final String path = "/database/collections"; + + final Map params = Map.ofEntries( + entry("name", name), + entry("read", read), + entry("write", write), + entry("rules", rules) + ); + + + + final Map headers = Map.ofEntries( + entry("content-type", "application/json") + ); + + return client.call("POST", path, headers, params); + } + + /// Get Collection + /* + * Get collection by its unique ID. This endpoint response returns a JSON + * object with the collection metadata. + */ + public Call getCollection(String collectionId) { + final String path = "/database/collections/{collectionId}".replace("{collectionId}", collectionId); + + final Map params = Map.ofEntries( + ); + + + + final Map headers = Map.ofEntries( + entry("content-type", "application/json") + ); + + return client.call("GET", path, headers, params); + } + + /// Update Collection + /* + * Update collection by its unique ID. + */ + public Call updateCollection(String collectionId, String name, List read, List write, List rules) { + final String path = "/database/collections/{collectionId}".replace("{collectionId}", collectionId); + + final Map params = Map.ofEntries( + entry("name", name), + entry("read", read), + entry("write", write), + entry("rules", rules) + ); + + + + final Map headers = Map.ofEntries( + entry("content-type", "application/json") + ); + + return client.call("PUT", path, headers, params); + } + + /// Delete Collection + /* + * Delete a collection by its unique ID. Only users with write permissions + * have access to delete this resource. + */ + public Call deleteCollection(String collectionId) { + final String path = "/database/collections/{collectionId}".replace("{collectionId}", collectionId); + + final Map params = Map.ofEntries( + ); + + + + final Map headers = Map.ofEntries( + entry("content-type", "application/json") + ); + + return client.call("DELETE", path, headers, params); + } + + /// List Documents + /* + * Get a list of all the user documents. You can use the query params to + * filter your results. On admin mode, this endpoint will return a list of all + * of the project documents. [Learn more about different API + * modes](/docs/admin). + */ + public Call listDocuments(String collectionId, List filters, int offset, int limit, String orderField, OrderType orderType, String orderCast, String search, int first, int last) { + final String path = "/database/collections/{collectionId}/documents".replace("{collectionId}", collectionId); + + final Map params = Map.ofEntries( + entry("filters", filters), + entry("offset", offset), + entry("limit", limit), + entry("orderField", orderField), + entry("orderType", orderType.name()), + entry("orderCast", orderCast), + entry("search", search), + entry("first", first), + entry("last", last) + ); + + + + final Map headers = Map.ofEntries( + entry("content-type", "application/json") + ); + + return client.call("GET", path, headers, params); + } + + /// Create Document + /* + * Create a new Document. + */ + public Call createDocument(String collectionId, Object data, List read, List write, String parentDocument, String parentProperty, String parentPropertyType) { + final String path = "/database/collections/{collectionId}/documents".replace("{collectionId}", collectionId); + + final Map params = Map.ofEntries( + entry("data", data), + entry("read", read), + entry("write", write), + entry("parentDocument", parentDocument), + entry("parentProperty", parentProperty), + entry("parentPropertyType", parentPropertyType) + ); + + + + final Map headers = Map.ofEntries( + entry("content-type", "application/json") + ); + + return client.call("POST", path, headers, params); + } + + /// Get Document + /* + * Get document by its unique ID. This endpoint response returns a JSON object + * with the document data. + */ + public Call getDocument(String collectionId, String documentId) { + final String path = "/database/collections/{collectionId}/documents/{documentId}".replace("{collectionId}", collectionId).replace("{documentId}", documentId); + + final Map params = Map.ofEntries( + ); + + + + final Map headers = Map.ofEntries( + entry("content-type", "application/json") + ); + + return client.call("GET", path, headers, params); + } + + /// Update Document + public Call updateDocument(String collectionId, String documentId, Object data, List read, List write) { + final String path = "/database/collections/{collectionId}/documents/{documentId}".replace("{collectionId}", collectionId).replace("{documentId}", documentId); + + final Map params = Map.ofEntries( + entry("data", data), + entry("read", read), + entry("write", write) + ); + + + + final Map headers = Map.ofEntries( + entry("content-type", "application/json") + ); + + return client.call("PATCH", path, headers, params); + } + + /// Delete Document + /* + * Delete document by its unique ID. This endpoint deletes only the parent + * documents, his attributes and relations to other documents. Child documents + * **will not** be deleted. + */ + public Call deleteDocument(String collectionId, String documentId) { + final String path = "/database/collections/{collectionId}/documents/{documentId}".replace("{collectionId}", collectionId).replace("{documentId}", documentId); + + final Map params = Map.ofEntries( + ); + + + + final Map headers = Map.ofEntries( + entry("content-type", "application/json") + ); + + return client.call("DELETE", path, headers, params); + } + + /// Get Collection Logs + public Call getCollectionLogs(String collectionId) { + final String path = "/database/collections/{collectionId}/logs".replace("{collectionId}", collectionId); + + final Map params = Map.ofEntries( + ); + + + + final Map headers = Map.ofEntries( + entry("content-type", "application/json") + ); + + return client.call("GET", path, headers, params); + } +} \ No newline at end of file diff --git a/app/sdks/0.7.0/server-java/src/main/java/services/Functions.java b/app/sdks/0.7.0/server-java/src/main/java/services/Functions.java new file mode 100644 index 0000000000..a04ad1b5a9 --- /dev/null +++ b/app/sdks/0.7.0/server-java/src/main/java/services/Functions.java @@ -0,0 +1,255 @@ +package .services; + + + +import okhttp3.Call; +import .Client; +import .enums.OrderType; + +import java.io.File; +import java.util.List; +import java.util.HashMap; +import java.util.Map; + +import static java.util.Map.entry; + +public class Functions extends Service { + public Functions(Client client){ + super(client); + } + + /// List Functions + public Call list(String search, int limit, int offset, OrderType orderType) { + final String path = "/functions"; + + final Map params = Map.ofEntries( + entry("search", search), + entry("limit", limit), + entry("offset", offset), + entry("orderType", orderType.name()) + ); + + + + final Map headers = Map.ofEntries( + entry("content-type", "application/json") + ); + + return client.call("GET", path, headers, params); + } + + /// Create Function + public Call create(String name, Object vars, List events, String schedule, int timeout) { + final String path = "/functions"; + + final Map params = Map.ofEntries( + entry("name", name), + entry("vars", vars), + entry("events", events), + entry("schedule", schedule), + entry("timeout", timeout) + ); + + + + final Map headers = Map.ofEntries( + entry("content-type", "application/json") + ); + + return client.call("POST", path, headers, params); + } + + /// Get Function + public Call get(String functionId) { + final String path = "/functions/{functionId}".replace("{functionId}", functionId); + + final Map params = Map.ofEntries( + ); + + + + final Map headers = Map.ofEntries( + entry("content-type", "application/json") + ); + + return client.call("GET", path, headers, params); + } + + /// Update Function + public Call update(String functionId, String name, Object vars, List events, String schedule, int timeout) { + final String path = "/functions/{functionId}".replace("{functionId}", functionId); + + final Map params = Map.ofEntries( + entry("name", name), + entry("vars", vars), + entry("events", events), + entry("schedule", schedule), + entry("timeout", timeout) + ); + + + + final Map headers = Map.ofEntries( + entry("content-type", "application/json") + ); + + return client.call("PUT", path, headers, params); + } + + /// Delete Function + public Call delete(String functionId) { + final String path = "/functions/{functionId}".replace("{functionId}", functionId); + + final Map params = Map.ofEntries( + ); + + + + final Map headers = Map.ofEntries( + entry("content-type", "application/json") + ); + + return client.call("DELETE", path, headers, params); + } + + /// List Executions + public Call listExecutions(String functionId, String search, int limit, int offset, OrderType orderType) { + final String path = "/functions/{functionId}/executions".replace("{functionId}", functionId); + + final Map params = Map.ofEntries( + entry("search", search), + entry("limit", limit), + entry("offset", offset), + entry("orderType", orderType.name()) + ); + + + + final Map headers = Map.ofEntries( + entry("content-type", "application/json") + ); + + return client.call("GET", path, headers, params); + } + + /// Create Execution + public Call createExecution(String functionId, int async) { + final String path = "/functions/{functionId}/executions".replace("{functionId}", functionId); + + final Map params = Map.ofEntries( + entry("async", async) + ); + + + + final Map headers = Map.ofEntries( + entry("content-type", "application/json") + ); + + return client.call("POST", path, headers, params); + } + + /// Get Execution + public Call getExecution(String functionId, String executionId) { + final String path = "/functions/{functionId}/executions/{executionId}".replace("{functionId}", functionId).replace("{executionId}", executionId); + + final Map params = Map.ofEntries( + ); + + + + final Map headers = Map.ofEntries( + entry("content-type", "application/json") + ); + + return client.call("GET", path, headers, params); + } + + /// Update Function Tag + public Call updateTag(String functionId, String tag) { + final String path = "/functions/{functionId}/tag".replace("{functionId}", functionId); + + final Map params = Map.ofEntries( + entry("tag", tag) + ); + + + + final Map headers = Map.ofEntries( + entry("content-type", "application/json") + ); + + return client.call("PATCH", path, headers, params); + } + + /// List Tags + public Call listTags(String functionId, String search, int limit, int offset, OrderType orderType) { + final String path = "/functions/{functionId}/tags".replace("{functionId}", functionId); + + final Map params = Map.ofEntries( + entry("search", search), + entry("limit", limit), + entry("offset", offset), + entry("orderType", orderType.name()) + ); + + + + final Map headers = Map.ofEntries( + entry("content-type", "application/json") + ); + + return client.call("GET", path, headers, params); + } + + /// Create Tag + public Call createTag(String functionId, String env, String command, String code) { + final String path = "/functions/{functionId}/tags".replace("{functionId}", functionId); + + final Map params = Map.ofEntries( + entry("env", env), + entry("command", command), + entry("code", code) + ); + + + + final Map headers = Map.ofEntries( + entry("content-type", "application/json") + ); + + return client.call("POST", path, headers, params); + } + + /// Get Tag + public Call getTag(String functionId, String tagId) { + final String path = "/functions/{functionId}/tags/{tagId}".replace("{functionId}", functionId).replace("{tagId}", tagId); + + final Map params = Map.ofEntries( + ); + + + + final Map headers = Map.ofEntries( + entry("content-type", "application/json") + ); + + return client.call("GET", path, headers, params); + } + + /// Delete Tag + public Call deleteTag(String functionId, String tagId) { + final String path = "/functions/{functionId}/tags/{tagId}".replace("{functionId}", functionId).replace("{tagId}", tagId); + + final Map params = Map.ofEntries( + ); + + + + final Map headers = Map.ofEntries( + entry("content-type", "application/json") + ); + + return client.call("DELETE", path, headers, params); + } +} \ No newline at end of file diff --git a/app/sdks/0.7.0/server-java/src/main/java/services/Health.java b/app/sdks/0.7.0/server-java/src/main/java/services/Health.java new file mode 100644 index 0000000000..08e23433d1 --- /dev/null +++ b/app/sdks/0.7.0/server-java/src/main/java/services/Health.java @@ -0,0 +1,258 @@ +package .services; + + + +import okhttp3.Call; +import .Client; +import .enums.OrderType; + +import java.io.File; +import java.util.List; +import java.util.HashMap; +import java.util.Map; + +import static java.util.Map.entry; + +public class Health extends Service { + public Health(Client client){ + super(client); + } + + /// Get HTTP + /* + * Check the Appwrite HTTP server is up and responsive. + */ + public Call get() { + final String path = "/health"; + + final Map params = Map.ofEntries( + ); + + + + final Map headers = Map.ofEntries( + entry("content-type", "application/json") + ); + + return client.call("GET", path, headers, params); + } + + /// Get Anti virus + /* + * Check the Appwrite Anti Virus server is up and connection is successful. + */ + public Call getAntiVirus() { + final String path = "/health/anti-virus"; + + final Map params = Map.ofEntries( + ); + + + + final Map headers = Map.ofEntries( + entry("content-type", "application/json") + ); + + return client.call("GET", path, headers, params); + } + + /// Get Cache + /* + * Check the Appwrite in-memory cache server is up and connection is + * successful. + */ + public Call getCache() { + final String path = "/health/cache"; + + final Map params = Map.ofEntries( + ); + + + + final Map headers = Map.ofEntries( + entry("content-type", "application/json") + ); + + return client.call("GET", path, headers, params); + } + + /// Get DB + /* + * Check the Appwrite database server is up and connection is successful. + */ + public Call getDB() { + final String path = "/health/db"; + + final Map params = Map.ofEntries( + ); + + + + final Map headers = Map.ofEntries( + entry("content-type", "application/json") + ); + + return client.call("GET", path, headers, params); + } + + /// Get Certificate Queue + /* + * Get the number of certificates that are waiting to be issued against + * [Letsencrypt](https://letsencrypt.org/) in the Appwrite internal queue + * server. + */ + public Call getQueueCertificates() { + final String path = "/health/queue/certificates"; + + final Map params = Map.ofEntries( + ); + + + + final Map headers = Map.ofEntries( + entry("content-type", "application/json") + ); + + return client.call("GET", path, headers, params); + } + + /// Get Functions Queue + public Call getQueueFunctions() { + final String path = "/health/queue/functions"; + + final Map params = Map.ofEntries( + ); + + + + final Map headers = Map.ofEntries( + entry("content-type", "application/json") + ); + + return client.call("GET", path, headers, params); + } + + /// Get Logs Queue + /* + * Get the number of logs that are waiting to be processed in the Appwrite + * internal queue server. + */ + public Call getQueueLogs() { + final String path = "/health/queue/logs"; + + final Map params = Map.ofEntries( + ); + + + + final Map headers = Map.ofEntries( + entry("content-type", "application/json") + ); + + return client.call("GET", path, headers, params); + } + + /// Get Tasks Queue + /* + * Get the number of tasks that are waiting to be processed in the Appwrite + * internal queue server. + */ + public Call getQueueTasks() { + final String path = "/health/queue/tasks"; + + final Map params = Map.ofEntries( + ); + + + + final Map headers = Map.ofEntries( + entry("content-type", "application/json") + ); + + return client.call("GET", path, headers, params); + } + + /// Get Usage Queue + /* + * Get the number of usage stats that are waiting to be processed in the + * Appwrite internal queue server. + */ + public Call getQueueUsage() { + final String path = "/health/queue/usage"; + + final Map params = Map.ofEntries( + ); + + + + final Map headers = Map.ofEntries( + entry("content-type", "application/json") + ); + + return client.call("GET", path, headers, params); + } + + /// Get Webhooks Queue + /* + * Get the number of webhooks that are waiting to be processed in the Appwrite + * internal queue server. + */ + public Call getQueueWebhooks() { + final String path = "/health/queue/webhooks"; + + final Map params = Map.ofEntries( + ); + + + + final Map headers = Map.ofEntries( + entry("content-type", "application/json") + ); + + return client.call("GET", path, headers, params); + } + + /// Get Local Storage + /* + * Check the Appwrite local storage device is up and connection is successful. + */ + public Call getStorageLocal() { + final String path = "/health/storage/local"; + + final Map params = Map.ofEntries( + ); + + + + final Map headers = Map.ofEntries( + entry("content-type", "application/json") + ); + + return client.call("GET", path, headers, params); + } + + /// Get Time + /* + * Check the Appwrite server time is synced with Google remote NTP server. We + * use this technology to smoothly handle leap seconds with no disruptive + * events. The [Network Time + * Protocol](https://en.wikipedia.org/wiki/Network_Time_Protocol) (NTP) is + * used by hundreds of millions of computers and devices to synchronize their + * clocks over the Internet. If your computer sets its own clock, it likely + * uses NTP. + */ + public Call getTime() { + final String path = "/health/time"; + + final Map params = Map.ofEntries( + ); + + + + final Map headers = Map.ofEntries( + entry("content-type", "application/json") + ); + + return client.call("GET", path, headers, params); + } +} \ No newline at end of file diff --git a/app/sdks/0.7.0/server-java/src/main/java/services/Locale.java b/app/sdks/0.7.0/server-java/src/main/java/services/Locale.java new file mode 100644 index 0000000000..695b04a679 --- /dev/null +++ b/app/sdks/0.7.0/server-java/src/main/java/services/Locale.java @@ -0,0 +1,145 @@ +package .services; + + + +import okhttp3.Call; +import .Client; +import .enums.OrderType; + +import java.io.File; +import java.util.List; +import java.util.HashMap; +import java.util.Map; + +import static java.util.Map.entry; + +public class Locale extends Service { + public Locale(Client client){ + super(client); + } + + /// Get User Locale + /* + * Get the current user location based on IP. Returns an object with user + * country code, country name, continent name, continent code, ip address and + * suggested currency. You can use the locale header to get the data in a + * supported language. + * + * ([IP Geolocation by DB-IP](https://db-ip.com)) + */ + public Call get() { + final String path = "/locale"; + + final Map params = Map.ofEntries( + ); + + + + final Map headers = Map.ofEntries( + entry("content-type", "application/json") + ); + + return client.call("GET", path, headers, params); + } + + /// List Continents + /* + * List of all continents. You can use the locale header to get the data in a + * supported language. + */ + public Call getContinents() { + final String path = "/locale/continents"; + + final Map params = Map.ofEntries( + ); + + + + final Map headers = Map.ofEntries( + entry("content-type", "application/json") + ); + + return client.call("GET", path, headers, params); + } + + /// List Countries + /* + * List of all countries. You can use the locale header to get the data in a + * supported language. + */ + public Call getCountries() { + final String path = "/locale/countries"; + + final Map params = Map.ofEntries( + ); + + + + final Map headers = Map.ofEntries( + entry("content-type", "application/json") + ); + + return client.call("GET", path, headers, params); + } + + /// List EU Countries + /* + * List of all countries that are currently members of the EU. You can use the + * locale header to get the data in a supported language. + */ + public Call getCountriesEU() { + final String path = "/locale/countries/eu"; + + final Map params = Map.ofEntries( + ); + + + + final Map headers = Map.ofEntries( + entry("content-type", "application/json") + ); + + return client.call("GET", path, headers, params); + } + + /// List Countries Phone Codes + /* + * List of all countries phone codes. You can use the locale header to get the + * data in a supported language. + */ + public Call getCountriesPhones() { + final String path = "/locale/countries/phones"; + + final Map params = Map.ofEntries( + ); + + + + final Map headers = Map.ofEntries( + entry("content-type", "application/json") + ); + + return client.call("GET", path, headers, params); + } + + /// List Currencies + /* + * List of all currencies, including currency symol, name, plural, and decimal + * digits for all major and minor currencies. You can use the locale header to + * get the data in a supported language. + */ + public Call getCurrencies() { + final String path = "/locale/currencies"; + + final Map params = Map.ofEntries( + ); + + + + final Map headers = Map.ofEntries( + entry("content-type", "application/json") + ); + + return client.call("GET", path, headers, params); + } +} \ No newline at end of file diff --git a/app/sdks/0.7.0/server-java/src/main/java/services/Service.java b/app/sdks/0.7.0/server-java/src/main/java/services/Service.java new file mode 100644 index 0000000000..477b0ba724 --- /dev/null +++ b/app/sdks/0.7.0/server-java/src/main/java/services/Service.java @@ -0,0 +1,11 @@ +package .services; + +import .Client; + +abstract class Service { + final Client client; + + Service(Client client) { + this.client = client; + } +} diff --git a/app/sdks/0.7.0/server-java/src/main/java/services/Storage.java b/app/sdks/0.7.0/server-java/src/main/java/services/Storage.java new file mode 100644 index 0000000000..0233868d0d --- /dev/null +++ b/app/sdks/0.7.0/server-java/src/main/java/services/Storage.java @@ -0,0 +1,204 @@ +package .services; + + + +import okhttp3.Call; +import okhttp3.HttpUrl; +import .Client; +import .enums.OrderType; + +import java.io.File; +import java.util.List; +import java.util.HashMap; +import java.util.Map; + +import static java.util.Map.entry; + +public class Storage extends Service { + public Storage(Client client){ + super(client); + } + + /// List Files + /* + * Get a list of all the user files. You can use the query params to filter + * your results. On admin mode, this endpoint will return a list of all of the + * project files. [Learn more about different API modes](/docs/admin). + */ + public Call listFiles(String search, int limit, int offset, OrderType orderType) { + final String path = "/storage/files"; + + final Map params = Map.ofEntries( + entry("search", search), + entry("limit", limit), + entry("offset", offset), + entry("orderType", orderType.name()) + ); + + + + final Map headers = Map.ofEntries( + entry("content-type", "application/json") + ); + + return client.call("GET", path, headers, params); + } + + /// Create File + /* + * Create a new file. The user who creates the file will automatically be + * assigned to read and write access unless he has passed custom values for + * read and write arguments. + */ + public Call createFile(File file, List read, List write) { + final String path = "/storage/files"; + + final Map params = Map.ofEntries( + entry("file", file), + entry("read", read), + entry("write", write) + ); + + + + final Map headers = Map.ofEntries( + entry("content-type", "multipart/form-data") + ); + + return client.call("POST", path, headers, params); + } + + /// Get File + /* + * Get file by its unique ID. This endpoint response returns a JSON object + * with the file metadata. + */ + public Call getFile(String fileId) { + final String path = "/storage/files/{fileId}".replace("{fileId}", fileId); + + final Map params = Map.ofEntries( + ); + + + + final Map headers = Map.ofEntries( + entry("content-type", "application/json") + ); + + return client.call("GET", path, headers, params); + } + + /// Update File + /* + * Update file by its unique ID. Only users with write permissions have access + * to update this resource. + */ + public Call updateFile(String fileId, List read, List write) { + final String path = "/storage/files/{fileId}".replace("{fileId}", fileId); + + final Map params = Map.ofEntries( + entry("read", read), + entry("write", write) + ); + + + + final Map headers = Map.ofEntries( + entry("content-type", "application/json") + ); + + return client.call("PUT", path, headers, params); + } + + /// Delete File + /* + * Delete a file by its unique ID. Only users with write permissions have + * access to delete this resource. + */ + public Call deleteFile(String fileId) { + final String path = "/storage/files/{fileId}".replace("{fileId}", fileId); + + final Map params = Map.ofEntries( + ); + + + + final Map headers = Map.ofEntries( + entry("content-type", "application/json") + ); + + return client.call("DELETE", path, headers, params); + } + + /// Get File for Download + /* + * Get file content by its unique ID. The endpoint response return with a + * 'Content-Disposition: attachment' header that tells the browser to start + * downloading the file to user downloads directory. + */ + public String getFileDownload(String fileId) { + final String path = "/storage/files/{fileId}/download".replace("{fileId}", fileId); + + final Map params = Map.ofEntries( + entry("project", client.getConfig().get("project")), + entry("key", client.getConfig().get("key")) + ); + + + + HttpUrl.Builder httpBuilder = new HttpUrl.Builder().build().newBuilder(client.getEndPoint() + path); + params.forEach((k, v) -> httpBuilder.addQueryParameter(k, v.toString())); + + return httpBuilder.build().toString(); + } + + /// Get File Preview + /* + * Get a file preview image. Currently, this method supports preview for image + * files (jpg, png, and gif), other supported formats, like pdf, docs, slides, + * and spreadsheets, will return the file icon image. You can also pass query + * string arguments for cutting and resizing your preview image. + */ + public String getFilePreview(String fileId, int width, int height, int quality, String background, String output) { + final String path = "/storage/files/{fileId}/preview".replace("{fileId}", fileId); + + final Map params = Map.ofEntries( + entry("width", width), + entry("height", height), + entry("quality", quality), + entry("background", background), + entry("output", output), + entry("project", client.getConfig().get("project")), + entry("key", client.getConfig().get("key")) + ); + + + + HttpUrl.Builder httpBuilder = new HttpUrl.Builder().build().newBuilder(client.getEndPoint() + path); + params.forEach((k, v) -> httpBuilder.addQueryParameter(k, v.toString())); + + return httpBuilder.build().toString(); + } + + /// Get File for View + /* + * Get file content by its unique ID. This endpoint is similar to the download + * method but returns with no 'Content-Disposition: attachment' header. + */ + public String getFileView(String fileId, String as) { + final String path = "/storage/files/{fileId}/view".replace("{fileId}", fileId); + + final Map params = Map.ofEntries( + entry("as", as), + entry("project", client.getConfig().get("project")), + entry("key", client.getConfig().get("key")) + ); + + + + HttpUrl.Builder httpBuilder = new HttpUrl.Builder().build().newBuilder(client.getEndPoint() + path); + params.forEach((k, v) -> httpBuilder.addQueryParameter(k, v.toString())); + + return httpBuilder.build().toString(); + } +} \ No newline at end of file diff --git a/app/sdks/0.7.0/server-java/src/main/java/services/Teams.java b/app/sdks/0.7.0/server-java/src/main/java/services/Teams.java new file mode 100644 index 0000000000..46cff57f8c --- /dev/null +++ b/app/sdks/0.7.0/server-java/src/main/java/services/Teams.java @@ -0,0 +1,206 @@ +package .services; + + + +import okhttp3.Call; +import .Client; +import .enums.OrderType; + +import java.io.File; +import java.util.List; +import java.util.HashMap; +import java.util.Map; + +import static java.util.Map.entry; + +public class Teams extends Service { + public Teams(Client client){ + super(client); + } + + /// List Teams + /* + * Get a list of all the current user teams. You can use the query params to + * filter your results. On admin mode, this endpoint will return a list of all + * of the project teams. [Learn more about different API modes](/docs/admin). + */ + public Call list(String search, int limit, int offset, OrderType orderType) { + final String path = "/teams"; + + final Map params = Map.ofEntries( + entry("search", search), + entry("limit", limit), + entry("offset", offset), + entry("orderType", orderType.name()) + ); + + + + final Map headers = Map.ofEntries( + entry("content-type", "application/json") + ); + + return client.call("GET", path, headers, params); + } + + /// Create Team + /* + * Create a new team. The user who creates the team will automatically be + * assigned as the owner of the team. The team owner can invite new members, + * who will be able add new owners and update or delete the team from your + * project. + */ + public Call create(String name, List roles) { + final String path = "/teams"; + + final Map params = Map.ofEntries( + entry("name", name), + entry("roles", roles) + ); + + + + final Map headers = Map.ofEntries( + entry("content-type", "application/json") + ); + + return client.call("POST", path, headers, params); + } + + /// Get Team + /* + * Get team by its unique ID. All team members have read access for this + * resource. + */ + public Call get(String teamId) { + final String path = "/teams/{teamId}".replace("{teamId}", teamId); + + final Map params = Map.ofEntries( + ); + + + + final Map headers = Map.ofEntries( + entry("content-type", "application/json") + ); + + return client.call("GET", path, headers, params); + } + + /// Update Team + /* + * Update team by its unique ID. Only team owners have write access for this + * resource. + */ + public Call update(String teamId, String name) { + final String path = "/teams/{teamId}".replace("{teamId}", teamId); + + final Map params = Map.ofEntries( + entry("name", name) + ); + + + + final Map headers = Map.ofEntries( + entry("content-type", "application/json") + ); + + return client.call("PUT", path, headers, params); + } + + /// Delete Team + /* + * Delete team by its unique ID. Only team owners have write access for this + * resource. + */ + public Call delete(String teamId) { + final String path = "/teams/{teamId}".replace("{teamId}", teamId); + + final Map params = Map.ofEntries( + ); + + + + final Map headers = Map.ofEntries( + entry("content-type", "application/json") + ); + + return client.call("DELETE", path, headers, params); + } + + /// Get Team Memberships + /* + * Get team members by the team unique ID. All team members have read access + * for this list of resources. + */ + public Call getMemberships(String teamId) { + final String path = "/teams/{teamId}/memberships".replace("{teamId}", teamId); + + final Map params = Map.ofEntries( + ); + + + + final Map headers = Map.ofEntries( + entry("content-type", "application/json") + ); + + return client.call("GET", path, headers, params); + } + + /// Create Team Membership + /* + * Use this endpoint to invite a new member to join your team. An email with a + * link to join the team will be sent to the new member email address if the + * member doesn't exist in the project it will be created automatically. + * + * Use the 'URL' parameter to redirect the user from the invitation email back + * to your app. When the user is redirected, use the [Update Team Membership + * Status](/docs/teams#updateMembershipStatus) endpoint to allow the user to + * accept the invitation to the team. + * + * Please note that in order to avoid a [Redirect + * Attacks](https://github.com/OWASP/CheatSheetSeries/blob/master/cheatsheets/Unvalidated_Redirects_and_Forwards_Cheat_Sheet.md) + * the only valid redirect URL's are the once from domains you have set when + * added your platforms in the console interface. + */ + public Call createMembership(String teamId, String email, List roles, String url, String name) { + final String path = "/teams/{teamId}/memberships".replace("{teamId}", teamId); + + final Map params = Map.ofEntries( + entry("email", email), + entry("name", name), + entry("roles", roles), + entry("url", url) + ); + + + + final Map headers = Map.ofEntries( + entry("content-type", "application/json") + ); + + return client.call("POST", path, headers, params); + } + + /// Delete Team Membership + /* + * This endpoint allows a user to leave a team or for a team owner to delete + * the membership of any other team member. You can also use this endpoint to + * delete a user membership even if he didn't accept it. + */ + public Call deleteMembership(String teamId, String inviteId) { + final String path = "/teams/{teamId}/memberships/{inviteId}".replace("{teamId}", teamId).replace("{inviteId}", inviteId); + + final Map params = Map.ofEntries( + ); + + + + final Map headers = Map.ofEntries( + entry("content-type", "application/json") + ); + + return client.call("DELETE", path, headers, params); + } +} \ No newline at end of file diff --git a/app/sdks/0.7.0/server-java/src/main/java/services/Users.java b/app/sdks/0.7.0/server-java/src/main/java/services/Users.java new file mode 100644 index 0000000000..921a7c1296 --- /dev/null +++ b/app/sdks/0.7.0/server-java/src/main/java/services/Users.java @@ -0,0 +1,221 @@ +package .services; + + + +import okhttp3.Call; +import .Client; +import .enums.OrderType; + +import java.io.File; +import java.util.List; +import java.util.HashMap; +import java.util.Map; + +import static java.util.Map.entry; + +public class Users extends Service { + public Users(Client client){ + super(client); + } + + /// List Users + /* + * Get a list of all the project users. You can use the query params to filter + * your results. + */ + public Call list(String search, int limit, int offset, OrderType orderType) { + final String path = "/users"; + + final Map params = Map.ofEntries( + entry("search", search), + entry("limit", limit), + entry("offset", offset), + entry("orderType", orderType.name()) + ); + + + + final Map headers = Map.ofEntries( + entry("content-type", "application/json") + ); + + return client.call("GET", path, headers, params); + } + + /// Create User + /* + * Create a new user. + */ + public Call create(String email, String password, String name) { + final String path = "/users"; + + final Map params = Map.ofEntries( + entry("email", email), + entry("password", password), + entry("name", name) + ); + + + + final Map headers = Map.ofEntries( + entry("content-type", "application/json") + ); + + return client.call("POST", path, headers, params); + } + + /// Get User + /* + * Get user by its unique ID. + */ + public Call get(String userId) { + final String path = "/users/{userId}".replace("{userId}", userId); + + final Map params = Map.ofEntries( + ); + + + + final Map headers = Map.ofEntries( + entry("content-type", "application/json") + ); + + return client.call("GET", path, headers, params); + } + + /// Get User Logs + /* + * Get user activity logs list by its unique ID. + */ + public Call getLogs(String userId) { + final String path = "/users/{userId}/logs".replace("{userId}", userId); + + final Map params = Map.ofEntries( + ); + + + + final Map headers = Map.ofEntries( + entry("content-type", "application/json") + ); + + return client.call("GET", path, headers, params); + } + + /// Get User Preferences + /* + * Get user preferences by its unique ID. + */ + public Call getPrefs(String userId) { + final String path = "/users/{userId}/prefs".replace("{userId}", userId); + + final Map params = Map.ofEntries( + ); + + + + final Map headers = Map.ofEntries( + entry("content-type", "application/json") + ); + + return client.call("GET", path, headers, params); + } + + /// Update User Preferences + /* + * Update user preferences by its unique ID. You can pass only the specific + * settings you wish to update. + */ + public Call updatePrefs(String userId, Object prefs) { + final String path = "/users/{userId}/prefs".replace("{userId}", userId); + + final Map params = Map.ofEntries( + entry("prefs", prefs) + ); + + + + final Map headers = Map.ofEntries( + entry("content-type", "application/json") + ); + + return client.call("PATCH", path, headers, params); + } + + /// Get User Sessions + /* + * Get user sessions list by its unique ID. + */ + public Call getSessions(String userId) { + final String path = "/users/{userId}/sessions".replace("{userId}", userId); + + final Map params = Map.ofEntries( + ); + + + + final Map headers = Map.ofEntries( + entry("content-type", "application/json") + ); + + return client.call("GET", path, headers, params); + } + + /// Delete User Sessions + /* + * Delete all user sessions by its unique ID. + */ + public Call deleteSessions(String userId) { + final String path = "/users/{userId}/sessions".replace("{userId}", userId); + + final Map params = Map.ofEntries( + ); + + + + final Map headers = Map.ofEntries( + entry("content-type", "application/json") + ); + + return client.call("DELETE", path, headers, params); + } + + /// Delete User Session + /* + * Delete user sessions by its unique ID. + */ + public Call deleteSession(String userId, String sessionId) { + final String path = "/users/{userId}/sessions/{sessionId}".replace("{userId}", userId).replace("{sessionId}", sessionId); + + final Map params = Map.ofEntries( + ); + + + + final Map headers = Map.ofEntries( + entry("content-type", "application/json") + ); + + return client.call("DELETE", path, headers, params); + } + + /// Update User Status + /* + * Update user status by its unique ID. + */ + public Call updateStatus(String userId, String status) { + final String path = "/users/{userId}/status".replace("{userId}", userId); + + final Map params = Map.ofEntries( + entry("status", status) + ); + + + + final Map headers = Map.ofEntries( + entry("content-type", "application/json") + ); + + return client.call("PATCH", path, headers, params); + } +} \ No newline at end of file diff --git a/app/sdks/0.7.0/server-nodejs/CHANGELOG.md b/app/sdks/0.7.0/server-nodejs/CHANGELOG.md new file mode 100644 index 0000000000..fa4d35e687 --- /dev/null +++ b/app/sdks/0.7.0/server-nodejs/CHANGELOG.md @@ -0,0 +1 @@ +# Change Log \ No newline at end of file diff --git a/app/sdks/0.7.0/server-nodejs/LICENSE b/app/sdks/0.7.0/server-nodejs/LICENSE new file mode 100644 index 0000000000..fc7c051a91 --- /dev/null +++ b/app/sdks/0.7.0/server-nodejs/LICENSE @@ -0,0 +1,12 @@ +Copyright (c) 2019 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: + + 1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. + + 2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. + + 3. Neither the name Appwrite nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. \ No newline at end of file diff --git a/app/sdks/0.7.0/server-nodejs/README.md b/app/sdks/0.7.0/server-nodejs/README.md new file mode 100644 index 0000000000..abf67fea4e --- /dev/null +++ b/app/sdks/0.7.0/server-nodejs/README.md @@ -0,0 +1,28 @@ +# Appwrite Node.js SDK + +![License](https://img.shields.io/github/license/appwrite/sdk-for-node.svg?v=1) +![Version](https://img.shields.io/badge/api%20version-0.6.1-blue.svg?v=1) + +Appwrite is an open-source backend as a service server that abstract and simplify complex and repetitive development tasks behind a very simple to use REST API. Appwrite aims to help you develop your apps faster and in a more secure way. + Use the Node.js SDK to integrate your app with the Appwrite server to easily start interacting with all of Appwrite backend APIs and tools. + For full API documentation and tutorials go to [https://appwrite.io/docs](https://appwrite.io/docs) + + + +![Appwrite](https://appwrite.io/images/github.png) + +## Installation + +To install via [NPM](https://www.npmjs.com/): + +```bash +npm install node-appwrite --save +``` + +## Contribution + +This library is auto-generated by Appwrite custom [SDK Generator](https://github.com/appwrite/sdk-generator). To learn more about how you can help us improve this SDK, please check the [contribution guide](https://github.com/appwrite/sdk-generator/blob/master/CONTRIBUTING.md) before sending a pull-request. + +## License + +Please see the [BSD-3-Clause license](https://raw.githubusercontent.com/appwrite/appwrite/master/LICENSE) file for more information. \ No newline at end of file diff --git a/app/sdks/0.7.0/server-nodejs/docs/examples/avatars/get-browser.md b/app/sdks/0.7.0/server-nodejs/docs/examples/avatars/get-browser.md new file mode 100644 index 0000000000..2a670ce08b --- /dev/null +++ b/app/sdks/0.7.0/server-nodejs/docs/examples/avatars/get-browser.md @@ -0,0 +1,20 @@ +const sdk = require('node-appwrite'); + +// Init SDK +let client = new sdk.Client(); + +let avatars = new sdk.Avatars(client); + +client + .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID + .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key +; + +let promise = avatars.getBrowser('aa'); + +promise.then(function (response) { + console.log(response); +}, function (error) { + console.log(error); +}); \ No newline at end of file diff --git a/app/sdks/0.7.0/server-nodejs/docs/examples/avatars/get-credit-card.md b/app/sdks/0.7.0/server-nodejs/docs/examples/avatars/get-credit-card.md new file mode 100644 index 0000000000..afd38f5a97 --- /dev/null +++ b/app/sdks/0.7.0/server-nodejs/docs/examples/avatars/get-credit-card.md @@ -0,0 +1,20 @@ +const sdk = require('node-appwrite'); + +// Init SDK +let client = new sdk.Client(); + +let avatars = new sdk.Avatars(client); + +client + .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID + .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key +; + +let promise = avatars.getCreditCard('amex'); + +promise.then(function (response) { + console.log(response); +}, function (error) { + console.log(error); +}); \ No newline at end of file diff --git a/app/sdks/0.7.0/server-nodejs/docs/examples/avatars/get-favicon.md b/app/sdks/0.7.0/server-nodejs/docs/examples/avatars/get-favicon.md new file mode 100644 index 0000000000..bb347371d4 --- /dev/null +++ b/app/sdks/0.7.0/server-nodejs/docs/examples/avatars/get-favicon.md @@ -0,0 +1,20 @@ +const sdk = require('node-appwrite'); + +// Init SDK +let client = new sdk.Client(); + +let avatars = new sdk.Avatars(client); + +client + .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID + .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key +; + +let promise = avatars.getFavicon('https://example.com'); + +promise.then(function (response) { + console.log(response); +}, function (error) { + console.log(error); +}); \ No newline at end of file diff --git a/app/sdks/0.7.0/server-nodejs/docs/examples/avatars/get-flag.md b/app/sdks/0.7.0/server-nodejs/docs/examples/avatars/get-flag.md new file mode 100644 index 0000000000..db677bc4f8 --- /dev/null +++ b/app/sdks/0.7.0/server-nodejs/docs/examples/avatars/get-flag.md @@ -0,0 +1,20 @@ +const sdk = require('node-appwrite'); + +// Init SDK +let client = new sdk.Client(); + +let avatars = new sdk.Avatars(client); + +client + .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID + .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key +; + +let promise = avatars.getFlag('af'); + +promise.then(function (response) { + console.log(response); +}, function (error) { + console.log(error); +}); \ No newline at end of file diff --git a/app/sdks/0.7.0/server-nodejs/docs/examples/avatars/get-image.md b/app/sdks/0.7.0/server-nodejs/docs/examples/avatars/get-image.md new file mode 100644 index 0000000000..efa871ea63 --- /dev/null +++ b/app/sdks/0.7.0/server-nodejs/docs/examples/avatars/get-image.md @@ -0,0 +1,20 @@ +const sdk = require('node-appwrite'); + +// Init SDK +let client = new sdk.Client(); + +let avatars = new sdk.Avatars(client); + +client + .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID + .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key +; + +let promise = avatars.getImage('https://example.com'); + +promise.then(function (response) { + console.log(response); +}, function (error) { + console.log(error); +}); \ No newline at end of file diff --git a/app/sdks/0.7.0/server-nodejs/docs/examples/avatars/get-q-r.md b/app/sdks/0.7.0/server-nodejs/docs/examples/avatars/get-q-r.md new file mode 100644 index 0000000000..e79b3235af --- /dev/null +++ b/app/sdks/0.7.0/server-nodejs/docs/examples/avatars/get-q-r.md @@ -0,0 +1,20 @@ +const sdk = require('node-appwrite'); + +// Init SDK +let client = new sdk.Client(); + +let avatars = new sdk.Avatars(client); + +client + .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID + .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key +; + +let promise = avatars.getQR('[TEXT]'); + +promise.then(function (response) { + console.log(response); +}, function (error) { + console.log(error); +}); \ No newline at end of file diff --git a/app/sdks/0.7.0/server-nodejs/docs/examples/database/create-collection.md b/app/sdks/0.7.0/server-nodejs/docs/examples/database/create-collection.md new file mode 100644 index 0000000000..c0207f30f0 --- /dev/null +++ b/app/sdks/0.7.0/server-nodejs/docs/examples/database/create-collection.md @@ -0,0 +1,20 @@ +const sdk = require('node-appwrite'); + +// Init SDK +let client = new sdk.Client(); + +let database = new sdk.Database(client); + +client + .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID + .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key +; + +let promise = database.createCollection('[NAME]', [], [], []); + +promise.then(function (response) { + console.log(response); +}, function (error) { + console.log(error); +}); \ No newline at end of file diff --git a/app/sdks/0.7.0/server-nodejs/docs/examples/database/create-document.md b/app/sdks/0.7.0/server-nodejs/docs/examples/database/create-document.md new file mode 100644 index 0000000000..8676dfb84d --- /dev/null +++ b/app/sdks/0.7.0/server-nodejs/docs/examples/database/create-document.md @@ -0,0 +1,20 @@ +const sdk = require('node-appwrite'); + +// Init SDK +let client = new sdk.Client(); + +let database = new sdk.Database(client); + +client + .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID + .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key +; + +let promise = database.createDocument('[COLLECTION_ID]', {}, [], []); + +promise.then(function (response) { + console.log(response); +}, function (error) { + console.log(error); +}); \ No newline at end of file diff --git a/app/sdks/0.7.0/server-nodejs/docs/examples/database/delete-collection.md b/app/sdks/0.7.0/server-nodejs/docs/examples/database/delete-collection.md new file mode 100644 index 0000000000..503da98a73 --- /dev/null +++ b/app/sdks/0.7.0/server-nodejs/docs/examples/database/delete-collection.md @@ -0,0 +1,20 @@ +const sdk = require('node-appwrite'); + +// Init SDK +let client = new sdk.Client(); + +let database = new sdk.Database(client); + +client + .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID + .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key +; + +let promise = database.deleteCollection('[COLLECTION_ID]'); + +promise.then(function (response) { + console.log(response); +}, function (error) { + console.log(error); +}); \ No newline at end of file diff --git a/app/sdks/0.7.0/server-nodejs/docs/examples/database/delete-document.md b/app/sdks/0.7.0/server-nodejs/docs/examples/database/delete-document.md new file mode 100644 index 0000000000..f14c985e83 --- /dev/null +++ b/app/sdks/0.7.0/server-nodejs/docs/examples/database/delete-document.md @@ -0,0 +1,20 @@ +const sdk = require('node-appwrite'); + +// Init SDK +let client = new sdk.Client(); + +let database = new sdk.Database(client); + +client + .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID + .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key +; + +let promise = database.deleteDocument('[COLLECTION_ID]', '[DOCUMENT_ID]'); + +promise.then(function (response) { + console.log(response); +}, function (error) { + console.log(error); +}); \ No newline at end of file diff --git a/app/sdks/0.7.0/server-nodejs/docs/examples/database/get-collection-logs.md b/app/sdks/0.7.0/server-nodejs/docs/examples/database/get-collection-logs.md new file mode 100644 index 0000000000..5bc911624b --- /dev/null +++ b/app/sdks/0.7.0/server-nodejs/docs/examples/database/get-collection-logs.md @@ -0,0 +1,20 @@ +const sdk = require('node-appwrite'); + +// Init SDK +let client = new sdk.Client(); + +let database = new sdk.Database(client); + +client + .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID + .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key +; + +let promise = database.getCollectionLogs('[COLLECTION_ID]'); + +promise.then(function (response) { + console.log(response); +}, function (error) { + console.log(error); +}); \ No newline at end of file diff --git a/app/sdks/0.7.0/server-nodejs/docs/examples/database/get-collection.md b/app/sdks/0.7.0/server-nodejs/docs/examples/database/get-collection.md new file mode 100644 index 0000000000..a14ce0d49a --- /dev/null +++ b/app/sdks/0.7.0/server-nodejs/docs/examples/database/get-collection.md @@ -0,0 +1,20 @@ +const sdk = require('node-appwrite'); + +// Init SDK +let client = new sdk.Client(); + +let database = new sdk.Database(client); + +client + .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID + .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key +; + +let promise = database.getCollection('[COLLECTION_ID]'); + +promise.then(function (response) { + console.log(response); +}, function (error) { + console.log(error); +}); \ No newline at end of file diff --git a/app/sdks/0.7.0/server-nodejs/docs/examples/database/get-document.md b/app/sdks/0.7.0/server-nodejs/docs/examples/database/get-document.md new file mode 100644 index 0000000000..55cce32b9b --- /dev/null +++ b/app/sdks/0.7.0/server-nodejs/docs/examples/database/get-document.md @@ -0,0 +1,20 @@ +const sdk = require('node-appwrite'); + +// Init SDK +let client = new sdk.Client(); + +let database = new sdk.Database(client); + +client + .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID + .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key +; + +let promise = database.getDocument('[COLLECTION_ID]', '[DOCUMENT_ID]'); + +promise.then(function (response) { + console.log(response); +}, function (error) { + console.log(error); +}); \ No newline at end of file diff --git a/app/sdks/0.7.0/server-nodejs/docs/examples/database/list-collections.md b/app/sdks/0.7.0/server-nodejs/docs/examples/database/list-collections.md new file mode 100644 index 0000000000..bacfdb062c --- /dev/null +++ b/app/sdks/0.7.0/server-nodejs/docs/examples/database/list-collections.md @@ -0,0 +1,20 @@ +const sdk = require('node-appwrite'); + +// Init SDK +let client = new sdk.Client(); + +let database = new sdk.Database(client); + +client + .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID + .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key +; + +let promise = database.listCollections(); + +promise.then(function (response) { + console.log(response); +}, function (error) { + console.log(error); +}); \ No newline at end of file diff --git a/app/sdks/0.7.0/server-nodejs/docs/examples/database/list-documents.md b/app/sdks/0.7.0/server-nodejs/docs/examples/database/list-documents.md new file mode 100644 index 0000000000..ad02d05e2a --- /dev/null +++ b/app/sdks/0.7.0/server-nodejs/docs/examples/database/list-documents.md @@ -0,0 +1,20 @@ +const sdk = require('node-appwrite'); + +// Init SDK +let client = new sdk.Client(); + +let database = new sdk.Database(client); + +client + .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID + .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key +; + +let promise = database.listDocuments('[COLLECTION_ID]'); + +promise.then(function (response) { + console.log(response); +}, function (error) { + console.log(error); +}); \ No newline at end of file diff --git a/app/sdks/0.7.0/server-nodejs/docs/examples/database/update-collection.md b/app/sdks/0.7.0/server-nodejs/docs/examples/database/update-collection.md new file mode 100644 index 0000000000..eb9326565a --- /dev/null +++ b/app/sdks/0.7.0/server-nodejs/docs/examples/database/update-collection.md @@ -0,0 +1,20 @@ +const sdk = require('node-appwrite'); + +// Init SDK +let client = new sdk.Client(); + +let database = new sdk.Database(client); + +client + .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID + .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key +; + +let promise = database.updateCollection('[COLLECTION_ID]', '[NAME]', [], []); + +promise.then(function (response) { + console.log(response); +}, function (error) { + console.log(error); +}); \ No newline at end of file diff --git a/app/sdks/0.7.0/server-nodejs/docs/examples/database/update-document.md b/app/sdks/0.7.0/server-nodejs/docs/examples/database/update-document.md new file mode 100644 index 0000000000..131722cd26 --- /dev/null +++ b/app/sdks/0.7.0/server-nodejs/docs/examples/database/update-document.md @@ -0,0 +1,20 @@ +const sdk = require('node-appwrite'); + +// Init SDK +let client = new sdk.Client(); + +let database = new sdk.Database(client); + +client + .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID + .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key +; + +let promise = database.updateDocument('[COLLECTION_ID]', '[DOCUMENT_ID]', {}, [], []); + +promise.then(function (response) { + console.log(response); +}, function (error) { + console.log(error); +}); \ No newline at end of file diff --git a/app/sdks/0.7.0/server-nodejs/docs/examples/functions/create-execution.md b/app/sdks/0.7.0/server-nodejs/docs/examples/functions/create-execution.md new file mode 100644 index 0000000000..9ed33ae50b --- /dev/null +++ b/app/sdks/0.7.0/server-nodejs/docs/examples/functions/create-execution.md @@ -0,0 +1,19 @@ +const sdk = require('node-appwrite'); + +// Init SDK +let client = new sdk.Client(); + +let functions = new sdk.Functions(client); + +client + .setProject('5df5acd0d48c2') // Your project ID + .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key +; + +let promise = functions.createExecution('[FUNCTION_ID]'); + +promise.then(function (response) { + console.log(response); +}, function (error) { + console.log(error); +}); \ No newline at end of file diff --git a/app/sdks/0.7.0/server-nodejs/docs/examples/functions/create-tag.md b/app/sdks/0.7.0/server-nodejs/docs/examples/functions/create-tag.md new file mode 100644 index 0000000000..5048701d05 --- /dev/null +++ b/app/sdks/0.7.0/server-nodejs/docs/examples/functions/create-tag.md @@ -0,0 +1,19 @@ +const sdk = require('node-appwrite'); + +// Init SDK +let client = new sdk.Client(); + +let functions = new sdk.Functions(client); + +client + .setProject('5df5acd0d48c2') // Your project ID + .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key +; + +let promise = functions.createTag('[FUNCTION_ID]', 'node-14', '[COMMAND]', '[CODE]'); + +promise.then(function (response) { + console.log(response); +}, function (error) { + console.log(error); +}); \ No newline at end of file diff --git a/app/sdks/0.7.0/server-nodejs/docs/examples/functions/create.md b/app/sdks/0.7.0/server-nodejs/docs/examples/functions/create.md new file mode 100644 index 0000000000..3ac02eb506 --- /dev/null +++ b/app/sdks/0.7.0/server-nodejs/docs/examples/functions/create.md @@ -0,0 +1,19 @@ +const sdk = require('node-appwrite'); + +// Init SDK +let client = new sdk.Client(); + +let functions = new sdk.Functions(client); + +client + .setProject('5df5acd0d48c2') // Your project ID + .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key +; + +let promise = functions.create('[NAME]'); + +promise.then(function (response) { + console.log(response); +}, function (error) { + console.log(error); +}); \ No newline at end of file diff --git a/app/sdks/0.7.0/server-nodejs/docs/examples/functions/delete-tag.md b/app/sdks/0.7.0/server-nodejs/docs/examples/functions/delete-tag.md new file mode 100644 index 0000000000..fc2fe8a53b --- /dev/null +++ b/app/sdks/0.7.0/server-nodejs/docs/examples/functions/delete-tag.md @@ -0,0 +1,19 @@ +const sdk = require('node-appwrite'); + +// Init SDK +let client = new sdk.Client(); + +let functions = new sdk.Functions(client); + +client + .setProject('5df5acd0d48c2') // Your project ID + .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key +; + +let promise = functions.deleteTag('[FUNCTION_ID]', '[TAG_ID]'); + +promise.then(function (response) { + console.log(response); +}, function (error) { + console.log(error); +}); \ No newline at end of file diff --git a/app/sdks/0.7.0/server-nodejs/docs/examples/functions/delete.md b/app/sdks/0.7.0/server-nodejs/docs/examples/functions/delete.md new file mode 100644 index 0000000000..048c96d99c --- /dev/null +++ b/app/sdks/0.7.0/server-nodejs/docs/examples/functions/delete.md @@ -0,0 +1,19 @@ +const sdk = require('node-appwrite'); + +// Init SDK +let client = new sdk.Client(); + +let functions = new sdk.Functions(client); + +client + .setProject('5df5acd0d48c2') // Your project ID + .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key +; + +let promise = functions.delete('[FUNCTION_ID]'); + +promise.then(function (response) { + console.log(response); +}, function (error) { + console.log(error); +}); \ No newline at end of file diff --git a/app/sdks/0.7.0/server-nodejs/docs/examples/functions/get-execution.md b/app/sdks/0.7.0/server-nodejs/docs/examples/functions/get-execution.md new file mode 100644 index 0000000000..482f7ee713 --- /dev/null +++ b/app/sdks/0.7.0/server-nodejs/docs/examples/functions/get-execution.md @@ -0,0 +1,19 @@ +const sdk = require('node-appwrite'); + +// Init SDK +let client = new sdk.Client(); + +let functions = new sdk.Functions(client); + +client + .setProject('5df5acd0d48c2') // Your project ID + .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key +; + +let promise = functions.getExecution('[FUNCTION_ID]', '[EXECUTION_ID]'); + +promise.then(function (response) { + console.log(response); +}, function (error) { + console.log(error); +}); \ No newline at end of file diff --git a/app/sdks/0.7.0/server-nodejs/docs/examples/functions/get-tag.md b/app/sdks/0.7.0/server-nodejs/docs/examples/functions/get-tag.md new file mode 100644 index 0000000000..5caa2134b6 --- /dev/null +++ b/app/sdks/0.7.0/server-nodejs/docs/examples/functions/get-tag.md @@ -0,0 +1,19 @@ +const sdk = require('node-appwrite'); + +// Init SDK +let client = new sdk.Client(); + +let functions = new sdk.Functions(client); + +client + .setProject('5df5acd0d48c2') // Your project ID + .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key +; + +let promise = functions.getTag('[FUNCTION_ID]', '[TAG_ID]'); + +promise.then(function (response) { + console.log(response); +}, function (error) { + console.log(error); +}); \ No newline at end of file diff --git a/app/sdks/0.7.0/server-nodejs/docs/examples/functions/get.md b/app/sdks/0.7.0/server-nodejs/docs/examples/functions/get.md new file mode 100644 index 0000000000..cfc2d0fae2 --- /dev/null +++ b/app/sdks/0.7.0/server-nodejs/docs/examples/functions/get.md @@ -0,0 +1,19 @@ +const sdk = require('node-appwrite'); + +// Init SDK +let client = new sdk.Client(); + +let functions = new sdk.Functions(client); + +client + .setProject('5df5acd0d48c2') // Your project ID + .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key +; + +let promise = functions.get('[FUNCTION_ID]'); + +promise.then(function (response) { + console.log(response); +}, function (error) { + console.log(error); +}); \ No newline at end of file diff --git a/app/sdks/0.7.0/server-nodejs/docs/examples/functions/list-executions.md b/app/sdks/0.7.0/server-nodejs/docs/examples/functions/list-executions.md new file mode 100644 index 0000000000..ceecf677a6 --- /dev/null +++ b/app/sdks/0.7.0/server-nodejs/docs/examples/functions/list-executions.md @@ -0,0 +1,19 @@ +const sdk = require('node-appwrite'); + +// Init SDK +let client = new sdk.Client(); + +let functions = new sdk.Functions(client); + +client + .setProject('5df5acd0d48c2') // Your project ID + .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key +; + +let promise = functions.listExecutions('[FUNCTION_ID]'); + +promise.then(function (response) { + console.log(response); +}, function (error) { + console.log(error); +}); \ No newline at end of file diff --git a/app/sdks/0.7.0/server-nodejs/docs/examples/functions/list-tags.md b/app/sdks/0.7.0/server-nodejs/docs/examples/functions/list-tags.md new file mode 100644 index 0000000000..147d65afe2 --- /dev/null +++ b/app/sdks/0.7.0/server-nodejs/docs/examples/functions/list-tags.md @@ -0,0 +1,19 @@ +const sdk = require('node-appwrite'); + +// Init SDK +let client = new sdk.Client(); + +let functions = new sdk.Functions(client); + +client + .setProject('5df5acd0d48c2') // Your project ID + .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key +; + +let promise = functions.listTags('[FUNCTION_ID]'); + +promise.then(function (response) { + console.log(response); +}, function (error) { + console.log(error); +}); \ No newline at end of file diff --git a/app/sdks/0.7.0/server-nodejs/docs/examples/functions/list.md b/app/sdks/0.7.0/server-nodejs/docs/examples/functions/list.md new file mode 100644 index 0000000000..3cb999c51b --- /dev/null +++ b/app/sdks/0.7.0/server-nodejs/docs/examples/functions/list.md @@ -0,0 +1,19 @@ +const sdk = require('node-appwrite'); + +// Init SDK +let client = new sdk.Client(); + +let functions = new sdk.Functions(client); + +client + .setProject('5df5acd0d48c2') // Your project ID + .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key +; + +let promise = functions.list(); + +promise.then(function (response) { + console.log(response); +}, function (error) { + console.log(error); +}); \ No newline at end of file diff --git a/app/sdks/0.7.0/server-nodejs/docs/examples/functions/update-active.md b/app/sdks/0.7.0/server-nodejs/docs/examples/functions/update-active.md new file mode 100644 index 0000000000..1c2f0da2e2 --- /dev/null +++ b/app/sdks/0.7.0/server-nodejs/docs/examples/functions/update-active.md @@ -0,0 +1,19 @@ +const sdk = require('node-appwrite'); + +// Init SDK +let client = new sdk.Client(); + +let functions = new sdk.Functions(client); + +client + .setProject('5df5acd0d48c2') // Your project ID + .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key +; + +let promise = functions.updateActive('[FUNCTION_ID]', '[ACTIVE]'); + +promise.then(function (response) { + console.log(response); +}, function (error) { + console.log(error); +}); \ No newline at end of file diff --git a/app/sdks/0.7.0/server-nodejs/docs/examples/functions/update-tag.md b/app/sdks/0.7.0/server-nodejs/docs/examples/functions/update-tag.md new file mode 100644 index 0000000000..8b9baefaf0 --- /dev/null +++ b/app/sdks/0.7.0/server-nodejs/docs/examples/functions/update-tag.md @@ -0,0 +1,19 @@ +const sdk = require('node-appwrite'); + +// Init SDK +let client = new sdk.Client(); + +let functions = new sdk.Functions(client); + +client + .setProject('5df5acd0d48c2') // Your project ID + .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key +; + +let promise = functions.updateTag('[FUNCTION_ID]', '[TAG]'); + +promise.then(function (response) { + console.log(response); +}, function (error) { + console.log(error); +}); \ No newline at end of file diff --git a/app/sdks/0.7.0/server-nodejs/docs/examples/functions/update.md b/app/sdks/0.7.0/server-nodejs/docs/examples/functions/update.md new file mode 100644 index 0000000000..73672ae162 --- /dev/null +++ b/app/sdks/0.7.0/server-nodejs/docs/examples/functions/update.md @@ -0,0 +1,19 @@ +const sdk = require('node-appwrite'); + +// Init SDK +let client = new sdk.Client(); + +let functions = new sdk.Functions(client); + +client + .setProject('5df5acd0d48c2') // Your project ID + .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key +; + +let promise = functions.update('[FUNCTION_ID]', '[NAME]'); + +promise.then(function (response) { + console.log(response); +}, function (error) { + console.log(error); +}); \ No newline at end of file diff --git a/app/sdks/0.7.0/server-nodejs/docs/examples/health/get-anti-virus.md b/app/sdks/0.7.0/server-nodejs/docs/examples/health/get-anti-virus.md new file mode 100644 index 0000000000..c08e612bcf --- /dev/null +++ b/app/sdks/0.7.0/server-nodejs/docs/examples/health/get-anti-virus.md @@ -0,0 +1,20 @@ +const sdk = require('node-appwrite'); + +// Init SDK +let client = new sdk.Client(); + +let health = new sdk.Health(client); + +client + .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID + .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key +; + +let promise = health.getAntiVirus(); + +promise.then(function (response) { + console.log(response); +}, function (error) { + console.log(error); +}); \ No newline at end of file diff --git a/app/sdks/0.7.0/server-nodejs/docs/examples/health/get-cache.md b/app/sdks/0.7.0/server-nodejs/docs/examples/health/get-cache.md new file mode 100644 index 0000000000..d19cc8abd5 --- /dev/null +++ b/app/sdks/0.7.0/server-nodejs/docs/examples/health/get-cache.md @@ -0,0 +1,20 @@ +const sdk = require('node-appwrite'); + +// Init SDK +let client = new sdk.Client(); + +let health = new sdk.Health(client); + +client + .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID + .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key +; + +let promise = health.getCache(); + +promise.then(function (response) { + console.log(response); +}, function (error) { + console.log(error); +}); \ No newline at end of file diff --git a/app/sdks/0.7.0/server-nodejs/docs/examples/health/get-d-b.md b/app/sdks/0.7.0/server-nodejs/docs/examples/health/get-d-b.md new file mode 100644 index 0000000000..08505367d4 --- /dev/null +++ b/app/sdks/0.7.0/server-nodejs/docs/examples/health/get-d-b.md @@ -0,0 +1,20 @@ +const sdk = require('node-appwrite'); + +// Init SDK +let client = new sdk.Client(); + +let health = new sdk.Health(client); + +client + .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID + .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key +; + +let promise = health.getDB(); + +promise.then(function (response) { + console.log(response); +}, function (error) { + console.log(error); +}); \ No newline at end of file diff --git a/app/sdks/0.7.0/server-nodejs/docs/examples/health/get-queue-certificates.md b/app/sdks/0.7.0/server-nodejs/docs/examples/health/get-queue-certificates.md new file mode 100644 index 0000000000..2eb69e0126 --- /dev/null +++ b/app/sdks/0.7.0/server-nodejs/docs/examples/health/get-queue-certificates.md @@ -0,0 +1,20 @@ +const sdk = require('node-appwrite'); + +// Init SDK +let client = new sdk.Client(); + +let health = new sdk.Health(client); + +client + .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID + .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key +; + +let promise = health.getQueueCertificates(); + +promise.then(function (response) { + console.log(response); +}, function (error) { + console.log(error); +}); \ No newline at end of file diff --git a/app/sdks/0.7.0/server-nodejs/docs/examples/health/get-queue-functions.md b/app/sdks/0.7.0/server-nodejs/docs/examples/health/get-queue-functions.md new file mode 100644 index 0000000000..9470e11646 --- /dev/null +++ b/app/sdks/0.7.0/server-nodejs/docs/examples/health/get-queue-functions.md @@ -0,0 +1,20 @@ +const sdk = require('node-appwrite'); + +// Init SDK +let client = new sdk.Client(); + +let health = new sdk.Health(client); + +client + .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID + .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key +; + +let promise = health.getQueueFunctions(); + +promise.then(function (response) { + console.log(response); +}, function (error) { + console.log(error); +}); \ No newline at end of file diff --git a/app/sdks/0.7.0/server-nodejs/docs/examples/health/get-queue-logs.md b/app/sdks/0.7.0/server-nodejs/docs/examples/health/get-queue-logs.md new file mode 100644 index 0000000000..10f1cb24e3 --- /dev/null +++ b/app/sdks/0.7.0/server-nodejs/docs/examples/health/get-queue-logs.md @@ -0,0 +1,20 @@ +const sdk = require('node-appwrite'); + +// Init SDK +let client = new sdk.Client(); + +let health = new sdk.Health(client); + +client + .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID + .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key +; + +let promise = health.getQueueLogs(); + +promise.then(function (response) { + console.log(response); +}, function (error) { + console.log(error); +}); \ No newline at end of file diff --git a/app/sdks/0.7.0/server-nodejs/docs/examples/health/get-queue-tasks.md b/app/sdks/0.7.0/server-nodejs/docs/examples/health/get-queue-tasks.md new file mode 100644 index 0000000000..c159f4e6ee --- /dev/null +++ b/app/sdks/0.7.0/server-nodejs/docs/examples/health/get-queue-tasks.md @@ -0,0 +1,20 @@ +const sdk = require('node-appwrite'); + +// Init SDK +let client = new sdk.Client(); + +let health = new sdk.Health(client); + +client + .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID + .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key +; + +let promise = health.getQueueTasks(); + +promise.then(function (response) { + console.log(response); +}, function (error) { + console.log(error); +}); \ No newline at end of file diff --git a/app/sdks/0.7.0/server-nodejs/docs/examples/health/get-queue-usage.md b/app/sdks/0.7.0/server-nodejs/docs/examples/health/get-queue-usage.md new file mode 100644 index 0000000000..6286c741ee --- /dev/null +++ b/app/sdks/0.7.0/server-nodejs/docs/examples/health/get-queue-usage.md @@ -0,0 +1,20 @@ +const sdk = require('node-appwrite'); + +// Init SDK +let client = new sdk.Client(); + +let health = new sdk.Health(client); + +client + .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID + .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key +; + +let promise = health.getQueueUsage(); + +promise.then(function (response) { + console.log(response); +}, function (error) { + console.log(error); +}); \ No newline at end of file diff --git a/app/sdks/0.7.0/server-nodejs/docs/examples/health/get-queue-webhooks.md b/app/sdks/0.7.0/server-nodejs/docs/examples/health/get-queue-webhooks.md new file mode 100644 index 0000000000..3a788eb895 --- /dev/null +++ b/app/sdks/0.7.0/server-nodejs/docs/examples/health/get-queue-webhooks.md @@ -0,0 +1,20 @@ +const sdk = require('node-appwrite'); + +// Init SDK +let client = new sdk.Client(); + +let health = new sdk.Health(client); + +client + .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID + .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key +; + +let promise = health.getQueueWebhooks(); + +promise.then(function (response) { + console.log(response); +}, function (error) { + console.log(error); +}); \ No newline at end of file diff --git a/app/sdks/0.7.0/server-nodejs/docs/examples/health/get-storage-anti-virus.md b/app/sdks/0.7.0/server-nodejs/docs/examples/health/get-storage-anti-virus.md new file mode 100644 index 0000000000..70c3850375 --- /dev/null +++ b/app/sdks/0.7.0/server-nodejs/docs/examples/health/get-storage-anti-virus.md @@ -0,0 +1,19 @@ +const sdk = require('node-appwrite'); + +// Init SDK +let client = new sdk.Client(); + +let health = new sdk.Health(client); + +client + .setProject('5df5acd0d48c2') // Your project ID + .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key +; + +let promise = health.getStorageAntiVirus(); + +promise.then(function (response) { + console.log(response); +}, function (error) { + console.log(error); +}); \ No newline at end of file diff --git a/app/sdks/0.7.0/server-nodejs/docs/examples/health/get-storage-local.md b/app/sdks/0.7.0/server-nodejs/docs/examples/health/get-storage-local.md new file mode 100644 index 0000000000..84b8fb47a6 --- /dev/null +++ b/app/sdks/0.7.0/server-nodejs/docs/examples/health/get-storage-local.md @@ -0,0 +1,20 @@ +const sdk = require('node-appwrite'); + +// Init SDK +let client = new sdk.Client(); + +let health = new sdk.Health(client); + +client + .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID + .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key +; + +let promise = health.getStorageLocal(); + +promise.then(function (response) { + console.log(response); +}, function (error) { + console.log(error); +}); \ No newline at end of file diff --git a/app/sdks/0.7.0/server-nodejs/docs/examples/health/get-time.md b/app/sdks/0.7.0/server-nodejs/docs/examples/health/get-time.md new file mode 100644 index 0000000000..563bf2fb52 --- /dev/null +++ b/app/sdks/0.7.0/server-nodejs/docs/examples/health/get-time.md @@ -0,0 +1,20 @@ +const sdk = require('node-appwrite'); + +// Init SDK +let client = new sdk.Client(); + +let health = new sdk.Health(client); + +client + .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID + .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key +; + +let promise = health.getTime(); + +promise.then(function (response) { + console.log(response); +}, function (error) { + console.log(error); +}); \ No newline at end of file diff --git a/app/sdks/0.7.0/server-nodejs/docs/examples/health/get.md b/app/sdks/0.7.0/server-nodejs/docs/examples/health/get.md new file mode 100644 index 0000000000..20c3d40801 --- /dev/null +++ b/app/sdks/0.7.0/server-nodejs/docs/examples/health/get.md @@ -0,0 +1,20 @@ +const sdk = require('node-appwrite'); + +// Init SDK +let client = new sdk.Client(); + +let health = new sdk.Health(client); + +client + .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID + .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key +; + +let promise = health.get(); + +promise.then(function (response) { + console.log(response); +}, function (error) { + console.log(error); +}); \ No newline at end of file diff --git a/app/sdks/0.7.0/server-nodejs/docs/examples/locale/get-continents.md b/app/sdks/0.7.0/server-nodejs/docs/examples/locale/get-continents.md new file mode 100644 index 0000000000..323237b4ab --- /dev/null +++ b/app/sdks/0.7.0/server-nodejs/docs/examples/locale/get-continents.md @@ -0,0 +1,20 @@ +const sdk = require('node-appwrite'); + +// Init SDK +let client = new sdk.Client(); + +let locale = new sdk.Locale(client); + +client + .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID + .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key +; + +let promise = locale.getContinents(); + +promise.then(function (response) { + console.log(response); +}, function (error) { + console.log(error); +}); \ No newline at end of file diff --git a/app/sdks/0.7.0/server-nodejs/docs/examples/locale/get-countries-e-u.md b/app/sdks/0.7.0/server-nodejs/docs/examples/locale/get-countries-e-u.md new file mode 100644 index 0000000000..fc9170dba4 --- /dev/null +++ b/app/sdks/0.7.0/server-nodejs/docs/examples/locale/get-countries-e-u.md @@ -0,0 +1,20 @@ +const sdk = require('node-appwrite'); + +// Init SDK +let client = new sdk.Client(); + +let locale = new sdk.Locale(client); + +client + .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID + .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key +; + +let promise = locale.getCountriesEU(); + +promise.then(function (response) { + console.log(response); +}, function (error) { + console.log(error); +}); \ No newline at end of file diff --git a/app/sdks/0.7.0/server-nodejs/docs/examples/locale/get-countries-phones.md b/app/sdks/0.7.0/server-nodejs/docs/examples/locale/get-countries-phones.md new file mode 100644 index 0000000000..42be901677 --- /dev/null +++ b/app/sdks/0.7.0/server-nodejs/docs/examples/locale/get-countries-phones.md @@ -0,0 +1,20 @@ +const sdk = require('node-appwrite'); + +// Init SDK +let client = new sdk.Client(); + +let locale = new sdk.Locale(client); + +client + .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID + .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key +; + +let promise = locale.getCountriesPhones(); + +promise.then(function (response) { + console.log(response); +}, function (error) { + console.log(error); +}); \ No newline at end of file diff --git a/app/sdks/0.7.0/server-nodejs/docs/examples/locale/get-countries.md b/app/sdks/0.7.0/server-nodejs/docs/examples/locale/get-countries.md new file mode 100644 index 0000000000..437c9bb502 --- /dev/null +++ b/app/sdks/0.7.0/server-nodejs/docs/examples/locale/get-countries.md @@ -0,0 +1,20 @@ +const sdk = require('node-appwrite'); + +// Init SDK +let client = new sdk.Client(); + +let locale = new sdk.Locale(client); + +client + .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID + .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key +; + +let promise = locale.getCountries(); + +promise.then(function (response) { + console.log(response); +}, function (error) { + console.log(error); +}); \ No newline at end of file diff --git a/app/sdks/0.7.0/server-nodejs/docs/examples/locale/get-currencies.md b/app/sdks/0.7.0/server-nodejs/docs/examples/locale/get-currencies.md new file mode 100644 index 0000000000..1b7d605760 --- /dev/null +++ b/app/sdks/0.7.0/server-nodejs/docs/examples/locale/get-currencies.md @@ -0,0 +1,20 @@ +const sdk = require('node-appwrite'); + +// Init SDK +let client = new sdk.Client(); + +let locale = new sdk.Locale(client); + +client + .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID + .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key +; + +let promise = locale.getCurrencies(); + +promise.then(function (response) { + console.log(response); +}, function (error) { + console.log(error); +}); \ No newline at end of file diff --git a/app/sdks/0.7.0/server-nodejs/docs/examples/locale/get.md b/app/sdks/0.7.0/server-nodejs/docs/examples/locale/get.md new file mode 100644 index 0000000000..2f2eb95d90 --- /dev/null +++ b/app/sdks/0.7.0/server-nodejs/docs/examples/locale/get.md @@ -0,0 +1,20 @@ +const sdk = require('node-appwrite'); + +// Init SDK +let client = new sdk.Client(); + +let locale = new sdk.Locale(client); + +client + .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID + .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key +; + +let promise = locale.get(); + +promise.then(function (response) { + console.log(response); +}, function (error) { + console.log(error); +}); \ No newline at end of file diff --git a/app/sdks/0.7.0/server-nodejs/docs/examples/storage/create-file.md b/app/sdks/0.7.0/server-nodejs/docs/examples/storage/create-file.md new file mode 100644 index 0000000000..1eda9fd868 --- /dev/null +++ b/app/sdks/0.7.0/server-nodejs/docs/examples/storage/create-file.md @@ -0,0 +1,21 @@ +const sdk = require('node-appwrite'); +const fs = require('fs'); + +// Init SDK +let client = new sdk.Client(); + +let storage = new sdk.Storage(client); + +client + .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID + .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key +; + +let promise = storage.createFile(fs.createReadStream(__dirname + '/file.png')), [], []); + +promise.then(function (response) { + console.log(response); +}, function (error) { + console.log(error); +}); \ No newline at end of file diff --git a/app/sdks/0.7.0/server-nodejs/docs/examples/storage/delete-file.md b/app/sdks/0.7.0/server-nodejs/docs/examples/storage/delete-file.md new file mode 100644 index 0000000000..9ce0ff7f2e --- /dev/null +++ b/app/sdks/0.7.0/server-nodejs/docs/examples/storage/delete-file.md @@ -0,0 +1,20 @@ +const sdk = require('node-appwrite'); + +// Init SDK +let client = new sdk.Client(); + +let storage = new sdk.Storage(client); + +client + .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID + .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key +; + +let promise = storage.deleteFile('[FILE_ID]'); + +promise.then(function (response) { + console.log(response); +}, function (error) { + console.log(error); +}); \ No newline at end of file diff --git a/app/sdks/0.7.0/server-nodejs/docs/examples/storage/get-file-download.md b/app/sdks/0.7.0/server-nodejs/docs/examples/storage/get-file-download.md new file mode 100644 index 0000000000..1683ed87e0 --- /dev/null +++ b/app/sdks/0.7.0/server-nodejs/docs/examples/storage/get-file-download.md @@ -0,0 +1,20 @@ +const sdk = require('node-appwrite'); + +// Init SDK +let client = new sdk.Client(); + +let storage = new sdk.Storage(client); + +client + .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID + .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key +; + +let promise = storage.getFileDownload('[FILE_ID]'); + +promise.then(function (response) { + console.log(response); +}, function (error) { + console.log(error); +}); \ No newline at end of file diff --git a/app/sdks/0.7.0/server-nodejs/docs/examples/storage/get-file-preview.md b/app/sdks/0.7.0/server-nodejs/docs/examples/storage/get-file-preview.md new file mode 100644 index 0000000000..771dcd35f0 --- /dev/null +++ b/app/sdks/0.7.0/server-nodejs/docs/examples/storage/get-file-preview.md @@ -0,0 +1,20 @@ +const sdk = require('node-appwrite'); + +// Init SDK +let client = new sdk.Client(); + +let storage = new sdk.Storage(client); + +client + .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID + .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key +; + +let promise = storage.getFilePreview('[FILE_ID]'); + +promise.then(function (response) { + console.log(response); +}, function (error) { + console.log(error); +}); \ No newline at end of file diff --git a/app/sdks/0.7.0/server-nodejs/docs/examples/storage/get-file-view.md b/app/sdks/0.7.0/server-nodejs/docs/examples/storage/get-file-view.md new file mode 100644 index 0000000000..83029ecdee --- /dev/null +++ b/app/sdks/0.7.0/server-nodejs/docs/examples/storage/get-file-view.md @@ -0,0 +1,20 @@ +const sdk = require('node-appwrite'); + +// Init SDK +let client = new sdk.Client(); + +let storage = new sdk.Storage(client); + +client + .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID + .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key +; + +let promise = storage.getFileView('[FILE_ID]'); + +promise.then(function (response) { + console.log(response); +}, function (error) { + console.log(error); +}); \ No newline at end of file diff --git a/app/sdks/0.7.0/server-nodejs/docs/examples/storage/get-file.md b/app/sdks/0.7.0/server-nodejs/docs/examples/storage/get-file.md new file mode 100644 index 0000000000..2a76fdf189 --- /dev/null +++ b/app/sdks/0.7.0/server-nodejs/docs/examples/storage/get-file.md @@ -0,0 +1,20 @@ +const sdk = require('node-appwrite'); + +// Init SDK +let client = new sdk.Client(); + +let storage = new sdk.Storage(client); + +client + .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID + .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key +; + +let promise = storage.getFile('[FILE_ID]'); + +promise.then(function (response) { + console.log(response); +}, function (error) { + console.log(error); +}); \ No newline at end of file diff --git a/app/sdks/0.7.0/server-nodejs/docs/examples/storage/list-files.md b/app/sdks/0.7.0/server-nodejs/docs/examples/storage/list-files.md new file mode 100644 index 0000000000..e11fd95300 --- /dev/null +++ b/app/sdks/0.7.0/server-nodejs/docs/examples/storage/list-files.md @@ -0,0 +1,20 @@ +const sdk = require('node-appwrite'); + +// Init SDK +let client = new sdk.Client(); + +let storage = new sdk.Storage(client); + +client + .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID + .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key +; + +let promise = storage.listFiles(); + +promise.then(function (response) { + console.log(response); +}, function (error) { + console.log(error); +}); \ No newline at end of file diff --git a/app/sdks/0.7.0/server-nodejs/docs/examples/storage/update-file.md b/app/sdks/0.7.0/server-nodejs/docs/examples/storage/update-file.md new file mode 100644 index 0000000000..4726169146 --- /dev/null +++ b/app/sdks/0.7.0/server-nodejs/docs/examples/storage/update-file.md @@ -0,0 +1,20 @@ +const sdk = require('node-appwrite'); + +// Init SDK +let client = new sdk.Client(); + +let storage = new sdk.Storage(client); + +client + .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID + .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key +; + +let promise = storage.updateFile('[FILE_ID]', [], []); + +promise.then(function (response) { + console.log(response); +}, function (error) { + console.log(error); +}); \ No newline at end of file diff --git a/app/sdks/0.7.0/server-nodejs/docs/examples/teams/create-membership.md b/app/sdks/0.7.0/server-nodejs/docs/examples/teams/create-membership.md new file mode 100644 index 0000000000..cd17042e58 --- /dev/null +++ b/app/sdks/0.7.0/server-nodejs/docs/examples/teams/create-membership.md @@ -0,0 +1,20 @@ +const sdk = require('node-appwrite'); + +// Init SDK +let client = new sdk.Client(); + +let teams = new sdk.Teams(client); + +client + .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID + .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key +; + +let promise = teams.createMembership('[TEAM_ID]', 'email@example.com', [], 'https://example.com'); + +promise.then(function (response) { + console.log(response); +}, function (error) { + console.log(error); +}); \ No newline at end of file diff --git a/app/sdks/0.7.0/server-nodejs/docs/examples/teams/create.md b/app/sdks/0.7.0/server-nodejs/docs/examples/teams/create.md new file mode 100644 index 0000000000..c0d0611a49 --- /dev/null +++ b/app/sdks/0.7.0/server-nodejs/docs/examples/teams/create.md @@ -0,0 +1,20 @@ +const sdk = require('node-appwrite'); + +// Init SDK +let client = new sdk.Client(); + +let teams = new sdk.Teams(client); + +client + .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID + .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key +; + +let promise = teams.create('[NAME]'); + +promise.then(function (response) { + console.log(response); +}, function (error) { + console.log(error); +}); \ No newline at end of file diff --git a/app/sdks/0.7.0/server-nodejs/docs/examples/teams/delete-membership.md b/app/sdks/0.7.0/server-nodejs/docs/examples/teams/delete-membership.md new file mode 100644 index 0000000000..f9a76f3ec0 --- /dev/null +++ b/app/sdks/0.7.0/server-nodejs/docs/examples/teams/delete-membership.md @@ -0,0 +1,20 @@ +const sdk = require('node-appwrite'); + +// Init SDK +let client = new sdk.Client(); + +let teams = new sdk.Teams(client); + +client + .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID + .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key +; + +let promise = teams.deleteMembership('[TEAM_ID]', '[INVITE_ID]'); + +promise.then(function (response) { + console.log(response); +}, function (error) { + console.log(error); +}); \ No newline at end of file diff --git a/app/sdks/0.7.0/server-nodejs/docs/examples/teams/delete.md b/app/sdks/0.7.0/server-nodejs/docs/examples/teams/delete.md new file mode 100644 index 0000000000..e833fdfb9b --- /dev/null +++ b/app/sdks/0.7.0/server-nodejs/docs/examples/teams/delete.md @@ -0,0 +1,20 @@ +const sdk = require('node-appwrite'); + +// Init SDK +let client = new sdk.Client(); + +let teams = new sdk.Teams(client); + +client + .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID + .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key +; + +let promise = teams.delete('[TEAM_ID]'); + +promise.then(function (response) { + console.log(response); +}, function (error) { + console.log(error); +}); \ No newline at end of file diff --git a/app/sdks/0.7.0/server-nodejs/docs/examples/teams/get-memberships.md b/app/sdks/0.7.0/server-nodejs/docs/examples/teams/get-memberships.md new file mode 100644 index 0000000000..75cdf38e5c --- /dev/null +++ b/app/sdks/0.7.0/server-nodejs/docs/examples/teams/get-memberships.md @@ -0,0 +1,20 @@ +const sdk = require('node-appwrite'); + +// Init SDK +let client = new sdk.Client(); + +let teams = new sdk.Teams(client); + +client + .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID + .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key +; + +let promise = teams.getMemberships('[TEAM_ID]'); + +promise.then(function (response) { + console.log(response); +}, function (error) { + console.log(error); +}); \ No newline at end of file diff --git a/app/sdks/0.7.0/server-nodejs/docs/examples/teams/get.md b/app/sdks/0.7.0/server-nodejs/docs/examples/teams/get.md new file mode 100644 index 0000000000..a51322df27 --- /dev/null +++ b/app/sdks/0.7.0/server-nodejs/docs/examples/teams/get.md @@ -0,0 +1,20 @@ +const sdk = require('node-appwrite'); + +// Init SDK +let client = new sdk.Client(); + +let teams = new sdk.Teams(client); + +client + .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID + .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key +; + +let promise = teams.get('[TEAM_ID]'); + +promise.then(function (response) { + console.log(response); +}, function (error) { + console.log(error); +}); \ No newline at end of file diff --git a/app/sdks/0.7.0/server-nodejs/docs/examples/teams/list.md b/app/sdks/0.7.0/server-nodejs/docs/examples/teams/list.md new file mode 100644 index 0000000000..259bbd22b2 --- /dev/null +++ b/app/sdks/0.7.0/server-nodejs/docs/examples/teams/list.md @@ -0,0 +1,20 @@ +const sdk = require('node-appwrite'); + +// Init SDK +let client = new sdk.Client(); + +let teams = new sdk.Teams(client); + +client + .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID + .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key +; + +let promise = teams.list(); + +promise.then(function (response) { + console.log(response); +}, function (error) { + console.log(error); +}); \ No newline at end of file diff --git a/app/sdks/0.7.0/server-nodejs/docs/examples/teams/update.md b/app/sdks/0.7.0/server-nodejs/docs/examples/teams/update.md new file mode 100644 index 0000000000..2118e8a90f --- /dev/null +++ b/app/sdks/0.7.0/server-nodejs/docs/examples/teams/update.md @@ -0,0 +1,20 @@ +const sdk = require('node-appwrite'); + +// Init SDK +let client = new sdk.Client(); + +let teams = new sdk.Teams(client); + +client + .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID + .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key +; + +let promise = teams.update('[TEAM_ID]', '[NAME]'); + +promise.then(function (response) { + console.log(response); +}, function (error) { + console.log(error); +}); \ No newline at end of file diff --git a/app/sdks/0.7.0/server-nodejs/docs/examples/users/create.md b/app/sdks/0.7.0/server-nodejs/docs/examples/users/create.md new file mode 100644 index 0000000000..83704cbd9d --- /dev/null +++ b/app/sdks/0.7.0/server-nodejs/docs/examples/users/create.md @@ -0,0 +1,20 @@ +const sdk = require('node-appwrite'); + +// Init SDK +let client = new sdk.Client(); + +let users = new sdk.Users(client); + +client + .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID + .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key +; + +let promise = users.create('email@example.com', 'password'); + +promise.then(function (response) { + console.log(response); +}, function (error) { + console.log(error); +}); \ No newline at end of file diff --git a/app/sdks/0.7.0/server-nodejs/docs/examples/users/delete-session.md b/app/sdks/0.7.0/server-nodejs/docs/examples/users/delete-session.md new file mode 100644 index 0000000000..22308d4fa6 --- /dev/null +++ b/app/sdks/0.7.0/server-nodejs/docs/examples/users/delete-session.md @@ -0,0 +1,20 @@ +const sdk = require('node-appwrite'); + +// Init SDK +let client = new sdk.Client(); + +let users = new sdk.Users(client); + +client + .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID + .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key +; + +let promise = users.deleteSession('[USER_ID]', '[SESSION_ID]'); + +promise.then(function (response) { + console.log(response); +}, function (error) { + console.log(error); +}); \ No newline at end of file diff --git a/app/sdks/0.7.0/server-nodejs/docs/examples/users/delete-sessions.md b/app/sdks/0.7.0/server-nodejs/docs/examples/users/delete-sessions.md new file mode 100644 index 0000000000..75f8f96bda --- /dev/null +++ b/app/sdks/0.7.0/server-nodejs/docs/examples/users/delete-sessions.md @@ -0,0 +1,20 @@ +const sdk = require('node-appwrite'); + +// Init SDK +let client = new sdk.Client(); + +let users = new sdk.Users(client); + +client + .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID + .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key +; + +let promise = users.deleteSessions('[USER_ID]'); + +promise.then(function (response) { + console.log(response); +}, function (error) { + console.log(error); +}); \ No newline at end of file diff --git a/app/sdks/0.7.0/server-nodejs/docs/examples/users/get-logs.md b/app/sdks/0.7.0/server-nodejs/docs/examples/users/get-logs.md new file mode 100644 index 0000000000..1287b5ef5f --- /dev/null +++ b/app/sdks/0.7.0/server-nodejs/docs/examples/users/get-logs.md @@ -0,0 +1,20 @@ +const sdk = require('node-appwrite'); + +// Init SDK +let client = new sdk.Client(); + +let users = new sdk.Users(client); + +client + .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID + .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key +; + +let promise = users.getLogs('[USER_ID]'); + +promise.then(function (response) { + console.log(response); +}, function (error) { + console.log(error); +}); \ No newline at end of file diff --git a/app/sdks/0.7.0/server-nodejs/docs/examples/users/get-prefs.md b/app/sdks/0.7.0/server-nodejs/docs/examples/users/get-prefs.md new file mode 100644 index 0000000000..088e6b0811 --- /dev/null +++ b/app/sdks/0.7.0/server-nodejs/docs/examples/users/get-prefs.md @@ -0,0 +1,20 @@ +const sdk = require('node-appwrite'); + +// Init SDK +let client = new sdk.Client(); + +let users = new sdk.Users(client); + +client + .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID + .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key +; + +let promise = users.getPrefs('[USER_ID]'); + +promise.then(function (response) { + console.log(response); +}, function (error) { + console.log(error); +}); \ No newline at end of file diff --git a/app/sdks/0.7.0/server-nodejs/docs/examples/users/get-sessions.md b/app/sdks/0.7.0/server-nodejs/docs/examples/users/get-sessions.md new file mode 100644 index 0000000000..f5ad029ebe --- /dev/null +++ b/app/sdks/0.7.0/server-nodejs/docs/examples/users/get-sessions.md @@ -0,0 +1,20 @@ +const sdk = require('node-appwrite'); + +// Init SDK +let client = new sdk.Client(); + +let users = new sdk.Users(client); + +client + .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID + .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key +; + +let promise = users.getSessions('[USER_ID]'); + +promise.then(function (response) { + console.log(response); +}, function (error) { + console.log(error); +}); \ No newline at end of file diff --git a/app/sdks/0.7.0/server-nodejs/docs/examples/users/get.md b/app/sdks/0.7.0/server-nodejs/docs/examples/users/get.md new file mode 100644 index 0000000000..5b91577284 --- /dev/null +++ b/app/sdks/0.7.0/server-nodejs/docs/examples/users/get.md @@ -0,0 +1,20 @@ +const sdk = require('node-appwrite'); + +// Init SDK +let client = new sdk.Client(); + +let users = new sdk.Users(client); + +client + .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID + .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key +; + +let promise = users.get('[USER_ID]'); + +promise.then(function (response) { + console.log(response); +}, function (error) { + console.log(error); +}); \ No newline at end of file diff --git a/app/sdks/0.7.0/server-nodejs/docs/examples/users/list.md b/app/sdks/0.7.0/server-nodejs/docs/examples/users/list.md new file mode 100644 index 0000000000..0bc83b06bf --- /dev/null +++ b/app/sdks/0.7.0/server-nodejs/docs/examples/users/list.md @@ -0,0 +1,20 @@ +const sdk = require('node-appwrite'); + +// Init SDK +let client = new sdk.Client(); + +let users = new sdk.Users(client); + +client + .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID + .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key +; + +let promise = users.list(); + +promise.then(function (response) { + console.log(response); +}, function (error) { + console.log(error); +}); \ No newline at end of file diff --git a/app/sdks/0.7.0/server-nodejs/docs/examples/users/update-prefs.md b/app/sdks/0.7.0/server-nodejs/docs/examples/users/update-prefs.md new file mode 100644 index 0000000000..7d1011d6be --- /dev/null +++ b/app/sdks/0.7.0/server-nodejs/docs/examples/users/update-prefs.md @@ -0,0 +1,20 @@ +const sdk = require('node-appwrite'); + +// Init SDK +let client = new sdk.Client(); + +let users = new sdk.Users(client); + +client + .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID + .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key +; + +let promise = users.updatePrefs('[USER_ID]', {}); + +promise.then(function (response) { + console.log(response); +}, function (error) { + console.log(error); +}); \ No newline at end of file diff --git a/app/sdks/0.7.0/server-nodejs/docs/examples/users/update-status.md b/app/sdks/0.7.0/server-nodejs/docs/examples/users/update-status.md new file mode 100644 index 0000000000..86f54381da --- /dev/null +++ b/app/sdks/0.7.0/server-nodejs/docs/examples/users/update-status.md @@ -0,0 +1,20 @@ +const sdk = require('node-appwrite'); + +// Init SDK +let client = new sdk.Client(); + +let users = new sdk.Users(client); + +client + .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID + .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key +; + +let promise = users.updateStatus('[USER_ID]', '1'); + +promise.then(function (response) { + console.log(response); +}, function (error) { + console.log(error); +}); \ No newline at end of file diff --git a/app/sdks/0.7.0/server-nodejs/index.js b/app/sdks/0.7.0/server-nodejs/index.js new file mode 100644 index 0000000000..deb571190d --- /dev/null +++ b/app/sdks/0.7.0/server-nodejs/index.js @@ -0,0 +1,21 @@ +const Client = require('./lib/client.js'); +const Avatars = require('./lib/services/avatars.js'); +const Database = require('./lib/services/database.js'); +const Functions = require('./lib/services/functions.js'); +const Health = require('./lib/services/health.js'); +const Locale = require('./lib/services/locale.js'); +const Storage = require('./lib/services/storage.js'); +const Teams = require('./lib/services/teams.js'); +const Users = require('./lib/services/users.js'); + +module.exports = { + Client, + Avatars, + Database, + Functions, + Health, + Locale, + Storage, + Teams, + Users, +}; \ No newline at end of file diff --git a/app/sdks/0.7.0/server-nodejs/lib/client.js b/app/sdks/0.7.0/server-nodejs/lib/client.js new file mode 100644 index 0000000000..add1956056 --- /dev/null +++ b/app/sdks/0.7.0/server-nodejs/lib/client.js @@ -0,0 +1,135 @@ +const URL = require('url').URL; +const request = require('request-promise-native'); + +class Client { + + constructor() { + this.endpoint = 'https://appwrite.io/v1'; + this.headers = { + 'content-type': '', + 'x-sdk-version': 'appwrite:nodejs:1.1.0', + }; + this.selfSigned = false; + } + + /** + * Set Project + * + * Your project ID + * + * @param string value + * + * @return self + */ + setProject(value) { + this.addHeader('X-Appwrite-Project', value); + + return this; + } + + /** + * Set Key + * + * Your secret API key + * + * @param string value + * + * @return self + */ + setKey(value) { + this.addHeader('X-Appwrite-Key', value); + + return this; + } + + /** + * Set Locale + * + * @param string value + * + * @return self + */ + setLocale(value) { + this.addHeader('X-Appwrite-Locale', value); + + return this; + } + + /*** + * @param bool status + * @return this + */ + setSelfSigned(status = true) { + this.selfSigned = status; + + return this; + } + + /*** + * @param endpoint + * @return this + */ + setEndpoint(endpoint) + { + this.endpoint = endpoint; + + return this; + } + + /** + * @param key string + * @param value string + */ + addHeader(key, value) { + this.headers[key.toLowerCase()] = value.toLowerCase(); + + return this; + } + + async call(method, path = '', headers = {}, params = {}) { + if(this.selfSigned) { // Allow self signed requests + process.env["NODE_TLS_REJECT_UNAUTHORIZED"] = 0; + } + + headers = Object.assign(this.headers, headers); + + let contentType = headers['content-type'].toLowerCase(); + let options = { + method: method.toUpperCase(), + uri: this.endpoint + path, + qs: (method.toUpperCase() === 'GET') ? params : {}, + headers: headers, + body: (method.toUpperCase() === 'GET' || contentType.startsWith('multipart/form-data')) ? null : params, + json: (contentType.startsWith('application/json')), + formData: (contentType.startsWith('multipart/form-data')) ? this.flatten(params) : null, + }; + + let response = await request(options); + + if(contentType.startsWith('multipart/form-data')) { + response = JSON.parse(response); + } + + return response; + } + + flatten(data, prefix = '') { + let output = {}; + + for (const key in data) { + let value = data[key]; + let finalKey = prefix ? prefix + '[' + key +']' : key; + + if (Array.isArray(value)) { + output = Object.assign(output, this.flatten(value, finalKey)); // @todo: handle name collision here if needed + } + else { + output[finalKey] = value; + } + } + + return output; + } +} + +module.exports = Client; \ No newline at end of file diff --git a/app/sdks/0.7.0/server-nodejs/lib/service.js b/app/sdks/0.7.0/server-nodejs/lib/service.js new file mode 100644 index 0000000000..e799c064be --- /dev/null +++ b/app/sdks/0.7.0/server-nodejs/lib/service.js @@ -0,0 +1,10 @@ +class Service { + /** + * @param client + */ + constructor(client) { + this.client = client; + } +} + +module.exports = Service; \ No newline at end of file diff --git a/app/sdks/0.7.0/server-nodejs/lib/services/avatars.js b/app/sdks/0.7.0/server-nodejs/lib/services/avatars.js new file mode 100644 index 0000000000..c34bdde966 --- /dev/null +++ b/app/sdks/0.7.0/server-nodejs/lib/services/avatars.js @@ -0,0 +1,164 @@ +const Service = require('../service.js'); + +class Avatars extends Service { + + /** + * Get Browser Icon + * + * You can use this endpoint to show different browser icons to your users. + * The code argument receives the browser code as it appears in your user + * /account/sessions endpoint. Use width, height and quality arguments to + * change the output settings. + * + * @param string code + * @param number width + * @param number height + * @param number quality + * @throws Exception + * @return {} + */ + async getBrowser(code, width = 100, height = 100, quality = 100) { + let path = '/avatars/browsers/{code}'.replace(new RegExp('{code}', 'g'), code); + + return await this.client.call('get', path, { + 'content-type': 'application/json', + }, + { + 'width': width, + 'height': height, + 'quality': quality + }); + } + + /** + * Get Credit Card Icon + * + * Need to display your users with your billing method or their payment + * methods? The credit card endpoint will return you the icon of the credit + * card provider you need. Use width, height and quality arguments to change + * the output settings. + * + * @param string code + * @param number width + * @param number height + * @param number quality + * @throws Exception + * @return {} + */ + async getCreditCard(code, width = 100, height = 100, quality = 100) { + let path = '/avatars/credit-cards/{code}'.replace(new RegExp('{code}', 'g'), code); + + return await this.client.call('get', path, { + 'content-type': 'application/json', + }, + { + 'width': width, + 'height': height, + 'quality': quality + }); + } + + /** + * Get Favicon + * + * Use this endpoint to fetch the favorite icon (AKA favicon) of a any remote + * website URL. + * + * @param string url + * @throws Exception + * @return {} + */ + async getFavicon(url) { + let path = '/avatars/favicon'; + + return await this.client.call('get', path, { + 'content-type': 'application/json', + }, + { + 'url': url + }); + } + + /** + * Get Country Flag + * + * You can use this endpoint to show different country flags icons to your + * users. The code argument receives the 2 letter country code. Use width, + * height and quality arguments to change the output settings. + * + * @param string code + * @param number width + * @param number height + * @param number quality + * @throws Exception + * @return {} + */ + async getFlag(code, width = 100, height = 100, quality = 100) { + let path = '/avatars/flags/{code}'.replace(new RegExp('{code}', 'g'), code); + + return await this.client.call('get', path, { + 'content-type': 'application/json', + }, + { + 'width': width, + 'height': height, + 'quality': quality + }); + } + + /** + * Get Image from URL + * + * Use this endpoint to fetch a remote image URL and crop it to any image size + * you want. This endpoint is very useful if you need to crop and display + * remote images in your app or in case you want to make sure a 3rd party + * image is properly served using a TLS protocol. + * + * @param string url + * @param number width + * @param number height + * @throws Exception + * @return {} + */ + async getImage(url, width = 400, height = 400) { + let path = '/avatars/image'; + + return await this.client.call('get', path, { + 'content-type': 'application/json', + }, + { + 'url': url, + 'width': width, + 'height': height + }); + } + + /** + * Get QR Code + * + * Converts a given plain text to a QR code image. You can use the query + * parameters to change the size and style of the resulting image. + * + * @param string text + * @param number size + * @param number margin + * @param number download + * @throws Exception + * @return {} + */ + async getQR(text, size = 400, margin = 1, download = 0) { + let path = '/avatars/qr'; + + return await this.client.call('get', path, { + 'content-type': 'application/json', + }, + { + 'text': text, + 'size': size, + 'margin': margin, + 'download': download + }); + } +} + +module.exports = Avatars; \ No newline at end of file diff --git a/app/sdks/0.7.0/server-nodejs/lib/services/database.js b/app/sdks/0.7.0/server-nodejs/lib/services/database.js new file mode 100644 index 0000000000..ce1c09e391 --- /dev/null +++ b/app/sdks/0.7.0/server-nodejs/lib/services/database.js @@ -0,0 +1,283 @@ +const Service = require('../service.js'); + +class Database extends Service { + + /** + * List Collections + * + * Get a list of all the user collections. You can use the query params to + * filter your results. On admin mode, this endpoint will return a list of all + * of the project collections. [Learn more about different API + * modes](/docs/admin). + * + * @param string search + * @param number limit + * @param number offset + * @param string orderType + * @throws Exception + * @return {} + */ + async listCollections(search = '', limit = 25, offset = 0, orderType = 'ASC') { + let path = '/database/collections'; + + return await this.client.call('get', path, { + 'content-type': 'application/json', + }, + { + 'search': search, + 'limit': limit, + 'offset': offset, + 'orderType': orderType + }); + } + + /** + * Create Collection + * + * Create a new Collection. + * + * @param string name + * @param string[] read + * @param string[] write + * @param string[] rules + * @throws Exception + * @return {} + */ + async createCollection(name, read, write, rules) { + let path = '/database/collections'; + + return await this.client.call('post', path, { + 'content-type': 'application/json', + }, + { + 'name': name, + 'read': read, + 'write': write, + 'rules': rules + }); + } + + /** + * Get Collection + * + * Get collection by its unique ID. This endpoint response returns a JSON + * object with the collection metadata. + * + * @param string collectionId + * @throws Exception + * @return {} + */ + async getCollection(collectionId) { + let path = '/database/collections/{collectionId}'.replace(new RegExp('{collectionId}', 'g'), collectionId); + + return await this.client.call('get', path, { + 'content-type': 'application/json', + }, + { + }); + } + + /** + * Update Collection + * + * Update collection by its unique ID. + * + * @param string collectionId + * @param string name + * @param string[] read + * @param string[] write + * @param string[] rules + * @throws Exception + * @return {} + */ + async updateCollection(collectionId, name, read, write, rules = []) { + let path = '/database/collections/{collectionId}'.replace(new RegExp('{collectionId}', 'g'), collectionId); + + return await this.client.call('put', path, { + 'content-type': 'application/json', + }, + { + 'name': name, + 'read': read, + 'write': write, + 'rules': rules + }); + } + + /** + * Delete Collection + * + * Delete a collection by its unique ID. Only users with write permissions + * have access to delete this resource. + * + * @param string collectionId + * @throws Exception + * @return {} + */ + async deleteCollection(collectionId) { + let path = '/database/collections/{collectionId}'.replace(new RegExp('{collectionId}', 'g'), collectionId); + + return await this.client.call('delete', path, { + 'content-type': 'application/json', + }, + { + }); + } + + /** + * List Documents + * + * Get a list of all the user documents. You can use the query params to + * filter your results. On admin mode, this endpoint will return a list of all + * of the project documents. [Learn more about different API + * modes](/docs/admin). + * + * @param string collectionId + * @param string[] filters + * @param number offset + * @param number limit + * @param string orderField + * @param string orderType + * @param string orderCast + * @param string search + * @param number first + * @param number last + * @throws Exception + * @return {} + */ + async listDocuments(collectionId, filters = [], offset = 0, limit = 50, orderField = '$id', orderType = 'ASC', orderCast = 'string', search = '', first = 0, last = 0) { + let path = '/database/collections/{collectionId}/documents'.replace(new RegExp('{collectionId}', 'g'), collectionId); + + return await this.client.call('get', path, { + 'content-type': 'application/json', + }, + { + 'filters': filters, + 'offset': offset, + 'limit': limit, + 'orderField': orderField, + 'orderType': orderType, + 'orderCast': orderCast, + 'search': search, + 'first': first, + 'last': last + }); + } + + /** + * Create Document + * + * Create a new Document. + * + * @param string collectionId + * @param object data + * @param string[] read + * @param string[] write + * @param string parentDocument + * @param string parentProperty + * @param string parentPropertyType + * @throws Exception + * @return {} + */ + async createDocument(collectionId, data, read, write, parentDocument = '', parentProperty = '', parentPropertyType = 'assign') { + let path = '/database/collections/{collectionId}/documents'.replace(new RegExp('{collectionId}', 'g'), collectionId); + + return await this.client.call('post', path, { + 'content-type': 'application/json', + }, + { + 'data': data, + 'read': read, + 'write': write, + 'parentDocument': parentDocument, + 'parentProperty': parentProperty, + 'parentPropertyType': parentPropertyType + }); + } + + /** + * Get Document + * + * Get document by its unique ID. This endpoint response returns a JSON object + * with the document data. + * + * @param string collectionId + * @param string documentId + * @throws Exception + * @return {} + */ + async getDocument(collectionId, documentId) { + let path = '/database/collections/{collectionId}/documents/{documentId}'.replace(new RegExp('{collectionId}', 'g'), collectionId).replace(new RegExp('{documentId}', 'g'), documentId); + + return await this.client.call('get', path, { + 'content-type': 'application/json', + }, + { + }); + } + + /** + * Update Document + * + * @param string collectionId + * @param string documentId + * @param object data + * @param string[] read + * @param string[] write + * @throws Exception + * @return {} + */ + async updateDocument(collectionId, documentId, data, read, write) { + let path = '/database/collections/{collectionId}/documents/{documentId}'.replace(new RegExp('{collectionId}', 'g'), collectionId).replace(new RegExp('{documentId}', 'g'), documentId); + + return await this.client.call('patch', path, { + 'content-type': 'application/json', + }, + { + 'data': data, + 'read': read, + 'write': write + }); + } + + /** + * Delete Document + * + * Delete document by its unique ID. This endpoint deletes only the parent + * documents, his attributes and relations to other documents. Child documents + * **will not** be deleted. + * + * @param string collectionId + * @param string documentId + * @throws Exception + * @return {} + */ + async deleteDocument(collectionId, documentId) { + let path = '/database/collections/{collectionId}/documents/{documentId}'.replace(new RegExp('{collectionId}', 'g'), collectionId).replace(new RegExp('{documentId}', 'g'), documentId); + + return await this.client.call('delete', path, { + 'content-type': 'application/json', + }, + { + }); + } + + /** + * Get Collection Logs + * + * @param string collectionId + * @throws Exception + * @return {} + */ + async getCollectionLogs(collectionId) { + let path = '/database/collections/{collectionId}/logs'.replace(new RegExp('{collectionId}', 'g'), collectionId); + + return await this.client.call('get', path, { + 'content-type': 'application/json', + }, + { + }); + } +} + +module.exports = Database; \ No newline at end of file diff --git a/app/sdks/0.7.0/server-nodejs/lib/services/functions.js b/app/sdks/0.7.0/server-nodejs/lib/services/functions.js new file mode 100644 index 0000000000..0dfd8d945d --- /dev/null +++ b/app/sdks/0.7.0/server-nodejs/lib/services/functions.js @@ -0,0 +1,282 @@ +const Service = require('../service.js'); + +class Functions extends Service { + + /** + * List Functions + * + * @param string search + * @param number limit + * @param number offset + * @param string orderType + * @throws Exception + * @return {} + */ + async list(search = '', limit = 25, offset = 0, orderType = 'ASC') { + let path = '/functions'; + + return await this.client.call('get', path, { + 'content-type': 'application/json', + }, + { + 'search': search, + 'limit': limit, + 'offset': offset, + 'orderType': orderType + }); + } + + /** + * Create Function + * + * @param string name + * @param object vars + * @param string[] events + * @param string schedule + * @param number timeout + * @throws Exception + * @return {} + */ + async create(name, vars = [], events = [], schedule = '', timeout = 15) { + let path = '/functions'; + + return await this.client.call('post', path, { + 'content-type': 'application/json', + }, + { + 'name': name, + 'vars': vars, + 'events': events, + 'schedule': schedule, + 'timeout': timeout + }); + } + + /** + * Get Function + * + * @param string functionId + * @throws Exception + * @return {} + */ + async get(functionId) { + let path = '/functions/{functionId}'.replace(new RegExp('{functionId}', 'g'), functionId); + + return await this.client.call('get', path, { + 'content-type': 'application/json', + }, + { + }); + } + + /** + * Update Function + * + * @param string functionId + * @param string name + * @param object vars + * @param string[] events + * @param string schedule + * @param number timeout + * @throws Exception + * @return {} + */ + async update(functionId, name, vars = [], events = [], schedule = '', timeout = 15) { + let path = '/functions/{functionId}'.replace(new RegExp('{functionId}', 'g'), functionId); + + return await this.client.call('put', path, { + 'content-type': 'application/json', + }, + { + 'name': name, + 'vars': vars, + 'events': events, + 'schedule': schedule, + 'timeout': timeout + }); + } + + /** + * Delete Function + * + * @param string functionId + * @throws Exception + * @return {} + */ + async delete(functionId) { + let path = '/functions/{functionId}'.replace(new RegExp('{functionId}', 'g'), functionId); + + return await this.client.call('delete', path, { + 'content-type': 'application/json', + }, + { + }); + } + + /** + * List Executions + * + * @param string functionId + * @param string search + * @param number limit + * @param number offset + * @param string orderType + * @throws Exception + * @return {} + */ + async listExecutions(functionId, search = '', limit = 25, offset = 0, orderType = 'ASC') { + let path = '/functions/{functionId}/executions'.replace(new RegExp('{functionId}', 'g'), functionId); + + return await this.client.call('get', path, { + 'content-type': 'application/json', + }, + { + 'search': search, + 'limit': limit, + 'offset': offset, + 'orderType': orderType + }); + } + + /** + * Create Execution + * + * @param string functionId + * @param number async + * @throws Exception + * @return {} + */ + async createExecution(functionId, async = 1) { + let path = '/functions/{functionId}/executions'.replace(new RegExp('{functionId}', 'g'), functionId); + + return await this.client.call('post', path, { + 'content-type': 'application/json', + }, + { + 'async': async + }); + } + + /** + * Get Execution + * + * @param string functionId + * @param string executionId + * @throws Exception + * @return {} + */ + async getExecution(functionId, executionId) { + let path = '/functions/{functionId}/executions/{executionId}'.replace(new RegExp('{functionId}', 'g'), functionId).replace(new RegExp('{executionId}', 'g'), executionId); + + return await this.client.call('get', path, { + 'content-type': 'application/json', + }, + { + }); + } + + /** + * Update Function Tag + * + * @param string functionId + * @param string tag + * @throws Exception + * @return {} + */ + async updateTag(functionId, tag) { + let path = '/functions/{functionId}/tag'.replace(new RegExp('{functionId}', 'g'), functionId); + + return await this.client.call('patch', path, { + 'content-type': 'application/json', + }, + { + 'tag': tag + }); + } + + /** + * List Tags + * + * @param string functionId + * @param string search + * @param number limit + * @param number offset + * @param string orderType + * @throws Exception + * @return {} + */ + async listTags(functionId, search = '', limit = 25, offset = 0, orderType = 'ASC') { + let path = '/functions/{functionId}/tags'.replace(new RegExp('{functionId}', 'g'), functionId); + + return await this.client.call('get', path, { + 'content-type': 'application/json', + }, + { + 'search': search, + 'limit': limit, + 'offset': offset, + 'orderType': orderType + }); + } + + /** + * Create Tag + * + * @param string functionId + * @param string env + * @param string command + * @param string code + * @throws Exception + * @return {} + */ + async createTag(functionId, env, command, code) { + let path = '/functions/{functionId}/tags'.replace(new RegExp('{functionId}', 'g'), functionId); + + return await this.client.call('post', path, { + 'content-type': 'application/json', + }, + { + 'env': env, + 'command': command, + 'code': code + }); + } + + /** + * Get Tag + * + * @param string functionId + * @param string tagId + * @throws Exception + * @return {} + */ + async getTag(functionId, tagId) { + let path = '/functions/{functionId}/tags/{tagId}'.replace(new RegExp('{functionId}', 'g'), functionId).replace(new RegExp('{tagId}', 'g'), tagId); + + return await this.client.call('get', path, { + 'content-type': 'application/json', + }, + { + }); + } + + /** + * Delete Tag + * + * @param string functionId + * @param string tagId + * @throws Exception + * @return {} + */ + async deleteTag(functionId, tagId) { + let path = '/functions/{functionId}/tags/{tagId}'.replace(new RegExp('{functionId}', 'g'), functionId).replace(new RegExp('{tagId}', 'g'), tagId); + + return await this.client.call('delete', path, { + 'content-type': 'application/json', + }, + { + }); + } +} + +module.exports = Functions; \ No newline at end of file diff --git a/app/sdks/0.7.0/server-nodejs/lib/services/health.js b/app/sdks/0.7.0/server-nodejs/lib/services/health.js new file mode 100644 index 0000000000..a0aed052ce --- /dev/null +++ b/app/sdks/0.7.0/server-nodejs/lib/services/health.js @@ -0,0 +1,233 @@ +const Service = require('../service.js'); + +class Health extends Service { + + /** + * Get HTTP + * + * Check the Appwrite HTTP server is up and responsive. + * + * @throws Exception + * @return {} + */ + async get() { + let path = '/health'; + + return await this.client.call('get', path, { + 'content-type': 'application/json', + }, + { + }); + } + + /** + * Get Anti virus + * + * Check the Appwrite Anti Virus server is up and connection is successful. + * + * @throws Exception + * @return {} + */ + async getAntiVirus() { + let path = '/health/anti-virus'; + + return await this.client.call('get', path, { + 'content-type': 'application/json', + }, + { + }); + } + + /** + * Get Cache + * + * Check the Appwrite in-memory cache server is up and connection is + * successful. + * + * @throws Exception + * @return {} + */ + async getCache() { + let path = '/health/cache'; + + return await this.client.call('get', path, { + 'content-type': 'application/json', + }, + { + }); + } + + /** + * Get DB + * + * Check the Appwrite database server is up and connection is successful. + * + * @throws Exception + * @return {} + */ + async getDB() { + let path = '/health/db'; + + return await this.client.call('get', path, { + 'content-type': 'application/json', + }, + { + }); + } + + /** + * Get Certificate Queue + * + * Get the number of certificates that are waiting to be issued against + * [Letsencrypt](https://letsencrypt.org/) in the Appwrite internal queue + * server. + * + * @throws Exception + * @return {} + */ + async getQueueCertificates() { + let path = '/health/queue/certificates'; + + return await this.client.call('get', path, { + 'content-type': 'application/json', + }, + { + }); + } + + /** + * Get Functions Queue + * + * @throws Exception + * @return {} + */ + async getQueueFunctions() { + let path = '/health/queue/functions'; + + return await this.client.call('get', path, { + 'content-type': 'application/json', + }, + { + }); + } + + /** + * Get Logs Queue + * + * Get the number of logs that are waiting to be processed in the Appwrite + * internal queue server. + * + * @throws Exception + * @return {} + */ + async getQueueLogs() { + let path = '/health/queue/logs'; + + return await this.client.call('get', path, { + 'content-type': 'application/json', + }, + { + }); + } + + /** + * Get Tasks Queue + * + * Get the number of tasks that are waiting to be processed in the Appwrite + * internal queue server. + * + * @throws Exception + * @return {} + */ + async getQueueTasks() { + let path = '/health/queue/tasks'; + + return await this.client.call('get', path, { + 'content-type': 'application/json', + }, + { + }); + } + + /** + * Get Usage Queue + * + * Get the number of usage stats that are waiting to be processed in the + * Appwrite internal queue server. + * + * @throws Exception + * @return {} + */ + async getQueueUsage() { + let path = '/health/queue/usage'; + + return await this.client.call('get', path, { + 'content-type': 'application/json', + }, + { + }); + } + + /** + * Get Webhooks Queue + * + * Get the number of webhooks that are waiting to be processed in the Appwrite + * internal queue server. + * + * @throws Exception + * @return {} + */ + async getQueueWebhooks() { + let path = '/health/queue/webhooks'; + + return await this.client.call('get', path, { + 'content-type': 'application/json', + }, + { + }); + } + + /** + * Get Local Storage + * + * Check the Appwrite local storage device is up and connection is successful. + * + * @throws Exception + * @return {} + */ + async getStorageLocal() { + let path = '/health/storage/local'; + + return await this.client.call('get', path, { + 'content-type': 'application/json', + }, + { + }); + } + + /** + * Get Time + * + * Check the Appwrite server time is synced with Google remote NTP server. We + * use this technology to smoothly handle leap seconds with no disruptive + * events. The [Network Time + * Protocol](https://en.wikipedia.org/wiki/Network_Time_Protocol) (NTP) is + * used by hundreds of millions of computers and devices to synchronize their + * clocks over the Internet. If your computer sets its own clock, it likely + * uses NTP. + * + * @throws Exception + * @return {} + */ + async getTime() { + let path = '/health/time'; + + return await this.client.call('get', path, { + 'content-type': 'application/json', + }, + { + }); + } +} + +module.exports = Health; \ No newline at end of file diff --git a/app/sdks/0.7.0/server-nodejs/lib/services/locale.js b/app/sdks/0.7.0/server-nodejs/lib/services/locale.js new file mode 100644 index 0000000000..bc1efa4688 --- /dev/null +++ b/app/sdks/0.7.0/server-nodejs/lib/services/locale.js @@ -0,0 +1,125 @@ +const Service = require('../service.js'); + +class Locale extends Service { + + /** + * Get User Locale + * + * Get the current user location based on IP. Returns an object with user + * country code, country name, continent name, continent code, ip address and + * suggested currency. You can use the locale header to get the data in a + * supported language. + * + * ([IP Geolocation by DB-IP](https://db-ip.com)) + * + * @throws Exception + * @return {} + */ + async get() { + let path = '/locale'; + + return await this.client.call('get', path, { + 'content-type': 'application/json', + }, + { + }); + } + + /** + * List Continents + * + * List of all continents. You can use the locale header to get the data in a + * supported language. + * + * @throws Exception + * @return {} + */ + async getContinents() { + let path = '/locale/continents'; + + return await this.client.call('get', path, { + 'content-type': 'application/json', + }, + { + }); + } + + /** + * List Countries + * + * List of all countries. You can use the locale header to get the data in a + * supported language. + * + * @throws Exception + * @return {} + */ + async getCountries() { + let path = '/locale/countries'; + + return await this.client.call('get', path, { + 'content-type': 'application/json', + }, + { + }); + } + + /** + * List EU Countries + * + * List of all countries that are currently members of the EU. You can use the + * locale header to get the data in a supported language. + * + * @throws Exception + * @return {} + */ + async getCountriesEU() { + let path = '/locale/countries/eu'; + + return await this.client.call('get', path, { + 'content-type': 'application/json', + }, + { + }); + } + + /** + * List Countries Phone Codes + * + * List of all countries phone codes. You can use the locale header to get the + * data in a supported language. + * + * @throws Exception + * @return {} + */ + async getCountriesPhones() { + let path = '/locale/countries/phones'; + + return await this.client.call('get', path, { + 'content-type': 'application/json', + }, + { + }); + } + + /** + * List Currencies + * + * List of all currencies, including currency symol, name, plural, and decimal + * digits for all major and minor currencies. You can use the locale header to + * get the data in a supported language. + * + * @throws Exception + * @return {} + */ + async getCurrencies() { + let path = '/locale/currencies'; + + return await this.client.call('get', path, { + 'content-type': 'application/json', + }, + { + }); + } +} + +module.exports = Locale; \ No newline at end of file diff --git a/app/sdks/0.7.0/server-nodejs/lib/services/storage.js b/app/sdks/0.7.0/server-nodejs/lib/services/storage.js new file mode 100644 index 0000000000..2b670db31a --- /dev/null +++ b/app/sdks/0.7.0/server-nodejs/lib/services/storage.js @@ -0,0 +1,199 @@ +const Service = require('../service.js'); + +class Storage extends Service { + + /** + * List Files + * + * Get a list of all the user files. You can use the query params to filter + * your results. On admin mode, this endpoint will return a list of all of the + * project files. [Learn more about different API modes](/docs/admin). + * + * @param string search + * @param number limit + * @param number offset + * @param string orderType + * @throws Exception + * @return {} + */ + async listFiles(search = '', limit = 25, offset = 0, orderType = 'ASC') { + let path = '/storage/files'; + + return await this.client.call('get', path, { + 'content-type': 'application/json', + }, + { + 'search': search, + 'limit': limit, + 'offset': offset, + 'orderType': orderType + }); + } + + /** + * Create File + * + * Create a new file. The user who creates the file will automatically be + * assigned to read and write access unless he has passed custom values for + * read and write arguments. + * + * @param File file + * @param string[] read + * @param string[] write + * @throws Exception + * @return {} + */ + async createFile(file, read, write) { + let path = '/storage/files'; + + return await this.client.call('post', path, { + 'content-type': 'multipart/form-data', + }, + { + 'file': file, + 'read': read, + 'write': write + }); + } + + /** + * Get File + * + * Get file by its unique ID. This endpoint response returns a JSON object + * with the file metadata. + * + * @param string fileId + * @throws Exception + * @return {} + */ + async getFile(fileId) { + let path = '/storage/files/{fileId}'.replace(new RegExp('{fileId}', 'g'), fileId); + + return await this.client.call('get', path, { + 'content-type': 'application/json', + }, + { + }); + } + + /** + * Update File + * + * Update file by its unique ID. Only users with write permissions have access + * to update this resource. + * + * @param string fileId + * @param string[] read + * @param string[] write + * @throws Exception + * @return {} + */ + async updateFile(fileId, read, write) { + let path = '/storage/files/{fileId}'.replace(new RegExp('{fileId}', 'g'), fileId); + + return await this.client.call('put', path, { + 'content-type': 'application/json', + }, + { + 'read': read, + 'write': write + }); + } + + /** + * Delete File + * + * Delete a file by its unique ID. Only users with write permissions have + * access to delete this resource. + * + * @param string fileId + * @throws Exception + * @return {} + */ + async deleteFile(fileId) { + let path = '/storage/files/{fileId}'.replace(new RegExp('{fileId}', 'g'), fileId); + + return await this.client.call('delete', path, { + 'content-type': 'application/json', + }, + { + }); + } + + /** + * Get File for Download + * + * Get file content by its unique ID. The endpoint response return with a + * 'Content-Disposition: attachment' header that tells the browser to start + * downloading the file to user downloads directory. + * + * @param string fileId + * @throws Exception + * @return {} + */ + async getFileDownload(fileId) { + let path = '/storage/files/{fileId}/download'.replace(new RegExp('{fileId}', 'g'), fileId); + + return await this.client.call('get', path, { + 'content-type': 'application/json', + }, + { + }); + } + + /** + * Get File Preview + * + * Get a file preview image. Currently, this method supports preview for image + * files (jpg, png, and gif), other supported formats, like pdf, docs, slides, + * and spreadsheets, will return the file icon image. You can also pass query + * string arguments for cutting and resizing your preview image. + * + * @param string fileId + * @param number width + * @param number height + * @param number quality + * @param string background + * @param string output + * @throws Exception + * @return {} + */ + async getFilePreview(fileId, width = 0, height = 0, quality = 100, background = '', output = '') { + let path = '/storage/files/{fileId}/preview'.replace(new RegExp('{fileId}', 'g'), fileId); + + return await this.client.call('get', path, { + 'content-type': 'application/json', + }, + { + 'width': width, + 'height': height, + 'quality': quality, + 'background': background, + 'output': output + }); + } + + /** + * Get File for View + * + * Get file content by its unique ID. This endpoint is similar to the download + * method but returns with no 'Content-Disposition: attachment' header. + * + * @param string fileId + * @param string as + * @throws Exception + * @return {} + */ + async getFileView(fileId, as = '') { + let path = '/storage/files/{fileId}/view'.replace(new RegExp('{fileId}', 'g'), fileId); + + return await this.client.call('get', path, { + 'content-type': 'application/json', + }, + { + 'as': as + }); + } +} + +module.exports = Storage; \ No newline at end of file diff --git a/app/sdks/0.7.0/server-nodejs/lib/services/teams.js b/app/sdks/0.7.0/server-nodejs/lib/services/teams.js new file mode 100644 index 0000000000..a17dd50aa3 --- /dev/null +++ b/app/sdks/0.7.0/server-nodejs/lib/services/teams.js @@ -0,0 +1,202 @@ +const Service = require('../service.js'); + +class Teams extends Service { + + /** + * List Teams + * + * Get a list of all the current user teams. You can use the query params to + * filter your results. On admin mode, this endpoint will return a list of all + * of the project teams. [Learn more about different API modes](/docs/admin). + * + * @param string search + * @param number limit + * @param number offset + * @param string orderType + * @throws Exception + * @return {} + */ + async list(search = '', limit = 25, offset = 0, orderType = 'ASC') { + let path = '/teams'; + + return await this.client.call('get', path, { + 'content-type': 'application/json', + }, + { + 'search': search, + 'limit': limit, + 'offset': offset, + 'orderType': orderType + }); + } + + /** + * Create Team + * + * Create a new team. The user who creates the team will automatically be + * assigned as the owner of the team. The team owner can invite new members, + * who will be able add new owners and update or delete the team from your + * project. + * + * @param string name + * @param string[] roles + * @throws Exception + * @return {} + */ + async create(name, roles = ["owner"]) { + let path = '/teams'; + + return await this.client.call('post', path, { + 'content-type': 'application/json', + }, + { + 'name': name, + 'roles': roles + }); + } + + /** + * Get Team + * + * Get team by its unique ID. All team members have read access for this + * resource. + * + * @param string teamId + * @throws Exception + * @return {} + */ + async get(teamId) { + let path = '/teams/{teamId}'.replace(new RegExp('{teamId}', 'g'), teamId); + + return await this.client.call('get', path, { + 'content-type': 'application/json', + }, + { + }); + } + + /** + * Update Team + * + * Update team by its unique ID. Only team owners have write access for this + * resource. + * + * @param string teamId + * @param string name + * @throws Exception + * @return {} + */ + async update(teamId, name) { + let path = '/teams/{teamId}'.replace(new RegExp('{teamId}', 'g'), teamId); + + return await this.client.call('put', path, { + 'content-type': 'application/json', + }, + { + 'name': name + }); + } + + /** + * Delete Team + * + * Delete team by its unique ID. Only team owners have write access for this + * resource. + * + * @param string teamId + * @throws Exception + * @return {} + */ + async delete(teamId) { + let path = '/teams/{teamId}'.replace(new RegExp('{teamId}', 'g'), teamId); + + return await this.client.call('delete', path, { + 'content-type': 'application/json', + }, + { + }); + } + + /** + * Get Team Memberships + * + * Get team members by the team unique ID. All team members have read access + * for this list of resources. + * + * @param string teamId + * @throws Exception + * @return {} + */ + async getMemberships(teamId) { + let path = '/teams/{teamId}/memberships'.replace(new RegExp('{teamId}', 'g'), teamId); + + return await this.client.call('get', path, { + 'content-type': 'application/json', + }, + { + }); + } + + /** + * Create Team Membership + * + * Use this endpoint to invite a new member to join your team. An email with a + * link to join the team will be sent to the new member email address if the + * member doesn't exist in the project it will be created automatically. + * + * Use the 'URL' parameter to redirect the user from the invitation email back + * to your app. When the user is redirected, use the [Update Team Membership + * Status](/docs/teams#updateMembershipStatus) endpoint to allow the user to + * accept the invitation to the team. + * + * Please note that in order to avoid a [Redirect + * Attacks](https://github.com/OWASP/CheatSheetSeries/blob/master/cheatsheets/Unvalidated_Redirects_and_Forwards_Cheat_Sheet.md) + * the only valid redirect URL's are the once from domains you have set when + * added your platforms in the console interface. + * + * @param string teamId + * @param string email + * @param string[] roles + * @param string url + * @param string name + * @throws Exception + * @return {} + */ + async createMembership(teamId, email, roles, url, name = '') { + let path = '/teams/{teamId}/memberships'.replace(new RegExp('{teamId}', 'g'), teamId); + + return await this.client.call('post', path, { + 'content-type': 'application/json', + }, + { + 'email': email, + 'name': name, + 'roles': roles, + 'url': url + }); + } + + /** + * Delete Team Membership + * + * This endpoint allows a user to leave a team or for a team owner to delete + * the membership of any other team member. You can also use this endpoint to + * delete a user membership even if he didn't accept it. + * + * @param string teamId + * @param string inviteId + * @throws Exception + * @return {} + */ + async deleteMembership(teamId, inviteId) { + let path = '/teams/{teamId}/memberships/{inviteId}'.replace(new RegExp('{teamId}', 'g'), teamId).replace(new RegExp('{inviteId}', 'g'), inviteId); + + return await this.client.call('delete', path, { + 'content-type': 'application/json', + }, + { + }); + } +} + +module.exports = Teams; \ No newline at end of file diff --git a/app/sdks/0.7.0/server-nodejs/lib/services/users.js b/app/sdks/0.7.0/server-nodejs/lib/services/users.js new file mode 100644 index 0000000000..2292fb2664 --- /dev/null +++ b/app/sdks/0.7.0/server-nodejs/lib/services/users.js @@ -0,0 +1,215 @@ +const Service = require('../service.js'); + +class Users extends Service { + + /** + * List Users + * + * Get a list of all the project users. You can use the query params to filter + * your results. + * + * @param string search + * @param number limit + * @param number offset + * @param string orderType + * @throws Exception + * @return {} + */ + async list(search = '', limit = 25, offset = 0, orderType = 'ASC') { + let path = '/users'; + + return await this.client.call('get', path, { + 'content-type': 'application/json', + }, + { + 'search': search, + 'limit': limit, + 'offset': offset, + 'orderType': orderType + }); + } + + /** + * Create User + * + * Create a new user. + * + * @param string email + * @param string password + * @param string name + * @throws Exception + * @return {} + */ + async create(email, password, name = '') { + let path = '/users'; + + return await this.client.call('post', path, { + 'content-type': 'application/json', + }, + { + 'email': email, + 'password': password, + 'name': name + }); + } + + /** + * Get User + * + * Get user by its unique ID. + * + * @param string userId + * @throws Exception + * @return {} + */ + async get(userId) { + let path = '/users/{userId}'.replace(new RegExp('{userId}', 'g'), userId); + + return await this.client.call('get', path, { + 'content-type': 'application/json', + }, + { + }); + } + + /** + * Get User Logs + * + * Get user activity logs list by its unique ID. + * + * @param string userId + * @throws Exception + * @return {} + */ + async getLogs(userId) { + let path = '/users/{userId}/logs'.replace(new RegExp('{userId}', 'g'), userId); + + return await this.client.call('get', path, { + 'content-type': 'application/json', + }, + { + }); + } + + /** + * Get User Preferences + * + * Get user preferences by its unique ID. + * + * @param string userId + * @throws Exception + * @return {} + */ + async getPrefs(userId) { + let path = '/users/{userId}/prefs'.replace(new RegExp('{userId}', 'g'), userId); + + return await this.client.call('get', path, { + 'content-type': 'application/json', + }, + { + }); + } + + /** + * Update User Preferences + * + * Update user preferences by its unique ID. You can pass only the specific + * settings you wish to update. + * + * @param string userId + * @param object prefs + * @throws Exception + * @return {} + */ + async updatePrefs(userId, prefs) { + let path = '/users/{userId}/prefs'.replace(new RegExp('{userId}', 'g'), userId); + + return await this.client.call('patch', path, { + 'content-type': 'application/json', + }, + { + 'prefs': prefs + }); + } + + /** + * Get User Sessions + * + * Get user sessions list by its unique ID. + * + * @param string userId + * @throws Exception + * @return {} + */ + async getSessions(userId) { + let path = '/users/{userId}/sessions'.replace(new RegExp('{userId}', 'g'), userId); + + return await this.client.call('get', path, { + 'content-type': 'application/json', + }, + { + }); + } + + /** + * Delete User Sessions + * + * Delete all user sessions by its unique ID. + * + * @param string userId + * @throws Exception + * @return {} + */ + async deleteSessions(userId) { + let path = '/users/{userId}/sessions'.replace(new RegExp('{userId}', 'g'), userId); + + return await this.client.call('delete', path, { + 'content-type': 'application/json', + }, + { + }); + } + + /** + * Delete User Session + * + * Delete user sessions by its unique ID. + * + * @param string userId + * @param string sessionId + * @throws Exception + * @return {} + */ + async deleteSession(userId, sessionId) { + let path = '/users/{userId}/sessions/{sessionId}'.replace(new RegExp('{userId}', 'g'), userId).replace(new RegExp('{sessionId}', 'g'), sessionId); + + return await this.client.call('delete', path, { + 'content-type': 'application/json', + }, + { + }); + } + + /** + * Update User Status + * + * Update user status by its unique ID. + * + * @param string userId + * @param string status + * @throws Exception + * @return {} + */ + async updateStatus(userId, status) { + let path = '/users/{userId}/status'.replace(new RegExp('{userId}', 'g'), userId); + + return await this.client.call('patch', path, { + 'content-type': 'application/json', + }, + { + 'status': status + }); + } +} + +module.exports = Users; \ No newline at end of file diff --git a/app/sdks/0.7.0/server-nodejs/package.json b/app/sdks/0.7.0/server-nodejs/package.json new file mode 100644 index 0000000000..377ea48db2 --- /dev/null +++ b/app/sdks/0.7.0/server-nodejs/package.json @@ -0,0 +1,17 @@ +{ + "name": "node-appwrite", + "homepage": "https://appwrite.io/support", + "description": "Appwrite is an open-source self-hosted backend server that abstract and simplify complex and repetitive development tasks behind a very simple REST API", + "version": "1.1.0", + "license": "BSD-3-Clause", + "main": "index.js", + "repository": { + "type": "git", + "url": "https://github.com/appwrite/sdk-for-node" + }, + "devDependencies": {}, + "dependencies": { + "request": "^2.88.0", + "request-promise-native": "^1.0.7" + } +} \ No newline at end of file diff --git a/app/sdks/0.7.0/server-php/CHANGELOG.md b/app/sdks/0.7.0/server-php/CHANGELOG.md new file mode 100644 index 0000000000..fa4d35e687 --- /dev/null +++ b/app/sdks/0.7.0/server-php/CHANGELOG.md @@ -0,0 +1 @@ +# Change Log \ No newline at end of file diff --git a/app/sdks/0.7.0/server-php/LICENSE b/app/sdks/0.7.0/server-php/LICENSE new file mode 100644 index 0000000000..fc7c051a91 --- /dev/null +++ b/app/sdks/0.7.0/server-php/LICENSE @@ -0,0 +1,12 @@ +Copyright (c) 2019 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: + + 1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. + + 2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. + + 3. Neither the name Appwrite nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. \ No newline at end of file diff --git a/app/sdks/0.7.0/server-php/README.md b/app/sdks/0.7.0/server-php/README.md new file mode 100644 index 0000000000..0d64f84fca --- /dev/null +++ b/app/sdks/0.7.0/server-php/README.md @@ -0,0 +1,28 @@ +# Appwrite PHP SDK + +![License](https://img.shields.io/github/license/appwrite/sdk-for-php.svg?v=1) +![Version](https://img.shields.io/badge/api%20version-0.6.1-blue.svg?v=1) + +Appwrite is an open-source backend as a service server that abstract and simplify complex and repetitive development tasks behind a very simple to use REST API. Appwrite aims to help you develop your apps faster and in a more secure way. + Use the PHP SDK to integrate your app with the Appwrite server to easily start interacting with all of Appwrite backend APIs and tools. + For full API documentation and tutorials go to [https://appwrite.io/docs](https://appwrite.io/docs) + + + +![Appwrite](https://appwrite.io/images/github.png) + +## Installation + +To install via [Composer](http://getcomposer.org/): + +```bash +composer require appwrite/appwrite +``` + +## Contribution + +This library is auto-generated by Appwrite custom [SDK Generator](https://github.com/appwrite/sdk-generator). To learn more about how you can help us improve this SDK, please check the [contribution guide](https://github.com/appwrite/sdk-generator/blob/master/CONTRIBUTING.md) before sending a pull-request. + +## License + +Please see the [BSD-3-Clause license](https://raw.githubusercontent.com/appwrite/appwrite/master/LICENSE) file for more information. \ No newline at end of file diff --git a/app/sdks/0.7.0/server-php/composer.json b/app/sdks/0.7.0/server-php/composer.json new file mode 100644 index 0000000000..64d2e1746f --- /dev/null +++ b/app/sdks/0.7.0/server-php/composer.json @@ -0,0 +1,26 @@ +{ + "name": "appwrite/appwrite", + "description": "Appwrite is an open-source backend as a service server that abstract and simplify complex and repetitive development tasks behind a very simple to use REST API. Appwrite aims to help you develop your apps faster and in a more secure way. + Use the PHP SDK to integrate your app with the Appwrite server to easily start interacting with all of Appwrite backend APIs and tools. + For full API documentation and tutorials go to [https://appwrite.io/docs](https://appwrite.io/docs)", + "type": "library", + "license": "BSD-3-Clause", + "support": { + "url": "https://appwrite.io/support", + "email": "team@localhost.test" + }, + "autoload": { + "psr-4": { + "Appwrite\\": "src/Appwrite" + } + }, + "require": { + "php": ">=7.1.0", + "ext-curl": "*", + "ext-json": "*" + }, + "require-dev": { + "phpunit/phpunit": "3.7.35" + }, + "minimum-stability": "dev" +} \ No newline at end of file diff --git a/app/sdks/0.7.0/server-php/docs/avatars.md b/app/sdks/0.7.0/server-php/docs/avatars.md new file mode 100644 index 0000000000..9fa1ee61f1 --- /dev/null +++ b/app/sdks/0.7.0/server-php/docs/avatars.md @@ -0,0 +1,100 @@ +# Avatars Service + +## Get Browser Icon + +```http request +GET https://appwrite.io/v1/avatars/browsers/{code} +``` + +** You can use this endpoint to show different browser icons to your users. The code argument receives the browser code as it appears in your user /account/sessions endpoint. Use width, height and quality arguments to change the output settings. ** + +### Parameters + +| Field Name | Type | Description | Default | +| --- | --- | --- | --- | +| code | string | **Required** Browser Code. | | +| width | integer | Image width. Pass an integer between 0 to 2000. Defaults to 100. | 100 | +| height | integer | Image height. Pass an integer between 0 to 2000. Defaults to 100. | 100 | +| quality | integer | Image quality. Pass an integer between 0 to 100. Defaults to 100. | 100 | + +## Get Credit Card Icon + +```http request +GET https://appwrite.io/v1/avatars/credit-cards/{code} +``` + +** Need to display your users with your billing method or their payment methods? The credit card endpoint will return you the icon of the credit card provider you need. Use width, height and quality arguments to change the output settings. ** + +### Parameters + +| Field Name | Type | Description | Default | +| --- | --- | --- | --- | +| code | string | **Required** Credit Card Code. Possible values: amex, argencard, cabal, censosud, diners, discover, elo, hipercard, jcb, mastercard, naranja, targeta-shopping, union-china-pay, visa. | | +| width | integer | Image width. Pass an integer between 0 to 2000. Defaults to 100. | 100 | +| height | integer | Image height. Pass an integer between 0 to 2000. Defaults to 100. | 100 | +| quality | integer | Image quality. Pass an integer between 0 to 100. Defaults to 100. | 100 | + +## Get Favicon + +```http request +GET https://appwrite.io/v1/avatars/favicon +``` + +** Use this endpoint to fetch the favorite icon (AKA favicon) of a any remote website URL. ** + +### Parameters + +| Field Name | Type | Description | Default | +| --- | --- | --- | --- | +| url | string | **Required** Website URL which you want to fetch the favicon from. | | + +## Get Country Flag + +```http request +GET https://appwrite.io/v1/avatars/flags/{code} +``` + +** You can use this endpoint to show different country flags icons to your users. The code argument receives the 2 letter country code. Use width, height and quality arguments to change the output settings. ** + +### Parameters + +| Field Name | Type | Description | Default | +| --- | --- | --- | --- | +| code | string | **Required** Country Code. ISO Alpha-2 country code format. | | +| width | integer | Image width. Pass an integer between 0 to 2000. Defaults to 100. | 100 | +| height | integer | Image height. Pass an integer between 0 to 2000. Defaults to 100. | 100 | +| quality | integer | Image quality. Pass an integer between 0 to 100. Defaults to 100. | 100 | + +## Get Image from URL + +```http request +GET https://appwrite.io/v1/avatars/image +``` + +** Use this endpoint to fetch a remote image URL and crop it to any image size you want. This endpoint is very useful if you need to crop and display remote images in your app or in case you want to make sure a 3rd party image is properly served using a TLS protocol. ** + +### Parameters + +| Field Name | Type | Description | Default | +| --- | --- | --- | --- | +| url | string | **Required** Image URL which you want to crop. | | +| width | integer | Resize preview image width, Pass an integer between 0 to 2000. | 400 | +| height | integer | Resize preview image height, Pass an integer between 0 to 2000. | 400 | + +## Get QR Code + +```http request +GET https://appwrite.io/v1/avatars/qr +``` + +** Converts a given plain text to a QR code image. You can use the query parameters to change the size and style of the resulting image. ** + +### Parameters + +| Field Name | Type | Description | Default | +| --- | --- | --- | --- | +| text | string | **Required** Plain text to be converted to QR code image. | | +| size | integer | QR code size. Pass an integer between 0 to 1000. Defaults to 400. | 400 | +| margin | integer | Margin from edge. Pass an integer between 0 to 10. Defaults to 1. | 1 | +| download | integer | Return resulting image with 'Content-Disposition: attachment ' headers for the browser to start downloading it. Pass 0 for no header, or 1 for otherwise. Default value is set to 0. | 0 | + diff --git a/app/sdks/0.7.0/server-php/docs/database.md b/app/sdks/0.7.0/server-php/docs/database.md new file mode 100644 index 0000000000..f192a92fc8 --- /dev/null +++ b/app/sdks/0.7.0/server-php/docs/database.md @@ -0,0 +1,183 @@ +# Database Service + +## List Collections + +```http request +GET https://appwrite.io/v1/database/collections +``` + +** Get a list of all the user collections. You can use the query params to filter your results. On admin mode, this endpoint will return a list of all of the project collections. [Learn more about different API modes](/docs/admin). ** + +### Parameters + +| Field Name | Type | Description | Default | +| --- | --- | --- | --- | +| search | string | Search term to filter your list results. | | +| limit | integer | Results limit value. By default will return maximum 25 results. Maximum of 100 results allowed per request. | 25 | +| offset | integer | Results offset. The default value is 0. Use this param to manage pagination. | 0 | +| orderType | string | Order result by ASC or DESC order. | ASC | + +## Create Collection + +```http request +POST https://appwrite.io/v1/database/collections +``` + +** Create a new Collection. ** + +### Parameters + +| Field Name | Type | Description | Default | +| --- | --- | --- | --- | +| name | string | Collection name. | | +| read | array | An array of strings with read permissions. By default no user is granted with any read permissions. [learn more about permissions](/docs/permissions) and get a full list of available permissions. | | +| write | array | An array of strings with write permissions. By default no user is granted with any write permissions. [learn more about permissions](/docs/permissions) and get a full list of available permissions. | | +| rules | array | Array of [rule objects](/docs/rules). Each rule define a collection field name, data type and validation. | | + +## Get Collection + +```http request +GET https://appwrite.io/v1/database/collections/{collectionId} +``` + +** Get collection by its unique ID. This endpoint response returns a JSON object with the collection metadata. ** + +### Parameters + +| Field Name | Type | Description | Default | +| --- | --- | --- | --- | +| collectionId | string | **Required** Collection unique ID. | | + +## Update Collection + +```http request +PUT https://appwrite.io/v1/database/collections/{collectionId} +``` + +** Update collection by its unique ID. ** + +### Parameters + +| Field Name | Type | Description | Default | +| --- | --- | --- | --- | +| collectionId | string | **Required** Collection unique ID. | | +| name | string | Collection name. | | +| read | array | An array of strings with read permissions. By default no user is granted with any read permissions. [learn more about permissions(/docs/permissions) and get a full list of available permissions. | | +| write | array | An array of strings with write permissions. By default no user is granted with any write permissions. [learn more about permissions](/docs/permissions) and get a full list of available permissions. | | +| rules | array | Array of [rule objects](/docs/rules). Each rule define a collection field name, data type and validation. | [] | + +## Delete Collection + +```http request +DELETE https://appwrite.io/v1/database/collections/{collectionId} +``` + +** Delete a collection by its unique ID. Only users with write permissions have access to delete this resource. ** + +### Parameters + +| Field Name | Type | Description | Default | +| --- | --- | --- | --- | +| collectionId | string | **Required** Collection unique ID. | | + +## List Documents + +```http request +GET https://appwrite.io/v1/database/collections/{collectionId}/documents +``` + +** Get a list of all the user documents. You can use the query params to filter your results. On admin mode, this endpoint will return a list of all of the project documents. [Learn more about different API modes](/docs/admin). ** + +### Parameters + +| Field Name | Type | Description | Default | +| --- | --- | --- | --- | +| collectionId | string | **Required** Collection unique ID. You can create a new collection with validation rules using the Database service [server integration](/docs/database?platform=server#createCollection). | | +| filters | array | Array of filter strings. Each filter is constructed from a key name, comparison operator (=, !=, >, <, <=, >=) and a value. You can also use a dot (.) separator in attribute names to filter by child document attributes. Examples: 'name=John Doe' or 'category.$id>=5bed2d152c362'. | [] | +| offset | integer | Offset value. Use this value to manage pagination. | 0 | +| limit | integer | Maximum number of documents to return in response. Use this value to manage pagination. | 50 | +| orderField | string | Document field that results will be sorted by. | $id | +| orderType | string | Order direction. Possible values are DESC for descending order, or ASC for ascending order. | ASC | +| orderCast | string | Order field type casting. Possible values are int, string, date, time or datetime. The database will attempt to cast the order field to the value you pass here. The default value is a string. | string | +| search | string | Search query. Enter any free text search. The database will try to find a match against all document attributes and children. | | +| first | integer | Return only the first document. Pass 1 for true or 0 for false. The default value is 0. | 0 | +| last | integer | Return only the last document. Pass 1 for true or 0 for false. The default value is 0. | 0 | + +## Create Document + +```http request +POST https://appwrite.io/v1/database/collections/{collectionId}/documents +``` + +** Create a new Document. ** + +### Parameters + +| Field Name | Type | Description | Default | +| --- | --- | --- | --- | +| collectionId | string | **Required** Collection unique ID. You can create a new collection with validation rules using the Database service [server integration](/docs/database?platform=server#createCollection). | | +| data | object | Document data as JSON object. | | +| read | array | An array of strings with read permissions. By default no user is granted with any read permissions. [learn more about permissions](/docs/permissions) and get a full list of available permissions. | | +| write | array | An array of strings with write permissions. By default no user is granted with any write permissions. [learn more about permissions](/docs/permissions) and get a full list of available permissions. | | +| parentDocument | string | Parent document unique ID. Use when you want your new document to be a child of a parent document. | | +| parentProperty | string | Parent document property name. Use when you want your new document to be a child of a parent document. | | +| parentPropertyType | string | Parent document property connection type. You can set this value to **assign**, **append** or **prepend**, default value is assign. Use when you want your new document to be a child of a parent document. | assign | + +## Get Document + +```http request +GET https://appwrite.io/v1/database/collections/{collectionId}/documents/{documentId} +``` + +** Get document by its unique ID. This endpoint response returns a JSON object with the document data. ** + +### Parameters + +| Field Name | Type | Description | Default | +| --- | --- | --- | --- | +| collectionId | string | **Required** Collection unique ID. You can create a new collection with validation rules using the Database service [server integration](/docs/database?platform=server#createCollection). | | +| documentId | string | **Required** Document unique ID. | | + +## Update Document + +```http request +PATCH https://appwrite.io/v1/database/collections/{collectionId}/documents/{documentId} +``` + +### Parameters + +| Field Name | Type | Description | Default | +| --- | --- | --- | --- | +| collectionId | string | **Required** Collection unique ID. You can create a new collection with validation rules using the Database service [server integration](/docs/database?platform=server#createCollection). | | +| documentId | string | **Required** Document unique ID. | | +| data | object | Document data as JSON object. | | +| read | array | An array of strings with read permissions. By default no user is granted with any read permissions. [learn more about permissions](/docs/permissions) and get a full list of available permissions. | | +| write | array | An array of strings with write permissions. By default no user is granted with any write permissions. [learn more about permissions](/docs/permissions) and get a full list of available permissions. | | + +## Delete Document + +```http request +DELETE https://appwrite.io/v1/database/collections/{collectionId}/documents/{documentId} +``` + +** Delete document by its unique ID. This endpoint deletes only the parent documents, his attributes and relations to other documents. Child documents **will not** be deleted. ** + +### Parameters + +| Field Name | Type | Description | Default | +| --- | --- | --- | --- | +| collectionId | string | **Required** Collection unique ID. You can create a new collection with validation rules using the Database service [server integration](/docs/database?platform=server#createCollection). | | +| documentId | string | **Required** Document unique ID. | | + +## Get Collection Logs + +```http request +GET https://appwrite.io/v1/database/collections/{collectionId}/logs +``` + +### Parameters + +| Field Name | Type | Description | Default | +| --- | --- | --- | --- | +| collectionId | string | **Required** Collection unique ID. | | + diff --git a/app/sdks/0.7.0/server-php/docs/examples/avatars/get-browser.md b/app/sdks/0.7.0/server-php/docs/examples/avatars/get-browser.md new file mode 100644 index 0000000000..795d79157e --- /dev/null +++ b/app/sdks/0.7.0/server-php/docs/examples/avatars/get-browser.md @@ -0,0 +1,16 @@ +setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint + ->setProject('5df5acd0d48c2') // Your project ID + ->setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key +; + +$avatars = new Avatars($client); + +$result = $avatars->getBrowser('aa'); \ No newline at end of file diff --git a/app/sdks/0.7.0/server-php/docs/examples/avatars/get-credit-card.md b/app/sdks/0.7.0/server-php/docs/examples/avatars/get-credit-card.md new file mode 100644 index 0000000000..33879d0179 --- /dev/null +++ b/app/sdks/0.7.0/server-php/docs/examples/avatars/get-credit-card.md @@ -0,0 +1,16 @@ +setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint + ->setProject('5df5acd0d48c2') // Your project ID + ->setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key +; + +$avatars = new Avatars($client); + +$result = $avatars->getCreditCard('amex'); \ No newline at end of file diff --git a/app/sdks/0.7.0/server-php/docs/examples/avatars/get-favicon.md b/app/sdks/0.7.0/server-php/docs/examples/avatars/get-favicon.md new file mode 100644 index 0000000000..dee19dbf04 --- /dev/null +++ b/app/sdks/0.7.0/server-php/docs/examples/avatars/get-favicon.md @@ -0,0 +1,16 @@ +setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint + ->setProject('5df5acd0d48c2') // Your project ID + ->setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key +; + +$avatars = new Avatars($client); + +$result = $avatars->getFavicon('https://example.com'); \ No newline at end of file diff --git a/app/sdks/0.7.0/server-php/docs/examples/avatars/get-flag.md b/app/sdks/0.7.0/server-php/docs/examples/avatars/get-flag.md new file mode 100644 index 0000000000..d70d7e43ec --- /dev/null +++ b/app/sdks/0.7.0/server-php/docs/examples/avatars/get-flag.md @@ -0,0 +1,16 @@ +setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint + ->setProject('5df5acd0d48c2') // Your project ID + ->setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key +; + +$avatars = new Avatars($client); + +$result = $avatars->getFlag('af'); \ No newline at end of file diff --git a/app/sdks/0.7.0/server-php/docs/examples/avatars/get-image.md b/app/sdks/0.7.0/server-php/docs/examples/avatars/get-image.md new file mode 100644 index 0000000000..a46b9fbe37 --- /dev/null +++ b/app/sdks/0.7.0/server-php/docs/examples/avatars/get-image.md @@ -0,0 +1,16 @@ +setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint + ->setProject('5df5acd0d48c2') // Your project ID + ->setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key +; + +$avatars = new Avatars($client); + +$result = $avatars->getImage('https://example.com'); \ No newline at end of file diff --git a/app/sdks/0.7.0/server-php/docs/examples/avatars/get-q-r.md b/app/sdks/0.7.0/server-php/docs/examples/avatars/get-q-r.md new file mode 100644 index 0000000000..95b5a6d7b3 --- /dev/null +++ b/app/sdks/0.7.0/server-php/docs/examples/avatars/get-q-r.md @@ -0,0 +1,16 @@ +setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint + ->setProject('5df5acd0d48c2') // Your project ID + ->setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key +; + +$avatars = new Avatars($client); + +$result = $avatars->getQR('[TEXT]'); \ No newline at end of file diff --git a/app/sdks/0.7.0/server-php/docs/examples/database/create-collection.md b/app/sdks/0.7.0/server-php/docs/examples/database/create-collection.md new file mode 100644 index 0000000000..276d5049fe --- /dev/null +++ b/app/sdks/0.7.0/server-php/docs/examples/database/create-collection.md @@ -0,0 +1,16 @@ +setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint + ->setProject('5df5acd0d48c2') // Your project ID + ->setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key +; + +$database = new Database($client); + +$result = $database->createCollection('[NAME]', [], [], []); \ No newline at end of file diff --git a/app/sdks/0.7.0/server-php/docs/examples/database/create-document.md b/app/sdks/0.7.0/server-php/docs/examples/database/create-document.md new file mode 100644 index 0000000000..6c32cdf950 --- /dev/null +++ b/app/sdks/0.7.0/server-php/docs/examples/database/create-document.md @@ -0,0 +1,16 @@ +setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint + ->setProject('5df5acd0d48c2') // Your project ID + ->setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key +; + +$database = new Database($client); + +$result = $database->createDocument('[COLLECTION_ID]', [], [], []); \ No newline at end of file diff --git a/app/sdks/0.7.0/server-php/docs/examples/database/delete-collection.md b/app/sdks/0.7.0/server-php/docs/examples/database/delete-collection.md new file mode 100644 index 0000000000..4018420188 --- /dev/null +++ b/app/sdks/0.7.0/server-php/docs/examples/database/delete-collection.md @@ -0,0 +1,16 @@ +setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint + ->setProject('5df5acd0d48c2') // Your project ID + ->setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key +; + +$database = new Database($client); + +$result = $database->deleteCollection('[COLLECTION_ID]'); \ No newline at end of file diff --git a/app/sdks/0.7.0/server-php/docs/examples/database/delete-document.md b/app/sdks/0.7.0/server-php/docs/examples/database/delete-document.md new file mode 100644 index 0000000000..3ed45d6ee1 --- /dev/null +++ b/app/sdks/0.7.0/server-php/docs/examples/database/delete-document.md @@ -0,0 +1,16 @@ +setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint + ->setProject('5df5acd0d48c2') // Your project ID + ->setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key +; + +$database = new Database($client); + +$result = $database->deleteDocument('[COLLECTION_ID]', '[DOCUMENT_ID]'); \ No newline at end of file diff --git a/app/sdks/0.7.0/server-php/docs/examples/database/get-collection-logs.md b/app/sdks/0.7.0/server-php/docs/examples/database/get-collection-logs.md new file mode 100644 index 0000000000..22c547eb39 --- /dev/null +++ b/app/sdks/0.7.0/server-php/docs/examples/database/get-collection-logs.md @@ -0,0 +1,16 @@ +setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint + ->setProject('5df5acd0d48c2') // Your project ID + ->setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key +; + +$database = new Database($client); + +$result = $database->getCollectionLogs('[COLLECTION_ID]'); \ No newline at end of file diff --git a/app/sdks/0.7.0/server-php/docs/examples/database/get-collection.md b/app/sdks/0.7.0/server-php/docs/examples/database/get-collection.md new file mode 100644 index 0000000000..a088b24bb6 --- /dev/null +++ b/app/sdks/0.7.0/server-php/docs/examples/database/get-collection.md @@ -0,0 +1,16 @@ +setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint + ->setProject('5df5acd0d48c2') // Your project ID + ->setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key +; + +$database = new Database($client); + +$result = $database->getCollection('[COLLECTION_ID]'); \ No newline at end of file diff --git a/app/sdks/0.7.0/server-php/docs/examples/database/get-document.md b/app/sdks/0.7.0/server-php/docs/examples/database/get-document.md new file mode 100644 index 0000000000..d506bd8414 --- /dev/null +++ b/app/sdks/0.7.0/server-php/docs/examples/database/get-document.md @@ -0,0 +1,16 @@ +setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint + ->setProject('5df5acd0d48c2') // Your project ID + ->setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key +; + +$database = new Database($client); + +$result = $database->getDocument('[COLLECTION_ID]', '[DOCUMENT_ID]'); \ No newline at end of file diff --git a/app/sdks/0.7.0/server-php/docs/examples/database/list-collections.md b/app/sdks/0.7.0/server-php/docs/examples/database/list-collections.md new file mode 100644 index 0000000000..4f4aa1b775 --- /dev/null +++ b/app/sdks/0.7.0/server-php/docs/examples/database/list-collections.md @@ -0,0 +1,16 @@ +setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint + ->setProject('5df5acd0d48c2') // Your project ID + ->setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key +; + +$database = new Database($client); + +$result = $database->listCollections(); \ No newline at end of file diff --git a/app/sdks/0.7.0/server-php/docs/examples/database/list-documents.md b/app/sdks/0.7.0/server-php/docs/examples/database/list-documents.md new file mode 100644 index 0000000000..359da4ce33 --- /dev/null +++ b/app/sdks/0.7.0/server-php/docs/examples/database/list-documents.md @@ -0,0 +1,16 @@ +setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint + ->setProject('5df5acd0d48c2') // Your project ID + ->setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key +; + +$database = new Database($client); + +$result = $database->listDocuments('[COLLECTION_ID]'); \ No newline at end of file diff --git a/app/sdks/0.7.0/server-php/docs/examples/database/update-collection.md b/app/sdks/0.7.0/server-php/docs/examples/database/update-collection.md new file mode 100644 index 0000000000..70d596066a --- /dev/null +++ b/app/sdks/0.7.0/server-php/docs/examples/database/update-collection.md @@ -0,0 +1,16 @@ +setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint + ->setProject('5df5acd0d48c2') // Your project ID + ->setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key +; + +$database = new Database($client); + +$result = $database->updateCollection('[COLLECTION_ID]', '[NAME]', [], []); \ No newline at end of file diff --git a/app/sdks/0.7.0/server-php/docs/examples/database/update-document.md b/app/sdks/0.7.0/server-php/docs/examples/database/update-document.md new file mode 100644 index 0000000000..4389034640 --- /dev/null +++ b/app/sdks/0.7.0/server-php/docs/examples/database/update-document.md @@ -0,0 +1,16 @@ +setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint + ->setProject('5df5acd0d48c2') // Your project ID + ->setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key +; + +$database = new Database($client); + +$result = $database->updateDocument('[COLLECTION_ID]', '[DOCUMENT_ID]', [], [], []); \ No newline at end of file diff --git a/app/sdks/0.7.0/server-php/docs/examples/functions/create-execution.md b/app/sdks/0.7.0/server-php/docs/examples/functions/create-execution.md new file mode 100644 index 0000000000..ca232c8771 --- /dev/null +++ b/app/sdks/0.7.0/server-php/docs/examples/functions/create-execution.md @@ -0,0 +1,15 @@ +setProject('5df5acd0d48c2') // Your project ID + ->setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key +; + +$functions = new Functions($client); + +$result = $functions->createExecution('[FUNCTION_ID]'); \ No newline at end of file diff --git a/app/sdks/0.7.0/server-php/docs/examples/functions/create-tag.md b/app/sdks/0.7.0/server-php/docs/examples/functions/create-tag.md new file mode 100644 index 0000000000..cc4ff73e90 --- /dev/null +++ b/app/sdks/0.7.0/server-php/docs/examples/functions/create-tag.md @@ -0,0 +1,15 @@ +setProject('5df5acd0d48c2') // Your project ID + ->setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key +; + +$functions = new Functions($client); + +$result = $functions->createTag('[FUNCTION_ID]', 'node-14', '[COMMAND]', '[CODE]'); \ No newline at end of file diff --git a/app/sdks/0.7.0/server-php/docs/examples/functions/create.md b/app/sdks/0.7.0/server-php/docs/examples/functions/create.md new file mode 100644 index 0000000000..7ec5dc2831 --- /dev/null +++ b/app/sdks/0.7.0/server-php/docs/examples/functions/create.md @@ -0,0 +1,15 @@ +setProject('5df5acd0d48c2') // Your project ID + ->setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key +; + +$functions = new Functions($client); + +$result = $functions->create('[NAME]'); \ No newline at end of file diff --git a/app/sdks/0.7.0/server-php/docs/examples/functions/delete-tag.md b/app/sdks/0.7.0/server-php/docs/examples/functions/delete-tag.md new file mode 100644 index 0000000000..681c9c3aa7 --- /dev/null +++ b/app/sdks/0.7.0/server-php/docs/examples/functions/delete-tag.md @@ -0,0 +1,15 @@ +setProject('5df5acd0d48c2') // Your project ID + ->setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key +; + +$functions = new Functions($client); + +$result = $functions->deleteTag('[FUNCTION_ID]', '[TAG_ID]'); \ No newline at end of file diff --git a/app/sdks/0.7.0/server-php/docs/examples/functions/delete.md b/app/sdks/0.7.0/server-php/docs/examples/functions/delete.md new file mode 100644 index 0000000000..12476f1d6a --- /dev/null +++ b/app/sdks/0.7.0/server-php/docs/examples/functions/delete.md @@ -0,0 +1,15 @@ +setProject('5df5acd0d48c2') // Your project ID + ->setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key +; + +$functions = new Functions($client); + +$result = $functions->delete('[FUNCTION_ID]'); \ No newline at end of file diff --git a/app/sdks/0.7.0/server-php/docs/examples/functions/get-execution.md b/app/sdks/0.7.0/server-php/docs/examples/functions/get-execution.md new file mode 100644 index 0000000000..774c7ecc3f --- /dev/null +++ b/app/sdks/0.7.0/server-php/docs/examples/functions/get-execution.md @@ -0,0 +1,15 @@ +setProject('5df5acd0d48c2') // Your project ID + ->setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key +; + +$functions = new Functions($client); + +$result = $functions->getExecution('[FUNCTION_ID]', '[EXECUTION_ID]'); \ No newline at end of file diff --git a/app/sdks/0.7.0/server-php/docs/examples/functions/get-tag.md b/app/sdks/0.7.0/server-php/docs/examples/functions/get-tag.md new file mode 100644 index 0000000000..b1c2f23dcf --- /dev/null +++ b/app/sdks/0.7.0/server-php/docs/examples/functions/get-tag.md @@ -0,0 +1,15 @@ +setProject('5df5acd0d48c2') // Your project ID + ->setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key +; + +$functions = new Functions($client); + +$result = $functions->getTag('[FUNCTION_ID]', '[TAG_ID]'); \ No newline at end of file diff --git a/app/sdks/0.7.0/server-php/docs/examples/functions/get.md b/app/sdks/0.7.0/server-php/docs/examples/functions/get.md new file mode 100644 index 0000000000..0b6b438c65 --- /dev/null +++ b/app/sdks/0.7.0/server-php/docs/examples/functions/get.md @@ -0,0 +1,15 @@ +setProject('5df5acd0d48c2') // Your project ID + ->setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key +; + +$functions = new Functions($client); + +$result = $functions->get('[FUNCTION_ID]'); \ No newline at end of file diff --git a/app/sdks/0.7.0/server-php/docs/examples/functions/list-executions.md b/app/sdks/0.7.0/server-php/docs/examples/functions/list-executions.md new file mode 100644 index 0000000000..a0403c653d --- /dev/null +++ b/app/sdks/0.7.0/server-php/docs/examples/functions/list-executions.md @@ -0,0 +1,15 @@ +setProject('5df5acd0d48c2') // Your project ID + ->setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key +; + +$functions = new Functions($client); + +$result = $functions->listExecutions('[FUNCTION_ID]'); \ No newline at end of file diff --git a/app/sdks/0.7.0/server-php/docs/examples/functions/list-tags.md b/app/sdks/0.7.0/server-php/docs/examples/functions/list-tags.md new file mode 100644 index 0000000000..3c2e6b6e87 --- /dev/null +++ b/app/sdks/0.7.0/server-php/docs/examples/functions/list-tags.md @@ -0,0 +1,15 @@ +setProject('5df5acd0d48c2') // Your project ID + ->setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key +; + +$functions = new Functions($client); + +$result = $functions->listTags('[FUNCTION_ID]'); \ No newline at end of file diff --git a/app/sdks/0.7.0/server-php/docs/examples/functions/list.md b/app/sdks/0.7.0/server-php/docs/examples/functions/list.md new file mode 100644 index 0000000000..bfbfde406f --- /dev/null +++ b/app/sdks/0.7.0/server-php/docs/examples/functions/list.md @@ -0,0 +1,15 @@ +setProject('5df5acd0d48c2') // Your project ID + ->setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key +; + +$functions = new Functions($client); + +$result = $functions->list(); \ No newline at end of file diff --git a/app/sdks/0.7.0/server-php/docs/examples/functions/update-active.md b/app/sdks/0.7.0/server-php/docs/examples/functions/update-active.md new file mode 100644 index 0000000000..18b7316f3b --- /dev/null +++ b/app/sdks/0.7.0/server-php/docs/examples/functions/update-active.md @@ -0,0 +1,15 @@ +setProject('5df5acd0d48c2') // Your project ID + ->setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key +; + +$functions = new Functions($client); + +$result = $functions->updateActive('[FUNCTION_ID]', '[ACTIVE]'); \ No newline at end of file diff --git a/app/sdks/0.7.0/server-php/docs/examples/functions/update-tag.md b/app/sdks/0.7.0/server-php/docs/examples/functions/update-tag.md new file mode 100644 index 0000000000..68099d8fbb --- /dev/null +++ b/app/sdks/0.7.0/server-php/docs/examples/functions/update-tag.md @@ -0,0 +1,15 @@ +setProject('5df5acd0d48c2') // Your project ID + ->setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key +; + +$functions = new Functions($client); + +$result = $functions->updateTag('[FUNCTION_ID]', '[TAG]'); \ No newline at end of file diff --git a/app/sdks/0.7.0/server-php/docs/examples/functions/update.md b/app/sdks/0.7.0/server-php/docs/examples/functions/update.md new file mode 100644 index 0000000000..34315a129a --- /dev/null +++ b/app/sdks/0.7.0/server-php/docs/examples/functions/update.md @@ -0,0 +1,15 @@ +setProject('5df5acd0d48c2') // Your project ID + ->setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key +; + +$functions = new Functions($client); + +$result = $functions->update('[FUNCTION_ID]', '[NAME]'); \ No newline at end of file diff --git a/app/sdks/0.7.0/server-php/docs/examples/health/get-anti-virus.md b/app/sdks/0.7.0/server-php/docs/examples/health/get-anti-virus.md new file mode 100644 index 0000000000..89a5fb2a7a --- /dev/null +++ b/app/sdks/0.7.0/server-php/docs/examples/health/get-anti-virus.md @@ -0,0 +1,16 @@ +setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint + ->setProject('5df5acd0d48c2') // Your project ID + ->setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key +; + +$health = new Health($client); + +$result = $health->getAntiVirus(); \ No newline at end of file diff --git a/app/sdks/0.7.0/server-php/docs/examples/health/get-cache.md b/app/sdks/0.7.0/server-php/docs/examples/health/get-cache.md new file mode 100644 index 0000000000..e654c26f51 --- /dev/null +++ b/app/sdks/0.7.0/server-php/docs/examples/health/get-cache.md @@ -0,0 +1,16 @@ +setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint + ->setProject('5df5acd0d48c2') // Your project ID + ->setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key +; + +$health = new Health($client); + +$result = $health->getCache(); \ No newline at end of file diff --git a/app/sdks/0.7.0/server-php/docs/examples/health/get-d-b.md b/app/sdks/0.7.0/server-php/docs/examples/health/get-d-b.md new file mode 100644 index 0000000000..2d37991a3d --- /dev/null +++ b/app/sdks/0.7.0/server-php/docs/examples/health/get-d-b.md @@ -0,0 +1,16 @@ +setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint + ->setProject('5df5acd0d48c2') // Your project ID + ->setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key +; + +$health = new Health($client); + +$result = $health->getDB(); \ No newline at end of file diff --git a/app/sdks/0.7.0/server-php/docs/examples/health/get-queue-certificates.md b/app/sdks/0.7.0/server-php/docs/examples/health/get-queue-certificates.md new file mode 100644 index 0000000000..57f2c5793e --- /dev/null +++ b/app/sdks/0.7.0/server-php/docs/examples/health/get-queue-certificates.md @@ -0,0 +1,16 @@ +setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint + ->setProject('5df5acd0d48c2') // Your project ID + ->setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key +; + +$health = new Health($client); + +$result = $health->getQueueCertificates(); \ No newline at end of file diff --git a/app/sdks/0.7.0/server-php/docs/examples/health/get-queue-functions.md b/app/sdks/0.7.0/server-php/docs/examples/health/get-queue-functions.md new file mode 100644 index 0000000000..8ff6510e1c --- /dev/null +++ b/app/sdks/0.7.0/server-php/docs/examples/health/get-queue-functions.md @@ -0,0 +1,16 @@ +setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint + ->setProject('5df5acd0d48c2') // Your project ID + ->setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key +; + +$health = new Health($client); + +$result = $health->getQueueFunctions(); \ No newline at end of file diff --git a/app/sdks/0.7.0/server-php/docs/examples/health/get-queue-logs.md b/app/sdks/0.7.0/server-php/docs/examples/health/get-queue-logs.md new file mode 100644 index 0000000000..fa723d7391 --- /dev/null +++ b/app/sdks/0.7.0/server-php/docs/examples/health/get-queue-logs.md @@ -0,0 +1,16 @@ +setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint + ->setProject('5df5acd0d48c2') // Your project ID + ->setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key +; + +$health = new Health($client); + +$result = $health->getQueueLogs(); \ No newline at end of file diff --git a/app/sdks/0.7.0/server-php/docs/examples/health/get-queue-tasks.md b/app/sdks/0.7.0/server-php/docs/examples/health/get-queue-tasks.md new file mode 100644 index 0000000000..b8f1794a1a --- /dev/null +++ b/app/sdks/0.7.0/server-php/docs/examples/health/get-queue-tasks.md @@ -0,0 +1,16 @@ +setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint + ->setProject('5df5acd0d48c2') // Your project ID + ->setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key +; + +$health = new Health($client); + +$result = $health->getQueueTasks(); \ No newline at end of file diff --git a/app/sdks/0.7.0/server-php/docs/examples/health/get-queue-usage.md b/app/sdks/0.7.0/server-php/docs/examples/health/get-queue-usage.md new file mode 100644 index 0000000000..371d02f5b4 --- /dev/null +++ b/app/sdks/0.7.0/server-php/docs/examples/health/get-queue-usage.md @@ -0,0 +1,16 @@ +setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint + ->setProject('5df5acd0d48c2') // Your project ID + ->setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key +; + +$health = new Health($client); + +$result = $health->getQueueUsage(); \ No newline at end of file diff --git a/app/sdks/0.7.0/server-php/docs/examples/health/get-queue-webhooks.md b/app/sdks/0.7.0/server-php/docs/examples/health/get-queue-webhooks.md new file mode 100644 index 0000000000..af48a72d06 --- /dev/null +++ b/app/sdks/0.7.0/server-php/docs/examples/health/get-queue-webhooks.md @@ -0,0 +1,16 @@ +setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint + ->setProject('5df5acd0d48c2') // Your project ID + ->setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key +; + +$health = new Health($client); + +$result = $health->getQueueWebhooks(); \ No newline at end of file diff --git a/app/sdks/0.7.0/server-php/docs/examples/health/get-storage-anti-virus.md b/app/sdks/0.7.0/server-php/docs/examples/health/get-storage-anti-virus.md new file mode 100644 index 0000000000..0d1958e4f2 --- /dev/null +++ b/app/sdks/0.7.0/server-php/docs/examples/health/get-storage-anti-virus.md @@ -0,0 +1,15 @@ +setProject('5df5acd0d48c2') // Your project ID + ->setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key +; + +$health = new Health($client); + +$result = $health->getStorageAntiVirus(); \ No newline at end of file diff --git a/app/sdks/0.7.0/server-php/docs/examples/health/get-storage-local.md b/app/sdks/0.7.0/server-php/docs/examples/health/get-storage-local.md new file mode 100644 index 0000000000..eba15a1652 --- /dev/null +++ b/app/sdks/0.7.0/server-php/docs/examples/health/get-storage-local.md @@ -0,0 +1,16 @@ +setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint + ->setProject('5df5acd0d48c2') // Your project ID + ->setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key +; + +$health = new Health($client); + +$result = $health->getStorageLocal(); \ No newline at end of file diff --git a/app/sdks/0.7.0/server-php/docs/examples/health/get-time.md b/app/sdks/0.7.0/server-php/docs/examples/health/get-time.md new file mode 100644 index 0000000000..849f499460 --- /dev/null +++ b/app/sdks/0.7.0/server-php/docs/examples/health/get-time.md @@ -0,0 +1,16 @@ +setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint + ->setProject('5df5acd0d48c2') // Your project ID + ->setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key +; + +$health = new Health($client); + +$result = $health->getTime(); \ No newline at end of file diff --git a/app/sdks/0.7.0/server-php/docs/examples/health/get.md b/app/sdks/0.7.0/server-php/docs/examples/health/get.md new file mode 100644 index 0000000000..9f1ec8970c --- /dev/null +++ b/app/sdks/0.7.0/server-php/docs/examples/health/get.md @@ -0,0 +1,16 @@ +setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint + ->setProject('5df5acd0d48c2') // Your project ID + ->setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key +; + +$health = new Health($client); + +$result = $health->get(); \ No newline at end of file diff --git a/app/sdks/0.7.0/server-php/docs/examples/locale/get-continents.md b/app/sdks/0.7.0/server-php/docs/examples/locale/get-continents.md new file mode 100644 index 0000000000..bb099d31f5 --- /dev/null +++ b/app/sdks/0.7.0/server-php/docs/examples/locale/get-continents.md @@ -0,0 +1,16 @@ +setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint + ->setProject('5df5acd0d48c2') // Your project ID + ->setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key +; + +$locale = new Locale($client); + +$result = $locale->getContinents(); \ No newline at end of file diff --git a/app/sdks/0.7.0/server-php/docs/examples/locale/get-countries-e-u.md b/app/sdks/0.7.0/server-php/docs/examples/locale/get-countries-e-u.md new file mode 100644 index 0000000000..87287a5cea --- /dev/null +++ b/app/sdks/0.7.0/server-php/docs/examples/locale/get-countries-e-u.md @@ -0,0 +1,16 @@ +setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint + ->setProject('5df5acd0d48c2') // Your project ID + ->setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key +; + +$locale = new Locale($client); + +$result = $locale->getCountriesEU(); \ No newline at end of file diff --git a/app/sdks/0.7.0/server-php/docs/examples/locale/get-countries-phones.md b/app/sdks/0.7.0/server-php/docs/examples/locale/get-countries-phones.md new file mode 100644 index 0000000000..71a39303da --- /dev/null +++ b/app/sdks/0.7.0/server-php/docs/examples/locale/get-countries-phones.md @@ -0,0 +1,16 @@ +setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint + ->setProject('5df5acd0d48c2') // Your project ID + ->setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key +; + +$locale = new Locale($client); + +$result = $locale->getCountriesPhones(); \ No newline at end of file diff --git a/app/sdks/0.7.0/server-php/docs/examples/locale/get-countries.md b/app/sdks/0.7.0/server-php/docs/examples/locale/get-countries.md new file mode 100644 index 0000000000..1c8f863a76 --- /dev/null +++ b/app/sdks/0.7.0/server-php/docs/examples/locale/get-countries.md @@ -0,0 +1,16 @@ +setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint + ->setProject('5df5acd0d48c2') // Your project ID + ->setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key +; + +$locale = new Locale($client); + +$result = $locale->getCountries(); \ No newline at end of file diff --git a/app/sdks/0.7.0/server-php/docs/examples/locale/get-currencies.md b/app/sdks/0.7.0/server-php/docs/examples/locale/get-currencies.md new file mode 100644 index 0000000000..b799bf6b80 --- /dev/null +++ b/app/sdks/0.7.0/server-php/docs/examples/locale/get-currencies.md @@ -0,0 +1,16 @@ +setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint + ->setProject('5df5acd0d48c2') // Your project ID + ->setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key +; + +$locale = new Locale($client); + +$result = $locale->getCurrencies(); \ No newline at end of file diff --git a/app/sdks/0.7.0/server-php/docs/examples/locale/get.md b/app/sdks/0.7.0/server-php/docs/examples/locale/get.md new file mode 100644 index 0000000000..8e11f17689 --- /dev/null +++ b/app/sdks/0.7.0/server-php/docs/examples/locale/get.md @@ -0,0 +1,16 @@ +setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint + ->setProject('5df5acd0d48c2') // Your project ID + ->setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key +; + +$locale = new Locale($client); + +$result = $locale->get(); \ No newline at end of file diff --git a/app/sdks/0.7.0/server-php/docs/examples/storage/create-file.md b/app/sdks/0.7.0/server-php/docs/examples/storage/create-file.md new file mode 100644 index 0000000000..ba533dd2e7 --- /dev/null +++ b/app/sdks/0.7.0/server-php/docs/examples/storage/create-file.md @@ -0,0 +1,16 @@ +setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint + ->setProject('5df5acd0d48c2') // Your project ID + ->setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key +; + +$storage = new Storage($client); + +$result = $storage->createFile(new \CURLFile('/path/to/file.png', 'image/png', 'file.png'), [], []); \ No newline at end of file diff --git a/app/sdks/0.7.0/server-php/docs/examples/storage/delete-file.md b/app/sdks/0.7.0/server-php/docs/examples/storage/delete-file.md new file mode 100644 index 0000000000..23d4013d22 --- /dev/null +++ b/app/sdks/0.7.0/server-php/docs/examples/storage/delete-file.md @@ -0,0 +1,16 @@ +setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint + ->setProject('5df5acd0d48c2') // Your project ID + ->setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key +; + +$storage = new Storage($client); + +$result = $storage->deleteFile('[FILE_ID]'); \ No newline at end of file diff --git a/app/sdks/0.7.0/server-php/docs/examples/storage/get-file-download.md b/app/sdks/0.7.0/server-php/docs/examples/storage/get-file-download.md new file mode 100644 index 0000000000..3064481141 --- /dev/null +++ b/app/sdks/0.7.0/server-php/docs/examples/storage/get-file-download.md @@ -0,0 +1,16 @@ +setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint + ->setProject('5df5acd0d48c2') // Your project ID + ->setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key +; + +$storage = new Storage($client); + +$result = $storage->getFileDownload('[FILE_ID]'); \ No newline at end of file diff --git a/app/sdks/0.7.0/server-php/docs/examples/storage/get-file-preview.md b/app/sdks/0.7.0/server-php/docs/examples/storage/get-file-preview.md new file mode 100644 index 0000000000..00cb63696b --- /dev/null +++ b/app/sdks/0.7.0/server-php/docs/examples/storage/get-file-preview.md @@ -0,0 +1,16 @@ +setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint + ->setProject('5df5acd0d48c2') // Your project ID + ->setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key +; + +$storage = new Storage($client); + +$result = $storage->getFilePreview('[FILE_ID]'); \ No newline at end of file diff --git a/app/sdks/0.7.0/server-php/docs/examples/storage/get-file-view.md b/app/sdks/0.7.0/server-php/docs/examples/storage/get-file-view.md new file mode 100644 index 0000000000..07b7ab32ba --- /dev/null +++ b/app/sdks/0.7.0/server-php/docs/examples/storage/get-file-view.md @@ -0,0 +1,16 @@ +setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint + ->setProject('5df5acd0d48c2') // Your project ID + ->setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key +; + +$storage = new Storage($client); + +$result = $storage->getFileView('[FILE_ID]'); \ No newline at end of file diff --git a/app/sdks/0.7.0/server-php/docs/examples/storage/get-file.md b/app/sdks/0.7.0/server-php/docs/examples/storage/get-file.md new file mode 100644 index 0000000000..c8b6495f18 --- /dev/null +++ b/app/sdks/0.7.0/server-php/docs/examples/storage/get-file.md @@ -0,0 +1,16 @@ +setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint + ->setProject('5df5acd0d48c2') // Your project ID + ->setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key +; + +$storage = new Storage($client); + +$result = $storage->getFile('[FILE_ID]'); \ No newline at end of file diff --git a/app/sdks/0.7.0/server-php/docs/examples/storage/list-files.md b/app/sdks/0.7.0/server-php/docs/examples/storage/list-files.md new file mode 100644 index 0000000000..787c38e320 --- /dev/null +++ b/app/sdks/0.7.0/server-php/docs/examples/storage/list-files.md @@ -0,0 +1,16 @@ +setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint + ->setProject('5df5acd0d48c2') // Your project ID + ->setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key +; + +$storage = new Storage($client); + +$result = $storage->listFiles(); \ No newline at end of file diff --git a/app/sdks/0.7.0/server-php/docs/examples/storage/update-file.md b/app/sdks/0.7.0/server-php/docs/examples/storage/update-file.md new file mode 100644 index 0000000000..7515217b97 --- /dev/null +++ b/app/sdks/0.7.0/server-php/docs/examples/storage/update-file.md @@ -0,0 +1,16 @@ +setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint + ->setProject('5df5acd0d48c2') // Your project ID + ->setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key +; + +$storage = new Storage($client); + +$result = $storage->updateFile('[FILE_ID]', [], []); \ No newline at end of file diff --git a/app/sdks/0.7.0/server-php/docs/examples/teams/create-membership.md b/app/sdks/0.7.0/server-php/docs/examples/teams/create-membership.md new file mode 100644 index 0000000000..9c88b1bba5 --- /dev/null +++ b/app/sdks/0.7.0/server-php/docs/examples/teams/create-membership.md @@ -0,0 +1,16 @@ +setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint + ->setProject('5df5acd0d48c2') // Your project ID + ->setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key +; + +$teams = new Teams($client); + +$result = $teams->createMembership('[TEAM_ID]', 'email@example.com', [], 'https://example.com'); \ No newline at end of file diff --git a/app/sdks/0.7.0/server-php/docs/examples/teams/create.md b/app/sdks/0.7.0/server-php/docs/examples/teams/create.md new file mode 100644 index 0000000000..7b0946bc83 --- /dev/null +++ b/app/sdks/0.7.0/server-php/docs/examples/teams/create.md @@ -0,0 +1,16 @@ +setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint + ->setProject('5df5acd0d48c2') // Your project ID + ->setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key +; + +$teams = new Teams($client); + +$result = $teams->create('[NAME]'); \ No newline at end of file diff --git a/app/sdks/0.7.0/server-php/docs/examples/teams/delete-membership.md b/app/sdks/0.7.0/server-php/docs/examples/teams/delete-membership.md new file mode 100644 index 0000000000..ca9d3d57c0 --- /dev/null +++ b/app/sdks/0.7.0/server-php/docs/examples/teams/delete-membership.md @@ -0,0 +1,16 @@ +setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint + ->setProject('5df5acd0d48c2') // Your project ID + ->setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key +; + +$teams = new Teams($client); + +$result = $teams->deleteMembership('[TEAM_ID]', '[INVITE_ID]'); \ No newline at end of file diff --git a/app/sdks/0.7.0/server-php/docs/examples/teams/delete.md b/app/sdks/0.7.0/server-php/docs/examples/teams/delete.md new file mode 100644 index 0000000000..394a1940fc --- /dev/null +++ b/app/sdks/0.7.0/server-php/docs/examples/teams/delete.md @@ -0,0 +1,16 @@ +setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint + ->setProject('5df5acd0d48c2') // Your project ID + ->setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key +; + +$teams = new Teams($client); + +$result = $teams->delete('[TEAM_ID]'); \ No newline at end of file diff --git a/app/sdks/0.7.0/server-php/docs/examples/teams/get-memberships.md b/app/sdks/0.7.0/server-php/docs/examples/teams/get-memberships.md new file mode 100644 index 0000000000..56f6d59063 --- /dev/null +++ b/app/sdks/0.7.0/server-php/docs/examples/teams/get-memberships.md @@ -0,0 +1,16 @@ +setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint + ->setProject('5df5acd0d48c2') // Your project ID + ->setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key +; + +$teams = new Teams($client); + +$result = $teams->getMemberships('[TEAM_ID]'); \ No newline at end of file diff --git a/app/sdks/0.7.0/server-php/docs/examples/teams/get.md b/app/sdks/0.7.0/server-php/docs/examples/teams/get.md new file mode 100644 index 0000000000..6f0b705707 --- /dev/null +++ b/app/sdks/0.7.0/server-php/docs/examples/teams/get.md @@ -0,0 +1,16 @@ +setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint + ->setProject('5df5acd0d48c2') // Your project ID + ->setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key +; + +$teams = new Teams($client); + +$result = $teams->get('[TEAM_ID]'); \ No newline at end of file diff --git a/app/sdks/0.7.0/server-php/docs/examples/teams/list.md b/app/sdks/0.7.0/server-php/docs/examples/teams/list.md new file mode 100644 index 0000000000..d17bb7689b --- /dev/null +++ b/app/sdks/0.7.0/server-php/docs/examples/teams/list.md @@ -0,0 +1,16 @@ +setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint + ->setProject('5df5acd0d48c2') // Your project ID + ->setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key +; + +$teams = new Teams($client); + +$result = $teams->list(); \ No newline at end of file diff --git a/app/sdks/0.7.0/server-php/docs/examples/teams/update.md b/app/sdks/0.7.0/server-php/docs/examples/teams/update.md new file mode 100644 index 0000000000..945001dc36 --- /dev/null +++ b/app/sdks/0.7.0/server-php/docs/examples/teams/update.md @@ -0,0 +1,16 @@ +setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint + ->setProject('5df5acd0d48c2') // Your project ID + ->setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key +; + +$teams = new Teams($client); + +$result = $teams->update('[TEAM_ID]', '[NAME]'); \ No newline at end of file diff --git a/app/sdks/0.7.0/server-php/docs/examples/users/create.md b/app/sdks/0.7.0/server-php/docs/examples/users/create.md new file mode 100644 index 0000000000..53497b4277 --- /dev/null +++ b/app/sdks/0.7.0/server-php/docs/examples/users/create.md @@ -0,0 +1,16 @@ +setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint + ->setProject('5df5acd0d48c2') // Your project ID + ->setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key +; + +$users = new Users($client); + +$result = $users->create('email@example.com', 'password'); \ No newline at end of file diff --git a/app/sdks/0.7.0/server-php/docs/examples/users/delete-session.md b/app/sdks/0.7.0/server-php/docs/examples/users/delete-session.md new file mode 100644 index 0000000000..ead6de7549 --- /dev/null +++ b/app/sdks/0.7.0/server-php/docs/examples/users/delete-session.md @@ -0,0 +1,16 @@ +setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint + ->setProject('5df5acd0d48c2') // Your project ID + ->setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key +; + +$users = new Users($client); + +$result = $users->deleteSession('[USER_ID]', '[SESSION_ID]'); \ No newline at end of file diff --git a/app/sdks/0.7.0/server-php/docs/examples/users/delete-sessions.md b/app/sdks/0.7.0/server-php/docs/examples/users/delete-sessions.md new file mode 100644 index 0000000000..968d788ea7 --- /dev/null +++ b/app/sdks/0.7.0/server-php/docs/examples/users/delete-sessions.md @@ -0,0 +1,16 @@ +setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint + ->setProject('5df5acd0d48c2') // Your project ID + ->setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key +; + +$users = new Users($client); + +$result = $users->deleteSessions('[USER_ID]'); \ No newline at end of file diff --git a/app/sdks/0.7.0/server-php/docs/examples/users/get-logs.md b/app/sdks/0.7.0/server-php/docs/examples/users/get-logs.md new file mode 100644 index 0000000000..5602536920 --- /dev/null +++ b/app/sdks/0.7.0/server-php/docs/examples/users/get-logs.md @@ -0,0 +1,16 @@ +setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint + ->setProject('5df5acd0d48c2') // Your project ID + ->setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key +; + +$users = new Users($client); + +$result = $users->getLogs('[USER_ID]'); \ No newline at end of file diff --git a/app/sdks/0.7.0/server-php/docs/examples/users/get-prefs.md b/app/sdks/0.7.0/server-php/docs/examples/users/get-prefs.md new file mode 100644 index 0000000000..1c9978a0fb --- /dev/null +++ b/app/sdks/0.7.0/server-php/docs/examples/users/get-prefs.md @@ -0,0 +1,16 @@ +setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint + ->setProject('5df5acd0d48c2') // Your project ID + ->setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key +; + +$users = new Users($client); + +$result = $users->getPrefs('[USER_ID]'); \ No newline at end of file diff --git a/app/sdks/0.7.0/server-php/docs/examples/users/get-sessions.md b/app/sdks/0.7.0/server-php/docs/examples/users/get-sessions.md new file mode 100644 index 0000000000..fef9f1db74 --- /dev/null +++ b/app/sdks/0.7.0/server-php/docs/examples/users/get-sessions.md @@ -0,0 +1,16 @@ +setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint + ->setProject('5df5acd0d48c2') // Your project ID + ->setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key +; + +$users = new Users($client); + +$result = $users->getSessions('[USER_ID]'); \ No newline at end of file diff --git a/app/sdks/0.7.0/server-php/docs/examples/users/get.md b/app/sdks/0.7.0/server-php/docs/examples/users/get.md new file mode 100644 index 0000000000..16c29f9a5a --- /dev/null +++ b/app/sdks/0.7.0/server-php/docs/examples/users/get.md @@ -0,0 +1,16 @@ +setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint + ->setProject('5df5acd0d48c2') // Your project ID + ->setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key +; + +$users = new Users($client); + +$result = $users->get('[USER_ID]'); \ No newline at end of file diff --git a/app/sdks/0.7.0/server-php/docs/examples/users/list.md b/app/sdks/0.7.0/server-php/docs/examples/users/list.md new file mode 100644 index 0000000000..efce771ea1 --- /dev/null +++ b/app/sdks/0.7.0/server-php/docs/examples/users/list.md @@ -0,0 +1,16 @@ +setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint + ->setProject('5df5acd0d48c2') // Your project ID + ->setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key +; + +$users = new Users($client); + +$result = $users->list(); \ No newline at end of file diff --git a/app/sdks/0.7.0/server-php/docs/examples/users/update-prefs.md b/app/sdks/0.7.0/server-php/docs/examples/users/update-prefs.md new file mode 100644 index 0000000000..9e9141f8a7 --- /dev/null +++ b/app/sdks/0.7.0/server-php/docs/examples/users/update-prefs.md @@ -0,0 +1,16 @@ +setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint + ->setProject('5df5acd0d48c2') // Your project ID + ->setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key +; + +$users = new Users($client); + +$result = $users->updatePrefs('[USER_ID]', []); \ No newline at end of file diff --git a/app/sdks/0.7.0/server-php/docs/examples/users/update-status.md b/app/sdks/0.7.0/server-php/docs/examples/users/update-status.md new file mode 100644 index 0000000000..87f9bceb46 --- /dev/null +++ b/app/sdks/0.7.0/server-php/docs/examples/users/update-status.md @@ -0,0 +1,16 @@ +setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint + ->setProject('5df5acd0d48c2') // Your project ID + ->setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key +; + +$users = new Users($client); + +$result = $users->updateStatus('[USER_ID]', '1'); \ No newline at end of file diff --git a/app/sdks/0.7.0/server-php/docs/functions.md b/app/sdks/0.7.0/server-php/docs/functions.md new file mode 100644 index 0000000000..39e28d55b8 --- /dev/null +++ b/app/sdks/0.7.0/server-php/docs/functions.md @@ -0,0 +1,186 @@ +# Functions Service + +## List Functions + +```http request +GET https://appwrite.io/v1/functions +``` + +### Parameters + +| Field Name | Type | Description | Default | +| --- | --- | --- | --- | +| search | string | Search term to filter your list results. | | +| limit | integer | Results limit value. By default will return maximum 25 results. Maximum of 100 results allowed per request. | 25 | +| offset | integer | Results offset. The default value is 0. Use this param to manage pagination. | 0 | +| orderType | string | Order result by ASC or DESC order. | ASC | + +## Create Function + +```http request +POST https://appwrite.io/v1/functions +``` + +### Parameters + +| Field Name | Type | Description | Default | +| --- | --- | --- | --- | +| name | string | Function name. | | +| vars | object | Key-value JSON object. | [] | +| events | array | Events list. | [] | +| schedule | string | Schedule CRON syntax. | | +| timeout | integer | Function maximum execution time in seconds. | 15 | + +## Get Function + +```http request +GET https://appwrite.io/v1/functions/{functionId} +``` + +### Parameters + +| Field Name | Type | Description | Default | +| --- | --- | --- | --- | +| functionId | string | **Required** Function unique ID. | | + +## Update Function + +```http request +PUT https://appwrite.io/v1/functions/{functionId} +``` + +### Parameters + +| Field Name | Type | Description | Default | +| --- | --- | --- | --- | +| functionId | string | **Required** Function unique ID. | | +| name | string | Function name. | | +| vars | object | Key-value JSON object. | [] | +| events | array | Events list. | [] | +| schedule | string | Schedule CRON syntax. | | +| timeout | integer | Function maximum execution time in seconds. | 15 | + +## Delete Function + +```http request +DELETE https://appwrite.io/v1/functions/{functionId} +``` + +### Parameters + +| Field Name | Type | Description | Default | +| --- | --- | --- | --- | +| functionId | string | **Required** Function unique ID. | | + +## List Executions + +```http request +GET https://appwrite.io/v1/functions/{functionId}/executions +``` + +### Parameters + +| Field Name | Type | Description | Default | +| --- | --- | --- | --- | +| functionId | string | **Required** Function unique ID. | | +| search | string | Search term to filter your list results. | | +| limit | integer | Results limit value. By default will return maximum 25 results. Maximum of 100 results allowed per request. | 25 | +| offset | integer | Results offset. The default value is 0. Use this param to manage pagination. | 0 | +| orderType | string | Order result by ASC or DESC order. | ASC | + +## Create Execution + +```http request +POST https://appwrite.io/v1/functions/{functionId}/executions +``` + +### Parameters + +| Field Name | Type | Description | Default | +| --- | --- | --- | --- | +| functionId | string | **Required** Function unique ID. | | +| async | integer | Execute code asynchronously. Pass 1 for true, 0 for false. Default value is 1. | 1 | + +## Get Execution + +```http request +GET https://appwrite.io/v1/functions/{functionId}/executions/{executionId} +``` + +### Parameters + +| Field Name | Type | Description | Default | +| --- | --- | --- | --- | +| functionId | string | **Required** Function unique ID. | | +| executionId | string | **Required** Execution unique ID. | | + +## Update Function Tag + +```http request +PATCH https://appwrite.io/v1/functions/{functionId}/tag +``` + +### Parameters + +| Field Name | Type | Description | Default | +| --- | --- | --- | --- | +| functionId | string | **Required** Function unique ID. | | +| tag | string | Tag unique ID. | | + +## List Tags + +```http request +GET https://appwrite.io/v1/functions/{functionId}/tags +``` + +### Parameters + +| Field Name | Type | Description | Default | +| --- | --- | --- | --- | +| functionId | string | **Required** Function unique ID. | | +| search | string | Search term to filter your list results. | | +| limit | integer | Results limit value. By default will return maximum 25 results. Maximum of 100 results allowed per request. | 25 | +| offset | integer | Results offset. The default value is 0. Use this param to manage pagination. | 0 | +| orderType | string | Order result by ASC or DESC order. | ASC | + +## Create Tag + +```http request +POST https://appwrite.io/v1/functions/{functionId}/tags +``` + +### Parameters + +| Field Name | Type | Description | Default | +| --- | --- | --- | --- | +| functionId | string | **Required** Function unique ID. | | +| env | string | Execution enviornment. | | +| command | string | Code execution command. | | +| code | string | Code package. Use the Appwrite code packager to create a deployable package file. | | + +## Get Tag + +```http request +GET https://appwrite.io/v1/functions/{functionId}/tags/{tagId} +``` + +### Parameters + +| Field Name | Type | Description | Default | +| --- | --- | --- | --- | +| functionId | string | **Required** Function unique ID. | | +| tagId | string | **Required** Tag unique ID. | | + +## Delete Tag + +```http request +DELETE https://appwrite.io/v1/functions/{functionId}/tags/{tagId} +``` + +### Parameters + +| Field Name | Type | Description | Default | +| --- | --- | --- | --- | +| functionId | string | **Required** Function unique ID. | | +| tagId | string | **Required** Tag unique ID. | | + diff --git a/app/sdks/0.7.0/server-php/docs/health.md b/app/sdks/0.7.0/server-php/docs/health.md new file mode 100644 index 0000000000..38b814b633 --- /dev/null +++ b/app/sdks/0.7.0/server-php/docs/health.md @@ -0,0 +1,96 @@ +# Health Service + +## Get HTTP + +```http request +GET https://appwrite.io/v1/health +``` + +** Check the Appwrite HTTP server is up and responsive. ** + +## Get Anti virus + +```http request +GET https://appwrite.io/v1/health/anti-virus +``` + +** Check the Appwrite Anti Virus server is up and connection is successful. ** + +## Get Cache + +```http request +GET https://appwrite.io/v1/health/cache +``` + +** Check the Appwrite in-memory cache server is up and connection is successful. ** + +## Get DB + +```http request +GET https://appwrite.io/v1/health/db +``` + +** Check the Appwrite database server is up and connection is successful. ** + +## Get Certificate Queue + +```http request +GET https://appwrite.io/v1/health/queue/certificates +``` + +** Get the number of certificates that are waiting to be issued against [Letsencrypt](https://letsencrypt.org/) in the Appwrite internal queue server. ** + +## Get Functions Queue + +```http request +GET https://appwrite.io/v1/health/queue/functions +``` + +## Get Logs Queue + +```http request +GET https://appwrite.io/v1/health/queue/logs +``` + +** Get the number of logs that are waiting to be processed in the Appwrite internal queue server. ** + +## Get Tasks Queue + +```http request +GET https://appwrite.io/v1/health/queue/tasks +``` + +** Get the number of tasks that are waiting to be processed in the Appwrite internal queue server. ** + +## Get Usage Queue + +```http request +GET https://appwrite.io/v1/health/queue/usage +``` + +** Get the number of usage stats that are waiting to be processed in the Appwrite internal queue server. ** + +## Get Webhooks Queue + +```http request +GET https://appwrite.io/v1/health/queue/webhooks +``` + +** Get the number of webhooks that are waiting to be processed in the Appwrite internal queue server. ** + +## Get Local Storage + +```http request +GET https://appwrite.io/v1/health/storage/local +``` + +** Check the Appwrite local storage device is up and connection is successful. ** + +## Get Time + +```http request +GET https://appwrite.io/v1/health/time +``` + +** Check the Appwrite server time is synced with Google remote NTP server. We use this technology to smoothly handle leap seconds with no disruptive events. The [Network Time Protocol](https://en.wikipedia.org/wiki/Network_Time_Protocol) (NTP) is used by hundreds of millions of computers and devices to synchronize their clocks over the Internet. If your computer sets its own clock, it likely uses NTP. ** + diff --git a/app/sdks/0.7.0/server-php/docs/locale.md b/app/sdks/0.7.0/server-php/docs/locale.md new file mode 100644 index 0000000000..7e99b08829 --- /dev/null +++ b/app/sdks/0.7.0/server-php/docs/locale.md @@ -0,0 +1,52 @@ +# Locale Service + +## Get User Locale + +```http request +GET https://appwrite.io/v1/locale +``` + +** Get the current user location based on IP. Returns an object with user country code, country name, continent name, continent code, ip address and suggested currency. You can use the locale header to get the data in a supported language. + +([IP Geolocation by DB-IP](https://db-ip.com)) ** + +## List Continents + +```http request +GET https://appwrite.io/v1/locale/continents +``` + +** List of all continents. You can use the locale header to get the data in a supported language. ** + +## List Countries + +```http request +GET https://appwrite.io/v1/locale/countries +``` + +** List of all countries. You can use the locale header to get the data in a supported language. ** + +## List EU Countries + +```http request +GET https://appwrite.io/v1/locale/countries/eu +``` + +** List of all countries that are currently members of the EU. You can use the locale header to get the data in a supported language. ** + +## List Countries Phone Codes + +```http request +GET https://appwrite.io/v1/locale/countries/phones +``` + +** List of all countries phone codes. You can use the locale header to get the data in a supported language. ** + +## List Currencies + +```http request +GET https://appwrite.io/v1/locale/currencies +``` + +** List of all currencies, including currency symol, name, plural, and decimal digits for all major and minor currencies. You can use the locale header to get the data in a supported language. ** + diff --git a/app/sdks/0.7.0/server-php/docs/storage.md b/app/sdks/0.7.0/server-php/docs/storage.md new file mode 100644 index 0000000000..2138f901a8 --- /dev/null +++ b/app/sdks/0.7.0/server-php/docs/storage.md @@ -0,0 +1,127 @@ +# Storage Service + +## List Files + +```http request +GET https://appwrite.io/v1/storage/files +``` + +** Get a list of all the user files. You can use the query params to filter your results. On admin mode, this endpoint will return a list of all of the project files. [Learn more about different API modes](/docs/admin). ** + +### Parameters + +| Field Name | Type | Description | Default | +| --- | --- | --- | --- | +| search | string | Search term to filter your list results. | | +| limit | integer | Results limit value. By default will return maximum 25 results. Maximum of 100 results allowed per request. | 25 | +| offset | integer | Results offset. The default value is 0. Use this param to manage pagination. | 0 | +| orderType | string | Order result by ASC or DESC order. | ASC | + +## Create File + +```http request +POST https://appwrite.io/v1/storage/files +``` + +** Create a new file. The user who creates the file will automatically be assigned to read and write access unless he has passed custom values for read and write arguments. ** + +### Parameters + +| Field Name | Type | Description | Default | +| --- | --- | --- | --- | +| file | file | Binary File. | | +| read | array | An array of strings with read permissions. By default no user is granted with any read permissions. [learn more about permissions](/docs/permissions) and get a full list of available permissions. | | +| write | array | An array of strings with write permissions. By default no user is granted with any write permissions. [learn more about permissions](/docs/permissions) and get a full list of available permissions. | | + +## Get File + +```http request +GET https://appwrite.io/v1/storage/files/{fileId} +``` + +** Get file by its unique ID. This endpoint response returns a JSON object with the file metadata. ** + +### Parameters + +| Field Name | Type | Description | Default | +| --- | --- | --- | --- | +| fileId | string | **Required** File unique ID. | | + +## Update File + +```http request +PUT https://appwrite.io/v1/storage/files/{fileId} +``` + +** Update file by its unique ID. Only users with write permissions have access to update this resource. ** + +### Parameters + +| Field Name | Type | Description | Default | +| --- | --- | --- | --- | +| fileId | string | **Required** File unique ID. | | +| read | array | An array of strings with read permissions. By default no user is granted with any read permissions. [learn more about permissions](/docs/permissions) and get a full list of available permissions. | | +| write | array | An array of strings with write permissions. By default no user is granted with any write permissions. [learn more about permissions](/docs/permissions) and get a full list of available permissions. | | + +## Delete File + +```http request +DELETE https://appwrite.io/v1/storage/files/{fileId} +``` + +** Delete a file by its unique ID. Only users with write permissions have access to delete this resource. ** + +### Parameters + +| Field Name | Type | Description | Default | +| --- | --- | --- | --- | +| fileId | string | **Required** File unique ID. | | + +## Get File for Download + +```http request +GET https://appwrite.io/v1/storage/files/{fileId}/download +``` + +** Get file content by its unique ID. The endpoint response return with a 'Content-Disposition: attachment' header that tells the browser to start downloading the file to user downloads directory. ** + +### Parameters + +| Field Name | Type | Description | Default | +| --- | --- | --- | --- | +| fileId | string | **Required** File unique ID. | | + +## Get File Preview + +```http request +GET https://appwrite.io/v1/storage/files/{fileId}/preview +``` + +** Get a file preview image. Currently, this method supports preview for image files (jpg, png, and gif), other supported formats, like pdf, docs, slides, and spreadsheets, will return the file icon image. You can also pass query string arguments for cutting and resizing your preview image. ** + +### Parameters + +| Field Name | Type | Description | Default | +| --- | --- | --- | --- | +| fileId | string | **Required** File unique ID | | +| width | integer | Resize preview image width, Pass an integer between 0 to 4000. | 0 | +| height | integer | Resize preview image height, Pass an integer between 0 to 4000. | 0 | +| quality | integer | Preview image quality. Pass an integer between 0 to 100. Defaults to 100. | 100 | +| background | string | Preview image background color. Only works with transparent images (png). Use a valid HEX color, no # is needed for prefix. | | +| output | string | Output format type (jpeg, jpg, png, gif and webp). | | + +## Get File for View + +```http request +GET https://appwrite.io/v1/storage/files/{fileId}/view +``` + +** Get file content by its unique ID. This endpoint is similar to the download method but returns with no 'Content-Disposition: attachment' header. ** + +### Parameters + +| Field Name | Type | Description | Default | +| --- | --- | --- | --- | +| fileId | string | **Required** File unique ID. | | +| as | string | Choose a file format to convert your file to. Currently you can only convert word and pdf files to pdf or txt. This option is currently experimental only, use at your own risk. | | + diff --git a/app/sdks/0.7.0/server-php/docs/teams.md b/app/sdks/0.7.0/server-php/docs/teams.md new file mode 100644 index 0000000000..7b2646c0ce --- /dev/null +++ b/app/sdks/0.7.0/server-php/docs/teams.md @@ -0,0 +1,128 @@ +# Teams Service + +## List Teams + +```http request +GET https://appwrite.io/v1/teams +``` + +** Get a list of all the current user teams. You can use the query params to filter your results. On admin mode, this endpoint will return a list of all of the project teams. [Learn more about different API modes](/docs/admin). ** + +### Parameters + +| Field Name | Type | Description | Default | +| --- | --- | --- | --- | +| search | string | Search term to filter your list results. | | +| limit | integer | Results limit value. By default will return maximum 25 results. Maximum of 100 results allowed per request. | 25 | +| offset | integer | Results offset. The default value is 0. Use this param to manage pagination. | 0 | +| orderType | string | Order result by ASC or DESC order. | ASC | + +## Create Team + +```http request +POST https://appwrite.io/v1/teams +``` + +** Create a new team. The user who creates the team will automatically be assigned as the owner of the team. The team owner can invite new members, who will be able add new owners and update or delete the team from your project. ** + +### Parameters + +| Field Name | Type | Description | Default | +| --- | --- | --- | --- | +| name | string | Team name. | | +| roles | array | Array of strings. Use this param to set the roles in the team for the user who created it. The default role is **owner**. A role can be any string. Learn more about [roles and permissions](/docs/permissions). | ["owner"] | + +## Get Team + +```http request +GET https://appwrite.io/v1/teams/{teamId} +``` + +** Get team by its unique ID. All team members have read access for this resource. ** + +### Parameters + +| Field Name | Type | Description | Default | +| --- | --- | --- | --- | +| teamId | string | **Required** Team unique ID. | | + +## Update Team + +```http request +PUT https://appwrite.io/v1/teams/{teamId} +``` + +** Update team by its unique ID. Only team owners have write access for this resource. ** + +### Parameters + +| Field Name | Type | Description | Default | +| --- | --- | --- | --- | +| teamId | string | **Required** Team unique ID. | | +| name | string | Team name. | | + +## Delete Team + +```http request +DELETE https://appwrite.io/v1/teams/{teamId} +``` + +** Delete team by its unique ID. Only team owners have write access for this resource. ** + +### Parameters + +| Field Name | Type | Description | Default | +| --- | --- | --- | --- | +| teamId | string | **Required** Team unique ID. | | + +## Get Team Memberships + +```http request +GET https://appwrite.io/v1/teams/{teamId}/memberships +``` + +** Get team members by the team unique ID. All team members have read access for this list of resources. ** + +### Parameters + +| Field Name | Type | Description | Default | +| --- | --- | --- | --- | +| teamId | string | **Required** Team unique ID. | | + +## Create Team Membership + +```http request +POST https://appwrite.io/v1/teams/{teamId}/memberships +``` + +** Use this endpoint to invite a new member to join your team. An email with a link to join the team will be sent to the new member email address if the member doesn't exist in the project it will be created automatically. + +Use the 'URL' parameter to redirect the user from the invitation email back to your app. When the user is redirected, use the [Update Team Membership Status](/docs/teams#updateMembershipStatus) endpoint to allow the user to accept the invitation to the team. + +Please note that in order to avoid a [Redirect Attacks](https://github.com/OWASP/CheatSheetSeries/blob/master/cheatsheets/Unvalidated_Redirects_and_Forwards_Cheat_Sheet.md) the only valid redirect URL's are the once from domains you have set when added your platforms in the console interface. ** + +### Parameters + +| Field Name | Type | Description | Default | +| --- | --- | --- | --- | +| teamId | string | **Required** Team unique ID. | | +| email | string | New team member email. | | +| name | string | New team member name. | | +| roles | array | Array of strings. Use this param to set the user roles in the team. A role can be any string. Learn more about [roles and permissions](/docs/permissions). | | +| url | string | URL to redirect the user back to your app from the invitation email. | | + +## Delete Team Membership + +```http request +DELETE https://appwrite.io/v1/teams/{teamId}/memberships/{inviteId} +``` + +** This endpoint allows a user to leave a team or for a team owner to delete the membership of any other team member. You can also use this endpoint to delete a user membership even if he didn't accept it. ** + +### Parameters + +| Field Name | Type | Description | Default | +| --- | --- | --- | --- | +| teamId | string | **Required** Team unique ID. | | +| inviteId | string | **Required** Invite unique ID. | | + diff --git a/app/sdks/0.7.0/server-php/docs/users.md b/app/sdks/0.7.0/server-php/docs/users.md new file mode 100644 index 0000000000..fd884b254f --- /dev/null +++ b/app/sdks/0.7.0/server-php/docs/users.md @@ -0,0 +1,150 @@ +# Users Service + +## List Users + +```http request +GET https://appwrite.io/v1/users +``` + +** Get a list of all the project users. You can use the query params to filter your results. ** + +### Parameters + +| Field Name | Type | Description | Default | +| --- | --- | --- | --- | +| search | string | Search term to filter your list results. | | +| limit | integer | Results limit value. By default will return maximum 25 results. Maximum of 100 results allowed per request. | 25 | +| offset | integer | Results offset. The default value is 0. Use this param to manage pagination. | 0 | +| orderType | string | Order result by ASC or DESC order. | ASC | + +## Create User + +```http request +POST https://appwrite.io/v1/users +``` + +** Create a new user. ** + +### Parameters + +| Field Name | Type | Description | Default | +| --- | --- | --- | --- | +| email | string | User email. | | +| password | string | User password. | | +| name | string | User name. | | + +## Get User + +```http request +GET https://appwrite.io/v1/users/{userId} +``` + +** Get user by its unique ID. ** + +### Parameters + +| Field Name | Type | Description | Default | +| --- | --- | --- | --- | +| userId | string | **Required** User unique ID. | | + +## Get User Logs + +```http request +GET https://appwrite.io/v1/users/{userId}/logs +``` + +** Get user activity logs list by its unique ID. ** + +### Parameters + +| Field Name | Type | Description | Default | +| --- | --- | --- | --- | +| userId | string | **Required** User unique ID. | | + +## Get User Preferences + +```http request +GET https://appwrite.io/v1/users/{userId}/prefs +``` + +** Get user preferences by its unique ID. ** + +### Parameters + +| Field Name | Type | Description | Default | +| --- | --- | --- | --- | +| userId | string | **Required** User unique ID. | | + +## Update User Preferences + +```http request +PATCH https://appwrite.io/v1/users/{userId}/prefs +``` + +** Update user preferences by its unique ID. You can pass only the specific settings you wish to update. ** + +### Parameters + +| Field Name | Type | Description | Default | +| --- | --- | --- | --- | +| userId | string | **Required** User unique ID. | | +| prefs | object | Prefs key-value JSON object. | | + +## Get User Sessions + +```http request +GET https://appwrite.io/v1/users/{userId}/sessions +``` + +** Get user sessions list by its unique ID. ** + +### Parameters + +| Field Name | Type | Description | Default | +| --- | --- | --- | --- | +| userId | string | **Required** User unique ID. | | + +## Delete User Sessions + +```http request +DELETE https://appwrite.io/v1/users/{userId}/sessions +``` + +** Delete all user sessions by its unique ID. ** + +### Parameters + +| Field Name | Type | Description | Default | +| --- | --- | --- | --- | +| userId | string | **Required** User unique ID. | | + +## Delete User Session + +```http request +DELETE https://appwrite.io/v1/users/{userId}/sessions/{sessionId} +``` + +** Delete user sessions by its unique ID. ** + +### Parameters + +| Field Name | Type | Description | Default | +| --- | --- | --- | --- | +| userId | string | **Required** User unique ID. | | +| sessionId | string | **Required** User unique session ID. | | + +## Update User Status + +```http request +PATCH https://appwrite.io/v1/users/{userId}/status +``` + +** Update user status by its unique ID. ** + +### Parameters + +| Field Name | Type | Description | Default | +| --- | --- | --- | --- | +| userId | string | **Required** User unique ID. | | +| status | string | User Status code. To activate the user pass 1, to block the user pass 2 and for disabling the user pass 0 | | + diff --git a/app/sdks/0.7.0/server-php/src/Appwrite/Client.php b/app/sdks/0.7.0/server-php/src/Appwrite/Client.php new file mode 100644 index 0000000000..f44d0c9233 --- /dev/null +++ b/app/sdks/0.7.0/server-php/src/Appwrite/Client.php @@ -0,0 +1,240 @@ + '', + 'x-sdk-version' => 'appwrite:php:1.1.0', + ]; + + /** + * SDK constructor. + */ + public function __construct() + { + } + + /** + * Set Project + * + * Your project ID + * + * @param string $value + * + * @return Client + */ + public function setProject($value) + { + $this->addHeader('X-Appwrite-Project', $value); + + return $this; + } + + /** + * Set Key + * + * Your secret API key + * + * @param string $value + * + * @return Client + */ + public function setKey($value) + { + $this->addHeader('X-Appwrite-Key', $value); + + return $this; + } + + /** + * Set Locale + * + * @param string $value + * + * @return Client + */ + public function setLocale($value) + { + $this->addHeader('X-Appwrite-Locale', $value); + + return $this; + } + + + /*** + * @param bool $status + * @return $this + */ + public function setSelfSigned($status = true) + { + $this->selfSigned = $status; + + return $this; + } + + /*** + * @param $endpoint + * @return $this + */ + public function setEndpoint($endpoint) + { + $this->endpoint = $endpoint; + + return $this; + } + + /** + * @param $key + * @param $value + */ + public function addHeader($key, $value) + { + $this->headers[strtolower($key)] = strtolower($value); + + return $this; + } + + /** + * Call + * + * Make an API call + * + * @param string $method + * @param string $path + * @param array $params + * @param array $headers + * @return array|string + * @throws Exception + */ + public function call($method, $path = '', $headers = array(), array $params = array()) + { + $headers = array_merge($this->headers, $headers); + $ch = curl_init($this->endpoint . $path . (($method == self::METHOD_GET && !empty($params)) ? '?' . http_build_query($params) : '')); + $responseHeaders = []; + $responseStatus = -1; + $responseType = ''; + $responseBody = ''; + + switch ($headers['content-type']) { + case 'application/json': + $query = json_encode($params); + break; + + case 'multipart/form-data': + $query = $this->flatten($params); + break; + + default: + $query = http_build_query($params); + break; + } + + foreach ($headers as $i => $header) { + $headers[] = $i . ':' . $header; + unset($headers[$i]); + } + + curl_setopt($ch, CURLOPT_CUSTOMREQUEST, $method); + curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1); + curl_setopt($ch, CURLOPT_USERAGENT, php_uname('s') . '-' . php_uname('r') . ':php-' . phpversion()); + curl_setopt($ch, CURLOPT_HTTPHEADER, $headers); + curl_setopt($ch, CURLOPT_FOLLOWLOCATION, true); + curl_setopt($ch, CURLOPT_HEADERFUNCTION, function($curl, $header) use (&$responseHeaders) { + $len = strlen($header); + $header = explode(':', strtolower($header), 2); + + if (count($header) < 2) { // ignore invalid headers + return $len; + } + + $responseHeaders[strtolower(trim($header[0]))] = trim($header[1]); + + return $len; + }); + + if($method != self::METHOD_GET) { + curl_setopt($ch, CURLOPT_POSTFIELDS, $query); + } + + // Allow self signed certificates + if($this->selfSigned) { + curl_setopt($ch, CURLOPT_SSL_VERIFYHOST, false); + curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, false); + } + + $responseBody = curl_exec($ch); + $responseType = (isset($responseHeaders['content-type'])) ? $responseHeaders['content-type'] : ''; + $responseStatus = curl_getinfo($ch, CURLINFO_HTTP_CODE); + + switch(substr($responseType, 0, strpos($responseType, ';'))) { + case 'application/json': + $responseBody = json_decode($responseBody, true); + break; + } + + if ((curl_errno($ch)/* || 200 != $responseStatus*/)) { + throw new Exception(curl_error($ch) . ' with status code ' . $responseStatus, $responseStatus); + } + + curl_close($ch); + + return $responseBody; + } + + /** + * Flatten params array to PHP multiple format + * + * @param array $data + * @param string $prefix + * @return array + */ + protected function flatten(array $data, $prefix = '') { + $output = []; + + foreach($data as $key => $value) { + $finalKey = $prefix ? "{$prefix}[{$key}]" : $key; + + if (is_array($value)) { + $output += $this->flatten($value, $finalKey); // @todo: handle name collision here if needed + } + else { + $output[$finalKey] = $value; + } + } + + return $output; + } +} diff --git a/app/sdks/0.7.0/server-php/src/Appwrite/Service.php b/app/sdks/0.7.0/server-php/src/Appwrite/Service.php new file mode 100644 index 0000000000..ea3ad92e2d --- /dev/null +++ b/app/sdks/0.7.0/server-php/src/Appwrite/Service.php @@ -0,0 +1,19 @@ +client = $client; + } +} \ No newline at end of file diff --git a/app/sdks/0.7.0/server-php/src/Appwrite/Services/Avatars.php b/app/sdks/0.7.0/server-php/src/Appwrite/Services/Avatars.php new file mode 100644 index 0000000000..90f39f8535 --- /dev/null +++ b/app/sdks/0.7.0/server-php/src/Appwrite/Services/Avatars.php @@ -0,0 +1,175 @@ +client->call(Client::METHOD_GET, $path, [ + 'content-type' => 'application/json', + ], $params); + } + + /** + * Get Credit Card Icon + * + * Need to display your users with your billing method or their payment + * methods? The credit card endpoint will return you the icon of the credit + * card provider you need. Use width, height and quality arguments to change + * the output settings. + * + * @param string $code + * @param int $width + * @param int $height + * @param int $quality + * @throws Exception + * @return array + */ + public function getCreditCard(string $code, int $width = 100, int $height = 100, int $quality = 100):array + { + $path = str_replace(['{code}'], [$code], '/avatars/credit-cards/{code}'); + $params = []; + + $params['width'] = $width; + $params['height'] = $height; + $params['quality'] = $quality; + + return $this->client->call(Client::METHOD_GET, $path, [ + 'content-type' => 'application/json', + ], $params); + } + + /** + * Get Favicon + * + * Use this endpoint to fetch the favorite icon (AKA favicon) of a any remote + * website URL. + * + * @param string $url + * @throws Exception + * @return array + */ + public function getFavicon(string $url):array + { + $path = str_replace([], [], '/avatars/favicon'); + $params = []; + + $params['url'] = $url; + + return $this->client->call(Client::METHOD_GET, $path, [ + 'content-type' => 'application/json', + ], $params); + } + + /** + * Get Country Flag + * + * You can use this endpoint to show different country flags icons to your + * users. The code argument receives the 2 letter country code. Use width, + * height and quality arguments to change the output settings. + * + * @param string $code + * @param int $width + * @param int $height + * @param int $quality + * @throws Exception + * @return array + */ + public function getFlag(string $code, int $width = 100, int $height = 100, int $quality = 100):array + { + $path = str_replace(['{code}'], [$code], '/avatars/flags/{code}'); + $params = []; + + $params['width'] = $width; + $params['height'] = $height; + $params['quality'] = $quality; + + return $this->client->call(Client::METHOD_GET, $path, [ + 'content-type' => 'application/json', + ], $params); + } + + /** + * Get Image from URL + * + * Use this endpoint to fetch a remote image URL and crop it to any image size + * you want. This endpoint is very useful if you need to crop and display + * remote images in your app or in case you want to make sure a 3rd party + * image is properly served using a TLS protocol. + * + * @param string $url + * @param int $width + * @param int $height + * @throws Exception + * @return array + */ + public function getImage(string $url, int $width = 400, int $height = 400):array + { + $path = str_replace([], [], '/avatars/image'); + $params = []; + + $params['url'] = $url; + $params['width'] = $width; + $params['height'] = $height; + + return $this->client->call(Client::METHOD_GET, $path, [ + 'content-type' => 'application/json', + ], $params); + } + + /** + * Get QR Code + * + * Converts a given plain text to a QR code image. You can use the query + * parameters to change the size and style of the resulting image. + * + * @param string $text + * @param int $size + * @param int $margin + * @param int $download + * @throws Exception + * @return array + */ + public function getQR(string $text, int $size = 400, int $margin = 1, int $download = 0):array + { + $path = str_replace([], [], '/avatars/qr'); + $params = []; + + $params['text'] = $text; + $params['size'] = $size; + $params['margin'] = $margin; + $params['download'] = $download; + + return $this->client->call(Client::METHOD_GET, $path, [ + 'content-type' => 'application/json', + ], $params); + } + +} \ No newline at end of file diff --git a/app/sdks/0.7.0/server-php/src/Appwrite/Services/Database.php b/app/sdks/0.7.0/server-php/src/Appwrite/Services/Database.php new file mode 100644 index 0000000000..7ce8ac359f --- /dev/null +++ b/app/sdks/0.7.0/server-php/src/Appwrite/Services/Database.php @@ -0,0 +1,299 @@ +client->call(Client::METHOD_GET, $path, [ + 'content-type' => 'application/json', + ], $params); + } + + /** + * Create Collection + * + * Create a new Collection. + * + * @param string $name + * @param array $read + * @param array $write + * @param array $rules + * @throws Exception + * @return array + */ + public function createCollection(string $name, array $read, array $write, array $rules):array + { + $path = str_replace([], [], '/database/collections'); + $params = []; + + $params['name'] = $name; + $params['read'] = $read; + $params['write'] = $write; + $params['rules'] = $rules; + + return $this->client->call(Client::METHOD_POST, $path, [ + 'content-type' => 'application/json', + ], $params); + } + + /** + * Get Collection + * + * Get collection by its unique ID. This endpoint response returns a JSON + * object with the collection metadata. + * + * @param string $collectionId + * @throws Exception + * @return array + */ + public function getCollection(string $collectionId):array + { + $path = str_replace(['{collectionId}'], [$collectionId], '/database/collections/{collectionId}'); + $params = []; + + + return $this->client->call(Client::METHOD_GET, $path, [ + 'content-type' => 'application/json', + ], $params); + } + + /** + * Update Collection + * + * Update collection by its unique ID. + * + * @param string $collectionId + * @param string $name + * @param array $read + * @param array $write + * @param array $rules + * @throws Exception + * @return array + */ + public function updateCollection(string $collectionId, string $name, array $read, array $write, array $rules = []):array + { + $path = str_replace(['{collectionId}'], [$collectionId], '/database/collections/{collectionId}'); + $params = []; + + $params['name'] = $name; + $params['read'] = $read; + $params['write'] = $write; + $params['rules'] = $rules; + + return $this->client->call(Client::METHOD_PUT, $path, [ + 'content-type' => 'application/json', + ], $params); + } + + /** + * Delete Collection + * + * Delete a collection by its unique ID. Only users with write permissions + * have access to delete this resource. + * + * @param string $collectionId + * @throws Exception + * @return array + */ + public function deleteCollection(string $collectionId):array + { + $path = str_replace(['{collectionId}'], [$collectionId], '/database/collections/{collectionId}'); + $params = []; + + + return $this->client->call(Client::METHOD_DELETE, $path, [ + 'content-type' => 'application/json', + ], $params); + } + + /** + * List Documents + * + * Get a list of all the user documents. You can use the query params to + * filter your results. On admin mode, this endpoint will return a list of all + * of the project documents. [Learn more about different API + * modes](/docs/admin). + * + * @param string $collectionId + * @param array $filters + * @param int $offset + * @param int $limit + * @param string $orderField + * @param string $orderType + * @param string $orderCast + * @param string $search + * @param int $first + * @param int $last + * @throws Exception + * @return array + */ + public function listDocuments(string $collectionId, array $filters = [], int $offset = 0, int $limit = 50, string $orderField = '$id', string $orderType = 'ASC', string $orderCast = 'string', string $search = '', int $first = 0, int $last = 0):array + { + $path = str_replace(['{collectionId}'], [$collectionId], '/database/collections/{collectionId}/documents'); + $params = []; + + $params['filters'] = $filters; + $params['offset'] = $offset; + $params['limit'] = $limit; + $params['orderField'] = $orderField; + $params['orderType'] = $orderType; + $params['orderCast'] = $orderCast; + $params['search'] = $search; + $params['first'] = $first; + $params['last'] = $last; + + return $this->client->call(Client::METHOD_GET, $path, [ + 'content-type' => 'application/json', + ], $params); + } + + /** + * Create Document + * + * Create a new Document. + * + * @param string $collectionId + * @param array $data + * @param array $read + * @param array $write + * @param string $parentDocument + * @param string $parentProperty + * @param string $parentPropertyType + * @throws Exception + * @return array + */ + public function createDocument(string $collectionId, array $data, array $read, array $write, string $parentDocument = '', string $parentProperty = '', string $parentPropertyType = 'assign'):array + { + $path = str_replace(['{collectionId}'], [$collectionId], '/database/collections/{collectionId}/documents'); + $params = []; + + $params['data'] = $data; + $params['read'] = $read; + $params['write'] = $write; + $params['parentDocument'] = $parentDocument; + $params['parentProperty'] = $parentProperty; + $params['parentPropertyType'] = $parentPropertyType; + + return $this->client->call(Client::METHOD_POST, $path, [ + 'content-type' => 'application/json', + ], $params); + } + + /** + * Get Document + * + * Get document by its unique ID. This endpoint response returns a JSON object + * with the document data. + * + * @param string $collectionId + * @param string $documentId + * @throws Exception + * @return array + */ + public function getDocument(string $collectionId, string $documentId):array + { + $path = str_replace(['{collectionId}', '{documentId}'], [$collectionId, $documentId], '/database/collections/{collectionId}/documents/{documentId}'); + $params = []; + + + return $this->client->call(Client::METHOD_GET, $path, [ + 'content-type' => 'application/json', + ], $params); + } + + /** + * Update Document + * + * @param string $collectionId + * @param string $documentId + * @param array $data + * @param array $read + * @param array $write + * @throws Exception + * @return array + */ + public function updateDocument(string $collectionId, string $documentId, array $data, array $read, array $write):array + { + $path = str_replace(['{collectionId}', '{documentId}'], [$collectionId, $documentId], '/database/collections/{collectionId}/documents/{documentId}'); + $params = []; + + $params['data'] = $data; + $params['read'] = $read; + $params['write'] = $write; + + return $this->client->call(Client::METHOD_PATCH, $path, [ + 'content-type' => 'application/json', + ], $params); + } + + /** + * Delete Document + * + * Delete document by its unique ID. This endpoint deletes only the parent + * documents, his attributes and relations to other documents. Child documents + * **will not** be deleted. + * + * @param string $collectionId + * @param string $documentId + * @throws Exception + * @return array + */ + public function deleteDocument(string $collectionId, string $documentId):array + { + $path = str_replace(['{collectionId}', '{documentId}'], [$collectionId, $documentId], '/database/collections/{collectionId}/documents/{documentId}'); + $params = []; + + + return $this->client->call(Client::METHOD_DELETE, $path, [ + 'content-type' => 'application/json', + ], $params); + } + + /** + * Get Collection Logs + * + * @param string $collectionId + * @throws Exception + * @return array + */ + public function getCollectionLogs(string $collectionId):array + { + $path = str_replace(['{collectionId}'], [$collectionId], '/database/collections/{collectionId}/logs'); + $params = []; + + + return $this->client->call(Client::METHOD_GET, $path, [ + 'content-type' => 'application/json', + ], $params); + } + +} \ No newline at end of file diff --git a/app/sdks/0.7.0/server-php/src/Appwrite/Services/Functions.php b/app/sdks/0.7.0/server-php/src/Appwrite/Services/Functions.php new file mode 100644 index 0000000000..1771652072 --- /dev/null +++ b/app/sdks/0.7.0/server-php/src/Appwrite/Services/Functions.php @@ -0,0 +1,300 @@ +client->call(Client::METHOD_GET, $path, [ + 'content-type' => 'application/json', + ], $params); + } + + /** + * Create Function + * + * @param string $name + * @param array $vars + * @param array $events + * @param string $schedule + * @param int $timeout + * @throws Exception + * @return array + */ + public function create(string $name, array $vars = , array $events = [], string $schedule = '', int $timeout = 15):array + { + $path = str_replace([], [], '/functions'); + $params = []; + + $params['name'] = $name; + $params['vars'] = $vars; + $params['events'] = $events; + $params['schedule'] = $schedule; + $params['timeout'] = $timeout; + + return $this->client->call(Client::METHOD_POST, $path, [ + 'content-type' => 'application/json', + ], $params); + } + + /** + * Get Function + * + * @param string $functionId + * @throws Exception + * @return array + */ + public function get(string $functionId):array + { + $path = str_replace(['{functionId}'], [$functionId], '/functions/{functionId}'); + $params = []; + + + return $this->client->call(Client::METHOD_GET, $path, [ + 'content-type' => 'application/json', + ], $params); + } + + /** + * Update Function + * + * @param string $functionId + * @param string $name + * @param array $vars + * @param array $events + * @param string $schedule + * @param int $timeout + * @throws Exception + * @return array + */ + public function update(string $functionId, string $name, array $vars = , array $events = [], string $schedule = '', int $timeout = 15):array + { + $path = str_replace(['{functionId}'], [$functionId], '/functions/{functionId}'); + $params = []; + + $params['name'] = $name; + $params['vars'] = $vars; + $params['events'] = $events; + $params['schedule'] = $schedule; + $params['timeout'] = $timeout; + + return $this->client->call(Client::METHOD_PUT, $path, [ + 'content-type' => 'application/json', + ], $params); + } + + /** + * Delete Function + * + * @param string $functionId + * @throws Exception + * @return array + */ + public function delete(string $functionId):array + { + $path = str_replace(['{functionId}'], [$functionId], '/functions/{functionId}'); + $params = []; + + + return $this->client->call(Client::METHOD_DELETE, $path, [ + 'content-type' => 'application/json', + ], $params); + } + + /** + * List Executions + * + * @param string $functionId + * @param string $search + * @param int $limit + * @param int $offset + * @param string $orderType + * @throws Exception + * @return array + */ + public function listExecutions(string $functionId, string $search = '', int $limit = 25, int $offset = 0, string $orderType = 'ASC'):array + { + $path = str_replace(['{functionId}'], [$functionId], '/functions/{functionId}/executions'); + $params = []; + + $params['search'] = $search; + $params['limit'] = $limit; + $params['offset'] = $offset; + $params['orderType'] = $orderType; + + return $this->client->call(Client::METHOD_GET, $path, [ + 'content-type' => 'application/json', + ], $params); + } + + /** + * Create Execution + * + * @param string $functionId + * @param int $async + * @throws Exception + * @return array + */ + public function createExecution(string $functionId, int $async = 1):array + { + $path = str_replace(['{functionId}'], [$functionId], '/functions/{functionId}/executions'); + $params = []; + + $params['async'] = $async; + + return $this->client->call(Client::METHOD_POST, $path, [ + 'content-type' => 'application/json', + ], $params); + } + + /** + * Get Execution + * + * @param string $functionId + * @param string $executionId + * @throws Exception + * @return array + */ + public function getExecution(string $functionId, string $executionId):array + { + $path = str_replace(['{functionId}', '{executionId}'], [$functionId, $executionId], '/functions/{functionId}/executions/{executionId}'); + $params = []; + + + return $this->client->call(Client::METHOD_GET, $path, [ + 'content-type' => 'application/json', + ], $params); + } + + /** + * Update Function Tag + * + * @param string $functionId + * @param string $tag + * @throws Exception + * @return array + */ + public function updateTag(string $functionId, string $tag):array + { + $path = str_replace(['{functionId}'], [$functionId], '/functions/{functionId}/tag'); + $params = []; + + $params['tag'] = $tag; + + return $this->client->call(Client::METHOD_PATCH, $path, [ + 'content-type' => 'application/json', + ], $params); + } + + /** + * List Tags + * + * @param string $functionId + * @param string $search + * @param int $limit + * @param int $offset + * @param string $orderType + * @throws Exception + * @return array + */ + public function listTags(string $functionId, string $search = '', int $limit = 25, int $offset = 0, string $orderType = 'ASC'):array + { + $path = str_replace(['{functionId}'], [$functionId], '/functions/{functionId}/tags'); + $params = []; + + $params['search'] = $search; + $params['limit'] = $limit; + $params['offset'] = $offset; + $params['orderType'] = $orderType; + + return $this->client->call(Client::METHOD_GET, $path, [ + 'content-type' => 'application/json', + ], $params); + } + + /** + * Create Tag + * + * @param string $functionId + * @param string $env + * @param string $command + * @param string $code + * @throws Exception + * @return array + */ + public function createTag(string $functionId, string $env, string $command, string $code):array + { + $path = str_replace(['{functionId}'], [$functionId], '/functions/{functionId}/tags'); + $params = []; + + $params['env'] = $env; + $params['command'] = $command; + $params['code'] = $code; + + return $this->client->call(Client::METHOD_POST, $path, [ + 'content-type' => 'application/json', + ], $params); + } + + /** + * Get Tag + * + * @param string $functionId + * @param string $tagId + * @throws Exception + * @return array + */ + public function getTag(string $functionId, string $tagId):array + { + $path = str_replace(['{functionId}', '{tagId}'], [$functionId, $tagId], '/functions/{functionId}/tags/{tagId}'); + $params = []; + + + return $this->client->call(Client::METHOD_GET, $path, [ + 'content-type' => 'application/json', + ], $params); + } + + /** + * Delete Tag + * + * @param string $functionId + * @param string $tagId + * @throws Exception + * @return array + */ + public function deleteTag(string $functionId, string $tagId):array + { + $path = str_replace(['{functionId}', '{tagId}'], [$functionId, $tagId], '/functions/{functionId}/tags/{tagId}'); + $params = []; + + + return $this->client->call(Client::METHOD_DELETE, $path, [ + 'content-type' => 'application/json', + ], $params); + } + +} \ No newline at end of file diff --git a/app/sdks/0.7.0/server-php/src/Appwrite/Services/Health.php b/app/sdks/0.7.0/server-php/src/Appwrite/Services/Health.php new file mode 100644 index 0000000000..d39f1f406d --- /dev/null +++ b/app/sdks/0.7.0/server-php/src/Appwrite/Services/Health.php @@ -0,0 +1,250 @@ +client->call(Client::METHOD_GET, $path, [ + 'content-type' => 'application/json', + ], $params); + } + + /** + * Get Anti virus + * + * Check the Appwrite Anti Virus server is up and connection is successful. + * + * @throws Exception + * @return array + */ + public function getAntiVirus():array + { + $path = str_replace([], [], '/health/anti-virus'); + $params = []; + + + return $this->client->call(Client::METHOD_GET, $path, [ + 'content-type' => 'application/json', + ], $params); + } + + /** + * Get Cache + * + * Check the Appwrite in-memory cache server is up and connection is + * successful. + * + * @throws Exception + * @return array + */ + public function getCache():array + { + $path = str_replace([], [], '/health/cache'); + $params = []; + + + return $this->client->call(Client::METHOD_GET, $path, [ + 'content-type' => 'application/json', + ], $params); + } + + /** + * Get DB + * + * Check the Appwrite database server is up and connection is successful. + * + * @throws Exception + * @return array + */ + public function getDB():array + { + $path = str_replace([], [], '/health/db'); + $params = []; + + + return $this->client->call(Client::METHOD_GET, $path, [ + 'content-type' => 'application/json', + ], $params); + } + + /** + * Get Certificate Queue + * + * Get the number of certificates that are waiting to be issued against + * [Letsencrypt](https://letsencrypt.org/) in the Appwrite internal queue + * server. + * + * @throws Exception + * @return array + */ + public function getQueueCertificates():array + { + $path = str_replace([], [], '/health/queue/certificates'); + $params = []; + + + return $this->client->call(Client::METHOD_GET, $path, [ + 'content-type' => 'application/json', + ], $params); + } + + /** + * Get Functions Queue + * + * @throws Exception + * @return array + */ + public function getQueueFunctions():array + { + $path = str_replace([], [], '/health/queue/functions'); + $params = []; + + + return $this->client->call(Client::METHOD_GET, $path, [ + 'content-type' => 'application/json', + ], $params); + } + + /** + * Get Logs Queue + * + * Get the number of logs that are waiting to be processed in the Appwrite + * internal queue server. + * + * @throws Exception + * @return array + */ + public function getQueueLogs():array + { + $path = str_replace([], [], '/health/queue/logs'); + $params = []; + + + return $this->client->call(Client::METHOD_GET, $path, [ + 'content-type' => 'application/json', + ], $params); + } + + /** + * Get Tasks Queue + * + * Get the number of tasks that are waiting to be processed in the Appwrite + * internal queue server. + * + * @throws Exception + * @return array + */ + public function getQueueTasks():array + { + $path = str_replace([], [], '/health/queue/tasks'); + $params = []; + + + return $this->client->call(Client::METHOD_GET, $path, [ + 'content-type' => 'application/json', + ], $params); + } + + /** + * Get Usage Queue + * + * Get the number of usage stats that are waiting to be processed in the + * Appwrite internal queue server. + * + * @throws Exception + * @return array + */ + public function getQueueUsage():array + { + $path = str_replace([], [], '/health/queue/usage'); + $params = []; + + + return $this->client->call(Client::METHOD_GET, $path, [ + 'content-type' => 'application/json', + ], $params); + } + + /** + * Get Webhooks Queue + * + * Get the number of webhooks that are waiting to be processed in the Appwrite + * internal queue server. + * + * @throws Exception + * @return array + */ + public function getQueueWebhooks():array + { + $path = str_replace([], [], '/health/queue/webhooks'); + $params = []; + + + return $this->client->call(Client::METHOD_GET, $path, [ + 'content-type' => 'application/json', + ], $params); + } + + /** + * Get Local Storage + * + * Check the Appwrite local storage device is up and connection is successful. + * + * @throws Exception + * @return array + */ + public function getStorageLocal():array + { + $path = str_replace([], [], '/health/storage/local'); + $params = []; + + + return $this->client->call(Client::METHOD_GET, $path, [ + 'content-type' => 'application/json', + ], $params); + } + + /** + * Get Time + * + * Check the Appwrite server time is synced with Google remote NTP server. We + * use this technology to smoothly handle leap seconds with no disruptive + * events. The [Network Time + * Protocol](https://en.wikipedia.org/wiki/Network_Time_Protocol) (NTP) is + * used by hundreds of millions of computers and devices to synchronize their + * clocks over the Internet. If your computer sets its own clock, it likely + * uses NTP. + * + * @throws Exception + * @return array + */ + public function getTime():array + { + $path = str_replace([], [], '/health/time'); + $params = []; + + + return $this->client->call(Client::METHOD_GET, $path, [ + 'content-type' => 'application/json', + ], $params); + } + +} \ No newline at end of file diff --git a/app/sdks/0.7.0/server-php/src/Appwrite/Services/Locale.php b/app/sdks/0.7.0/server-php/src/Appwrite/Services/Locale.php new file mode 100644 index 0000000000..25255c81a0 --- /dev/null +++ b/app/sdks/0.7.0/server-php/src/Appwrite/Services/Locale.php @@ -0,0 +1,136 @@ +client->call(Client::METHOD_GET, $path, [ + 'content-type' => 'application/json', + ], $params); + } + + /** + * List Continents + * + * List of all continents. You can use the locale header to get the data in a + * supported language. + * + * @throws Exception + * @return array + */ + public function getContinents():array + { + $path = str_replace([], [], '/locale/continents'); + $params = []; + + + return $this->client->call(Client::METHOD_GET, $path, [ + 'content-type' => 'application/json', + ], $params); + } + + /** + * List Countries + * + * List of all countries. You can use the locale header to get the data in a + * supported language. + * + * @throws Exception + * @return array + */ + public function getCountries():array + { + $path = str_replace([], [], '/locale/countries'); + $params = []; + + + return $this->client->call(Client::METHOD_GET, $path, [ + 'content-type' => 'application/json', + ], $params); + } + + /** + * List EU Countries + * + * List of all countries that are currently members of the EU. You can use the + * locale header to get the data in a supported language. + * + * @throws Exception + * @return array + */ + public function getCountriesEU():array + { + $path = str_replace([], [], '/locale/countries/eu'); + $params = []; + + + return $this->client->call(Client::METHOD_GET, $path, [ + 'content-type' => 'application/json', + ], $params); + } + + /** + * List Countries Phone Codes + * + * List of all countries phone codes. You can use the locale header to get the + * data in a supported language. + * + * @throws Exception + * @return array + */ + public function getCountriesPhones():array + { + $path = str_replace([], [], '/locale/countries/phones'); + $params = []; + + + return $this->client->call(Client::METHOD_GET, $path, [ + 'content-type' => 'application/json', + ], $params); + } + + /** + * List Currencies + * + * List of all currencies, including currency symol, name, plural, and decimal + * digits for all major and minor currencies. You can use the locale header to + * get the data in a supported language. + * + * @throws Exception + * @return array + */ + public function getCurrencies():array + { + $path = str_replace([], [], '/locale/currencies'); + $params = []; + + + return $this->client->call(Client::METHOD_GET, $path, [ + 'content-type' => 'application/json', + ], $params); + } + +} \ No newline at end of file diff --git a/app/sdks/0.7.0/server-php/src/Appwrite/Services/Storage.php b/app/sdks/0.7.0/server-php/src/Appwrite/Services/Storage.php new file mode 100644 index 0000000000..09b74fbf8f --- /dev/null +++ b/app/sdks/0.7.0/server-php/src/Appwrite/Services/Storage.php @@ -0,0 +1,212 @@ +client->call(Client::METHOD_GET, $path, [ + 'content-type' => 'application/json', + ], $params); + } + + /** + * Create File + * + * Create a new file. The user who creates the file will automatically be + * assigned to read and write access unless he has passed custom values for + * read and write arguments. + * + * @param \CurlFile $file + * @param array $read + * @param array $write + * @throws Exception + * @return array + */ + public function createFile(\CurlFile $file, array $read, array $write):array + { + $path = str_replace([], [], '/storage/files'); + $params = []; + + $params['file'] = $file; + $params['read'] = $read; + $params['write'] = $write; + + return $this->client->call(Client::METHOD_POST, $path, [ + 'content-type' => 'multipart/form-data', + ], $params); + } + + /** + * Get File + * + * Get file by its unique ID. This endpoint response returns a JSON object + * with the file metadata. + * + * @param string $fileId + * @throws Exception + * @return array + */ + public function getFile(string $fileId):array + { + $path = str_replace(['{fileId}'], [$fileId], '/storage/files/{fileId}'); + $params = []; + + + return $this->client->call(Client::METHOD_GET, $path, [ + 'content-type' => 'application/json', + ], $params); + } + + /** + * Update File + * + * Update file by its unique ID. Only users with write permissions have access + * to update this resource. + * + * @param string $fileId + * @param array $read + * @param array $write + * @throws Exception + * @return array + */ + public function updateFile(string $fileId, array $read, array $write):array + { + $path = str_replace(['{fileId}'], [$fileId], '/storage/files/{fileId}'); + $params = []; + + $params['read'] = $read; + $params['write'] = $write; + + return $this->client->call(Client::METHOD_PUT, $path, [ + 'content-type' => 'application/json', + ], $params); + } + + /** + * Delete File + * + * Delete a file by its unique ID. Only users with write permissions have + * access to delete this resource. + * + * @param string $fileId + * @throws Exception + * @return array + */ + public function deleteFile(string $fileId):array + { + $path = str_replace(['{fileId}'], [$fileId], '/storage/files/{fileId}'); + $params = []; + + + return $this->client->call(Client::METHOD_DELETE, $path, [ + 'content-type' => 'application/json', + ], $params); + } + + /** + * Get File for Download + * + * Get file content by its unique ID. The endpoint response return with a + * 'Content-Disposition: attachment' header that tells the browser to start + * downloading the file to user downloads directory. + * + * @param string $fileId + * @throws Exception + * @return array + */ + public function getFileDownload(string $fileId):array + { + $path = str_replace(['{fileId}'], [$fileId], '/storage/files/{fileId}/download'); + $params = []; + + + return $this->client->call(Client::METHOD_GET, $path, [ + 'content-type' => 'application/json', + ], $params); + } + + /** + * Get File Preview + * + * Get a file preview image. Currently, this method supports preview for image + * files (jpg, png, and gif), other supported formats, like pdf, docs, slides, + * and spreadsheets, will return the file icon image. You can also pass query + * string arguments for cutting and resizing your preview image. + * + * @param string $fileId + * @param int $width + * @param int $height + * @param int $quality + * @param string $background + * @param string $output + * @throws Exception + * @return array + */ + public function getFilePreview(string $fileId, int $width = 0, int $height = 0, int $quality = 100, string $background = '', string $output = ''):array + { + $path = str_replace(['{fileId}'], [$fileId], '/storage/files/{fileId}/preview'); + $params = []; + + $params['width'] = $width; + $params['height'] = $height; + $params['quality'] = $quality; + $params['background'] = $background; + $params['output'] = $output; + + return $this->client->call(Client::METHOD_GET, $path, [ + 'content-type' => 'application/json', + ], $params); + } + + /** + * Get File for View + * + * Get file content by its unique ID. This endpoint is similar to the download + * method but returns with no 'Content-Disposition: attachment' header. + * + * @param string $fileId + * @param string $as + * @throws Exception + * @return array + */ + public function getFileView(string $fileId, string $as = ''):array + { + $path = str_replace(['{fileId}'], [$fileId], '/storage/files/{fileId}/view'); + $params = []; + + $params['as'] = $as; + + return $this->client->call(Client::METHOD_GET, $path, [ + 'content-type' => 'application/json', + ], $params); + } + +} \ No newline at end of file diff --git a/app/sdks/0.7.0/server-php/src/Appwrite/Services/Teams.php b/app/sdks/0.7.0/server-php/src/Appwrite/Services/Teams.php new file mode 100644 index 0000000000..7ef2240ab7 --- /dev/null +++ b/app/sdks/0.7.0/server-php/src/Appwrite/Services/Teams.php @@ -0,0 +1,215 @@ +client->call(Client::METHOD_GET, $path, [ + 'content-type' => 'application/json', + ], $params); + } + + /** + * Create Team + * + * Create a new team. The user who creates the team will automatically be + * assigned as the owner of the team. The team owner can invite new members, + * who will be able add new owners and update or delete the team from your + * project. + * + * @param string $name + * @param array $roles + * @throws Exception + * @return array + */ + public function create(string $name, array $roles = ["owner"]):array + { + $path = str_replace([], [], '/teams'); + $params = []; + + $params['name'] = $name; + $params['roles'] = $roles; + + return $this->client->call(Client::METHOD_POST, $path, [ + 'content-type' => 'application/json', + ], $params); + } + + /** + * Get Team + * + * Get team by its unique ID. All team members have read access for this + * resource. + * + * @param string $teamId + * @throws Exception + * @return array + */ + public function get(string $teamId):array + { + $path = str_replace(['{teamId}'], [$teamId], '/teams/{teamId}'); + $params = []; + + + return $this->client->call(Client::METHOD_GET, $path, [ + 'content-type' => 'application/json', + ], $params); + } + + /** + * Update Team + * + * Update team by its unique ID. Only team owners have write access for this + * resource. + * + * @param string $teamId + * @param string $name + * @throws Exception + * @return array + */ + public function update(string $teamId, string $name):array + { + $path = str_replace(['{teamId}'], [$teamId], '/teams/{teamId}'); + $params = []; + + $params['name'] = $name; + + return $this->client->call(Client::METHOD_PUT, $path, [ + 'content-type' => 'application/json', + ], $params); + } + + /** + * Delete Team + * + * Delete team by its unique ID. Only team owners have write access for this + * resource. + * + * @param string $teamId + * @throws Exception + * @return array + */ + public function delete(string $teamId):array + { + $path = str_replace(['{teamId}'], [$teamId], '/teams/{teamId}'); + $params = []; + + + return $this->client->call(Client::METHOD_DELETE, $path, [ + 'content-type' => 'application/json', + ], $params); + } + + /** + * Get Team Memberships + * + * Get team members by the team unique ID. All team members have read access + * for this list of resources. + * + * @param string $teamId + * @throws Exception + * @return array + */ + public function getMemberships(string $teamId):array + { + $path = str_replace(['{teamId}'], [$teamId], '/teams/{teamId}/memberships'); + $params = []; + + + return $this->client->call(Client::METHOD_GET, $path, [ + 'content-type' => 'application/json', + ], $params); + } + + /** + * Create Team Membership + * + * Use this endpoint to invite a new member to join your team. An email with a + * link to join the team will be sent to the new member email address if the + * member doesn't exist in the project it will be created automatically. + * + * Use the 'URL' parameter to redirect the user from the invitation email back + * to your app. When the user is redirected, use the [Update Team Membership + * Status](/docs/teams#updateMembershipStatus) endpoint to allow the user to + * accept the invitation to the team. + * + * Please note that in order to avoid a [Redirect + * Attacks](https://github.com/OWASP/CheatSheetSeries/blob/master/cheatsheets/Unvalidated_Redirects_and_Forwards_Cheat_Sheet.md) + * the only valid redirect URL's are the once from domains you have set when + * added your platforms in the console interface. + * + * @param string $teamId + * @param string $email + * @param array $roles + * @param string $url + * @param string $name + * @throws Exception + * @return array + */ + public function createMembership(string $teamId, string $email, array $roles, string $url, string $name = ''):array + { + $path = str_replace(['{teamId}'], [$teamId], '/teams/{teamId}/memberships'); + $params = []; + + $params['email'] = $email; + $params['name'] = $name; + $params['roles'] = $roles; + $params['url'] = $url; + + return $this->client->call(Client::METHOD_POST, $path, [ + 'content-type' => 'application/json', + ], $params); + } + + /** + * Delete Team Membership + * + * This endpoint allows a user to leave a team or for a team owner to delete + * the membership of any other team member. You can also use this endpoint to + * delete a user membership even if he didn't accept it. + * + * @param string $teamId + * @param string $inviteId + * @throws Exception + * @return array + */ + public function deleteMembership(string $teamId, string $inviteId):array + { + $path = str_replace(['{teamId}', '{inviteId}'], [$teamId, $inviteId], '/teams/{teamId}/memberships/{inviteId}'); + $params = []; + + + return $this->client->call(Client::METHOD_DELETE, $path, [ + 'content-type' => 'application/json', + ], $params); + } + +} \ No newline at end of file diff --git a/app/sdks/0.7.0/server-php/src/Appwrite/Services/Users.php b/app/sdks/0.7.0/server-php/src/Appwrite/Services/Users.php new file mode 100644 index 0000000000..b2b4f576cc --- /dev/null +++ b/app/sdks/0.7.0/server-php/src/Appwrite/Services/Users.php @@ -0,0 +1,230 @@ +client->call(Client::METHOD_GET, $path, [ + 'content-type' => 'application/json', + ], $params); + } + + /** + * Create User + * + * Create a new user. + * + * @param string $email + * @param string $password + * @param string $name + * @throws Exception + * @return array + */ + public function create(string $email, string $password, string $name = ''):array + { + $path = str_replace([], [], '/users'); + $params = []; + + $params['email'] = $email; + $params['password'] = $password; + $params['name'] = $name; + + return $this->client->call(Client::METHOD_POST, $path, [ + 'content-type' => 'application/json', + ], $params); + } + + /** + * Get User + * + * Get user by its unique ID. + * + * @param string $userId + * @throws Exception + * @return array + */ + public function get(string $userId):array + { + $path = str_replace(['{userId}'], [$userId], '/users/{userId}'); + $params = []; + + + return $this->client->call(Client::METHOD_GET, $path, [ + 'content-type' => 'application/json', + ], $params); + } + + /** + * Get User Logs + * + * Get user activity logs list by its unique ID. + * + * @param string $userId + * @throws Exception + * @return array + */ + public function getLogs(string $userId):array + { + $path = str_replace(['{userId}'], [$userId], '/users/{userId}/logs'); + $params = []; + + + return $this->client->call(Client::METHOD_GET, $path, [ + 'content-type' => 'application/json', + ], $params); + } + + /** + * Get User Preferences + * + * Get user preferences by its unique ID. + * + * @param string $userId + * @throws Exception + * @return array + */ + public function getPrefs(string $userId):array + { + $path = str_replace(['{userId}'], [$userId], '/users/{userId}/prefs'); + $params = []; + + + return $this->client->call(Client::METHOD_GET, $path, [ + 'content-type' => 'application/json', + ], $params); + } + + /** + * Update User Preferences + * + * Update user preferences by its unique ID. You can pass only the specific + * settings you wish to update. + * + * @param string $userId + * @param array $prefs + * @throws Exception + * @return array + */ + public function updatePrefs(string $userId, array $prefs):array + { + $path = str_replace(['{userId}'], [$userId], '/users/{userId}/prefs'); + $params = []; + + $params['prefs'] = $prefs; + + return $this->client->call(Client::METHOD_PATCH, $path, [ + 'content-type' => 'application/json', + ], $params); + } + + /** + * Get User Sessions + * + * Get user sessions list by its unique ID. + * + * @param string $userId + * @throws Exception + * @return array + */ + public function getSessions(string $userId):array + { + $path = str_replace(['{userId}'], [$userId], '/users/{userId}/sessions'); + $params = []; + + + return $this->client->call(Client::METHOD_GET, $path, [ + 'content-type' => 'application/json', + ], $params); + } + + /** + * Delete User Sessions + * + * Delete all user sessions by its unique ID. + * + * @param string $userId + * @throws Exception + * @return array + */ + public function deleteSessions(string $userId):array + { + $path = str_replace(['{userId}'], [$userId], '/users/{userId}/sessions'); + $params = []; + + + return $this->client->call(Client::METHOD_DELETE, $path, [ + 'content-type' => 'application/json', + ], $params); + } + + /** + * Delete User Session + * + * Delete user sessions by its unique ID. + * + * @param string $userId + * @param string $sessionId + * @throws Exception + * @return array + */ + public function deleteSession(string $userId, string $sessionId):array + { + $path = str_replace(['{userId}', '{sessionId}'], [$userId, $sessionId], '/users/{userId}/sessions/{sessionId}'); + $params = []; + + + return $this->client->call(Client::METHOD_DELETE, $path, [ + 'content-type' => 'application/json', + ], $params); + } + + /** + * Update User Status + * + * Update user status by its unique ID. + * + * @param string $userId + * @param string $status + * @throws Exception + * @return array + */ + public function updateStatus(string $userId, string $status):array + { + $path = str_replace(['{userId}'], [$userId], '/users/{userId}/status'); + $params = []; + + $params['status'] = $status; + + return $this->client->call(Client::METHOD_PATCH, $path, [ + 'content-type' => 'application/json', + ], $params); + } + +} \ No newline at end of file diff --git a/app/sdks/0.7.0/server-python/CHANGELOG.md b/app/sdks/0.7.0/server-python/CHANGELOG.md new file mode 100644 index 0000000000..fa4d35e687 --- /dev/null +++ b/app/sdks/0.7.0/server-python/CHANGELOG.md @@ -0,0 +1 @@ +# Change Log \ No newline at end of file diff --git a/app/sdks/0.7.0/server-python/LICENSE b/app/sdks/0.7.0/server-python/LICENSE new file mode 100644 index 0000000000..fc7c051a91 --- /dev/null +++ b/app/sdks/0.7.0/server-python/LICENSE @@ -0,0 +1,12 @@ +Copyright (c) 2019 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: + + 1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. + + 2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. + + 3. Neither the name Appwrite nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. \ No newline at end of file diff --git a/app/sdks/0.7.0/server-python/README.md b/app/sdks/0.7.0/server-python/README.md new file mode 100644 index 0000000000..04421ff241 --- /dev/null +++ b/app/sdks/0.7.0/server-python/README.md @@ -0,0 +1,30 @@ +# Appwrite Python SDK + +![License](https://img.shields.io/github/license/appwrite/sdk-for-python.svg?v=1) +![Version](https://img.shields.io/badge/api%20version-0.6.2-blue.svg?v=1) + +**This SDK is compatible with Appwrite server version 0.6.2. For older versions, please check previous releases.** + +Appwrite is an open-source backend as a service server that abstract and simplify complex and repetitive development tasks behind a very simple to use REST API. Appwrite aims to help you develop your apps faster and in a more secure way. + Use the Python SDK to integrate your app with the Appwrite server to easily start interacting with all of Appwrite backend APIs and tools. + For full API documentation and tutorials go to [https://appwrite.io/docs](https://appwrite.io/docs) + + + +![Appwrite](https://appwrite.io/images/github.png) + +## Installation + +To install via [PyPI](https://pypi.org/): + +```bash +pip install appwrite +``` + +## Contribution + +This library is auto-generated by Appwrite custom [SDK Generator](https://github.com/appwrite/sdk-generator). To learn more about how you can help us improve this SDK, please check the [contribution guide](https://github.com/appwrite/sdk-generator/blob/master/CONTRIBUTING.md) before sending a pull-request. + +## License + +Please see the [BSD-3-Clause license](https://raw.githubusercontent.com/appwrite/appwrite/master/LICENSE) file for more information. diff --git a/app/sdks/0.7.0/server-python/appwrite/__init__.py b/app/sdks/0.7.0/server-python/appwrite/__init__.py new file mode 100644 index 0000000000..0519ecba6e --- /dev/null +++ b/app/sdks/0.7.0/server-python/appwrite/__init__.py @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/app/sdks/0.7.0/server-python/appwrite/client.py b/app/sdks/0.7.0/server-python/appwrite/client.py new file mode 100644 index 0000000000..8989fccb9c --- /dev/null +++ b/app/sdks/0.7.0/server-python/appwrite/client.py @@ -0,0 +1,106 @@ +import io +import requests + +class Client: + def __init__(self): + self._self_signed = False + self._endpoint = 'https://appwrite.io/v1' + self._global_headers = { + 'content-type': '', + 'x-sdk-version': 'appwrite:python:0.0.6', + } + + def set_self_signed(self, status=True): + self._self_signed = status + return self + + def set_endpoint(self, endpoint): + self._endpoint = endpoint + return self + + def add_header(self, key, value): + self._global_headers[key.lower()] = value.lower() + return self + + def set_project(self, value): + """Your project ID""" + + self._global_headers['x-appwrite-project'] = value.lower() + return self + + def set_key(self, value): + """Your secret API key""" + + self._global_headers['x-appwrite-key'] = value.lower() + return self + + def set_locale(self, value): + self._global_headers['x-appwrite-locale'] = value.lower() + return self + + def call(self, method, path='', headers=None, params=None): + if headers is None: + headers = {} + + if params is None: + params = {} + + data = {} + json = {} + files = {} + + headers = {**self._global_headers, **headers} + + if method != 'get': + data = params + params = {} + + if headers['content-type'].startswith('application/json'): + json = data + data = {} + + if headers['content-type'].startswith('multipart/form-data'): + del headers['content-type'] + + for key in data.copy(): + if isinstance(data[key], io.BufferedIOBase): + files[key] = data[key] + del data[key] + + response = requests.request( # call method dynamically https://stackoverflow.com/a/4246075/2299554 + method=method, + url=self._endpoint + path, + params=self.flatten(params), + data=self.flatten(data), + json=json, + files=files, + headers=headers, + verify=self._self_signed, + ) + + response.raise_for_status() + + content_type = response.headers['Content-Type'] + + if content_type.startswith('application/json'): + return response.json() + + return response._content + + def flatten(self, data, prefix=''): + output = {} + i = 0 + + for key in data: + value = data[key] if isinstance(data, dict) else key + finalKey = prefix + '[' + key +']' if prefix else key + finalKey = prefix + '[' + str(i) +']' if isinstance(data, list) else finalKey + i += 1 + + if isinstance(value, list) or isinstance(value, dict): + output = {**output, **self.flatten(value, finalKey)} + else: + output[finalKey] = value + + return output + diff --git a/app/sdks/0.7.0/server-python/appwrite/service.py b/app/sdks/0.7.0/server-python/appwrite/service.py new file mode 100644 index 0000000000..b5b60e6c22 --- /dev/null +++ b/app/sdks/0.7.0/server-python/appwrite/service.py @@ -0,0 +1,6 @@ +from .client import Client + + +class Service: + def __init__(self, client: Client): + self.client = client diff --git a/app/sdks/0.7.0/server-python/appwrite/services/__init__.py b/app/sdks/0.7.0/server-python/appwrite/services/__init__.py new file mode 100644 index 0000000000..0519ecba6e --- /dev/null +++ b/app/sdks/0.7.0/server-python/appwrite/services/__init__.py @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/app/sdks/0.7.0/server-python/appwrite/services/avatars.py b/app/sdks/0.7.0/server-python/appwrite/services/avatars.py new file mode 100644 index 0000000000..4a2a4024a6 --- /dev/null +++ b/app/sdks/0.7.0/server-python/appwrite/services/avatars.py @@ -0,0 +1,87 @@ +from ..service import Service + + +class Avatars(Service): + + def __init__(self, client): + super(Avatars, self).__init__(client) + + def get_browser(self, code, width=100, height=100, quality=100): + """Get Browser Icon""" + + params = {} + path = '/avatars/browsers/{code}' + path = path.replace('{code}', code) + params['width'] = width + params['height'] = height + params['quality'] = quality + + return self.client.call('get', path, { + 'content-type': 'application/json', + }, params) + + def get_credit_card(self, code, width=100, height=100, quality=100): + """Get Credit Card Icon""" + + params = {} + path = '/avatars/credit-cards/{code}' + path = path.replace('{code}', code) + params['width'] = width + params['height'] = height + params['quality'] = quality + + return self.client.call('get', path, { + 'content-type': 'application/json', + }, params) + + def get_favicon(self, url): + """Get Favicon""" + + params = {} + path = '/avatars/favicon' + params['url'] = url + + return self.client.call('get', path, { + 'content-type': 'application/json', + }, params) + + def get_flag(self, code, width=100, height=100, quality=100): + """Get Country Flag""" + + params = {} + path = '/avatars/flags/{code}' + path = path.replace('{code}', code) + params['width'] = width + params['height'] = height + params['quality'] = quality + + return self.client.call('get', path, { + 'content-type': 'application/json', + }, params) + + def get_image(self, url, width=400, height=400): + """Get Image from URL""" + + params = {} + path = '/avatars/image' + params['url'] = url + params['width'] = width + params['height'] = height + + return self.client.call('get', path, { + 'content-type': 'application/json', + }, params) + + def get_q_r(self, text, size=400, margin=1, download=0): + """Get QR Code""" + + params = {} + path = '/avatars/qr' + params['text'] = text + params['size'] = size + params['margin'] = margin + params['download'] = download + + return self.client.call('get', path, { + 'content-type': 'application/json', + }, params) diff --git a/app/sdks/0.7.0/server-python/appwrite/services/database.py b/app/sdks/0.7.0/server-python/appwrite/services/database.py new file mode 100644 index 0000000000..2549e689d5 --- /dev/null +++ b/app/sdks/0.7.0/server-python/appwrite/services/database.py @@ -0,0 +1,159 @@ +from ..service import Service + + +class Database(Service): + + def __init__(self, client): + super(Database, self).__init__(client) + + def list_collections(self, search='', limit=25, offset=0, order_type='ASC'): + """List Collections""" + + params = {} + path = '/database/collections' + params['search'] = search + params['limit'] = limit + params['offset'] = offset + params['orderType'] = order_type + + return self.client.call('get', path, { + 'content-type': 'application/json', + }, params) + + def create_collection(self, name, read, write, rules): + """Create Collection""" + + params = {} + path = '/database/collections' + params['name'] = name + params['read'] = read + params['write'] = write + params['rules'] = rules + + return self.client.call('post', path, { + 'content-type': 'application/json', + }, params) + + def get_collection(self, collection_id): + """Get Collection""" + + params = {} + path = '/database/collections/{collectionId}' + path = path.replace('{collectionId}', collection_id) + + return self.client.call('get', path, { + 'content-type': 'application/json', + }, params) + + def update_collection(self, collection_id, name, read, write, rules=[]): + """Update Collection""" + + params = {} + path = '/database/collections/{collectionId}' + path = path.replace('{collectionId}', collection_id) + params['name'] = name + params['read'] = read + params['write'] = write + params['rules'] = rules + + return self.client.call('put', path, { + 'content-type': 'application/json', + }, params) + + def delete_collection(self, collection_id): + """Delete Collection""" + + params = {} + path = '/database/collections/{collectionId}' + path = path.replace('{collectionId}', collection_id) + + return self.client.call('delete', path, { + 'content-type': 'application/json', + }, params) + + def list_documents(self, collection_id, filters=[], offset=0, limit=50, order_field='$id', order_type='ASC', order_cast='string', search='', first=0, last=0): + """List Documents""" + + params = {} + path = '/database/collections/{collectionId}/documents' + path = path.replace('{collectionId}', collection_id) + params['filters'] = filters + params['offset'] = offset + params['limit'] = limit + params['orderField'] = order_field + params['orderType'] = order_type + params['orderCast'] = order_cast + params['search'] = search + params['first'] = first + params['last'] = last + + return self.client.call('get', path, { + 'content-type': 'application/json', + }, params) + + def create_document(self, collection_id, data, read, write, parent_document='', parent_property='', parent_property_type='assign'): + """Create Document""" + + params = {} + path = '/database/collections/{collectionId}/documents' + path = path.replace('{collectionId}', collection_id) + params['data'] = data + params['read'] = read + params['write'] = write + params['parentDocument'] = parent_document + params['parentProperty'] = parent_property + params['parentPropertyType'] = parent_property_type + + return self.client.call('post', path, { + 'content-type': 'application/json', + }, params) + + def get_document(self, collection_id, document_id): + """Get Document""" + + params = {} + path = '/database/collections/{collectionId}/documents/{documentId}' + path = path.replace('{collectionId}', collection_id) + path = path.replace('{documentId}', document_id) + + return self.client.call('get', path, { + 'content-type': 'application/json', + }, params) + + def update_document(self, collection_id, document_id, data, read, write): + """Update Document""" + + params = {} + path = '/database/collections/{collectionId}/documents/{documentId}' + path = path.replace('{collectionId}', collection_id) + path = path.replace('{documentId}', document_id) + params['data'] = data + params['read'] = read + params['write'] = write + + return self.client.call('patch', path, { + 'content-type': 'application/json', + }, params) + + def delete_document(self, collection_id, document_id): + """Delete Document""" + + params = {} + path = '/database/collections/{collectionId}/documents/{documentId}' + path = path.replace('{collectionId}', collection_id) + path = path.replace('{documentId}', document_id) + + return self.client.call('delete', path, { + 'content-type': 'application/json', + }, params) + + def get_collection_logs(self, collection_id): + """Get Collection Logs""" + + params = {} + path = '/database/collections/{collectionId}/logs' + path = path.replace('{collectionId}', collection_id) + + return self.client.call('get', path, { + 'content-type': 'application/json', + }, params) diff --git a/app/sdks/0.7.0/server-python/appwrite/services/functions.py b/app/sdks/0.7.0/server-python/appwrite/services/functions.py new file mode 100644 index 0000000000..1688f21f47 --- /dev/null +++ b/app/sdks/0.7.0/server-python/appwrite/services/functions.py @@ -0,0 +1,178 @@ +from ..service import Service + + +class Functions(Service): + + def __init__(self, client): + super(Functions, self).__init__(client) + + def list(self, search='', limit=25, offset=0, order_type='ASC'): + """List Functions""" + + params = {} + path = '/functions' + params['search'] = search + params['limit'] = limit + params['offset'] = offset + params['orderType'] = order_type + + return self.client.call('get', path, { + 'content-type': 'application/json', + }, params) + + def create(self, name, vars=[], events=[], schedule='', timeout=15): + """Create Function""" + + params = {} + path = '/functions' + params['name'] = name + params['vars'] = vars + params['events'] = events + params['schedule'] = schedule + params['timeout'] = timeout + + return self.client.call('post', path, { + 'content-type': 'application/json', + }, params) + + def get(self, function_id): + """Get Function""" + + params = {} + path = '/functions/{functionId}' + path = path.replace('{functionId}', function_id) + + return self.client.call('get', path, { + 'content-type': 'application/json', + }, params) + + def update(self, function_id, name, vars=[], events=[], schedule='', timeout=15): + """Update Function""" + + params = {} + path = '/functions/{functionId}' + path = path.replace('{functionId}', function_id) + params['name'] = name + params['vars'] = vars + params['events'] = events + params['schedule'] = schedule + params['timeout'] = timeout + + return self.client.call('put', path, { + 'content-type': 'application/json', + }, params) + + def delete(self, function_id): + """Delete Function""" + + params = {} + path = '/functions/{functionId}' + path = path.replace('{functionId}', function_id) + + return self.client.call('delete', path, { + 'content-type': 'application/json', + }, params) + + def list_executions(self, function_id, search='', limit=25, offset=0, order_type='ASC'): + """List Executions""" + + params = {} + path = '/functions/{functionId}/executions' + path = path.replace('{functionId}', function_id) + params['search'] = search + params['limit'] = limit + params['offset'] = offset + params['orderType'] = order_type + + return self.client.call('get', path, { + 'content-type': 'application/json', + }, params) + + def create_execution(self, function_id, async=1): + """Create Execution""" + + params = {} + path = '/functions/{functionId}/executions' + path = path.replace('{functionId}', function_id) + params['async'] = async + + return self.client.call('post', path, { + 'content-type': 'application/json', + }, params) + + def get_execution(self, function_id, execution_id): + """Get Execution""" + + params = {} + path = '/functions/{functionId}/executions/{executionId}' + path = path.replace('{functionId}', function_id) + path = path.replace('{executionId}', execution_id) + + return self.client.call('get', path, { + 'content-type': 'application/json', + }, params) + + def update_tag(self, function_id, tag): + """Update Function Tag""" + + params = {} + path = '/functions/{functionId}/tag' + path = path.replace('{functionId}', function_id) + params['tag'] = tag + + return self.client.call('patch', path, { + 'content-type': 'application/json', + }, params) + + def list_tags(self, function_id, search='', limit=25, offset=0, order_type='ASC'): + """List Tags""" + + params = {} + path = '/functions/{functionId}/tags' + path = path.replace('{functionId}', function_id) + params['search'] = search + params['limit'] = limit + params['offset'] = offset + params['orderType'] = order_type + + return self.client.call('get', path, { + 'content-type': 'application/json', + }, params) + + def create_tag(self, function_id, env, command, code): + """Create Tag""" + + params = {} + path = '/functions/{functionId}/tags' + path = path.replace('{functionId}', function_id) + params['env'] = env + params['command'] = command + params['code'] = code + + return self.client.call('post', path, { + 'content-type': 'application/json', + }, params) + + def get_tag(self, function_id, tag_id): + """Get Tag""" + + params = {} + path = '/functions/{functionId}/tags/{tagId}' + path = path.replace('{functionId}', function_id) + path = path.replace('{tagId}', tag_id) + + return self.client.call('get', path, { + 'content-type': 'application/json', + }, params) + + def delete_tag(self, function_id, tag_id): + """Delete Tag""" + + params = {} + path = '/functions/{functionId}/tags/{tagId}' + path = path.replace('{functionId}', function_id) + path = path.replace('{tagId}', tag_id) + + return self.client.call('delete', path, { + 'content-type': 'application/json', + }, params) diff --git a/app/sdks/0.7.0/server-python/appwrite/services/health.py b/app/sdks/0.7.0/server-python/appwrite/services/health.py new file mode 100644 index 0000000000..5e08ebe6e8 --- /dev/null +++ b/app/sdks/0.7.0/server-python/appwrite/services/health.py @@ -0,0 +1,127 @@ +from ..service import Service + + +class Health(Service): + + def __init__(self, client): + super(Health, self).__init__(client) + + def get(self): + """Get HTTP""" + + params = {} + path = '/health' + + return self.client.call('get', path, { + 'content-type': 'application/json', + }, params) + + def get_anti_virus(self): + """Get Anti virus""" + + params = {} + path = '/health/anti-virus' + + return self.client.call('get', path, { + 'content-type': 'application/json', + }, params) + + def get_cache(self): + """Get Cache""" + + params = {} + path = '/health/cache' + + return self.client.call('get', path, { + 'content-type': 'application/json', + }, params) + + def get_d_b(self): + """Get DB""" + + params = {} + path = '/health/db' + + return self.client.call('get', path, { + 'content-type': 'application/json', + }, params) + + def get_queue_certificates(self): + """Get Certificate Queue""" + + params = {} + path = '/health/queue/certificates' + + return self.client.call('get', path, { + 'content-type': 'application/json', + }, params) + + def get_queue_functions(self): + """Get Functions Queue""" + + params = {} + path = '/health/queue/functions' + + return self.client.call('get', path, { + 'content-type': 'application/json', + }, params) + + def get_queue_logs(self): + """Get Logs Queue""" + + params = {} + path = '/health/queue/logs' + + return self.client.call('get', path, { + 'content-type': 'application/json', + }, params) + + def get_queue_tasks(self): + """Get Tasks Queue""" + + params = {} + path = '/health/queue/tasks' + + return self.client.call('get', path, { + 'content-type': 'application/json', + }, params) + + def get_queue_usage(self): + """Get Usage Queue""" + + params = {} + path = '/health/queue/usage' + + return self.client.call('get', path, { + 'content-type': 'application/json', + }, params) + + def get_queue_webhooks(self): + """Get Webhooks Queue""" + + params = {} + path = '/health/queue/webhooks' + + return self.client.call('get', path, { + 'content-type': 'application/json', + }, params) + + def get_storage_local(self): + """Get Local Storage""" + + params = {} + path = '/health/storage/local' + + return self.client.call('get', path, { + 'content-type': 'application/json', + }, params) + + def get_time(self): + """Get Time""" + + params = {} + path = '/health/time' + + return self.client.call('get', path, { + 'content-type': 'application/json', + }, params) diff --git a/app/sdks/0.7.0/server-python/appwrite/services/locale.py b/app/sdks/0.7.0/server-python/appwrite/services/locale.py new file mode 100644 index 0000000000..70c955eb85 --- /dev/null +++ b/app/sdks/0.7.0/server-python/appwrite/services/locale.py @@ -0,0 +1,67 @@ +from ..service import Service + + +class Locale(Service): + + def __init__(self, client): + super(Locale, self).__init__(client) + + def get(self): + """Get User Locale""" + + params = {} + path = '/locale' + + return self.client.call('get', path, { + 'content-type': 'application/json', + }, params) + + def get_continents(self): + """List Continents""" + + params = {} + path = '/locale/continents' + + return self.client.call('get', path, { + 'content-type': 'application/json', + }, params) + + def get_countries(self): + """List Countries""" + + params = {} + path = '/locale/countries' + + return self.client.call('get', path, { + 'content-type': 'application/json', + }, params) + + def get_countries_e_u(self): + """List EU Countries""" + + params = {} + path = '/locale/countries/eu' + + return self.client.call('get', path, { + 'content-type': 'application/json', + }, params) + + def get_countries_phones(self): + """List Countries Phone Codes""" + + params = {} + path = '/locale/countries/phones' + + return self.client.call('get', path, { + 'content-type': 'application/json', + }, params) + + def get_currencies(self): + """List Currencies""" + + params = {} + path = '/locale/currencies' + + return self.client.call('get', path, { + 'content-type': 'application/json', + }, params) diff --git a/app/sdks/0.7.0/server-python/appwrite/services/storage.py b/app/sdks/0.7.0/server-python/appwrite/services/storage.py new file mode 100644 index 0000000000..7e2a986f6e --- /dev/null +++ b/app/sdks/0.7.0/server-python/appwrite/services/storage.py @@ -0,0 +1,108 @@ +from ..service import Service + + +class Storage(Service): + + def __init__(self, client): + super(Storage, self).__init__(client) + + def list_files(self, search='', limit=25, offset=0, order_type='ASC'): + """List Files""" + + params = {} + path = '/storage/files' + params['search'] = search + params['limit'] = limit + params['offset'] = offset + params['orderType'] = order_type + + return self.client.call('get', path, { + 'content-type': 'application/json', + }, params) + + def create_file(self, file, read, write): + """Create File""" + + params = {} + path = '/storage/files' + params['file'] = file + params['read'] = read + params['write'] = write + + return self.client.call('post', path, { + 'content-type': 'multipart/form-data', + }, params) + + def get_file(self, file_id): + """Get File""" + + params = {} + path = '/storage/files/{fileId}' + path = path.replace('{fileId}', file_id) + + return self.client.call('get', path, { + 'content-type': 'application/json', + }, params) + + def update_file(self, file_id, read, write): + """Update File""" + + params = {} + path = '/storage/files/{fileId}' + path = path.replace('{fileId}', file_id) + params['read'] = read + params['write'] = write + + return self.client.call('put', path, { + 'content-type': 'application/json', + }, params) + + def delete_file(self, file_id): + """Delete File""" + + params = {} + path = '/storage/files/{fileId}' + path = path.replace('{fileId}', file_id) + + return self.client.call('delete', path, { + 'content-type': 'application/json', + }, params) + + def get_file_download(self, file_id): + """Get File for Download""" + + params = {} + path = '/storage/files/{fileId}/download' + path = path.replace('{fileId}', file_id) + + return self.client.call('get', path, { + 'content-type': 'application/json', + }, params) + + def get_file_preview(self, file_id, width=0, height=0, quality=100, background='', output=''): + """Get File Preview""" + + params = {} + path = '/storage/files/{fileId}/preview' + path = path.replace('{fileId}', file_id) + params['width'] = width + params['height'] = height + params['quality'] = quality + params['background'] = background + params['output'] = output + + return self.client.call('get', path, { + 'content-type': 'application/json', + }, params) + + def get_file_view(self, file_id, xas=''): + """Get File for View""" + + params = {} + path = '/storage/files/{fileId}/view' + path = path.replace('{fileId}', file_id) + params['as'] = xas + + return self.client.call('get', path, { + 'content-type': 'application/json', + }, params) diff --git a/app/sdks/0.7.0/server-python/appwrite/services/teams.py b/app/sdks/0.7.0/server-python/appwrite/services/teams.py new file mode 100644 index 0000000000..cdc3780ad9 --- /dev/null +++ b/app/sdks/0.7.0/server-python/appwrite/services/teams.py @@ -0,0 +1,105 @@ +from ..service import Service + + +class Teams(Service): + + def __init__(self, client): + super(Teams, self).__init__(client) + + def list(self, search='', limit=25, offset=0, order_type='ASC'): + """List Teams""" + + params = {} + path = '/teams' + params['search'] = search + params['limit'] = limit + params['offset'] = offset + params['orderType'] = order_type + + return self.client.call('get', path, { + 'content-type': 'application/json', + }, params) + + def create(self, name, roles=[]): + """Create Team""" + + params = {} + path = '/teams' + params['name'] = name + params['roles'] = roles + + return self.client.call('post', path, { + 'content-type': 'application/json', + }, params) + + def get(self, team_id): + """Get Team""" + + params = {} + path = '/teams/{teamId}' + path = path.replace('{teamId}', team_id) + + return self.client.call('get', path, { + 'content-type': 'application/json', + }, params) + + def update(self, team_id, name): + """Update Team""" + + params = {} + path = '/teams/{teamId}' + path = path.replace('{teamId}', team_id) + params['name'] = name + + return self.client.call('put', path, { + 'content-type': 'application/json', + }, params) + + def delete(self, team_id): + """Delete Team""" + + params = {} + path = '/teams/{teamId}' + path = path.replace('{teamId}', team_id) + + return self.client.call('delete', path, { + 'content-type': 'application/json', + }, params) + + def get_memberships(self, team_id): + """Get Team Memberships""" + + params = {} + path = '/teams/{teamId}/memberships' + path = path.replace('{teamId}', team_id) + + return self.client.call('get', path, { + 'content-type': 'application/json', + }, params) + + def create_membership(self, team_id, email, roles, url, name=''): + """Create Team Membership""" + + params = {} + path = '/teams/{teamId}/memberships' + path = path.replace('{teamId}', team_id) + params['email'] = email + params['name'] = name + params['roles'] = roles + params['url'] = url + + return self.client.call('post', path, { + 'content-type': 'application/json', + }, params) + + def delete_membership(self, team_id, invite_id): + """Delete Team Membership""" + + params = {} + path = '/teams/{teamId}/memberships/{inviteId}' + path = path.replace('{teamId}', team_id) + path = path.replace('{inviteId}', invite_id) + + return self.client.call('delete', path, { + 'content-type': 'application/json', + }, params) diff --git a/app/sdks/0.7.0/server-python/appwrite/services/users.py b/app/sdks/0.7.0/server-python/appwrite/services/users.py new file mode 100644 index 0000000000..2608f07a50 --- /dev/null +++ b/app/sdks/0.7.0/server-python/appwrite/services/users.py @@ -0,0 +1,125 @@ +from ..service import Service + + +class Users(Service): + + def __init__(self, client): + super(Users, self).__init__(client) + + def list(self, search='', limit=25, offset=0, order_type='ASC'): + """List Users""" + + params = {} + path = '/users' + params['search'] = search + params['limit'] = limit + params['offset'] = offset + params['orderType'] = order_type + + return self.client.call('get', path, { + 'content-type': 'application/json', + }, params) + + def create(self, email, password, name=''): + """Create User""" + + params = {} + path = '/users' + params['email'] = email + params['password'] = password + params['name'] = name + + return self.client.call('post', path, { + 'content-type': 'application/json', + }, params) + + def get(self, user_id): + """Get User""" + + params = {} + path = '/users/{userId}' + path = path.replace('{userId}', user_id) + + return self.client.call('get', path, { + 'content-type': 'application/json', + }, params) + + def get_logs(self, user_id): + """Get User Logs""" + + params = {} + path = '/users/{userId}/logs' + path = path.replace('{userId}', user_id) + + return self.client.call('get', path, { + 'content-type': 'application/json', + }, params) + + def get_prefs(self, user_id): + """Get User Preferences""" + + params = {} + path = '/users/{userId}/prefs' + path = path.replace('{userId}', user_id) + + return self.client.call('get', path, { + 'content-type': 'application/json', + }, params) + + def update_prefs(self, user_id, prefs): + """Update User Preferences""" + + params = {} + path = '/users/{userId}/prefs' + path = path.replace('{userId}', user_id) + params['prefs'] = prefs + + return self.client.call('patch', path, { + 'content-type': 'application/json', + }, params) + + def get_sessions(self, user_id): + """Get User Sessions""" + + params = {} + path = '/users/{userId}/sessions' + path = path.replace('{userId}', user_id) + + return self.client.call('get', path, { + 'content-type': 'application/json', + }, params) + + def delete_sessions(self, user_id): + """Delete User Sessions""" + + params = {} + path = '/users/{userId}/sessions' + path = path.replace('{userId}', user_id) + + return self.client.call('delete', path, { + 'content-type': 'application/json', + }, params) + + def delete_session(self, user_id, session_id): + """Delete User Session""" + + params = {} + path = '/users/{userId}/sessions/{sessionId}' + path = path.replace('{userId}', user_id) + path = path.replace('{sessionId}', session_id) + + return self.client.call('delete', path, { + 'content-type': 'application/json', + }, params) + + def update_status(self, user_id, status): + """Update User Status""" + + params = {} + path = '/users/{userId}/status' + path = path.replace('{userId}', user_id) + params['status'] = status + + return self.client.call('patch', path, { + 'content-type': 'application/json', + }, params) diff --git a/app/sdks/0.7.0/server-python/docs/examples/avatars/get-browser.md b/app/sdks/0.7.0/server-python/docs/examples/avatars/get-browser.md new file mode 100644 index 0000000000..ec783ca34d --- /dev/null +++ b/app/sdks/0.7.0/server-python/docs/examples/avatars/get-browser.md @@ -0,0 +1,14 @@ +from appwrite.client import Client +from appwrite.services.avatars import Avatars + +client = Client() + +(client + .set_endpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint + .set_project('5df5acd0d48c2') # Your project ID + .set_key('919c2d18fb5d4...a2ae413da83346ad2') # Your secret API key +) + +avatars = Avatars(client) + +result = avatars.get_browser('aa') diff --git a/app/sdks/0.7.0/server-python/docs/examples/avatars/get-credit-card.md b/app/sdks/0.7.0/server-python/docs/examples/avatars/get-credit-card.md new file mode 100644 index 0000000000..ce2d3f8135 --- /dev/null +++ b/app/sdks/0.7.0/server-python/docs/examples/avatars/get-credit-card.md @@ -0,0 +1,14 @@ +from appwrite.client import Client +from appwrite.services.avatars import Avatars + +client = Client() + +(client + .set_endpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint + .set_project('5df5acd0d48c2') # Your project ID + .set_key('919c2d18fb5d4...a2ae413da83346ad2') # Your secret API key +) + +avatars = Avatars(client) + +result = avatars.get_credit_card('amex') diff --git a/app/sdks/0.7.0/server-python/docs/examples/avatars/get-favicon.md b/app/sdks/0.7.0/server-python/docs/examples/avatars/get-favicon.md new file mode 100644 index 0000000000..8de722c202 --- /dev/null +++ b/app/sdks/0.7.0/server-python/docs/examples/avatars/get-favicon.md @@ -0,0 +1,14 @@ +from appwrite.client import Client +from appwrite.services.avatars import Avatars + +client = Client() + +(client + .set_endpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint + .set_project('5df5acd0d48c2') # Your project ID + .set_key('919c2d18fb5d4...a2ae413da83346ad2') # Your secret API key +) + +avatars = Avatars(client) + +result = avatars.get_favicon('https://example.com') diff --git a/app/sdks/0.7.0/server-python/docs/examples/avatars/get-flag.md b/app/sdks/0.7.0/server-python/docs/examples/avatars/get-flag.md new file mode 100644 index 0000000000..0bf5657d2e --- /dev/null +++ b/app/sdks/0.7.0/server-python/docs/examples/avatars/get-flag.md @@ -0,0 +1,14 @@ +from appwrite.client import Client +from appwrite.services.avatars import Avatars + +client = Client() + +(client + .set_endpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint + .set_project('5df5acd0d48c2') # Your project ID + .set_key('919c2d18fb5d4...a2ae413da83346ad2') # Your secret API key +) + +avatars = Avatars(client) + +result = avatars.get_flag('af') diff --git a/app/sdks/0.7.0/server-python/docs/examples/avatars/get-image.md b/app/sdks/0.7.0/server-python/docs/examples/avatars/get-image.md new file mode 100644 index 0000000000..3164a956c1 --- /dev/null +++ b/app/sdks/0.7.0/server-python/docs/examples/avatars/get-image.md @@ -0,0 +1,14 @@ +from appwrite.client import Client +from appwrite.services.avatars import Avatars + +client = Client() + +(client + .set_endpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint + .set_project('5df5acd0d48c2') # Your project ID + .set_key('919c2d18fb5d4...a2ae413da83346ad2') # Your secret API key +) + +avatars = Avatars(client) + +result = avatars.get_image('https://example.com') diff --git a/app/sdks/0.7.0/server-python/docs/examples/avatars/get-q-r.md b/app/sdks/0.7.0/server-python/docs/examples/avatars/get-q-r.md new file mode 100644 index 0000000000..b0c6508a8a --- /dev/null +++ b/app/sdks/0.7.0/server-python/docs/examples/avatars/get-q-r.md @@ -0,0 +1,14 @@ +from appwrite.client import Client +from appwrite.services.avatars import Avatars + +client = Client() + +(client + .set_endpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint + .set_project('5df5acd0d48c2') # Your project ID + .set_key('919c2d18fb5d4...a2ae413da83346ad2') # Your secret API key +) + +avatars = Avatars(client) + +result = avatars.get_q_r('[TEXT]') diff --git a/app/sdks/0.7.0/server-python/docs/examples/database/create-collection.md b/app/sdks/0.7.0/server-python/docs/examples/database/create-collection.md new file mode 100644 index 0000000000..8741c13744 --- /dev/null +++ b/app/sdks/0.7.0/server-python/docs/examples/database/create-collection.md @@ -0,0 +1,14 @@ +from appwrite.client import Client +from appwrite.services.database import Database + +client = Client() + +(client + .set_endpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint + .set_project('5df5acd0d48c2') # Your project ID + .set_key('919c2d18fb5d4...a2ae413da83346ad2') # Your secret API key +) + +database = Database(client) + +result = database.create_collection('[NAME]', [], [], []) diff --git a/app/sdks/0.7.0/server-python/docs/examples/database/create-document.md b/app/sdks/0.7.0/server-python/docs/examples/database/create-document.md new file mode 100644 index 0000000000..fff7a96bc0 --- /dev/null +++ b/app/sdks/0.7.0/server-python/docs/examples/database/create-document.md @@ -0,0 +1,14 @@ +from appwrite.client import Client +from appwrite.services.database import Database + +client = Client() + +(client + .set_endpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint + .set_project('5df5acd0d48c2') # Your project ID + .set_key('919c2d18fb5d4...a2ae413da83346ad2') # Your secret API key +) + +database = Database(client) + +result = database.create_document('[COLLECTION_ID]', {}, [], []) diff --git a/app/sdks/0.7.0/server-python/docs/examples/database/delete-collection.md b/app/sdks/0.7.0/server-python/docs/examples/database/delete-collection.md new file mode 100644 index 0000000000..c3a7af45f5 --- /dev/null +++ b/app/sdks/0.7.0/server-python/docs/examples/database/delete-collection.md @@ -0,0 +1,14 @@ +from appwrite.client import Client +from appwrite.services.database import Database + +client = Client() + +(client + .set_endpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint + .set_project('5df5acd0d48c2') # Your project ID + .set_key('919c2d18fb5d4...a2ae413da83346ad2') # Your secret API key +) + +database = Database(client) + +result = database.delete_collection('[COLLECTION_ID]') diff --git a/app/sdks/0.7.0/server-python/docs/examples/database/delete-document.md b/app/sdks/0.7.0/server-python/docs/examples/database/delete-document.md new file mode 100644 index 0000000000..1adacaff4e --- /dev/null +++ b/app/sdks/0.7.0/server-python/docs/examples/database/delete-document.md @@ -0,0 +1,14 @@ +from appwrite.client import Client +from appwrite.services.database import Database + +client = Client() + +(client + .set_endpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint + .set_project('5df5acd0d48c2') # Your project ID + .set_key('919c2d18fb5d4...a2ae413da83346ad2') # Your secret API key +) + +database = Database(client) + +result = database.delete_document('[COLLECTION_ID]', '[DOCUMENT_ID]') diff --git a/app/sdks/0.7.0/server-python/docs/examples/database/get-collection-logs.md b/app/sdks/0.7.0/server-python/docs/examples/database/get-collection-logs.md new file mode 100644 index 0000000000..4abaa17f24 --- /dev/null +++ b/app/sdks/0.7.0/server-python/docs/examples/database/get-collection-logs.md @@ -0,0 +1,14 @@ +from appwrite.client import Client +from appwrite.services.database import Database + +client = Client() + +(client + .set_endpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint + .set_project('5df5acd0d48c2') # Your project ID + .set_key('919c2d18fb5d4...a2ae413da83346ad2') # Your secret API key +) + +database = Database(client) + +result = database.get_collection_logs('[COLLECTION_ID]') diff --git a/app/sdks/0.7.0/server-python/docs/examples/database/get-collection.md b/app/sdks/0.7.0/server-python/docs/examples/database/get-collection.md new file mode 100644 index 0000000000..34269a7d4a --- /dev/null +++ b/app/sdks/0.7.0/server-python/docs/examples/database/get-collection.md @@ -0,0 +1,14 @@ +from appwrite.client import Client +from appwrite.services.database import Database + +client = Client() + +(client + .set_endpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint + .set_project('5df5acd0d48c2') # Your project ID + .set_key('919c2d18fb5d4...a2ae413da83346ad2') # Your secret API key +) + +database = Database(client) + +result = database.get_collection('[COLLECTION_ID]') diff --git a/app/sdks/0.7.0/server-python/docs/examples/database/get-document.md b/app/sdks/0.7.0/server-python/docs/examples/database/get-document.md new file mode 100644 index 0000000000..13d313c15f --- /dev/null +++ b/app/sdks/0.7.0/server-python/docs/examples/database/get-document.md @@ -0,0 +1,14 @@ +from appwrite.client import Client +from appwrite.services.database import Database + +client = Client() + +(client + .set_endpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint + .set_project('5df5acd0d48c2') # Your project ID + .set_key('919c2d18fb5d4...a2ae413da83346ad2') # Your secret API key +) + +database = Database(client) + +result = database.get_document('[COLLECTION_ID]', '[DOCUMENT_ID]') diff --git a/app/sdks/0.7.0/server-python/docs/examples/database/list-collections.md b/app/sdks/0.7.0/server-python/docs/examples/database/list-collections.md new file mode 100644 index 0000000000..840ae586fe --- /dev/null +++ b/app/sdks/0.7.0/server-python/docs/examples/database/list-collections.md @@ -0,0 +1,14 @@ +from appwrite.client import Client +from appwrite.services.database import Database + +client = Client() + +(client + .set_endpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint + .set_project('5df5acd0d48c2') # Your project ID + .set_key('919c2d18fb5d4...a2ae413da83346ad2') # Your secret API key +) + +database = Database(client) + +result = database.list_collections() diff --git a/app/sdks/0.7.0/server-python/docs/examples/database/list-documents.md b/app/sdks/0.7.0/server-python/docs/examples/database/list-documents.md new file mode 100644 index 0000000000..6969eef581 --- /dev/null +++ b/app/sdks/0.7.0/server-python/docs/examples/database/list-documents.md @@ -0,0 +1,14 @@ +from appwrite.client import Client +from appwrite.services.database import Database + +client = Client() + +(client + .set_endpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint + .set_project('5df5acd0d48c2') # Your project ID + .set_key('919c2d18fb5d4...a2ae413da83346ad2') # Your secret API key +) + +database = Database(client) + +result = database.list_documents('[COLLECTION_ID]') diff --git a/app/sdks/0.7.0/server-python/docs/examples/database/update-collection.md b/app/sdks/0.7.0/server-python/docs/examples/database/update-collection.md new file mode 100644 index 0000000000..0bf8f29fb8 --- /dev/null +++ b/app/sdks/0.7.0/server-python/docs/examples/database/update-collection.md @@ -0,0 +1,14 @@ +from appwrite.client import Client +from appwrite.services.database import Database + +client = Client() + +(client + .set_endpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint + .set_project('5df5acd0d48c2') # Your project ID + .set_key('919c2d18fb5d4...a2ae413da83346ad2') # Your secret API key +) + +database = Database(client) + +result = database.update_collection('[COLLECTION_ID]', '[NAME]', [], []) diff --git a/app/sdks/0.7.0/server-python/docs/examples/database/update-document.md b/app/sdks/0.7.0/server-python/docs/examples/database/update-document.md new file mode 100644 index 0000000000..40e11c0665 --- /dev/null +++ b/app/sdks/0.7.0/server-python/docs/examples/database/update-document.md @@ -0,0 +1,14 @@ +from appwrite.client import Client +from appwrite.services.database import Database + +client = Client() + +(client + .set_endpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint + .set_project('5df5acd0d48c2') # Your project ID + .set_key('919c2d18fb5d4...a2ae413da83346ad2') # Your secret API key +) + +database = Database(client) + +result = database.update_document('[COLLECTION_ID]', '[DOCUMENT_ID]', {}, [], []) diff --git a/app/sdks/0.7.0/server-python/docs/examples/functions/create-execution.md b/app/sdks/0.7.0/server-python/docs/examples/functions/create-execution.md new file mode 100644 index 0000000000..aa8e955751 --- /dev/null +++ b/app/sdks/0.7.0/server-python/docs/examples/functions/create-execution.md @@ -0,0 +1,13 @@ +from appwrite.client import Client +from appwrite.services.functions import Functions + +client = Client() + +(client + .set_project('5df5acd0d48c2') # Your project ID + .set_key('919c2d18fb5d4...a2ae413da83346ad2') # Your secret API key +) + +functions = Functions(client) + +result = functions.create_execution('[FUNCTION_ID]') diff --git a/app/sdks/0.7.0/server-python/docs/examples/functions/create-tag.md b/app/sdks/0.7.0/server-python/docs/examples/functions/create-tag.md new file mode 100644 index 0000000000..533f3095c3 --- /dev/null +++ b/app/sdks/0.7.0/server-python/docs/examples/functions/create-tag.md @@ -0,0 +1,13 @@ +from appwrite.client import Client +from appwrite.services.functions import Functions + +client = Client() + +(client + .set_project('5df5acd0d48c2') # Your project ID + .set_key('919c2d18fb5d4...a2ae413da83346ad2') # Your secret API key +) + +functions = Functions(client) + +result = functions.create_tag('[FUNCTION_ID]', 'node-14', '[COMMAND]', '[CODE]') diff --git a/app/sdks/0.7.0/server-python/docs/examples/functions/create.md b/app/sdks/0.7.0/server-python/docs/examples/functions/create.md new file mode 100644 index 0000000000..2b63ea7191 --- /dev/null +++ b/app/sdks/0.7.0/server-python/docs/examples/functions/create.md @@ -0,0 +1,13 @@ +from appwrite.client import Client +from appwrite.services.functions import Functions + +client = Client() + +(client + .set_project('5df5acd0d48c2') # Your project ID + .set_key('919c2d18fb5d4...a2ae413da83346ad2') # Your secret API key +) + +functions = Functions(client) + +result = functions.create('[NAME]') diff --git a/app/sdks/0.7.0/server-python/docs/examples/functions/delete-tag.md b/app/sdks/0.7.0/server-python/docs/examples/functions/delete-tag.md new file mode 100644 index 0000000000..554817cf5e --- /dev/null +++ b/app/sdks/0.7.0/server-python/docs/examples/functions/delete-tag.md @@ -0,0 +1,13 @@ +from appwrite.client import Client +from appwrite.services.functions import Functions + +client = Client() + +(client + .set_project('5df5acd0d48c2') # Your project ID + .set_key('919c2d18fb5d4...a2ae413da83346ad2') # Your secret API key +) + +functions = Functions(client) + +result = functions.delete_tag('[FUNCTION_ID]', '[TAG_ID]') diff --git a/app/sdks/0.7.0/server-python/docs/examples/functions/delete.md b/app/sdks/0.7.0/server-python/docs/examples/functions/delete.md new file mode 100644 index 0000000000..9c1575c1e8 --- /dev/null +++ b/app/sdks/0.7.0/server-python/docs/examples/functions/delete.md @@ -0,0 +1,13 @@ +from appwrite.client import Client +from appwrite.services.functions import Functions + +client = Client() + +(client + .set_project('5df5acd0d48c2') # Your project ID + .set_key('919c2d18fb5d4...a2ae413da83346ad2') # Your secret API key +) + +functions = Functions(client) + +result = functions.delete('[FUNCTION_ID]') diff --git a/app/sdks/0.7.0/server-python/docs/examples/functions/get-execution.md b/app/sdks/0.7.0/server-python/docs/examples/functions/get-execution.md new file mode 100644 index 0000000000..b979241983 --- /dev/null +++ b/app/sdks/0.7.0/server-python/docs/examples/functions/get-execution.md @@ -0,0 +1,13 @@ +from appwrite.client import Client +from appwrite.services.functions import Functions + +client = Client() + +(client + .set_project('5df5acd0d48c2') # Your project ID + .set_key('919c2d18fb5d4...a2ae413da83346ad2') # Your secret API key +) + +functions = Functions(client) + +result = functions.get_execution('[FUNCTION_ID]', '[EXECUTION_ID]') diff --git a/app/sdks/0.7.0/server-python/docs/examples/functions/get-tag.md b/app/sdks/0.7.0/server-python/docs/examples/functions/get-tag.md new file mode 100644 index 0000000000..b5c3f23059 --- /dev/null +++ b/app/sdks/0.7.0/server-python/docs/examples/functions/get-tag.md @@ -0,0 +1,13 @@ +from appwrite.client import Client +from appwrite.services.functions import Functions + +client = Client() + +(client + .set_project('5df5acd0d48c2') # Your project ID + .set_key('919c2d18fb5d4...a2ae413da83346ad2') # Your secret API key +) + +functions = Functions(client) + +result = functions.get_tag('[FUNCTION_ID]', '[TAG_ID]') diff --git a/app/sdks/0.7.0/server-python/docs/examples/functions/get.md b/app/sdks/0.7.0/server-python/docs/examples/functions/get.md new file mode 100644 index 0000000000..0e4036db4d --- /dev/null +++ b/app/sdks/0.7.0/server-python/docs/examples/functions/get.md @@ -0,0 +1,13 @@ +from appwrite.client import Client +from appwrite.services.functions import Functions + +client = Client() + +(client + .set_project('5df5acd0d48c2') # Your project ID + .set_key('919c2d18fb5d4...a2ae413da83346ad2') # Your secret API key +) + +functions = Functions(client) + +result = functions.get('[FUNCTION_ID]') diff --git a/app/sdks/0.7.0/server-python/docs/examples/functions/list-executions.md b/app/sdks/0.7.0/server-python/docs/examples/functions/list-executions.md new file mode 100644 index 0000000000..75f5260b46 --- /dev/null +++ b/app/sdks/0.7.0/server-python/docs/examples/functions/list-executions.md @@ -0,0 +1,13 @@ +from appwrite.client import Client +from appwrite.services.functions import Functions + +client = Client() + +(client + .set_project('5df5acd0d48c2') # Your project ID + .set_key('919c2d18fb5d4...a2ae413da83346ad2') # Your secret API key +) + +functions = Functions(client) + +result = functions.list_executions('[FUNCTION_ID]') diff --git a/app/sdks/0.7.0/server-python/docs/examples/functions/list-tags.md b/app/sdks/0.7.0/server-python/docs/examples/functions/list-tags.md new file mode 100644 index 0000000000..a992416640 --- /dev/null +++ b/app/sdks/0.7.0/server-python/docs/examples/functions/list-tags.md @@ -0,0 +1,13 @@ +from appwrite.client import Client +from appwrite.services.functions import Functions + +client = Client() + +(client + .set_project('5df5acd0d48c2') # Your project ID + .set_key('919c2d18fb5d4...a2ae413da83346ad2') # Your secret API key +) + +functions = Functions(client) + +result = functions.list_tags('[FUNCTION_ID]') diff --git a/app/sdks/0.7.0/server-python/docs/examples/functions/list.md b/app/sdks/0.7.0/server-python/docs/examples/functions/list.md new file mode 100644 index 0000000000..a2b1e7d3db --- /dev/null +++ b/app/sdks/0.7.0/server-python/docs/examples/functions/list.md @@ -0,0 +1,13 @@ +from appwrite.client import Client +from appwrite.services.functions import Functions + +client = Client() + +(client + .set_project('5df5acd0d48c2') # Your project ID + .set_key('919c2d18fb5d4...a2ae413da83346ad2') # Your secret API key +) + +functions = Functions(client) + +result = functions.list() diff --git a/app/sdks/0.7.0/server-python/docs/examples/functions/update-active.md b/app/sdks/0.7.0/server-python/docs/examples/functions/update-active.md new file mode 100644 index 0000000000..72f8314055 --- /dev/null +++ b/app/sdks/0.7.0/server-python/docs/examples/functions/update-active.md @@ -0,0 +1,13 @@ +from appwrite.client import Client +from appwrite.services.functions import Functions + +client = Client() + +(client + .set_project('5df5acd0d48c2') # Your project ID + .set_key('919c2d18fb5d4...a2ae413da83346ad2') # Your secret API key +) + +functions = Functions(client) + +result = functions.update_active('[FUNCTION_ID]', '[ACTIVE]') diff --git a/app/sdks/0.7.0/server-python/docs/examples/functions/update-tag.md b/app/sdks/0.7.0/server-python/docs/examples/functions/update-tag.md new file mode 100644 index 0000000000..4ab93d1b6a --- /dev/null +++ b/app/sdks/0.7.0/server-python/docs/examples/functions/update-tag.md @@ -0,0 +1,13 @@ +from appwrite.client import Client +from appwrite.services.functions import Functions + +client = Client() + +(client + .set_project('5df5acd0d48c2') # Your project ID + .set_key('919c2d18fb5d4...a2ae413da83346ad2') # Your secret API key +) + +functions = Functions(client) + +result = functions.update_tag('[FUNCTION_ID]', '[TAG]') diff --git a/app/sdks/0.7.0/server-python/docs/examples/functions/update.md b/app/sdks/0.7.0/server-python/docs/examples/functions/update.md new file mode 100644 index 0000000000..751a5d2538 --- /dev/null +++ b/app/sdks/0.7.0/server-python/docs/examples/functions/update.md @@ -0,0 +1,13 @@ +from appwrite.client import Client +from appwrite.services.functions import Functions + +client = Client() + +(client + .set_project('5df5acd0d48c2') # Your project ID + .set_key('919c2d18fb5d4...a2ae413da83346ad2') # Your secret API key +) + +functions = Functions(client) + +result = functions.update('[FUNCTION_ID]', '[NAME]') diff --git a/app/sdks/0.7.0/server-python/docs/examples/health/get-anti-virus.md b/app/sdks/0.7.0/server-python/docs/examples/health/get-anti-virus.md new file mode 100644 index 0000000000..0c90f20750 --- /dev/null +++ b/app/sdks/0.7.0/server-python/docs/examples/health/get-anti-virus.md @@ -0,0 +1,14 @@ +from appwrite.client import Client +from appwrite.services.health import Health + +client = Client() + +(client + .set_endpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint + .set_project('5df5acd0d48c2') # Your project ID + .set_key('919c2d18fb5d4...a2ae413da83346ad2') # Your secret API key +) + +health = Health(client) + +result = health.get_anti_virus() diff --git a/app/sdks/0.7.0/server-python/docs/examples/health/get-cache.md b/app/sdks/0.7.0/server-python/docs/examples/health/get-cache.md new file mode 100644 index 0000000000..e06416fdf0 --- /dev/null +++ b/app/sdks/0.7.0/server-python/docs/examples/health/get-cache.md @@ -0,0 +1,14 @@ +from appwrite.client import Client +from appwrite.services.health import Health + +client = Client() + +(client + .set_endpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint + .set_project('5df5acd0d48c2') # Your project ID + .set_key('919c2d18fb5d4...a2ae413da83346ad2') # Your secret API key +) + +health = Health(client) + +result = health.get_cache() diff --git a/app/sdks/0.7.0/server-python/docs/examples/health/get-d-b.md b/app/sdks/0.7.0/server-python/docs/examples/health/get-d-b.md new file mode 100644 index 0000000000..34d9446080 --- /dev/null +++ b/app/sdks/0.7.0/server-python/docs/examples/health/get-d-b.md @@ -0,0 +1,14 @@ +from appwrite.client import Client +from appwrite.services.health import Health + +client = Client() + +(client + .set_endpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint + .set_project('5df5acd0d48c2') # Your project ID + .set_key('919c2d18fb5d4...a2ae413da83346ad2') # Your secret API key +) + +health = Health(client) + +result = health.get_d_b() diff --git a/app/sdks/0.7.0/server-python/docs/examples/health/get-queue-certificates.md b/app/sdks/0.7.0/server-python/docs/examples/health/get-queue-certificates.md new file mode 100644 index 0000000000..74f61975fc --- /dev/null +++ b/app/sdks/0.7.0/server-python/docs/examples/health/get-queue-certificates.md @@ -0,0 +1,14 @@ +from appwrite.client import Client +from appwrite.services.health import Health + +client = Client() + +(client + .set_endpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint + .set_project('5df5acd0d48c2') # Your project ID + .set_key('919c2d18fb5d4...a2ae413da83346ad2') # Your secret API key +) + +health = Health(client) + +result = health.get_queue_certificates() diff --git a/app/sdks/0.7.0/server-python/docs/examples/health/get-queue-functions.md b/app/sdks/0.7.0/server-python/docs/examples/health/get-queue-functions.md new file mode 100644 index 0000000000..6704514eb7 --- /dev/null +++ b/app/sdks/0.7.0/server-python/docs/examples/health/get-queue-functions.md @@ -0,0 +1,14 @@ +from appwrite.client import Client +from appwrite.services.health import Health + +client = Client() + +(client + .set_endpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint + .set_project('5df5acd0d48c2') # Your project ID + .set_key('919c2d18fb5d4...a2ae413da83346ad2') # Your secret API key +) + +health = Health(client) + +result = health.get_queue_functions() diff --git a/app/sdks/0.7.0/server-python/docs/examples/health/get-queue-logs.md b/app/sdks/0.7.0/server-python/docs/examples/health/get-queue-logs.md new file mode 100644 index 0000000000..79d169f51f --- /dev/null +++ b/app/sdks/0.7.0/server-python/docs/examples/health/get-queue-logs.md @@ -0,0 +1,14 @@ +from appwrite.client import Client +from appwrite.services.health import Health + +client = Client() + +(client + .set_endpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint + .set_project('5df5acd0d48c2') # Your project ID + .set_key('919c2d18fb5d4...a2ae413da83346ad2') # Your secret API key +) + +health = Health(client) + +result = health.get_queue_logs() diff --git a/app/sdks/0.7.0/server-python/docs/examples/health/get-queue-tasks.md b/app/sdks/0.7.0/server-python/docs/examples/health/get-queue-tasks.md new file mode 100644 index 0000000000..aba8cca053 --- /dev/null +++ b/app/sdks/0.7.0/server-python/docs/examples/health/get-queue-tasks.md @@ -0,0 +1,14 @@ +from appwrite.client import Client +from appwrite.services.health import Health + +client = Client() + +(client + .set_endpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint + .set_project('5df5acd0d48c2') # Your project ID + .set_key('919c2d18fb5d4...a2ae413da83346ad2') # Your secret API key +) + +health = Health(client) + +result = health.get_queue_tasks() diff --git a/app/sdks/0.7.0/server-python/docs/examples/health/get-queue-usage.md b/app/sdks/0.7.0/server-python/docs/examples/health/get-queue-usage.md new file mode 100644 index 0000000000..cb3cc5ae6f --- /dev/null +++ b/app/sdks/0.7.0/server-python/docs/examples/health/get-queue-usage.md @@ -0,0 +1,14 @@ +from appwrite.client import Client +from appwrite.services.health import Health + +client = Client() + +(client + .set_endpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint + .set_project('5df5acd0d48c2') # Your project ID + .set_key('919c2d18fb5d4...a2ae413da83346ad2') # Your secret API key +) + +health = Health(client) + +result = health.get_queue_usage() diff --git a/app/sdks/0.7.0/server-python/docs/examples/health/get-queue-webhooks.md b/app/sdks/0.7.0/server-python/docs/examples/health/get-queue-webhooks.md new file mode 100644 index 0000000000..a4c9d96d66 --- /dev/null +++ b/app/sdks/0.7.0/server-python/docs/examples/health/get-queue-webhooks.md @@ -0,0 +1,14 @@ +from appwrite.client import Client +from appwrite.services.health import Health + +client = Client() + +(client + .set_endpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint + .set_project('5df5acd0d48c2') # Your project ID + .set_key('919c2d18fb5d4...a2ae413da83346ad2') # Your secret API key +) + +health = Health(client) + +result = health.get_queue_webhooks() diff --git a/app/sdks/0.7.0/server-python/docs/examples/health/get-storage-anti-virus.md b/app/sdks/0.7.0/server-python/docs/examples/health/get-storage-anti-virus.md new file mode 100644 index 0000000000..5ce63ac816 --- /dev/null +++ b/app/sdks/0.7.0/server-python/docs/examples/health/get-storage-anti-virus.md @@ -0,0 +1,13 @@ +from appwrite.client import Client +from appwrite.services.health import Health + +client = Client() + +(client + .set_project('5df5acd0d48c2') # Your project ID + .set_key('919c2d18fb5d4...a2ae413da83346ad2') # Your secret API key +) + +health = Health(client) + +result = health.get_storage_anti_virus() diff --git a/app/sdks/0.7.0/server-python/docs/examples/health/get-storage-local.md b/app/sdks/0.7.0/server-python/docs/examples/health/get-storage-local.md new file mode 100644 index 0000000000..a97ed125ad --- /dev/null +++ b/app/sdks/0.7.0/server-python/docs/examples/health/get-storage-local.md @@ -0,0 +1,14 @@ +from appwrite.client import Client +from appwrite.services.health import Health + +client = Client() + +(client + .set_endpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint + .set_project('5df5acd0d48c2') # Your project ID + .set_key('919c2d18fb5d4...a2ae413da83346ad2') # Your secret API key +) + +health = Health(client) + +result = health.get_storage_local() diff --git a/app/sdks/0.7.0/server-python/docs/examples/health/get-time.md b/app/sdks/0.7.0/server-python/docs/examples/health/get-time.md new file mode 100644 index 0000000000..ecc66250cc --- /dev/null +++ b/app/sdks/0.7.0/server-python/docs/examples/health/get-time.md @@ -0,0 +1,14 @@ +from appwrite.client import Client +from appwrite.services.health import Health + +client = Client() + +(client + .set_endpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint + .set_project('5df5acd0d48c2') # Your project ID + .set_key('919c2d18fb5d4...a2ae413da83346ad2') # Your secret API key +) + +health = Health(client) + +result = health.get_time() diff --git a/app/sdks/0.7.0/server-python/docs/examples/health/get.md b/app/sdks/0.7.0/server-python/docs/examples/health/get.md new file mode 100644 index 0000000000..77352aafab --- /dev/null +++ b/app/sdks/0.7.0/server-python/docs/examples/health/get.md @@ -0,0 +1,14 @@ +from appwrite.client import Client +from appwrite.services.health import Health + +client = Client() + +(client + .set_endpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint + .set_project('5df5acd0d48c2') # Your project ID + .set_key('919c2d18fb5d4...a2ae413da83346ad2') # Your secret API key +) + +health = Health(client) + +result = health.get() diff --git a/app/sdks/0.7.0/server-python/docs/examples/locale/get-continents.md b/app/sdks/0.7.0/server-python/docs/examples/locale/get-continents.md new file mode 100644 index 0000000000..bf4c255434 --- /dev/null +++ b/app/sdks/0.7.0/server-python/docs/examples/locale/get-continents.md @@ -0,0 +1,14 @@ +from appwrite.client import Client +from appwrite.services.locale import Locale + +client = Client() + +(client + .set_endpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint + .set_project('5df5acd0d48c2') # Your project ID + .set_key('919c2d18fb5d4...a2ae413da83346ad2') # Your secret API key +) + +locale = Locale(client) + +result = locale.get_continents() diff --git a/app/sdks/0.7.0/server-python/docs/examples/locale/get-countries-e-u.md b/app/sdks/0.7.0/server-python/docs/examples/locale/get-countries-e-u.md new file mode 100644 index 0000000000..78d69ff2dc --- /dev/null +++ b/app/sdks/0.7.0/server-python/docs/examples/locale/get-countries-e-u.md @@ -0,0 +1,14 @@ +from appwrite.client import Client +from appwrite.services.locale import Locale + +client = Client() + +(client + .set_endpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint + .set_project('5df5acd0d48c2') # Your project ID + .set_key('919c2d18fb5d4...a2ae413da83346ad2') # Your secret API key +) + +locale = Locale(client) + +result = locale.get_countries_e_u() diff --git a/app/sdks/0.7.0/server-python/docs/examples/locale/get-countries-phones.md b/app/sdks/0.7.0/server-python/docs/examples/locale/get-countries-phones.md new file mode 100644 index 0000000000..fb349b1442 --- /dev/null +++ b/app/sdks/0.7.0/server-python/docs/examples/locale/get-countries-phones.md @@ -0,0 +1,14 @@ +from appwrite.client import Client +from appwrite.services.locale import Locale + +client = Client() + +(client + .set_endpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint + .set_project('5df5acd0d48c2') # Your project ID + .set_key('919c2d18fb5d4...a2ae413da83346ad2') # Your secret API key +) + +locale = Locale(client) + +result = locale.get_countries_phones() diff --git a/app/sdks/0.7.0/server-python/docs/examples/locale/get-countries.md b/app/sdks/0.7.0/server-python/docs/examples/locale/get-countries.md new file mode 100644 index 0000000000..ceb731073d --- /dev/null +++ b/app/sdks/0.7.0/server-python/docs/examples/locale/get-countries.md @@ -0,0 +1,14 @@ +from appwrite.client import Client +from appwrite.services.locale import Locale + +client = Client() + +(client + .set_endpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint + .set_project('5df5acd0d48c2') # Your project ID + .set_key('919c2d18fb5d4...a2ae413da83346ad2') # Your secret API key +) + +locale = Locale(client) + +result = locale.get_countries() diff --git a/app/sdks/0.7.0/server-python/docs/examples/locale/get-currencies.md b/app/sdks/0.7.0/server-python/docs/examples/locale/get-currencies.md new file mode 100644 index 0000000000..dacb886e20 --- /dev/null +++ b/app/sdks/0.7.0/server-python/docs/examples/locale/get-currencies.md @@ -0,0 +1,14 @@ +from appwrite.client import Client +from appwrite.services.locale import Locale + +client = Client() + +(client + .set_endpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint + .set_project('5df5acd0d48c2') # Your project ID + .set_key('919c2d18fb5d4...a2ae413da83346ad2') # Your secret API key +) + +locale = Locale(client) + +result = locale.get_currencies() diff --git a/app/sdks/0.7.0/server-python/docs/examples/locale/get.md b/app/sdks/0.7.0/server-python/docs/examples/locale/get.md new file mode 100644 index 0000000000..43cd2107de --- /dev/null +++ b/app/sdks/0.7.0/server-python/docs/examples/locale/get.md @@ -0,0 +1,14 @@ +from appwrite.client import Client +from appwrite.services.locale import Locale + +client = Client() + +(client + .set_endpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint + .set_project('5df5acd0d48c2') # Your project ID + .set_key('919c2d18fb5d4...a2ae413da83346ad2') # Your secret API key +) + +locale = Locale(client) + +result = locale.get() diff --git a/app/sdks/0.7.0/server-python/docs/examples/storage/create-file.md b/app/sdks/0.7.0/server-python/docs/examples/storage/create-file.md new file mode 100644 index 0000000000..fd76dd068b --- /dev/null +++ b/app/sdks/0.7.0/server-python/docs/examples/storage/create-file.md @@ -0,0 +1,14 @@ +from appwrite.client import Client +from appwrite.services.storage import Storage + +client = Client() + +(client + .set_endpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint + .set_project('5df5acd0d48c2') # Your project ID + .set_key('919c2d18fb5d4...a2ae413da83346ad2') # Your secret API key +) + +storage = Storage(client) + +result = storage.create_file(open('/path/to/file.png', 'rb'), [], []) diff --git a/app/sdks/0.7.0/server-python/docs/examples/storage/delete-file.md b/app/sdks/0.7.0/server-python/docs/examples/storage/delete-file.md new file mode 100644 index 0000000000..155e5a41d4 --- /dev/null +++ b/app/sdks/0.7.0/server-python/docs/examples/storage/delete-file.md @@ -0,0 +1,14 @@ +from appwrite.client import Client +from appwrite.services.storage import Storage + +client = Client() + +(client + .set_endpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint + .set_project('5df5acd0d48c2') # Your project ID + .set_key('919c2d18fb5d4...a2ae413da83346ad2') # Your secret API key +) + +storage = Storage(client) + +result = storage.delete_file('[FILE_ID]') diff --git a/app/sdks/0.7.0/server-python/docs/examples/storage/get-file-download.md b/app/sdks/0.7.0/server-python/docs/examples/storage/get-file-download.md new file mode 100644 index 0000000000..975a0f302d --- /dev/null +++ b/app/sdks/0.7.0/server-python/docs/examples/storage/get-file-download.md @@ -0,0 +1,14 @@ +from appwrite.client import Client +from appwrite.services.storage import Storage + +client = Client() + +(client + .set_endpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint + .set_project('5df5acd0d48c2') # Your project ID + .set_key('919c2d18fb5d4...a2ae413da83346ad2') # Your secret API key +) + +storage = Storage(client) + +result = storage.get_file_download('[FILE_ID]') diff --git a/app/sdks/0.7.0/server-python/docs/examples/storage/get-file-preview.md b/app/sdks/0.7.0/server-python/docs/examples/storage/get-file-preview.md new file mode 100644 index 0000000000..ad9abe444f --- /dev/null +++ b/app/sdks/0.7.0/server-python/docs/examples/storage/get-file-preview.md @@ -0,0 +1,14 @@ +from appwrite.client import Client +from appwrite.services.storage import Storage + +client = Client() + +(client + .set_endpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint + .set_project('5df5acd0d48c2') # Your project ID + .set_key('919c2d18fb5d4...a2ae413da83346ad2') # Your secret API key +) + +storage = Storage(client) + +result = storage.get_file_preview('[FILE_ID]') diff --git a/app/sdks/0.7.0/server-python/docs/examples/storage/get-file-view.md b/app/sdks/0.7.0/server-python/docs/examples/storage/get-file-view.md new file mode 100644 index 0000000000..892b93ca97 --- /dev/null +++ b/app/sdks/0.7.0/server-python/docs/examples/storage/get-file-view.md @@ -0,0 +1,14 @@ +from appwrite.client import Client +from appwrite.services.storage import Storage + +client = Client() + +(client + .set_endpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint + .set_project('5df5acd0d48c2') # Your project ID + .set_key('919c2d18fb5d4...a2ae413da83346ad2') # Your secret API key +) + +storage = Storage(client) + +result = storage.get_file_view('[FILE_ID]') diff --git a/app/sdks/0.7.0/server-python/docs/examples/storage/get-file.md b/app/sdks/0.7.0/server-python/docs/examples/storage/get-file.md new file mode 100644 index 0000000000..cded2ba12f --- /dev/null +++ b/app/sdks/0.7.0/server-python/docs/examples/storage/get-file.md @@ -0,0 +1,14 @@ +from appwrite.client import Client +from appwrite.services.storage import Storage + +client = Client() + +(client + .set_endpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint + .set_project('5df5acd0d48c2') # Your project ID + .set_key('919c2d18fb5d4...a2ae413da83346ad2') # Your secret API key +) + +storage = Storage(client) + +result = storage.get_file('[FILE_ID]') diff --git a/app/sdks/0.7.0/server-python/docs/examples/storage/list-files.md b/app/sdks/0.7.0/server-python/docs/examples/storage/list-files.md new file mode 100644 index 0000000000..d54bb75d79 --- /dev/null +++ b/app/sdks/0.7.0/server-python/docs/examples/storage/list-files.md @@ -0,0 +1,14 @@ +from appwrite.client import Client +from appwrite.services.storage import Storage + +client = Client() + +(client + .set_endpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint + .set_project('5df5acd0d48c2') # Your project ID + .set_key('919c2d18fb5d4...a2ae413da83346ad2') # Your secret API key +) + +storage = Storage(client) + +result = storage.list_files() diff --git a/app/sdks/0.7.0/server-python/docs/examples/storage/update-file.md b/app/sdks/0.7.0/server-python/docs/examples/storage/update-file.md new file mode 100644 index 0000000000..5001cbae74 --- /dev/null +++ b/app/sdks/0.7.0/server-python/docs/examples/storage/update-file.md @@ -0,0 +1,14 @@ +from appwrite.client import Client +from appwrite.services.storage import Storage + +client = Client() + +(client + .set_endpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint + .set_project('5df5acd0d48c2') # Your project ID + .set_key('919c2d18fb5d4...a2ae413da83346ad2') # Your secret API key +) + +storage = Storage(client) + +result = storage.update_file('[FILE_ID]', [], []) diff --git a/app/sdks/0.7.0/server-python/docs/examples/teams/create-membership.md b/app/sdks/0.7.0/server-python/docs/examples/teams/create-membership.md new file mode 100644 index 0000000000..e72ddc6fe3 --- /dev/null +++ b/app/sdks/0.7.0/server-python/docs/examples/teams/create-membership.md @@ -0,0 +1,14 @@ +from appwrite.client import Client +from appwrite.services.teams import Teams + +client = Client() + +(client + .set_endpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint + .set_project('5df5acd0d48c2') # Your project ID + .set_key('919c2d18fb5d4...a2ae413da83346ad2') # Your secret API key +) + +teams = Teams(client) + +result = teams.create_membership('[TEAM_ID]', 'email@example.com', [], 'https://example.com') diff --git a/app/sdks/0.7.0/server-python/docs/examples/teams/create.md b/app/sdks/0.7.0/server-python/docs/examples/teams/create.md new file mode 100644 index 0000000000..d4d1ba63c8 --- /dev/null +++ b/app/sdks/0.7.0/server-python/docs/examples/teams/create.md @@ -0,0 +1,14 @@ +from appwrite.client import Client +from appwrite.services.teams import Teams + +client = Client() + +(client + .set_endpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint + .set_project('5df5acd0d48c2') # Your project ID + .set_key('919c2d18fb5d4...a2ae413da83346ad2') # Your secret API key +) + +teams = Teams(client) + +result = teams.create('[NAME]') diff --git a/app/sdks/0.7.0/server-python/docs/examples/teams/delete-membership.md b/app/sdks/0.7.0/server-python/docs/examples/teams/delete-membership.md new file mode 100644 index 0000000000..e08e44fdcc --- /dev/null +++ b/app/sdks/0.7.0/server-python/docs/examples/teams/delete-membership.md @@ -0,0 +1,14 @@ +from appwrite.client import Client +from appwrite.services.teams import Teams + +client = Client() + +(client + .set_endpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint + .set_project('5df5acd0d48c2') # Your project ID + .set_key('919c2d18fb5d4...a2ae413da83346ad2') # Your secret API key +) + +teams = Teams(client) + +result = teams.delete_membership('[TEAM_ID]', '[INVITE_ID]') diff --git a/app/sdks/0.7.0/server-python/docs/examples/teams/delete.md b/app/sdks/0.7.0/server-python/docs/examples/teams/delete.md new file mode 100644 index 0000000000..87d953ff5f --- /dev/null +++ b/app/sdks/0.7.0/server-python/docs/examples/teams/delete.md @@ -0,0 +1,14 @@ +from appwrite.client import Client +from appwrite.services.teams import Teams + +client = Client() + +(client + .set_endpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint + .set_project('5df5acd0d48c2') # Your project ID + .set_key('919c2d18fb5d4...a2ae413da83346ad2') # Your secret API key +) + +teams = Teams(client) + +result = teams.delete('[TEAM_ID]') diff --git a/app/sdks/0.7.0/server-python/docs/examples/teams/get-memberships.md b/app/sdks/0.7.0/server-python/docs/examples/teams/get-memberships.md new file mode 100644 index 0000000000..01879bb280 --- /dev/null +++ b/app/sdks/0.7.0/server-python/docs/examples/teams/get-memberships.md @@ -0,0 +1,14 @@ +from appwrite.client import Client +from appwrite.services.teams import Teams + +client = Client() + +(client + .set_endpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint + .set_project('5df5acd0d48c2') # Your project ID + .set_key('919c2d18fb5d4...a2ae413da83346ad2') # Your secret API key +) + +teams = Teams(client) + +result = teams.get_memberships('[TEAM_ID]') diff --git a/app/sdks/0.7.0/server-python/docs/examples/teams/get.md b/app/sdks/0.7.0/server-python/docs/examples/teams/get.md new file mode 100644 index 0000000000..c1f90c8fe1 --- /dev/null +++ b/app/sdks/0.7.0/server-python/docs/examples/teams/get.md @@ -0,0 +1,14 @@ +from appwrite.client import Client +from appwrite.services.teams import Teams + +client = Client() + +(client + .set_endpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint + .set_project('5df5acd0d48c2') # Your project ID + .set_key('919c2d18fb5d4...a2ae413da83346ad2') # Your secret API key +) + +teams = Teams(client) + +result = teams.get('[TEAM_ID]') diff --git a/app/sdks/0.7.0/server-python/docs/examples/teams/list.md b/app/sdks/0.7.0/server-python/docs/examples/teams/list.md new file mode 100644 index 0000000000..a3d831ff4f --- /dev/null +++ b/app/sdks/0.7.0/server-python/docs/examples/teams/list.md @@ -0,0 +1,14 @@ +from appwrite.client import Client +from appwrite.services.teams import Teams + +client = Client() + +(client + .set_endpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint + .set_project('5df5acd0d48c2') # Your project ID + .set_key('919c2d18fb5d4...a2ae413da83346ad2') # Your secret API key +) + +teams = Teams(client) + +result = teams.list() diff --git a/app/sdks/0.7.0/server-python/docs/examples/teams/update.md b/app/sdks/0.7.0/server-python/docs/examples/teams/update.md new file mode 100644 index 0000000000..63f6acdc9b --- /dev/null +++ b/app/sdks/0.7.0/server-python/docs/examples/teams/update.md @@ -0,0 +1,14 @@ +from appwrite.client import Client +from appwrite.services.teams import Teams + +client = Client() + +(client + .set_endpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint + .set_project('5df5acd0d48c2') # Your project ID + .set_key('919c2d18fb5d4...a2ae413da83346ad2') # Your secret API key +) + +teams = Teams(client) + +result = teams.update('[TEAM_ID]', '[NAME]') diff --git a/app/sdks/0.7.0/server-python/docs/examples/users/create.md b/app/sdks/0.7.0/server-python/docs/examples/users/create.md new file mode 100644 index 0000000000..4c63f3771d --- /dev/null +++ b/app/sdks/0.7.0/server-python/docs/examples/users/create.md @@ -0,0 +1,14 @@ +from appwrite.client import Client +from appwrite.services.users import Users + +client = Client() + +(client + .set_endpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint + .set_project('5df5acd0d48c2') # Your project ID + .set_key('919c2d18fb5d4...a2ae413da83346ad2') # Your secret API key +) + +users = Users(client) + +result = users.create('email@example.com', 'password') diff --git a/app/sdks/0.7.0/server-python/docs/examples/users/delete-session.md b/app/sdks/0.7.0/server-python/docs/examples/users/delete-session.md new file mode 100644 index 0000000000..ca2fa99b56 --- /dev/null +++ b/app/sdks/0.7.0/server-python/docs/examples/users/delete-session.md @@ -0,0 +1,14 @@ +from appwrite.client import Client +from appwrite.services.users import Users + +client = Client() + +(client + .set_endpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint + .set_project('5df5acd0d48c2') # Your project ID + .set_key('919c2d18fb5d4...a2ae413da83346ad2') # Your secret API key +) + +users = Users(client) + +result = users.delete_session('[USER_ID]', '[SESSION_ID]') diff --git a/app/sdks/0.7.0/server-python/docs/examples/users/delete-sessions.md b/app/sdks/0.7.0/server-python/docs/examples/users/delete-sessions.md new file mode 100644 index 0000000000..fe4b2be3a8 --- /dev/null +++ b/app/sdks/0.7.0/server-python/docs/examples/users/delete-sessions.md @@ -0,0 +1,14 @@ +from appwrite.client import Client +from appwrite.services.users import Users + +client = Client() + +(client + .set_endpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint + .set_project('5df5acd0d48c2') # Your project ID + .set_key('919c2d18fb5d4...a2ae413da83346ad2') # Your secret API key +) + +users = Users(client) + +result = users.delete_sessions('[USER_ID]') diff --git a/app/sdks/0.7.0/server-python/docs/examples/users/get-logs.md b/app/sdks/0.7.0/server-python/docs/examples/users/get-logs.md new file mode 100644 index 0000000000..22816871d2 --- /dev/null +++ b/app/sdks/0.7.0/server-python/docs/examples/users/get-logs.md @@ -0,0 +1,14 @@ +from appwrite.client import Client +from appwrite.services.users import Users + +client = Client() + +(client + .set_endpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint + .set_project('5df5acd0d48c2') # Your project ID + .set_key('919c2d18fb5d4...a2ae413da83346ad2') # Your secret API key +) + +users = Users(client) + +result = users.get_logs('[USER_ID]') diff --git a/app/sdks/0.7.0/server-python/docs/examples/users/get-prefs.md b/app/sdks/0.7.0/server-python/docs/examples/users/get-prefs.md new file mode 100644 index 0000000000..846c7c13f5 --- /dev/null +++ b/app/sdks/0.7.0/server-python/docs/examples/users/get-prefs.md @@ -0,0 +1,14 @@ +from appwrite.client import Client +from appwrite.services.users import Users + +client = Client() + +(client + .set_endpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint + .set_project('5df5acd0d48c2') # Your project ID + .set_key('919c2d18fb5d4...a2ae413da83346ad2') # Your secret API key +) + +users = Users(client) + +result = users.get_prefs('[USER_ID]') diff --git a/app/sdks/0.7.0/server-python/docs/examples/users/get-sessions.md b/app/sdks/0.7.0/server-python/docs/examples/users/get-sessions.md new file mode 100644 index 0000000000..0e29608697 --- /dev/null +++ b/app/sdks/0.7.0/server-python/docs/examples/users/get-sessions.md @@ -0,0 +1,14 @@ +from appwrite.client import Client +from appwrite.services.users import Users + +client = Client() + +(client + .set_endpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint + .set_project('5df5acd0d48c2') # Your project ID + .set_key('919c2d18fb5d4...a2ae413da83346ad2') # Your secret API key +) + +users = Users(client) + +result = users.get_sessions('[USER_ID]') diff --git a/app/sdks/0.7.0/server-python/docs/examples/users/get.md b/app/sdks/0.7.0/server-python/docs/examples/users/get.md new file mode 100644 index 0000000000..bc23f2238c --- /dev/null +++ b/app/sdks/0.7.0/server-python/docs/examples/users/get.md @@ -0,0 +1,14 @@ +from appwrite.client import Client +from appwrite.services.users import Users + +client = Client() + +(client + .set_endpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint + .set_project('5df5acd0d48c2') # Your project ID + .set_key('919c2d18fb5d4...a2ae413da83346ad2') # Your secret API key +) + +users = Users(client) + +result = users.get('[USER_ID]') diff --git a/app/sdks/0.7.0/server-python/docs/examples/users/list.md b/app/sdks/0.7.0/server-python/docs/examples/users/list.md new file mode 100644 index 0000000000..b7492fa9bf --- /dev/null +++ b/app/sdks/0.7.0/server-python/docs/examples/users/list.md @@ -0,0 +1,14 @@ +from appwrite.client import Client +from appwrite.services.users import Users + +client = Client() + +(client + .set_endpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint + .set_project('5df5acd0d48c2') # Your project ID + .set_key('919c2d18fb5d4...a2ae413da83346ad2') # Your secret API key +) + +users = Users(client) + +result = users.list() diff --git a/app/sdks/0.7.0/server-python/docs/examples/users/update-prefs.md b/app/sdks/0.7.0/server-python/docs/examples/users/update-prefs.md new file mode 100644 index 0000000000..c78546f484 --- /dev/null +++ b/app/sdks/0.7.0/server-python/docs/examples/users/update-prefs.md @@ -0,0 +1,14 @@ +from appwrite.client import Client +from appwrite.services.users import Users + +client = Client() + +(client + .set_endpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint + .set_project('5df5acd0d48c2') # Your project ID + .set_key('919c2d18fb5d4...a2ae413da83346ad2') # Your secret API key +) + +users = Users(client) + +result = users.update_prefs('[USER_ID]', {}) diff --git a/app/sdks/0.7.0/server-python/docs/examples/users/update-status.md b/app/sdks/0.7.0/server-python/docs/examples/users/update-status.md new file mode 100644 index 0000000000..f40c83b61e --- /dev/null +++ b/app/sdks/0.7.0/server-python/docs/examples/users/update-status.md @@ -0,0 +1,14 @@ +from appwrite.client import Client +from appwrite.services.users import Users + +client = Client() + +(client + .set_endpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint + .set_project('5df5acd0d48c2') # Your project ID + .set_key('919c2d18fb5d4...a2ae413da83346ad2') # Your secret API key +) + +users = Users(client) + +result = users.update_status('[USER_ID]', '1') diff --git a/app/sdks/0.7.0/server-python/requirements.txt b/app/sdks/0.7.0/server-python/requirements.txt new file mode 100644 index 0000000000..e20605c43d --- /dev/null +++ b/app/sdks/0.7.0/server-python/requirements.txt @@ -0,0 +1 @@ +requests==2.22.0 \ No newline at end of file diff --git a/app/sdks/0.7.0/server-python/setup.cfg b/app/sdks/0.7.0/server-python/setup.cfg new file mode 100644 index 0000000000..224a77957f --- /dev/null +++ b/app/sdks/0.7.0/server-python/setup.cfg @@ -0,0 +1,2 @@ +[metadata] +description-file = README.md \ No newline at end of file diff --git a/app/sdks/0.7.0/server-python/setup.py b/app/sdks/0.7.0/server-python/setup.py new file mode 100644 index 0000000000..8e2fd0c3cb --- /dev/null +++ b/app/sdks/0.7.0/server-python/setup.py @@ -0,0 +1,30 @@ +import setuptools + +setuptools.setup( + name = 'appwrite', + packages = ['appwrite', 'appwrite/services'], + version = '0.0.6', + license='BSD-3-Clause', + description = 'Appwrite is an open-source self-hosted backend server that abstract and simplify complex and repetitive development tasks behind a very simple REST API', + author = 'Appwrite Team', + author_email = 'team@localhost.test', + maintainer = 'Appwrite Team', + maintainer_email = 'team@localhost.test', + url = 'https://appwrite.io/support', + download_url='https://github.com/appwrite/sdk-for-python/archive/0.0.6.tar.gz', + # keywords = ['SOME', 'MEANINGFULL', 'KEYWORDS'], + install_requires=[ + 'requests', + ], + classifiers=[ + 'Development Status :: 5 - Production/Stable', + 'Intended Audience :: Developers', + 'Environment :: Web Environment', + 'Topic :: Software Development', + 'License :: OSI Approved :: BSD License', + 'Programming Language :: Python :: 3', + 'Programming Language :: Python :: 3.5', + 'Programming Language :: Python :: 3.6', + 'Programming Language :: Python :: 3.7', + ], +) diff --git a/app/sdks/0.7.0/server-ruby/CHANGELOG.md b/app/sdks/0.7.0/server-ruby/CHANGELOG.md new file mode 100644 index 0000000000..fa4d35e687 --- /dev/null +++ b/app/sdks/0.7.0/server-ruby/CHANGELOG.md @@ -0,0 +1 @@ +# Change Log \ No newline at end of file diff --git a/app/sdks/0.7.0/server-ruby/Gemfile b/app/sdks/0.7.0/server-ruby/Gemfile new file mode 100644 index 0000000000..cd8aa9e04c --- /dev/null +++ b/app/sdks/0.7.0/server-ruby/Gemfile @@ -0,0 +1,3 @@ +source 'https://rubygems.org' + +gemspec \ No newline at end of file diff --git a/app/sdks/0.7.0/server-ruby/LICENSE b/app/sdks/0.7.0/server-ruby/LICENSE new file mode 100644 index 0000000000..fc7c051a91 --- /dev/null +++ b/app/sdks/0.7.0/server-ruby/LICENSE @@ -0,0 +1,12 @@ +Copyright (c) 2019 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: + + 1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. + + 2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. + + 3. Neither the name Appwrite nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. \ No newline at end of file diff --git a/app/sdks/0.7.0/server-ruby/README.md b/app/sdks/0.7.0/server-ruby/README.md new file mode 100644 index 0000000000..cbc2cf781c --- /dev/null +++ b/app/sdks/0.7.0/server-ruby/README.md @@ -0,0 +1,30 @@ +# Appwrite Ruby SDK + +![License](https://img.shields.io/github/license/appwrite/sdk-for-ruby.svg?v=1) +![Version](https://img.shields.io/badge/api%20version-0.6.1-blue.svg?v=1) + +**This SDK is compatible with Appwrite server version 0.6.1. For older versions, please check previous releases.** + +Appwrite is an open-source backend as a service server that abstract and simplify complex and repetitive development tasks behind a very simple to use REST API. Appwrite aims to help you develop your apps faster and in a more secure way. + Use the Ruby SDK to integrate your app with the Appwrite server to easily start interacting with all of Appwrite backend APIs and tools. + For full API documentation and tutorials go to [https://appwrite.io/docs](https://appwrite.io/docs) + + + +![Appwrite](https://appwrite.io/images/github.png) + +## Installation + +To install via [Gem](https://rubygems.org/): + +```bash +gem install appwrite --save +``` + +## Contribution + +This library is auto-generated by Appwrite custom [SDK Generator](https://github.com/appwrite/sdk-generator). To learn more about how you can help us improve this SDK, please check the [contribution guide](https://github.com/appwrite/sdk-generator/blob/master/CONTRIBUTING.md) before sending a pull-request. + +## License + +Please see the [BSD-3-Clause license](https://raw.githubusercontent.com/appwrite/appwrite/master/LICENSE) file for more information. \ No newline at end of file diff --git a/app/sdks/0.7.0/server-ruby/appwrite.gemspec b/app/sdks/0.7.0/server-ruby/appwrite.gemspec new file mode 100644 index 0000000000..f550cecf9f --- /dev/null +++ b/app/sdks/0.7.0/server-ruby/appwrite.gemspec @@ -0,0 +1,13 @@ +Gem::Specification.new do |s| + + s.name = 'appwrite' + s.version = '1.0.11' + s.summary = "Appwrite is an open-source backend as a service server that abstract and simplify complex and repetitive development tasks behind a very simple to use REST API. Appwrite aims to help you develop your apps faster and in a more secure way. + Use the Ruby SDK to integrate your app with the Appwrite server to easily start interacting with all of Appwrite backend APIs and tools. + For full API documentation and tutorials go to [https://appwrite.io/docs](https://appwrite.io/docs)" + s.author = 'Appwrite Team' + s.homepage = 'https://appwrite.io/support' + s.email = 'team@localhost.test' + s.files = `git ls-files`.split($INPUT_RECORD_SEPARATOR) + +end \ No newline at end of file diff --git a/app/sdks/0.7.0/server-ruby/docs/examples/avatars/get-browser.md b/app/sdks/0.7.0/server-ruby/docs/examples/avatars/get-browser.md new file mode 100644 index 0000000000..fc0cfc913f --- /dev/null +++ b/app/sdks/0.7.0/server-ruby/docs/examples/avatars/get-browser.md @@ -0,0 +1,15 @@ +require 'appwrite' + +client = Appwrite::Client.new() + +client + .set_endpoint('https://[HOSTNAME_OR_IP]/v1') # Your API Endpoint + .set_project('5df5acd0d48c2') # Your project ID + .set_key('919c2d18fb5d4...a2ae413da83346ad2') # Your secret API key +; + +avatars = Appwrite::Avatars.new(client); + +response = avatars.get_browser(code: 'aa'); + +puts response \ No newline at end of file diff --git a/app/sdks/0.7.0/server-ruby/docs/examples/avatars/get-credit-card.md b/app/sdks/0.7.0/server-ruby/docs/examples/avatars/get-credit-card.md new file mode 100644 index 0000000000..b3763f0846 --- /dev/null +++ b/app/sdks/0.7.0/server-ruby/docs/examples/avatars/get-credit-card.md @@ -0,0 +1,15 @@ +require 'appwrite' + +client = Appwrite::Client.new() + +client + .set_endpoint('https://[HOSTNAME_OR_IP]/v1') # Your API Endpoint + .set_project('5df5acd0d48c2') # Your project ID + .set_key('919c2d18fb5d4...a2ae413da83346ad2') # Your secret API key +; + +avatars = Appwrite::Avatars.new(client); + +response = avatars.get_credit_card(code: 'amex'); + +puts response \ No newline at end of file diff --git a/app/sdks/0.7.0/server-ruby/docs/examples/avatars/get-favicon.md b/app/sdks/0.7.0/server-ruby/docs/examples/avatars/get-favicon.md new file mode 100644 index 0000000000..2ee4e75789 --- /dev/null +++ b/app/sdks/0.7.0/server-ruby/docs/examples/avatars/get-favicon.md @@ -0,0 +1,15 @@ +require 'appwrite' + +client = Appwrite::Client.new() + +client + .set_endpoint('https://[HOSTNAME_OR_IP]/v1') # Your API Endpoint + .set_project('5df5acd0d48c2') # Your project ID + .set_key('919c2d18fb5d4...a2ae413da83346ad2') # Your secret API key +; + +avatars = Appwrite::Avatars.new(client); + +response = avatars.get_favicon(url: 'https://example.com'); + +puts response \ No newline at end of file diff --git a/app/sdks/0.7.0/server-ruby/docs/examples/avatars/get-flag.md b/app/sdks/0.7.0/server-ruby/docs/examples/avatars/get-flag.md new file mode 100644 index 0000000000..2e2f01f0f9 --- /dev/null +++ b/app/sdks/0.7.0/server-ruby/docs/examples/avatars/get-flag.md @@ -0,0 +1,15 @@ +require 'appwrite' + +client = Appwrite::Client.new() + +client + .set_endpoint('https://[HOSTNAME_OR_IP]/v1') # Your API Endpoint + .set_project('5df5acd0d48c2') # Your project ID + .set_key('919c2d18fb5d4...a2ae413da83346ad2') # Your secret API key +; + +avatars = Appwrite::Avatars.new(client); + +response = avatars.get_flag(code: 'af'); + +puts response \ No newline at end of file diff --git a/app/sdks/0.7.0/server-ruby/docs/examples/avatars/get-image.md b/app/sdks/0.7.0/server-ruby/docs/examples/avatars/get-image.md new file mode 100644 index 0000000000..682d6bf9df --- /dev/null +++ b/app/sdks/0.7.0/server-ruby/docs/examples/avatars/get-image.md @@ -0,0 +1,15 @@ +require 'appwrite' + +client = Appwrite::Client.new() + +client + .set_endpoint('https://[HOSTNAME_OR_IP]/v1') # Your API Endpoint + .set_project('5df5acd0d48c2') # Your project ID + .set_key('919c2d18fb5d4...a2ae413da83346ad2') # Your secret API key +; + +avatars = Appwrite::Avatars.new(client); + +response = avatars.get_image(url: 'https://example.com'); + +puts response \ No newline at end of file diff --git a/app/sdks/0.7.0/server-ruby/docs/examples/avatars/get-q-r.md b/app/sdks/0.7.0/server-ruby/docs/examples/avatars/get-q-r.md new file mode 100644 index 0000000000..f145425ca2 --- /dev/null +++ b/app/sdks/0.7.0/server-ruby/docs/examples/avatars/get-q-r.md @@ -0,0 +1,15 @@ +require 'appwrite' + +client = Appwrite::Client.new() + +client + .set_endpoint('https://[HOSTNAME_OR_IP]/v1') # Your API Endpoint + .set_project('5df5acd0d48c2') # Your project ID + .set_key('919c2d18fb5d4...a2ae413da83346ad2') # Your secret API key +; + +avatars = Appwrite::Avatars.new(client); + +response = avatars.get_q_r(text: '[TEXT]'); + +puts response \ No newline at end of file diff --git a/app/sdks/0.7.0/server-ruby/docs/examples/database/create-collection.md b/app/sdks/0.7.0/server-ruby/docs/examples/database/create-collection.md new file mode 100644 index 0000000000..0317ed9f05 --- /dev/null +++ b/app/sdks/0.7.0/server-ruby/docs/examples/database/create-collection.md @@ -0,0 +1,15 @@ +require 'appwrite' + +client = Appwrite::Client.new() + +client + .set_endpoint('https://[HOSTNAME_OR_IP]/v1') # Your API Endpoint + .set_project('5df5acd0d48c2') # Your project ID + .set_key('919c2d18fb5d4...a2ae413da83346ad2') # Your secret API key +; + +database = Appwrite::Database.new(client); + +response = database.create_collection(name: '[NAME]', read: [], write: [], rules: []); + +puts response \ No newline at end of file diff --git a/app/sdks/0.7.0/server-ruby/docs/examples/database/create-document.md b/app/sdks/0.7.0/server-ruby/docs/examples/database/create-document.md new file mode 100644 index 0000000000..0101c746b4 --- /dev/null +++ b/app/sdks/0.7.0/server-ruby/docs/examples/database/create-document.md @@ -0,0 +1,15 @@ +require 'appwrite' + +client = Appwrite::Client.new() + +client + .set_endpoint('https://[HOSTNAME_OR_IP]/v1') # Your API Endpoint + .set_project('5df5acd0d48c2') # Your project ID + .set_key('919c2d18fb5d4...a2ae413da83346ad2') # Your secret API key +; + +database = Appwrite::Database.new(client); + +response = database.create_document(collection_id: '[COLLECTION_ID]', data: {}, read: [], write: []); + +puts response \ No newline at end of file diff --git a/app/sdks/0.7.0/server-ruby/docs/examples/database/delete-collection.md b/app/sdks/0.7.0/server-ruby/docs/examples/database/delete-collection.md new file mode 100644 index 0000000000..b91c369da7 --- /dev/null +++ b/app/sdks/0.7.0/server-ruby/docs/examples/database/delete-collection.md @@ -0,0 +1,15 @@ +require 'appwrite' + +client = Appwrite::Client.new() + +client + .set_endpoint('https://[HOSTNAME_OR_IP]/v1') # Your API Endpoint + .set_project('5df5acd0d48c2') # Your project ID + .set_key('919c2d18fb5d4...a2ae413da83346ad2') # Your secret API key +; + +database = Appwrite::Database.new(client); + +response = database.delete_collection(collection_id: '[COLLECTION_ID]'); + +puts response \ No newline at end of file diff --git a/app/sdks/0.7.0/server-ruby/docs/examples/database/delete-document.md b/app/sdks/0.7.0/server-ruby/docs/examples/database/delete-document.md new file mode 100644 index 0000000000..6548ec2946 --- /dev/null +++ b/app/sdks/0.7.0/server-ruby/docs/examples/database/delete-document.md @@ -0,0 +1,15 @@ +require 'appwrite' + +client = Appwrite::Client.new() + +client + .set_endpoint('https://[HOSTNAME_OR_IP]/v1') # Your API Endpoint + .set_project('5df5acd0d48c2') # Your project ID + .set_key('919c2d18fb5d4...a2ae413da83346ad2') # Your secret API key +; + +database = Appwrite::Database.new(client); + +response = database.delete_document(collection_id: '[COLLECTION_ID]', document_id: '[DOCUMENT_ID]'); + +puts response \ No newline at end of file diff --git a/app/sdks/0.7.0/server-ruby/docs/examples/database/get-collection-logs.md b/app/sdks/0.7.0/server-ruby/docs/examples/database/get-collection-logs.md new file mode 100644 index 0000000000..65938d1af9 --- /dev/null +++ b/app/sdks/0.7.0/server-ruby/docs/examples/database/get-collection-logs.md @@ -0,0 +1,15 @@ +require 'appwrite' + +client = Appwrite::Client.new() + +client + .set_endpoint('https://[HOSTNAME_OR_IP]/v1') # Your API Endpoint + .set_project('5df5acd0d48c2') # Your project ID + .set_key('919c2d18fb5d4...a2ae413da83346ad2') # Your secret API key +; + +database = Appwrite::Database.new(client); + +response = database.get_collection_logs(collection_id: '[COLLECTION_ID]'); + +puts response \ No newline at end of file diff --git a/app/sdks/0.7.0/server-ruby/docs/examples/database/get-collection.md b/app/sdks/0.7.0/server-ruby/docs/examples/database/get-collection.md new file mode 100644 index 0000000000..1e54e94c10 --- /dev/null +++ b/app/sdks/0.7.0/server-ruby/docs/examples/database/get-collection.md @@ -0,0 +1,15 @@ +require 'appwrite' + +client = Appwrite::Client.new() + +client + .set_endpoint('https://[HOSTNAME_OR_IP]/v1') # Your API Endpoint + .set_project('5df5acd0d48c2') # Your project ID + .set_key('919c2d18fb5d4...a2ae413da83346ad2') # Your secret API key +; + +database = Appwrite::Database.new(client); + +response = database.get_collection(collection_id: '[COLLECTION_ID]'); + +puts response \ No newline at end of file diff --git a/app/sdks/0.7.0/server-ruby/docs/examples/database/get-document.md b/app/sdks/0.7.0/server-ruby/docs/examples/database/get-document.md new file mode 100644 index 0000000000..3040b82c03 --- /dev/null +++ b/app/sdks/0.7.0/server-ruby/docs/examples/database/get-document.md @@ -0,0 +1,15 @@ +require 'appwrite' + +client = Appwrite::Client.new() + +client + .set_endpoint('https://[HOSTNAME_OR_IP]/v1') # Your API Endpoint + .set_project('5df5acd0d48c2') # Your project ID + .set_key('919c2d18fb5d4...a2ae413da83346ad2') # Your secret API key +; + +database = Appwrite::Database.new(client); + +response = database.get_document(collection_id: '[COLLECTION_ID]', document_id: '[DOCUMENT_ID]'); + +puts response \ No newline at end of file diff --git a/app/sdks/0.7.0/server-ruby/docs/examples/database/list-collections.md b/app/sdks/0.7.0/server-ruby/docs/examples/database/list-collections.md new file mode 100644 index 0000000000..ec15fe3b08 --- /dev/null +++ b/app/sdks/0.7.0/server-ruby/docs/examples/database/list-collections.md @@ -0,0 +1,15 @@ +require 'appwrite' + +client = Appwrite::Client.new() + +client + .set_endpoint('https://[HOSTNAME_OR_IP]/v1') # Your API Endpoint + .set_project('5df5acd0d48c2') # Your project ID + .set_key('919c2d18fb5d4...a2ae413da83346ad2') # Your secret API key +; + +database = Appwrite::Database.new(client); + +response = database.list_collections(); + +puts response \ No newline at end of file diff --git a/app/sdks/0.7.0/server-ruby/docs/examples/database/list-documents.md b/app/sdks/0.7.0/server-ruby/docs/examples/database/list-documents.md new file mode 100644 index 0000000000..fa33f10ccf --- /dev/null +++ b/app/sdks/0.7.0/server-ruby/docs/examples/database/list-documents.md @@ -0,0 +1,15 @@ +require 'appwrite' + +client = Appwrite::Client.new() + +client + .set_endpoint('https://[HOSTNAME_OR_IP]/v1') # Your API Endpoint + .set_project('5df5acd0d48c2') # Your project ID + .set_key('919c2d18fb5d4...a2ae413da83346ad2') # Your secret API key +; + +database = Appwrite::Database.new(client); + +response = database.list_documents(collection_id: '[COLLECTION_ID]'); + +puts response \ No newline at end of file diff --git a/app/sdks/0.7.0/server-ruby/docs/examples/database/update-collection.md b/app/sdks/0.7.0/server-ruby/docs/examples/database/update-collection.md new file mode 100644 index 0000000000..3ecfbdb4ab --- /dev/null +++ b/app/sdks/0.7.0/server-ruby/docs/examples/database/update-collection.md @@ -0,0 +1,15 @@ +require 'appwrite' + +client = Appwrite::Client.new() + +client + .set_endpoint('https://[HOSTNAME_OR_IP]/v1') # Your API Endpoint + .set_project('5df5acd0d48c2') # Your project ID + .set_key('919c2d18fb5d4...a2ae413da83346ad2') # Your secret API key +; + +database = Appwrite::Database.new(client); + +response = database.update_collection(collection_id: '[COLLECTION_ID]', name: '[NAME]', read: [], write: []); + +puts response \ No newline at end of file diff --git a/app/sdks/0.7.0/server-ruby/docs/examples/database/update-document.md b/app/sdks/0.7.0/server-ruby/docs/examples/database/update-document.md new file mode 100644 index 0000000000..492d4f3edc --- /dev/null +++ b/app/sdks/0.7.0/server-ruby/docs/examples/database/update-document.md @@ -0,0 +1,15 @@ +require 'appwrite' + +client = Appwrite::Client.new() + +client + .set_endpoint('https://[HOSTNAME_OR_IP]/v1') # Your API Endpoint + .set_project('5df5acd0d48c2') # Your project ID + .set_key('919c2d18fb5d4...a2ae413da83346ad2') # Your secret API key +; + +database = Appwrite::Database.new(client); + +response = database.update_document(collection_id: '[COLLECTION_ID]', document_id: '[DOCUMENT_ID]', data: {}, read: [], write: []); + +puts response \ No newline at end of file diff --git a/app/sdks/0.7.0/server-ruby/docs/examples/health/get-anti-virus.md b/app/sdks/0.7.0/server-ruby/docs/examples/health/get-anti-virus.md new file mode 100644 index 0000000000..0c83a06cf8 --- /dev/null +++ b/app/sdks/0.7.0/server-ruby/docs/examples/health/get-anti-virus.md @@ -0,0 +1,15 @@ +require 'appwrite' + +client = Appwrite::Client.new() + +client + .set_endpoint('https://[HOSTNAME_OR_IP]/v1') # Your API Endpoint + .set_project('5df5acd0d48c2') # Your project ID + .set_key('919c2d18fb5d4...a2ae413da83346ad2') # Your secret API key +; + +health = Appwrite::Health.new(client); + +response = health.get_anti_virus(); + +puts response \ No newline at end of file diff --git a/app/sdks/0.7.0/server-ruby/docs/examples/health/get-cache.md b/app/sdks/0.7.0/server-ruby/docs/examples/health/get-cache.md new file mode 100644 index 0000000000..6f51fb6e00 --- /dev/null +++ b/app/sdks/0.7.0/server-ruby/docs/examples/health/get-cache.md @@ -0,0 +1,15 @@ +require 'appwrite' + +client = Appwrite::Client.new() + +client + .set_endpoint('https://[HOSTNAME_OR_IP]/v1') # Your API Endpoint + .set_project('5df5acd0d48c2') # Your project ID + .set_key('919c2d18fb5d4...a2ae413da83346ad2') # Your secret API key +; + +health = Appwrite::Health.new(client); + +response = health.get_cache(); + +puts response \ No newline at end of file diff --git a/app/sdks/0.7.0/server-ruby/docs/examples/health/get-d-b.md b/app/sdks/0.7.0/server-ruby/docs/examples/health/get-d-b.md new file mode 100644 index 0000000000..4bb00577a7 --- /dev/null +++ b/app/sdks/0.7.0/server-ruby/docs/examples/health/get-d-b.md @@ -0,0 +1,15 @@ +require 'appwrite' + +client = Appwrite::Client.new() + +client + .set_endpoint('https://[HOSTNAME_OR_IP]/v1') # Your API Endpoint + .set_project('5df5acd0d48c2') # Your project ID + .set_key('919c2d18fb5d4...a2ae413da83346ad2') # Your secret API key +; + +health = Appwrite::Health.new(client); + +response = health.get_d_b(); + +puts response \ No newline at end of file diff --git a/app/sdks/0.7.0/server-ruby/docs/examples/health/get-queue-certificates.md b/app/sdks/0.7.0/server-ruby/docs/examples/health/get-queue-certificates.md new file mode 100644 index 0000000000..f758b7c3a4 --- /dev/null +++ b/app/sdks/0.7.0/server-ruby/docs/examples/health/get-queue-certificates.md @@ -0,0 +1,15 @@ +require 'appwrite' + +client = Appwrite::Client.new() + +client + .set_endpoint('https://[HOSTNAME_OR_IP]/v1') # Your API Endpoint + .set_project('5df5acd0d48c2') # Your project ID + .set_key('919c2d18fb5d4...a2ae413da83346ad2') # Your secret API key +; + +health = Appwrite::Health.new(client); + +response = health.get_queue_certificates(); + +puts response \ No newline at end of file diff --git a/app/sdks/0.7.0/server-ruby/docs/examples/health/get-queue-functions.md b/app/sdks/0.7.0/server-ruby/docs/examples/health/get-queue-functions.md new file mode 100644 index 0000000000..653607f79d --- /dev/null +++ b/app/sdks/0.7.0/server-ruby/docs/examples/health/get-queue-functions.md @@ -0,0 +1,15 @@ +require 'appwrite' + +client = Appwrite::Client.new() + +client + .set_endpoint('https://[HOSTNAME_OR_IP]/v1') # Your API Endpoint + .set_project('5df5acd0d48c2') # Your project ID + .set_key('919c2d18fb5d4...a2ae413da83346ad2') # Your secret API key +; + +health = Appwrite::Health.new(client); + +response = health.get_queue_functions(); + +puts response \ No newline at end of file diff --git a/app/sdks/0.7.0/server-ruby/docs/examples/health/get-queue-logs.md b/app/sdks/0.7.0/server-ruby/docs/examples/health/get-queue-logs.md new file mode 100644 index 0000000000..c6751f7f91 --- /dev/null +++ b/app/sdks/0.7.0/server-ruby/docs/examples/health/get-queue-logs.md @@ -0,0 +1,15 @@ +require 'appwrite' + +client = Appwrite::Client.new() + +client + .set_endpoint('https://[HOSTNAME_OR_IP]/v1') # Your API Endpoint + .set_project('5df5acd0d48c2') # Your project ID + .set_key('919c2d18fb5d4...a2ae413da83346ad2') # Your secret API key +; + +health = Appwrite::Health.new(client); + +response = health.get_queue_logs(); + +puts response \ No newline at end of file diff --git a/app/sdks/0.7.0/server-ruby/docs/examples/health/get-queue-tasks.md b/app/sdks/0.7.0/server-ruby/docs/examples/health/get-queue-tasks.md new file mode 100644 index 0000000000..c6da38832e --- /dev/null +++ b/app/sdks/0.7.0/server-ruby/docs/examples/health/get-queue-tasks.md @@ -0,0 +1,15 @@ +require 'appwrite' + +client = Appwrite::Client.new() + +client + .set_endpoint('https://[HOSTNAME_OR_IP]/v1') # Your API Endpoint + .set_project('5df5acd0d48c2') # Your project ID + .set_key('919c2d18fb5d4...a2ae413da83346ad2') # Your secret API key +; + +health = Appwrite::Health.new(client); + +response = health.get_queue_tasks(); + +puts response \ No newline at end of file diff --git a/app/sdks/0.7.0/server-ruby/docs/examples/health/get-queue-usage.md b/app/sdks/0.7.0/server-ruby/docs/examples/health/get-queue-usage.md new file mode 100644 index 0000000000..ed81452d86 --- /dev/null +++ b/app/sdks/0.7.0/server-ruby/docs/examples/health/get-queue-usage.md @@ -0,0 +1,15 @@ +require 'appwrite' + +client = Appwrite::Client.new() + +client + .set_endpoint('https://[HOSTNAME_OR_IP]/v1') # Your API Endpoint + .set_project('5df5acd0d48c2') # Your project ID + .set_key('919c2d18fb5d4...a2ae413da83346ad2') # Your secret API key +; + +health = Appwrite::Health.new(client); + +response = health.get_queue_usage(); + +puts response \ No newline at end of file diff --git a/app/sdks/0.7.0/server-ruby/docs/examples/health/get-queue-webhooks.md b/app/sdks/0.7.0/server-ruby/docs/examples/health/get-queue-webhooks.md new file mode 100644 index 0000000000..9e55ab1d87 --- /dev/null +++ b/app/sdks/0.7.0/server-ruby/docs/examples/health/get-queue-webhooks.md @@ -0,0 +1,15 @@ +require 'appwrite' + +client = Appwrite::Client.new() + +client + .set_endpoint('https://[HOSTNAME_OR_IP]/v1') # Your API Endpoint + .set_project('5df5acd0d48c2') # Your project ID + .set_key('919c2d18fb5d4...a2ae413da83346ad2') # Your secret API key +; + +health = Appwrite::Health.new(client); + +response = health.get_queue_webhooks(); + +puts response \ No newline at end of file diff --git a/app/sdks/0.7.0/server-ruby/docs/examples/health/get-storage-local.md b/app/sdks/0.7.0/server-ruby/docs/examples/health/get-storage-local.md new file mode 100644 index 0000000000..09c47ae437 --- /dev/null +++ b/app/sdks/0.7.0/server-ruby/docs/examples/health/get-storage-local.md @@ -0,0 +1,15 @@ +require 'appwrite' + +client = Appwrite::Client.new() + +client + .set_endpoint('https://[HOSTNAME_OR_IP]/v1') # Your API Endpoint + .set_project('5df5acd0d48c2') # Your project ID + .set_key('919c2d18fb5d4...a2ae413da83346ad2') # Your secret API key +; + +health = Appwrite::Health.new(client); + +response = health.get_storage_local(); + +puts response \ No newline at end of file diff --git a/app/sdks/0.7.0/server-ruby/docs/examples/health/get-time.md b/app/sdks/0.7.0/server-ruby/docs/examples/health/get-time.md new file mode 100644 index 0000000000..3d72794e93 --- /dev/null +++ b/app/sdks/0.7.0/server-ruby/docs/examples/health/get-time.md @@ -0,0 +1,15 @@ +require 'appwrite' + +client = Appwrite::Client.new() + +client + .set_endpoint('https://[HOSTNAME_OR_IP]/v1') # Your API Endpoint + .set_project('5df5acd0d48c2') # Your project ID + .set_key('919c2d18fb5d4...a2ae413da83346ad2') # Your secret API key +; + +health = Appwrite::Health.new(client); + +response = health.get_time(); + +puts response \ No newline at end of file diff --git a/app/sdks/0.7.0/server-ruby/docs/examples/health/get.md b/app/sdks/0.7.0/server-ruby/docs/examples/health/get.md new file mode 100644 index 0000000000..9496c31b36 --- /dev/null +++ b/app/sdks/0.7.0/server-ruby/docs/examples/health/get.md @@ -0,0 +1,15 @@ +require 'appwrite' + +client = Appwrite::Client.new() + +client + .set_endpoint('https://[HOSTNAME_OR_IP]/v1') # Your API Endpoint + .set_project('5df5acd0d48c2') # Your project ID + .set_key('919c2d18fb5d4...a2ae413da83346ad2') # Your secret API key +; + +health = Appwrite::Health.new(client); + +response = health.get(); + +puts response \ No newline at end of file diff --git a/app/sdks/0.7.0/server-ruby/docs/examples/locale/get-continents.md b/app/sdks/0.7.0/server-ruby/docs/examples/locale/get-continents.md new file mode 100644 index 0000000000..92f38922e1 --- /dev/null +++ b/app/sdks/0.7.0/server-ruby/docs/examples/locale/get-continents.md @@ -0,0 +1,15 @@ +require 'appwrite' + +client = Appwrite::Client.new() + +client + .set_endpoint('https://[HOSTNAME_OR_IP]/v1') # Your API Endpoint + .set_project('5df5acd0d48c2') # Your project ID + .set_key('919c2d18fb5d4...a2ae413da83346ad2') # Your secret API key +; + +locale = Appwrite::Locale.new(client); + +response = locale.get_continents(); + +puts response \ No newline at end of file diff --git a/app/sdks/0.7.0/server-ruby/docs/examples/locale/get-countries-e-u.md b/app/sdks/0.7.0/server-ruby/docs/examples/locale/get-countries-e-u.md new file mode 100644 index 0000000000..b83125d4a6 --- /dev/null +++ b/app/sdks/0.7.0/server-ruby/docs/examples/locale/get-countries-e-u.md @@ -0,0 +1,15 @@ +require 'appwrite' + +client = Appwrite::Client.new() + +client + .set_endpoint('https://[HOSTNAME_OR_IP]/v1') # Your API Endpoint + .set_project('5df5acd0d48c2') # Your project ID + .set_key('919c2d18fb5d4...a2ae413da83346ad2') # Your secret API key +; + +locale = Appwrite::Locale.new(client); + +response = locale.get_countries_e_u(); + +puts response \ No newline at end of file diff --git a/app/sdks/0.7.0/server-ruby/docs/examples/locale/get-countries-phones.md b/app/sdks/0.7.0/server-ruby/docs/examples/locale/get-countries-phones.md new file mode 100644 index 0000000000..728a1b3cdc --- /dev/null +++ b/app/sdks/0.7.0/server-ruby/docs/examples/locale/get-countries-phones.md @@ -0,0 +1,15 @@ +require 'appwrite' + +client = Appwrite::Client.new() + +client + .set_endpoint('https://[HOSTNAME_OR_IP]/v1') # Your API Endpoint + .set_project('5df5acd0d48c2') # Your project ID + .set_key('919c2d18fb5d4...a2ae413da83346ad2') # Your secret API key +; + +locale = Appwrite::Locale.new(client); + +response = locale.get_countries_phones(); + +puts response \ No newline at end of file diff --git a/app/sdks/0.7.0/server-ruby/docs/examples/locale/get-countries.md b/app/sdks/0.7.0/server-ruby/docs/examples/locale/get-countries.md new file mode 100644 index 0000000000..54975db928 --- /dev/null +++ b/app/sdks/0.7.0/server-ruby/docs/examples/locale/get-countries.md @@ -0,0 +1,15 @@ +require 'appwrite' + +client = Appwrite::Client.new() + +client + .set_endpoint('https://[HOSTNAME_OR_IP]/v1') # Your API Endpoint + .set_project('5df5acd0d48c2') # Your project ID + .set_key('919c2d18fb5d4...a2ae413da83346ad2') # Your secret API key +; + +locale = Appwrite::Locale.new(client); + +response = locale.get_countries(); + +puts response \ No newline at end of file diff --git a/app/sdks/0.7.0/server-ruby/docs/examples/locale/get-currencies.md b/app/sdks/0.7.0/server-ruby/docs/examples/locale/get-currencies.md new file mode 100644 index 0000000000..4e39b435e1 --- /dev/null +++ b/app/sdks/0.7.0/server-ruby/docs/examples/locale/get-currencies.md @@ -0,0 +1,15 @@ +require 'appwrite' + +client = Appwrite::Client.new() + +client + .set_endpoint('https://[HOSTNAME_OR_IP]/v1') # Your API Endpoint + .set_project('5df5acd0d48c2') # Your project ID + .set_key('919c2d18fb5d4...a2ae413da83346ad2') # Your secret API key +; + +locale = Appwrite::Locale.new(client); + +response = locale.get_currencies(); + +puts response \ No newline at end of file diff --git a/app/sdks/0.7.0/server-ruby/docs/examples/locale/get.md b/app/sdks/0.7.0/server-ruby/docs/examples/locale/get.md new file mode 100644 index 0000000000..b390d505c4 --- /dev/null +++ b/app/sdks/0.7.0/server-ruby/docs/examples/locale/get.md @@ -0,0 +1,15 @@ +require 'appwrite' + +client = Appwrite::Client.new() + +client + .set_endpoint('https://[HOSTNAME_OR_IP]/v1') # Your API Endpoint + .set_project('5df5acd0d48c2') # Your project ID + .set_key('919c2d18fb5d4...a2ae413da83346ad2') # Your secret API key +; + +locale = Appwrite::Locale.new(client); + +response = locale.get(); + +puts response \ No newline at end of file diff --git a/app/sdks/0.7.0/server-ruby/docs/examples/storage/create-file.md b/app/sdks/0.7.0/server-ruby/docs/examples/storage/create-file.md new file mode 100644 index 0000000000..b044e35b86 --- /dev/null +++ b/app/sdks/0.7.0/server-ruby/docs/examples/storage/create-file.md @@ -0,0 +1,15 @@ +require 'appwrite' + +client = Appwrite::Client.new() + +client + .set_endpoint('https://[HOSTNAME_OR_IP]/v1') # Your API Endpoint + .set_project('5df5acd0d48c2') # Your project ID + .set_key('919c2d18fb5d4...a2ae413da83346ad2') # Your secret API key +; + +storage = Appwrite::Storage.new(client); + +response = storage.create_file(file: File.new(), read: [], write: []); + +puts response \ No newline at end of file diff --git a/app/sdks/0.7.0/server-ruby/docs/examples/storage/delete-file.md b/app/sdks/0.7.0/server-ruby/docs/examples/storage/delete-file.md new file mode 100644 index 0000000000..1aa67b3537 --- /dev/null +++ b/app/sdks/0.7.0/server-ruby/docs/examples/storage/delete-file.md @@ -0,0 +1,15 @@ +require 'appwrite' + +client = Appwrite::Client.new() + +client + .set_endpoint('https://[HOSTNAME_OR_IP]/v1') # Your API Endpoint + .set_project('5df5acd0d48c2') # Your project ID + .set_key('919c2d18fb5d4...a2ae413da83346ad2') # Your secret API key +; + +storage = Appwrite::Storage.new(client); + +response = storage.delete_file(file_id: '[FILE_ID]'); + +puts response \ No newline at end of file diff --git a/app/sdks/0.7.0/server-ruby/docs/examples/storage/get-file-download.md b/app/sdks/0.7.0/server-ruby/docs/examples/storage/get-file-download.md new file mode 100644 index 0000000000..777c565d06 --- /dev/null +++ b/app/sdks/0.7.0/server-ruby/docs/examples/storage/get-file-download.md @@ -0,0 +1,15 @@ +require 'appwrite' + +client = Appwrite::Client.new() + +client + .set_endpoint('https://[HOSTNAME_OR_IP]/v1') # Your API Endpoint + .set_project('5df5acd0d48c2') # Your project ID + .set_key('919c2d18fb5d4...a2ae413da83346ad2') # Your secret API key +; + +storage = Appwrite::Storage.new(client); + +response = storage.get_file_download(file_id: '[FILE_ID]'); + +puts response \ No newline at end of file diff --git a/app/sdks/0.7.0/server-ruby/docs/examples/storage/get-file-preview.md b/app/sdks/0.7.0/server-ruby/docs/examples/storage/get-file-preview.md new file mode 100644 index 0000000000..48be3a044e --- /dev/null +++ b/app/sdks/0.7.0/server-ruby/docs/examples/storage/get-file-preview.md @@ -0,0 +1,15 @@ +require 'appwrite' + +client = Appwrite::Client.new() + +client + .set_endpoint('https://[HOSTNAME_OR_IP]/v1') # Your API Endpoint + .set_project('5df5acd0d48c2') # Your project ID + .set_key('919c2d18fb5d4...a2ae413da83346ad2') # Your secret API key +; + +storage = Appwrite::Storage.new(client); + +response = storage.get_file_preview(file_id: '[FILE_ID]'); + +puts response \ No newline at end of file diff --git a/app/sdks/0.7.0/server-ruby/docs/examples/storage/get-file-view.md b/app/sdks/0.7.0/server-ruby/docs/examples/storage/get-file-view.md new file mode 100644 index 0000000000..a3dc012098 --- /dev/null +++ b/app/sdks/0.7.0/server-ruby/docs/examples/storage/get-file-view.md @@ -0,0 +1,15 @@ +require 'appwrite' + +client = Appwrite::Client.new() + +client + .set_endpoint('https://[HOSTNAME_OR_IP]/v1') # Your API Endpoint + .set_project('5df5acd0d48c2') # Your project ID + .set_key('919c2d18fb5d4...a2ae413da83346ad2') # Your secret API key +; + +storage = Appwrite::Storage.new(client); + +response = storage.get_file_view(file_id: '[FILE_ID]'); + +puts response \ No newline at end of file diff --git a/app/sdks/0.7.0/server-ruby/docs/examples/storage/get-file.md b/app/sdks/0.7.0/server-ruby/docs/examples/storage/get-file.md new file mode 100644 index 0000000000..203a4dff7c --- /dev/null +++ b/app/sdks/0.7.0/server-ruby/docs/examples/storage/get-file.md @@ -0,0 +1,15 @@ +require 'appwrite' + +client = Appwrite::Client.new() + +client + .set_endpoint('https://[HOSTNAME_OR_IP]/v1') # Your API Endpoint + .set_project('5df5acd0d48c2') # Your project ID + .set_key('919c2d18fb5d4...a2ae413da83346ad2') # Your secret API key +; + +storage = Appwrite::Storage.new(client); + +response = storage.get_file(file_id: '[FILE_ID]'); + +puts response \ No newline at end of file diff --git a/app/sdks/0.7.0/server-ruby/docs/examples/storage/list-files.md b/app/sdks/0.7.0/server-ruby/docs/examples/storage/list-files.md new file mode 100644 index 0000000000..a148da78f9 --- /dev/null +++ b/app/sdks/0.7.0/server-ruby/docs/examples/storage/list-files.md @@ -0,0 +1,15 @@ +require 'appwrite' + +client = Appwrite::Client.new() + +client + .set_endpoint('https://[HOSTNAME_OR_IP]/v1') # Your API Endpoint + .set_project('5df5acd0d48c2') # Your project ID + .set_key('919c2d18fb5d4...a2ae413da83346ad2') # Your secret API key +; + +storage = Appwrite::Storage.new(client); + +response = storage.list_files(); + +puts response \ No newline at end of file diff --git a/app/sdks/0.7.0/server-ruby/docs/examples/storage/update-file.md b/app/sdks/0.7.0/server-ruby/docs/examples/storage/update-file.md new file mode 100644 index 0000000000..36d5049816 --- /dev/null +++ b/app/sdks/0.7.0/server-ruby/docs/examples/storage/update-file.md @@ -0,0 +1,15 @@ +require 'appwrite' + +client = Appwrite::Client.new() + +client + .set_endpoint('https://[HOSTNAME_OR_IP]/v1') # Your API Endpoint + .set_project('5df5acd0d48c2') # Your project ID + .set_key('919c2d18fb5d4...a2ae413da83346ad2') # Your secret API key +; + +storage = Appwrite::Storage.new(client); + +response = storage.update_file(file_id: '[FILE_ID]', read: [], write: []); + +puts response \ No newline at end of file diff --git a/app/sdks/0.7.0/server-ruby/docs/examples/teams/create-membership.md b/app/sdks/0.7.0/server-ruby/docs/examples/teams/create-membership.md new file mode 100644 index 0000000000..fc0a249361 --- /dev/null +++ b/app/sdks/0.7.0/server-ruby/docs/examples/teams/create-membership.md @@ -0,0 +1,15 @@ +require 'appwrite' + +client = Appwrite::Client.new() + +client + .set_endpoint('https://[HOSTNAME_OR_IP]/v1') # Your API Endpoint + .set_project('5df5acd0d48c2') # Your project ID + .set_key('919c2d18fb5d4...a2ae413da83346ad2') # Your secret API key +; + +teams = Appwrite::Teams.new(client); + +response = teams.create_membership(team_id: '[TEAM_ID]', email: 'email@example.com', roles: [], url: 'https://example.com'); + +puts response \ No newline at end of file diff --git a/app/sdks/0.7.0/server-ruby/docs/examples/teams/create.md b/app/sdks/0.7.0/server-ruby/docs/examples/teams/create.md new file mode 100644 index 0000000000..d7f9c2f8c0 --- /dev/null +++ b/app/sdks/0.7.0/server-ruby/docs/examples/teams/create.md @@ -0,0 +1,15 @@ +require 'appwrite' + +client = Appwrite::Client.new() + +client + .set_endpoint('https://[HOSTNAME_OR_IP]/v1') # Your API Endpoint + .set_project('5df5acd0d48c2') # Your project ID + .set_key('919c2d18fb5d4...a2ae413da83346ad2') # Your secret API key +; + +teams = Appwrite::Teams.new(client); + +response = teams.create(name: '[NAME]'); + +puts response \ No newline at end of file diff --git a/app/sdks/0.7.0/server-ruby/docs/examples/teams/delete-membership.md b/app/sdks/0.7.0/server-ruby/docs/examples/teams/delete-membership.md new file mode 100644 index 0000000000..545cacc51f --- /dev/null +++ b/app/sdks/0.7.0/server-ruby/docs/examples/teams/delete-membership.md @@ -0,0 +1,15 @@ +require 'appwrite' + +client = Appwrite::Client.new() + +client + .set_endpoint('https://[HOSTNAME_OR_IP]/v1') # Your API Endpoint + .set_project('5df5acd0d48c2') # Your project ID + .set_key('919c2d18fb5d4...a2ae413da83346ad2') # Your secret API key +; + +teams = Appwrite::Teams.new(client); + +response = teams.delete_membership(team_id: '[TEAM_ID]', invite_id: '[INVITE_ID]'); + +puts response \ No newline at end of file diff --git a/app/sdks/0.7.0/server-ruby/docs/examples/teams/delete.md b/app/sdks/0.7.0/server-ruby/docs/examples/teams/delete.md new file mode 100644 index 0000000000..d28907f741 --- /dev/null +++ b/app/sdks/0.7.0/server-ruby/docs/examples/teams/delete.md @@ -0,0 +1,15 @@ +require 'appwrite' + +client = Appwrite::Client.new() + +client + .set_endpoint('https://[HOSTNAME_OR_IP]/v1') # Your API Endpoint + .set_project('5df5acd0d48c2') # Your project ID + .set_key('919c2d18fb5d4...a2ae413da83346ad2') # Your secret API key +; + +teams = Appwrite::Teams.new(client); + +response = teams.delete(team_id: '[TEAM_ID]'); + +puts response \ No newline at end of file diff --git a/app/sdks/0.7.0/server-ruby/docs/examples/teams/get-memberships.md b/app/sdks/0.7.0/server-ruby/docs/examples/teams/get-memberships.md new file mode 100644 index 0000000000..013d952afc --- /dev/null +++ b/app/sdks/0.7.0/server-ruby/docs/examples/teams/get-memberships.md @@ -0,0 +1,15 @@ +require 'appwrite' + +client = Appwrite::Client.new() + +client + .set_endpoint('https://[HOSTNAME_OR_IP]/v1') # Your API Endpoint + .set_project('5df5acd0d48c2') # Your project ID + .set_key('919c2d18fb5d4...a2ae413da83346ad2') # Your secret API key +; + +teams = Appwrite::Teams.new(client); + +response = teams.get_memberships(team_id: '[TEAM_ID]'); + +puts response \ No newline at end of file diff --git a/app/sdks/0.7.0/server-ruby/docs/examples/teams/get.md b/app/sdks/0.7.0/server-ruby/docs/examples/teams/get.md new file mode 100644 index 0000000000..1dd4918a12 --- /dev/null +++ b/app/sdks/0.7.0/server-ruby/docs/examples/teams/get.md @@ -0,0 +1,15 @@ +require 'appwrite' + +client = Appwrite::Client.new() + +client + .set_endpoint('https://[HOSTNAME_OR_IP]/v1') # Your API Endpoint + .set_project('5df5acd0d48c2') # Your project ID + .set_key('919c2d18fb5d4...a2ae413da83346ad2') # Your secret API key +; + +teams = Appwrite::Teams.new(client); + +response = teams.get(team_id: '[TEAM_ID]'); + +puts response \ No newline at end of file diff --git a/app/sdks/0.7.0/server-ruby/docs/examples/teams/list.md b/app/sdks/0.7.0/server-ruby/docs/examples/teams/list.md new file mode 100644 index 0000000000..c0cd72a362 --- /dev/null +++ b/app/sdks/0.7.0/server-ruby/docs/examples/teams/list.md @@ -0,0 +1,15 @@ +require 'appwrite' + +client = Appwrite::Client.new() + +client + .set_endpoint('https://[HOSTNAME_OR_IP]/v1') # Your API Endpoint + .set_project('5df5acd0d48c2') # Your project ID + .set_key('919c2d18fb5d4...a2ae413da83346ad2') # Your secret API key +; + +teams = Appwrite::Teams.new(client); + +response = teams.list(); + +puts response \ No newline at end of file diff --git a/app/sdks/0.7.0/server-ruby/docs/examples/teams/update.md b/app/sdks/0.7.0/server-ruby/docs/examples/teams/update.md new file mode 100644 index 0000000000..b7e87a8e09 --- /dev/null +++ b/app/sdks/0.7.0/server-ruby/docs/examples/teams/update.md @@ -0,0 +1,15 @@ +require 'appwrite' + +client = Appwrite::Client.new() + +client + .set_endpoint('https://[HOSTNAME_OR_IP]/v1') # Your API Endpoint + .set_project('5df5acd0d48c2') # Your project ID + .set_key('919c2d18fb5d4...a2ae413da83346ad2') # Your secret API key +; + +teams = Appwrite::Teams.new(client); + +response = teams.update(team_id: '[TEAM_ID]', name: '[NAME]'); + +puts response \ No newline at end of file diff --git a/app/sdks/0.7.0/server-ruby/docs/examples/users/create.md b/app/sdks/0.7.0/server-ruby/docs/examples/users/create.md new file mode 100644 index 0000000000..0a152ac366 --- /dev/null +++ b/app/sdks/0.7.0/server-ruby/docs/examples/users/create.md @@ -0,0 +1,15 @@ +require 'appwrite' + +client = Appwrite::Client.new() + +client + .set_endpoint('https://[HOSTNAME_OR_IP]/v1') # Your API Endpoint + .set_project('5df5acd0d48c2') # Your project ID + .set_key('919c2d18fb5d4...a2ae413da83346ad2') # Your secret API key +; + +users = Appwrite::Users.new(client); + +response = users.create(email: 'email@example.com', password: 'password'); + +puts response \ No newline at end of file diff --git a/app/sdks/0.7.0/server-ruby/docs/examples/users/delete-session.md b/app/sdks/0.7.0/server-ruby/docs/examples/users/delete-session.md new file mode 100644 index 0000000000..149c7d9293 --- /dev/null +++ b/app/sdks/0.7.0/server-ruby/docs/examples/users/delete-session.md @@ -0,0 +1,15 @@ +require 'appwrite' + +client = Appwrite::Client.new() + +client + .set_endpoint('https://[HOSTNAME_OR_IP]/v1') # Your API Endpoint + .set_project('5df5acd0d48c2') # Your project ID + .set_key('919c2d18fb5d4...a2ae413da83346ad2') # Your secret API key +; + +users = Appwrite::Users.new(client); + +response = users.delete_session(user_id: '[USER_ID]', session_id: '[SESSION_ID]'); + +puts response \ No newline at end of file diff --git a/app/sdks/0.7.0/server-ruby/docs/examples/users/delete-sessions.md b/app/sdks/0.7.0/server-ruby/docs/examples/users/delete-sessions.md new file mode 100644 index 0000000000..3f02e08dd1 --- /dev/null +++ b/app/sdks/0.7.0/server-ruby/docs/examples/users/delete-sessions.md @@ -0,0 +1,15 @@ +require 'appwrite' + +client = Appwrite::Client.new() + +client + .set_endpoint('https://[HOSTNAME_OR_IP]/v1') # Your API Endpoint + .set_project('5df5acd0d48c2') # Your project ID + .set_key('919c2d18fb5d4...a2ae413da83346ad2') # Your secret API key +; + +users = Appwrite::Users.new(client); + +response = users.delete_sessions(user_id: '[USER_ID]'); + +puts response \ No newline at end of file diff --git a/app/sdks/0.7.0/server-ruby/docs/examples/users/get-logs.md b/app/sdks/0.7.0/server-ruby/docs/examples/users/get-logs.md new file mode 100644 index 0000000000..695a77ad27 --- /dev/null +++ b/app/sdks/0.7.0/server-ruby/docs/examples/users/get-logs.md @@ -0,0 +1,15 @@ +require 'appwrite' + +client = Appwrite::Client.new() + +client + .set_endpoint('https://[HOSTNAME_OR_IP]/v1') # Your API Endpoint + .set_project('5df5acd0d48c2') # Your project ID + .set_key('919c2d18fb5d4...a2ae413da83346ad2') # Your secret API key +; + +users = Appwrite::Users.new(client); + +response = users.get_logs(user_id: '[USER_ID]'); + +puts response \ No newline at end of file diff --git a/app/sdks/0.7.0/server-ruby/docs/examples/users/get-prefs.md b/app/sdks/0.7.0/server-ruby/docs/examples/users/get-prefs.md new file mode 100644 index 0000000000..4a0761e283 --- /dev/null +++ b/app/sdks/0.7.0/server-ruby/docs/examples/users/get-prefs.md @@ -0,0 +1,15 @@ +require 'appwrite' + +client = Appwrite::Client.new() + +client + .set_endpoint('https://[HOSTNAME_OR_IP]/v1') # Your API Endpoint + .set_project('5df5acd0d48c2') # Your project ID + .set_key('919c2d18fb5d4...a2ae413da83346ad2') # Your secret API key +; + +users = Appwrite::Users.new(client); + +response = users.get_prefs(user_id: '[USER_ID]'); + +puts response \ No newline at end of file diff --git a/app/sdks/0.7.0/server-ruby/docs/examples/users/get-sessions.md b/app/sdks/0.7.0/server-ruby/docs/examples/users/get-sessions.md new file mode 100644 index 0000000000..52f37a4609 --- /dev/null +++ b/app/sdks/0.7.0/server-ruby/docs/examples/users/get-sessions.md @@ -0,0 +1,15 @@ +require 'appwrite' + +client = Appwrite::Client.new() + +client + .set_endpoint('https://[HOSTNAME_OR_IP]/v1') # Your API Endpoint + .set_project('5df5acd0d48c2') # Your project ID + .set_key('919c2d18fb5d4...a2ae413da83346ad2') # Your secret API key +; + +users = Appwrite::Users.new(client); + +response = users.get_sessions(user_id: '[USER_ID]'); + +puts response \ No newline at end of file diff --git a/app/sdks/0.7.0/server-ruby/docs/examples/users/get.md b/app/sdks/0.7.0/server-ruby/docs/examples/users/get.md new file mode 100644 index 0000000000..562ac958c3 --- /dev/null +++ b/app/sdks/0.7.0/server-ruby/docs/examples/users/get.md @@ -0,0 +1,15 @@ +require 'appwrite' + +client = Appwrite::Client.new() + +client + .set_endpoint('https://[HOSTNAME_OR_IP]/v1') # Your API Endpoint + .set_project('5df5acd0d48c2') # Your project ID + .set_key('919c2d18fb5d4...a2ae413da83346ad2') # Your secret API key +; + +users = Appwrite::Users.new(client); + +response = users.get(user_id: '[USER_ID]'); + +puts response \ No newline at end of file diff --git a/app/sdks/0.7.0/server-ruby/docs/examples/users/list.md b/app/sdks/0.7.0/server-ruby/docs/examples/users/list.md new file mode 100644 index 0000000000..096ce859e3 --- /dev/null +++ b/app/sdks/0.7.0/server-ruby/docs/examples/users/list.md @@ -0,0 +1,15 @@ +require 'appwrite' + +client = Appwrite::Client.new() + +client + .set_endpoint('https://[HOSTNAME_OR_IP]/v1') # Your API Endpoint + .set_project('5df5acd0d48c2') # Your project ID + .set_key('919c2d18fb5d4...a2ae413da83346ad2') # Your secret API key +; + +users = Appwrite::Users.new(client); + +response = users.list(); + +puts response \ No newline at end of file diff --git a/app/sdks/0.7.0/server-ruby/docs/examples/users/update-prefs.md b/app/sdks/0.7.0/server-ruby/docs/examples/users/update-prefs.md new file mode 100644 index 0000000000..2bb2d42e16 --- /dev/null +++ b/app/sdks/0.7.0/server-ruby/docs/examples/users/update-prefs.md @@ -0,0 +1,15 @@ +require 'appwrite' + +client = Appwrite::Client.new() + +client + .set_endpoint('https://[HOSTNAME_OR_IP]/v1') # Your API Endpoint + .set_project('5df5acd0d48c2') # Your project ID + .set_key('919c2d18fb5d4...a2ae413da83346ad2') # Your secret API key +; + +users = Appwrite::Users.new(client); + +response = users.update_prefs(user_id: '[USER_ID]', prefs: {}); + +puts response \ No newline at end of file diff --git a/app/sdks/0.7.0/server-ruby/docs/examples/users/update-status.md b/app/sdks/0.7.0/server-ruby/docs/examples/users/update-status.md new file mode 100644 index 0000000000..088ee380d8 --- /dev/null +++ b/app/sdks/0.7.0/server-ruby/docs/examples/users/update-status.md @@ -0,0 +1,15 @@ +require 'appwrite' + +client = Appwrite::Client.new() + +client + .set_endpoint('https://[HOSTNAME_OR_IP]/v1') # Your API Endpoint + .set_project('5df5acd0d48c2') # Your project ID + .set_key('919c2d18fb5d4...a2ae413da83346ad2') # Your secret API key +; + +users = Appwrite::Users.new(client); + +response = users.update_status(user_id: '[USER_ID]', status: '1'); + +puts response \ No newline at end of file diff --git a/app/sdks/0.7.0/server-ruby/lib/appwrite.rb b/app/sdks/0.7.0/server-ruby/lib/appwrite.rb new file mode 100644 index 0000000000..1b4f38bea2 --- /dev/null +++ b/app/sdks/0.7.0/server-ruby/lib/appwrite.rb @@ -0,0 +1,13 @@ +require 'net/http' +require 'uri' +require 'json' +require_relative 'appwrite/client' +require_relative 'appwrite/service' +require_relative 'appwrite/services/avatars' +require_relative 'appwrite/services/database' +require_relative 'appwrite/services/functions' +require_relative 'appwrite/services/health' +require_relative 'appwrite/services/locale' +require_relative 'appwrite/services/storage' +require_relative 'appwrite/services/teams' +require_relative 'appwrite/services/users' diff --git a/app/sdks/0.7.0/server-ruby/lib/appwrite/client.rb b/app/sdks/0.7.0/server-ruby/lib/appwrite/client.rb new file mode 100644 index 0000000000..2cd09d52fe --- /dev/null +++ b/app/sdks/0.7.0/server-ruby/lib/appwrite/client.rb @@ -0,0 +1,116 @@ +require 'net/http' +require 'uri' +require 'json' +require 'cgi' + +module Appwrite + class Client + + METHOD_GET = 'get' + METHOD_POST = 'post' + METHOD_PUT = 'put' + METHOD_PATCH = 'patch' + METHOD_DELETE = 'delete' + METHOD_HEAD = 'head' + METHOD_OPTIONS = 'options' + METHOD_CONNECT = 'connect' + METHOD_TRACE = 'trace' + + def initialize() + @headers = { + 'content-type' => '', + 'user-agent' => RUBY_PLATFORM + ':ruby-' + RUBY_VERSION, + 'x-sdk-version' => 'appwrite:ruby:1.0.11' + } + @endpoint = 'https://appwrite.io/v1'; + end + + def set_project(value) + add_header('x-appwrite-project', value) + + return self + end + + def set_key(value) + add_header('x-appwrite-key', value) + + return self + end + + def set_locale(value) + add_header('x-appwrite-locale', value) + + return self + end + + def set_endpoint(endpoint) + @endpoint = endpoint + + return self + end + + def add_header(key, value) + @headers[key.downcase] = value.downcase + + return self + end + + def call(method, path = '', headers = {}, params = {}) + uri = URI.parse(@endpoint + path + ((method == METHOD_GET && params.length) ? '?' + encode(params) : '')) + return fetch(method, uri, headers, params) + end + + protected + + private + + def fetch(method, uri, headers, params, limit = 5) + raise ArgumentError, 'Too Many HTTP Redirects' if limit == 0 + + http = Net::HTTP.new(uri.host, uri.port) + http.use_ssl = (uri.scheme == 'https') + payload = '' + + headers = @headers.merge(headers) + + if (method != METHOD_GET) + case headers['content-type'][0, headers['content-type'].index(';') || headers['content-type'].length] + when 'application/json' + payload = params.to_json + else + payload = encode(params) + end + end + + begin + response = http.send_request(method.upcase, uri.request_uri, payload, headers) + rescue => error + raise 'Request Failed: ' + error.message + end + + # Handle Redirects + if (response.class == Net::HTTPRedirection || response.class == Net::HTTPMovedPermanently) + location = response['location'] + uri = URI.parse(uri.scheme + "://" + uri.host + "" + location) + + return fetch(method, uri, headers, {}, limit - 1) + end + + return JSON.parse(response.body); + end + + def encode(value, key = nil) + case value + when Hash then value.map { |k,v| encode(v, append_key(key,k)) }.join('&') + when Array then value.map { |v| encode(v, "#{key}[]") }.join('&') + when nil then '' + else + "#{key}=#{CGI.escape(value.to_s)}" + end + end + + def append_key(root_key, key) + root_key.nil? ? key : "#{root_key}[#{key.to_s}]" + end + end +end \ No newline at end of file diff --git a/app/sdks/0.7.0/server-ruby/lib/appwrite/service.rb b/app/sdks/0.7.0/server-ruby/lib/appwrite/service.rb new file mode 100644 index 0000000000..0d954c6d17 --- /dev/null +++ b/app/sdks/0.7.0/server-ruby/lib/appwrite/service.rb @@ -0,0 +1,12 @@ +module Appwrite + class Service + + def initialize(client) + @client = client + end + + protected + + private + end +end \ No newline at end of file diff --git a/app/sdks/0.7.0/server-ruby/lib/appwrite/services/avatars.rb b/app/sdks/0.7.0/server-ruby/lib/appwrite/services/avatars.rb new file mode 100644 index 0000000000..2c8e8ee723 --- /dev/null +++ b/app/sdks/0.7.0/server-ruby/lib/appwrite/services/avatars.rb @@ -0,0 +1,95 @@ +module Appwrite + class Avatars < Service + + def get_browser(code:, width: 100, height: 100, quality: 100) + path = '/avatars/browsers/{code}' + .gsub('{code}', code) + + params = { + 'width': width, + 'height': height, + 'quality': quality + } + + return @client.call('get', path, { + 'content-type' => 'application/json', + }, params); + end + + def get_credit_card(code:, width: 100, height: 100, quality: 100) + path = '/avatars/credit-cards/{code}' + .gsub('{code}', code) + + params = { + 'width': width, + 'height': height, + 'quality': quality + } + + return @client.call('get', path, { + 'content-type' => 'application/json', + }, params); + end + + def get_favicon(url:) + path = '/avatars/favicon' + + params = { + 'url': url + } + + return @client.call('get', path, { + 'content-type' => 'application/json', + }, params); + end + + def get_flag(code:, width: 100, height: 100, quality: 100) + path = '/avatars/flags/{code}' + .gsub('{code}', code) + + params = { + 'width': width, + 'height': height, + 'quality': quality + } + + return @client.call('get', path, { + 'content-type' => 'application/json', + }, params); + end + + def get_image(url:, width: 400, height: 400) + path = '/avatars/image' + + params = { + 'url': url, + 'width': width, + 'height': height + } + + return @client.call('get', path, { + 'content-type' => 'application/json', + }, params); + end + + def get_q_r(text:, size: 400, margin: 1, download: 0) + path = '/avatars/qr' + + params = { + 'text': text, + 'size': size, + 'margin': margin, + 'download': download + } + + return @client.call('get', path, { + 'content-type' => 'application/json', + }, params); + end + + + protected + + private + end +end \ No newline at end of file diff --git a/app/sdks/0.7.0/server-ruby/lib/appwrite/services/database.rb b/app/sdks/0.7.0/server-ruby/lib/appwrite/services/database.rb new file mode 100644 index 0000000000..d8efcc34e1 --- /dev/null +++ b/app/sdks/0.7.0/server-ruby/lib/appwrite/services/database.rb @@ -0,0 +1,172 @@ +module Appwrite + class Database < Service + + def list_collections(search: '', limit: 25, offset: 0, order_type: 'ASC') + path = '/database/collections' + + params = { + 'search': search, + 'limit': limit, + 'offset': offset, + 'orderType': order_type + } + + return @client.call('get', path, { + 'content-type' => 'application/json', + }, params); + end + + def create_collection(name:, read:, write:, rules:) + path = '/database/collections' + + params = { + 'name': name, + 'read': read, + 'write': write, + 'rules': rules + } + + return @client.call('post', path, { + 'content-type' => 'application/json', + }, params); + end + + def get_collection(collection_id:) + path = '/database/collections/{collectionId}' + .gsub('{collectionId}', collection_id) + + params = { + } + + return @client.call('get', path, { + 'content-type' => 'application/json', + }, params); + end + + def update_collection(collection_id:, name:, read:, write:, rules: []) + path = '/database/collections/{collectionId}' + .gsub('{collectionId}', collection_id) + + params = { + 'name': name, + 'read': read, + 'write': write, + 'rules': rules + } + + return @client.call('put', path, { + 'content-type' => 'application/json', + }, params); + end + + def delete_collection(collection_id:) + path = '/database/collections/{collectionId}' + .gsub('{collectionId}', collection_id) + + params = { + } + + return @client.call('delete', path, { + 'content-type' => 'application/json', + }, params); + end + + def list_documents(collection_id:, filters: [], offset: 0, limit: 50, order_field: '$id', order_type: 'ASC', order_cast: 'string', search: '', first: 0, last: 0) + path = '/database/collections/{collectionId}/documents' + .gsub('{collectionId}', collection_id) + + params = { + 'filters': filters, + 'offset': offset, + 'limit': limit, + 'orderField': order_field, + 'orderType': order_type, + 'orderCast': order_cast, + 'search': search, + 'first': first, + 'last': last + } + + return @client.call('get', path, { + 'content-type' => 'application/json', + }, params); + end + + def create_document(collection_id:, data:, read:, write:, parent_document: '', parent_property: '', parent_property_type: 'assign') + path = '/database/collections/{collectionId}/documents' + .gsub('{collectionId}', collection_id) + + params = { + 'data': data, + 'read': read, + 'write': write, + 'parentDocument': parent_document, + 'parentProperty': parent_property, + 'parentPropertyType': parent_property_type + } + + return @client.call('post', path, { + 'content-type' => 'application/json', + }, params); + end + + def get_document(collection_id:, document_id:) + path = '/database/collections/{collectionId}/documents/{documentId}' + .gsub('{collectionId}', collection_id) + .gsub('{documentId}', document_id) + + params = { + } + + return @client.call('get', path, { + 'content-type' => 'application/json', + }, params); + end + + def update_document(collection_id:, document_id:, data:, read:, write:) + path = '/database/collections/{collectionId}/documents/{documentId}' + .gsub('{collectionId}', collection_id) + .gsub('{documentId}', document_id) + + params = { + 'data': data, + 'read': read, + 'write': write + } + + return @client.call('patch', path, { + 'content-type' => 'application/json', + }, params); + end + + def delete_document(collection_id:, document_id:) + path = '/database/collections/{collectionId}/documents/{documentId}' + .gsub('{collectionId}', collection_id) + .gsub('{documentId}', document_id) + + params = { + } + + return @client.call('delete', path, { + 'content-type' => 'application/json', + }, params); + end + + def get_collection_logs(collection_id:) + path = '/database/collections/{collectionId}/logs' + .gsub('{collectionId}', collection_id) + + params = { + } + + return @client.call('get', path, { + 'content-type' => 'application/json', + }, params); + end + + + protected + + private + end +end \ No newline at end of file diff --git a/app/sdks/0.7.0/server-ruby/lib/appwrite/services/functions.rb b/app/sdks/0.7.0/server-ruby/lib/appwrite/services/functions.rb new file mode 100644 index 0000000000..e6fb0c5f12 --- /dev/null +++ b/app/sdks/0.7.0/server-ruby/lib/appwrite/services/functions.rb @@ -0,0 +1,193 @@ +module Appwrite + class Functions < Service + + def list(search: '', limit: 25, offset: 0, order_type: 'ASC') + path = '/functions' + + params = { + 'search': search, + 'limit': limit, + 'offset': offset, + 'orderType': order_type + } + + return @client.call('get', path, { + 'content-type' => 'application/json', + }, params); + end + + def create(name:, vars: [], events: [], schedule: '', timeout: 15) + path = '/functions' + + params = { + 'name': name, + 'vars': vars, + 'events': events, + 'schedule': schedule, + 'timeout': timeout + } + + return @client.call('post', path, { + 'content-type' => 'application/json', + }, params); + end + + def get(function_id:) + path = '/functions/{functionId}' + .gsub('{function_id}', function_id) + + params = { + } + + return @client.call('get', path, { + 'content-type' => 'application/json', + }, params); + end + + def update(function_id:, name:, vars: [], events: [], schedule: '', timeout: 15) + path = '/functions/{functionId}' + .gsub('{function_id}', function_id) + + params = { + 'name': name, + 'vars': vars, + 'events': events, + 'schedule': schedule, + 'timeout': timeout + } + + return @client.call('put', path, { + 'content-type' => 'application/json', + }, params); + end + + def delete(function_id:) + path = '/functions/{functionId}' + .gsub('{function_id}', function_id) + + params = { + } + + return @client.call('delete', path, { + 'content-type' => 'application/json', + }, params); + end + + def list_executions(function_id:, search: '', limit: 25, offset: 0, order_type: 'ASC') + path = '/functions/{functionId}/executions' + .gsub('{function_id}', function_id) + + params = { + 'search': search, + 'limit': limit, + 'offset': offset, + 'orderType': order_type + } + + return @client.call('get', path, { + 'content-type' => 'application/json', + }, params); + end + + def create_execution(function_id:, async: 1) + path = '/functions/{functionId}/executions' + .gsub('{function_id}', function_id) + + params = { + 'async': async + } + + return @client.call('post', path, { + 'content-type' => 'application/json', + }, params); + end + + def get_execution(function_id:, execution_id:) + path = '/functions/{functionId}/executions/{executionId}' + .gsub('{function_id}', function_id) + .gsub('{execution_id}', execution_id) + + params = { + } + + return @client.call('get', path, { + 'content-type' => 'application/json', + }, params); + end + + def update_tag(function_id:, tag:) + path = '/functions/{functionId}/tag' + .gsub('{function_id}', function_id) + + params = { + 'tag': tag + } + + return @client.call('patch', path, { + 'content-type' => 'application/json', + }, params); + end + + def list_tags(function_id:, search: '', limit: 25, offset: 0, order_type: 'ASC') + path = '/functions/{functionId}/tags' + .gsub('{function_id}', function_id) + + params = { + 'search': search, + 'limit': limit, + 'offset': offset, + 'orderType': order_type + } + + return @client.call('get', path, { + 'content-type' => 'application/json', + }, params); + end + + def create_tag(function_id:, env:, command:, code:) + path = '/functions/{functionId}/tags' + .gsub('{function_id}', function_id) + + params = { + 'env': env, + 'command': command, + 'code': code + } + + return @client.call('post', path, { + 'content-type' => 'application/json', + }, params); + end + + def get_tag(function_id:, tag_id:) + path = '/functions/{functionId}/tags/{tagId}' + .gsub('{function_id}', function_id) + .gsub('{tag_id}', tag_id) + + params = { + } + + return @client.call('get', path, { + 'content-type' => 'application/json', + }, params); + end + + def delete_tag(function_id:, tag_id:) + path = '/functions/{functionId}/tags/{tagId}' + .gsub('{function_id}', function_id) + .gsub('{tag_id}', tag_id) + + params = { + } + + return @client.call('delete', path, { + 'content-type' => 'application/json', + }, params); + end + + + protected + + private + end +end \ No newline at end of file diff --git a/app/sdks/0.7.0/server-ruby/lib/appwrite/services/health.rb b/app/sdks/0.7.0/server-ruby/lib/appwrite/services/health.rb new file mode 100644 index 0000000000..d2c6bc7b60 --- /dev/null +++ b/app/sdks/0.7.0/server-ruby/lib/appwrite/services/health.rb @@ -0,0 +1,141 @@ +module Appwrite + class Health < Service + + def get() + path = '/health' + + params = { + } + + return @client.call('get', path, { + 'content-type' => 'application/json', + }, params); + end + + def get_anti_virus() + path = '/health/anti-virus' + + params = { + } + + return @client.call('get', path, { + 'content-type' => 'application/json', + }, params); + end + + def get_cache() + path = '/health/cache' + + params = { + } + + return @client.call('get', path, { + 'content-type' => 'application/json', + }, params); + end + + def get_d_b() + path = '/health/db' + + params = { + } + + return @client.call('get', path, { + 'content-type' => 'application/json', + }, params); + end + + def get_queue_certificates() + path = '/health/queue/certificates' + + params = { + } + + return @client.call('get', path, { + 'content-type' => 'application/json', + }, params); + end + + def get_queue_functions() + path = '/health/queue/functions' + + params = { + } + + return @client.call('get', path, { + 'content-type' => 'application/json', + }, params); + end + + def get_queue_logs() + path = '/health/queue/logs' + + params = { + } + + return @client.call('get', path, { + 'content-type' => 'application/json', + }, params); + end + + def get_queue_tasks() + path = '/health/queue/tasks' + + params = { + } + + return @client.call('get', path, { + 'content-type' => 'application/json', + }, params); + end + + def get_queue_usage() + path = '/health/queue/usage' + + params = { + } + + return @client.call('get', path, { + 'content-type' => 'application/json', + }, params); + end + + def get_queue_webhooks() + path = '/health/queue/webhooks' + + params = { + } + + return @client.call('get', path, { + 'content-type' => 'application/json', + }, params); + end + + def get_storage_local() + path = '/health/storage/local' + + params = { + } + + return @client.call('get', path, { + 'content-type' => 'application/json', + }, params); + end + + def get_time() + path = '/health/time' + + params = { + } + + return @client.call('get', path, { + 'content-type' => 'application/json', + }, params); + end + + + protected + + private + end +end \ No newline at end of file diff --git a/app/sdks/0.7.0/server-ruby/lib/appwrite/services/locale.rb b/app/sdks/0.7.0/server-ruby/lib/appwrite/services/locale.rb new file mode 100644 index 0000000000..707c8b2f4a --- /dev/null +++ b/app/sdks/0.7.0/server-ruby/lib/appwrite/services/locale.rb @@ -0,0 +1,75 @@ +module Appwrite + class Locale < Service + + def get() + path = '/locale' + + params = { + } + + return @client.call('get', path, { + 'content-type' => 'application/json', + }, params); + end + + def get_continents() + path = '/locale/continents' + + params = { + } + + return @client.call('get', path, { + 'content-type' => 'application/json', + }, params); + end + + def get_countries() + path = '/locale/countries' + + params = { + } + + return @client.call('get', path, { + 'content-type' => 'application/json', + }, params); + end + + def get_countries_e_u() + path = '/locale/countries/eu' + + params = { + } + + return @client.call('get', path, { + 'content-type' => 'application/json', + }, params); + end + + def get_countries_phones() + path = '/locale/countries/phones' + + params = { + } + + return @client.call('get', path, { + 'content-type' => 'application/json', + }, params); + end + + def get_currencies() + path = '/locale/currencies' + + params = { + } + + return @client.call('get', path, { + 'content-type' => 'application/json', + }, params); + end + + + protected + + private + end +end \ No newline at end of file diff --git a/app/sdks/0.7.0/server-ruby/lib/appwrite/services/storage.rb b/app/sdks/0.7.0/server-ruby/lib/appwrite/services/storage.rb new file mode 100644 index 0000000000..0e99a2b0d5 --- /dev/null +++ b/app/sdks/0.7.0/server-ruby/lib/appwrite/services/storage.rb @@ -0,0 +1,118 @@ +module Appwrite + class Storage < Service + + def list_files(search: '', limit: 25, offset: 0, order_type: 'ASC') + path = '/storage/files' + + params = { + 'search': search, + 'limit': limit, + 'offset': offset, + 'orderType': order_type + } + + return @client.call('get', path, { + 'content-type' => 'application/json', + }, params); + end + + def create_file(file:, read:, write:) + path = '/storage/files' + + params = { + 'file': file, + 'read': read, + 'write': write + } + + return @client.call('post', path, { + 'content-type' => 'multipart/form-data', + }, params); + end + + def get_file(file_id:) + path = '/storage/files/{fileId}' + .gsub('{fileId}', file_id) + + params = { + } + + return @client.call('get', path, { + 'content-type' => 'application/json', + }, params); + end + + def update_file(file_id:, read:, write:) + path = '/storage/files/{fileId}' + .gsub('{fileId}', file_id) + + params = { + 'read': read, + 'write': write + } + + return @client.call('put', path, { + 'content-type' => 'application/json', + }, params); + end + + def delete_file(file_id:) + path = '/storage/files/{fileId}' + .gsub('{fileId}', file_id) + + params = { + } + + return @client.call('delete', path, { + 'content-type' => 'application/json', + }, params); + end + + def get_file_download(file_id:) + path = '/storage/files/{fileId}/download' + .gsub('{fileId}', file_id) + + params = { + } + + return @client.call('get', path, { + 'content-type' => 'application/json', + }, params); + end + + def get_file_preview(file_id:, width: 0, height: 0, quality: 100, background: '', output: '') + path = '/storage/files/{fileId}/preview' + .gsub('{fileId}', file_id) + + params = { + 'width': width, + 'height': height, + 'quality': quality, + 'background': background, + 'output': output + } + + return @client.call('get', path, { + 'content-type' => 'application/json', + }, params); + end + + def get_file_view(file_id:, as: '') + path = '/storage/files/{fileId}/view' + .gsub('{fileId}', file_id) + + params = { + 'as': as + } + + return @client.call('get', path, { + 'content-type' => 'application/json', + }, params); + end + + + protected + + private + end +end \ No newline at end of file diff --git a/app/sdks/0.7.0/server-ruby/lib/appwrite/services/teams.rb b/app/sdks/0.7.0/server-ruby/lib/appwrite/services/teams.rb new file mode 100644 index 0000000000..0e677476d2 --- /dev/null +++ b/app/sdks/0.7.0/server-ruby/lib/appwrite/services/teams.rb @@ -0,0 +1,115 @@ +module Appwrite + class Teams < Service + + def list(search: '', limit: 25, offset: 0, order_type: 'ASC') + path = '/teams' + + params = { + 'search': search, + 'limit': limit, + 'offset': offset, + 'orderType': order_type + } + + return @client.call('get', path, { + 'content-type' => 'application/json', + }, params); + end + + def create(name:, roles: ["owner"]) + path = '/teams' + + params = { + 'name': name, + 'roles': roles + } + + return @client.call('post', path, { + 'content-type' => 'application/json', + }, params); + end + + def get(team_id:) + path = '/teams/{teamId}' + .gsub('{teamId}', team_id) + + params = { + } + + return @client.call('get', path, { + 'content-type' => 'application/json', + }, params); + end + + def update(team_id:, name:) + path = '/teams/{teamId}' + .gsub('{teamId}', team_id) + + params = { + 'name': name + } + + return @client.call('put', path, { + 'content-type' => 'application/json', + }, params); + end + + def delete(team_id:) + path = '/teams/{teamId}' + .gsub('{teamId}', team_id) + + params = { + } + + return @client.call('delete', path, { + 'content-type' => 'application/json', + }, params); + end + + def get_memberships(team_id:) + path = '/teams/{teamId}/memberships' + .gsub('{teamId}', team_id) + + params = { + } + + return @client.call('get', path, { + 'content-type' => 'application/json', + }, params); + end + + def create_membership(team_id:, email:, roles:, url:, name: '') + path = '/teams/{teamId}/memberships' + .gsub('{teamId}', team_id) + + params = { + 'email': email, + 'name': name, + 'roles': roles, + 'url': url + } + + return @client.call('post', path, { + 'content-type' => 'application/json', + }, params); + end + + def delete_membership(team_id:, invite_id:) + path = '/teams/{teamId}/memberships/{inviteId}' + .gsub('{teamId}', team_id) + .gsub('{inviteId}', invite_id) + + params = { + } + + return @client.call('delete', path, { + 'content-type' => 'application/json', + }, params); + end + + + protected + + private + end +end \ No newline at end of file diff --git a/app/sdks/0.7.0/server-ruby/lib/appwrite/services/users.rb b/app/sdks/0.7.0/server-ruby/lib/appwrite/services/users.rb new file mode 100644 index 0000000000..f75434bd1a --- /dev/null +++ b/app/sdks/0.7.0/server-ruby/lib/appwrite/services/users.rb @@ -0,0 +1,137 @@ +module Appwrite + class Users < Service + + def list(search: '', limit: 25, offset: 0, order_type: 'ASC') + path = '/users' + + params = { + 'search': search, + 'limit': limit, + 'offset': offset, + 'orderType': order_type + } + + return @client.call('get', path, { + 'content-type' => 'application/json', + }, params); + end + + def create(email:, password:, name: '') + path = '/users' + + params = { + 'email': email, + 'password': password, + 'name': name + } + + return @client.call('post', path, { + 'content-type' => 'application/json', + }, params); + end + + def get(user_id:) + path = '/users/{userId}' + .gsub('{userId}', user_id) + + params = { + } + + return @client.call('get', path, { + 'content-type' => 'application/json', + }, params); + end + + def get_logs(user_id:) + path = '/users/{userId}/logs' + .gsub('{userId}', user_id) + + params = { + } + + return @client.call('get', path, { + 'content-type' => 'application/json', + }, params); + end + + def get_prefs(user_id:) + path = '/users/{userId}/prefs' + .gsub('{userId}', user_id) + + params = { + } + + return @client.call('get', path, { + 'content-type' => 'application/json', + }, params); + end + + def update_prefs(user_id:, prefs:) + path = '/users/{userId}/prefs' + .gsub('{userId}', user_id) + + params = { + 'prefs': prefs + } + + return @client.call('patch', path, { + 'content-type' => 'application/json', + }, params); + end + + def get_sessions(user_id:) + path = '/users/{userId}/sessions' + .gsub('{userId}', user_id) + + params = { + } + + return @client.call('get', path, { + 'content-type' => 'application/json', + }, params); + end + + def delete_sessions(user_id:) + path = '/users/{userId}/sessions' + .gsub('{userId}', user_id) + + params = { + } + + return @client.call('delete', path, { + 'content-type' => 'application/json', + }, params); + end + + def delete_session(user_id:, session_id:) + path = '/users/{userId}/sessions/{sessionId}' + .gsub('{userId}', user_id) + .gsub('{sessionId}', session_id) + + params = { + } + + return @client.call('delete', path, { + 'content-type' => 'application/json', + }, params); + end + + def update_status(user_id:, status:) + path = '/users/{userId}/status' + .gsub('{userId}', user_id) + + params = { + 'status': status + } + + return @client.call('patch', path, { + 'content-type' => 'application/json', + }, params); + end + + + protected + + private + end +end \ No newline at end of file