From a1b4642e2268411c83c52670c36cf399630bc74e Mon Sep 17 00:00:00 2001 From: Eldad Fux Date: Fri, 25 Dec 2020 09:46:04 +0200 Subject: [PATCH] Removed all source files for SDKs --- app/sdks/0.6.2/client-flutter/CHANGELOG.md | 60 - app/sdks/0.6.2/client-flutter/LICENSE | 12 - app/sdks/0.6.2/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.6.2/client-flutter/example/README.md | 55 - .../0.6.2/client-flutter/lib/appwrite.dart | 10 - app/sdks/0.6.2/client-flutter/lib/client.dart | 144 - app/sdks/0.6.2/client-flutter/lib/enums.dart | 15 - .../0.6.2/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.6.2/client-flutter/pubspec.yaml | 24 - app/sdks/0.6.2/client-web/CHANGELOG.md | 1 - app/sdks/0.6.2/client-web/LICENSE | 12 - app/sdks/0.6.2/client-web/README.md | 59 - .../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.6.2/client-web/package.json | 17 - app/sdks/0.6.2/client-web/src/sdk.js | 2386 -------- app/sdks/0.6.2/client-web/src/sdk.min.js | 187 - app/sdks/0.6.2/client-web/tsconfig.json | 8 - app/sdks/0.6.2/client-web/types/index.d.ts | 868 --- app/sdks/0.6.2/console-web/CHANGELOG.md | 1 - app/sdks/0.6.2/console-web/LICENSE | 12 - app/sdks/0.6.2/console-web/README.md | 59 - .../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 - .../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 - .../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/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.6.2/console-web/package.json | 17 - app/sdks/0.6.2/console-web/src/sdk.js | 5088 ----------------- app/sdks/0.6.2/console-web/src/sdk.min.js | 447 -- app/sdks/0.6.2/console-web/tsconfig.json | 8 - app/sdks/0.6.2/console-web/types/index.d.ts | 1819 ------ app/sdks/0.6.2/server-deno/CHANGELOG.md | 1 - app/sdks/0.6.2/server-deno/LICENSE | 12 - app/sdks/0.6.2/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-initials.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 - .../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 - .../docs/examples/locale/get-languages.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.6.2/server-deno/mod.ts | 19 - app/sdks/0.6.2/server-deno/src/client.ts | 138 - app/sdks/0.6.2/server-deno/src/service.ts | 13 - .../0.6.2/server-deno/src/services/avatars.ts | 200 - .../server-deno/src/services/database.ts | 264 - .../0.6.2/server-deno/src/services/health.ts | 232 - .../0.6.2/server-deno/src/services/locale.ts | 143 - .../0.6.2/server-deno/src/services/storage.ts | 198 - .../0.6.2/server-deno/src/services/teams.ts | 209 - .../0.6.2/server-deno/src/services/users.ts | 214 - app/sdks/0.6.2/server-nodejs/CHANGELOG.md | 1 - app/sdks/0.6.2/server-nodejs/LICENSE | 12 - app/sdks/0.6.2/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-initials.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 - .../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-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 - .../docs/examples/locale/get-languages.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.6.2/server-nodejs/index.js | 19 - app/sdks/0.6.2/server-nodejs/lib/client.js | 152 - app/sdks/0.6.2/server-nodejs/lib/service.js | 10 - .../server-nodejs/lib/services/avatars.js | 201 - .../server-nodejs/lib/services/database.js | 265 - .../server-nodejs/lib/services/health.js | 233 - .../server-nodejs/lib/services/locale.js | 144 - .../server-nodejs/lib/services/storage.js | 199 - .../0.6.2/server-nodejs/lib/services/teams.js | 210 - .../0.6.2/server-nodejs/lib/services/users.js | 215 - app/sdks/0.6.2/server-nodejs/package.json | 17 - app/sdks/0.6.2/server-php/CHANGELOG.md | 1 - app/sdks/0.6.2/server-php/LICENSE | 12 - app/sdks/0.6.2/server-php/README.md | 28 - app/sdks/0.6.2/server-php/composer.json | 26 - app/sdks/0.6.2/server-php/docs/avatars.md | 120 - app/sdks/0.6.2/server-php/docs/database.md | 169 - .../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-initials.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 - .../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 - .../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 - .../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 - .../docs/examples/locale/get-languages.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.6.2/server-php/docs/health.md | 96 - app/sdks/0.6.2/server-php/docs/locale.md | 60 - app/sdks/0.6.2/server-php/docs/storage.md | 127 - app/sdks/0.6.2/server-php/docs/teams.md | 132 - app/sdks/0.6.2/server-php/docs/users.md | 150 - .../0.6.2/server-php/src/Appwrite/Client.php | 240 - .../0.6.2/server-php/src/Appwrite/Service.php | 19 - .../src/Appwrite/Services/Avatars.php | 213 - .../src/Appwrite/Services/Database.php | 280 - .../src/Appwrite/Services/Health.php | 250 - .../src/Appwrite/Services/Locale.php | 156 - .../src/Appwrite/Services/Storage.php | 212 - .../src/Appwrite/Services/Teams.php | 223 - .../src/Appwrite/Services/Users.php | 230 - app/sdks/0.6.2/server-python/CHANGELOG.md | 1 - app/sdks/0.6.2/server-python/LICENSE | 12 - app/sdks/0.6.2/server-python/README.md | 30 - .../0.6.2/server-python/appwrite/__init__.py | 1 - .../0.6.2/server-python/appwrite/client.py | 106 - .../0.6.2/server-python/appwrite/service.py | 6 - .../appwrite/services/__init__.py | 1 - .../appwrite/services/avatars.py | 102 - .../appwrite/services/database.py | 146 - .../server-python/appwrite/services/health.py | 127 - .../server-python/appwrite/services/locale.py | 77 - .../appwrite/services/storage.py | 108 - .../server-python/appwrite/services/teams.py | 109 - .../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-initials.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 - .../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 - .../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 - .../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 - .../docs/examples/locale/get-languages.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.6.2/server-python/requirements.txt | 1 - app/sdks/0.6.2/server-python/setup.cfg | 2 - app/sdks/0.6.2/server-python/setup.py | 31 - app/sdks/0.6.2/server-ruby/CHANGELOG.md | 1 - app/sdks/0.6.2/server-ruby/Gemfile | 3 - app/sdks/0.6.2/server-ruby/LICENSE | 12 - app/sdks/0.6.2/server-ruby/README.md | 30 - app/sdks/0.6.2/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-initials.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 - .../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 - .../docs/examples/locale/get-languages.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.6.2/server-ruby/lib/appwrite.rb | 12 - .../0.6.2/server-ruby/lib/appwrite/client.rb | 116 - .../0.6.2/server-ruby/lib/appwrite/service.rb | 12 - .../lib/appwrite/services/avatars.rb | 111 - .../lib/appwrite/services/database.rb | 158 - .../lib/appwrite/services/health.rb | 141 - .../lib/appwrite/services/locale.rb | 86 - .../lib/appwrite/services/storage.rb | 118 - .../lib/appwrite/services/teams.rb | 119 - .../lib/appwrite/services/users.rb | 137 - 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 | 144 - 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 | 239 - .../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-web/CHANGELOG.md | 1 - app/sdks/0.7.0/client-web/LICENSE | 12 - app/sdks/0.7.0/client-web/README.md | 59 - .../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 | 2387 -------- 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 | 869 --- 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 | 59 - .../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 - .../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 - .../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 - .../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-usage.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-tag.md | 15 - .../docs/examples/functions/update.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 | 5017 ---------------- app/sdks/0.7.0/console-web/src/sdk.min.js | 432 -- app/sdks/0.7.0/console-web/tsconfig.json | 8 - app/sdks/0.7.0/console-web/types/index.d.ts | 1815 ------ 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-initials.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 - .../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 | 20 - .../docs/examples/functions/create-tag.md | 20 - .../docs/examples/functions/create.md | 20 - .../docs/examples/functions/delete-tag.md | 20 - .../docs/examples/functions/delete.md | 20 - .../docs/examples/functions/get-execution.md | 20 - .../docs/examples/functions/get-tag.md | 20 - .../docs/examples/functions/get.md | 20 - .../examples/functions/list-executions.md | 20 - .../docs/examples/functions/list-tags.md | 20 - .../docs/examples/functions/list.md | 20 - .../docs/examples/functions/update-tag.md | 20 - .../docs/examples/functions/update.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 - .../docs/examples/locale/get-languages.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/delete-user.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 | 21 - 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 | 201 - .../server-deno/src/services/database.ts | 264 - .../server-deno/src/services/functions.ts | 279 - .../0.7.0/server-deno/src/services/health.ts | 232 - .../0.7.0/server-deno/src/services/locale.ts | 143 - .../0.7.0/server-deno/src/services/storage.ts | 198 - .../0.7.0/server-deno/src/services/teams.ts | 209 - .../0.7.0/server-deno/src/services/users.ts | 233 - 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-initials.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 - .../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 | 20 - .../docs/examples/functions/create-tag.md | 21 - .../docs/examples/functions/create.md | 20 - .../docs/examples/functions/delete-tag.md | 20 - .../docs/examples/functions/delete.md | 20 - .../docs/examples/functions/get-execution.md | 20 - .../docs/examples/functions/get-tag.md | 20 - .../docs/examples/functions/get.md | 20 - .../examples/functions/list-executions.md | 20 - .../docs/examples/functions/list-tags.md | 20 - .../docs/examples/functions/list.md | 20 - .../docs/examples/functions/update-tag.md | 20 - .../docs/examples/functions/update.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-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 - .../docs/examples/locale/get-languages.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/delete-user.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 | 152 - app/sdks/0.7.0/server-nodejs/lib/service.js | 10 - .../server-nodejs/lib/services/avatars.js | 202 - .../server-nodejs/lib/services/database.js | 265 - .../server-nodejs/lib/services/functions.js | 280 - .../server-nodejs/lib/services/health.js | 233 - .../server-nodejs/lib/services/locale.js | 144 - .../server-nodejs/lib/services/storage.js | 199 - .../0.7.0/server-nodejs/lib/services/teams.js | 210 - .../0.7.0/server-nodejs/lib/services/users.js | 234 - 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 | 121 - app/sdks/0.7.0/server-php/docs/database.md | 169 - .../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-initials.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 - .../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 | 16 - .../docs/examples/functions/create-tag.md | 16 - .../docs/examples/functions/create.md | 16 - .../docs/examples/functions/delete-tag.md | 16 - .../docs/examples/functions/delete.md | 16 - .../docs/examples/functions/get-execution.md | 16 - .../docs/examples/functions/get-tag.md | 16 - .../server-php/docs/examples/functions/get.md | 16 - .../examples/functions/list-executions.md | 16 - .../docs/examples/functions/list-tags.md | 16 - .../docs/examples/functions/list.md | 16 - .../docs/examples/functions/update-tag.md | 16 - .../docs/examples/functions/update.md | 16 - .../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 - .../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 - .../docs/examples/locale/get-languages.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/delete-user.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 | 185 - app/sdks/0.7.0/server-php/docs/health.md | 96 - app/sdks/0.7.0/server-php/docs/locale.md | 60 - app/sdks/0.7.0/server-php/docs/storage.md | 127 - app/sdks/0.7.0/server-php/docs/teams.md | 132 - app/sdks/0.7.0/server-php/docs/users.md | 164 - .../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 | 214 - .../src/Appwrite/Services/Database.php | 280 - .../src/Appwrite/Services/Functions.php | 298 - .../src/Appwrite/Services/Health.php | 250 - .../src/Appwrite/Services/Locale.php | 156 - .../src/Appwrite/Services/Storage.php | 212 - .../src/Appwrite/Services/Teams.php | 223 - .../src/Appwrite/Services/Users.php | 250 - 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 | 102 - .../appwrite/services/database.py | 146 - .../appwrite/services/functions.py | 177 - .../server-python/appwrite/services/health.py | 127 - .../server-python/appwrite/services/locale.py | 77 - .../appwrite/services/storage.py | 108 - .../server-python/appwrite/services/teams.py | 109 - .../server-python/appwrite/services/users.py | 136 - .../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 - .../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 - .../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 | 14 - .../docs/examples/functions/create-tag.md | 14 - .../docs/examples/functions/create.md | 14 - .../docs/examples/functions/delete-tag.md | 14 - .../docs/examples/functions/delete.md | 14 - .../docs/examples/functions/get-execution.md | 14 - .../docs/examples/functions/get-tag.md | 14 - .../docs/examples/functions/get.md | 14 - .../examples/functions/list-executions.md | 14 - .../docs/examples/functions/list-tags.md | 14 - .../docs/examples/functions/list.md | 14 - .../docs/examples/functions/update-tag.md | 14 - .../docs/examples/functions/update.md | 14 - .../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 - .../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 - .../docs/examples/locale/get-languages.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/delete-user.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 | 31 - 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-initials.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 - .../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 - .../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-tag.md | 15 - .../docs/examples/functions/update.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 - .../docs/examples/locale/get-languages.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/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 - .../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 | 111 - .../lib/appwrite/services/database.rb | 158 - .../lib/appwrite/services/functions.rb | 192 - .../lib/appwrite/services/health.rb | 141 - .../lib/appwrite/services/locale.rb | 86 - .../lib/appwrite/services/storage.rb | 118 - .../lib/appwrite/services/teams.rb | 119 - .../lib/appwrite/services/users.rb | 149 - 1389 files changed, 62380 deletions(-) delete mode 100644 app/sdks/0.6.2/client-flutter/CHANGELOG.md delete mode 100644 app/sdks/0.6.2/client-flutter/LICENSE delete mode 100644 app/sdks/0.6.2/client-flutter/README.md delete mode 100644 app/sdks/0.6.2/client-flutter/docs/examples/account/create-o-auth2session.md delete mode 100644 app/sdks/0.6.2/client-flutter/docs/examples/account/create-recovery.md delete mode 100644 app/sdks/0.6.2/client-flutter/docs/examples/account/create-session.md delete mode 100644 app/sdks/0.6.2/client-flutter/docs/examples/account/create-verification.md delete mode 100644 app/sdks/0.6.2/client-flutter/docs/examples/account/create.md delete mode 100644 app/sdks/0.6.2/client-flutter/docs/examples/account/delete-session.md delete mode 100644 app/sdks/0.6.2/client-flutter/docs/examples/account/delete-sessions.md delete mode 100644 app/sdks/0.6.2/client-flutter/docs/examples/account/delete.md delete mode 100644 app/sdks/0.6.2/client-flutter/docs/examples/account/get-logs.md delete mode 100644 app/sdks/0.6.2/client-flutter/docs/examples/account/get-prefs.md delete mode 100644 app/sdks/0.6.2/client-flutter/docs/examples/account/get-sessions.md delete mode 100644 app/sdks/0.6.2/client-flutter/docs/examples/account/get.md delete mode 100644 app/sdks/0.6.2/client-flutter/docs/examples/account/update-email.md delete mode 100644 app/sdks/0.6.2/client-flutter/docs/examples/account/update-name.md delete mode 100644 app/sdks/0.6.2/client-flutter/docs/examples/account/update-password.md delete mode 100644 app/sdks/0.6.2/client-flutter/docs/examples/account/update-prefs.md delete mode 100644 app/sdks/0.6.2/client-flutter/docs/examples/account/update-recovery.md delete mode 100644 app/sdks/0.6.2/client-flutter/docs/examples/account/update-verification.md delete mode 100644 app/sdks/0.6.2/client-flutter/docs/examples/avatars/get-browser.md delete mode 100644 app/sdks/0.6.2/client-flutter/docs/examples/avatars/get-credit-card.md delete mode 100644 app/sdks/0.6.2/client-flutter/docs/examples/avatars/get-favicon.md delete mode 100644 app/sdks/0.6.2/client-flutter/docs/examples/avatars/get-flag.md delete mode 100644 app/sdks/0.6.2/client-flutter/docs/examples/avatars/get-image.md delete mode 100644 app/sdks/0.6.2/client-flutter/docs/examples/avatars/get-initials.md delete mode 100644 app/sdks/0.6.2/client-flutter/docs/examples/avatars/get-q-r.md delete mode 100644 app/sdks/0.6.2/client-flutter/docs/examples/database/create-document.md delete mode 100644 app/sdks/0.6.2/client-flutter/docs/examples/database/delete-document.md delete mode 100644 app/sdks/0.6.2/client-flutter/docs/examples/database/get-document.md delete mode 100644 app/sdks/0.6.2/client-flutter/docs/examples/database/list-documents.md delete mode 100644 app/sdks/0.6.2/client-flutter/docs/examples/database/update-document.md delete mode 100644 app/sdks/0.6.2/client-flutter/docs/examples/locale/get-continents.md delete mode 100644 app/sdks/0.6.2/client-flutter/docs/examples/locale/get-countries-e-u.md delete mode 100644 app/sdks/0.6.2/client-flutter/docs/examples/locale/get-countries-phones.md delete mode 100644 app/sdks/0.6.2/client-flutter/docs/examples/locale/get-countries.md delete mode 100644 app/sdks/0.6.2/client-flutter/docs/examples/locale/get-currencies.md delete mode 100644 app/sdks/0.6.2/client-flutter/docs/examples/locale/get-languages.md delete mode 100644 app/sdks/0.6.2/client-flutter/docs/examples/locale/get.md delete mode 100644 app/sdks/0.6.2/client-flutter/docs/examples/storage/create-file.md delete mode 100644 app/sdks/0.6.2/client-flutter/docs/examples/storage/delete-file.md delete mode 100644 app/sdks/0.6.2/client-flutter/docs/examples/storage/get-file-download.md delete mode 100644 app/sdks/0.6.2/client-flutter/docs/examples/storage/get-file-preview.md delete mode 100644 app/sdks/0.6.2/client-flutter/docs/examples/storage/get-file-view.md delete mode 100644 app/sdks/0.6.2/client-flutter/docs/examples/storage/get-file.md delete mode 100644 app/sdks/0.6.2/client-flutter/docs/examples/storage/list-files.md delete mode 100644 app/sdks/0.6.2/client-flutter/docs/examples/storage/update-file.md delete mode 100644 app/sdks/0.6.2/client-flutter/docs/examples/teams/create-membership.md delete mode 100644 app/sdks/0.6.2/client-flutter/docs/examples/teams/create.md delete mode 100644 app/sdks/0.6.2/client-flutter/docs/examples/teams/delete-membership.md delete mode 100644 app/sdks/0.6.2/client-flutter/docs/examples/teams/delete.md delete mode 100644 app/sdks/0.6.2/client-flutter/docs/examples/teams/get-memberships.md delete mode 100644 app/sdks/0.6.2/client-flutter/docs/examples/teams/get.md delete mode 100644 app/sdks/0.6.2/client-flutter/docs/examples/teams/list.md delete mode 100644 app/sdks/0.6.2/client-flutter/docs/examples/teams/update-membership-status.md delete mode 100644 app/sdks/0.6.2/client-flutter/docs/examples/teams/update.md delete mode 100644 app/sdks/0.6.2/client-flutter/example/README.md delete mode 100644 app/sdks/0.6.2/client-flutter/lib/appwrite.dart delete mode 100644 app/sdks/0.6.2/client-flutter/lib/client.dart delete mode 100644 app/sdks/0.6.2/client-flutter/lib/enums.dart delete mode 100644 app/sdks/0.6.2/client-flutter/lib/service.dart delete mode 100644 app/sdks/0.6.2/client-flutter/lib/services/account.dart delete mode 100644 app/sdks/0.6.2/client-flutter/lib/services/avatars.dart delete mode 100644 app/sdks/0.6.2/client-flutter/lib/services/database.dart delete mode 100644 app/sdks/0.6.2/client-flutter/lib/services/locale.dart delete mode 100644 app/sdks/0.6.2/client-flutter/lib/services/storage.dart delete mode 100644 app/sdks/0.6.2/client-flutter/lib/services/teams.dart delete mode 100644 app/sdks/0.6.2/client-flutter/pubspec.yaml delete mode 100644 app/sdks/0.6.2/client-web/CHANGELOG.md delete mode 100644 app/sdks/0.6.2/client-web/LICENSE delete mode 100644 app/sdks/0.6.2/client-web/README.md delete mode 100644 app/sdks/0.6.2/client-web/docs/examples/account/create-o-auth2session.md delete mode 100644 app/sdks/0.6.2/client-web/docs/examples/account/create-recovery.md delete mode 100644 app/sdks/0.6.2/client-web/docs/examples/account/create-session.md delete mode 100644 app/sdks/0.6.2/client-web/docs/examples/account/create-verification.md delete mode 100644 app/sdks/0.6.2/client-web/docs/examples/account/create.md delete mode 100644 app/sdks/0.6.2/client-web/docs/examples/account/delete-session.md delete mode 100644 app/sdks/0.6.2/client-web/docs/examples/account/delete-sessions.md delete mode 100644 app/sdks/0.6.2/client-web/docs/examples/account/delete.md delete mode 100644 app/sdks/0.6.2/client-web/docs/examples/account/get-logs.md delete mode 100644 app/sdks/0.6.2/client-web/docs/examples/account/get-prefs.md delete mode 100644 app/sdks/0.6.2/client-web/docs/examples/account/get-sessions.md delete mode 100644 app/sdks/0.6.2/client-web/docs/examples/account/get.md delete mode 100644 app/sdks/0.6.2/client-web/docs/examples/account/update-email.md delete mode 100644 app/sdks/0.6.2/client-web/docs/examples/account/update-name.md delete mode 100644 app/sdks/0.6.2/client-web/docs/examples/account/update-password.md delete mode 100644 app/sdks/0.6.2/client-web/docs/examples/account/update-prefs.md delete mode 100644 app/sdks/0.6.2/client-web/docs/examples/account/update-recovery.md delete mode 100644 app/sdks/0.6.2/client-web/docs/examples/account/update-verification.md delete mode 100644 app/sdks/0.6.2/client-web/docs/examples/avatars/get-browser.md delete mode 100644 app/sdks/0.6.2/client-web/docs/examples/avatars/get-credit-card.md delete mode 100644 app/sdks/0.6.2/client-web/docs/examples/avatars/get-favicon.md delete mode 100644 app/sdks/0.6.2/client-web/docs/examples/avatars/get-flag.md delete mode 100644 app/sdks/0.6.2/client-web/docs/examples/avatars/get-image.md delete mode 100644 app/sdks/0.6.2/client-web/docs/examples/avatars/get-initials.md delete mode 100644 app/sdks/0.6.2/client-web/docs/examples/avatars/get-q-r.md delete mode 100644 app/sdks/0.6.2/client-web/docs/examples/database/create-document.md delete mode 100644 app/sdks/0.6.2/client-web/docs/examples/database/delete-document.md delete mode 100644 app/sdks/0.6.2/client-web/docs/examples/database/get-document.md delete mode 100644 app/sdks/0.6.2/client-web/docs/examples/database/list-documents.md delete mode 100644 app/sdks/0.6.2/client-web/docs/examples/database/update-document.md delete mode 100644 app/sdks/0.6.2/client-web/docs/examples/locale/get-continents.md delete mode 100644 app/sdks/0.6.2/client-web/docs/examples/locale/get-countries-e-u.md delete mode 100644 app/sdks/0.6.2/client-web/docs/examples/locale/get-countries-phones.md delete mode 100644 app/sdks/0.6.2/client-web/docs/examples/locale/get-countries.md delete mode 100644 app/sdks/0.6.2/client-web/docs/examples/locale/get-currencies.md delete mode 100644 app/sdks/0.6.2/client-web/docs/examples/locale/get-languages.md delete mode 100644 app/sdks/0.6.2/client-web/docs/examples/locale/get.md delete mode 100644 app/sdks/0.6.2/client-web/docs/examples/storage/create-file.md delete mode 100644 app/sdks/0.6.2/client-web/docs/examples/storage/delete-file.md delete mode 100644 app/sdks/0.6.2/client-web/docs/examples/storage/get-file-download.md delete mode 100644 app/sdks/0.6.2/client-web/docs/examples/storage/get-file-preview.md delete mode 100644 app/sdks/0.6.2/client-web/docs/examples/storage/get-file-view.md delete mode 100644 app/sdks/0.6.2/client-web/docs/examples/storage/get-file.md delete mode 100644 app/sdks/0.6.2/client-web/docs/examples/storage/list-files.md delete mode 100644 app/sdks/0.6.2/client-web/docs/examples/storage/update-file.md delete mode 100644 app/sdks/0.6.2/client-web/docs/examples/teams/create-membership.md delete mode 100644 app/sdks/0.6.2/client-web/docs/examples/teams/create.md delete mode 100644 app/sdks/0.6.2/client-web/docs/examples/teams/delete-membership.md delete mode 100644 app/sdks/0.6.2/client-web/docs/examples/teams/delete.md delete mode 100644 app/sdks/0.6.2/client-web/docs/examples/teams/get-memberships.md delete mode 100644 app/sdks/0.6.2/client-web/docs/examples/teams/get.md delete mode 100644 app/sdks/0.6.2/client-web/docs/examples/teams/list.md delete mode 100644 app/sdks/0.6.2/client-web/docs/examples/teams/update-membership-status.md delete mode 100644 app/sdks/0.6.2/client-web/docs/examples/teams/update.md delete mode 100644 app/sdks/0.6.2/client-web/package.json delete mode 100644 app/sdks/0.6.2/client-web/src/sdk.js delete mode 100644 app/sdks/0.6.2/client-web/src/sdk.min.js delete mode 100644 app/sdks/0.6.2/client-web/tsconfig.json delete mode 100644 app/sdks/0.6.2/client-web/types/index.d.ts delete mode 100644 app/sdks/0.6.2/console-web/CHANGELOG.md delete mode 100644 app/sdks/0.6.2/console-web/LICENSE delete mode 100644 app/sdks/0.6.2/console-web/README.md delete mode 100644 app/sdks/0.6.2/console-web/docs/examples/account/create-o-auth2session.md delete mode 100644 app/sdks/0.6.2/console-web/docs/examples/account/create-recovery.md delete mode 100644 app/sdks/0.6.2/console-web/docs/examples/account/create-session.md delete mode 100644 app/sdks/0.6.2/console-web/docs/examples/account/create-verification.md delete mode 100644 app/sdks/0.6.2/console-web/docs/examples/account/create.md delete mode 100644 app/sdks/0.6.2/console-web/docs/examples/account/delete-session.md delete mode 100644 app/sdks/0.6.2/console-web/docs/examples/account/delete-sessions.md delete mode 100644 app/sdks/0.6.2/console-web/docs/examples/account/delete.md delete mode 100644 app/sdks/0.6.2/console-web/docs/examples/account/get-logs.md delete mode 100644 app/sdks/0.6.2/console-web/docs/examples/account/get-prefs.md delete mode 100644 app/sdks/0.6.2/console-web/docs/examples/account/get-sessions.md delete mode 100644 app/sdks/0.6.2/console-web/docs/examples/account/get.md delete mode 100644 app/sdks/0.6.2/console-web/docs/examples/account/update-email.md delete mode 100644 app/sdks/0.6.2/console-web/docs/examples/account/update-name.md delete mode 100644 app/sdks/0.6.2/console-web/docs/examples/account/update-password.md delete mode 100644 app/sdks/0.6.2/console-web/docs/examples/account/update-prefs.md delete mode 100644 app/sdks/0.6.2/console-web/docs/examples/account/update-recovery.md delete mode 100644 app/sdks/0.6.2/console-web/docs/examples/account/update-verification.md delete mode 100644 app/sdks/0.6.2/console-web/docs/examples/avatars/get-browser.md delete mode 100644 app/sdks/0.6.2/console-web/docs/examples/avatars/get-credit-card.md delete mode 100644 app/sdks/0.6.2/console-web/docs/examples/avatars/get-favicon.md delete mode 100644 app/sdks/0.6.2/console-web/docs/examples/avatars/get-flag.md delete mode 100644 app/sdks/0.6.2/console-web/docs/examples/avatars/get-image.md delete mode 100644 app/sdks/0.6.2/console-web/docs/examples/avatars/get-initials.md delete mode 100644 app/sdks/0.6.2/console-web/docs/examples/avatars/get-q-r.md delete mode 100644 app/sdks/0.6.2/console-web/docs/examples/bar/delete.md delete mode 100644 app/sdks/0.6.2/console-web/docs/examples/bar/get.md delete mode 100644 app/sdks/0.6.2/console-web/docs/examples/bar/patch.md delete mode 100644 app/sdks/0.6.2/console-web/docs/examples/bar/post.md delete mode 100644 app/sdks/0.6.2/console-web/docs/examples/bar/put.md delete mode 100644 app/sdks/0.6.2/console-web/docs/examples/database/create-collection.md delete mode 100644 app/sdks/0.6.2/console-web/docs/examples/database/create-document.md delete mode 100644 app/sdks/0.6.2/console-web/docs/examples/database/delete-collection.md delete mode 100644 app/sdks/0.6.2/console-web/docs/examples/database/delete-document.md delete mode 100644 app/sdks/0.6.2/console-web/docs/examples/database/get-collection.md delete mode 100644 app/sdks/0.6.2/console-web/docs/examples/database/get-document.md delete mode 100644 app/sdks/0.6.2/console-web/docs/examples/database/list-collections.md delete mode 100644 app/sdks/0.6.2/console-web/docs/examples/database/list-documents.md delete mode 100644 app/sdks/0.6.2/console-web/docs/examples/database/update-collection.md delete mode 100644 app/sdks/0.6.2/console-web/docs/examples/database/update-document.md delete mode 100644 app/sdks/0.6.2/console-web/docs/examples/foo/delete.md delete mode 100644 app/sdks/0.6.2/console-web/docs/examples/foo/get.md delete mode 100644 app/sdks/0.6.2/console-web/docs/examples/foo/patch.md delete mode 100644 app/sdks/0.6.2/console-web/docs/examples/foo/post.md delete mode 100644 app/sdks/0.6.2/console-web/docs/examples/foo/put.md delete mode 100644 app/sdks/0.6.2/console-web/docs/examples/general/empty.md delete mode 100644 app/sdks/0.6.2/console-web/docs/examples/general/get-cookie.md delete mode 100644 app/sdks/0.6.2/console-web/docs/examples/general/redirect.md delete mode 100644 app/sdks/0.6.2/console-web/docs/examples/general/redirected.md delete mode 100644 app/sdks/0.6.2/console-web/docs/examples/general/set-cookie.md delete mode 100644 app/sdks/0.6.2/console-web/docs/examples/general/upload.md delete mode 100644 app/sdks/0.6.2/console-web/docs/examples/health/get-anti-virus.md delete mode 100644 app/sdks/0.6.2/console-web/docs/examples/health/get-cache.md delete mode 100644 app/sdks/0.6.2/console-web/docs/examples/health/get-d-b.md delete mode 100644 app/sdks/0.6.2/console-web/docs/examples/health/get-queue-certificates.md delete mode 100644 app/sdks/0.6.2/console-web/docs/examples/health/get-queue-functions.md delete mode 100644 app/sdks/0.6.2/console-web/docs/examples/health/get-queue-logs.md delete mode 100644 app/sdks/0.6.2/console-web/docs/examples/health/get-queue-tasks.md delete mode 100644 app/sdks/0.6.2/console-web/docs/examples/health/get-queue-usage.md delete mode 100644 app/sdks/0.6.2/console-web/docs/examples/health/get-queue-webhooks.md delete mode 100644 app/sdks/0.6.2/console-web/docs/examples/health/get-storage-local.md delete mode 100644 app/sdks/0.6.2/console-web/docs/examples/health/get-time.md delete mode 100644 app/sdks/0.6.2/console-web/docs/examples/health/get.md delete mode 100644 app/sdks/0.6.2/console-web/docs/examples/locale/get-continents.md delete mode 100644 app/sdks/0.6.2/console-web/docs/examples/locale/get-countries-e-u.md delete mode 100644 app/sdks/0.6.2/console-web/docs/examples/locale/get-countries-phones.md delete mode 100644 app/sdks/0.6.2/console-web/docs/examples/locale/get-countries.md delete mode 100644 app/sdks/0.6.2/console-web/docs/examples/locale/get-currencies.md delete mode 100644 app/sdks/0.6.2/console-web/docs/examples/locale/get-languages.md delete mode 100644 app/sdks/0.6.2/console-web/docs/examples/locale/get.md delete mode 100644 app/sdks/0.6.2/console-web/docs/examples/projects/create-domain.md delete mode 100644 app/sdks/0.6.2/console-web/docs/examples/projects/create-key.md delete mode 100644 app/sdks/0.6.2/console-web/docs/examples/projects/create-platform.md delete mode 100644 app/sdks/0.6.2/console-web/docs/examples/projects/create-task.md delete mode 100644 app/sdks/0.6.2/console-web/docs/examples/projects/create-webhook.md delete mode 100644 app/sdks/0.6.2/console-web/docs/examples/projects/create.md delete mode 100644 app/sdks/0.6.2/console-web/docs/examples/projects/delete-domain.md delete mode 100644 app/sdks/0.6.2/console-web/docs/examples/projects/delete-key.md delete mode 100644 app/sdks/0.6.2/console-web/docs/examples/projects/delete-platform.md delete mode 100644 app/sdks/0.6.2/console-web/docs/examples/projects/delete-task.md delete mode 100644 app/sdks/0.6.2/console-web/docs/examples/projects/delete-webhook.md delete mode 100644 app/sdks/0.6.2/console-web/docs/examples/projects/delete.md delete mode 100644 app/sdks/0.6.2/console-web/docs/examples/projects/get-domain.md delete mode 100644 app/sdks/0.6.2/console-web/docs/examples/projects/get-key.md delete mode 100644 app/sdks/0.6.2/console-web/docs/examples/projects/get-platform.md delete mode 100644 app/sdks/0.6.2/console-web/docs/examples/projects/get-task.md delete mode 100644 app/sdks/0.6.2/console-web/docs/examples/projects/get-usage.md delete mode 100644 app/sdks/0.6.2/console-web/docs/examples/projects/get-webhook.md delete mode 100644 app/sdks/0.6.2/console-web/docs/examples/projects/get.md delete mode 100644 app/sdks/0.6.2/console-web/docs/examples/projects/list-domains.md delete mode 100644 app/sdks/0.6.2/console-web/docs/examples/projects/list-keys.md delete mode 100644 app/sdks/0.6.2/console-web/docs/examples/projects/list-platforms.md delete mode 100644 app/sdks/0.6.2/console-web/docs/examples/projects/list-tasks.md delete mode 100644 app/sdks/0.6.2/console-web/docs/examples/projects/list-webhooks.md delete mode 100644 app/sdks/0.6.2/console-web/docs/examples/projects/list.md delete mode 100644 app/sdks/0.6.2/console-web/docs/examples/projects/update-domain-verification.md delete mode 100644 app/sdks/0.6.2/console-web/docs/examples/projects/update-key.md delete mode 100644 app/sdks/0.6.2/console-web/docs/examples/projects/update-o-auth2.md delete mode 100644 app/sdks/0.6.2/console-web/docs/examples/projects/update-platform.md delete mode 100644 app/sdks/0.6.2/console-web/docs/examples/projects/update-task.md delete mode 100644 app/sdks/0.6.2/console-web/docs/examples/projects/update-webhook.md delete mode 100644 app/sdks/0.6.2/console-web/docs/examples/projects/update.md delete mode 100644 app/sdks/0.6.2/console-web/docs/examples/storage/create-file.md delete mode 100644 app/sdks/0.6.2/console-web/docs/examples/storage/delete-file.md delete mode 100644 app/sdks/0.6.2/console-web/docs/examples/storage/get-file-download.md delete mode 100644 app/sdks/0.6.2/console-web/docs/examples/storage/get-file-preview.md delete mode 100644 app/sdks/0.6.2/console-web/docs/examples/storage/get-file-view.md delete mode 100644 app/sdks/0.6.2/console-web/docs/examples/storage/get-file.md delete mode 100644 app/sdks/0.6.2/console-web/docs/examples/storage/list-files.md delete mode 100644 app/sdks/0.6.2/console-web/docs/examples/storage/update-file.md delete mode 100644 app/sdks/0.6.2/console-web/docs/examples/teams/create-membership.md delete mode 100644 app/sdks/0.6.2/console-web/docs/examples/teams/create.md delete mode 100644 app/sdks/0.6.2/console-web/docs/examples/teams/delete-membership.md delete mode 100644 app/sdks/0.6.2/console-web/docs/examples/teams/delete.md delete mode 100644 app/sdks/0.6.2/console-web/docs/examples/teams/get-memberships.md delete mode 100644 app/sdks/0.6.2/console-web/docs/examples/teams/get.md delete mode 100644 app/sdks/0.6.2/console-web/docs/examples/teams/list.md delete mode 100644 app/sdks/0.6.2/console-web/docs/examples/teams/update-membership-status.md delete mode 100644 app/sdks/0.6.2/console-web/docs/examples/teams/update.md delete mode 100644 app/sdks/0.6.2/console-web/docs/examples/users/create.md delete mode 100644 app/sdks/0.6.2/console-web/docs/examples/users/delete-session.md delete mode 100644 app/sdks/0.6.2/console-web/docs/examples/users/delete-sessions.md delete mode 100644 app/sdks/0.6.2/console-web/docs/examples/users/get-logs.md delete mode 100644 app/sdks/0.6.2/console-web/docs/examples/users/get-prefs.md delete mode 100644 app/sdks/0.6.2/console-web/docs/examples/users/get-sessions.md delete mode 100644 app/sdks/0.6.2/console-web/docs/examples/users/get.md delete mode 100644 app/sdks/0.6.2/console-web/docs/examples/users/list.md delete mode 100644 app/sdks/0.6.2/console-web/docs/examples/users/update-prefs.md delete mode 100644 app/sdks/0.6.2/console-web/docs/examples/users/update-status.md delete mode 100644 app/sdks/0.6.2/console-web/package.json delete mode 100644 app/sdks/0.6.2/console-web/src/sdk.js delete mode 100644 app/sdks/0.6.2/console-web/src/sdk.min.js delete mode 100644 app/sdks/0.6.2/console-web/tsconfig.json delete mode 100644 app/sdks/0.6.2/console-web/types/index.d.ts delete mode 100644 app/sdks/0.6.2/server-deno/CHANGELOG.md delete mode 100644 app/sdks/0.6.2/server-deno/LICENSE delete mode 100644 app/sdks/0.6.2/server-deno/README.md delete mode 100644 app/sdks/0.6.2/server-deno/docs/examples/avatars/get-browser.md delete mode 100644 app/sdks/0.6.2/server-deno/docs/examples/avatars/get-credit-card.md delete mode 100644 app/sdks/0.6.2/server-deno/docs/examples/avatars/get-favicon.md delete mode 100644 app/sdks/0.6.2/server-deno/docs/examples/avatars/get-flag.md delete mode 100644 app/sdks/0.6.2/server-deno/docs/examples/avatars/get-image.md delete mode 100644 app/sdks/0.6.2/server-deno/docs/examples/avatars/get-initials.md delete mode 100644 app/sdks/0.6.2/server-deno/docs/examples/avatars/get-q-r.md delete mode 100644 app/sdks/0.6.2/server-deno/docs/examples/database/create-collection.md delete mode 100644 app/sdks/0.6.2/server-deno/docs/examples/database/create-document.md delete mode 100644 app/sdks/0.6.2/server-deno/docs/examples/database/delete-collection.md delete mode 100644 app/sdks/0.6.2/server-deno/docs/examples/database/delete-document.md delete mode 100644 app/sdks/0.6.2/server-deno/docs/examples/database/get-collection.md delete mode 100644 app/sdks/0.6.2/server-deno/docs/examples/database/get-document.md delete mode 100644 app/sdks/0.6.2/server-deno/docs/examples/database/list-collections.md delete mode 100644 app/sdks/0.6.2/server-deno/docs/examples/database/list-documents.md delete mode 100644 app/sdks/0.6.2/server-deno/docs/examples/database/update-collection.md delete mode 100644 app/sdks/0.6.2/server-deno/docs/examples/database/update-document.md delete mode 100644 app/sdks/0.6.2/server-deno/docs/examples/health/get-anti-virus.md delete mode 100644 app/sdks/0.6.2/server-deno/docs/examples/health/get-cache.md delete mode 100644 app/sdks/0.6.2/server-deno/docs/examples/health/get-d-b.md delete mode 100644 app/sdks/0.6.2/server-deno/docs/examples/health/get-queue-certificates.md delete mode 100644 app/sdks/0.6.2/server-deno/docs/examples/health/get-queue-functions.md delete mode 100644 app/sdks/0.6.2/server-deno/docs/examples/health/get-queue-logs.md delete mode 100644 app/sdks/0.6.2/server-deno/docs/examples/health/get-queue-tasks.md delete mode 100644 app/sdks/0.6.2/server-deno/docs/examples/health/get-queue-usage.md delete mode 100644 app/sdks/0.6.2/server-deno/docs/examples/health/get-queue-webhooks.md delete mode 100644 app/sdks/0.6.2/server-deno/docs/examples/health/get-storage-local.md delete mode 100644 app/sdks/0.6.2/server-deno/docs/examples/health/get-time.md delete mode 100644 app/sdks/0.6.2/server-deno/docs/examples/health/get.md delete mode 100644 app/sdks/0.6.2/server-deno/docs/examples/locale/get-continents.md delete mode 100644 app/sdks/0.6.2/server-deno/docs/examples/locale/get-countries-e-u.md delete mode 100644 app/sdks/0.6.2/server-deno/docs/examples/locale/get-countries-phones.md delete mode 100644 app/sdks/0.6.2/server-deno/docs/examples/locale/get-countries.md delete mode 100644 app/sdks/0.6.2/server-deno/docs/examples/locale/get-currencies.md delete mode 100644 app/sdks/0.6.2/server-deno/docs/examples/locale/get-languages.md delete mode 100644 app/sdks/0.6.2/server-deno/docs/examples/locale/get.md delete mode 100644 app/sdks/0.6.2/server-deno/docs/examples/storage/create-file.md delete mode 100644 app/sdks/0.6.2/server-deno/docs/examples/storage/delete-file.md delete mode 100644 app/sdks/0.6.2/server-deno/docs/examples/storage/get-file-download.md delete mode 100644 app/sdks/0.6.2/server-deno/docs/examples/storage/get-file-preview.md delete mode 100644 app/sdks/0.6.2/server-deno/docs/examples/storage/get-file-view.md delete mode 100644 app/sdks/0.6.2/server-deno/docs/examples/storage/get-file.md delete mode 100644 app/sdks/0.6.2/server-deno/docs/examples/storage/list-files.md delete mode 100644 app/sdks/0.6.2/server-deno/docs/examples/storage/update-file.md delete mode 100644 app/sdks/0.6.2/server-deno/docs/examples/teams/create-membership.md delete mode 100644 app/sdks/0.6.2/server-deno/docs/examples/teams/create.md delete mode 100644 app/sdks/0.6.2/server-deno/docs/examples/teams/delete-membership.md delete mode 100644 app/sdks/0.6.2/server-deno/docs/examples/teams/delete.md delete mode 100644 app/sdks/0.6.2/server-deno/docs/examples/teams/get-memberships.md delete mode 100644 app/sdks/0.6.2/server-deno/docs/examples/teams/get.md delete mode 100644 app/sdks/0.6.2/server-deno/docs/examples/teams/list.md delete mode 100644 app/sdks/0.6.2/server-deno/docs/examples/teams/update.md delete mode 100644 app/sdks/0.6.2/server-deno/docs/examples/users/create.md delete mode 100644 app/sdks/0.6.2/server-deno/docs/examples/users/delete-session.md delete mode 100644 app/sdks/0.6.2/server-deno/docs/examples/users/delete-sessions.md delete mode 100644 app/sdks/0.6.2/server-deno/docs/examples/users/get-logs.md delete mode 100644 app/sdks/0.6.2/server-deno/docs/examples/users/get-prefs.md delete mode 100644 app/sdks/0.6.2/server-deno/docs/examples/users/get-sessions.md delete mode 100644 app/sdks/0.6.2/server-deno/docs/examples/users/get.md delete mode 100644 app/sdks/0.6.2/server-deno/docs/examples/users/list.md delete mode 100644 app/sdks/0.6.2/server-deno/docs/examples/users/update-prefs.md delete mode 100644 app/sdks/0.6.2/server-deno/docs/examples/users/update-status.md delete mode 100644 app/sdks/0.6.2/server-deno/mod.ts delete mode 100644 app/sdks/0.6.2/server-deno/src/client.ts delete mode 100644 app/sdks/0.6.2/server-deno/src/service.ts delete mode 100644 app/sdks/0.6.2/server-deno/src/services/avatars.ts delete mode 100644 app/sdks/0.6.2/server-deno/src/services/database.ts delete mode 100644 app/sdks/0.6.2/server-deno/src/services/health.ts delete mode 100644 app/sdks/0.6.2/server-deno/src/services/locale.ts delete mode 100644 app/sdks/0.6.2/server-deno/src/services/storage.ts delete mode 100644 app/sdks/0.6.2/server-deno/src/services/teams.ts delete mode 100644 app/sdks/0.6.2/server-deno/src/services/users.ts delete mode 100644 app/sdks/0.6.2/server-nodejs/CHANGELOG.md delete mode 100644 app/sdks/0.6.2/server-nodejs/LICENSE delete mode 100644 app/sdks/0.6.2/server-nodejs/README.md delete mode 100644 app/sdks/0.6.2/server-nodejs/docs/examples/avatars/get-browser.md delete mode 100644 app/sdks/0.6.2/server-nodejs/docs/examples/avatars/get-credit-card.md delete mode 100644 app/sdks/0.6.2/server-nodejs/docs/examples/avatars/get-favicon.md delete mode 100644 app/sdks/0.6.2/server-nodejs/docs/examples/avatars/get-flag.md delete mode 100644 app/sdks/0.6.2/server-nodejs/docs/examples/avatars/get-image.md delete mode 100644 app/sdks/0.6.2/server-nodejs/docs/examples/avatars/get-initials.md delete mode 100644 app/sdks/0.6.2/server-nodejs/docs/examples/avatars/get-q-r.md delete mode 100644 app/sdks/0.6.2/server-nodejs/docs/examples/database/create-collection.md delete mode 100644 app/sdks/0.6.2/server-nodejs/docs/examples/database/create-document.md delete mode 100644 app/sdks/0.6.2/server-nodejs/docs/examples/database/delete-collection.md delete mode 100644 app/sdks/0.6.2/server-nodejs/docs/examples/database/delete-document.md delete mode 100644 app/sdks/0.6.2/server-nodejs/docs/examples/database/get-collection.md delete mode 100644 app/sdks/0.6.2/server-nodejs/docs/examples/database/get-document.md delete mode 100644 app/sdks/0.6.2/server-nodejs/docs/examples/database/list-collections.md delete mode 100644 app/sdks/0.6.2/server-nodejs/docs/examples/database/list-documents.md delete mode 100644 app/sdks/0.6.2/server-nodejs/docs/examples/database/update-collection.md delete mode 100644 app/sdks/0.6.2/server-nodejs/docs/examples/database/update-document.md delete mode 100644 app/sdks/0.6.2/server-nodejs/docs/examples/health/get-anti-virus.md delete mode 100644 app/sdks/0.6.2/server-nodejs/docs/examples/health/get-cache.md delete mode 100644 app/sdks/0.6.2/server-nodejs/docs/examples/health/get-d-b.md delete mode 100644 app/sdks/0.6.2/server-nodejs/docs/examples/health/get-queue-certificates.md delete mode 100644 app/sdks/0.6.2/server-nodejs/docs/examples/health/get-queue-functions.md delete mode 100644 app/sdks/0.6.2/server-nodejs/docs/examples/health/get-queue-logs.md delete mode 100644 app/sdks/0.6.2/server-nodejs/docs/examples/health/get-queue-tasks.md delete mode 100644 app/sdks/0.6.2/server-nodejs/docs/examples/health/get-queue-usage.md delete mode 100644 app/sdks/0.6.2/server-nodejs/docs/examples/health/get-queue-webhooks.md delete mode 100644 app/sdks/0.6.2/server-nodejs/docs/examples/health/get-storage-local.md delete mode 100644 app/sdks/0.6.2/server-nodejs/docs/examples/health/get-time.md delete mode 100644 app/sdks/0.6.2/server-nodejs/docs/examples/health/get.md delete mode 100644 app/sdks/0.6.2/server-nodejs/docs/examples/locale/get-continents.md delete mode 100644 app/sdks/0.6.2/server-nodejs/docs/examples/locale/get-countries-e-u.md delete mode 100644 app/sdks/0.6.2/server-nodejs/docs/examples/locale/get-countries-phones.md delete mode 100644 app/sdks/0.6.2/server-nodejs/docs/examples/locale/get-countries.md delete mode 100644 app/sdks/0.6.2/server-nodejs/docs/examples/locale/get-currencies.md delete mode 100644 app/sdks/0.6.2/server-nodejs/docs/examples/locale/get-languages.md delete mode 100644 app/sdks/0.6.2/server-nodejs/docs/examples/locale/get.md delete mode 100644 app/sdks/0.6.2/server-nodejs/docs/examples/storage/create-file.md delete mode 100644 app/sdks/0.6.2/server-nodejs/docs/examples/storage/delete-file.md delete mode 100644 app/sdks/0.6.2/server-nodejs/docs/examples/storage/get-file-download.md delete mode 100644 app/sdks/0.6.2/server-nodejs/docs/examples/storage/get-file-preview.md delete mode 100644 app/sdks/0.6.2/server-nodejs/docs/examples/storage/get-file-view.md delete mode 100644 app/sdks/0.6.2/server-nodejs/docs/examples/storage/get-file.md delete mode 100644 app/sdks/0.6.2/server-nodejs/docs/examples/storage/list-files.md delete mode 100644 app/sdks/0.6.2/server-nodejs/docs/examples/storage/update-file.md delete mode 100644 app/sdks/0.6.2/server-nodejs/docs/examples/teams/create-membership.md delete mode 100644 app/sdks/0.6.2/server-nodejs/docs/examples/teams/create.md delete mode 100644 app/sdks/0.6.2/server-nodejs/docs/examples/teams/delete-membership.md delete mode 100644 app/sdks/0.6.2/server-nodejs/docs/examples/teams/delete.md delete mode 100644 app/sdks/0.6.2/server-nodejs/docs/examples/teams/get-memberships.md delete mode 100644 app/sdks/0.6.2/server-nodejs/docs/examples/teams/get.md delete mode 100644 app/sdks/0.6.2/server-nodejs/docs/examples/teams/list.md delete mode 100644 app/sdks/0.6.2/server-nodejs/docs/examples/teams/update.md delete mode 100644 app/sdks/0.6.2/server-nodejs/docs/examples/users/create.md delete mode 100644 app/sdks/0.6.2/server-nodejs/docs/examples/users/delete-session.md delete mode 100644 app/sdks/0.6.2/server-nodejs/docs/examples/users/delete-sessions.md delete mode 100644 app/sdks/0.6.2/server-nodejs/docs/examples/users/get-logs.md delete mode 100644 app/sdks/0.6.2/server-nodejs/docs/examples/users/get-prefs.md delete mode 100644 app/sdks/0.6.2/server-nodejs/docs/examples/users/get-sessions.md delete mode 100644 app/sdks/0.6.2/server-nodejs/docs/examples/users/get.md delete mode 100644 app/sdks/0.6.2/server-nodejs/docs/examples/users/list.md delete mode 100644 app/sdks/0.6.2/server-nodejs/docs/examples/users/update-prefs.md delete mode 100644 app/sdks/0.6.2/server-nodejs/docs/examples/users/update-status.md delete mode 100644 app/sdks/0.6.2/server-nodejs/index.js delete mode 100644 app/sdks/0.6.2/server-nodejs/lib/client.js delete mode 100644 app/sdks/0.6.2/server-nodejs/lib/service.js delete mode 100644 app/sdks/0.6.2/server-nodejs/lib/services/avatars.js delete mode 100644 app/sdks/0.6.2/server-nodejs/lib/services/database.js delete mode 100644 app/sdks/0.6.2/server-nodejs/lib/services/health.js delete mode 100644 app/sdks/0.6.2/server-nodejs/lib/services/locale.js delete mode 100644 app/sdks/0.6.2/server-nodejs/lib/services/storage.js delete mode 100644 app/sdks/0.6.2/server-nodejs/lib/services/teams.js delete mode 100644 app/sdks/0.6.2/server-nodejs/lib/services/users.js delete mode 100644 app/sdks/0.6.2/server-nodejs/package.json delete mode 100644 app/sdks/0.6.2/server-php/CHANGELOG.md delete mode 100644 app/sdks/0.6.2/server-php/LICENSE delete mode 100644 app/sdks/0.6.2/server-php/README.md delete mode 100644 app/sdks/0.6.2/server-php/composer.json delete mode 100644 app/sdks/0.6.2/server-php/docs/avatars.md delete mode 100644 app/sdks/0.6.2/server-php/docs/database.md delete mode 100644 app/sdks/0.6.2/server-php/docs/examples/avatars/get-browser.md delete mode 100644 app/sdks/0.6.2/server-php/docs/examples/avatars/get-credit-card.md delete mode 100644 app/sdks/0.6.2/server-php/docs/examples/avatars/get-favicon.md delete mode 100644 app/sdks/0.6.2/server-php/docs/examples/avatars/get-flag.md delete mode 100644 app/sdks/0.6.2/server-php/docs/examples/avatars/get-image.md delete mode 100644 app/sdks/0.6.2/server-php/docs/examples/avatars/get-initials.md delete mode 100644 app/sdks/0.6.2/server-php/docs/examples/avatars/get-q-r.md delete mode 100644 app/sdks/0.6.2/server-php/docs/examples/database/create-collection.md delete mode 100644 app/sdks/0.6.2/server-php/docs/examples/database/create-document.md delete mode 100644 app/sdks/0.6.2/server-php/docs/examples/database/delete-collection.md delete mode 100644 app/sdks/0.6.2/server-php/docs/examples/database/delete-document.md delete mode 100644 app/sdks/0.6.2/server-php/docs/examples/database/get-collection.md delete mode 100644 app/sdks/0.6.2/server-php/docs/examples/database/get-document.md delete mode 100644 app/sdks/0.6.2/server-php/docs/examples/database/list-collections.md delete mode 100644 app/sdks/0.6.2/server-php/docs/examples/database/list-documents.md delete mode 100644 app/sdks/0.6.2/server-php/docs/examples/database/update-collection.md delete mode 100644 app/sdks/0.6.2/server-php/docs/examples/database/update-document.md delete mode 100644 app/sdks/0.6.2/server-php/docs/examples/health/get-anti-virus.md delete mode 100644 app/sdks/0.6.2/server-php/docs/examples/health/get-cache.md delete mode 100644 app/sdks/0.6.2/server-php/docs/examples/health/get-d-b.md delete mode 100644 app/sdks/0.6.2/server-php/docs/examples/health/get-queue-certificates.md delete mode 100644 app/sdks/0.6.2/server-php/docs/examples/health/get-queue-functions.md delete mode 100644 app/sdks/0.6.2/server-php/docs/examples/health/get-queue-logs.md delete mode 100644 app/sdks/0.6.2/server-php/docs/examples/health/get-queue-tasks.md delete mode 100644 app/sdks/0.6.2/server-php/docs/examples/health/get-queue-usage.md delete mode 100644 app/sdks/0.6.2/server-php/docs/examples/health/get-queue-webhooks.md delete mode 100644 app/sdks/0.6.2/server-php/docs/examples/health/get-storage-local.md delete mode 100644 app/sdks/0.6.2/server-php/docs/examples/health/get-time.md delete mode 100644 app/sdks/0.6.2/server-php/docs/examples/health/get.md delete mode 100644 app/sdks/0.6.2/server-php/docs/examples/locale/get-continents.md delete mode 100644 app/sdks/0.6.2/server-php/docs/examples/locale/get-countries-e-u.md delete mode 100644 app/sdks/0.6.2/server-php/docs/examples/locale/get-countries-phones.md delete mode 100644 app/sdks/0.6.2/server-php/docs/examples/locale/get-countries.md delete mode 100644 app/sdks/0.6.2/server-php/docs/examples/locale/get-currencies.md delete mode 100644 app/sdks/0.6.2/server-php/docs/examples/locale/get-languages.md delete mode 100644 app/sdks/0.6.2/server-php/docs/examples/locale/get.md delete mode 100644 app/sdks/0.6.2/server-php/docs/examples/storage/create-file.md delete mode 100644 app/sdks/0.6.2/server-php/docs/examples/storage/delete-file.md delete mode 100644 app/sdks/0.6.2/server-php/docs/examples/storage/get-file-download.md delete mode 100644 app/sdks/0.6.2/server-php/docs/examples/storage/get-file-preview.md delete mode 100644 app/sdks/0.6.2/server-php/docs/examples/storage/get-file-view.md delete mode 100644 app/sdks/0.6.2/server-php/docs/examples/storage/get-file.md delete mode 100644 app/sdks/0.6.2/server-php/docs/examples/storage/list-files.md delete mode 100644 app/sdks/0.6.2/server-php/docs/examples/storage/update-file.md delete mode 100644 app/sdks/0.6.2/server-php/docs/examples/teams/create-membership.md delete mode 100644 app/sdks/0.6.2/server-php/docs/examples/teams/create.md delete mode 100644 app/sdks/0.6.2/server-php/docs/examples/teams/delete-membership.md delete mode 100644 app/sdks/0.6.2/server-php/docs/examples/teams/delete.md delete mode 100644 app/sdks/0.6.2/server-php/docs/examples/teams/get-memberships.md delete mode 100644 app/sdks/0.6.2/server-php/docs/examples/teams/get.md delete mode 100644 app/sdks/0.6.2/server-php/docs/examples/teams/list.md delete mode 100644 app/sdks/0.6.2/server-php/docs/examples/teams/update.md delete mode 100644 app/sdks/0.6.2/server-php/docs/examples/users/create.md delete mode 100644 app/sdks/0.6.2/server-php/docs/examples/users/delete-session.md delete mode 100644 app/sdks/0.6.2/server-php/docs/examples/users/delete-sessions.md delete mode 100644 app/sdks/0.6.2/server-php/docs/examples/users/get-logs.md delete mode 100644 app/sdks/0.6.2/server-php/docs/examples/users/get-prefs.md delete mode 100644 app/sdks/0.6.2/server-php/docs/examples/users/get-sessions.md delete mode 100644 app/sdks/0.6.2/server-php/docs/examples/users/get.md delete mode 100644 app/sdks/0.6.2/server-php/docs/examples/users/list.md delete mode 100644 app/sdks/0.6.2/server-php/docs/examples/users/update-prefs.md delete mode 100644 app/sdks/0.6.2/server-php/docs/examples/users/update-status.md delete mode 100644 app/sdks/0.6.2/server-php/docs/health.md delete mode 100644 app/sdks/0.6.2/server-php/docs/locale.md delete mode 100644 app/sdks/0.6.2/server-php/docs/storage.md delete mode 100644 app/sdks/0.6.2/server-php/docs/teams.md delete mode 100644 app/sdks/0.6.2/server-php/docs/users.md delete mode 100644 app/sdks/0.6.2/server-php/src/Appwrite/Client.php delete mode 100644 app/sdks/0.6.2/server-php/src/Appwrite/Service.php delete mode 100644 app/sdks/0.6.2/server-php/src/Appwrite/Services/Avatars.php delete mode 100644 app/sdks/0.6.2/server-php/src/Appwrite/Services/Database.php delete mode 100644 app/sdks/0.6.2/server-php/src/Appwrite/Services/Health.php delete mode 100644 app/sdks/0.6.2/server-php/src/Appwrite/Services/Locale.php delete mode 100644 app/sdks/0.6.2/server-php/src/Appwrite/Services/Storage.php delete mode 100644 app/sdks/0.6.2/server-php/src/Appwrite/Services/Teams.php delete mode 100644 app/sdks/0.6.2/server-php/src/Appwrite/Services/Users.php delete mode 100644 app/sdks/0.6.2/server-python/CHANGELOG.md delete mode 100644 app/sdks/0.6.2/server-python/LICENSE delete mode 100644 app/sdks/0.6.2/server-python/README.md delete mode 100644 app/sdks/0.6.2/server-python/appwrite/__init__.py delete mode 100644 app/sdks/0.6.2/server-python/appwrite/client.py delete mode 100644 app/sdks/0.6.2/server-python/appwrite/service.py delete mode 100644 app/sdks/0.6.2/server-python/appwrite/services/__init__.py delete mode 100644 app/sdks/0.6.2/server-python/appwrite/services/avatars.py delete mode 100644 app/sdks/0.6.2/server-python/appwrite/services/database.py delete mode 100644 app/sdks/0.6.2/server-python/appwrite/services/health.py delete mode 100644 app/sdks/0.6.2/server-python/appwrite/services/locale.py delete mode 100644 app/sdks/0.6.2/server-python/appwrite/services/storage.py delete mode 100644 app/sdks/0.6.2/server-python/appwrite/services/teams.py delete mode 100644 app/sdks/0.6.2/server-python/appwrite/services/users.py delete mode 100644 app/sdks/0.6.2/server-python/docs/examples/avatars/get-browser.md delete mode 100644 app/sdks/0.6.2/server-python/docs/examples/avatars/get-credit-card.md delete mode 100644 app/sdks/0.6.2/server-python/docs/examples/avatars/get-favicon.md delete mode 100644 app/sdks/0.6.2/server-python/docs/examples/avatars/get-flag.md delete mode 100644 app/sdks/0.6.2/server-python/docs/examples/avatars/get-image.md delete mode 100644 app/sdks/0.6.2/server-python/docs/examples/avatars/get-initials.md delete mode 100644 app/sdks/0.6.2/server-python/docs/examples/avatars/get-q-r.md delete mode 100644 app/sdks/0.6.2/server-python/docs/examples/database/create-collection.md delete mode 100644 app/sdks/0.6.2/server-python/docs/examples/database/create-document.md delete mode 100644 app/sdks/0.6.2/server-python/docs/examples/database/delete-collection.md delete mode 100644 app/sdks/0.6.2/server-python/docs/examples/database/delete-document.md delete mode 100644 app/sdks/0.6.2/server-python/docs/examples/database/get-collection.md delete mode 100644 app/sdks/0.6.2/server-python/docs/examples/database/get-document.md delete mode 100644 app/sdks/0.6.2/server-python/docs/examples/database/list-collections.md delete mode 100644 app/sdks/0.6.2/server-python/docs/examples/database/list-documents.md delete mode 100644 app/sdks/0.6.2/server-python/docs/examples/database/update-collection.md delete mode 100644 app/sdks/0.6.2/server-python/docs/examples/database/update-document.md delete mode 100644 app/sdks/0.6.2/server-python/docs/examples/health/get-anti-virus.md delete mode 100644 app/sdks/0.6.2/server-python/docs/examples/health/get-cache.md delete mode 100644 app/sdks/0.6.2/server-python/docs/examples/health/get-d-b.md delete mode 100644 app/sdks/0.6.2/server-python/docs/examples/health/get-queue-certificates.md delete mode 100644 app/sdks/0.6.2/server-python/docs/examples/health/get-queue-functions.md delete mode 100644 app/sdks/0.6.2/server-python/docs/examples/health/get-queue-logs.md delete mode 100644 app/sdks/0.6.2/server-python/docs/examples/health/get-queue-tasks.md delete mode 100644 app/sdks/0.6.2/server-python/docs/examples/health/get-queue-usage.md delete mode 100644 app/sdks/0.6.2/server-python/docs/examples/health/get-queue-webhooks.md delete mode 100644 app/sdks/0.6.2/server-python/docs/examples/health/get-storage-local.md delete mode 100644 app/sdks/0.6.2/server-python/docs/examples/health/get-time.md delete mode 100644 app/sdks/0.6.2/server-python/docs/examples/health/get.md delete mode 100644 app/sdks/0.6.2/server-python/docs/examples/locale/get-continents.md delete mode 100644 app/sdks/0.6.2/server-python/docs/examples/locale/get-countries-e-u.md delete mode 100644 app/sdks/0.6.2/server-python/docs/examples/locale/get-countries-phones.md delete mode 100644 app/sdks/0.6.2/server-python/docs/examples/locale/get-countries.md delete mode 100644 app/sdks/0.6.2/server-python/docs/examples/locale/get-currencies.md delete mode 100644 app/sdks/0.6.2/server-python/docs/examples/locale/get-languages.md delete mode 100644 app/sdks/0.6.2/server-python/docs/examples/locale/get.md delete mode 100644 app/sdks/0.6.2/server-python/docs/examples/storage/create-file.md delete mode 100644 app/sdks/0.6.2/server-python/docs/examples/storage/delete-file.md delete mode 100644 app/sdks/0.6.2/server-python/docs/examples/storage/get-file-download.md delete mode 100644 app/sdks/0.6.2/server-python/docs/examples/storage/get-file-preview.md delete mode 100644 app/sdks/0.6.2/server-python/docs/examples/storage/get-file-view.md delete mode 100644 app/sdks/0.6.2/server-python/docs/examples/storage/get-file.md delete mode 100644 app/sdks/0.6.2/server-python/docs/examples/storage/list-files.md delete mode 100644 app/sdks/0.6.2/server-python/docs/examples/storage/update-file.md delete mode 100644 app/sdks/0.6.2/server-python/docs/examples/teams/create-membership.md delete mode 100644 app/sdks/0.6.2/server-python/docs/examples/teams/create.md delete mode 100644 app/sdks/0.6.2/server-python/docs/examples/teams/delete-membership.md delete mode 100644 app/sdks/0.6.2/server-python/docs/examples/teams/delete.md delete mode 100644 app/sdks/0.6.2/server-python/docs/examples/teams/get-memberships.md delete mode 100644 app/sdks/0.6.2/server-python/docs/examples/teams/get.md delete mode 100644 app/sdks/0.6.2/server-python/docs/examples/teams/list.md delete mode 100644 app/sdks/0.6.2/server-python/docs/examples/teams/update.md delete mode 100644 app/sdks/0.6.2/server-python/docs/examples/users/create.md delete mode 100644 app/sdks/0.6.2/server-python/docs/examples/users/delete-session.md delete mode 100644 app/sdks/0.6.2/server-python/docs/examples/users/delete-sessions.md delete mode 100644 app/sdks/0.6.2/server-python/docs/examples/users/get-logs.md delete mode 100644 app/sdks/0.6.2/server-python/docs/examples/users/get-prefs.md delete mode 100644 app/sdks/0.6.2/server-python/docs/examples/users/get-sessions.md delete mode 100644 app/sdks/0.6.2/server-python/docs/examples/users/get.md delete mode 100644 app/sdks/0.6.2/server-python/docs/examples/users/list.md delete mode 100644 app/sdks/0.6.2/server-python/docs/examples/users/update-prefs.md delete mode 100644 app/sdks/0.6.2/server-python/docs/examples/users/update-status.md delete mode 100644 app/sdks/0.6.2/server-python/requirements.txt delete mode 100644 app/sdks/0.6.2/server-python/setup.cfg delete mode 100644 app/sdks/0.6.2/server-python/setup.py delete mode 100644 app/sdks/0.6.2/server-ruby/CHANGELOG.md delete mode 100644 app/sdks/0.6.2/server-ruby/Gemfile delete mode 100644 app/sdks/0.6.2/server-ruby/LICENSE delete mode 100644 app/sdks/0.6.2/server-ruby/README.md delete mode 100644 app/sdks/0.6.2/server-ruby/appwrite.gemspec delete mode 100644 app/sdks/0.6.2/server-ruby/docs/examples/avatars/get-browser.md delete mode 100644 app/sdks/0.6.2/server-ruby/docs/examples/avatars/get-credit-card.md delete mode 100644 app/sdks/0.6.2/server-ruby/docs/examples/avatars/get-favicon.md delete mode 100644 app/sdks/0.6.2/server-ruby/docs/examples/avatars/get-flag.md delete mode 100644 app/sdks/0.6.2/server-ruby/docs/examples/avatars/get-image.md delete mode 100644 app/sdks/0.6.2/server-ruby/docs/examples/avatars/get-initials.md delete mode 100644 app/sdks/0.6.2/server-ruby/docs/examples/avatars/get-q-r.md delete mode 100644 app/sdks/0.6.2/server-ruby/docs/examples/database/create-collection.md delete mode 100644 app/sdks/0.6.2/server-ruby/docs/examples/database/create-document.md delete mode 100644 app/sdks/0.6.2/server-ruby/docs/examples/database/delete-collection.md delete mode 100644 app/sdks/0.6.2/server-ruby/docs/examples/database/delete-document.md delete mode 100644 app/sdks/0.6.2/server-ruby/docs/examples/database/get-collection.md delete mode 100644 app/sdks/0.6.2/server-ruby/docs/examples/database/get-document.md delete mode 100644 app/sdks/0.6.2/server-ruby/docs/examples/database/list-collections.md delete mode 100644 app/sdks/0.6.2/server-ruby/docs/examples/database/list-documents.md delete mode 100644 app/sdks/0.6.2/server-ruby/docs/examples/database/update-collection.md delete mode 100644 app/sdks/0.6.2/server-ruby/docs/examples/database/update-document.md delete mode 100644 app/sdks/0.6.2/server-ruby/docs/examples/health/get-anti-virus.md delete mode 100644 app/sdks/0.6.2/server-ruby/docs/examples/health/get-cache.md delete mode 100644 app/sdks/0.6.2/server-ruby/docs/examples/health/get-d-b.md delete mode 100644 app/sdks/0.6.2/server-ruby/docs/examples/health/get-queue-certificates.md delete mode 100644 app/sdks/0.6.2/server-ruby/docs/examples/health/get-queue-functions.md delete mode 100644 app/sdks/0.6.2/server-ruby/docs/examples/health/get-queue-logs.md delete mode 100644 app/sdks/0.6.2/server-ruby/docs/examples/health/get-queue-tasks.md delete mode 100644 app/sdks/0.6.2/server-ruby/docs/examples/health/get-queue-usage.md delete mode 100644 app/sdks/0.6.2/server-ruby/docs/examples/health/get-queue-webhooks.md delete mode 100644 app/sdks/0.6.2/server-ruby/docs/examples/health/get-storage-local.md delete mode 100644 app/sdks/0.6.2/server-ruby/docs/examples/health/get-time.md delete mode 100644 app/sdks/0.6.2/server-ruby/docs/examples/health/get.md delete mode 100644 app/sdks/0.6.2/server-ruby/docs/examples/locale/get-continents.md delete mode 100644 app/sdks/0.6.2/server-ruby/docs/examples/locale/get-countries-e-u.md delete mode 100644 app/sdks/0.6.2/server-ruby/docs/examples/locale/get-countries-phones.md delete mode 100644 app/sdks/0.6.2/server-ruby/docs/examples/locale/get-countries.md delete mode 100644 app/sdks/0.6.2/server-ruby/docs/examples/locale/get-currencies.md delete mode 100644 app/sdks/0.6.2/server-ruby/docs/examples/locale/get-languages.md delete mode 100644 app/sdks/0.6.2/server-ruby/docs/examples/locale/get.md delete mode 100644 app/sdks/0.6.2/server-ruby/docs/examples/storage/create-file.md delete mode 100644 app/sdks/0.6.2/server-ruby/docs/examples/storage/delete-file.md delete mode 100644 app/sdks/0.6.2/server-ruby/docs/examples/storage/get-file-download.md delete mode 100644 app/sdks/0.6.2/server-ruby/docs/examples/storage/get-file-preview.md delete mode 100644 app/sdks/0.6.2/server-ruby/docs/examples/storage/get-file-view.md delete mode 100644 app/sdks/0.6.2/server-ruby/docs/examples/storage/get-file.md delete mode 100644 app/sdks/0.6.2/server-ruby/docs/examples/storage/list-files.md delete mode 100644 app/sdks/0.6.2/server-ruby/docs/examples/storage/update-file.md delete mode 100644 app/sdks/0.6.2/server-ruby/docs/examples/teams/create-membership.md delete mode 100644 app/sdks/0.6.2/server-ruby/docs/examples/teams/create.md delete mode 100644 app/sdks/0.6.2/server-ruby/docs/examples/teams/delete-membership.md delete mode 100644 app/sdks/0.6.2/server-ruby/docs/examples/teams/delete.md delete mode 100644 app/sdks/0.6.2/server-ruby/docs/examples/teams/get-memberships.md delete mode 100644 app/sdks/0.6.2/server-ruby/docs/examples/teams/get.md delete mode 100644 app/sdks/0.6.2/server-ruby/docs/examples/teams/list.md delete mode 100644 app/sdks/0.6.2/server-ruby/docs/examples/teams/update.md delete mode 100644 app/sdks/0.6.2/server-ruby/docs/examples/users/create.md delete mode 100644 app/sdks/0.6.2/server-ruby/docs/examples/users/delete-session.md delete mode 100644 app/sdks/0.6.2/server-ruby/docs/examples/users/delete-sessions.md delete mode 100644 app/sdks/0.6.2/server-ruby/docs/examples/users/get-logs.md delete mode 100644 app/sdks/0.6.2/server-ruby/docs/examples/users/get-prefs.md delete mode 100644 app/sdks/0.6.2/server-ruby/docs/examples/users/get-sessions.md delete mode 100644 app/sdks/0.6.2/server-ruby/docs/examples/users/get.md delete mode 100644 app/sdks/0.6.2/server-ruby/docs/examples/users/list.md delete mode 100644 app/sdks/0.6.2/server-ruby/docs/examples/users/update-prefs.md delete mode 100644 app/sdks/0.6.2/server-ruby/docs/examples/users/update-status.md delete mode 100644 app/sdks/0.6.2/server-ruby/lib/appwrite.rb delete mode 100644 app/sdks/0.6.2/server-ruby/lib/appwrite/client.rb delete mode 100644 app/sdks/0.6.2/server-ruby/lib/appwrite/service.rb delete mode 100644 app/sdks/0.6.2/server-ruby/lib/appwrite/services/avatars.rb delete mode 100644 app/sdks/0.6.2/server-ruby/lib/appwrite/services/database.rb delete mode 100644 app/sdks/0.6.2/server-ruby/lib/appwrite/services/health.rb delete mode 100644 app/sdks/0.6.2/server-ruby/lib/appwrite/services/locale.rb delete mode 100644 app/sdks/0.6.2/server-ruby/lib/appwrite/services/storage.rb delete mode 100644 app/sdks/0.6.2/server-ruby/lib/appwrite/services/teams.rb delete mode 100644 app/sdks/0.6.2/server-ruby/lib/appwrite/services/users.rb delete mode 100644 app/sdks/0.7.0/client-flutter/CHANGELOG.md delete mode 100644 app/sdks/0.7.0/client-flutter/LICENSE delete mode 100644 app/sdks/0.7.0/client-flutter/README.md delete mode 100644 app/sdks/0.7.0/client-flutter/docs/examples/account/create-o-auth2session.md delete mode 100644 app/sdks/0.7.0/client-flutter/docs/examples/account/create-recovery.md delete mode 100644 app/sdks/0.7.0/client-flutter/docs/examples/account/create-session.md delete mode 100644 app/sdks/0.7.0/client-flutter/docs/examples/account/create-verification.md delete mode 100644 app/sdks/0.7.0/client-flutter/docs/examples/account/create.md delete mode 100644 app/sdks/0.7.0/client-flutter/docs/examples/account/delete-session.md delete mode 100644 app/sdks/0.7.0/client-flutter/docs/examples/account/delete-sessions.md delete mode 100644 app/sdks/0.7.0/client-flutter/docs/examples/account/delete.md delete mode 100644 app/sdks/0.7.0/client-flutter/docs/examples/account/get-logs.md delete mode 100644 app/sdks/0.7.0/client-flutter/docs/examples/account/get-prefs.md delete mode 100644 app/sdks/0.7.0/client-flutter/docs/examples/account/get-sessions.md delete mode 100644 app/sdks/0.7.0/client-flutter/docs/examples/account/get.md delete mode 100644 app/sdks/0.7.0/client-flutter/docs/examples/account/update-email.md delete mode 100644 app/sdks/0.7.0/client-flutter/docs/examples/account/update-name.md delete mode 100644 app/sdks/0.7.0/client-flutter/docs/examples/account/update-password.md delete mode 100644 app/sdks/0.7.0/client-flutter/docs/examples/account/update-prefs.md delete mode 100644 app/sdks/0.7.0/client-flutter/docs/examples/account/update-recovery.md delete mode 100644 app/sdks/0.7.0/client-flutter/docs/examples/account/update-verification.md delete mode 100644 app/sdks/0.7.0/client-flutter/docs/examples/avatars/get-browser.md delete mode 100644 app/sdks/0.7.0/client-flutter/docs/examples/avatars/get-credit-card.md delete mode 100644 app/sdks/0.7.0/client-flutter/docs/examples/avatars/get-favicon.md delete mode 100644 app/sdks/0.7.0/client-flutter/docs/examples/avatars/get-flag.md delete mode 100644 app/sdks/0.7.0/client-flutter/docs/examples/avatars/get-image.md delete mode 100644 app/sdks/0.7.0/client-flutter/docs/examples/avatars/get-initials.md delete mode 100644 app/sdks/0.7.0/client-flutter/docs/examples/avatars/get-q-r.md delete mode 100644 app/sdks/0.7.0/client-flutter/docs/examples/database/create-document.md delete mode 100644 app/sdks/0.7.0/client-flutter/docs/examples/database/delete-document.md delete mode 100644 app/sdks/0.7.0/client-flutter/docs/examples/database/get-document.md delete mode 100644 app/sdks/0.7.0/client-flutter/docs/examples/database/list-documents.md delete mode 100644 app/sdks/0.7.0/client-flutter/docs/examples/database/update-document.md delete mode 100644 app/sdks/0.7.0/client-flutter/docs/examples/locale/get-continents.md delete mode 100644 app/sdks/0.7.0/client-flutter/docs/examples/locale/get-countries-e-u.md delete mode 100644 app/sdks/0.7.0/client-flutter/docs/examples/locale/get-countries-phones.md delete mode 100644 app/sdks/0.7.0/client-flutter/docs/examples/locale/get-countries.md delete mode 100644 app/sdks/0.7.0/client-flutter/docs/examples/locale/get-currencies.md delete mode 100644 app/sdks/0.7.0/client-flutter/docs/examples/locale/get-languages.md delete mode 100644 app/sdks/0.7.0/client-flutter/docs/examples/locale/get.md delete mode 100644 app/sdks/0.7.0/client-flutter/docs/examples/storage/create-file.md delete mode 100644 app/sdks/0.7.0/client-flutter/docs/examples/storage/delete-file.md delete mode 100644 app/sdks/0.7.0/client-flutter/docs/examples/storage/get-file-download.md delete mode 100644 app/sdks/0.7.0/client-flutter/docs/examples/storage/get-file-preview.md delete mode 100644 app/sdks/0.7.0/client-flutter/docs/examples/storage/get-file-view.md delete mode 100644 app/sdks/0.7.0/client-flutter/docs/examples/storage/get-file.md delete mode 100644 app/sdks/0.7.0/client-flutter/docs/examples/storage/list-files.md delete mode 100644 app/sdks/0.7.0/client-flutter/docs/examples/storage/update-file.md delete mode 100644 app/sdks/0.7.0/client-flutter/docs/examples/teams/create-membership.md delete mode 100644 app/sdks/0.7.0/client-flutter/docs/examples/teams/create.md delete mode 100644 app/sdks/0.7.0/client-flutter/docs/examples/teams/delete-membership.md delete mode 100644 app/sdks/0.7.0/client-flutter/docs/examples/teams/delete.md delete mode 100644 app/sdks/0.7.0/client-flutter/docs/examples/teams/get-memberships.md delete mode 100644 app/sdks/0.7.0/client-flutter/docs/examples/teams/get.md delete mode 100644 app/sdks/0.7.0/client-flutter/docs/examples/teams/list.md delete mode 100644 app/sdks/0.7.0/client-flutter/docs/examples/teams/update-membership-status.md delete mode 100644 app/sdks/0.7.0/client-flutter/docs/examples/teams/update.md delete mode 100644 app/sdks/0.7.0/client-flutter/example/README.md delete mode 100644 app/sdks/0.7.0/client-flutter/lib/appwrite.dart delete mode 100644 app/sdks/0.7.0/client-flutter/lib/client.dart delete mode 100644 app/sdks/0.7.0/client-flutter/lib/enums.dart delete mode 100644 app/sdks/0.7.0/client-flutter/lib/service.dart delete mode 100644 app/sdks/0.7.0/client-flutter/lib/services/account.dart delete mode 100644 app/sdks/0.7.0/client-flutter/lib/services/avatars.dart delete mode 100644 app/sdks/0.7.0/client-flutter/lib/services/database.dart delete mode 100644 app/sdks/0.7.0/client-flutter/lib/services/locale.dart delete mode 100644 app/sdks/0.7.0/client-flutter/lib/services/storage.dart delete mode 100644 app/sdks/0.7.0/client-flutter/lib/services/teams.dart delete mode 100644 app/sdks/0.7.0/client-flutter/pubspec.yaml delete mode 100644 app/sdks/0.7.0/client-web/CHANGELOG.md delete mode 100644 app/sdks/0.7.0/client-web/LICENSE delete mode 100644 app/sdks/0.7.0/client-web/README.md delete mode 100644 app/sdks/0.7.0/client-web/docs/examples/account/create-o-auth2session.md delete mode 100644 app/sdks/0.7.0/client-web/docs/examples/account/create-recovery.md delete mode 100644 app/sdks/0.7.0/client-web/docs/examples/account/create-session.md delete mode 100644 app/sdks/0.7.0/client-web/docs/examples/account/create-verification.md delete mode 100644 app/sdks/0.7.0/client-web/docs/examples/account/create.md delete mode 100644 app/sdks/0.7.0/client-web/docs/examples/account/delete-session.md delete mode 100644 app/sdks/0.7.0/client-web/docs/examples/account/delete-sessions.md delete mode 100644 app/sdks/0.7.0/client-web/docs/examples/account/delete.md delete mode 100644 app/sdks/0.7.0/client-web/docs/examples/account/get-logs.md delete mode 100644 app/sdks/0.7.0/client-web/docs/examples/account/get-prefs.md delete mode 100644 app/sdks/0.7.0/client-web/docs/examples/account/get-sessions.md delete mode 100644 app/sdks/0.7.0/client-web/docs/examples/account/get.md delete mode 100644 app/sdks/0.7.0/client-web/docs/examples/account/update-email.md delete mode 100644 app/sdks/0.7.0/client-web/docs/examples/account/update-name.md delete mode 100644 app/sdks/0.7.0/client-web/docs/examples/account/update-password.md delete mode 100644 app/sdks/0.7.0/client-web/docs/examples/account/update-prefs.md delete mode 100644 app/sdks/0.7.0/client-web/docs/examples/account/update-recovery.md delete mode 100644 app/sdks/0.7.0/client-web/docs/examples/account/update-verification.md delete mode 100644 app/sdks/0.7.0/client-web/docs/examples/avatars/get-browser.md delete mode 100644 app/sdks/0.7.0/client-web/docs/examples/avatars/get-credit-card.md delete mode 100644 app/sdks/0.7.0/client-web/docs/examples/avatars/get-favicon.md delete mode 100644 app/sdks/0.7.0/client-web/docs/examples/avatars/get-flag.md delete mode 100644 app/sdks/0.7.0/client-web/docs/examples/avatars/get-image.md delete mode 100644 app/sdks/0.7.0/client-web/docs/examples/avatars/get-initials.md delete mode 100644 app/sdks/0.7.0/client-web/docs/examples/avatars/get-q-r.md delete mode 100644 app/sdks/0.7.0/client-web/docs/examples/database/create-document.md delete mode 100644 app/sdks/0.7.0/client-web/docs/examples/database/delete-document.md delete mode 100644 app/sdks/0.7.0/client-web/docs/examples/database/get-document.md delete mode 100644 app/sdks/0.7.0/client-web/docs/examples/database/list-documents.md delete mode 100644 app/sdks/0.7.0/client-web/docs/examples/database/update-document.md delete mode 100644 app/sdks/0.7.0/client-web/docs/examples/locale/get-continents.md delete mode 100644 app/sdks/0.7.0/client-web/docs/examples/locale/get-countries-e-u.md delete mode 100644 app/sdks/0.7.0/client-web/docs/examples/locale/get-countries-phones.md delete mode 100644 app/sdks/0.7.0/client-web/docs/examples/locale/get-countries.md delete mode 100644 app/sdks/0.7.0/client-web/docs/examples/locale/get-currencies.md delete mode 100644 app/sdks/0.7.0/client-web/docs/examples/locale/get-languages.md delete mode 100644 app/sdks/0.7.0/client-web/docs/examples/locale/get.md delete mode 100644 app/sdks/0.7.0/client-web/docs/examples/storage/create-file.md delete mode 100644 app/sdks/0.7.0/client-web/docs/examples/storage/delete-file.md delete mode 100644 app/sdks/0.7.0/client-web/docs/examples/storage/get-file-download.md delete mode 100644 app/sdks/0.7.0/client-web/docs/examples/storage/get-file-preview.md delete mode 100644 app/sdks/0.7.0/client-web/docs/examples/storage/get-file-view.md delete mode 100644 app/sdks/0.7.0/client-web/docs/examples/storage/get-file.md delete mode 100644 app/sdks/0.7.0/client-web/docs/examples/storage/list-files.md delete mode 100644 app/sdks/0.7.0/client-web/docs/examples/storage/update-file.md delete mode 100644 app/sdks/0.7.0/client-web/docs/examples/teams/create-membership.md delete mode 100644 app/sdks/0.7.0/client-web/docs/examples/teams/create.md delete mode 100644 app/sdks/0.7.0/client-web/docs/examples/teams/delete-membership.md delete mode 100644 app/sdks/0.7.0/client-web/docs/examples/teams/delete.md delete mode 100644 app/sdks/0.7.0/client-web/docs/examples/teams/get-memberships.md delete mode 100644 app/sdks/0.7.0/client-web/docs/examples/teams/get.md delete mode 100644 app/sdks/0.7.0/client-web/docs/examples/teams/list.md delete mode 100644 app/sdks/0.7.0/client-web/docs/examples/teams/update-membership-status.md delete mode 100644 app/sdks/0.7.0/client-web/docs/examples/teams/update.md delete mode 100644 app/sdks/0.7.0/client-web/package.json delete mode 100644 app/sdks/0.7.0/client-web/src/sdk.js delete mode 100644 app/sdks/0.7.0/client-web/src/sdk.min.js delete mode 100644 app/sdks/0.7.0/client-web/tsconfig.json delete mode 100644 app/sdks/0.7.0/client-web/types/index.d.ts delete mode 100644 app/sdks/0.7.0/console-web/CHANGELOG.md delete mode 100644 app/sdks/0.7.0/console-web/LICENSE delete mode 100644 app/sdks/0.7.0/console-web/README.md delete mode 100644 app/sdks/0.7.0/console-web/docs/examples/account/create-o-auth2session.md delete mode 100644 app/sdks/0.7.0/console-web/docs/examples/account/create-recovery.md delete mode 100644 app/sdks/0.7.0/console-web/docs/examples/account/create-session.md delete mode 100644 app/sdks/0.7.0/console-web/docs/examples/account/create-verification.md delete mode 100644 app/sdks/0.7.0/console-web/docs/examples/account/create.md delete mode 100644 app/sdks/0.7.0/console-web/docs/examples/account/delete-session.md delete mode 100644 app/sdks/0.7.0/console-web/docs/examples/account/delete-sessions.md delete mode 100644 app/sdks/0.7.0/console-web/docs/examples/account/delete.md delete mode 100644 app/sdks/0.7.0/console-web/docs/examples/account/get-logs.md delete mode 100644 app/sdks/0.7.0/console-web/docs/examples/account/get-prefs.md delete mode 100644 app/sdks/0.7.0/console-web/docs/examples/account/get-sessions.md delete mode 100644 app/sdks/0.7.0/console-web/docs/examples/account/get.md delete mode 100644 app/sdks/0.7.0/console-web/docs/examples/account/update-email.md delete mode 100644 app/sdks/0.7.0/console-web/docs/examples/account/update-name.md delete mode 100644 app/sdks/0.7.0/console-web/docs/examples/account/update-password.md delete mode 100644 app/sdks/0.7.0/console-web/docs/examples/account/update-prefs.md delete mode 100644 app/sdks/0.7.0/console-web/docs/examples/account/update-recovery.md delete mode 100644 app/sdks/0.7.0/console-web/docs/examples/account/update-verification.md delete mode 100644 app/sdks/0.7.0/console-web/docs/examples/avatars/get-browser.md delete mode 100644 app/sdks/0.7.0/console-web/docs/examples/avatars/get-credit-card.md delete mode 100644 app/sdks/0.7.0/console-web/docs/examples/avatars/get-favicon.md delete mode 100644 app/sdks/0.7.0/console-web/docs/examples/avatars/get-flag.md delete mode 100644 app/sdks/0.7.0/console-web/docs/examples/avatars/get-image.md delete mode 100644 app/sdks/0.7.0/console-web/docs/examples/avatars/get-initials.md delete mode 100644 app/sdks/0.7.0/console-web/docs/examples/avatars/get-q-r.md delete mode 100644 app/sdks/0.7.0/console-web/docs/examples/database/create-collection.md delete mode 100644 app/sdks/0.7.0/console-web/docs/examples/database/create-document.md delete mode 100644 app/sdks/0.7.0/console-web/docs/examples/database/delete-collection.md delete mode 100644 app/sdks/0.7.0/console-web/docs/examples/database/delete-document.md delete mode 100644 app/sdks/0.7.0/console-web/docs/examples/database/get-collection.md delete mode 100644 app/sdks/0.7.0/console-web/docs/examples/database/get-document.md delete mode 100644 app/sdks/0.7.0/console-web/docs/examples/database/list-collections.md delete mode 100644 app/sdks/0.7.0/console-web/docs/examples/database/list-documents.md delete mode 100644 app/sdks/0.7.0/console-web/docs/examples/database/update-collection.md delete mode 100644 app/sdks/0.7.0/console-web/docs/examples/database/update-document.md delete mode 100644 app/sdks/0.7.0/console-web/docs/examples/functions/create-execution.md delete mode 100644 app/sdks/0.7.0/console-web/docs/examples/functions/create-tag.md delete mode 100644 app/sdks/0.7.0/console-web/docs/examples/functions/create.md delete mode 100644 app/sdks/0.7.0/console-web/docs/examples/functions/delete-tag.md delete mode 100644 app/sdks/0.7.0/console-web/docs/examples/functions/delete.md delete mode 100644 app/sdks/0.7.0/console-web/docs/examples/functions/get-execution.md delete mode 100644 app/sdks/0.7.0/console-web/docs/examples/functions/get-tag.md delete mode 100644 app/sdks/0.7.0/console-web/docs/examples/functions/get-usage.md delete mode 100644 app/sdks/0.7.0/console-web/docs/examples/functions/get.md delete mode 100644 app/sdks/0.7.0/console-web/docs/examples/functions/list-executions.md delete mode 100644 app/sdks/0.7.0/console-web/docs/examples/functions/list-tags.md delete mode 100644 app/sdks/0.7.0/console-web/docs/examples/functions/list.md delete mode 100644 app/sdks/0.7.0/console-web/docs/examples/functions/update-tag.md delete mode 100644 app/sdks/0.7.0/console-web/docs/examples/functions/update.md delete mode 100644 app/sdks/0.7.0/console-web/docs/examples/health/get-anti-virus.md delete mode 100644 app/sdks/0.7.0/console-web/docs/examples/health/get-cache.md delete mode 100644 app/sdks/0.7.0/console-web/docs/examples/health/get-d-b.md delete mode 100644 app/sdks/0.7.0/console-web/docs/examples/health/get-queue-certificates.md delete mode 100644 app/sdks/0.7.0/console-web/docs/examples/health/get-queue-functions.md delete mode 100644 app/sdks/0.7.0/console-web/docs/examples/health/get-queue-logs.md delete mode 100644 app/sdks/0.7.0/console-web/docs/examples/health/get-queue-tasks.md delete mode 100644 app/sdks/0.7.0/console-web/docs/examples/health/get-queue-usage.md delete mode 100644 app/sdks/0.7.0/console-web/docs/examples/health/get-queue-webhooks.md delete mode 100644 app/sdks/0.7.0/console-web/docs/examples/health/get-storage-local.md delete mode 100644 app/sdks/0.7.0/console-web/docs/examples/health/get-time.md delete mode 100644 app/sdks/0.7.0/console-web/docs/examples/health/get.md delete mode 100644 app/sdks/0.7.0/console-web/docs/examples/locale/get-continents.md delete mode 100644 app/sdks/0.7.0/console-web/docs/examples/locale/get-countries-e-u.md delete mode 100644 app/sdks/0.7.0/console-web/docs/examples/locale/get-countries-phones.md delete mode 100644 app/sdks/0.7.0/console-web/docs/examples/locale/get-countries.md delete mode 100644 app/sdks/0.7.0/console-web/docs/examples/locale/get-currencies.md delete mode 100644 app/sdks/0.7.0/console-web/docs/examples/locale/get-languages.md delete mode 100644 app/sdks/0.7.0/console-web/docs/examples/locale/get.md delete mode 100644 app/sdks/0.7.0/console-web/docs/examples/projects/create-domain.md delete mode 100644 app/sdks/0.7.0/console-web/docs/examples/projects/create-key.md delete mode 100644 app/sdks/0.7.0/console-web/docs/examples/projects/create-platform.md delete mode 100644 app/sdks/0.7.0/console-web/docs/examples/projects/create-task.md delete mode 100644 app/sdks/0.7.0/console-web/docs/examples/projects/create-webhook.md delete mode 100644 app/sdks/0.7.0/console-web/docs/examples/projects/create.md delete mode 100644 app/sdks/0.7.0/console-web/docs/examples/projects/delete-domain.md delete mode 100644 app/sdks/0.7.0/console-web/docs/examples/projects/delete-key.md delete mode 100644 app/sdks/0.7.0/console-web/docs/examples/projects/delete-platform.md delete mode 100644 app/sdks/0.7.0/console-web/docs/examples/projects/delete-task.md delete mode 100644 app/sdks/0.7.0/console-web/docs/examples/projects/delete-webhook.md delete mode 100644 app/sdks/0.7.0/console-web/docs/examples/projects/delete.md delete mode 100644 app/sdks/0.7.0/console-web/docs/examples/projects/get-domain.md delete mode 100644 app/sdks/0.7.0/console-web/docs/examples/projects/get-key.md delete mode 100644 app/sdks/0.7.0/console-web/docs/examples/projects/get-platform.md delete mode 100644 app/sdks/0.7.0/console-web/docs/examples/projects/get-task.md delete mode 100644 app/sdks/0.7.0/console-web/docs/examples/projects/get-usage.md delete mode 100644 app/sdks/0.7.0/console-web/docs/examples/projects/get-webhook.md delete mode 100644 app/sdks/0.7.0/console-web/docs/examples/projects/get.md delete mode 100644 app/sdks/0.7.0/console-web/docs/examples/projects/list-domains.md delete mode 100644 app/sdks/0.7.0/console-web/docs/examples/projects/list-keys.md delete mode 100644 app/sdks/0.7.0/console-web/docs/examples/projects/list-platforms.md delete mode 100644 app/sdks/0.7.0/console-web/docs/examples/projects/list-tasks.md delete mode 100644 app/sdks/0.7.0/console-web/docs/examples/projects/list-webhooks.md delete mode 100644 app/sdks/0.7.0/console-web/docs/examples/projects/list.md delete mode 100644 app/sdks/0.7.0/console-web/docs/examples/projects/update-domain-verification.md delete mode 100644 app/sdks/0.7.0/console-web/docs/examples/projects/update-key.md delete mode 100644 app/sdks/0.7.0/console-web/docs/examples/projects/update-o-auth2.md delete mode 100644 app/sdks/0.7.0/console-web/docs/examples/projects/update-platform.md delete mode 100644 app/sdks/0.7.0/console-web/docs/examples/projects/update-task.md delete mode 100644 app/sdks/0.7.0/console-web/docs/examples/projects/update-webhook.md delete mode 100644 app/sdks/0.7.0/console-web/docs/examples/projects/update.md delete mode 100644 app/sdks/0.7.0/console-web/docs/examples/storage/create-file.md delete mode 100644 app/sdks/0.7.0/console-web/docs/examples/storage/delete-file.md delete mode 100644 app/sdks/0.7.0/console-web/docs/examples/storage/get-file-download.md delete mode 100644 app/sdks/0.7.0/console-web/docs/examples/storage/get-file-preview.md delete mode 100644 app/sdks/0.7.0/console-web/docs/examples/storage/get-file-view.md delete mode 100644 app/sdks/0.7.0/console-web/docs/examples/storage/get-file.md delete mode 100644 app/sdks/0.7.0/console-web/docs/examples/storage/list-files.md delete mode 100644 app/sdks/0.7.0/console-web/docs/examples/storage/update-file.md delete mode 100644 app/sdks/0.7.0/console-web/docs/examples/teams/create-membership.md delete mode 100644 app/sdks/0.7.0/console-web/docs/examples/teams/create.md delete mode 100644 app/sdks/0.7.0/console-web/docs/examples/teams/delete-membership.md delete mode 100644 app/sdks/0.7.0/console-web/docs/examples/teams/delete.md delete mode 100644 app/sdks/0.7.0/console-web/docs/examples/teams/get-memberships.md delete mode 100644 app/sdks/0.7.0/console-web/docs/examples/teams/get.md delete mode 100644 app/sdks/0.7.0/console-web/docs/examples/teams/list.md delete mode 100644 app/sdks/0.7.0/console-web/docs/examples/teams/update-membership-status.md delete mode 100644 app/sdks/0.7.0/console-web/docs/examples/teams/update.md delete mode 100644 app/sdks/0.7.0/console-web/docs/examples/users/create.md delete mode 100644 app/sdks/0.7.0/console-web/docs/examples/users/delete-session.md delete mode 100644 app/sdks/0.7.0/console-web/docs/examples/users/delete-sessions.md delete mode 100644 app/sdks/0.7.0/console-web/docs/examples/users/delete-user.md delete mode 100644 app/sdks/0.7.0/console-web/docs/examples/users/get-logs.md delete mode 100644 app/sdks/0.7.0/console-web/docs/examples/users/get-prefs.md delete mode 100644 app/sdks/0.7.0/console-web/docs/examples/users/get-sessions.md delete mode 100644 app/sdks/0.7.0/console-web/docs/examples/users/get.md delete mode 100644 app/sdks/0.7.0/console-web/docs/examples/users/list.md delete mode 100644 app/sdks/0.7.0/console-web/docs/examples/users/update-prefs.md delete mode 100644 app/sdks/0.7.0/console-web/docs/examples/users/update-status.md delete mode 100644 app/sdks/0.7.0/console-web/package.json delete mode 100644 app/sdks/0.7.0/console-web/src/sdk.js delete mode 100644 app/sdks/0.7.0/console-web/src/sdk.min.js delete mode 100644 app/sdks/0.7.0/console-web/tsconfig.json delete mode 100644 app/sdks/0.7.0/console-web/types/index.d.ts delete mode 100644 app/sdks/0.7.0/server-deno/CHANGELOG.md delete mode 100644 app/sdks/0.7.0/server-deno/LICENSE delete mode 100644 app/sdks/0.7.0/server-deno/README.md delete mode 100644 app/sdks/0.7.0/server-deno/docs/examples/avatars/get-browser.md delete mode 100644 app/sdks/0.7.0/server-deno/docs/examples/avatars/get-credit-card.md delete mode 100644 app/sdks/0.7.0/server-deno/docs/examples/avatars/get-favicon.md delete mode 100644 app/sdks/0.7.0/server-deno/docs/examples/avatars/get-flag.md delete mode 100644 app/sdks/0.7.0/server-deno/docs/examples/avatars/get-image.md delete mode 100644 app/sdks/0.7.0/server-deno/docs/examples/avatars/get-initials.md delete mode 100644 app/sdks/0.7.0/server-deno/docs/examples/avatars/get-q-r.md delete mode 100644 app/sdks/0.7.0/server-deno/docs/examples/database/create-collection.md delete mode 100644 app/sdks/0.7.0/server-deno/docs/examples/database/create-document.md delete mode 100644 app/sdks/0.7.0/server-deno/docs/examples/database/delete-collection.md delete mode 100644 app/sdks/0.7.0/server-deno/docs/examples/database/delete-document.md delete mode 100644 app/sdks/0.7.0/server-deno/docs/examples/database/get-collection.md delete mode 100644 app/sdks/0.7.0/server-deno/docs/examples/database/get-document.md delete mode 100644 app/sdks/0.7.0/server-deno/docs/examples/database/list-collections.md delete mode 100644 app/sdks/0.7.0/server-deno/docs/examples/database/list-documents.md delete mode 100644 app/sdks/0.7.0/server-deno/docs/examples/database/update-collection.md delete mode 100644 app/sdks/0.7.0/server-deno/docs/examples/database/update-document.md delete mode 100644 app/sdks/0.7.0/server-deno/docs/examples/functions/create-execution.md delete mode 100644 app/sdks/0.7.0/server-deno/docs/examples/functions/create-tag.md delete mode 100644 app/sdks/0.7.0/server-deno/docs/examples/functions/create.md delete mode 100644 app/sdks/0.7.0/server-deno/docs/examples/functions/delete-tag.md delete mode 100644 app/sdks/0.7.0/server-deno/docs/examples/functions/delete.md delete mode 100644 app/sdks/0.7.0/server-deno/docs/examples/functions/get-execution.md delete mode 100644 app/sdks/0.7.0/server-deno/docs/examples/functions/get-tag.md delete mode 100644 app/sdks/0.7.0/server-deno/docs/examples/functions/get.md delete mode 100644 app/sdks/0.7.0/server-deno/docs/examples/functions/list-executions.md delete mode 100644 app/sdks/0.7.0/server-deno/docs/examples/functions/list-tags.md delete mode 100644 app/sdks/0.7.0/server-deno/docs/examples/functions/list.md delete mode 100644 app/sdks/0.7.0/server-deno/docs/examples/functions/update-tag.md delete mode 100644 app/sdks/0.7.0/server-deno/docs/examples/functions/update.md delete mode 100644 app/sdks/0.7.0/server-deno/docs/examples/health/get-anti-virus.md delete mode 100644 app/sdks/0.7.0/server-deno/docs/examples/health/get-cache.md delete mode 100644 app/sdks/0.7.0/server-deno/docs/examples/health/get-d-b.md delete mode 100644 app/sdks/0.7.0/server-deno/docs/examples/health/get-queue-certificates.md delete mode 100644 app/sdks/0.7.0/server-deno/docs/examples/health/get-queue-functions.md delete mode 100644 app/sdks/0.7.0/server-deno/docs/examples/health/get-queue-logs.md delete mode 100644 app/sdks/0.7.0/server-deno/docs/examples/health/get-queue-tasks.md delete mode 100644 app/sdks/0.7.0/server-deno/docs/examples/health/get-queue-usage.md delete mode 100644 app/sdks/0.7.0/server-deno/docs/examples/health/get-queue-webhooks.md delete mode 100644 app/sdks/0.7.0/server-deno/docs/examples/health/get-storage-local.md delete mode 100644 app/sdks/0.7.0/server-deno/docs/examples/health/get-time.md delete mode 100644 app/sdks/0.7.0/server-deno/docs/examples/health/get.md delete mode 100644 app/sdks/0.7.0/server-deno/docs/examples/locale/get-continents.md delete mode 100644 app/sdks/0.7.0/server-deno/docs/examples/locale/get-countries-e-u.md delete mode 100644 app/sdks/0.7.0/server-deno/docs/examples/locale/get-countries-phones.md delete mode 100644 app/sdks/0.7.0/server-deno/docs/examples/locale/get-countries.md delete mode 100644 app/sdks/0.7.0/server-deno/docs/examples/locale/get-currencies.md delete mode 100644 app/sdks/0.7.0/server-deno/docs/examples/locale/get-languages.md delete mode 100644 app/sdks/0.7.0/server-deno/docs/examples/locale/get.md delete mode 100644 app/sdks/0.7.0/server-deno/docs/examples/storage/create-file.md delete mode 100644 app/sdks/0.7.0/server-deno/docs/examples/storage/delete-file.md delete mode 100644 app/sdks/0.7.0/server-deno/docs/examples/storage/get-file-download.md delete mode 100644 app/sdks/0.7.0/server-deno/docs/examples/storage/get-file-preview.md delete mode 100644 app/sdks/0.7.0/server-deno/docs/examples/storage/get-file-view.md delete mode 100644 app/sdks/0.7.0/server-deno/docs/examples/storage/get-file.md delete mode 100644 app/sdks/0.7.0/server-deno/docs/examples/storage/list-files.md delete mode 100644 app/sdks/0.7.0/server-deno/docs/examples/storage/update-file.md delete mode 100644 app/sdks/0.7.0/server-deno/docs/examples/teams/create-membership.md delete mode 100644 app/sdks/0.7.0/server-deno/docs/examples/teams/create.md delete mode 100644 app/sdks/0.7.0/server-deno/docs/examples/teams/delete-membership.md delete mode 100644 app/sdks/0.7.0/server-deno/docs/examples/teams/delete.md delete mode 100644 app/sdks/0.7.0/server-deno/docs/examples/teams/get-memberships.md delete mode 100644 app/sdks/0.7.0/server-deno/docs/examples/teams/get.md delete mode 100644 app/sdks/0.7.0/server-deno/docs/examples/teams/list.md delete mode 100644 app/sdks/0.7.0/server-deno/docs/examples/teams/update.md delete mode 100644 app/sdks/0.7.0/server-deno/docs/examples/users/create.md delete mode 100644 app/sdks/0.7.0/server-deno/docs/examples/users/delete-session.md delete mode 100644 app/sdks/0.7.0/server-deno/docs/examples/users/delete-sessions.md delete mode 100644 app/sdks/0.7.0/server-deno/docs/examples/users/delete-user.md delete mode 100644 app/sdks/0.7.0/server-deno/docs/examples/users/get-logs.md delete mode 100644 app/sdks/0.7.0/server-deno/docs/examples/users/get-prefs.md delete mode 100644 app/sdks/0.7.0/server-deno/docs/examples/users/get-sessions.md delete mode 100644 app/sdks/0.7.0/server-deno/docs/examples/users/get.md delete mode 100644 app/sdks/0.7.0/server-deno/docs/examples/users/list.md delete mode 100644 app/sdks/0.7.0/server-deno/docs/examples/users/update-prefs.md delete mode 100644 app/sdks/0.7.0/server-deno/docs/examples/users/update-status.md delete mode 100644 app/sdks/0.7.0/server-deno/mod.ts delete mode 100644 app/sdks/0.7.0/server-deno/src/client.ts delete mode 100644 app/sdks/0.7.0/server-deno/src/service.ts delete mode 100644 app/sdks/0.7.0/server-deno/src/services/avatars.ts delete mode 100644 app/sdks/0.7.0/server-deno/src/services/database.ts delete mode 100644 app/sdks/0.7.0/server-deno/src/services/functions.ts delete mode 100644 app/sdks/0.7.0/server-deno/src/services/health.ts delete mode 100644 app/sdks/0.7.0/server-deno/src/services/locale.ts delete mode 100644 app/sdks/0.7.0/server-deno/src/services/storage.ts delete mode 100644 app/sdks/0.7.0/server-deno/src/services/teams.ts delete mode 100644 app/sdks/0.7.0/server-deno/src/services/users.ts delete mode 100644 app/sdks/0.7.0/server-nodejs/CHANGELOG.md delete mode 100644 app/sdks/0.7.0/server-nodejs/LICENSE delete mode 100644 app/sdks/0.7.0/server-nodejs/README.md delete mode 100644 app/sdks/0.7.0/server-nodejs/docs/examples/avatars/get-browser.md delete mode 100644 app/sdks/0.7.0/server-nodejs/docs/examples/avatars/get-credit-card.md delete mode 100644 app/sdks/0.7.0/server-nodejs/docs/examples/avatars/get-favicon.md delete mode 100644 app/sdks/0.7.0/server-nodejs/docs/examples/avatars/get-flag.md delete mode 100644 app/sdks/0.7.0/server-nodejs/docs/examples/avatars/get-image.md delete mode 100644 app/sdks/0.7.0/server-nodejs/docs/examples/avatars/get-initials.md delete mode 100644 app/sdks/0.7.0/server-nodejs/docs/examples/avatars/get-q-r.md delete mode 100644 app/sdks/0.7.0/server-nodejs/docs/examples/database/create-collection.md delete mode 100644 app/sdks/0.7.0/server-nodejs/docs/examples/database/create-document.md delete mode 100644 app/sdks/0.7.0/server-nodejs/docs/examples/database/delete-collection.md delete mode 100644 app/sdks/0.7.0/server-nodejs/docs/examples/database/delete-document.md delete mode 100644 app/sdks/0.7.0/server-nodejs/docs/examples/database/get-collection.md delete mode 100644 app/sdks/0.7.0/server-nodejs/docs/examples/database/get-document.md delete mode 100644 app/sdks/0.7.0/server-nodejs/docs/examples/database/list-collections.md delete mode 100644 app/sdks/0.7.0/server-nodejs/docs/examples/database/list-documents.md delete mode 100644 app/sdks/0.7.0/server-nodejs/docs/examples/database/update-collection.md delete mode 100644 app/sdks/0.7.0/server-nodejs/docs/examples/database/update-document.md delete mode 100644 app/sdks/0.7.0/server-nodejs/docs/examples/functions/create-execution.md delete mode 100644 app/sdks/0.7.0/server-nodejs/docs/examples/functions/create-tag.md delete mode 100644 app/sdks/0.7.0/server-nodejs/docs/examples/functions/create.md delete mode 100644 app/sdks/0.7.0/server-nodejs/docs/examples/functions/delete-tag.md delete mode 100644 app/sdks/0.7.0/server-nodejs/docs/examples/functions/delete.md delete mode 100644 app/sdks/0.7.0/server-nodejs/docs/examples/functions/get-execution.md delete mode 100644 app/sdks/0.7.0/server-nodejs/docs/examples/functions/get-tag.md delete mode 100644 app/sdks/0.7.0/server-nodejs/docs/examples/functions/get.md delete mode 100644 app/sdks/0.7.0/server-nodejs/docs/examples/functions/list-executions.md delete mode 100644 app/sdks/0.7.0/server-nodejs/docs/examples/functions/list-tags.md delete mode 100644 app/sdks/0.7.0/server-nodejs/docs/examples/functions/list.md delete mode 100644 app/sdks/0.7.0/server-nodejs/docs/examples/functions/update-tag.md delete mode 100644 app/sdks/0.7.0/server-nodejs/docs/examples/functions/update.md delete mode 100644 app/sdks/0.7.0/server-nodejs/docs/examples/health/get-anti-virus.md delete mode 100644 app/sdks/0.7.0/server-nodejs/docs/examples/health/get-cache.md delete mode 100644 app/sdks/0.7.0/server-nodejs/docs/examples/health/get-d-b.md delete mode 100644 app/sdks/0.7.0/server-nodejs/docs/examples/health/get-queue-certificates.md delete mode 100644 app/sdks/0.7.0/server-nodejs/docs/examples/health/get-queue-functions.md delete mode 100644 app/sdks/0.7.0/server-nodejs/docs/examples/health/get-queue-logs.md delete mode 100644 app/sdks/0.7.0/server-nodejs/docs/examples/health/get-queue-tasks.md delete mode 100644 app/sdks/0.7.0/server-nodejs/docs/examples/health/get-queue-usage.md delete mode 100644 app/sdks/0.7.0/server-nodejs/docs/examples/health/get-queue-webhooks.md delete mode 100644 app/sdks/0.7.0/server-nodejs/docs/examples/health/get-storage-local.md delete mode 100644 app/sdks/0.7.0/server-nodejs/docs/examples/health/get-time.md delete mode 100644 app/sdks/0.7.0/server-nodejs/docs/examples/health/get.md delete mode 100644 app/sdks/0.7.0/server-nodejs/docs/examples/locale/get-continents.md delete mode 100644 app/sdks/0.7.0/server-nodejs/docs/examples/locale/get-countries-e-u.md delete mode 100644 app/sdks/0.7.0/server-nodejs/docs/examples/locale/get-countries-phones.md delete mode 100644 app/sdks/0.7.0/server-nodejs/docs/examples/locale/get-countries.md delete mode 100644 app/sdks/0.7.0/server-nodejs/docs/examples/locale/get-currencies.md delete mode 100644 app/sdks/0.7.0/server-nodejs/docs/examples/locale/get-languages.md delete mode 100644 app/sdks/0.7.0/server-nodejs/docs/examples/locale/get.md delete mode 100644 app/sdks/0.7.0/server-nodejs/docs/examples/storage/create-file.md delete mode 100644 app/sdks/0.7.0/server-nodejs/docs/examples/storage/delete-file.md delete mode 100644 app/sdks/0.7.0/server-nodejs/docs/examples/storage/get-file-download.md delete mode 100644 app/sdks/0.7.0/server-nodejs/docs/examples/storage/get-file-preview.md delete mode 100644 app/sdks/0.7.0/server-nodejs/docs/examples/storage/get-file-view.md delete mode 100644 app/sdks/0.7.0/server-nodejs/docs/examples/storage/get-file.md delete mode 100644 app/sdks/0.7.0/server-nodejs/docs/examples/storage/list-files.md delete mode 100644 app/sdks/0.7.0/server-nodejs/docs/examples/storage/update-file.md delete mode 100644 app/sdks/0.7.0/server-nodejs/docs/examples/teams/create-membership.md delete mode 100644 app/sdks/0.7.0/server-nodejs/docs/examples/teams/create.md delete mode 100644 app/sdks/0.7.0/server-nodejs/docs/examples/teams/delete-membership.md delete mode 100644 app/sdks/0.7.0/server-nodejs/docs/examples/teams/delete.md delete mode 100644 app/sdks/0.7.0/server-nodejs/docs/examples/teams/get-memberships.md delete mode 100644 app/sdks/0.7.0/server-nodejs/docs/examples/teams/get.md delete mode 100644 app/sdks/0.7.0/server-nodejs/docs/examples/teams/list.md delete mode 100644 app/sdks/0.7.0/server-nodejs/docs/examples/teams/update.md delete mode 100644 app/sdks/0.7.0/server-nodejs/docs/examples/users/create.md delete mode 100644 app/sdks/0.7.0/server-nodejs/docs/examples/users/delete-session.md delete mode 100644 app/sdks/0.7.0/server-nodejs/docs/examples/users/delete-sessions.md delete mode 100644 app/sdks/0.7.0/server-nodejs/docs/examples/users/delete-user.md delete mode 100644 app/sdks/0.7.0/server-nodejs/docs/examples/users/get-logs.md delete mode 100644 app/sdks/0.7.0/server-nodejs/docs/examples/users/get-prefs.md delete mode 100644 app/sdks/0.7.0/server-nodejs/docs/examples/users/get-sessions.md delete mode 100644 app/sdks/0.7.0/server-nodejs/docs/examples/users/get.md delete mode 100644 app/sdks/0.7.0/server-nodejs/docs/examples/users/list.md delete mode 100644 app/sdks/0.7.0/server-nodejs/docs/examples/users/update-prefs.md delete mode 100644 app/sdks/0.7.0/server-nodejs/docs/examples/users/update-status.md delete mode 100644 app/sdks/0.7.0/server-nodejs/index.js delete mode 100644 app/sdks/0.7.0/server-nodejs/lib/client.js delete mode 100644 app/sdks/0.7.0/server-nodejs/lib/service.js delete mode 100644 app/sdks/0.7.0/server-nodejs/lib/services/avatars.js delete mode 100644 app/sdks/0.7.0/server-nodejs/lib/services/database.js delete mode 100644 app/sdks/0.7.0/server-nodejs/lib/services/functions.js delete mode 100644 app/sdks/0.7.0/server-nodejs/lib/services/health.js delete mode 100644 app/sdks/0.7.0/server-nodejs/lib/services/locale.js delete mode 100644 app/sdks/0.7.0/server-nodejs/lib/services/storage.js delete mode 100644 app/sdks/0.7.0/server-nodejs/lib/services/teams.js delete mode 100644 app/sdks/0.7.0/server-nodejs/lib/services/users.js delete mode 100644 app/sdks/0.7.0/server-nodejs/package.json delete mode 100644 app/sdks/0.7.0/server-php/CHANGELOG.md delete mode 100644 app/sdks/0.7.0/server-php/LICENSE delete mode 100644 app/sdks/0.7.0/server-php/README.md delete mode 100644 app/sdks/0.7.0/server-php/composer.json delete mode 100644 app/sdks/0.7.0/server-php/docs/avatars.md delete mode 100644 app/sdks/0.7.0/server-php/docs/database.md delete mode 100644 app/sdks/0.7.0/server-php/docs/examples/avatars/get-browser.md delete mode 100644 app/sdks/0.7.0/server-php/docs/examples/avatars/get-credit-card.md delete mode 100644 app/sdks/0.7.0/server-php/docs/examples/avatars/get-favicon.md delete mode 100644 app/sdks/0.7.0/server-php/docs/examples/avatars/get-flag.md delete mode 100644 app/sdks/0.7.0/server-php/docs/examples/avatars/get-image.md delete mode 100644 app/sdks/0.7.0/server-php/docs/examples/avatars/get-initials.md delete mode 100644 app/sdks/0.7.0/server-php/docs/examples/avatars/get-q-r.md delete mode 100644 app/sdks/0.7.0/server-php/docs/examples/database/create-collection.md delete mode 100644 app/sdks/0.7.0/server-php/docs/examples/database/create-document.md delete mode 100644 app/sdks/0.7.0/server-php/docs/examples/database/delete-collection.md delete mode 100644 app/sdks/0.7.0/server-php/docs/examples/database/delete-document.md delete mode 100644 app/sdks/0.7.0/server-php/docs/examples/database/get-collection.md delete mode 100644 app/sdks/0.7.0/server-php/docs/examples/database/get-document.md delete mode 100644 app/sdks/0.7.0/server-php/docs/examples/database/list-collections.md delete mode 100644 app/sdks/0.7.0/server-php/docs/examples/database/list-documents.md delete mode 100644 app/sdks/0.7.0/server-php/docs/examples/database/update-collection.md delete mode 100644 app/sdks/0.7.0/server-php/docs/examples/database/update-document.md delete mode 100644 app/sdks/0.7.0/server-php/docs/examples/functions/create-execution.md delete mode 100644 app/sdks/0.7.0/server-php/docs/examples/functions/create-tag.md delete mode 100644 app/sdks/0.7.0/server-php/docs/examples/functions/create.md delete mode 100644 app/sdks/0.7.0/server-php/docs/examples/functions/delete-tag.md delete mode 100644 app/sdks/0.7.0/server-php/docs/examples/functions/delete.md delete mode 100644 app/sdks/0.7.0/server-php/docs/examples/functions/get-execution.md delete mode 100644 app/sdks/0.7.0/server-php/docs/examples/functions/get-tag.md delete mode 100644 app/sdks/0.7.0/server-php/docs/examples/functions/get.md delete mode 100644 app/sdks/0.7.0/server-php/docs/examples/functions/list-executions.md delete mode 100644 app/sdks/0.7.0/server-php/docs/examples/functions/list-tags.md delete mode 100644 app/sdks/0.7.0/server-php/docs/examples/functions/list.md delete mode 100644 app/sdks/0.7.0/server-php/docs/examples/functions/update-tag.md delete mode 100644 app/sdks/0.7.0/server-php/docs/examples/functions/update.md delete mode 100644 app/sdks/0.7.0/server-php/docs/examples/health/get-anti-virus.md delete mode 100644 app/sdks/0.7.0/server-php/docs/examples/health/get-cache.md delete mode 100644 app/sdks/0.7.0/server-php/docs/examples/health/get-d-b.md delete mode 100644 app/sdks/0.7.0/server-php/docs/examples/health/get-queue-certificates.md delete mode 100644 app/sdks/0.7.0/server-php/docs/examples/health/get-queue-functions.md delete mode 100644 app/sdks/0.7.0/server-php/docs/examples/health/get-queue-logs.md delete mode 100644 app/sdks/0.7.0/server-php/docs/examples/health/get-queue-tasks.md delete mode 100644 app/sdks/0.7.0/server-php/docs/examples/health/get-queue-usage.md delete mode 100644 app/sdks/0.7.0/server-php/docs/examples/health/get-queue-webhooks.md delete mode 100644 app/sdks/0.7.0/server-php/docs/examples/health/get-storage-local.md delete mode 100644 app/sdks/0.7.0/server-php/docs/examples/health/get-time.md delete mode 100644 app/sdks/0.7.0/server-php/docs/examples/health/get.md delete mode 100644 app/sdks/0.7.0/server-php/docs/examples/locale/get-continents.md delete mode 100644 app/sdks/0.7.0/server-php/docs/examples/locale/get-countries-e-u.md delete mode 100644 app/sdks/0.7.0/server-php/docs/examples/locale/get-countries-phones.md delete mode 100644 app/sdks/0.7.0/server-php/docs/examples/locale/get-countries.md delete mode 100644 app/sdks/0.7.0/server-php/docs/examples/locale/get-currencies.md delete mode 100644 app/sdks/0.7.0/server-php/docs/examples/locale/get-languages.md delete mode 100644 app/sdks/0.7.0/server-php/docs/examples/locale/get.md delete mode 100644 app/sdks/0.7.0/server-php/docs/examples/storage/create-file.md delete mode 100644 app/sdks/0.7.0/server-php/docs/examples/storage/delete-file.md delete mode 100644 app/sdks/0.7.0/server-php/docs/examples/storage/get-file-download.md delete mode 100644 app/sdks/0.7.0/server-php/docs/examples/storage/get-file-preview.md delete mode 100644 app/sdks/0.7.0/server-php/docs/examples/storage/get-file-view.md delete mode 100644 app/sdks/0.7.0/server-php/docs/examples/storage/get-file.md delete mode 100644 app/sdks/0.7.0/server-php/docs/examples/storage/list-files.md delete mode 100644 app/sdks/0.7.0/server-php/docs/examples/storage/update-file.md delete mode 100644 app/sdks/0.7.0/server-php/docs/examples/teams/create-membership.md delete mode 100644 app/sdks/0.7.0/server-php/docs/examples/teams/create.md delete mode 100644 app/sdks/0.7.0/server-php/docs/examples/teams/delete-membership.md delete mode 100644 app/sdks/0.7.0/server-php/docs/examples/teams/delete.md delete mode 100644 app/sdks/0.7.0/server-php/docs/examples/teams/get-memberships.md delete mode 100644 app/sdks/0.7.0/server-php/docs/examples/teams/get.md delete mode 100644 app/sdks/0.7.0/server-php/docs/examples/teams/list.md delete mode 100644 app/sdks/0.7.0/server-php/docs/examples/teams/update.md delete mode 100644 app/sdks/0.7.0/server-php/docs/examples/users/create.md delete mode 100644 app/sdks/0.7.0/server-php/docs/examples/users/delete-session.md delete mode 100644 app/sdks/0.7.0/server-php/docs/examples/users/delete-sessions.md delete mode 100644 app/sdks/0.7.0/server-php/docs/examples/users/delete-user.md delete mode 100644 app/sdks/0.7.0/server-php/docs/examples/users/get-logs.md delete mode 100644 app/sdks/0.7.0/server-php/docs/examples/users/get-prefs.md delete mode 100644 app/sdks/0.7.0/server-php/docs/examples/users/get-sessions.md delete mode 100644 app/sdks/0.7.0/server-php/docs/examples/users/get.md delete mode 100644 app/sdks/0.7.0/server-php/docs/examples/users/list.md delete mode 100644 app/sdks/0.7.0/server-php/docs/examples/users/update-prefs.md delete mode 100644 app/sdks/0.7.0/server-php/docs/examples/users/update-status.md delete mode 100644 app/sdks/0.7.0/server-php/docs/functions.md delete mode 100644 app/sdks/0.7.0/server-php/docs/health.md delete mode 100644 app/sdks/0.7.0/server-php/docs/locale.md delete mode 100644 app/sdks/0.7.0/server-php/docs/storage.md delete mode 100644 app/sdks/0.7.0/server-php/docs/teams.md delete mode 100644 app/sdks/0.7.0/server-php/docs/users.md delete mode 100644 app/sdks/0.7.0/server-php/src/Appwrite/Client.php delete mode 100644 app/sdks/0.7.0/server-php/src/Appwrite/Service.php delete mode 100644 app/sdks/0.7.0/server-php/src/Appwrite/Services/Avatars.php delete mode 100644 app/sdks/0.7.0/server-php/src/Appwrite/Services/Database.php delete mode 100644 app/sdks/0.7.0/server-php/src/Appwrite/Services/Functions.php delete mode 100644 app/sdks/0.7.0/server-php/src/Appwrite/Services/Health.php delete mode 100644 app/sdks/0.7.0/server-php/src/Appwrite/Services/Locale.php delete mode 100644 app/sdks/0.7.0/server-php/src/Appwrite/Services/Storage.php delete mode 100644 app/sdks/0.7.0/server-php/src/Appwrite/Services/Teams.php delete mode 100644 app/sdks/0.7.0/server-php/src/Appwrite/Services/Users.php delete mode 100644 app/sdks/0.7.0/server-python/CHANGELOG.md delete mode 100644 app/sdks/0.7.0/server-python/LICENSE delete mode 100644 app/sdks/0.7.0/server-python/README.md delete mode 100644 app/sdks/0.7.0/server-python/appwrite/__init__.py delete mode 100644 app/sdks/0.7.0/server-python/appwrite/client.py delete mode 100644 app/sdks/0.7.0/server-python/appwrite/service.py delete mode 100644 app/sdks/0.7.0/server-python/appwrite/services/__init__.py delete mode 100644 app/sdks/0.7.0/server-python/appwrite/services/avatars.py delete mode 100644 app/sdks/0.7.0/server-python/appwrite/services/database.py delete mode 100644 app/sdks/0.7.0/server-python/appwrite/services/functions.py delete mode 100644 app/sdks/0.7.0/server-python/appwrite/services/health.py delete mode 100644 app/sdks/0.7.0/server-python/appwrite/services/locale.py delete mode 100644 app/sdks/0.7.0/server-python/appwrite/services/storage.py delete mode 100644 app/sdks/0.7.0/server-python/appwrite/services/teams.py delete mode 100644 app/sdks/0.7.0/server-python/appwrite/services/users.py delete mode 100644 app/sdks/0.7.0/server-python/docs/examples/avatars/get-browser.md delete mode 100644 app/sdks/0.7.0/server-python/docs/examples/avatars/get-credit-card.md delete mode 100644 app/sdks/0.7.0/server-python/docs/examples/avatars/get-favicon.md delete mode 100644 app/sdks/0.7.0/server-python/docs/examples/avatars/get-flag.md delete mode 100644 app/sdks/0.7.0/server-python/docs/examples/avatars/get-image.md delete mode 100644 app/sdks/0.7.0/server-python/docs/examples/avatars/get-initials.md delete mode 100644 app/sdks/0.7.0/server-python/docs/examples/avatars/get-q-r.md delete mode 100644 app/sdks/0.7.0/server-python/docs/examples/database/create-collection.md delete mode 100644 app/sdks/0.7.0/server-python/docs/examples/database/create-document.md delete mode 100644 app/sdks/0.7.0/server-python/docs/examples/database/delete-collection.md delete mode 100644 app/sdks/0.7.0/server-python/docs/examples/database/delete-document.md delete mode 100644 app/sdks/0.7.0/server-python/docs/examples/database/get-collection.md delete mode 100644 app/sdks/0.7.0/server-python/docs/examples/database/get-document.md delete mode 100644 app/sdks/0.7.0/server-python/docs/examples/database/list-collections.md delete mode 100644 app/sdks/0.7.0/server-python/docs/examples/database/list-documents.md delete mode 100644 app/sdks/0.7.0/server-python/docs/examples/database/update-collection.md delete mode 100644 app/sdks/0.7.0/server-python/docs/examples/database/update-document.md delete mode 100644 app/sdks/0.7.0/server-python/docs/examples/functions/create-execution.md delete mode 100644 app/sdks/0.7.0/server-python/docs/examples/functions/create-tag.md delete mode 100644 app/sdks/0.7.0/server-python/docs/examples/functions/create.md delete mode 100644 app/sdks/0.7.0/server-python/docs/examples/functions/delete-tag.md delete mode 100644 app/sdks/0.7.0/server-python/docs/examples/functions/delete.md delete mode 100644 app/sdks/0.7.0/server-python/docs/examples/functions/get-execution.md delete mode 100644 app/sdks/0.7.0/server-python/docs/examples/functions/get-tag.md delete mode 100644 app/sdks/0.7.0/server-python/docs/examples/functions/get.md delete mode 100644 app/sdks/0.7.0/server-python/docs/examples/functions/list-executions.md delete mode 100644 app/sdks/0.7.0/server-python/docs/examples/functions/list-tags.md delete mode 100644 app/sdks/0.7.0/server-python/docs/examples/functions/list.md delete mode 100644 app/sdks/0.7.0/server-python/docs/examples/functions/update-tag.md delete mode 100644 app/sdks/0.7.0/server-python/docs/examples/functions/update.md delete mode 100644 app/sdks/0.7.0/server-python/docs/examples/health/get-anti-virus.md delete mode 100644 app/sdks/0.7.0/server-python/docs/examples/health/get-cache.md delete mode 100644 app/sdks/0.7.0/server-python/docs/examples/health/get-d-b.md delete mode 100644 app/sdks/0.7.0/server-python/docs/examples/health/get-queue-certificates.md delete mode 100644 app/sdks/0.7.0/server-python/docs/examples/health/get-queue-functions.md delete mode 100644 app/sdks/0.7.0/server-python/docs/examples/health/get-queue-logs.md delete mode 100644 app/sdks/0.7.0/server-python/docs/examples/health/get-queue-tasks.md delete mode 100644 app/sdks/0.7.0/server-python/docs/examples/health/get-queue-usage.md delete mode 100644 app/sdks/0.7.0/server-python/docs/examples/health/get-queue-webhooks.md delete mode 100644 app/sdks/0.7.0/server-python/docs/examples/health/get-storage-local.md delete mode 100644 app/sdks/0.7.0/server-python/docs/examples/health/get-time.md delete mode 100644 app/sdks/0.7.0/server-python/docs/examples/health/get.md delete mode 100644 app/sdks/0.7.0/server-python/docs/examples/locale/get-continents.md delete mode 100644 app/sdks/0.7.0/server-python/docs/examples/locale/get-countries-e-u.md delete mode 100644 app/sdks/0.7.0/server-python/docs/examples/locale/get-countries-phones.md delete mode 100644 app/sdks/0.7.0/server-python/docs/examples/locale/get-countries.md delete mode 100644 app/sdks/0.7.0/server-python/docs/examples/locale/get-currencies.md delete mode 100644 app/sdks/0.7.0/server-python/docs/examples/locale/get-languages.md delete mode 100644 app/sdks/0.7.0/server-python/docs/examples/locale/get.md delete mode 100644 app/sdks/0.7.0/server-python/docs/examples/storage/create-file.md delete mode 100644 app/sdks/0.7.0/server-python/docs/examples/storage/delete-file.md delete mode 100644 app/sdks/0.7.0/server-python/docs/examples/storage/get-file-download.md delete mode 100644 app/sdks/0.7.0/server-python/docs/examples/storage/get-file-preview.md delete mode 100644 app/sdks/0.7.0/server-python/docs/examples/storage/get-file-view.md delete mode 100644 app/sdks/0.7.0/server-python/docs/examples/storage/get-file.md delete mode 100644 app/sdks/0.7.0/server-python/docs/examples/storage/list-files.md delete mode 100644 app/sdks/0.7.0/server-python/docs/examples/storage/update-file.md delete mode 100644 app/sdks/0.7.0/server-python/docs/examples/teams/create-membership.md delete mode 100644 app/sdks/0.7.0/server-python/docs/examples/teams/create.md delete mode 100644 app/sdks/0.7.0/server-python/docs/examples/teams/delete-membership.md delete mode 100644 app/sdks/0.7.0/server-python/docs/examples/teams/delete.md delete mode 100644 app/sdks/0.7.0/server-python/docs/examples/teams/get-memberships.md delete mode 100644 app/sdks/0.7.0/server-python/docs/examples/teams/get.md delete mode 100644 app/sdks/0.7.0/server-python/docs/examples/teams/list.md delete mode 100644 app/sdks/0.7.0/server-python/docs/examples/teams/update.md delete mode 100644 app/sdks/0.7.0/server-python/docs/examples/users/create.md delete mode 100644 app/sdks/0.7.0/server-python/docs/examples/users/delete-session.md delete mode 100644 app/sdks/0.7.0/server-python/docs/examples/users/delete-sessions.md delete mode 100644 app/sdks/0.7.0/server-python/docs/examples/users/delete-user.md delete mode 100644 app/sdks/0.7.0/server-python/docs/examples/users/get-logs.md delete mode 100644 app/sdks/0.7.0/server-python/docs/examples/users/get-prefs.md delete mode 100644 app/sdks/0.7.0/server-python/docs/examples/users/get-sessions.md delete mode 100644 app/sdks/0.7.0/server-python/docs/examples/users/get.md delete mode 100644 app/sdks/0.7.0/server-python/docs/examples/users/list.md delete mode 100644 app/sdks/0.7.0/server-python/docs/examples/users/update-prefs.md delete mode 100644 app/sdks/0.7.0/server-python/docs/examples/users/update-status.md delete mode 100644 app/sdks/0.7.0/server-python/requirements.txt delete mode 100644 app/sdks/0.7.0/server-python/setup.cfg delete mode 100644 app/sdks/0.7.0/server-python/setup.py delete mode 100644 app/sdks/0.7.0/server-ruby/CHANGELOG.md delete mode 100644 app/sdks/0.7.0/server-ruby/Gemfile delete mode 100644 app/sdks/0.7.0/server-ruby/LICENSE delete mode 100644 app/sdks/0.7.0/server-ruby/README.md delete mode 100644 app/sdks/0.7.0/server-ruby/appwrite.gemspec delete mode 100644 app/sdks/0.7.0/server-ruby/docs/examples/avatars/get-browser.md delete mode 100644 app/sdks/0.7.0/server-ruby/docs/examples/avatars/get-credit-card.md delete mode 100644 app/sdks/0.7.0/server-ruby/docs/examples/avatars/get-favicon.md delete mode 100644 app/sdks/0.7.0/server-ruby/docs/examples/avatars/get-flag.md delete mode 100644 app/sdks/0.7.0/server-ruby/docs/examples/avatars/get-image.md delete mode 100644 app/sdks/0.7.0/server-ruby/docs/examples/avatars/get-initials.md delete mode 100644 app/sdks/0.7.0/server-ruby/docs/examples/avatars/get-q-r.md delete mode 100644 app/sdks/0.7.0/server-ruby/docs/examples/database/create-collection.md delete mode 100644 app/sdks/0.7.0/server-ruby/docs/examples/database/create-document.md delete mode 100644 app/sdks/0.7.0/server-ruby/docs/examples/database/delete-collection.md delete mode 100644 app/sdks/0.7.0/server-ruby/docs/examples/database/delete-document.md delete mode 100644 app/sdks/0.7.0/server-ruby/docs/examples/database/get-collection.md delete mode 100644 app/sdks/0.7.0/server-ruby/docs/examples/database/get-document.md delete mode 100644 app/sdks/0.7.0/server-ruby/docs/examples/database/list-collections.md delete mode 100644 app/sdks/0.7.0/server-ruby/docs/examples/database/list-documents.md delete mode 100644 app/sdks/0.7.0/server-ruby/docs/examples/database/update-collection.md delete mode 100644 app/sdks/0.7.0/server-ruby/docs/examples/database/update-document.md delete mode 100644 app/sdks/0.7.0/server-ruby/docs/examples/functions/create-execution.md delete mode 100644 app/sdks/0.7.0/server-ruby/docs/examples/functions/create-tag.md delete mode 100644 app/sdks/0.7.0/server-ruby/docs/examples/functions/create.md delete mode 100644 app/sdks/0.7.0/server-ruby/docs/examples/functions/delete-tag.md delete mode 100644 app/sdks/0.7.0/server-ruby/docs/examples/functions/delete.md delete mode 100644 app/sdks/0.7.0/server-ruby/docs/examples/functions/get-execution.md delete mode 100644 app/sdks/0.7.0/server-ruby/docs/examples/functions/get-tag.md delete mode 100644 app/sdks/0.7.0/server-ruby/docs/examples/functions/get.md delete mode 100644 app/sdks/0.7.0/server-ruby/docs/examples/functions/list-executions.md delete mode 100644 app/sdks/0.7.0/server-ruby/docs/examples/functions/list-tags.md delete mode 100644 app/sdks/0.7.0/server-ruby/docs/examples/functions/list.md delete mode 100644 app/sdks/0.7.0/server-ruby/docs/examples/functions/update-tag.md delete mode 100644 app/sdks/0.7.0/server-ruby/docs/examples/functions/update.md delete mode 100644 app/sdks/0.7.0/server-ruby/docs/examples/health/get-anti-virus.md delete mode 100644 app/sdks/0.7.0/server-ruby/docs/examples/health/get-cache.md delete mode 100644 app/sdks/0.7.0/server-ruby/docs/examples/health/get-d-b.md delete mode 100644 app/sdks/0.7.0/server-ruby/docs/examples/health/get-queue-certificates.md delete mode 100644 app/sdks/0.7.0/server-ruby/docs/examples/health/get-queue-functions.md delete mode 100644 app/sdks/0.7.0/server-ruby/docs/examples/health/get-queue-logs.md delete mode 100644 app/sdks/0.7.0/server-ruby/docs/examples/health/get-queue-tasks.md delete mode 100644 app/sdks/0.7.0/server-ruby/docs/examples/health/get-queue-usage.md delete mode 100644 app/sdks/0.7.0/server-ruby/docs/examples/health/get-queue-webhooks.md delete mode 100644 app/sdks/0.7.0/server-ruby/docs/examples/health/get-storage-local.md delete mode 100644 app/sdks/0.7.0/server-ruby/docs/examples/health/get-time.md delete mode 100644 app/sdks/0.7.0/server-ruby/docs/examples/health/get.md delete mode 100644 app/sdks/0.7.0/server-ruby/docs/examples/locale/get-continents.md delete mode 100644 app/sdks/0.7.0/server-ruby/docs/examples/locale/get-countries-e-u.md delete mode 100644 app/sdks/0.7.0/server-ruby/docs/examples/locale/get-countries-phones.md delete mode 100644 app/sdks/0.7.0/server-ruby/docs/examples/locale/get-countries.md delete mode 100644 app/sdks/0.7.0/server-ruby/docs/examples/locale/get-currencies.md delete mode 100644 app/sdks/0.7.0/server-ruby/docs/examples/locale/get-languages.md delete mode 100644 app/sdks/0.7.0/server-ruby/docs/examples/locale/get.md delete mode 100644 app/sdks/0.7.0/server-ruby/docs/examples/storage/create-file.md delete mode 100644 app/sdks/0.7.0/server-ruby/docs/examples/storage/delete-file.md delete mode 100644 app/sdks/0.7.0/server-ruby/docs/examples/storage/get-file-download.md delete mode 100644 app/sdks/0.7.0/server-ruby/docs/examples/storage/get-file-preview.md delete mode 100644 app/sdks/0.7.0/server-ruby/docs/examples/storage/get-file-view.md delete mode 100644 app/sdks/0.7.0/server-ruby/docs/examples/storage/get-file.md delete mode 100644 app/sdks/0.7.0/server-ruby/docs/examples/storage/list-files.md delete mode 100644 app/sdks/0.7.0/server-ruby/docs/examples/storage/update-file.md delete mode 100644 app/sdks/0.7.0/server-ruby/docs/examples/teams/create-membership.md delete mode 100644 app/sdks/0.7.0/server-ruby/docs/examples/teams/create.md delete mode 100644 app/sdks/0.7.0/server-ruby/docs/examples/teams/delete-membership.md delete mode 100644 app/sdks/0.7.0/server-ruby/docs/examples/teams/delete.md delete mode 100644 app/sdks/0.7.0/server-ruby/docs/examples/teams/get-memberships.md delete mode 100644 app/sdks/0.7.0/server-ruby/docs/examples/teams/get.md delete mode 100644 app/sdks/0.7.0/server-ruby/docs/examples/teams/list.md delete mode 100644 app/sdks/0.7.0/server-ruby/docs/examples/teams/update.md delete mode 100644 app/sdks/0.7.0/server-ruby/docs/examples/users/create.md delete mode 100644 app/sdks/0.7.0/server-ruby/docs/examples/users/delete-session.md delete mode 100644 app/sdks/0.7.0/server-ruby/docs/examples/users/delete-sessions.md delete mode 100644 app/sdks/0.7.0/server-ruby/docs/examples/users/delete-user.md delete mode 100644 app/sdks/0.7.0/server-ruby/docs/examples/users/get-logs.md delete mode 100644 app/sdks/0.7.0/server-ruby/docs/examples/users/get-prefs.md delete mode 100644 app/sdks/0.7.0/server-ruby/docs/examples/users/get-sessions.md delete mode 100644 app/sdks/0.7.0/server-ruby/docs/examples/users/get.md delete mode 100644 app/sdks/0.7.0/server-ruby/docs/examples/users/list.md delete mode 100644 app/sdks/0.7.0/server-ruby/docs/examples/users/update-prefs.md delete mode 100644 app/sdks/0.7.0/server-ruby/docs/examples/users/update-status.md delete mode 100644 app/sdks/0.7.0/server-ruby/lib/appwrite.rb delete mode 100644 app/sdks/0.7.0/server-ruby/lib/appwrite/client.rb delete mode 100644 app/sdks/0.7.0/server-ruby/lib/appwrite/service.rb delete mode 100644 app/sdks/0.7.0/server-ruby/lib/appwrite/services/avatars.rb delete mode 100644 app/sdks/0.7.0/server-ruby/lib/appwrite/services/database.rb delete mode 100644 app/sdks/0.7.0/server-ruby/lib/appwrite/services/functions.rb delete mode 100644 app/sdks/0.7.0/server-ruby/lib/appwrite/services/health.rb delete mode 100644 app/sdks/0.7.0/server-ruby/lib/appwrite/services/locale.rb delete mode 100644 app/sdks/0.7.0/server-ruby/lib/appwrite/services/storage.rb delete mode 100644 app/sdks/0.7.0/server-ruby/lib/appwrite/services/teams.rb delete mode 100644 app/sdks/0.7.0/server-ruby/lib/appwrite/services/users.rb diff --git a/app/sdks/0.6.2/client-flutter/CHANGELOG.md b/app/sdks/0.6.2/client-flutter/CHANGELOG.md deleted file mode 100644 index a584ad8b9a..0000000000 --- a/app/sdks/0.6.2/client-flutter/CHANGELOG.md +++ /dev/null @@ -1,60 +0,0 @@ -## 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.6.2/client-flutter/LICENSE b/app/sdks/0.6.2/client-flutter/LICENSE deleted file mode 100644 index fc7c051a91..0000000000 --- a/app/sdks/0.6.2/client-flutter/LICENSE +++ /dev/null @@ -1,12 +0,0 @@ -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.6.2/client-flutter/README.md b/app/sdks/0.6.2/client-flutter/README.md deleted file mode 100644 index d272426ee3..0000000000 --- a/app/sdks/0.6.2/client-flutter/README.md +++ /dev/null @@ -1,38 +0,0 @@ -# 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.6.2/client-flutter/docs/examples/account/create-o-auth2session.md b/app/sdks/0.6.2/client-flutter/docs/examples/account/create-o-auth2session.md deleted file mode 100644 index 0e26dd27af..0000000000 --- a/app/sdks/0.6.2/client-flutter/docs/examples/account/create-o-auth2session.md +++ /dev/null @@ -1,22 +0,0 @@ -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.6.2/client-flutter/docs/examples/account/create-recovery.md b/app/sdks/0.6.2/client-flutter/docs/examples/account/create-recovery.md deleted file mode 100644 index 50db45b15d..0000000000 --- a/app/sdks/0.6.2/client-flutter/docs/examples/account/create-recovery.md +++ /dev/null @@ -1,23 +0,0 @@ -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.6.2/client-flutter/docs/examples/account/create-session.md b/app/sdks/0.6.2/client-flutter/docs/examples/account/create-session.md deleted file mode 100644 index ef824b4eca..0000000000 --- a/app/sdks/0.6.2/client-flutter/docs/examples/account/create-session.md +++ /dev/null @@ -1,23 +0,0 @@ -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.6.2/client-flutter/docs/examples/account/create-verification.md b/app/sdks/0.6.2/client-flutter/docs/examples/account/create-verification.md deleted file mode 100644 index 6b9b1ace40..0000000000 --- a/app/sdks/0.6.2/client-flutter/docs/examples/account/create-verification.md +++ /dev/null @@ -1,22 +0,0 @@ -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.6.2/client-flutter/docs/examples/account/create.md b/app/sdks/0.6.2/client-flutter/docs/examples/account/create.md deleted file mode 100644 index 384258ae68..0000000000 --- a/app/sdks/0.6.2/client-flutter/docs/examples/account/create.md +++ /dev/null @@ -1,23 +0,0 @@ -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.6.2/client-flutter/docs/examples/account/delete-session.md b/app/sdks/0.6.2/client-flutter/docs/examples/account/delete-session.md deleted file mode 100644 index 80a3f505d0..0000000000 --- a/app/sdks/0.6.2/client-flutter/docs/examples/account/delete-session.md +++ /dev/null @@ -1,22 +0,0 @@ -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.6.2/client-flutter/docs/examples/account/delete-sessions.md b/app/sdks/0.6.2/client-flutter/docs/examples/account/delete-sessions.md deleted file mode 100644 index 74e494db25..0000000000 --- a/app/sdks/0.6.2/client-flutter/docs/examples/account/delete-sessions.md +++ /dev/null @@ -1,20 +0,0 @@ -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.6.2/client-flutter/docs/examples/account/delete.md b/app/sdks/0.6.2/client-flutter/docs/examples/account/delete.md deleted file mode 100644 index 2d9d302af0..0000000000 --- a/app/sdks/0.6.2/client-flutter/docs/examples/account/delete.md +++ /dev/null @@ -1,20 +0,0 @@ -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.6.2/client-flutter/docs/examples/account/get-logs.md b/app/sdks/0.6.2/client-flutter/docs/examples/account/get-logs.md deleted file mode 100644 index 4240e55eec..0000000000 --- a/app/sdks/0.6.2/client-flutter/docs/examples/account/get-logs.md +++ /dev/null @@ -1,20 +0,0 @@ -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.6.2/client-flutter/docs/examples/account/get-prefs.md b/app/sdks/0.6.2/client-flutter/docs/examples/account/get-prefs.md deleted file mode 100644 index d98dcd7290..0000000000 --- a/app/sdks/0.6.2/client-flutter/docs/examples/account/get-prefs.md +++ /dev/null @@ -1,20 +0,0 @@ -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.6.2/client-flutter/docs/examples/account/get-sessions.md b/app/sdks/0.6.2/client-flutter/docs/examples/account/get-sessions.md deleted file mode 100644 index b5ecd34e45..0000000000 --- a/app/sdks/0.6.2/client-flutter/docs/examples/account/get-sessions.md +++ /dev/null @@ -1,20 +0,0 @@ -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.6.2/client-flutter/docs/examples/account/get.md b/app/sdks/0.6.2/client-flutter/docs/examples/account/get.md deleted file mode 100644 index a77fbf3ad5..0000000000 --- a/app/sdks/0.6.2/client-flutter/docs/examples/account/get.md +++ /dev/null @@ -1,20 +0,0 @@ -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.6.2/client-flutter/docs/examples/account/update-email.md b/app/sdks/0.6.2/client-flutter/docs/examples/account/update-email.md deleted file mode 100644 index 4a1a002db4..0000000000 --- a/app/sdks/0.6.2/client-flutter/docs/examples/account/update-email.md +++ /dev/null @@ -1,23 +0,0 @@ -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.6.2/client-flutter/docs/examples/account/update-name.md b/app/sdks/0.6.2/client-flutter/docs/examples/account/update-name.md deleted file mode 100644 index fa432bb34a..0000000000 --- a/app/sdks/0.6.2/client-flutter/docs/examples/account/update-name.md +++ /dev/null @@ -1,22 +0,0 @@ -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.6.2/client-flutter/docs/examples/account/update-password.md b/app/sdks/0.6.2/client-flutter/docs/examples/account/update-password.md deleted file mode 100644 index 9bd8ad9b77..0000000000 --- a/app/sdks/0.6.2/client-flutter/docs/examples/account/update-password.md +++ /dev/null @@ -1,23 +0,0 @@ -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.6.2/client-flutter/docs/examples/account/update-prefs.md b/app/sdks/0.6.2/client-flutter/docs/examples/account/update-prefs.md deleted file mode 100644 index 443252f89a..0000000000 --- a/app/sdks/0.6.2/client-flutter/docs/examples/account/update-prefs.md +++ /dev/null @@ -1,22 +0,0 @@ -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.6.2/client-flutter/docs/examples/account/update-recovery.md b/app/sdks/0.6.2/client-flutter/docs/examples/account/update-recovery.md deleted file mode 100644 index 5140235d49..0000000000 --- a/app/sdks/0.6.2/client-flutter/docs/examples/account/update-recovery.md +++ /dev/null @@ -1,25 +0,0 @@ -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.6.2/client-flutter/docs/examples/account/update-verification.md b/app/sdks/0.6.2/client-flutter/docs/examples/account/update-verification.md deleted file mode 100644 index b795cde92d..0000000000 --- a/app/sdks/0.6.2/client-flutter/docs/examples/account/update-verification.md +++ /dev/null @@ -1,23 +0,0 @@ -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.6.2/client-flutter/docs/examples/avatars/get-browser.md b/app/sdks/0.6.2/client-flutter/docs/examples/avatars/get-browser.md deleted file mode 100644 index 464767c4c0..0000000000 --- a/app/sdks/0.6.2/client-flutter/docs/examples/avatars/get-browser.md +++ /dev/null @@ -1,17 +0,0 @@ -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.6.2/client-flutter/docs/examples/avatars/get-credit-card.md b/app/sdks/0.6.2/client-flutter/docs/examples/avatars/get-credit-card.md deleted file mode 100644 index 482c642402..0000000000 --- a/app/sdks/0.6.2/client-flutter/docs/examples/avatars/get-credit-card.md +++ /dev/null @@ -1,17 +0,0 @@ -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.6.2/client-flutter/docs/examples/avatars/get-favicon.md b/app/sdks/0.6.2/client-flutter/docs/examples/avatars/get-favicon.md deleted file mode 100644 index 60397b0af2..0000000000 --- a/app/sdks/0.6.2/client-flutter/docs/examples/avatars/get-favicon.md +++ /dev/null @@ -1,17 +0,0 @@ -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.6.2/client-flutter/docs/examples/avatars/get-flag.md b/app/sdks/0.6.2/client-flutter/docs/examples/avatars/get-flag.md deleted file mode 100644 index a9f7a711d9..0000000000 --- a/app/sdks/0.6.2/client-flutter/docs/examples/avatars/get-flag.md +++ /dev/null @@ -1,17 +0,0 @@ -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.6.2/client-flutter/docs/examples/avatars/get-image.md b/app/sdks/0.6.2/client-flutter/docs/examples/avatars/get-image.md deleted file mode 100644 index 7cead1cb2f..0000000000 --- a/app/sdks/0.6.2/client-flutter/docs/examples/avatars/get-image.md +++ /dev/null @@ -1,17 +0,0 @@ -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.6.2/client-flutter/docs/examples/avatars/get-initials.md b/app/sdks/0.6.2/client-flutter/docs/examples/avatars/get-initials.md deleted file mode 100644 index b2e70788d6..0000000000 --- a/app/sdks/0.6.2/client-flutter/docs/examples/avatars/get-initials.md +++ /dev/null @@ -1,16 +0,0 @@ -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.6.2/client-flutter/docs/examples/avatars/get-q-r.md b/app/sdks/0.6.2/client-flutter/docs/examples/avatars/get-q-r.md deleted file mode 100644 index a5bcfd2c05..0000000000 --- a/app/sdks/0.6.2/client-flutter/docs/examples/avatars/get-q-r.md +++ /dev/null @@ -1,17 +0,0 @@ -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.6.2/client-flutter/docs/examples/database/create-document.md b/app/sdks/0.6.2/client-flutter/docs/examples/database/create-document.md deleted file mode 100644 index b7d540bc2d..0000000000 --- a/app/sdks/0.6.2/client-flutter/docs/examples/database/create-document.md +++ /dev/null @@ -1,25 +0,0 @@ -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.6.2/client-flutter/docs/examples/database/delete-document.md b/app/sdks/0.6.2/client-flutter/docs/examples/database/delete-document.md deleted file mode 100644 index 40c1cbdfe2..0000000000 --- a/app/sdks/0.6.2/client-flutter/docs/examples/database/delete-document.md +++ /dev/null @@ -1,23 +0,0 @@ -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.6.2/client-flutter/docs/examples/database/get-document.md b/app/sdks/0.6.2/client-flutter/docs/examples/database/get-document.md deleted file mode 100644 index 0c98142315..0000000000 --- a/app/sdks/0.6.2/client-flutter/docs/examples/database/get-document.md +++ /dev/null @@ -1,23 +0,0 @@ -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.6.2/client-flutter/docs/examples/database/list-documents.md b/app/sdks/0.6.2/client-flutter/docs/examples/database/list-documents.md deleted file mode 100644 index 0685e7f1aa..0000000000 --- a/app/sdks/0.6.2/client-flutter/docs/examples/database/list-documents.md +++ /dev/null @@ -1,22 +0,0 @@ -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.6.2/client-flutter/docs/examples/database/update-document.md b/app/sdks/0.6.2/client-flutter/docs/examples/database/update-document.md deleted file mode 100644 index 2f37cd767a..0000000000 --- a/app/sdks/0.6.2/client-flutter/docs/examples/database/update-document.md +++ /dev/null @@ -1,26 +0,0 @@ -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.6.2/client-flutter/docs/examples/locale/get-continents.md b/app/sdks/0.6.2/client-flutter/docs/examples/locale/get-continents.md deleted file mode 100644 index 60d4f32c4f..0000000000 --- a/app/sdks/0.6.2/client-flutter/docs/examples/locale/get-continents.md +++ /dev/null @@ -1,20 +0,0 @@ -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.6.2/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 deleted file mode 100644 index 766006fecc..0000000000 --- a/app/sdks/0.6.2/client-flutter/docs/examples/locale/get-countries-e-u.md +++ /dev/null @@ -1,20 +0,0 @@ -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.6.2/client-flutter/docs/examples/locale/get-countries-phones.md b/app/sdks/0.6.2/client-flutter/docs/examples/locale/get-countries-phones.md deleted file mode 100644 index 786eeb0b70..0000000000 --- a/app/sdks/0.6.2/client-flutter/docs/examples/locale/get-countries-phones.md +++ /dev/null @@ -1,20 +0,0 @@ -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.6.2/client-flutter/docs/examples/locale/get-countries.md b/app/sdks/0.6.2/client-flutter/docs/examples/locale/get-countries.md deleted file mode 100644 index 0570421ef9..0000000000 --- a/app/sdks/0.6.2/client-flutter/docs/examples/locale/get-countries.md +++ /dev/null @@ -1,20 +0,0 @@ -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.6.2/client-flutter/docs/examples/locale/get-currencies.md b/app/sdks/0.6.2/client-flutter/docs/examples/locale/get-currencies.md deleted file mode 100644 index 7846c3c710..0000000000 --- a/app/sdks/0.6.2/client-flutter/docs/examples/locale/get-currencies.md +++ /dev/null @@ -1,20 +0,0 @@ -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.6.2/client-flutter/docs/examples/locale/get-languages.md b/app/sdks/0.6.2/client-flutter/docs/examples/locale/get-languages.md deleted file mode 100644 index 4f526383fa..0000000000 --- a/app/sdks/0.6.2/client-flutter/docs/examples/locale/get-languages.md +++ /dev/null @@ -1,20 +0,0 @@ -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.6.2/client-flutter/docs/examples/locale/get.md b/app/sdks/0.6.2/client-flutter/docs/examples/locale/get.md deleted file mode 100644 index 2dbdd47f63..0000000000 --- a/app/sdks/0.6.2/client-flutter/docs/examples/locale/get.md +++ /dev/null @@ -1,20 +0,0 @@ -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.6.2/client-flutter/docs/examples/storage/create-file.md b/app/sdks/0.6.2/client-flutter/docs/examples/storage/create-file.md deleted file mode 100644 index 9f61be12f4..0000000000 --- a/app/sdks/0.6.2/client-flutter/docs/examples/storage/create-file.md +++ /dev/null @@ -1,25 +0,0 @@ -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.6.2/client-flutter/docs/examples/storage/delete-file.md b/app/sdks/0.6.2/client-flutter/docs/examples/storage/delete-file.md deleted file mode 100644 index 271ed7b2dd..0000000000 --- a/app/sdks/0.6.2/client-flutter/docs/examples/storage/delete-file.md +++ /dev/null @@ -1,22 +0,0 @@ -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.6.2/client-flutter/docs/examples/storage/get-file-download.md b/app/sdks/0.6.2/client-flutter/docs/examples/storage/get-file-download.md deleted file mode 100644 index be3385a61b..0000000000 --- a/app/sdks/0.6.2/client-flutter/docs/examples/storage/get-file-download.md +++ /dev/null @@ -1,17 +0,0 @@ -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.6.2/client-flutter/docs/examples/storage/get-file-preview.md b/app/sdks/0.6.2/client-flutter/docs/examples/storage/get-file-preview.md deleted file mode 100644 index 8bd1a47457..0000000000 --- a/app/sdks/0.6.2/client-flutter/docs/examples/storage/get-file-preview.md +++ /dev/null @@ -1,17 +0,0 @@ -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.6.2/client-flutter/docs/examples/storage/get-file-view.md b/app/sdks/0.6.2/client-flutter/docs/examples/storage/get-file-view.md deleted file mode 100644 index 5803fd409f..0000000000 --- a/app/sdks/0.6.2/client-flutter/docs/examples/storage/get-file-view.md +++ /dev/null @@ -1,17 +0,0 @@ -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.6.2/client-flutter/docs/examples/storage/get-file.md b/app/sdks/0.6.2/client-flutter/docs/examples/storage/get-file.md deleted file mode 100644 index feca667fa9..0000000000 --- a/app/sdks/0.6.2/client-flutter/docs/examples/storage/get-file.md +++ /dev/null @@ -1,22 +0,0 @@ -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.6.2/client-flutter/docs/examples/storage/list-files.md b/app/sdks/0.6.2/client-flutter/docs/examples/storage/list-files.md deleted file mode 100644 index 1963ec694d..0000000000 --- a/app/sdks/0.6.2/client-flutter/docs/examples/storage/list-files.md +++ /dev/null @@ -1,21 +0,0 @@ -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.6.2/client-flutter/docs/examples/storage/update-file.md b/app/sdks/0.6.2/client-flutter/docs/examples/storage/update-file.md deleted file mode 100644 index a5ecbfe987..0000000000 --- a/app/sdks/0.6.2/client-flutter/docs/examples/storage/update-file.md +++ /dev/null @@ -1,24 +0,0 @@ -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.6.2/client-flutter/docs/examples/teams/create-membership.md b/app/sdks/0.6.2/client-flutter/docs/examples/teams/create-membership.md deleted file mode 100644 index e5e82de7b4..0000000000 --- a/app/sdks/0.6.2/client-flutter/docs/examples/teams/create-membership.md +++ /dev/null @@ -1,25 +0,0 @@ -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.6.2/client-flutter/docs/examples/teams/create.md b/app/sdks/0.6.2/client-flutter/docs/examples/teams/create.md deleted file mode 100644 index d11958ae6d..0000000000 --- a/app/sdks/0.6.2/client-flutter/docs/examples/teams/create.md +++ /dev/null @@ -1,22 +0,0 @@ -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.6.2/client-flutter/docs/examples/teams/delete-membership.md b/app/sdks/0.6.2/client-flutter/docs/examples/teams/delete-membership.md deleted file mode 100644 index 3f57b840fe..0000000000 --- a/app/sdks/0.6.2/client-flutter/docs/examples/teams/delete-membership.md +++ /dev/null @@ -1,23 +0,0 @@ -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.6.2/client-flutter/docs/examples/teams/delete.md b/app/sdks/0.6.2/client-flutter/docs/examples/teams/delete.md deleted file mode 100644 index 9fb488afec..0000000000 --- a/app/sdks/0.6.2/client-flutter/docs/examples/teams/delete.md +++ /dev/null @@ -1,22 +0,0 @@ -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.6.2/client-flutter/docs/examples/teams/get-memberships.md b/app/sdks/0.6.2/client-flutter/docs/examples/teams/get-memberships.md deleted file mode 100644 index 4edadfa2b4..0000000000 --- a/app/sdks/0.6.2/client-flutter/docs/examples/teams/get-memberships.md +++ /dev/null @@ -1,22 +0,0 @@ -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.6.2/client-flutter/docs/examples/teams/get.md b/app/sdks/0.6.2/client-flutter/docs/examples/teams/get.md deleted file mode 100644 index 083565f7a6..0000000000 --- a/app/sdks/0.6.2/client-flutter/docs/examples/teams/get.md +++ /dev/null @@ -1,22 +0,0 @@ -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.6.2/client-flutter/docs/examples/teams/list.md b/app/sdks/0.6.2/client-flutter/docs/examples/teams/list.md deleted file mode 100644 index 665020e928..0000000000 --- a/app/sdks/0.6.2/client-flutter/docs/examples/teams/list.md +++ /dev/null @@ -1,21 +0,0 @@ -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.6.2/client-flutter/docs/examples/teams/update-membership-status.md b/app/sdks/0.6.2/client-flutter/docs/examples/teams/update-membership-status.md deleted file mode 100644 index 616f64e148..0000000000 --- a/app/sdks/0.6.2/client-flutter/docs/examples/teams/update-membership-status.md +++ /dev/null @@ -1,25 +0,0 @@ -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.6.2/client-flutter/docs/examples/teams/update.md b/app/sdks/0.6.2/client-flutter/docs/examples/teams/update.md deleted file mode 100644 index 915fb57d38..0000000000 --- a/app/sdks/0.6.2/client-flutter/docs/examples/teams/update.md +++ /dev/null @@ -1,23 +0,0 @@ -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.6.2/client-flutter/example/README.md b/app/sdks/0.6.2/client-flutter/example/README.md deleted file mode 100644 index f6768a5f85..0000000000 --- a/app/sdks/0.6.2/client-flutter/example/README.md +++ /dev/null @@ -1,55 +0,0 @@ -# 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.6.2/client-flutter/lib/appwrite.dart b/app/sdks/0.6.2/client-flutter/lib/appwrite.dart deleted file mode 100644 index 95d0b72cfe..0000000000 --- a/app/sdks/0.6.2/client-flutter/lib/appwrite.dart +++ /dev/null @@ -1,10 +0,0 @@ -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.6.2/client-flutter/lib/client.dart b/app/sdks/0.6.2/client-flutter/lib/client.dart deleted file mode 100644 index 96fbf60780..0000000000 --- a/app/sdks/0.6.2/client-flutter/lib/client.dart +++ /dev/null @@ -1,144 +0,0 @@ -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)); - if(Platform.isAndroid || Platform.isIOS) { - PackageInfo packageInfo = await PackageInfo.fromPlatform(); - addHeader('Origin', 'appwrite-' + type + '://' + packageInfo.packageName); - } else if(Platform.isLinux) { - addHeader('Origin', 'appwrite-linux://'); - } else if(Platform.isMacOS) { - addHeader('Origin', 'appwrite-macos://'); - } else if(Platform.isWindows) { - addHeader('Origin', 'appwrite-windows://'); - } else if(Platform.isFuchsia) { - addHeader('Origin', 'appwrite-fuchsia://'); - } - }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.6.2/client-flutter/lib/enums.dart b/app/sdks/0.6.2/client-flutter/lib/enums.dart deleted file mode 100644 index 2757f6073e..0000000000 --- a/app/sdks/0.6.2/client-flutter/lib/enums.dart +++ /dev/null @@ -1,15 +0,0 @@ -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.6.2/client-flutter/lib/service.dart b/app/sdks/0.6.2/client-flutter/lib/service.dart deleted file mode 100644 index 1ae319b705..0000000000 --- a/app/sdks/0.6.2/client-flutter/lib/service.dart +++ /dev/null @@ -1,7 +0,0 @@ -import 'client.dart'; - -class Service { - final Client client; - - const Service(this.client); -} diff --git a/app/sdks/0.6.2/client-flutter/lib/services/account.dart b/app/sdks/0.6.2/client-flutter/lib/services/account.dart deleted file mode 100644 index 890303a9d6..0000000000 --- a/app/sdks/0.6.2/client-flutter/lib/services/account.dart +++ /dev/null @@ -1,435 +0,0 @@ - -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.6.2/client-flutter/lib/services/avatars.dart b/app/sdks/0.6.2/client-flutter/lib/services/avatars.dart deleted file mode 100644 index b7fa6393ef..0000000000 --- a/app/sdks/0.6.2/client-flutter/lib/services/avatars.dart +++ /dev/null @@ -1,238 +0,0 @@ - - -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.6.2/client-flutter/lib/services/database.dart b/app/sdks/0.6.2/client-flutter/lib/services/database.dart deleted file mode 100644 index 0fec1fb4d6..0000000000 --- a/app/sdks/0.6.2/client-flutter/lib/services/database.dart +++ /dev/null @@ -1,119 +0,0 @@ - - -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.6.2/client-flutter/lib/services/locale.dart b/app/sdks/0.6.2/client-flutter/lib/services/locale.dart deleted file mode 100644 index 095af4792c..0000000000 --- a/app/sdks/0.6.2/client-flutter/lib/services/locale.dart +++ /dev/null @@ -1,143 +0,0 @@ - - -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.6.2/client-flutter/lib/services/storage.dart b/app/sdks/0.6.2/client-flutter/lib/services/storage.dart deleted file mode 100644 index 51f9345050..0000000000 --- a/app/sdks/0.6.2/client-flutter/lib/services/storage.dart +++ /dev/null @@ -1,203 +0,0 @@ - - -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.6.2/client-flutter/lib/services/teams.dart b/app/sdks/0.6.2/client-flutter/lib/services/teams.dart deleted file mode 100644 index b9205da455..0000000000 --- a/app/sdks/0.6.2/client-flutter/lib/services/teams.dart +++ /dev/null @@ -1,207 +0,0 @@ - - -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.6.2/client-flutter/pubspec.yaml b/app/sdks/0.6.2/client-flutter/pubspec.yaml deleted file mode 100644 index cabc271c5e..0000000000 --- a/app/sdks/0.6.2/client-flutter/pubspec.yaml +++ /dev/null @@ -1,24 +0,0 @@ -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.6.2/client-web/CHANGELOG.md b/app/sdks/0.6.2/client-web/CHANGELOG.md deleted file mode 100644 index fa4d35e687..0000000000 --- a/app/sdks/0.6.2/client-web/CHANGELOG.md +++ /dev/null @@ -1 +0,0 @@ -# Change Log \ No newline at end of file diff --git a/app/sdks/0.6.2/client-web/LICENSE b/app/sdks/0.6.2/client-web/LICENSE deleted file mode 100644 index fc7c051a91..0000000000 --- a/app/sdks/0.6.2/client-web/LICENSE +++ /dev/null @@ -1,12 +0,0 @@ -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.6.2/client-web/README.md b/app/sdks/0.6.2/client-web/README.md deleted file mode 100644 index a2e240317c..0000000000 --- a/app/sdks/0.6.2/client-web/README.md +++ /dev/null @@ -1,59 +0,0 @@ -# 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.6.2-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 - -``` - -## Getting Started - -Initialise the Appwrite SDK in your code, and setup your API credentials: - -```js - -// Init your Web SDK -var appwrite = new Appwrite(); - -appwrite - .setEndpoint('http://localhost/v1') // Set only when using self-hosted solution - .setProject('455x34dfkj') // Your Appwrite Project UID -; - -``` - - -## 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.6.2/client-web/docs/examples/account/create-o-auth2session.md b/app/sdks/0.6.2/client-web/docs/examples/account/create-o-auth2session.md deleted file mode 100644 index 25b02e632e..0000000000 --- a/app/sdks/0.6.2/client-web/docs/examples/account/create-o-auth2session.md +++ /dev/null @@ -1,10 +0,0 @@ -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.6.2/client-web/docs/examples/account/create-recovery.md b/app/sdks/0.6.2/client-web/docs/examples/account/create-recovery.md deleted file mode 100644 index 72130f4de4..0000000000 --- a/app/sdks/0.6.2/client-web/docs/examples/account/create-recovery.md +++ /dev/null @@ -1,14 +0,0 @@ -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.6.2/client-web/docs/examples/account/create-session.md b/app/sdks/0.6.2/client-web/docs/examples/account/create-session.md deleted file mode 100644 index 4a7682c13d..0000000000 --- a/app/sdks/0.6.2/client-web/docs/examples/account/create-session.md +++ /dev/null @@ -1,14 +0,0 @@ -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.6.2/client-web/docs/examples/account/create-verification.md b/app/sdks/0.6.2/client-web/docs/examples/account/create-verification.md deleted file mode 100644 index 7903384a9f..0000000000 --- a/app/sdks/0.6.2/client-web/docs/examples/account/create-verification.md +++ /dev/null @@ -1,14 +0,0 @@ -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.6.2/client-web/docs/examples/account/create.md b/app/sdks/0.6.2/client-web/docs/examples/account/create.md deleted file mode 100644 index c9ce798b6a..0000000000 --- a/app/sdks/0.6.2/client-web/docs/examples/account/create.md +++ /dev/null @@ -1,14 +0,0 @@ -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.6.2/client-web/docs/examples/account/delete-session.md b/app/sdks/0.6.2/client-web/docs/examples/account/delete-session.md deleted file mode 100644 index 581e5d132d..0000000000 --- a/app/sdks/0.6.2/client-web/docs/examples/account/delete-session.md +++ /dev/null @@ -1,14 +0,0 @@ -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.6.2/client-web/docs/examples/account/delete-sessions.md b/app/sdks/0.6.2/client-web/docs/examples/account/delete-sessions.md deleted file mode 100644 index d037673eb3..0000000000 --- a/app/sdks/0.6.2/client-web/docs/examples/account/delete-sessions.md +++ /dev/null @@ -1,14 +0,0 @@ -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.6.2/client-web/docs/examples/account/delete.md b/app/sdks/0.6.2/client-web/docs/examples/account/delete.md deleted file mode 100644 index d952d77d7a..0000000000 --- a/app/sdks/0.6.2/client-web/docs/examples/account/delete.md +++ /dev/null @@ -1,14 +0,0 @@ -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.6.2/client-web/docs/examples/account/get-logs.md b/app/sdks/0.6.2/client-web/docs/examples/account/get-logs.md deleted file mode 100644 index c53e0446e9..0000000000 --- a/app/sdks/0.6.2/client-web/docs/examples/account/get-logs.md +++ /dev/null @@ -1,14 +0,0 @@ -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.6.2/client-web/docs/examples/account/get-prefs.md b/app/sdks/0.6.2/client-web/docs/examples/account/get-prefs.md deleted file mode 100644 index 75835e37fb..0000000000 --- a/app/sdks/0.6.2/client-web/docs/examples/account/get-prefs.md +++ /dev/null @@ -1,14 +0,0 @@ -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.6.2/client-web/docs/examples/account/get-sessions.md b/app/sdks/0.6.2/client-web/docs/examples/account/get-sessions.md deleted file mode 100644 index b4434de336..0000000000 --- a/app/sdks/0.6.2/client-web/docs/examples/account/get-sessions.md +++ /dev/null @@ -1,14 +0,0 @@ -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.6.2/client-web/docs/examples/account/get.md b/app/sdks/0.6.2/client-web/docs/examples/account/get.md deleted file mode 100644 index f0184a8513..0000000000 --- a/app/sdks/0.6.2/client-web/docs/examples/account/get.md +++ /dev/null @@ -1,14 +0,0 @@ -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.6.2/client-web/docs/examples/account/update-email.md b/app/sdks/0.6.2/client-web/docs/examples/account/update-email.md deleted file mode 100644 index f48fed78bc..0000000000 --- a/app/sdks/0.6.2/client-web/docs/examples/account/update-email.md +++ /dev/null @@ -1,14 +0,0 @@ -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.6.2/client-web/docs/examples/account/update-name.md b/app/sdks/0.6.2/client-web/docs/examples/account/update-name.md deleted file mode 100644 index e03e72c4b2..0000000000 --- a/app/sdks/0.6.2/client-web/docs/examples/account/update-name.md +++ /dev/null @@ -1,14 +0,0 @@ -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.6.2/client-web/docs/examples/account/update-password.md b/app/sdks/0.6.2/client-web/docs/examples/account/update-password.md deleted file mode 100644 index 22539f3f64..0000000000 --- a/app/sdks/0.6.2/client-web/docs/examples/account/update-password.md +++ /dev/null @@ -1,14 +0,0 @@ -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.6.2/client-web/docs/examples/account/update-prefs.md b/app/sdks/0.6.2/client-web/docs/examples/account/update-prefs.md deleted file mode 100644 index b2d4ff175e..0000000000 --- a/app/sdks/0.6.2/client-web/docs/examples/account/update-prefs.md +++ /dev/null @@ -1,14 +0,0 @@ -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.6.2/client-web/docs/examples/account/update-recovery.md b/app/sdks/0.6.2/client-web/docs/examples/account/update-recovery.md deleted file mode 100644 index 33cf1b63c9..0000000000 --- a/app/sdks/0.6.2/client-web/docs/examples/account/update-recovery.md +++ /dev/null @@ -1,14 +0,0 @@ -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.6.2/client-web/docs/examples/account/update-verification.md b/app/sdks/0.6.2/client-web/docs/examples/account/update-verification.md deleted file mode 100644 index a80e125e30..0000000000 --- a/app/sdks/0.6.2/client-web/docs/examples/account/update-verification.md +++ /dev/null @@ -1,14 +0,0 @@ -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.6.2/client-web/docs/examples/avatars/get-browser.md b/app/sdks/0.6.2/client-web/docs/examples/avatars/get-browser.md deleted file mode 100644 index 0855209f58..0000000000 --- a/app/sdks/0.6.2/client-web/docs/examples/avatars/get-browser.md +++ /dev/null @@ -1,10 +0,0 @@ -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.6.2/client-web/docs/examples/avatars/get-credit-card.md b/app/sdks/0.6.2/client-web/docs/examples/avatars/get-credit-card.md deleted file mode 100644 index 1aa595bd65..0000000000 --- a/app/sdks/0.6.2/client-web/docs/examples/avatars/get-credit-card.md +++ /dev/null @@ -1,10 +0,0 @@ -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.6.2/client-web/docs/examples/avatars/get-favicon.md b/app/sdks/0.6.2/client-web/docs/examples/avatars/get-favicon.md deleted file mode 100644 index a945e50bb2..0000000000 --- a/app/sdks/0.6.2/client-web/docs/examples/avatars/get-favicon.md +++ /dev/null @@ -1,10 +0,0 @@ -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.6.2/client-web/docs/examples/avatars/get-flag.md b/app/sdks/0.6.2/client-web/docs/examples/avatars/get-flag.md deleted file mode 100644 index 222b388afc..0000000000 --- a/app/sdks/0.6.2/client-web/docs/examples/avatars/get-flag.md +++ /dev/null @@ -1,10 +0,0 @@ -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.6.2/client-web/docs/examples/avatars/get-image.md b/app/sdks/0.6.2/client-web/docs/examples/avatars/get-image.md deleted file mode 100644 index 3f15981c71..0000000000 --- a/app/sdks/0.6.2/client-web/docs/examples/avatars/get-image.md +++ /dev/null @@ -1,10 +0,0 @@ -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.6.2/client-web/docs/examples/avatars/get-initials.md b/app/sdks/0.6.2/client-web/docs/examples/avatars/get-initials.md deleted file mode 100644 index ef04988e2d..0000000000 --- a/app/sdks/0.6.2/client-web/docs/examples/avatars/get-initials.md +++ /dev/null @@ -1,10 +0,0 @@ -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.6.2/client-web/docs/examples/avatars/get-q-r.md b/app/sdks/0.6.2/client-web/docs/examples/avatars/get-q-r.md deleted file mode 100644 index 9d9ee3fea2..0000000000 --- a/app/sdks/0.6.2/client-web/docs/examples/avatars/get-q-r.md +++ /dev/null @@ -1,10 +0,0 @@ -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.6.2/client-web/docs/examples/database/create-document.md b/app/sdks/0.6.2/client-web/docs/examples/database/create-document.md deleted file mode 100644 index e04f73f73e..0000000000 --- a/app/sdks/0.6.2/client-web/docs/examples/database/create-document.md +++ /dev/null @@ -1,14 +0,0 @@ -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.6.2/client-web/docs/examples/database/delete-document.md b/app/sdks/0.6.2/client-web/docs/examples/database/delete-document.md deleted file mode 100644 index 79799b6907..0000000000 --- a/app/sdks/0.6.2/client-web/docs/examples/database/delete-document.md +++ /dev/null @@ -1,14 +0,0 @@ -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.6.2/client-web/docs/examples/database/get-document.md b/app/sdks/0.6.2/client-web/docs/examples/database/get-document.md deleted file mode 100644 index b9605dccc6..0000000000 --- a/app/sdks/0.6.2/client-web/docs/examples/database/get-document.md +++ /dev/null @@ -1,14 +0,0 @@ -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.6.2/client-web/docs/examples/database/list-documents.md b/app/sdks/0.6.2/client-web/docs/examples/database/list-documents.md deleted file mode 100644 index 14f8a423a1..0000000000 --- a/app/sdks/0.6.2/client-web/docs/examples/database/list-documents.md +++ /dev/null @@ -1,14 +0,0 @@ -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.6.2/client-web/docs/examples/database/update-document.md b/app/sdks/0.6.2/client-web/docs/examples/database/update-document.md deleted file mode 100644 index 9104b77a71..0000000000 --- a/app/sdks/0.6.2/client-web/docs/examples/database/update-document.md +++ /dev/null @@ -1,14 +0,0 @@ -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.6.2/client-web/docs/examples/locale/get-continents.md b/app/sdks/0.6.2/client-web/docs/examples/locale/get-continents.md deleted file mode 100644 index 1dfdf8013b..0000000000 --- a/app/sdks/0.6.2/client-web/docs/examples/locale/get-continents.md +++ /dev/null @@ -1,14 +0,0 @@ -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.6.2/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 deleted file mode 100644 index 6b3f210a1e..0000000000 --- a/app/sdks/0.6.2/client-web/docs/examples/locale/get-countries-e-u.md +++ /dev/null @@ -1,14 +0,0 @@ -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.6.2/client-web/docs/examples/locale/get-countries-phones.md b/app/sdks/0.6.2/client-web/docs/examples/locale/get-countries-phones.md deleted file mode 100644 index f35e2152e4..0000000000 --- a/app/sdks/0.6.2/client-web/docs/examples/locale/get-countries-phones.md +++ /dev/null @@ -1,14 +0,0 @@ -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.6.2/client-web/docs/examples/locale/get-countries.md b/app/sdks/0.6.2/client-web/docs/examples/locale/get-countries.md deleted file mode 100644 index 53b96375a1..0000000000 --- a/app/sdks/0.6.2/client-web/docs/examples/locale/get-countries.md +++ /dev/null @@ -1,14 +0,0 @@ -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.6.2/client-web/docs/examples/locale/get-currencies.md b/app/sdks/0.6.2/client-web/docs/examples/locale/get-currencies.md deleted file mode 100644 index 57db66401f..0000000000 --- a/app/sdks/0.6.2/client-web/docs/examples/locale/get-currencies.md +++ /dev/null @@ -1,14 +0,0 @@ -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.6.2/client-web/docs/examples/locale/get-languages.md b/app/sdks/0.6.2/client-web/docs/examples/locale/get-languages.md deleted file mode 100644 index 04e3063ee7..0000000000 --- a/app/sdks/0.6.2/client-web/docs/examples/locale/get-languages.md +++ /dev/null @@ -1,14 +0,0 @@ -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.6.2/client-web/docs/examples/locale/get.md b/app/sdks/0.6.2/client-web/docs/examples/locale/get.md deleted file mode 100644 index 469a046dbc..0000000000 --- a/app/sdks/0.6.2/client-web/docs/examples/locale/get.md +++ /dev/null @@ -1,14 +0,0 @@ -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.6.2/client-web/docs/examples/storage/create-file.md b/app/sdks/0.6.2/client-web/docs/examples/storage/create-file.md deleted file mode 100644 index b23c47027a..0000000000 --- a/app/sdks/0.6.2/client-web/docs/examples/storage/create-file.md +++ /dev/null @@ -1,14 +0,0 @@ -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.6.2/client-web/docs/examples/storage/delete-file.md b/app/sdks/0.6.2/client-web/docs/examples/storage/delete-file.md deleted file mode 100644 index c38ab4ba9c..0000000000 --- a/app/sdks/0.6.2/client-web/docs/examples/storage/delete-file.md +++ /dev/null @@ -1,14 +0,0 @@ -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.6.2/client-web/docs/examples/storage/get-file-download.md b/app/sdks/0.6.2/client-web/docs/examples/storage/get-file-download.md deleted file mode 100644 index 1323b8b8df..0000000000 --- a/app/sdks/0.6.2/client-web/docs/examples/storage/get-file-download.md +++ /dev/null @@ -1,10 +0,0 @@ -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.6.2/client-web/docs/examples/storage/get-file-preview.md b/app/sdks/0.6.2/client-web/docs/examples/storage/get-file-preview.md deleted file mode 100644 index 5ede9fdb93..0000000000 --- a/app/sdks/0.6.2/client-web/docs/examples/storage/get-file-preview.md +++ /dev/null @@ -1,10 +0,0 @@ -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.6.2/client-web/docs/examples/storage/get-file-view.md b/app/sdks/0.6.2/client-web/docs/examples/storage/get-file-view.md deleted file mode 100644 index 53877ae352..0000000000 --- a/app/sdks/0.6.2/client-web/docs/examples/storage/get-file-view.md +++ /dev/null @@ -1,10 +0,0 @@ -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.6.2/client-web/docs/examples/storage/get-file.md b/app/sdks/0.6.2/client-web/docs/examples/storage/get-file.md deleted file mode 100644 index a1f94c08a6..0000000000 --- a/app/sdks/0.6.2/client-web/docs/examples/storage/get-file.md +++ /dev/null @@ -1,14 +0,0 @@ -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.6.2/client-web/docs/examples/storage/list-files.md b/app/sdks/0.6.2/client-web/docs/examples/storage/list-files.md deleted file mode 100644 index c489a0b46d..0000000000 --- a/app/sdks/0.6.2/client-web/docs/examples/storage/list-files.md +++ /dev/null @@ -1,14 +0,0 @@ -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.6.2/client-web/docs/examples/storage/update-file.md b/app/sdks/0.6.2/client-web/docs/examples/storage/update-file.md deleted file mode 100644 index 2a2f579b3b..0000000000 --- a/app/sdks/0.6.2/client-web/docs/examples/storage/update-file.md +++ /dev/null @@ -1,14 +0,0 @@ -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.6.2/client-web/docs/examples/teams/create-membership.md b/app/sdks/0.6.2/client-web/docs/examples/teams/create-membership.md deleted file mode 100644 index 78b2d7fa77..0000000000 --- a/app/sdks/0.6.2/client-web/docs/examples/teams/create-membership.md +++ /dev/null @@ -1,14 +0,0 @@ -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.6.2/client-web/docs/examples/teams/create.md b/app/sdks/0.6.2/client-web/docs/examples/teams/create.md deleted file mode 100644 index 43205ba888..0000000000 --- a/app/sdks/0.6.2/client-web/docs/examples/teams/create.md +++ /dev/null @@ -1,14 +0,0 @@ -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.6.2/client-web/docs/examples/teams/delete-membership.md b/app/sdks/0.6.2/client-web/docs/examples/teams/delete-membership.md deleted file mode 100644 index 1b85ef08da..0000000000 --- a/app/sdks/0.6.2/client-web/docs/examples/teams/delete-membership.md +++ /dev/null @@ -1,14 +0,0 @@ -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.6.2/client-web/docs/examples/teams/delete.md b/app/sdks/0.6.2/client-web/docs/examples/teams/delete.md deleted file mode 100644 index 4665ad5773..0000000000 --- a/app/sdks/0.6.2/client-web/docs/examples/teams/delete.md +++ /dev/null @@ -1,14 +0,0 @@ -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.6.2/client-web/docs/examples/teams/get-memberships.md b/app/sdks/0.6.2/client-web/docs/examples/teams/get-memberships.md deleted file mode 100644 index 6235ce33f4..0000000000 --- a/app/sdks/0.6.2/client-web/docs/examples/teams/get-memberships.md +++ /dev/null @@ -1,14 +0,0 @@ -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.6.2/client-web/docs/examples/teams/get.md b/app/sdks/0.6.2/client-web/docs/examples/teams/get.md deleted file mode 100644 index f4b0f040b1..0000000000 --- a/app/sdks/0.6.2/client-web/docs/examples/teams/get.md +++ /dev/null @@ -1,14 +0,0 @@ -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.6.2/client-web/docs/examples/teams/list.md b/app/sdks/0.6.2/client-web/docs/examples/teams/list.md deleted file mode 100644 index c4229e2400..0000000000 --- a/app/sdks/0.6.2/client-web/docs/examples/teams/list.md +++ /dev/null @@ -1,14 +0,0 @@ -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.6.2/client-web/docs/examples/teams/update-membership-status.md b/app/sdks/0.6.2/client-web/docs/examples/teams/update-membership-status.md deleted file mode 100644 index e8b3de0a0b..0000000000 --- a/app/sdks/0.6.2/client-web/docs/examples/teams/update-membership-status.md +++ /dev/null @@ -1,14 +0,0 @@ -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.6.2/client-web/docs/examples/teams/update.md b/app/sdks/0.6.2/client-web/docs/examples/teams/update.md deleted file mode 100644 index bbab80937d..0000000000 --- a/app/sdks/0.6.2/client-web/docs/examples/teams/update.md +++ /dev/null @@ -1,14 +0,0 @@ -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.6.2/client-web/package.json b/app/sdks/0.6.2/client-web/package.json deleted file mode 100644 index 4f1e4ffc52..0000000000 --- a/app/sdks/0.6.2/client-web/package.json +++ /dev/null @@ -1,17 +0,0 @@ -{ - "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.2.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.6.2/client-web/src/sdk.js b/app/sdks/0.6.2/client-web/src/sdk.js deleted file mode 100644 index 1f9e72c398..0000000000 --- a/app/sdks/0.6.2/client-web/src/sdk.js +++ /dev/null @@ -1,2386 +0,0 @@ -(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:web:1.2.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} offset - * @param {number} limit - * @param {string} orderField - * @param {string} orderType - * @param {string} orderCast - * @param {string} search - * @throws {Error} - * @return {Promise} - */ - listDocuments: function(collectionId, filters = [], offset = 0, limit = 50, 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(offset) { - payload['offset'] = offset; - } - - if(limit) { - payload['limit'] = limit; - } - - 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.6.2/client-web/src/sdk.min.js b/app/sdks/0.6.2/client-web/src/sdk.min.js deleted file mode 100644 index 03dc22b92d..0000000000 --- a/app/sdks/0.6.2/client-web/src/sdk.min.js +++ /dev/null @@ -1,187 +0,0 @@ -(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} offset - * @param {number} limit - * @param {string} orderField - * @param {string} orderType - * @param {string} orderCast - * @param {string} search - * @throws {Error} - * @return {Promise} - */ - listDocuments(collectionId: string, filters?: string[], offset?: number, limit?: 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.6.2/console-web/CHANGELOG.md b/app/sdks/0.6.2/console-web/CHANGELOG.md deleted file mode 100644 index fa4d35e687..0000000000 --- a/app/sdks/0.6.2/console-web/CHANGELOG.md +++ /dev/null @@ -1 +0,0 @@ -# Change Log \ No newline at end of file diff --git a/app/sdks/0.6.2/console-web/LICENSE b/app/sdks/0.6.2/console-web/LICENSE deleted file mode 100644 index fc7c051a91..0000000000 --- a/app/sdks/0.6.2/console-web/LICENSE +++ /dev/null @@ -1,12 +0,0 @@ -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.6.2/console-web/README.md b/app/sdks/0.6.2/console-web/README.md deleted file mode 100644 index a74d6ec924..0000000000 --- a/app/sdks/0.6.2/console-web/README.md +++ /dev/null @@ -1,59 +0,0 @@ -# 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.6.2-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 - -``` - -## Getting Started - -Initialise the Appwrite SDK in your code, and setup your API credentials: - -```js - -// Init your Web SDK -var appwrite = new Appwrite(); - -appwrite - .setEndpoint('http://localhost/v1') // Set only when using self-hosted solution - .setProject('455x34dfkj') // Your Appwrite Project UID -; - -``` - - -## 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.6.2/console-web/docs/examples/account/create-o-auth2session.md b/app/sdks/0.6.2/console-web/docs/examples/account/create-o-auth2session.md deleted file mode 100644 index 3a2dcba651..0000000000 --- a/app/sdks/0.6.2/console-web/docs/examples/account/create-o-auth2session.md +++ /dev/null @@ -1,11 +0,0 @@ -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.6.2/console-web/docs/examples/account/create-recovery.md b/app/sdks/0.6.2/console-web/docs/examples/account/create-recovery.md deleted file mode 100644 index d69269b351..0000000000 --- a/app/sdks/0.6.2/console-web/docs/examples/account/create-recovery.md +++ /dev/null @@ -1,15 +0,0 @@ -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.6.2/console-web/docs/examples/account/create-session.md b/app/sdks/0.6.2/console-web/docs/examples/account/create-session.md deleted file mode 100644 index 0734a84aaa..0000000000 --- a/app/sdks/0.6.2/console-web/docs/examples/account/create-session.md +++ /dev/null @@ -1,15 +0,0 @@ -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.6.2/console-web/docs/examples/account/create-verification.md b/app/sdks/0.6.2/console-web/docs/examples/account/create-verification.md deleted file mode 100644 index 1211b5c642..0000000000 --- a/app/sdks/0.6.2/console-web/docs/examples/account/create-verification.md +++ /dev/null @@ -1,15 +0,0 @@ -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.6.2/console-web/docs/examples/account/create.md b/app/sdks/0.6.2/console-web/docs/examples/account/create.md deleted file mode 100644 index e61b1fbac4..0000000000 --- a/app/sdks/0.6.2/console-web/docs/examples/account/create.md +++ /dev/null @@ -1,15 +0,0 @@ -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.6.2/console-web/docs/examples/account/delete-session.md b/app/sdks/0.6.2/console-web/docs/examples/account/delete-session.md deleted file mode 100644 index 84505281f0..0000000000 --- a/app/sdks/0.6.2/console-web/docs/examples/account/delete-session.md +++ /dev/null @@ -1,15 +0,0 @@ -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.6.2/console-web/docs/examples/account/delete-sessions.md b/app/sdks/0.6.2/console-web/docs/examples/account/delete-sessions.md deleted file mode 100644 index 61bec86399..0000000000 --- a/app/sdks/0.6.2/console-web/docs/examples/account/delete-sessions.md +++ /dev/null @@ -1,15 +0,0 @@ -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.6.2/console-web/docs/examples/account/delete.md b/app/sdks/0.6.2/console-web/docs/examples/account/delete.md deleted file mode 100644 index dbb8dbf250..0000000000 --- a/app/sdks/0.6.2/console-web/docs/examples/account/delete.md +++ /dev/null @@ -1,15 +0,0 @@ -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.6.2/console-web/docs/examples/account/get-logs.md b/app/sdks/0.6.2/console-web/docs/examples/account/get-logs.md deleted file mode 100644 index 12e6656c96..0000000000 --- a/app/sdks/0.6.2/console-web/docs/examples/account/get-logs.md +++ /dev/null @@ -1,15 +0,0 @@ -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.6.2/console-web/docs/examples/account/get-prefs.md b/app/sdks/0.6.2/console-web/docs/examples/account/get-prefs.md deleted file mode 100644 index e328baba32..0000000000 --- a/app/sdks/0.6.2/console-web/docs/examples/account/get-prefs.md +++ /dev/null @@ -1,15 +0,0 @@ -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.6.2/console-web/docs/examples/account/get-sessions.md b/app/sdks/0.6.2/console-web/docs/examples/account/get-sessions.md deleted file mode 100644 index cb281dd4db..0000000000 --- a/app/sdks/0.6.2/console-web/docs/examples/account/get-sessions.md +++ /dev/null @@ -1,15 +0,0 @@ -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.6.2/console-web/docs/examples/account/get.md b/app/sdks/0.6.2/console-web/docs/examples/account/get.md deleted file mode 100644 index 82c96fb9db..0000000000 --- a/app/sdks/0.6.2/console-web/docs/examples/account/get.md +++ /dev/null @@ -1,15 +0,0 @@ -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.6.2/console-web/docs/examples/account/update-email.md b/app/sdks/0.6.2/console-web/docs/examples/account/update-email.md deleted file mode 100644 index c2caaf060e..0000000000 --- a/app/sdks/0.6.2/console-web/docs/examples/account/update-email.md +++ /dev/null @@ -1,15 +0,0 @@ -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.6.2/console-web/docs/examples/account/update-name.md b/app/sdks/0.6.2/console-web/docs/examples/account/update-name.md deleted file mode 100644 index 047eba688b..0000000000 --- a/app/sdks/0.6.2/console-web/docs/examples/account/update-name.md +++ /dev/null @@ -1,15 +0,0 @@ -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.6.2/console-web/docs/examples/account/update-password.md b/app/sdks/0.6.2/console-web/docs/examples/account/update-password.md deleted file mode 100644 index d305031fa0..0000000000 --- a/app/sdks/0.6.2/console-web/docs/examples/account/update-password.md +++ /dev/null @@ -1,15 +0,0 @@ -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.6.2/console-web/docs/examples/account/update-prefs.md b/app/sdks/0.6.2/console-web/docs/examples/account/update-prefs.md deleted file mode 100644 index 8c4e402ae1..0000000000 --- a/app/sdks/0.6.2/console-web/docs/examples/account/update-prefs.md +++ /dev/null @@ -1,15 +0,0 @@ -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.6.2/console-web/docs/examples/account/update-recovery.md b/app/sdks/0.6.2/console-web/docs/examples/account/update-recovery.md deleted file mode 100644 index 235a4db481..0000000000 --- a/app/sdks/0.6.2/console-web/docs/examples/account/update-recovery.md +++ /dev/null @@ -1,15 +0,0 @@ -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.6.2/console-web/docs/examples/account/update-verification.md b/app/sdks/0.6.2/console-web/docs/examples/account/update-verification.md deleted file mode 100644 index ef2c384853..0000000000 --- a/app/sdks/0.6.2/console-web/docs/examples/account/update-verification.md +++ /dev/null @@ -1,15 +0,0 @@ -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.6.2/console-web/docs/examples/avatars/get-browser.md b/app/sdks/0.6.2/console-web/docs/examples/avatars/get-browser.md deleted file mode 100644 index bbbdb9738f..0000000000 --- a/app/sdks/0.6.2/console-web/docs/examples/avatars/get-browser.md +++ /dev/null @@ -1,11 +0,0 @@ -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.6.2/console-web/docs/examples/avatars/get-credit-card.md b/app/sdks/0.6.2/console-web/docs/examples/avatars/get-credit-card.md deleted file mode 100644 index e1fab01cf2..0000000000 --- a/app/sdks/0.6.2/console-web/docs/examples/avatars/get-credit-card.md +++ /dev/null @@ -1,11 +0,0 @@ -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.6.2/console-web/docs/examples/avatars/get-favicon.md b/app/sdks/0.6.2/console-web/docs/examples/avatars/get-favicon.md deleted file mode 100644 index 397986b11a..0000000000 --- a/app/sdks/0.6.2/console-web/docs/examples/avatars/get-favicon.md +++ /dev/null @@ -1,11 +0,0 @@ -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.6.2/console-web/docs/examples/avatars/get-flag.md b/app/sdks/0.6.2/console-web/docs/examples/avatars/get-flag.md deleted file mode 100644 index 6e90b72feb..0000000000 --- a/app/sdks/0.6.2/console-web/docs/examples/avatars/get-flag.md +++ /dev/null @@ -1,11 +0,0 @@ -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.6.2/console-web/docs/examples/avatars/get-image.md b/app/sdks/0.6.2/console-web/docs/examples/avatars/get-image.md deleted file mode 100644 index afd1a17cb5..0000000000 --- a/app/sdks/0.6.2/console-web/docs/examples/avatars/get-image.md +++ /dev/null @@ -1,11 +0,0 @@ -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.6.2/console-web/docs/examples/avatars/get-initials.md b/app/sdks/0.6.2/console-web/docs/examples/avatars/get-initials.md deleted file mode 100644 index dab6417ca5..0000000000 --- a/app/sdks/0.6.2/console-web/docs/examples/avatars/get-initials.md +++ /dev/null @@ -1,11 +0,0 @@ -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.6.2/console-web/docs/examples/avatars/get-q-r.md b/app/sdks/0.6.2/console-web/docs/examples/avatars/get-q-r.md deleted file mode 100644 index 31f490cedd..0000000000 --- a/app/sdks/0.6.2/console-web/docs/examples/avatars/get-q-r.md +++ /dev/null @@ -1,11 +0,0 @@ -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.6.2/console-web/docs/examples/bar/delete.md b/app/sdks/0.6.2/console-web/docs/examples/bar/delete.md deleted file mode 100644 index c60d7a75f0..0000000000 --- a/app/sdks/0.6.2/console-web/docs/examples/bar/delete.md +++ /dev/null @@ -1,15 +0,0 @@ -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.6.2/console-web/docs/examples/bar/get.md b/app/sdks/0.6.2/console-web/docs/examples/bar/get.md deleted file mode 100644 index a690ffc039..0000000000 --- a/app/sdks/0.6.2/console-web/docs/examples/bar/get.md +++ /dev/null @@ -1,15 +0,0 @@ -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.6.2/console-web/docs/examples/bar/patch.md b/app/sdks/0.6.2/console-web/docs/examples/bar/patch.md deleted file mode 100644 index 46ac2d7438..0000000000 --- a/app/sdks/0.6.2/console-web/docs/examples/bar/patch.md +++ /dev/null @@ -1,15 +0,0 @@ -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.6.2/console-web/docs/examples/bar/post.md b/app/sdks/0.6.2/console-web/docs/examples/bar/post.md deleted file mode 100644 index 4b21090c3f..0000000000 --- a/app/sdks/0.6.2/console-web/docs/examples/bar/post.md +++ /dev/null @@ -1,15 +0,0 @@ -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.6.2/console-web/docs/examples/bar/put.md b/app/sdks/0.6.2/console-web/docs/examples/bar/put.md deleted file mode 100644 index 8eac3ebad8..0000000000 --- a/app/sdks/0.6.2/console-web/docs/examples/bar/put.md +++ /dev/null @@ -1,15 +0,0 @@ -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.6.2/console-web/docs/examples/database/create-collection.md b/app/sdks/0.6.2/console-web/docs/examples/database/create-collection.md deleted file mode 100644 index a7a4b90197..0000000000 --- a/app/sdks/0.6.2/console-web/docs/examples/database/create-collection.md +++ /dev/null @@ -1,15 +0,0 @@ -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.6.2/console-web/docs/examples/database/create-document.md b/app/sdks/0.6.2/console-web/docs/examples/database/create-document.md deleted file mode 100644 index 64809c6156..0000000000 --- a/app/sdks/0.6.2/console-web/docs/examples/database/create-document.md +++ /dev/null @@ -1,15 +0,0 @@ -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.6.2/console-web/docs/examples/database/delete-collection.md b/app/sdks/0.6.2/console-web/docs/examples/database/delete-collection.md deleted file mode 100644 index bfb0706bf5..0000000000 --- a/app/sdks/0.6.2/console-web/docs/examples/database/delete-collection.md +++ /dev/null @@ -1,15 +0,0 @@ -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.6.2/console-web/docs/examples/database/delete-document.md b/app/sdks/0.6.2/console-web/docs/examples/database/delete-document.md deleted file mode 100644 index 356a71a437..0000000000 --- a/app/sdks/0.6.2/console-web/docs/examples/database/delete-document.md +++ /dev/null @@ -1,15 +0,0 @@ -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.6.2/console-web/docs/examples/database/get-collection.md b/app/sdks/0.6.2/console-web/docs/examples/database/get-collection.md deleted file mode 100644 index d74d4b3225..0000000000 --- a/app/sdks/0.6.2/console-web/docs/examples/database/get-collection.md +++ /dev/null @@ -1,15 +0,0 @@ -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.6.2/console-web/docs/examples/database/get-document.md b/app/sdks/0.6.2/console-web/docs/examples/database/get-document.md deleted file mode 100644 index 51638880c5..0000000000 --- a/app/sdks/0.6.2/console-web/docs/examples/database/get-document.md +++ /dev/null @@ -1,15 +0,0 @@ -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.6.2/console-web/docs/examples/database/list-collections.md b/app/sdks/0.6.2/console-web/docs/examples/database/list-collections.md deleted file mode 100644 index 8a18249748..0000000000 --- a/app/sdks/0.6.2/console-web/docs/examples/database/list-collections.md +++ /dev/null @@ -1,15 +0,0 @@ -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.6.2/console-web/docs/examples/database/list-documents.md b/app/sdks/0.6.2/console-web/docs/examples/database/list-documents.md deleted file mode 100644 index 1d895a566a..0000000000 --- a/app/sdks/0.6.2/console-web/docs/examples/database/list-documents.md +++ /dev/null @@ -1,15 +0,0 @@ -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.6.2/console-web/docs/examples/database/update-collection.md b/app/sdks/0.6.2/console-web/docs/examples/database/update-collection.md deleted file mode 100644 index f00a6c6f8c..0000000000 --- a/app/sdks/0.6.2/console-web/docs/examples/database/update-collection.md +++ /dev/null @@ -1,15 +0,0 @@ -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.6.2/console-web/docs/examples/database/update-document.md b/app/sdks/0.6.2/console-web/docs/examples/database/update-document.md deleted file mode 100644 index 52c172ab6a..0000000000 --- a/app/sdks/0.6.2/console-web/docs/examples/database/update-document.md +++ /dev/null @@ -1,15 +0,0 @@ -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.6.2/console-web/docs/examples/foo/delete.md b/app/sdks/0.6.2/console-web/docs/examples/foo/delete.md deleted file mode 100644 index 715289a5b8..0000000000 --- a/app/sdks/0.6.2/console-web/docs/examples/foo/delete.md +++ /dev/null @@ -1,15 +0,0 @@ -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.6.2/console-web/docs/examples/foo/get.md b/app/sdks/0.6.2/console-web/docs/examples/foo/get.md deleted file mode 100644 index cb3ee31c9d..0000000000 --- a/app/sdks/0.6.2/console-web/docs/examples/foo/get.md +++ /dev/null @@ -1,15 +0,0 @@ -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.6.2/console-web/docs/examples/foo/patch.md b/app/sdks/0.6.2/console-web/docs/examples/foo/patch.md deleted file mode 100644 index e39222e71d..0000000000 --- a/app/sdks/0.6.2/console-web/docs/examples/foo/patch.md +++ /dev/null @@ -1,15 +0,0 @@ -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.6.2/console-web/docs/examples/foo/post.md b/app/sdks/0.6.2/console-web/docs/examples/foo/post.md deleted file mode 100644 index 4c236776f6..0000000000 --- a/app/sdks/0.6.2/console-web/docs/examples/foo/post.md +++ /dev/null @@ -1,15 +0,0 @@ -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.6.2/console-web/docs/examples/foo/put.md b/app/sdks/0.6.2/console-web/docs/examples/foo/put.md deleted file mode 100644 index d13c4c44ff..0000000000 --- a/app/sdks/0.6.2/console-web/docs/examples/foo/put.md +++ /dev/null @@ -1,15 +0,0 @@ -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.6.2/console-web/docs/examples/general/empty.md b/app/sdks/0.6.2/console-web/docs/examples/general/empty.md deleted file mode 100644 index 50fd0e8a5c..0000000000 --- a/app/sdks/0.6.2/console-web/docs/examples/general/empty.md +++ /dev/null @@ -1,15 +0,0 @@ -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.6.2/console-web/docs/examples/general/get-cookie.md b/app/sdks/0.6.2/console-web/docs/examples/general/get-cookie.md deleted file mode 100644 index 5785a0323f..0000000000 --- a/app/sdks/0.6.2/console-web/docs/examples/general/get-cookie.md +++ /dev/null @@ -1,15 +0,0 @@ -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.6.2/console-web/docs/examples/general/redirect.md b/app/sdks/0.6.2/console-web/docs/examples/general/redirect.md deleted file mode 100644 index 769533f6f6..0000000000 --- a/app/sdks/0.6.2/console-web/docs/examples/general/redirect.md +++ /dev/null @@ -1,15 +0,0 @@ -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.6.2/console-web/docs/examples/general/redirected.md b/app/sdks/0.6.2/console-web/docs/examples/general/redirected.md deleted file mode 100644 index 712e614ac9..0000000000 --- a/app/sdks/0.6.2/console-web/docs/examples/general/redirected.md +++ /dev/null @@ -1,15 +0,0 @@ -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.6.2/console-web/docs/examples/general/set-cookie.md b/app/sdks/0.6.2/console-web/docs/examples/general/set-cookie.md deleted file mode 100644 index ee0f85cc1f..0000000000 --- a/app/sdks/0.6.2/console-web/docs/examples/general/set-cookie.md +++ /dev/null @@ -1,15 +0,0 @@ -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.6.2/console-web/docs/examples/general/upload.md b/app/sdks/0.6.2/console-web/docs/examples/general/upload.md deleted file mode 100644 index bbc2bee92a..0000000000 --- a/app/sdks/0.6.2/console-web/docs/examples/general/upload.md +++ /dev/null @@ -1,15 +0,0 @@ -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.6.2/console-web/docs/examples/health/get-anti-virus.md b/app/sdks/0.6.2/console-web/docs/examples/health/get-anti-virus.md deleted file mode 100644 index 95b671992b..0000000000 --- a/app/sdks/0.6.2/console-web/docs/examples/health/get-anti-virus.md +++ /dev/null @@ -1,15 +0,0 @@ -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.6.2/console-web/docs/examples/health/get-cache.md b/app/sdks/0.6.2/console-web/docs/examples/health/get-cache.md deleted file mode 100644 index 5c41d81868..0000000000 --- a/app/sdks/0.6.2/console-web/docs/examples/health/get-cache.md +++ /dev/null @@ -1,15 +0,0 @@ -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.6.2/console-web/docs/examples/health/get-d-b.md b/app/sdks/0.6.2/console-web/docs/examples/health/get-d-b.md deleted file mode 100644 index 407f87e2a1..0000000000 --- a/app/sdks/0.6.2/console-web/docs/examples/health/get-d-b.md +++ /dev/null @@ -1,15 +0,0 @@ -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.6.2/console-web/docs/examples/health/get-queue-certificates.md b/app/sdks/0.6.2/console-web/docs/examples/health/get-queue-certificates.md deleted file mode 100644 index a115c869ba..0000000000 --- a/app/sdks/0.6.2/console-web/docs/examples/health/get-queue-certificates.md +++ /dev/null @@ -1,15 +0,0 @@ -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.6.2/console-web/docs/examples/health/get-queue-functions.md b/app/sdks/0.6.2/console-web/docs/examples/health/get-queue-functions.md deleted file mode 100644 index 3c0dc33acf..0000000000 --- a/app/sdks/0.6.2/console-web/docs/examples/health/get-queue-functions.md +++ /dev/null @@ -1,15 +0,0 @@ -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.6.2/console-web/docs/examples/health/get-queue-logs.md b/app/sdks/0.6.2/console-web/docs/examples/health/get-queue-logs.md deleted file mode 100644 index b3d41b49c6..0000000000 --- a/app/sdks/0.6.2/console-web/docs/examples/health/get-queue-logs.md +++ /dev/null @@ -1,15 +0,0 @@ -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.6.2/console-web/docs/examples/health/get-queue-tasks.md b/app/sdks/0.6.2/console-web/docs/examples/health/get-queue-tasks.md deleted file mode 100644 index 4f34f670a6..0000000000 --- a/app/sdks/0.6.2/console-web/docs/examples/health/get-queue-tasks.md +++ /dev/null @@ -1,15 +0,0 @@ -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.6.2/console-web/docs/examples/health/get-queue-usage.md b/app/sdks/0.6.2/console-web/docs/examples/health/get-queue-usage.md deleted file mode 100644 index 3d234be2de..0000000000 --- a/app/sdks/0.6.2/console-web/docs/examples/health/get-queue-usage.md +++ /dev/null @@ -1,15 +0,0 @@ -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.6.2/console-web/docs/examples/health/get-queue-webhooks.md b/app/sdks/0.6.2/console-web/docs/examples/health/get-queue-webhooks.md deleted file mode 100644 index c5825dcf6c..0000000000 --- a/app/sdks/0.6.2/console-web/docs/examples/health/get-queue-webhooks.md +++ /dev/null @@ -1,15 +0,0 @@ -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.6.2/console-web/docs/examples/health/get-storage-local.md b/app/sdks/0.6.2/console-web/docs/examples/health/get-storage-local.md deleted file mode 100644 index 7287745704..0000000000 --- a/app/sdks/0.6.2/console-web/docs/examples/health/get-storage-local.md +++ /dev/null @@ -1,15 +0,0 @@ -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.6.2/console-web/docs/examples/health/get-time.md b/app/sdks/0.6.2/console-web/docs/examples/health/get-time.md deleted file mode 100644 index b6087b73d5..0000000000 --- a/app/sdks/0.6.2/console-web/docs/examples/health/get-time.md +++ /dev/null @@ -1,15 +0,0 @@ -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.6.2/console-web/docs/examples/health/get.md b/app/sdks/0.6.2/console-web/docs/examples/health/get.md deleted file mode 100644 index 1e7d6fe4e8..0000000000 --- a/app/sdks/0.6.2/console-web/docs/examples/health/get.md +++ /dev/null @@ -1,15 +0,0 @@ -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.6.2/console-web/docs/examples/locale/get-continents.md b/app/sdks/0.6.2/console-web/docs/examples/locale/get-continents.md deleted file mode 100644 index 93144335ea..0000000000 --- a/app/sdks/0.6.2/console-web/docs/examples/locale/get-continents.md +++ /dev/null @@ -1,15 +0,0 @@ -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.6.2/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 deleted file mode 100644 index fffc8696e8..0000000000 --- a/app/sdks/0.6.2/console-web/docs/examples/locale/get-countries-e-u.md +++ /dev/null @@ -1,15 +0,0 @@ -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.6.2/console-web/docs/examples/locale/get-countries-phones.md b/app/sdks/0.6.2/console-web/docs/examples/locale/get-countries-phones.md deleted file mode 100644 index 751f4f6cc4..0000000000 --- a/app/sdks/0.6.2/console-web/docs/examples/locale/get-countries-phones.md +++ /dev/null @@ -1,15 +0,0 @@ -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.6.2/console-web/docs/examples/locale/get-countries.md b/app/sdks/0.6.2/console-web/docs/examples/locale/get-countries.md deleted file mode 100644 index 30b1dd95c7..0000000000 --- a/app/sdks/0.6.2/console-web/docs/examples/locale/get-countries.md +++ /dev/null @@ -1,15 +0,0 @@ -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.6.2/console-web/docs/examples/locale/get-currencies.md b/app/sdks/0.6.2/console-web/docs/examples/locale/get-currencies.md deleted file mode 100644 index 4c92714062..0000000000 --- a/app/sdks/0.6.2/console-web/docs/examples/locale/get-currencies.md +++ /dev/null @@ -1,15 +0,0 @@ -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.6.2/console-web/docs/examples/locale/get-languages.md b/app/sdks/0.6.2/console-web/docs/examples/locale/get-languages.md deleted file mode 100644 index 2d1f713eeb..0000000000 --- a/app/sdks/0.6.2/console-web/docs/examples/locale/get-languages.md +++ /dev/null @@ -1,15 +0,0 @@ -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.6.2/console-web/docs/examples/locale/get.md b/app/sdks/0.6.2/console-web/docs/examples/locale/get.md deleted file mode 100644 index 1fba9877b5..0000000000 --- a/app/sdks/0.6.2/console-web/docs/examples/locale/get.md +++ /dev/null @@ -1,15 +0,0 @@ -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.6.2/console-web/docs/examples/projects/create-domain.md b/app/sdks/0.6.2/console-web/docs/examples/projects/create-domain.md deleted file mode 100644 index 756b869a85..0000000000 --- a/app/sdks/0.6.2/console-web/docs/examples/projects/create-domain.md +++ /dev/null @@ -1,15 +0,0 @@ -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.6.2/console-web/docs/examples/projects/create-key.md b/app/sdks/0.6.2/console-web/docs/examples/projects/create-key.md deleted file mode 100644 index 9556f5b7f7..0000000000 --- a/app/sdks/0.6.2/console-web/docs/examples/projects/create-key.md +++ /dev/null @@ -1,15 +0,0 @@ -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.6.2/console-web/docs/examples/projects/create-platform.md b/app/sdks/0.6.2/console-web/docs/examples/projects/create-platform.md deleted file mode 100644 index f4476fe599..0000000000 --- a/app/sdks/0.6.2/console-web/docs/examples/projects/create-platform.md +++ /dev/null @@ -1,15 +0,0 @@ -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.6.2/console-web/docs/examples/projects/create-task.md b/app/sdks/0.6.2/console-web/docs/examples/projects/create-task.md deleted file mode 100644 index 9b0f3c1e03..0000000000 --- a/app/sdks/0.6.2/console-web/docs/examples/projects/create-task.md +++ /dev/null @@ -1,15 +0,0 @@ -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.6.2/console-web/docs/examples/projects/create-webhook.md b/app/sdks/0.6.2/console-web/docs/examples/projects/create-webhook.md deleted file mode 100644 index 971319f212..0000000000 --- a/app/sdks/0.6.2/console-web/docs/examples/projects/create-webhook.md +++ /dev/null @@ -1,15 +0,0 @@ -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]', [], '[URL]', 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.6.2/console-web/docs/examples/projects/create.md b/app/sdks/0.6.2/console-web/docs/examples/projects/create.md deleted file mode 100644 index 8041ed154e..0000000000 --- a/app/sdks/0.6.2/console-web/docs/examples/projects/create.md +++ /dev/null @@ -1,15 +0,0 @@ -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.6.2/console-web/docs/examples/projects/delete-domain.md b/app/sdks/0.6.2/console-web/docs/examples/projects/delete-domain.md deleted file mode 100644 index 1b3df9363b..0000000000 --- a/app/sdks/0.6.2/console-web/docs/examples/projects/delete-domain.md +++ /dev/null @@ -1,15 +0,0 @@ -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.6.2/console-web/docs/examples/projects/delete-key.md b/app/sdks/0.6.2/console-web/docs/examples/projects/delete-key.md deleted file mode 100644 index dc855bcc30..0000000000 --- a/app/sdks/0.6.2/console-web/docs/examples/projects/delete-key.md +++ /dev/null @@ -1,15 +0,0 @@ -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.6.2/console-web/docs/examples/projects/delete-platform.md b/app/sdks/0.6.2/console-web/docs/examples/projects/delete-platform.md deleted file mode 100644 index 2a180c47e4..0000000000 --- a/app/sdks/0.6.2/console-web/docs/examples/projects/delete-platform.md +++ /dev/null @@ -1,15 +0,0 @@ -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.6.2/console-web/docs/examples/projects/delete-task.md b/app/sdks/0.6.2/console-web/docs/examples/projects/delete-task.md deleted file mode 100644 index b7f9ad3e47..0000000000 --- a/app/sdks/0.6.2/console-web/docs/examples/projects/delete-task.md +++ /dev/null @@ -1,15 +0,0 @@ -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.6.2/console-web/docs/examples/projects/delete-webhook.md b/app/sdks/0.6.2/console-web/docs/examples/projects/delete-webhook.md deleted file mode 100644 index c5e0588ad1..0000000000 --- a/app/sdks/0.6.2/console-web/docs/examples/projects/delete-webhook.md +++ /dev/null @@ -1,15 +0,0 @@ -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.6.2/console-web/docs/examples/projects/delete.md b/app/sdks/0.6.2/console-web/docs/examples/projects/delete.md deleted file mode 100644 index 20b67370f0..0000000000 --- a/app/sdks/0.6.2/console-web/docs/examples/projects/delete.md +++ /dev/null @@ -1,15 +0,0 @@ -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.6.2/console-web/docs/examples/projects/get-domain.md b/app/sdks/0.6.2/console-web/docs/examples/projects/get-domain.md deleted file mode 100644 index 1622546719..0000000000 --- a/app/sdks/0.6.2/console-web/docs/examples/projects/get-domain.md +++ /dev/null @@ -1,15 +0,0 @@ -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.6.2/console-web/docs/examples/projects/get-key.md b/app/sdks/0.6.2/console-web/docs/examples/projects/get-key.md deleted file mode 100644 index 8bb458c335..0000000000 --- a/app/sdks/0.6.2/console-web/docs/examples/projects/get-key.md +++ /dev/null @@ -1,15 +0,0 @@ -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.6.2/console-web/docs/examples/projects/get-platform.md b/app/sdks/0.6.2/console-web/docs/examples/projects/get-platform.md deleted file mode 100644 index bfeb49393b..0000000000 --- a/app/sdks/0.6.2/console-web/docs/examples/projects/get-platform.md +++ /dev/null @@ -1,15 +0,0 @@ -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.6.2/console-web/docs/examples/projects/get-task.md b/app/sdks/0.6.2/console-web/docs/examples/projects/get-task.md deleted file mode 100644 index c405299d74..0000000000 --- a/app/sdks/0.6.2/console-web/docs/examples/projects/get-task.md +++ /dev/null @@ -1,15 +0,0 @@ -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.6.2/console-web/docs/examples/projects/get-usage.md b/app/sdks/0.6.2/console-web/docs/examples/projects/get-usage.md deleted file mode 100644 index e024a2966c..0000000000 --- a/app/sdks/0.6.2/console-web/docs/examples/projects/get-usage.md +++ /dev/null @@ -1,15 +0,0 @@ -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.6.2/console-web/docs/examples/projects/get-webhook.md b/app/sdks/0.6.2/console-web/docs/examples/projects/get-webhook.md deleted file mode 100644 index 2629d4424d..0000000000 --- a/app/sdks/0.6.2/console-web/docs/examples/projects/get-webhook.md +++ /dev/null @@ -1,15 +0,0 @@ -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.6.2/console-web/docs/examples/projects/get.md b/app/sdks/0.6.2/console-web/docs/examples/projects/get.md deleted file mode 100644 index bcfb35186b..0000000000 --- a/app/sdks/0.6.2/console-web/docs/examples/projects/get.md +++ /dev/null @@ -1,15 +0,0 @@ -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.6.2/console-web/docs/examples/projects/list-domains.md b/app/sdks/0.6.2/console-web/docs/examples/projects/list-domains.md deleted file mode 100644 index 5ddfec49b5..0000000000 --- a/app/sdks/0.6.2/console-web/docs/examples/projects/list-domains.md +++ /dev/null @@ -1,15 +0,0 @@ -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.6.2/console-web/docs/examples/projects/list-keys.md b/app/sdks/0.6.2/console-web/docs/examples/projects/list-keys.md deleted file mode 100644 index 497ddf9bac..0000000000 --- a/app/sdks/0.6.2/console-web/docs/examples/projects/list-keys.md +++ /dev/null @@ -1,15 +0,0 @@ -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.6.2/console-web/docs/examples/projects/list-platforms.md b/app/sdks/0.6.2/console-web/docs/examples/projects/list-platforms.md deleted file mode 100644 index 4fd2d311f3..0000000000 --- a/app/sdks/0.6.2/console-web/docs/examples/projects/list-platforms.md +++ /dev/null @@ -1,15 +0,0 @@ -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.6.2/console-web/docs/examples/projects/list-tasks.md b/app/sdks/0.6.2/console-web/docs/examples/projects/list-tasks.md deleted file mode 100644 index d42efc2b80..0000000000 --- a/app/sdks/0.6.2/console-web/docs/examples/projects/list-tasks.md +++ /dev/null @@ -1,15 +0,0 @@ -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.6.2/console-web/docs/examples/projects/list-webhooks.md b/app/sdks/0.6.2/console-web/docs/examples/projects/list-webhooks.md deleted file mode 100644 index 6c45849399..0000000000 --- a/app/sdks/0.6.2/console-web/docs/examples/projects/list-webhooks.md +++ /dev/null @@ -1,15 +0,0 @@ -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.6.2/console-web/docs/examples/projects/list.md b/app/sdks/0.6.2/console-web/docs/examples/projects/list.md deleted file mode 100644 index 428fc4545f..0000000000 --- a/app/sdks/0.6.2/console-web/docs/examples/projects/list.md +++ /dev/null @@ -1,15 +0,0 @@ -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.6.2/console-web/docs/examples/projects/update-domain-verification.md b/app/sdks/0.6.2/console-web/docs/examples/projects/update-domain-verification.md deleted file mode 100644 index ea53295bcf..0000000000 --- a/app/sdks/0.6.2/console-web/docs/examples/projects/update-domain-verification.md +++ /dev/null @@ -1,15 +0,0 @@ -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.6.2/console-web/docs/examples/projects/update-key.md b/app/sdks/0.6.2/console-web/docs/examples/projects/update-key.md deleted file mode 100644 index f19b593c9f..0000000000 --- a/app/sdks/0.6.2/console-web/docs/examples/projects/update-key.md +++ /dev/null @@ -1,15 +0,0 @@ -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.6.2/console-web/docs/examples/projects/update-o-auth2.md b/app/sdks/0.6.2/console-web/docs/examples/projects/update-o-auth2.md deleted file mode 100644 index 479c5e9d30..0000000000 --- a/app/sdks/0.6.2/console-web/docs/examples/projects/update-o-auth2.md +++ /dev/null @@ -1,15 +0,0 @@ -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.6.2/console-web/docs/examples/projects/update-platform.md b/app/sdks/0.6.2/console-web/docs/examples/projects/update-platform.md deleted file mode 100644 index 0e22080ed0..0000000000 --- a/app/sdks/0.6.2/console-web/docs/examples/projects/update-platform.md +++ /dev/null @@ -1,15 +0,0 @@ -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.6.2/console-web/docs/examples/projects/update-task.md b/app/sdks/0.6.2/console-web/docs/examples/projects/update-task.md deleted file mode 100644 index 38744a36bd..0000000000 --- a/app/sdks/0.6.2/console-web/docs/examples/projects/update-task.md +++ /dev/null @@ -1,15 +0,0 @@ -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.6.2/console-web/docs/examples/projects/update-webhook.md b/app/sdks/0.6.2/console-web/docs/examples/projects/update-webhook.md deleted file mode 100644 index 1e8c6f4a0f..0000000000 --- a/app/sdks/0.6.2/console-web/docs/examples/projects/update-webhook.md +++ /dev/null @@ -1,15 +0,0 @@ -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]', [], '[URL]', 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.6.2/console-web/docs/examples/projects/update.md b/app/sdks/0.6.2/console-web/docs/examples/projects/update.md deleted file mode 100644 index 9d06850534..0000000000 --- a/app/sdks/0.6.2/console-web/docs/examples/projects/update.md +++ /dev/null @@ -1,15 +0,0 @@ -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.6.2/console-web/docs/examples/storage/create-file.md b/app/sdks/0.6.2/console-web/docs/examples/storage/create-file.md deleted file mode 100644 index 673777e380..0000000000 --- a/app/sdks/0.6.2/console-web/docs/examples/storage/create-file.md +++ /dev/null @@ -1,15 +0,0 @@ -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.6.2/console-web/docs/examples/storage/delete-file.md b/app/sdks/0.6.2/console-web/docs/examples/storage/delete-file.md deleted file mode 100644 index 7278b682ae..0000000000 --- a/app/sdks/0.6.2/console-web/docs/examples/storage/delete-file.md +++ /dev/null @@ -1,15 +0,0 @@ -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.6.2/console-web/docs/examples/storage/get-file-download.md b/app/sdks/0.6.2/console-web/docs/examples/storage/get-file-download.md deleted file mode 100644 index 0a4677fe80..0000000000 --- a/app/sdks/0.6.2/console-web/docs/examples/storage/get-file-download.md +++ /dev/null @@ -1,11 +0,0 @@ -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.6.2/console-web/docs/examples/storage/get-file-preview.md b/app/sdks/0.6.2/console-web/docs/examples/storage/get-file-preview.md deleted file mode 100644 index a44cb6479c..0000000000 --- a/app/sdks/0.6.2/console-web/docs/examples/storage/get-file-preview.md +++ /dev/null @@ -1,11 +0,0 @@ -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.6.2/console-web/docs/examples/storage/get-file-view.md b/app/sdks/0.6.2/console-web/docs/examples/storage/get-file-view.md deleted file mode 100644 index adfb6320c3..0000000000 --- a/app/sdks/0.6.2/console-web/docs/examples/storage/get-file-view.md +++ /dev/null @@ -1,11 +0,0 @@ -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.6.2/console-web/docs/examples/storage/get-file.md b/app/sdks/0.6.2/console-web/docs/examples/storage/get-file.md deleted file mode 100644 index 9691be3056..0000000000 --- a/app/sdks/0.6.2/console-web/docs/examples/storage/get-file.md +++ /dev/null @@ -1,15 +0,0 @@ -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.6.2/console-web/docs/examples/storage/list-files.md b/app/sdks/0.6.2/console-web/docs/examples/storage/list-files.md deleted file mode 100644 index 5c2560d06d..0000000000 --- a/app/sdks/0.6.2/console-web/docs/examples/storage/list-files.md +++ /dev/null @@ -1,15 +0,0 @@ -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.6.2/console-web/docs/examples/storage/update-file.md b/app/sdks/0.6.2/console-web/docs/examples/storage/update-file.md deleted file mode 100644 index c053d60470..0000000000 --- a/app/sdks/0.6.2/console-web/docs/examples/storage/update-file.md +++ /dev/null @@ -1,15 +0,0 @@ -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.6.2/console-web/docs/examples/teams/create-membership.md b/app/sdks/0.6.2/console-web/docs/examples/teams/create-membership.md deleted file mode 100644 index 534577ead3..0000000000 --- a/app/sdks/0.6.2/console-web/docs/examples/teams/create-membership.md +++ /dev/null @@ -1,15 +0,0 @@ -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.6.2/console-web/docs/examples/teams/create.md b/app/sdks/0.6.2/console-web/docs/examples/teams/create.md deleted file mode 100644 index 6f7232b9c5..0000000000 --- a/app/sdks/0.6.2/console-web/docs/examples/teams/create.md +++ /dev/null @@ -1,15 +0,0 @@ -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.6.2/console-web/docs/examples/teams/delete-membership.md b/app/sdks/0.6.2/console-web/docs/examples/teams/delete-membership.md deleted file mode 100644 index fa1efe401b..0000000000 --- a/app/sdks/0.6.2/console-web/docs/examples/teams/delete-membership.md +++ /dev/null @@ -1,15 +0,0 @@ -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.6.2/console-web/docs/examples/teams/delete.md b/app/sdks/0.6.2/console-web/docs/examples/teams/delete.md deleted file mode 100644 index cacad26c02..0000000000 --- a/app/sdks/0.6.2/console-web/docs/examples/teams/delete.md +++ /dev/null @@ -1,15 +0,0 @@ -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.6.2/console-web/docs/examples/teams/get-memberships.md b/app/sdks/0.6.2/console-web/docs/examples/teams/get-memberships.md deleted file mode 100644 index e1b959d1eb..0000000000 --- a/app/sdks/0.6.2/console-web/docs/examples/teams/get-memberships.md +++ /dev/null @@ -1,15 +0,0 @@ -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.6.2/console-web/docs/examples/teams/get.md b/app/sdks/0.6.2/console-web/docs/examples/teams/get.md deleted file mode 100644 index a8496ad76d..0000000000 --- a/app/sdks/0.6.2/console-web/docs/examples/teams/get.md +++ /dev/null @@ -1,15 +0,0 @@ -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.6.2/console-web/docs/examples/teams/list.md b/app/sdks/0.6.2/console-web/docs/examples/teams/list.md deleted file mode 100644 index b94d6c32ff..0000000000 --- a/app/sdks/0.6.2/console-web/docs/examples/teams/list.md +++ /dev/null @@ -1,15 +0,0 @@ -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.6.2/console-web/docs/examples/teams/update-membership-status.md b/app/sdks/0.6.2/console-web/docs/examples/teams/update-membership-status.md deleted file mode 100644 index 4931f02689..0000000000 --- a/app/sdks/0.6.2/console-web/docs/examples/teams/update-membership-status.md +++ /dev/null @@ -1,15 +0,0 @@ -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.6.2/console-web/docs/examples/teams/update.md b/app/sdks/0.6.2/console-web/docs/examples/teams/update.md deleted file mode 100644 index 5b73121518..0000000000 --- a/app/sdks/0.6.2/console-web/docs/examples/teams/update.md +++ /dev/null @@ -1,15 +0,0 @@ -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.6.2/console-web/docs/examples/users/create.md b/app/sdks/0.6.2/console-web/docs/examples/users/create.md deleted file mode 100644 index 9adc060ff5..0000000000 --- a/app/sdks/0.6.2/console-web/docs/examples/users/create.md +++ /dev/null @@ -1,15 +0,0 @@ -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.6.2/console-web/docs/examples/users/delete-session.md b/app/sdks/0.6.2/console-web/docs/examples/users/delete-session.md deleted file mode 100644 index 96a9b5c94f..0000000000 --- a/app/sdks/0.6.2/console-web/docs/examples/users/delete-session.md +++ /dev/null @@ -1,15 +0,0 @@ -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.6.2/console-web/docs/examples/users/delete-sessions.md b/app/sdks/0.6.2/console-web/docs/examples/users/delete-sessions.md deleted file mode 100644 index 56092ab5fc..0000000000 --- a/app/sdks/0.6.2/console-web/docs/examples/users/delete-sessions.md +++ /dev/null @@ -1,15 +0,0 @@ -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.6.2/console-web/docs/examples/users/get-logs.md b/app/sdks/0.6.2/console-web/docs/examples/users/get-logs.md deleted file mode 100644 index c349383ec1..0000000000 --- a/app/sdks/0.6.2/console-web/docs/examples/users/get-logs.md +++ /dev/null @@ -1,15 +0,0 @@ -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.6.2/console-web/docs/examples/users/get-prefs.md b/app/sdks/0.6.2/console-web/docs/examples/users/get-prefs.md deleted file mode 100644 index 7d8a3cd33f..0000000000 --- a/app/sdks/0.6.2/console-web/docs/examples/users/get-prefs.md +++ /dev/null @@ -1,15 +0,0 @@ -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.6.2/console-web/docs/examples/users/get-sessions.md b/app/sdks/0.6.2/console-web/docs/examples/users/get-sessions.md deleted file mode 100644 index 1b7535855e..0000000000 --- a/app/sdks/0.6.2/console-web/docs/examples/users/get-sessions.md +++ /dev/null @@ -1,15 +0,0 @@ -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.6.2/console-web/docs/examples/users/get.md b/app/sdks/0.6.2/console-web/docs/examples/users/get.md deleted file mode 100644 index 751798de39..0000000000 --- a/app/sdks/0.6.2/console-web/docs/examples/users/get.md +++ /dev/null @@ -1,15 +0,0 @@ -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.6.2/console-web/docs/examples/users/list.md b/app/sdks/0.6.2/console-web/docs/examples/users/list.md deleted file mode 100644 index bbc4895412..0000000000 --- a/app/sdks/0.6.2/console-web/docs/examples/users/list.md +++ /dev/null @@ -1,15 +0,0 @@ -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.6.2/console-web/docs/examples/users/update-prefs.md b/app/sdks/0.6.2/console-web/docs/examples/users/update-prefs.md deleted file mode 100644 index 877aa309a1..0000000000 --- a/app/sdks/0.6.2/console-web/docs/examples/users/update-prefs.md +++ /dev/null @@ -1,15 +0,0 @@ -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.6.2/console-web/docs/examples/users/update-status.md b/app/sdks/0.6.2/console-web/docs/examples/users/update-status.md deleted file mode 100644 index 6c432ff4c6..0000000000 --- a/app/sdks/0.6.2/console-web/docs/examples/users/update-status.md +++ /dev/null @@ -1,15 +0,0 @@ -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.6.2/console-web/package.json b/app/sdks/0.6.2/console-web/package.json deleted file mode 100644 index 6c53a70307..0000000000 --- a/app/sdks/0.6.2/console-web/package.json +++ /dev/null @@ -1,17 +0,0 @@ -{ - "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.6.2/console-web/src/sdk.js b/app/sdks/0.6.2/console-web/src/sdk.js deleted file mode 100644 index 387d3a4121..0000000000 --- a/app/sdks/0.6.2/console-web/src/sdk.js +++ /dev/null @@ -1,5088 +0,0 @@ -(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:web: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 = '/auth/oauth2/success', failure = '/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} offset - * @param {number} limit - * @param {string} orderField - * @param {string} orderType - * @param {string} orderCast - * @param {string} search - * @throws {Error} - * @return {Promise} - */ - listDocuments: function(collectionId, filters = [], offset = 0, limit = 50, 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(offset) { - payload['offset'] = offset; - } - - if(limit) { - payload['limit'] = limit; - } - - 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 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 bar = { - - /** - * Mock a get request for SDK tests - * - * - * @param {string} x - * @param {number} y - * @param {string[]} z - * @throws {Error} - * @return {Promise} - */ - get: function(x, y, z) { - if(x === undefined) { - throw new Error('Missing required parameter: "x"'); - } - - if(y === undefined) { - throw new Error('Missing required parameter: "y"'); - } - - if(z === undefined) { - throw new Error('Missing required parameter: "z"'); - } - - let path = '/mock/tests/bar'; - - let payload = {}; - - if(x) { - payload['x'] = x; - } - - if(y) { - payload['y'] = y; - } - - if(z) { - payload['z'] = z; - } - - return http - .get(path, { - 'content-type': 'application/json', - }, payload); - }, - - /** - * Mock a post request for SDK tests - * - * - * @param {string} x - * @param {number} y - * @param {string[]} z - * @throws {Error} - * @return {Promise} - */ - post: function(x, y, z) { - if(x === undefined) { - throw new Error('Missing required parameter: "x"'); - } - - if(y === undefined) { - throw new Error('Missing required parameter: "y"'); - } - - if(z === undefined) { - throw new Error('Missing required parameter: "z"'); - } - - let path = '/mock/tests/bar'; - - let payload = {}; - - if(x) { - payload['x'] = x; - } - - if(y) { - payload['y'] = y; - } - - if(z) { - payload['z'] = z; - } - - return http - .post(path, { - 'content-type': 'application/json', - }, payload); - }, - - /** - * Mock a put request for SDK tests - * - * - * @param {string} x - * @param {number} y - * @param {string[]} z - * @throws {Error} - * @return {Promise} - */ - put: function(x, y, z) { - if(x === undefined) { - throw new Error('Missing required parameter: "x"'); - } - - if(y === undefined) { - throw new Error('Missing required parameter: "y"'); - } - - if(z === undefined) { - throw new Error('Missing required parameter: "z"'); - } - - let path = '/mock/tests/bar'; - - let payload = {}; - - if(x) { - payload['x'] = x; - } - - if(y) { - payload['y'] = y; - } - - if(z) { - payload['z'] = z; - } - - return http - .put(path, { - 'content-type': 'application/json', - }, payload); - }, - - /** - * Mock a patch request for SDK tests - * - * - * @param {string} x - * @param {number} y - * @param {string[]} z - * @throws {Error} - * @return {Promise} - */ - patch: function(x, y, z) { - if(x === undefined) { - throw new Error('Missing required parameter: "x"'); - } - - if(y === undefined) { - throw new Error('Missing required parameter: "y"'); - } - - if(z === undefined) { - throw new Error('Missing required parameter: "z"'); - } - - let path = '/mock/tests/bar'; - - let payload = {}; - - if(x) { - payload['x'] = x; - } - - if(y) { - payload['y'] = y; - } - - if(z) { - payload['z'] = z; - } - - return http - .patch(path, { - 'content-type': 'application/json', - }, payload); - }, - - /** - * Mock a delete request for SDK tests - * - * - * @param {string} x - * @param {number} y - * @param {string[]} z - * @throws {Error} - * @return {Promise} - */ - delete: function(x, y, z) { - if(x === undefined) { - throw new Error('Missing required parameter: "x"'); - } - - if(y === undefined) { - throw new Error('Missing required parameter: "y"'); - } - - if(z === undefined) { - throw new Error('Missing required parameter: "z"'); - } - - let path = '/mock/tests/bar'; - - let payload = {}; - - if(x) { - payload['x'] = x; - } - - if(y) { - payload['y'] = y; - } - - if(z) { - payload['z'] = z; - } - - return http - .delete(path, { - 'content-type': 'application/json', - }, payload); - } - }; - - let foo = { - - /** - * Mock a get request for SDK tests - * - * - * @param {string} x - * @param {number} y - * @param {string[]} z - * @throws {Error} - * @return {Promise} - */ - get: function(x, y, z) { - if(x === undefined) { - throw new Error('Missing required parameter: "x"'); - } - - if(y === undefined) { - throw new Error('Missing required parameter: "y"'); - } - - if(z === undefined) { - throw new Error('Missing required parameter: "z"'); - } - - let path = '/mock/tests/foo'; - - let payload = {}; - - if(x) { - payload['x'] = x; - } - - if(y) { - payload['y'] = y; - } - - if(z) { - payload['z'] = z; - } - - return http - .get(path, { - 'content-type': 'application/json', - }, payload); - }, - - /** - * Mock a post request for SDK tests - * - * - * @param {string} x - * @param {number} y - * @param {string[]} z - * @throws {Error} - * @return {Promise} - */ - post: function(x, y, z) { - if(x === undefined) { - throw new Error('Missing required parameter: "x"'); - } - - if(y === undefined) { - throw new Error('Missing required parameter: "y"'); - } - - if(z === undefined) { - throw new Error('Missing required parameter: "z"'); - } - - let path = '/mock/tests/foo'; - - let payload = {}; - - if(x) { - payload['x'] = x; - } - - if(y) { - payload['y'] = y; - } - - if(z) { - payload['z'] = z; - } - - return http - .post(path, { - 'content-type': 'application/json', - }, payload); - }, - - /** - * Mock a put request for SDK tests - * - * - * @param {string} x - * @param {number} y - * @param {string[]} z - * @throws {Error} - * @return {Promise} - */ - put: function(x, y, z) { - if(x === undefined) { - throw new Error('Missing required parameter: "x"'); - } - - if(y === undefined) { - throw new Error('Missing required parameter: "y"'); - } - - if(z === undefined) { - throw new Error('Missing required parameter: "z"'); - } - - let path = '/mock/tests/foo'; - - let payload = {}; - - if(x) { - payload['x'] = x; - } - - if(y) { - payload['y'] = y; - } - - if(z) { - payload['z'] = z; - } - - return http - .put(path, { - 'content-type': 'application/json', - }, payload); - }, - - /** - * Mock a patch request for SDK tests - * - * - * @param {string} x - * @param {number} y - * @param {string[]} z - * @throws {Error} - * @return {Promise} - */ - patch: function(x, y, z) { - if(x === undefined) { - throw new Error('Missing required parameter: "x"'); - } - - if(y === undefined) { - throw new Error('Missing required parameter: "y"'); - } - - if(z === undefined) { - throw new Error('Missing required parameter: "z"'); - } - - let path = '/mock/tests/foo'; - - let payload = {}; - - if(x) { - payload['x'] = x; - } - - if(y) { - payload['y'] = y; - } - - if(z) { - payload['z'] = z; - } - - return http - .patch(path, { - 'content-type': 'application/json', - }, payload); - }, - - /** - * Mock a delete request for SDK tests - * - * - * @param {string} x - * @param {number} y - * @param {string[]} z - * @throws {Error} - * @return {Promise} - */ - delete: function(x, y, z) { - if(x === undefined) { - throw new Error('Missing required parameter: "x"'); - } - - if(y === undefined) { - throw new Error('Missing required parameter: "y"'); - } - - if(z === undefined) { - throw new Error('Missing required parameter: "z"'); - } - - let path = '/mock/tests/foo'; - - let payload = {}; - - if(x) { - payload['x'] = x; - } - - if(y) { - payload['y'] = y; - } - - if(z) { - payload['z'] = z; - } - - return http - .delete(path, { - 'content-type': 'application/json', - }, payload); - } - }; - - let general = { - - /** - * Mock a post request for SDK tests - * - * - * @throws {Error} - * @return {Promise} - */ - empty: function() { - let path = '/mock/tests/general/empty'; - - let payload = {}; - - return http - .get(path, { - 'content-type': 'application/json', - }, payload); - }, - - /** - * Mock a cookie request for SDK tests - * - * - * @throws {Error} - * @return {Promise} - */ - getCookie: function() { - let path = '/mock/tests/general/get-cookie'; - - let payload = {}; - - return http - .get(path, { - 'content-type': 'application/json', - }, payload); - }, - - /** - * Mock a post request for SDK tests - * - * - * @throws {Error} - * @return {Promise} - */ - redirect: function() { - let path = '/mock/tests/general/redirect'; - - let payload = {}; - - return http - .get(path, { - 'content-type': 'application/json', - }, payload); - }, - - /** - * Mock a post request for SDK tests - * - * - * @throws {Error} - * @return {Promise} - */ - redirected: function() { - let path = '/mock/tests/general/redirected'; - - let payload = {}; - - return http - .get(path, { - 'content-type': 'application/json', - }, payload); - }, - - /** - * Mock a cookie request for SDK tests - * - * - * @throws {Error} - * @return {Promise} - */ - setCookie: function() { - let path = '/mock/tests/general/set-cookie'; - - let payload = {}; - - return http - .get(path, { - 'content-type': 'application/json', - }, payload); - }, - - /** - * Mock a post request for SDK tests - * - * - * @param {string} x - * @param {number} y - * @param {string[]} z - * @param {File} file - * @throws {Error} - * @return {Promise} - */ - upload: function(x, y, z, file) { - if(x === undefined) { - throw new Error('Missing required parameter: "x"'); - } - - if(y === undefined) { - throw new Error('Missing required parameter: "y"'); - } - - if(z === undefined) { - throw new Error('Missing required parameter: "z"'); - } - - if(file === undefined) { - throw new Error('Missing required parameter: "file"'); - } - - let path = '/mock/tests/general/upload'; - - let payload = {}; - - if(x) { - payload['x'] = x; - } - - if(y) { - payload['y'] = y; - } - - if(z) { - payload['z'] = z; - } - - if(file) { - payload['file'] = file; - } - - return http - .post(path, { - 'content-type': 'multipart/form-data', - }, payload); - } - }; - - let projects = { - - /** - * List Projects - * - * - * @throws {Error} - * @return {Promise} - */ - list: function() { - let path = '/projects'; - - let payload = {}; - - 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); - }, - - /** - * 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, - health: health, - locale: locale, - bar: bar, - foo: foo, - general: general, - 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.6.2/console-web/src/sdk.min.js b/app/sdks/0.6.2/console-web/src/sdk.min.js deleted file mode 100644 index a801231ada..0000000000 --- a/app/sdks/0.6.2/console-web/src/sdk.min.js +++ /dev/null @@ -1,447 +0,0 @@ -(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='/auth/oauth2/success',failure='/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} offset - * @param {number} limit - * @param {string} orderField - * @param {string} orderType - * @param {string} orderCast - * @param {string} search - * @throws {Error} - * @return {Promise} - */ - listDocuments(collectionId: string, filters?: string[], offset?: number, limit?: 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 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 Bar { - - /** - * Mock a get request for SDK tests - * - * - * @param {string} x - * @param {number} y - * @param {string[]} z - * @throws {Error} - * @return {Promise} - */ - get(x: string, y: number, z: string[]): Promise; - - /** - * Mock a post request for SDK tests - * - * - * @param {string} x - * @param {number} y - * @param {string[]} z - * @throws {Error} - * @return {Promise} - */ - post(x: string, y: number, z: string[]): Promise; - - /** - * Mock a put request for SDK tests - * - * - * @param {string} x - * @param {number} y - * @param {string[]} z - * @throws {Error} - * @return {Promise} - */ - put(x: string, y: number, z: string[]): Promise; - - /** - * Mock a patch request for SDK tests - * - * - * @param {string} x - * @param {number} y - * @param {string[]} z - * @throws {Error} - * @return {Promise} - */ - patch(x: string, y: number, z: string[]): Promise; - - /** - * Mock a delete request for SDK tests - * - * - * @param {string} x - * @param {number} y - * @param {string[]} z - * @throws {Error} - * @return {Promise} - */ - delete(x: string, y: number, z: string[]): Promise; - - } - - export interface Foo { - - /** - * Mock a get request for SDK tests - * - * - * @param {string} x - * @param {number} y - * @param {string[]} z - * @throws {Error} - * @return {Promise} - */ - get(x: string, y: number, z: string[]): Promise; - - /** - * Mock a post request for SDK tests - * - * - * @param {string} x - * @param {number} y - * @param {string[]} z - * @throws {Error} - * @return {Promise} - */ - post(x: string, y: number, z: string[]): Promise; - - /** - * Mock a put request for SDK tests - * - * - * @param {string} x - * @param {number} y - * @param {string[]} z - * @throws {Error} - * @return {Promise} - */ - put(x: string, y: number, z: string[]): Promise; - - /** - * Mock a patch request for SDK tests - * - * - * @param {string} x - * @param {number} y - * @param {string[]} z - * @throws {Error} - * @return {Promise} - */ - patch(x: string, y: number, z: string[]): Promise; - - /** - * Mock a delete request for SDK tests - * - * - * @param {string} x - * @param {number} y - * @param {string[]} z - * @throws {Error} - * @return {Promise} - */ - delete(x: string, y: number, z: string[]): Promise; - - } - - export interface General { - - /** - * Mock a post request for SDK tests - * - * - * @throws {Error} - * @return {Promise} - */ - empty(): Promise; - - /** - * Mock a cookie request for SDK tests - * - * - * @throws {Error} - * @return {Promise} - */ - getCookie(): Promise; - - /** - * Mock a post request for SDK tests - * - * - * @throws {Error} - * @return {Promise} - */ - redirect(): Promise; - - /** - * Mock a post request for SDK tests - * - * - * @throws {Error} - * @return {Promise} - */ - redirected(): Promise; - - /** - * Mock a cookie request for SDK tests - * - * - * @throws {Error} - * @return {Promise} - */ - setCookie(): Promise; - - /** - * Mock a post request for SDK tests - * - * - * @param {string} x - * @param {number} y - * @param {string[]} z - * @param {File} file - * @throws {Error} - * @return {Promise} - */ - upload(x: string, y: number, z: string[], file: File): Promise; - - } - - export interface Projects { - - /** - * List Projects - * - * - * @throws {Error} - * @return {Promise} - */ - list(): 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; - - /** - * 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.6.2/server-deno/CHANGELOG.md b/app/sdks/0.6.2/server-deno/CHANGELOG.md deleted file mode 100644 index fa4d35e687..0000000000 --- a/app/sdks/0.6.2/server-deno/CHANGELOG.md +++ /dev/null @@ -1 +0,0 @@ -# Change Log \ No newline at end of file diff --git a/app/sdks/0.6.2/server-deno/LICENSE b/app/sdks/0.6.2/server-deno/LICENSE deleted file mode 100644 index fc7c051a91..0000000000 --- a/app/sdks/0.6.2/server-deno/LICENSE +++ /dev/null @@ -1,12 +0,0 @@ -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.6.2/server-deno/README.md b/app/sdks/0.6.2/server-deno/README.md deleted file mode 100644 index 82bd02c8ef..0000000000 --- a/app/sdks/0.6.2/server-deno/README.md +++ /dev/null @@ -1,28 +0,0 @@ -# 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.6.2/server-deno/docs/examples/avatars/get-browser.md b/app/sdks/0.6.2/server-deno/docs/examples/avatars/get-browser.md deleted file mode 100644 index 27c0336054..0000000000 --- a/app/sdks/0.6.2/server-deno/docs/examples/avatars/get-browser.md +++ /dev/null @@ -1,20 +0,0 @@ -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.6.2/server-deno/docs/examples/avatars/get-credit-card.md b/app/sdks/0.6.2/server-deno/docs/examples/avatars/get-credit-card.md deleted file mode 100644 index 998356a106..0000000000 --- a/app/sdks/0.6.2/server-deno/docs/examples/avatars/get-credit-card.md +++ /dev/null @@ -1,20 +0,0 @@ -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.6.2/server-deno/docs/examples/avatars/get-favicon.md b/app/sdks/0.6.2/server-deno/docs/examples/avatars/get-favicon.md deleted file mode 100644 index 43afe096c4..0000000000 --- a/app/sdks/0.6.2/server-deno/docs/examples/avatars/get-favicon.md +++ /dev/null @@ -1,20 +0,0 @@ -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.6.2/server-deno/docs/examples/avatars/get-flag.md b/app/sdks/0.6.2/server-deno/docs/examples/avatars/get-flag.md deleted file mode 100644 index 6b28e5db2f..0000000000 --- a/app/sdks/0.6.2/server-deno/docs/examples/avatars/get-flag.md +++ /dev/null @@ -1,20 +0,0 @@ -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.6.2/server-deno/docs/examples/avatars/get-image.md b/app/sdks/0.6.2/server-deno/docs/examples/avatars/get-image.md deleted file mode 100644 index 0a2693c768..0000000000 --- a/app/sdks/0.6.2/server-deno/docs/examples/avatars/get-image.md +++ /dev/null @@ -1,20 +0,0 @@ -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.6.2/server-deno/docs/examples/avatars/get-initials.md b/app/sdks/0.6.2/server-deno/docs/examples/avatars/get-initials.md deleted file mode 100644 index af35445bb3..0000000000 --- a/app/sdks/0.6.2/server-deno/docs/examples/avatars/get-initials.md +++ /dev/null @@ -1,20 +0,0 @@ -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.getInitials(); - -promise.then(function (response) { - console.log(response); -}, function (error) { - console.log(error); -}); \ No newline at end of file diff --git a/app/sdks/0.6.2/server-deno/docs/examples/avatars/get-q-r.md b/app/sdks/0.6.2/server-deno/docs/examples/avatars/get-q-r.md deleted file mode 100644 index 6d8446b105..0000000000 --- a/app/sdks/0.6.2/server-deno/docs/examples/avatars/get-q-r.md +++ /dev/null @@ -1,20 +0,0 @@ -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.6.2/server-deno/docs/examples/database/create-collection.md b/app/sdks/0.6.2/server-deno/docs/examples/database/create-collection.md deleted file mode 100644 index 316ae6b222..0000000000 --- a/app/sdks/0.6.2/server-deno/docs/examples/database/create-collection.md +++ /dev/null @@ -1,20 +0,0 @@ -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.6.2/server-deno/docs/examples/database/create-document.md b/app/sdks/0.6.2/server-deno/docs/examples/database/create-document.md deleted file mode 100644 index ef78a839a4..0000000000 --- a/app/sdks/0.6.2/server-deno/docs/examples/database/create-document.md +++ /dev/null @@ -1,20 +0,0 @@ -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.6.2/server-deno/docs/examples/database/delete-collection.md b/app/sdks/0.6.2/server-deno/docs/examples/database/delete-collection.md deleted file mode 100644 index e9b5d6392b..0000000000 --- a/app/sdks/0.6.2/server-deno/docs/examples/database/delete-collection.md +++ /dev/null @@ -1,20 +0,0 @@ -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.6.2/server-deno/docs/examples/database/delete-document.md b/app/sdks/0.6.2/server-deno/docs/examples/database/delete-document.md deleted file mode 100644 index b7d3f52c71..0000000000 --- a/app/sdks/0.6.2/server-deno/docs/examples/database/delete-document.md +++ /dev/null @@ -1,20 +0,0 @@ -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.6.2/server-deno/docs/examples/database/get-collection.md b/app/sdks/0.6.2/server-deno/docs/examples/database/get-collection.md deleted file mode 100644 index 323bc7ec74..0000000000 --- a/app/sdks/0.6.2/server-deno/docs/examples/database/get-collection.md +++ /dev/null @@ -1,20 +0,0 @@ -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.6.2/server-deno/docs/examples/database/get-document.md b/app/sdks/0.6.2/server-deno/docs/examples/database/get-document.md deleted file mode 100644 index 7a0332251a..0000000000 --- a/app/sdks/0.6.2/server-deno/docs/examples/database/get-document.md +++ /dev/null @@ -1,20 +0,0 @@ -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.6.2/server-deno/docs/examples/database/list-collections.md b/app/sdks/0.6.2/server-deno/docs/examples/database/list-collections.md deleted file mode 100644 index 292e46f860..0000000000 --- a/app/sdks/0.6.2/server-deno/docs/examples/database/list-collections.md +++ /dev/null @@ -1,20 +0,0 @@ -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.6.2/server-deno/docs/examples/database/list-documents.md b/app/sdks/0.6.2/server-deno/docs/examples/database/list-documents.md deleted file mode 100644 index bb22a3956a..0000000000 --- a/app/sdks/0.6.2/server-deno/docs/examples/database/list-documents.md +++ /dev/null @@ -1,20 +0,0 @@ -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.6.2/server-deno/docs/examples/database/update-collection.md b/app/sdks/0.6.2/server-deno/docs/examples/database/update-collection.md deleted file mode 100644 index 8239e45f28..0000000000 --- a/app/sdks/0.6.2/server-deno/docs/examples/database/update-collection.md +++ /dev/null @@ -1,20 +0,0 @@ -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.6.2/server-deno/docs/examples/database/update-document.md b/app/sdks/0.6.2/server-deno/docs/examples/database/update-document.md deleted file mode 100644 index cd079c8f2d..0000000000 --- a/app/sdks/0.6.2/server-deno/docs/examples/database/update-document.md +++ /dev/null @@ -1,20 +0,0 @@ -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.6.2/server-deno/docs/examples/health/get-anti-virus.md b/app/sdks/0.6.2/server-deno/docs/examples/health/get-anti-virus.md deleted file mode 100644 index e06fbf86de..0000000000 --- a/app/sdks/0.6.2/server-deno/docs/examples/health/get-anti-virus.md +++ /dev/null @@ -1,20 +0,0 @@ -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.6.2/server-deno/docs/examples/health/get-cache.md b/app/sdks/0.6.2/server-deno/docs/examples/health/get-cache.md deleted file mode 100644 index b58ca1bc15..0000000000 --- a/app/sdks/0.6.2/server-deno/docs/examples/health/get-cache.md +++ /dev/null @@ -1,20 +0,0 @@ -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.6.2/server-deno/docs/examples/health/get-d-b.md b/app/sdks/0.6.2/server-deno/docs/examples/health/get-d-b.md deleted file mode 100644 index 946cfb03a8..0000000000 --- a/app/sdks/0.6.2/server-deno/docs/examples/health/get-d-b.md +++ /dev/null @@ -1,20 +0,0 @@ -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.6.2/server-deno/docs/examples/health/get-queue-certificates.md b/app/sdks/0.6.2/server-deno/docs/examples/health/get-queue-certificates.md deleted file mode 100644 index a86358bb22..0000000000 --- a/app/sdks/0.6.2/server-deno/docs/examples/health/get-queue-certificates.md +++ /dev/null @@ -1,20 +0,0 @@ -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.6.2/server-deno/docs/examples/health/get-queue-functions.md b/app/sdks/0.6.2/server-deno/docs/examples/health/get-queue-functions.md deleted file mode 100644 index 033248b118..0000000000 --- a/app/sdks/0.6.2/server-deno/docs/examples/health/get-queue-functions.md +++ /dev/null @@ -1,20 +0,0 @@ -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.6.2/server-deno/docs/examples/health/get-queue-logs.md b/app/sdks/0.6.2/server-deno/docs/examples/health/get-queue-logs.md deleted file mode 100644 index d4c3300a35..0000000000 --- a/app/sdks/0.6.2/server-deno/docs/examples/health/get-queue-logs.md +++ /dev/null @@ -1,20 +0,0 @@ -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.6.2/server-deno/docs/examples/health/get-queue-tasks.md b/app/sdks/0.6.2/server-deno/docs/examples/health/get-queue-tasks.md deleted file mode 100644 index 01e3094ffc..0000000000 --- a/app/sdks/0.6.2/server-deno/docs/examples/health/get-queue-tasks.md +++ /dev/null @@ -1,20 +0,0 @@ -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.6.2/server-deno/docs/examples/health/get-queue-usage.md b/app/sdks/0.6.2/server-deno/docs/examples/health/get-queue-usage.md deleted file mode 100644 index d0d8faf7b6..0000000000 --- a/app/sdks/0.6.2/server-deno/docs/examples/health/get-queue-usage.md +++ /dev/null @@ -1,20 +0,0 @@ -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.6.2/server-deno/docs/examples/health/get-queue-webhooks.md b/app/sdks/0.6.2/server-deno/docs/examples/health/get-queue-webhooks.md deleted file mode 100644 index 268c521373..0000000000 --- a/app/sdks/0.6.2/server-deno/docs/examples/health/get-queue-webhooks.md +++ /dev/null @@ -1,20 +0,0 @@ -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.6.2/server-deno/docs/examples/health/get-storage-local.md b/app/sdks/0.6.2/server-deno/docs/examples/health/get-storage-local.md deleted file mode 100644 index 77bb658f9a..0000000000 --- a/app/sdks/0.6.2/server-deno/docs/examples/health/get-storage-local.md +++ /dev/null @@ -1,20 +0,0 @@ -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.6.2/server-deno/docs/examples/health/get-time.md b/app/sdks/0.6.2/server-deno/docs/examples/health/get-time.md deleted file mode 100644 index 0e5205b075..0000000000 --- a/app/sdks/0.6.2/server-deno/docs/examples/health/get-time.md +++ /dev/null @@ -1,20 +0,0 @@ -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.6.2/server-deno/docs/examples/health/get.md b/app/sdks/0.6.2/server-deno/docs/examples/health/get.md deleted file mode 100644 index c2e6ecdf65..0000000000 --- a/app/sdks/0.6.2/server-deno/docs/examples/health/get.md +++ /dev/null @@ -1,20 +0,0 @@ -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.6.2/server-deno/docs/examples/locale/get-continents.md b/app/sdks/0.6.2/server-deno/docs/examples/locale/get-continents.md deleted file mode 100644 index 18221d44b4..0000000000 --- a/app/sdks/0.6.2/server-deno/docs/examples/locale/get-continents.md +++ /dev/null @@ -1,20 +0,0 @@ -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.6.2/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 deleted file mode 100644 index 4a3e49f755..0000000000 --- a/app/sdks/0.6.2/server-deno/docs/examples/locale/get-countries-e-u.md +++ /dev/null @@ -1,20 +0,0 @@ -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.6.2/server-deno/docs/examples/locale/get-countries-phones.md b/app/sdks/0.6.2/server-deno/docs/examples/locale/get-countries-phones.md deleted file mode 100644 index 61a1790806..0000000000 --- a/app/sdks/0.6.2/server-deno/docs/examples/locale/get-countries-phones.md +++ /dev/null @@ -1,20 +0,0 @@ -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.6.2/server-deno/docs/examples/locale/get-countries.md b/app/sdks/0.6.2/server-deno/docs/examples/locale/get-countries.md deleted file mode 100644 index 20f544e617..0000000000 --- a/app/sdks/0.6.2/server-deno/docs/examples/locale/get-countries.md +++ /dev/null @@ -1,20 +0,0 @@ -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.6.2/server-deno/docs/examples/locale/get-currencies.md b/app/sdks/0.6.2/server-deno/docs/examples/locale/get-currencies.md deleted file mode 100644 index 13b975291d..0000000000 --- a/app/sdks/0.6.2/server-deno/docs/examples/locale/get-currencies.md +++ /dev/null @@ -1,20 +0,0 @@ -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.6.2/server-deno/docs/examples/locale/get-languages.md b/app/sdks/0.6.2/server-deno/docs/examples/locale/get-languages.md deleted file mode 100644 index 95c5c6b355..0000000000 --- a/app/sdks/0.6.2/server-deno/docs/examples/locale/get-languages.md +++ /dev/null @@ -1,20 +0,0 @@ -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.getLanguages(); - -promise.then(function (response) { - console.log(response); -}, function (error) { - console.log(error); -}); \ No newline at end of file diff --git a/app/sdks/0.6.2/server-deno/docs/examples/locale/get.md b/app/sdks/0.6.2/server-deno/docs/examples/locale/get.md deleted file mode 100644 index 2336c3289d..0000000000 --- a/app/sdks/0.6.2/server-deno/docs/examples/locale/get.md +++ /dev/null @@ -1,20 +0,0 @@ -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.6.2/server-deno/docs/examples/storage/create-file.md b/app/sdks/0.6.2/server-deno/docs/examples/storage/create-file.md deleted file mode 100644 index 5b446e1a38..0000000000 --- a/app/sdks/0.6.2/server-deno/docs/examples/storage/create-file.md +++ /dev/null @@ -1,20 +0,0 @@ -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.6.2/server-deno/docs/examples/storage/delete-file.md b/app/sdks/0.6.2/server-deno/docs/examples/storage/delete-file.md deleted file mode 100644 index 6469308c74..0000000000 --- a/app/sdks/0.6.2/server-deno/docs/examples/storage/delete-file.md +++ /dev/null @@ -1,20 +0,0 @@ -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.6.2/server-deno/docs/examples/storage/get-file-download.md b/app/sdks/0.6.2/server-deno/docs/examples/storage/get-file-download.md deleted file mode 100644 index 4510257bad..0000000000 --- a/app/sdks/0.6.2/server-deno/docs/examples/storage/get-file-download.md +++ /dev/null @@ -1,20 +0,0 @@ -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.6.2/server-deno/docs/examples/storage/get-file-preview.md b/app/sdks/0.6.2/server-deno/docs/examples/storage/get-file-preview.md deleted file mode 100644 index 282fb30324..0000000000 --- a/app/sdks/0.6.2/server-deno/docs/examples/storage/get-file-preview.md +++ /dev/null @@ -1,20 +0,0 @@ -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.6.2/server-deno/docs/examples/storage/get-file-view.md b/app/sdks/0.6.2/server-deno/docs/examples/storage/get-file-view.md deleted file mode 100644 index 8af5391017..0000000000 --- a/app/sdks/0.6.2/server-deno/docs/examples/storage/get-file-view.md +++ /dev/null @@ -1,20 +0,0 @@ -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.6.2/server-deno/docs/examples/storage/get-file.md b/app/sdks/0.6.2/server-deno/docs/examples/storage/get-file.md deleted file mode 100644 index 393ce229cb..0000000000 --- a/app/sdks/0.6.2/server-deno/docs/examples/storage/get-file.md +++ /dev/null @@ -1,20 +0,0 @@ -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.6.2/server-deno/docs/examples/storage/list-files.md b/app/sdks/0.6.2/server-deno/docs/examples/storage/list-files.md deleted file mode 100644 index 0e57cd01de..0000000000 --- a/app/sdks/0.6.2/server-deno/docs/examples/storage/list-files.md +++ /dev/null @@ -1,20 +0,0 @@ -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.6.2/server-deno/docs/examples/storage/update-file.md b/app/sdks/0.6.2/server-deno/docs/examples/storage/update-file.md deleted file mode 100644 index 33b2263540..0000000000 --- a/app/sdks/0.6.2/server-deno/docs/examples/storage/update-file.md +++ /dev/null @@ -1,20 +0,0 @@ -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.6.2/server-deno/docs/examples/teams/create-membership.md b/app/sdks/0.6.2/server-deno/docs/examples/teams/create-membership.md deleted file mode 100644 index b277899c91..0000000000 --- a/app/sdks/0.6.2/server-deno/docs/examples/teams/create-membership.md +++ /dev/null @@ -1,20 +0,0 @@ -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.6.2/server-deno/docs/examples/teams/create.md b/app/sdks/0.6.2/server-deno/docs/examples/teams/create.md deleted file mode 100644 index 1ef3e01b81..0000000000 --- a/app/sdks/0.6.2/server-deno/docs/examples/teams/create.md +++ /dev/null @@ -1,20 +0,0 @@ -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.6.2/server-deno/docs/examples/teams/delete-membership.md b/app/sdks/0.6.2/server-deno/docs/examples/teams/delete-membership.md deleted file mode 100644 index 911fa30075..0000000000 --- a/app/sdks/0.6.2/server-deno/docs/examples/teams/delete-membership.md +++ /dev/null @@ -1,20 +0,0 @@ -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.6.2/server-deno/docs/examples/teams/delete.md b/app/sdks/0.6.2/server-deno/docs/examples/teams/delete.md deleted file mode 100644 index 61ac03483f..0000000000 --- a/app/sdks/0.6.2/server-deno/docs/examples/teams/delete.md +++ /dev/null @@ -1,20 +0,0 @@ -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.6.2/server-deno/docs/examples/teams/get-memberships.md b/app/sdks/0.6.2/server-deno/docs/examples/teams/get-memberships.md deleted file mode 100644 index b652f8e4e5..0000000000 --- a/app/sdks/0.6.2/server-deno/docs/examples/teams/get-memberships.md +++ /dev/null @@ -1,20 +0,0 @@ -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.6.2/server-deno/docs/examples/teams/get.md b/app/sdks/0.6.2/server-deno/docs/examples/teams/get.md deleted file mode 100644 index 69496e3eef..0000000000 --- a/app/sdks/0.6.2/server-deno/docs/examples/teams/get.md +++ /dev/null @@ -1,20 +0,0 @@ -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.6.2/server-deno/docs/examples/teams/list.md b/app/sdks/0.6.2/server-deno/docs/examples/teams/list.md deleted file mode 100644 index 70851dda51..0000000000 --- a/app/sdks/0.6.2/server-deno/docs/examples/teams/list.md +++ /dev/null @@ -1,20 +0,0 @@ -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.6.2/server-deno/docs/examples/teams/update.md b/app/sdks/0.6.2/server-deno/docs/examples/teams/update.md deleted file mode 100644 index 7b815b4050..0000000000 --- a/app/sdks/0.6.2/server-deno/docs/examples/teams/update.md +++ /dev/null @@ -1,20 +0,0 @@ -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.6.2/server-deno/docs/examples/users/create.md b/app/sdks/0.6.2/server-deno/docs/examples/users/create.md deleted file mode 100644 index 593eee6e9f..0000000000 --- a/app/sdks/0.6.2/server-deno/docs/examples/users/create.md +++ /dev/null @@ -1,20 +0,0 @@ -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.6.2/server-deno/docs/examples/users/delete-session.md b/app/sdks/0.6.2/server-deno/docs/examples/users/delete-session.md deleted file mode 100644 index e4940773e4..0000000000 --- a/app/sdks/0.6.2/server-deno/docs/examples/users/delete-session.md +++ /dev/null @@ -1,20 +0,0 @@ -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.6.2/server-deno/docs/examples/users/delete-sessions.md b/app/sdks/0.6.2/server-deno/docs/examples/users/delete-sessions.md deleted file mode 100644 index e772c00a5f..0000000000 --- a/app/sdks/0.6.2/server-deno/docs/examples/users/delete-sessions.md +++ /dev/null @@ -1,20 +0,0 @@ -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.6.2/server-deno/docs/examples/users/get-logs.md b/app/sdks/0.6.2/server-deno/docs/examples/users/get-logs.md deleted file mode 100644 index 58cc4fc529..0000000000 --- a/app/sdks/0.6.2/server-deno/docs/examples/users/get-logs.md +++ /dev/null @@ -1,20 +0,0 @@ -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.6.2/server-deno/docs/examples/users/get-prefs.md b/app/sdks/0.6.2/server-deno/docs/examples/users/get-prefs.md deleted file mode 100644 index 4cda0bb73e..0000000000 --- a/app/sdks/0.6.2/server-deno/docs/examples/users/get-prefs.md +++ /dev/null @@ -1,20 +0,0 @@ -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.6.2/server-deno/docs/examples/users/get-sessions.md b/app/sdks/0.6.2/server-deno/docs/examples/users/get-sessions.md deleted file mode 100644 index 6686e21564..0000000000 --- a/app/sdks/0.6.2/server-deno/docs/examples/users/get-sessions.md +++ /dev/null @@ -1,20 +0,0 @@ -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.6.2/server-deno/docs/examples/users/get.md b/app/sdks/0.6.2/server-deno/docs/examples/users/get.md deleted file mode 100644 index dce73d62c5..0000000000 --- a/app/sdks/0.6.2/server-deno/docs/examples/users/get.md +++ /dev/null @@ -1,20 +0,0 @@ -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.6.2/server-deno/docs/examples/users/list.md b/app/sdks/0.6.2/server-deno/docs/examples/users/list.md deleted file mode 100644 index b089c3e7e9..0000000000 --- a/app/sdks/0.6.2/server-deno/docs/examples/users/list.md +++ /dev/null @@ -1,20 +0,0 @@ -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.6.2/server-deno/docs/examples/users/update-prefs.md b/app/sdks/0.6.2/server-deno/docs/examples/users/update-prefs.md deleted file mode 100644 index b06185ee91..0000000000 --- a/app/sdks/0.6.2/server-deno/docs/examples/users/update-prefs.md +++ /dev/null @@ -1,20 +0,0 @@ -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.6.2/server-deno/docs/examples/users/update-status.md b/app/sdks/0.6.2/server-deno/docs/examples/users/update-status.md deleted file mode 100644 index a0f028bde5..0000000000 --- a/app/sdks/0.6.2/server-deno/docs/examples/users/update-status.md +++ /dev/null @@ -1,20 +0,0 @@ -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.6.2/server-deno/mod.ts b/app/sdks/0.6.2/server-deno/mod.ts deleted file mode 100644 index 3e51466fe6..0000000000 --- a/app/sdks/0.6.2/server-deno/mod.ts +++ /dev/null @@ -1,19 +0,0 @@ -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.6.2/server-deno/src/client.ts b/app/sdks/0.6.2/server-deno/src/client.ts deleted file mode 100644 index 3bf22034b8..0000000000 --- a/app/sdks/0.6.2/server-deno/src/client.ts +++ /dev/null @@ -1,138 +0,0 @@ -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.6.2/server-deno/src/service.ts b/app/sdks/0.6.2/server-deno/src/service.ts deleted file mode 100644 index ceedf1a0c3..0000000000 --- a/app/sdks/0.6.2/server-deno/src/service.ts +++ /dev/null @@ -1,13 +0,0 @@ -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.6.2/server-deno/src/services/avatars.ts b/app/sdks/0.6.2/server-deno/src/services/avatars.ts deleted file mode 100644 index 398afc1833..0000000000 --- a/app/sdks/0.6.2/server-deno/src/services/avatars.ts +++ /dev/null @@ -1,200 +0,0 @@ -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 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 Exception - * @return Promise - */ - async getInitials(name: string = '', width: number = 500, height: number = 500, color: string = '', background: string = ''): Promise { - let path = '/avatars/initials'; - - return await this.client.call('get', path, { - 'content-type': 'application/json', - }, - { - 'name': name, - 'width': width, - 'height': height, - 'color': color, - 'background': background - }); - } - - /** - * 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 Exception - * @return Promise - */ - async getQR(text: string, size: number = 400, margin: number = 1, download: boolean = false): 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.6.2/server-deno/src/services/database.ts b/app/sdks/0.6.2/server-deno/src/services/database.ts deleted file mode 100644 index ad50a51893..0000000000 --- a/app/sdks/0.6.2/server-deno/src/services/database.ts +++ /dev/null @@ -1,264 +0,0 @@ -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 - * @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 = ''): 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 - }); - } - - /** - * 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', - }, - { - }); - } -} \ No newline at end of file diff --git a/app/sdks/0.6.2/server-deno/src/services/health.ts b/app/sdks/0.6.2/server-deno/src/services/health.ts deleted file mode 100644 index df5c18a2cb..0000000000 --- a/app/sdks/0.6.2/server-deno/src/services/health.ts +++ /dev/null @@ -1,232 +0,0 @@ -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.6.2/server-deno/src/services/locale.ts b/app/sdks/0.6.2/server-deno/src/services/locale.ts deleted file mode 100644 index 9d8e066c70..0000000000 --- a/app/sdks/0.6.2/server-deno/src/services/locale.ts +++ /dev/null @@ -1,143 +0,0 @@ -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 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 Promise - */ - async getCurrencies(): Promise { - let path = '/locale/currencies'; - - return await this.client.call('get', path, { - 'content-type': 'application/json', - }, - { - }); - } - - /** - * 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 Promise - */ - async getLanguages(): Promise { - let path = '/locale/languages'; - - return await this.client.call('get', path, { - 'content-type': 'application/json', - }, - { - }); - } -} \ No newline at end of file diff --git a/app/sdks/0.6.2/server-deno/src/services/storage.ts b/app/sdks/0.6.2/server-deno/src/services/storage.ts deleted file mode 100644 index b663739e05..0000000000 --- a/app/sdks/0.6.2/server-deno/src/services/storage.ts +++ /dev/null @@ -1,198 +0,0 @@ -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.6.2/server-deno/src/services/teams.ts b/app/sdks/0.6.2/server-deno/src/services/teams.ts deleted file mode 100644 index 16f5c20053..0000000000 --- a/app/sdks/0.6.2/server-deno/src/services/teams.ts +++ /dev/null @@ -1,209 +0,0 @@ -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 - * @param string search - * @param number limit - * @param number offset - * @param string orderType - * @throws Exception - * @return Promise - */ - async getMemberships(teamId: string, search: string = '', limit: number = 25, offset: number = 0, orderType: string = 'ASC'): Promise { - let path = '/teams/{teamId}/memberships'.replace(new RegExp('{teamId}', 'g'), teamId); - - return await this.client.call('get', path, { - 'content-type': 'application/json', - }, - { - 'search': search, - 'limit': limit, - 'offset': offset, - 'orderType': orderType - }); - } - - /** - * 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.6.2/server-deno/src/services/users.ts b/app/sdks/0.6.2/server-deno/src/services/users.ts deleted file mode 100644 index ac48507f08..0000000000 --- a/app/sdks/0.6.2/server-deno/src/services/users.ts +++ /dev/null @@ -1,214 +0,0 @@ -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.6.2/server-nodejs/CHANGELOG.md b/app/sdks/0.6.2/server-nodejs/CHANGELOG.md deleted file mode 100644 index fa4d35e687..0000000000 --- a/app/sdks/0.6.2/server-nodejs/CHANGELOG.md +++ /dev/null @@ -1 +0,0 @@ -# Change Log \ No newline at end of file diff --git a/app/sdks/0.6.2/server-nodejs/LICENSE b/app/sdks/0.6.2/server-nodejs/LICENSE deleted file mode 100644 index fc7c051a91..0000000000 --- a/app/sdks/0.6.2/server-nodejs/LICENSE +++ /dev/null @@ -1,12 +0,0 @@ -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.6.2/server-nodejs/README.md b/app/sdks/0.6.2/server-nodejs/README.md deleted file mode 100644 index b3f2006d1e..0000000000 --- a/app/sdks/0.6.2/server-nodejs/README.md +++ /dev/null @@ -1,28 +0,0 @@ -# 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.2-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.6.2/server-nodejs/docs/examples/avatars/get-browser.md b/app/sdks/0.6.2/server-nodejs/docs/examples/avatars/get-browser.md deleted file mode 100644 index 2a670ce08b..0000000000 --- a/app/sdks/0.6.2/server-nodejs/docs/examples/avatars/get-browser.md +++ /dev/null @@ -1,20 +0,0 @@ -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.6.2/server-nodejs/docs/examples/avatars/get-credit-card.md b/app/sdks/0.6.2/server-nodejs/docs/examples/avatars/get-credit-card.md deleted file mode 100644 index afd38f5a97..0000000000 --- a/app/sdks/0.6.2/server-nodejs/docs/examples/avatars/get-credit-card.md +++ /dev/null @@ -1,20 +0,0 @@ -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.6.2/server-nodejs/docs/examples/avatars/get-favicon.md b/app/sdks/0.6.2/server-nodejs/docs/examples/avatars/get-favicon.md deleted file mode 100644 index bb347371d4..0000000000 --- a/app/sdks/0.6.2/server-nodejs/docs/examples/avatars/get-favicon.md +++ /dev/null @@ -1,20 +0,0 @@ -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.6.2/server-nodejs/docs/examples/avatars/get-flag.md b/app/sdks/0.6.2/server-nodejs/docs/examples/avatars/get-flag.md deleted file mode 100644 index db677bc4f8..0000000000 --- a/app/sdks/0.6.2/server-nodejs/docs/examples/avatars/get-flag.md +++ /dev/null @@ -1,20 +0,0 @@ -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.6.2/server-nodejs/docs/examples/avatars/get-image.md b/app/sdks/0.6.2/server-nodejs/docs/examples/avatars/get-image.md deleted file mode 100644 index efa871ea63..0000000000 --- a/app/sdks/0.6.2/server-nodejs/docs/examples/avatars/get-image.md +++ /dev/null @@ -1,20 +0,0 @@ -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.6.2/server-nodejs/docs/examples/avatars/get-initials.md b/app/sdks/0.6.2/server-nodejs/docs/examples/avatars/get-initials.md deleted file mode 100644 index d6175bff13..0000000000 --- a/app/sdks/0.6.2/server-nodejs/docs/examples/avatars/get-initials.md +++ /dev/null @@ -1,20 +0,0 @@ -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.getInitials(); - -promise.then(function (response) { - console.log(response); -}, function (error) { - console.log(error); -}); \ No newline at end of file diff --git a/app/sdks/0.6.2/server-nodejs/docs/examples/avatars/get-q-r.md b/app/sdks/0.6.2/server-nodejs/docs/examples/avatars/get-q-r.md deleted file mode 100644 index e79b3235af..0000000000 --- a/app/sdks/0.6.2/server-nodejs/docs/examples/avatars/get-q-r.md +++ /dev/null @@ -1,20 +0,0 @@ -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.6.2/server-nodejs/docs/examples/database/create-collection.md b/app/sdks/0.6.2/server-nodejs/docs/examples/database/create-collection.md deleted file mode 100644 index c0207f30f0..0000000000 --- a/app/sdks/0.6.2/server-nodejs/docs/examples/database/create-collection.md +++ /dev/null @@ -1,20 +0,0 @@ -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.6.2/server-nodejs/docs/examples/database/create-document.md b/app/sdks/0.6.2/server-nodejs/docs/examples/database/create-document.md deleted file mode 100644 index 8676dfb84d..0000000000 --- a/app/sdks/0.6.2/server-nodejs/docs/examples/database/create-document.md +++ /dev/null @@ -1,20 +0,0 @@ -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.6.2/server-nodejs/docs/examples/database/delete-collection.md b/app/sdks/0.6.2/server-nodejs/docs/examples/database/delete-collection.md deleted file mode 100644 index 503da98a73..0000000000 --- a/app/sdks/0.6.2/server-nodejs/docs/examples/database/delete-collection.md +++ /dev/null @@ -1,20 +0,0 @@ -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.6.2/server-nodejs/docs/examples/database/delete-document.md b/app/sdks/0.6.2/server-nodejs/docs/examples/database/delete-document.md deleted file mode 100644 index f14c985e83..0000000000 --- a/app/sdks/0.6.2/server-nodejs/docs/examples/database/delete-document.md +++ /dev/null @@ -1,20 +0,0 @@ -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.6.2/server-nodejs/docs/examples/database/get-collection.md b/app/sdks/0.6.2/server-nodejs/docs/examples/database/get-collection.md deleted file mode 100644 index a14ce0d49a..0000000000 --- a/app/sdks/0.6.2/server-nodejs/docs/examples/database/get-collection.md +++ /dev/null @@ -1,20 +0,0 @@ -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.6.2/server-nodejs/docs/examples/database/get-document.md b/app/sdks/0.6.2/server-nodejs/docs/examples/database/get-document.md deleted file mode 100644 index 55cce32b9b..0000000000 --- a/app/sdks/0.6.2/server-nodejs/docs/examples/database/get-document.md +++ /dev/null @@ -1,20 +0,0 @@ -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.6.2/server-nodejs/docs/examples/database/list-collections.md b/app/sdks/0.6.2/server-nodejs/docs/examples/database/list-collections.md deleted file mode 100644 index bacfdb062c..0000000000 --- a/app/sdks/0.6.2/server-nodejs/docs/examples/database/list-collections.md +++ /dev/null @@ -1,20 +0,0 @@ -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.6.2/server-nodejs/docs/examples/database/list-documents.md b/app/sdks/0.6.2/server-nodejs/docs/examples/database/list-documents.md deleted file mode 100644 index ad02d05e2a..0000000000 --- a/app/sdks/0.6.2/server-nodejs/docs/examples/database/list-documents.md +++ /dev/null @@ -1,20 +0,0 @@ -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.6.2/server-nodejs/docs/examples/database/update-collection.md b/app/sdks/0.6.2/server-nodejs/docs/examples/database/update-collection.md deleted file mode 100644 index eb9326565a..0000000000 --- a/app/sdks/0.6.2/server-nodejs/docs/examples/database/update-collection.md +++ /dev/null @@ -1,20 +0,0 @@ -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.6.2/server-nodejs/docs/examples/database/update-document.md b/app/sdks/0.6.2/server-nodejs/docs/examples/database/update-document.md deleted file mode 100644 index 131722cd26..0000000000 --- a/app/sdks/0.6.2/server-nodejs/docs/examples/database/update-document.md +++ /dev/null @@ -1,20 +0,0 @@ -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.6.2/server-nodejs/docs/examples/health/get-anti-virus.md b/app/sdks/0.6.2/server-nodejs/docs/examples/health/get-anti-virus.md deleted file mode 100644 index c08e612bcf..0000000000 --- a/app/sdks/0.6.2/server-nodejs/docs/examples/health/get-anti-virus.md +++ /dev/null @@ -1,20 +0,0 @@ -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.6.2/server-nodejs/docs/examples/health/get-cache.md b/app/sdks/0.6.2/server-nodejs/docs/examples/health/get-cache.md deleted file mode 100644 index d19cc8abd5..0000000000 --- a/app/sdks/0.6.2/server-nodejs/docs/examples/health/get-cache.md +++ /dev/null @@ -1,20 +0,0 @@ -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.6.2/server-nodejs/docs/examples/health/get-d-b.md b/app/sdks/0.6.2/server-nodejs/docs/examples/health/get-d-b.md deleted file mode 100644 index 08505367d4..0000000000 --- a/app/sdks/0.6.2/server-nodejs/docs/examples/health/get-d-b.md +++ /dev/null @@ -1,20 +0,0 @@ -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.6.2/server-nodejs/docs/examples/health/get-queue-certificates.md b/app/sdks/0.6.2/server-nodejs/docs/examples/health/get-queue-certificates.md deleted file mode 100644 index 2eb69e0126..0000000000 --- a/app/sdks/0.6.2/server-nodejs/docs/examples/health/get-queue-certificates.md +++ /dev/null @@ -1,20 +0,0 @@ -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.6.2/server-nodejs/docs/examples/health/get-queue-functions.md b/app/sdks/0.6.2/server-nodejs/docs/examples/health/get-queue-functions.md deleted file mode 100644 index 9470e11646..0000000000 --- a/app/sdks/0.6.2/server-nodejs/docs/examples/health/get-queue-functions.md +++ /dev/null @@ -1,20 +0,0 @@ -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.6.2/server-nodejs/docs/examples/health/get-queue-logs.md b/app/sdks/0.6.2/server-nodejs/docs/examples/health/get-queue-logs.md deleted file mode 100644 index 10f1cb24e3..0000000000 --- a/app/sdks/0.6.2/server-nodejs/docs/examples/health/get-queue-logs.md +++ /dev/null @@ -1,20 +0,0 @@ -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.6.2/server-nodejs/docs/examples/health/get-queue-tasks.md b/app/sdks/0.6.2/server-nodejs/docs/examples/health/get-queue-tasks.md deleted file mode 100644 index c159f4e6ee..0000000000 --- a/app/sdks/0.6.2/server-nodejs/docs/examples/health/get-queue-tasks.md +++ /dev/null @@ -1,20 +0,0 @@ -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.6.2/server-nodejs/docs/examples/health/get-queue-usage.md b/app/sdks/0.6.2/server-nodejs/docs/examples/health/get-queue-usage.md deleted file mode 100644 index 6286c741ee..0000000000 --- a/app/sdks/0.6.2/server-nodejs/docs/examples/health/get-queue-usage.md +++ /dev/null @@ -1,20 +0,0 @@ -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.6.2/server-nodejs/docs/examples/health/get-queue-webhooks.md b/app/sdks/0.6.2/server-nodejs/docs/examples/health/get-queue-webhooks.md deleted file mode 100644 index 3a788eb895..0000000000 --- a/app/sdks/0.6.2/server-nodejs/docs/examples/health/get-queue-webhooks.md +++ /dev/null @@ -1,20 +0,0 @@ -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.6.2/server-nodejs/docs/examples/health/get-storage-local.md b/app/sdks/0.6.2/server-nodejs/docs/examples/health/get-storage-local.md deleted file mode 100644 index 84b8fb47a6..0000000000 --- a/app/sdks/0.6.2/server-nodejs/docs/examples/health/get-storage-local.md +++ /dev/null @@ -1,20 +0,0 @@ -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.6.2/server-nodejs/docs/examples/health/get-time.md b/app/sdks/0.6.2/server-nodejs/docs/examples/health/get-time.md deleted file mode 100644 index 563bf2fb52..0000000000 --- a/app/sdks/0.6.2/server-nodejs/docs/examples/health/get-time.md +++ /dev/null @@ -1,20 +0,0 @@ -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.6.2/server-nodejs/docs/examples/health/get.md b/app/sdks/0.6.2/server-nodejs/docs/examples/health/get.md deleted file mode 100644 index 20c3d40801..0000000000 --- a/app/sdks/0.6.2/server-nodejs/docs/examples/health/get.md +++ /dev/null @@ -1,20 +0,0 @@ -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.6.2/server-nodejs/docs/examples/locale/get-continents.md b/app/sdks/0.6.2/server-nodejs/docs/examples/locale/get-continents.md deleted file mode 100644 index 323237b4ab..0000000000 --- a/app/sdks/0.6.2/server-nodejs/docs/examples/locale/get-continents.md +++ /dev/null @@ -1,20 +0,0 @@ -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.6.2/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 deleted file mode 100644 index fc9170dba4..0000000000 --- a/app/sdks/0.6.2/server-nodejs/docs/examples/locale/get-countries-e-u.md +++ /dev/null @@ -1,20 +0,0 @@ -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.6.2/server-nodejs/docs/examples/locale/get-countries-phones.md b/app/sdks/0.6.2/server-nodejs/docs/examples/locale/get-countries-phones.md deleted file mode 100644 index 42be901677..0000000000 --- a/app/sdks/0.6.2/server-nodejs/docs/examples/locale/get-countries-phones.md +++ /dev/null @@ -1,20 +0,0 @@ -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.6.2/server-nodejs/docs/examples/locale/get-countries.md b/app/sdks/0.6.2/server-nodejs/docs/examples/locale/get-countries.md deleted file mode 100644 index 437c9bb502..0000000000 --- a/app/sdks/0.6.2/server-nodejs/docs/examples/locale/get-countries.md +++ /dev/null @@ -1,20 +0,0 @@ -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.6.2/server-nodejs/docs/examples/locale/get-currencies.md b/app/sdks/0.6.2/server-nodejs/docs/examples/locale/get-currencies.md deleted file mode 100644 index 1b7d605760..0000000000 --- a/app/sdks/0.6.2/server-nodejs/docs/examples/locale/get-currencies.md +++ /dev/null @@ -1,20 +0,0 @@ -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.6.2/server-nodejs/docs/examples/locale/get-languages.md b/app/sdks/0.6.2/server-nodejs/docs/examples/locale/get-languages.md deleted file mode 100644 index b6f45311b3..0000000000 --- a/app/sdks/0.6.2/server-nodejs/docs/examples/locale/get-languages.md +++ /dev/null @@ -1,20 +0,0 @@ -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.getLanguages(); - -promise.then(function (response) { - console.log(response); -}, function (error) { - console.log(error); -}); \ No newline at end of file diff --git a/app/sdks/0.6.2/server-nodejs/docs/examples/locale/get.md b/app/sdks/0.6.2/server-nodejs/docs/examples/locale/get.md deleted file mode 100644 index 2f2eb95d90..0000000000 --- a/app/sdks/0.6.2/server-nodejs/docs/examples/locale/get.md +++ /dev/null @@ -1,20 +0,0 @@ -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.6.2/server-nodejs/docs/examples/storage/create-file.md b/app/sdks/0.6.2/server-nodejs/docs/examples/storage/create-file.md deleted file mode 100644 index 1eda9fd868..0000000000 --- a/app/sdks/0.6.2/server-nodejs/docs/examples/storage/create-file.md +++ /dev/null @@ -1,21 +0,0 @@ -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.6.2/server-nodejs/docs/examples/storage/delete-file.md b/app/sdks/0.6.2/server-nodejs/docs/examples/storage/delete-file.md deleted file mode 100644 index 9ce0ff7f2e..0000000000 --- a/app/sdks/0.6.2/server-nodejs/docs/examples/storage/delete-file.md +++ /dev/null @@ -1,20 +0,0 @@ -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.6.2/server-nodejs/docs/examples/storage/get-file-download.md b/app/sdks/0.6.2/server-nodejs/docs/examples/storage/get-file-download.md deleted file mode 100644 index 1683ed87e0..0000000000 --- a/app/sdks/0.6.2/server-nodejs/docs/examples/storage/get-file-download.md +++ /dev/null @@ -1,20 +0,0 @@ -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.6.2/server-nodejs/docs/examples/storage/get-file-preview.md b/app/sdks/0.6.2/server-nodejs/docs/examples/storage/get-file-preview.md deleted file mode 100644 index 771dcd35f0..0000000000 --- a/app/sdks/0.6.2/server-nodejs/docs/examples/storage/get-file-preview.md +++ /dev/null @@ -1,20 +0,0 @@ -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.6.2/server-nodejs/docs/examples/storage/get-file-view.md b/app/sdks/0.6.2/server-nodejs/docs/examples/storage/get-file-view.md deleted file mode 100644 index 83029ecdee..0000000000 --- a/app/sdks/0.6.2/server-nodejs/docs/examples/storage/get-file-view.md +++ /dev/null @@ -1,20 +0,0 @@ -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.6.2/server-nodejs/docs/examples/storage/get-file.md b/app/sdks/0.6.2/server-nodejs/docs/examples/storage/get-file.md deleted file mode 100644 index 2a76fdf189..0000000000 --- a/app/sdks/0.6.2/server-nodejs/docs/examples/storage/get-file.md +++ /dev/null @@ -1,20 +0,0 @@ -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.6.2/server-nodejs/docs/examples/storage/list-files.md b/app/sdks/0.6.2/server-nodejs/docs/examples/storage/list-files.md deleted file mode 100644 index e11fd95300..0000000000 --- a/app/sdks/0.6.2/server-nodejs/docs/examples/storage/list-files.md +++ /dev/null @@ -1,20 +0,0 @@ -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.6.2/server-nodejs/docs/examples/storage/update-file.md b/app/sdks/0.6.2/server-nodejs/docs/examples/storage/update-file.md deleted file mode 100644 index 4726169146..0000000000 --- a/app/sdks/0.6.2/server-nodejs/docs/examples/storage/update-file.md +++ /dev/null @@ -1,20 +0,0 @@ -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.6.2/server-nodejs/docs/examples/teams/create-membership.md b/app/sdks/0.6.2/server-nodejs/docs/examples/teams/create-membership.md deleted file mode 100644 index cd17042e58..0000000000 --- a/app/sdks/0.6.2/server-nodejs/docs/examples/teams/create-membership.md +++ /dev/null @@ -1,20 +0,0 @@ -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.6.2/server-nodejs/docs/examples/teams/create.md b/app/sdks/0.6.2/server-nodejs/docs/examples/teams/create.md deleted file mode 100644 index c0d0611a49..0000000000 --- a/app/sdks/0.6.2/server-nodejs/docs/examples/teams/create.md +++ /dev/null @@ -1,20 +0,0 @@ -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.6.2/server-nodejs/docs/examples/teams/delete-membership.md b/app/sdks/0.6.2/server-nodejs/docs/examples/teams/delete-membership.md deleted file mode 100644 index f9a76f3ec0..0000000000 --- a/app/sdks/0.6.2/server-nodejs/docs/examples/teams/delete-membership.md +++ /dev/null @@ -1,20 +0,0 @@ -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.6.2/server-nodejs/docs/examples/teams/delete.md b/app/sdks/0.6.2/server-nodejs/docs/examples/teams/delete.md deleted file mode 100644 index e833fdfb9b..0000000000 --- a/app/sdks/0.6.2/server-nodejs/docs/examples/teams/delete.md +++ /dev/null @@ -1,20 +0,0 @@ -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.6.2/server-nodejs/docs/examples/teams/get-memberships.md b/app/sdks/0.6.2/server-nodejs/docs/examples/teams/get-memberships.md deleted file mode 100644 index 75cdf38e5c..0000000000 --- a/app/sdks/0.6.2/server-nodejs/docs/examples/teams/get-memberships.md +++ /dev/null @@ -1,20 +0,0 @@ -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.6.2/server-nodejs/docs/examples/teams/get.md b/app/sdks/0.6.2/server-nodejs/docs/examples/teams/get.md deleted file mode 100644 index a51322df27..0000000000 --- a/app/sdks/0.6.2/server-nodejs/docs/examples/teams/get.md +++ /dev/null @@ -1,20 +0,0 @@ -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.6.2/server-nodejs/docs/examples/teams/list.md b/app/sdks/0.6.2/server-nodejs/docs/examples/teams/list.md deleted file mode 100644 index 259bbd22b2..0000000000 --- a/app/sdks/0.6.2/server-nodejs/docs/examples/teams/list.md +++ /dev/null @@ -1,20 +0,0 @@ -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.6.2/server-nodejs/docs/examples/teams/update.md b/app/sdks/0.6.2/server-nodejs/docs/examples/teams/update.md deleted file mode 100644 index 2118e8a90f..0000000000 --- a/app/sdks/0.6.2/server-nodejs/docs/examples/teams/update.md +++ /dev/null @@ -1,20 +0,0 @@ -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.6.2/server-nodejs/docs/examples/users/create.md b/app/sdks/0.6.2/server-nodejs/docs/examples/users/create.md deleted file mode 100644 index 83704cbd9d..0000000000 --- a/app/sdks/0.6.2/server-nodejs/docs/examples/users/create.md +++ /dev/null @@ -1,20 +0,0 @@ -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.6.2/server-nodejs/docs/examples/users/delete-session.md b/app/sdks/0.6.2/server-nodejs/docs/examples/users/delete-session.md deleted file mode 100644 index 22308d4fa6..0000000000 --- a/app/sdks/0.6.2/server-nodejs/docs/examples/users/delete-session.md +++ /dev/null @@ -1,20 +0,0 @@ -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.6.2/server-nodejs/docs/examples/users/delete-sessions.md b/app/sdks/0.6.2/server-nodejs/docs/examples/users/delete-sessions.md deleted file mode 100644 index 75f8f96bda..0000000000 --- a/app/sdks/0.6.2/server-nodejs/docs/examples/users/delete-sessions.md +++ /dev/null @@ -1,20 +0,0 @@ -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.6.2/server-nodejs/docs/examples/users/get-logs.md b/app/sdks/0.6.2/server-nodejs/docs/examples/users/get-logs.md deleted file mode 100644 index 1287b5ef5f..0000000000 --- a/app/sdks/0.6.2/server-nodejs/docs/examples/users/get-logs.md +++ /dev/null @@ -1,20 +0,0 @@ -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.6.2/server-nodejs/docs/examples/users/get-prefs.md b/app/sdks/0.6.2/server-nodejs/docs/examples/users/get-prefs.md deleted file mode 100644 index 088e6b0811..0000000000 --- a/app/sdks/0.6.2/server-nodejs/docs/examples/users/get-prefs.md +++ /dev/null @@ -1,20 +0,0 @@ -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.6.2/server-nodejs/docs/examples/users/get-sessions.md b/app/sdks/0.6.2/server-nodejs/docs/examples/users/get-sessions.md deleted file mode 100644 index f5ad029ebe..0000000000 --- a/app/sdks/0.6.2/server-nodejs/docs/examples/users/get-sessions.md +++ /dev/null @@ -1,20 +0,0 @@ -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.6.2/server-nodejs/docs/examples/users/get.md b/app/sdks/0.6.2/server-nodejs/docs/examples/users/get.md deleted file mode 100644 index 5b91577284..0000000000 --- a/app/sdks/0.6.2/server-nodejs/docs/examples/users/get.md +++ /dev/null @@ -1,20 +0,0 @@ -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.6.2/server-nodejs/docs/examples/users/list.md b/app/sdks/0.6.2/server-nodejs/docs/examples/users/list.md deleted file mode 100644 index 0bc83b06bf..0000000000 --- a/app/sdks/0.6.2/server-nodejs/docs/examples/users/list.md +++ /dev/null @@ -1,20 +0,0 @@ -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.6.2/server-nodejs/docs/examples/users/update-prefs.md b/app/sdks/0.6.2/server-nodejs/docs/examples/users/update-prefs.md deleted file mode 100644 index 7d1011d6be..0000000000 --- a/app/sdks/0.6.2/server-nodejs/docs/examples/users/update-prefs.md +++ /dev/null @@ -1,20 +0,0 @@ -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.6.2/server-nodejs/docs/examples/users/update-status.md b/app/sdks/0.6.2/server-nodejs/docs/examples/users/update-status.md deleted file mode 100644 index 86f54381da..0000000000 --- a/app/sdks/0.6.2/server-nodejs/docs/examples/users/update-status.md +++ /dev/null @@ -1,20 +0,0 @@ -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.6.2/server-nodejs/index.js b/app/sdks/0.6.2/server-nodejs/index.js deleted file mode 100644 index f5259f59dc..0000000000 --- a/app/sdks/0.6.2/server-nodejs/index.js +++ /dev/null @@ -1,19 +0,0 @@ -const Client = require('./lib/client.js'); -const Avatars = require('./lib/services/avatars.js'); -const Database = require('./lib/services/database.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, - Health, - Locale, - Storage, - Teams, - Users, -}; \ No newline at end of file diff --git a/app/sdks/0.6.2/server-nodejs/lib/client.js b/app/sdks/0.6.2/server-nodejs/lib/client.js deleted file mode 100644 index 821ef5f424..0000000000 --- a/app/sdks/0.6.2/server-nodejs/lib/client.js +++ /dev/null @@ -1,152 +0,0 @@ -const URL = require('url').URL; -const axios = require('axios'); -const FormData = require('form-data'); - -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 formData = null; - - // Compute FormData for axios and appwrite. - if (contentType.startsWith('multipart/form-data')) { - const form = new FormData(); - - let flatParams = this.flatten(params); - - for (const key in flatParams) { - form.append(key, flatParams[key]) - } - - headers = { - ...headers, - ...form.getHeaders() - }; - - formData = form; - } - - let options = { - method: method.toUpperCase(), - url: this.endpoint + path, - params: (method.toUpperCase() === 'GET') ? params : {}, - headers: headers, - data: (method.toUpperCase() === 'GET' || contentType.startsWith('multipart/form-data')) ? formData : params, - json: (contentType.startsWith('application/json')) - }; - - let response = await axios(options); - - return response.data; - } - - 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.6.2/server-nodejs/lib/service.js b/app/sdks/0.6.2/server-nodejs/lib/service.js deleted file mode 100644 index e799c064be..0000000000 --- a/app/sdks/0.6.2/server-nodejs/lib/service.js +++ /dev/null @@ -1,10 +0,0 @@ -class Service { - /** - * @param client - */ - constructor(client) { - this.client = client; - } -} - -module.exports = Service; \ No newline at end of file diff --git a/app/sdks/0.6.2/server-nodejs/lib/services/avatars.js b/app/sdks/0.6.2/server-nodejs/lib/services/avatars.js deleted file mode 100644 index 048501e73a..0000000000 --- a/app/sdks/0.6.2/server-nodejs/lib/services/avatars.js +++ /dev/null @@ -1,201 +0,0 @@ -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 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 Exception - * @return {} - */ - async getInitials(name = '', width = 500, height = 500, color = '', background = '') { - let path = '/avatars/initials'; - - return await this.client.call('get', path, { - 'content-type': 'application/json', - }, - { - 'name': name, - 'width': width, - 'height': height, - 'color': color, - 'background': background - }); - } - - /** - * 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 Exception - * @return {} - */ - async getQR(text, size = 400, margin = 1, download = false) { - 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.6.2/server-nodejs/lib/services/database.js b/app/sdks/0.6.2/server-nodejs/lib/services/database.js deleted file mode 100644 index 68bd06216d..0000000000 --- a/app/sdks/0.6.2/server-nodejs/lib/services/database.js +++ /dev/null @@ -1,265 +0,0 @@ -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 - * @throws Exception - * @return {} - */ - async listDocuments(collectionId, filters = [], offset = 0, limit = 50, orderField = '$id', orderType = 'ASC', orderCast = 'string', search = '') { - 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 - }); - } - - /** - * 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 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', - }, - { - }); - } -} - -module.exports = Database; \ No newline at end of file diff --git a/app/sdks/0.6.2/server-nodejs/lib/services/health.js b/app/sdks/0.6.2/server-nodejs/lib/services/health.js deleted file mode 100644 index a0aed052ce..0000000000 --- a/app/sdks/0.6.2/server-nodejs/lib/services/health.js +++ /dev/null @@ -1,233 +0,0 @@ -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.6.2/server-nodejs/lib/services/locale.js b/app/sdks/0.6.2/server-nodejs/lib/services/locale.js deleted file mode 100644 index 8bb45bf45e..0000000000 --- a/app/sdks/0.6.2/server-nodejs/lib/services/locale.js +++ /dev/null @@ -1,144 +0,0 @@ -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 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 {} - */ - async getCurrencies() { - let path = '/locale/currencies'; - - return await this.client.call('get', path, { - 'content-type': 'application/json', - }, - { - }); - } - - /** - * 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 {} - */ - async getLanguages() { - let path = '/locale/languages'; - - 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.6.2/server-nodejs/lib/services/storage.js b/app/sdks/0.6.2/server-nodejs/lib/services/storage.js deleted file mode 100644 index 2b670db31a..0000000000 --- a/app/sdks/0.6.2/server-nodejs/lib/services/storage.js +++ /dev/null @@ -1,199 +0,0 @@ -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.6.2/server-nodejs/lib/services/teams.js b/app/sdks/0.6.2/server-nodejs/lib/services/teams.js deleted file mode 100644 index 7e3b92b7d3..0000000000 --- a/app/sdks/0.6.2/server-nodejs/lib/services/teams.js +++ /dev/null @@ -1,210 +0,0 @@ -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 - * @param string search - * @param number limit - * @param number offset - * @param string orderType - * @throws Exception - * @return {} - */ - async getMemberships(teamId, search = '', limit = 25, offset = 0, orderType = 'ASC') { - let path = '/teams/{teamId}/memberships'.replace(new RegExp('{teamId}', 'g'), teamId); - - return await this.client.call('get', path, { - 'content-type': 'application/json', - }, - { - 'search': search, - 'limit': limit, - 'offset': offset, - 'orderType': orderType - }); - } - - /** - * 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 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.6.2/server-nodejs/lib/services/users.js b/app/sdks/0.6.2/server-nodejs/lib/services/users.js deleted file mode 100644 index 2292fb2664..0000000000 --- a/app/sdks/0.6.2/server-nodejs/lib/services/users.js +++ /dev/null @@ -1,215 +0,0 @@ -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.6.2/server-nodejs/package.json b/app/sdks/0.6.2/server-nodejs/package.json deleted file mode 100644 index c38677a33b..0000000000 --- a/app/sdks/0.6.2/server-nodejs/package.json +++ /dev/null @@ -1,17 +0,0 @@ -{ - "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": { - "axios": "^0.20.0", - "form-data": "^3.0.0" - } -} \ No newline at end of file diff --git a/app/sdks/0.6.2/server-php/CHANGELOG.md b/app/sdks/0.6.2/server-php/CHANGELOG.md deleted file mode 100644 index fa4d35e687..0000000000 --- a/app/sdks/0.6.2/server-php/CHANGELOG.md +++ /dev/null @@ -1 +0,0 @@ -# Change Log \ No newline at end of file diff --git a/app/sdks/0.6.2/server-php/LICENSE b/app/sdks/0.6.2/server-php/LICENSE deleted file mode 100644 index fc7c051a91..0000000000 --- a/app/sdks/0.6.2/server-php/LICENSE +++ /dev/null @@ -1,12 +0,0 @@ -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.6.2/server-php/README.md b/app/sdks/0.6.2/server-php/README.md deleted file mode 100644 index d93cb2347d..0000000000 --- a/app/sdks/0.6.2/server-php/README.md +++ /dev/null @@ -1,28 +0,0 @@ -# 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.2-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.6.2/server-php/composer.json b/app/sdks/0.6.2/server-php/composer.json deleted file mode 100644 index 64d2e1746f..0000000000 --- a/app/sdks/0.6.2/server-php/composer.json +++ /dev/null @@ -1,26 +0,0 @@ -{ - "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.6.2/server-php/docs/avatars.md b/app/sdks/0.6.2/server-php/docs/avatars.md deleted file mode 100644 index 224e4735a9..0000000000 --- a/app/sdks/0.6.2/server-php/docs/avatars.md +++ /dev/null @@ -1,120 +0,0 @@ -# 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.6.2/server-php/docs/database.md b/app/sdks/0.6.2/server-php/docs/database.md deleted file mode 100644 index bc448bc3ba..0000000000 --- a/app/sdks/0.6.2/server-php/docs/database.md +++ /dev/null @@ -1,169 +0,0 @@ -# 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/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'. | [] | -| 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. | | - -## 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. | | -| 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/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.6.2/server-php/docs/examples/avatars/get-browser.md b/app/sdks/0.6.2/server-php/docs/examples/avatars/get-browser.md deleted file mode 100644 index 795d79157e..0000000000 --- a/app/sdks/0.6.2/server-php/docs/examples/avatars/get-browser.md +++ /dev/null @@ -1,16 +0,0 @@ -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.6.2/server-php/docs/examples/avatars/get-credit-card.md b/app/sdks/0.6.2/server-php/docs/examples/avatars/get-credit-card.md deleted file mode 100644 index 33879d0179..0000000000 --- a/app/sdks/0.6.2/server-php/docs/examples/avatars/get-credit-card.md +++ /dev/null @@ -1,16 +0,0 @@ -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.6.2/server-php/docs/examples/avatars/get-favicon.md b/app/sdks/0.6.2/server-php/docs/examples/avatars/get-favicon.md deleted file mode 100644 index dee19dbf04..0000000000 --- a/app/sdks/0.6.2/server-php/docs/examples/avatars/get-favicon.md +++ /dev/null @@ -1,16 +0,0 @@ -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.6.2/server-php/docs/examples/avatars/get-flag.md b/app/sdks/0.6.2/server-php/docs/examples/avatars/get-flag.md deleted file mode 100644 index d70d7e43ec..0000000000 --- a/app/sdks/0.6.2/server-php/docs/examples/avatars/get-flag.md +++ /dev/null @@ -1,16 +0,0 @@ -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.6.2/server-php/docs/examples/avatars/get-image.md b/app/sdks/0.6.2/server-php/docs/examples/avatars/get-image.md deleted file mode 100644 index a46b9fbe37..0000000000 --- a/app/sdks/0.6.2/server-php/docs/examples/avatars/get-image.md +++ /dev/null @@ -1,16 +0,0 @@ -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.6.2/server-php/docs/examples/avatars/get-initials.md b/app/sdks/0.6.2/server-php/docs/examples/avatars/get-initials.md deleted file mode 100644 index f5e549ace6..0000000000 --- a/app/sdks/0.6.2/server-php/docs/examples/avatars/get-initials.md +++ /dev/null @@ -1,16 +0,0 @@ -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->getInitials(); \ No newline at end of file diff --git a/app/sdks/0.6.2/server-php/docs/examples/avatars/get-q-r.md b/app/sdks/0.6.2/server-php/docs/examples/avatars/get-q-r.md deleted file mode 100644 index 95b5a6d7b3..0000000000 --- a/app/sdks/0.6.2/server-php/docs/examples/avatars/get-q-r.md +++ /dev/null @@ -1,16 +0,0 @@ -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.6.2/server-php/docs/examples/database/create-collection.md b/app/sdks/0.6.2/server-php/docs/examples/database/create-collection.md deleted file mode 100644 index 276d5049fe..0000000000 --- a/app/sdks/0.6.2/server-php/docs/examples/database/create-collection.md +++ /dev/null @@ -1,16 +0,0 @@ -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.6.2/server-php/docs/examples/database/create-document.md b/app/sdks/0.6.2/server-php/docs/examples/database/create-document.md deleted file mode 100644 index 6c32cdf950..0000000000 --- a/app/sdks/0.6.2/server-php/docs/examples/database/create-document.md +++ /dev/null @@ -1,16 +0,0 @@ -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.6.2/server-php/docs/examples/database/delete-collection.md b/app/sdks/0.6.2/server-php/docs/examples/database/delete-collection.md deleted file mode 100644 index 4018420188..0000000000 --- a/app/sdks/0.6.2/server-php/docs/examples/database/delete-collection.md +++ /dev/null @@ -1,16 +0,0 @@ -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.6.2/server-php/docs/examples/database/delete-document.md b/app/sdks/0.6.2/server-php/docs/examples/database/delete-document.md deleted file mode 100644 index 3ed45d6ee1..0000000000 --- a/app/sdks/0.6.2/server-php/docs/examples/database/delete-document.md +++ /dev/null @@ -1,16 +0,0 @@ -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.6.2/server-php/docs/examples/database/get-collection.md b/app/sdks/0.6.2/server-php/docs/examples/database/get-collection.md deleted file mode 100644 index a088b24bb6..0000000000 --- a/app/sdks/0.6.2/server-php/docs/examples/database/get-collection.md +++ /dev/null @@ -1,16 +0,0 @@ -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.6.2/server-php/docs/examples/database/get-document.md b/app/sdks/0.6.2/server-php/docs/examples/database/get-document.md deleted file mode 100644 index d506bd8414..0000000000 --- a/app/sdks/0.6.2/server-php/docs/examples/database/get-document.md +++ /dev/null @@ -1,16 +0,0 @@ -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.6.2/server-php/docs/examples/database/list-collections.md b/app/sdks/0.6.2/server-php/docs/examples/database/list-collections.md deleted file mode 100644 index 4f4aa1b775..0000000000 --- a/app/sdks/0.6.2/server-php/docs/examples/database/list-collections.md +++ /dev/null @@ -1,16 +0,0 @@ -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.6.2/server-php/docs/examples/database/list-documents.md b/app/sdks/0.6.2/server-php/docs/examples/database/list-documents.md deleted file mode 100644 index 359da4ce33..0000000000 --- a/app/sdks/0.6.2/server-php/docs/examples/database/list-documents.md +++ /dev/null @@ -1,16 +0,0 @@ -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.6.2/server-php/docs/examples/database/update-collection.md b/app/sdks/0.6.2/server-php/docs/examples/database/update-collection.md deleted file mode 100644 index 70d596066a..0000000000 --- a/app/sdks/0.6.2/server-php/docs/examples/database/update-collection.md +++ /dev/null @@ -1,16 +0,0 @@ -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.6.2/server-php/docs/examples/database/update-document.md b/app/sdks/0.6.2/server-php/docs/examples/database/update-document.md deleted file mode 100644 index 4389034640..0000000000 --- a/app/sdks/0.6.2/server-php/docs/examples/database/update-document.md +++ /dev/null @@ -1,16 +0,0 @@ -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.6.2/server-php/docs/examples/health/get-anti-virus.md b/app/sdks/0.6.2/server-php/docs/examples/health/get-anti-virus.md deleted file mode 100644 index 89a5fb2a7a..0000000000 --- a/app/sdks/0.6.2/server-php/docs/examples/health/get-anti-virus.md +++ /dev/null @@ -1,16 +0,0 @@ -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.6.2/server-php/docs/examples/health/get-cache.md b/app/sdks/0.6.2/server-php/docs/examples/health/get-cache.md deleted file mode 100644 index e654c26f51..0000000000 --- a/app/sdks/0.6.2/server-php/docs/examples/health/get-cache.md +++ /dev/null @@ -1,16 +0,0 @@ -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.6.2/server-php/docs/examples/health/get-d-b.md b/app/sdks/0.6.2/server-php/docs/examples/health/get-d-b.md deleted file mode 100644 index 2d37991a3d..0000000000 --- a/app/sdks/0.6.2/server-php/docs/examples/health/get-d-b.md +++ /dev/null @@ -1,16 +0,0 @@ -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.6.2/server-php/docs/examples/health/get-queue-certificates.md b/app/sdks/0.6.2/server-php/docs/examples/health/get-queue-certificates.md deleted file mode 100644 index 57f2c5793e..0000000000 --- a/app/sdks/0.6.2/server-php/docs/examples/health/get-queue-certificates.md +++ /dev/null @@ -1,16 +0,0 @@ -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.6.2/server-php/docs/examples/health/get-queue-functions.md b/app/sdks/0.6.2/server-php/docs/examples/health/get-queue-functions.md deleted file mode 100644 index 8ff6510e1c..0000000000 --- a/app/sdks/0.6.2/server-php/docs/examples/health/get-queue-functions.md +++ /dev/null @@ -1,16 +0,0 @@ -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.6.2/server-php/docs/examples/health/get-queue-logs.md b/app/sdks/0.6.2/server-php/docs/examples/health/get-queue-logs.md deleted file mode 100644 index fa723d7391..0000000000 --- a/app/sdks/0.6.2/server-php/docs/examples/health/get-queue-logs.md +++ /dev/null @@ -1,16 +0,0 @@ -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.6.2/server-php/docs/examples/health/get-queue-tasks.md b/app/sdks/0.6.2/server-php/docs/examples/health/get-queue-tasks.md deleted file mode 100644 index b8f1794a1a..0000000000 --- a/app/sdks/0.6.2/server-php/docs/examples/health/get-queue-tasks.md +++ /dev/null @@ -1,16 +0,0 @@ -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.6.2/server-php/docs/examples/health/get-queue-usage.md b/app/sdks/0.6.2/server-php/docs/examples/health/get-queue-usage.md deleted file mode 100644 index 371d02f5b4..0000000000 --- a/app/sdks/0.6.2/server-php/docs/examples/health/get-queue-usage.md +++ /dev/null @@ -1,16 +0,0 @@ -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.6.2/server-php/docs/examples/health/get-queue-webhooks.md b/app/sdks/0.6.2/server-php/docs/examples/health/get-queue-webhooks.md deleted file mode 100644 index af48a72d06..0000000000 --- a/app/sdks/0.6.2/server-php/docs/examples/health/get-queue-webhooks.md +++ /dev/null @@ -1,16 +0,0 @@ -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.6.2/server-php/docs/examples/health/get-storage-local.md b/app/sdks/0.6.2/server-php/docs/examples/health/get-storage-local.md deleted file mode 100644 index eba15a1652..0000000000 --- a/app/sdks/0.6.2/server-php/docs/examples/health/get-storage-local.md +++ /dev/null @@ -1,16 +0,0 @@ -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.6.2/server-php/docs/examples/health/get-time.md b/app/sdks/0.6.2/server-php/docs/examples/health/get-time.md deleted file mode 100644 index 849f499460..0000000000 --- a/app/sdks/0.6.2/server-php/docs/examples/health/get-time.md +++ /dev/null @@ -1,16 +0,0 @@ -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.6.2/server-php/docs/examples/health/get.md b/app/sdks/0.6.2/server-php/docs/examples/health/get.md deleted file mode 100644 index 9f1ec8970c..0000000000 --- a/app/sdks/0.6.2/server-php/docs/examples/health/get.md +++ /dev/null @@ -1,16 +0,0 @@ -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.6.2/server-php/docs/examples/locale/get-continents.md b/app/sdks/0.6.2/server-php/docs/examples/locale/get-continents.md deleted file mode 100644 index bb099d31f5..0000000000 --- a/app/sdks/0.6.2/server-php/docs/examples/locale/get-continents.md +++ /dev/null @@ -1,16 +0,0 @@ -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.6.2/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 deleted file mode 100644 index 87287a5cea..0000000000 --- a/app/sdks/0.6.2/server-php/docs/examples/locale/get-countries-e-u.md +++ /dev/null @@ -1,16 +0,0 @@ -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.6.2/server-php/docs/examples/locale/get-countries-phones.md b/app/sdks/0.6.2/server-php/docs/examples/locale/get-countries-phones.md deleted file mode 100644 index 71a39303da..0000000000 --- a/app/sdks/0.6.2/server-php/docs/examples/locale/get-countries-phones.md +++ /dev/null @@ -1,16 +0,0 @@ -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.6.2/server-php/docs/examples/locale/get-countries.md b/app/sdks/0.6.2/server-php/docs/examples/locale/get-countries.md deleted file mode 100644 index 1c8f863a76..0000000000 --- a/app/sdks/0.6.2/server-php/docs/examples/locale/get-countries.md +++ /dev/null @@ -1,16 +0,0 @@ -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.6.2/server-php/docs/examples/locale/get-currencies.md b/app/sdks/0.6.2/server-php/docs/examples/locale/get-currencies.md deleted file mode 100644 index b799bf6b80..0000000000 --- a/app/sdks/0.6.2/server-php/docs/examples/locale/get-currencies.md +++ /dev/null @@ -1,16 +0,0 @@ -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.6.2/server-php/docs/examples/locale/get-languages.md b/app/sdks/0.6.2/server-php/docs/examples/locale/get-languages.md deleted file mode 100644 index 47fdc6eb34..0000000000 --- a/app/sdks/0.6.2/server-php/docs/examples/locale/get-languages.md +++ /dev/null @@ -1,16 +0,0 @@ -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->getLanguages(); \ No newline at end of file diff --git a/app/sdks/0.6.2/server-php/docs/examples/locale/get.md b/app/sdks/0.6.2/server-php/docs/examples/locale/get.md deleted file mode 100644 index 8e11f17689..0000000000 --- a/app/sdks/0.6.2/server-php/docs/examples/locale/get.md +++ /dev/null @@ -1,16 +0,0 @@ -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.6.2/server-php/docs/examples/storage/create-file.md b/app/sdks/0.6.2/server-php/docs/examples/storage/create-file.md deleted file mode 100644 index ba533dd2e7..0000000000 --- a/app/sdks/0.6.2/server-php/docs/examples/storage/create-file.md +++ /dev/null @@ -1,16 +0,0 @@ -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.6.2/server-php/docs/examples/storage/delete-file.md b/app/sdks/0.6.2/server-php/docs/examples/storage/delete-file.md deleted file mode 100644 index 23d4013d22..0000000000 --- a/app/sdks/0.6.2/server-php/docs/examples/storage/delete-file.md +++ /dev/null @@ -1,16 +0,0 @@ -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.6.2/server-php/docs/examples/storage/get-file-download.md b/app/sdks/0.6.2/server-php/docs/examples/storage/get-file-download.md deleted file mode 100644 index 3064481141..0000000000 --- a/app/sdks/0.6.2/server-php/docs/examples/storage/get-file-download.md +++ /dev/null @@ -1,16 +0,0 @@ -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.6.2/server-php/docs/examples/storage/get-file-preview.md b/app/sdks/0.6.2/server-php/docs/examples/storage/get-file-preview.md deleted file mode 100644 index 00cb63696b..0000000000 --- a/app/sdks/0.6.2/server-php/docs/examples/storage/get-file-preview.md +++ /dev/null @@ -1,16 +0,0 @@ -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.6.2/server-php/docs/examples/storage/get-file-view.md b/app/sdks/0.6.2/server-php/docs/examples/storage/get-file-view.md deleted file mode 100644 index 07b7ab32ba..0000000000 --- a/app/sdks/0.6.2/server-php/docs/examples/storage/get-file-view.md +++ /dev/null @@ -1,16 +0,0 @@ -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.6.2/server-php/docs/examples/storage/get-file.md b/app/sdks/0.6.2/server-php/docs/examples/storage/get-file.md deleted file mode 100644 index c8b6495f18..0000000000 --- a/app/sdks/0.6.2/server-php/docs/examples/storage/get-file.md +++ /dev/null @@ -1,16 +0,0 @@ -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.6.2/server-php/docs/examples/storage/list-files.md b/app/sdks/0.6.2/server-php/docs/examples/storage/list-files.md deleted file mode 100644 index 787c38e320..0000000000 --- a/app/sdks/0.6.2/server-php/docs/examples/storage/list-files.md +++ /dev/null @@ -1,16 +0,0 @@ -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.6.2/server-php/docs/examples/storage/update-file.md b/app/sdks/0.6.2/server-php/docs/examples/storage/update-file.md deleted file mode 100644 index 7515217b97..0000000000 --- a/app/sdks/0.6.2/server-php/docs/examples/storage/update-file.md +++ /dev/null @@ -1,16 +0,0 @@ -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.6.2/server-php/docs/examples/teams/create-membership.md b/app/sdks/0.6.2/server-php/docs/examples/teams/create-membership.md deleted file mode 100644 index 9c88b1bba5..0000000000 --- a/app/sdks/0.6.2/server-php/docs/examples/teams/create-membership.md +++ /dev/null @@ -1,16 +0,0 @@ -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.6.2/server-php/docs/examples/teams/create.md b/app/sdks/0.6.2/server-php/docs/examples/teams/create.md deleted file mode 100644 index 7b0946bc83..0000000000 --- a/app/sdks/0.6.2/server-php/docs/examples/teams/create.md +++ /dev/null @@ -1,16 +0,0 @@ -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.6.2/server-php/docs/examples/teams/delete-membership.md b/app/sdks/0.6.2/server-php/docs/examples/teams/delete-membership.md deleted file mode 100644 index ca9d3d57c0..0000000000 --- a/app/sdks/0.6.2/server-php/docs/examples/teams/delete-membership.md +++ /dev/null @@ -1,16 +0,0 @@ -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.6.2/server-php/docs/examples/teams/delete.md b/app/sdks/0.6.2/server-php/docs/examples/teams/delete.md deleted file mode 100644 index 394a1940fc..0000000000 --- a/app/sdks/0.6.2/server-php/docs/examples/teams/delete.md +++ /dev/null @@ -1,16 +0,0 @@ -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.6.2/server-php/docs/examples/teams/get-memberships.md b/app/sdks/0.6.2/server-php/docs/examples/teams/get-memberships.md deleted file mode 100644 index 56f6d59063..0000000000 --- a/app/sdks/0.6.2/server-php/docs/examples/teams/get-memberships.md +++ /dev/null @@ -1,16 +0,0 @@ -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.6.2/server-php/docs/examples/teams/get.md b/app/sdks/0.6.2/server-php/docs/examples/teams/get.md deleted file mode 100644 index 6f0b705707..0000000000 --- a/app/sdks/0.6.2/server-php/docs/examples/teams/get.md +++ /dev/null @@ -1,16 +0,0 @@ -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.6.2/server-php/docs/examples/teams/list.md b/app/sdks/0.6.2/server-php/docs/examples/teams/list.md deleted file mode 100644 index d17bb7689b..0000000000 --- a/app/sdks/0.6.2/server-php/docs/examples/teams/list.md +++ /dev/null @@ -1,16 +0,0 @@ -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.6.2/server-php/docs/examples/teams/update.md b/app/sdks/0.6.2/server-php/docs/examples/teams/update.md deleted file mode 100644 index 945001dc36..0000000000 --- a/app/sdks/0.6.2/server-php/docs/examples/teams/update.md +++ /dev/null @@ -1,16 +0,0 @@ -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.6.2/server-php/docs/examples/users/create.md b/app/sdks/0.6.2/server-php/docs/examples/users/create.md deleted file mode 100644 index 53497b4277..0000000000 --- a/app/sdks/0.6.2/server-php/docs/examples/users/create.md +++ /dev/null @@ -1,16 +0,0 @@ -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.6.2/server-php/docs/examples/users/delete-session.md b/app/sdks/0.6.2/server-php/docs/examples/users/delete-session.md deleted file mode 100644 index ead6de7549..0000000000 --- a/app/sdks/0.6.2/server-php/docs/examples/users/delete-session.md +++ /dev/null @@ -1,16 +0,0 @@ -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.6.2/server-php/docs/examples/users/delete-sessions.md b/app/sdks/0.6.2/server-php/docs/examples/users/delete-sessions.md deleted file mode 100644 index 968d788ea7..0000000000 --- a/app/sdks/0.6.2/server-php/docs/examples/users/delete-sessions.md +++ /dev/null @@ -1,16 +0,0 @@ -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.6.2/server-php/docs/examples/users/get-logs.md b/app/sdks/0.6.2/server-php/docs/examples/users/get-logs.md deleted file mode 100644 index 5602536920..0000000000 --- a/app/sdks/0.6.2/server-php/docs/examples/users/get-logs.md +++ /dev/null @@ -1,16 +0,0 @@ -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.6.2/server-php/docs/examples/users/get-prefs.md b/app/sdks/0.6.2/server-php/docs/examples/users/get-prefs.md deleted file mode 100644 index 1c9978a0fb..0000000000 --- a/app/sdks/0.6.2/server-php/docs/examples/users/get-prefs.md +++ /dev/null @@ -1,16 +0,0 @@ -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.6.2/server-php/docs/examples/users/get-sessions.md b/app/sdks/0.6.2/server-php/docs/examples/users/get-sessions.md deleted file mode 100644 index fef9f1db74..0000000000 --- a/app/sdks/0.6.2/server-php/docs/examples/users/get-sessions.md +++ /dev/null @@ -1,16 +0,0 @@ -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.6.2/server-php/docs/examples/users/get.md b/app/sdks/0.6.2/server-php/docs/examples/users/get.md deleted file mode 100644 index 16c29f9a5a..0000000000 --- a/app/sdks/0.6.2/server-php/docs/examples/users/get.md +++ /dev/null @@ -1,16 +0,0 @@ -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.6.2/server-php/docs/examples/users/list.md b/app/sdks/0.6.2/server-php/docs/examples/users/list.md deleted file mode 100644 index efce771ea1..0000000000 --- a/app/sdks/0.6.2/server-php/docs/examples/users/list.md +++ /dev/null @@ -1,16 +0,0 @@ -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.6.2/server-php/docs/examples/users/update-prefs.md b/app/sdks/0.6.2/server-php/docs/examples/users/update-prefs.md deleted file mode 100644 index 9e9141f8a7..0000000000 --- a/app/sdks/0.6.2/server-php/docs/examples/users/update-prefs.md +++ /dev/null @@ -1,16 +0,0 @@ -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.6.2/server-php/docs/examples/users/update-status.md b/app/sdks/0.6.2/server-php/docs/examples/users/update-status.md deleted file mode 100644 index 87f9bceb46..0000000000 --- a/app/sdks/0.6.2/server-php/docs/examples/users/update-status.md +++ /dev/null @@ -1,16 +0,0 @@ -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.6.2/server-php/docs/health.md b/app/sdks/0.6.2/server-php/docs/health.md deleted file mode 100644 index 38b814b633..0000000000 --- a/app/sdks/0.6.2/server-php/docs/health.md +++ /dev/null @@ -1,96 +0,0 @@ -# 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.6.2/server-php/docs/locale.md b/app/sdks/0.6.2/server-php/docs/locale.md deleted file mode 100644 index 1591f4a1a8..0000000000 --- a/app/sdks/0.6.2/server-php/docs/locale.md +++ /dev/null @@ -1,60 +0,0 @@ -# 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.6.2/server-php/docs/storage.md b/app/sdks/0.6.2/server-php/docs/storage.md deleted file mode 100644 index 2138f901a8..0000000000 --- a/app/sdks/0.6.2/server-php/docs/storage.md +++ /dev/null @@ -1,127 +0,0 @@ -# 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.6.2/server-php/docs/teams.md b/app/sdks/0.6.2/server-php/docs/teams.md deleted file mode 100644 index ff569c0d68..0000000000 --- a/app/sdks/0.6.2/server-php/docs/teams.md +++ /dev/null @@ -1,132 +0,0 @@ -# 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. | | - diff --git a/app/sdks/0.6.2/server-php/docs/users.md b/app/sdks/0.6.2/server-php/docs/users.md deleted file mode 100644 index fd83fa4ad6..0000000000 --- a/app/sdks/0.6.2/server-php/docs/users.md +++ /dev/null @@ -1,150 +0,0 @@ -# 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. Must be between 6 to 32 chars. | | -| 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.6.2/server-php/src/Appwrite/Client.php b/app/sdks/0.6.2/server-php/src/Appwrite/Client.php deleted file mode 100644 index b87c929b9b..0000000000 --- a/app/sdks/0.6.2/server-php/src/Appwrite/Client.php +++ /dev/null @@ -1,240 +0,0 @@ - '', - '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 = $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.6.2/server-php/src/Appwrite/Service.php b/app/sdks/0.6.2/server-php/src/Appwrite/Service.php deleted file mode 100644 index ea3ad92e2d..0000000000 --- a/app/sdks/0.6.2/server-php/src/Appwrite/Service.php +++ /dev/null @@ -1,19 +0,0 @@ -client = $client; - } -} \ No newline at end of file diff --git a/app/sdks/0.6.2/server-php/src/Appwrite/Services/Avatars.php b/app/sdks/0.6.2/server-php/src/Appwrite/Services/Avatars.php deleted file mode 100644 index 3ebbb357f8..0000000000 --- a/app/sdks/0.6.2/server-php/src/Appwrite/Services/Avatars.php +++ /dev/null @@ -1,213 +0,0 @@ -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 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 - */ - public function getInitials(string $name = '', int $width = 500, int $height = 500, string $color = '', string $background = ''):array - { - $path = str_replace([], [], '/avatars/initials'); - $params = []; - - $params['name'] = $name; - $params['width'] = $width; - $params['height'] = $height; - $params['color'] = $color; - $params['background'] = $background; - - 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 boolean $download - * @throws Exception - * @return array - */ - public function getQR(string $text, int $size = 400, int $margin = 1, boolean $download = false):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.6.2/server-php/src/Appwrite/Services/Database.php b/app/sdks/0.6.2/server-php/src/Appwrite/Services/Database.php deleted file mode 100644 index bc5266f17e..0000000000 --- a/app/sdks/0.6.2/server-php/src/Appwrite/Services/Database.php +++ /dev/null @@ -1,280 +0,0 @@ -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 - * @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 = ''):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; - - return $this->client->call(Client::METHOD_GET, $path, [ - 'content-type' => 'application/json', - ], $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 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); - } - -} \ No newline at end of file diff --git a/app/sdks/0.6.2/server-php/src/Appwrite/Services/Health.php b/app/sdks/0.6.2/server-php/src/Appwrite/Services/Health.php deleted file mode 100644 index d39f1f406d..0000000000 --- a/app/sdks/0.6.2/server-php/src/Appwrite/Services/Health.php +++ /dev/null @@ -1,250 +0,0 @@ -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.6.2/server-php/src/Appwrite/Services/Locale.php b/app/sdks/0.6.2/server-php/src/Appwrite/Services/Locale.php deleted file mode 100644 index 93318d57cb..0000000000 --- a/app/sdks/0.6.2/server-php/src/Appwrite/Services/Locale.php +++ /dev/null @@ -1,156 +0,0 @@ -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 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 - */ - public function getCurrencies():array - { - $path = str_replace([], [], '/locale/currencies'); - $params = []; - - - return $this->client->call(Client::METHOD_GET, $path, [ - 'content-type' => 'application/json', - ], $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 - */ - public function getLanguages():array - { - $path = str_replace([], [], '/locale/languages'); - $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.6.2/server-php/src/Appwrite/Services/Storage.php b/app/sdks/0.6.2/server-php/src/Appwrite/Services/Storage.php deleted file mode 100644 index 09b74fbf8f..0000000000 --- a/app/sdks/0.6.2/server-php/src/Appwrite/Services/Storage.php +++ /dev/null @@ -1,212 +0,0 @@ -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.6.2/server-php/src/Appwrite/Services/Teams.php b/app/sdks/0.6.2/server-php/src/Appwrite/Services/Teams.php deleted file mode 100644 index 16da2a215f..0000000000 --- a/app/sdks/0.6.2/server-php/src/Appwrite/Services/Teams.php +++ /dev/null @@ -1,223 +0,0 @@ -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 - * @param string $search - * @param int $limit - * @param int $offset - * @param string $orderType - * @throws Exception - * @return array - */ - public function getMemberships(string $teamId, string $search = '', int $limit = 25, int $offset = 0, string $orderType = 'ASC'):array - { - $path = str_replace(['{teamId}'], [$teamId], '/teams/{teamId}/memberships'); - $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 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 - */ - 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.6.2/server-php/src/Appwrite/Services/Users.php b/app/sdks/0.6.2/server-php/src/Appwrite/Services/Users.php deleted file mode 100644 index b2b4f576cc..0000000000 --- a/app/sdks/0.6.2/server-php/src/Appwrite/Services/Users.php +++ /dev/null @@ -1,230 +0,0 @@ -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.6.2/server-python/CHANGELOG.md b/app/sdks/0.6.2/server-python/CHANGELOG.md deleted file mode 100644 index fa4d35e687..0000000000 --- a/app/sdks/0.6.2/server-python/CHANGELOG.md +++ /dev/null @@ -1 +0,0 @@ -# Change Log \ No newline at end of file diff --git a/app/sdks/0.6.2/server-python/LICENSE b/app/sdks/0.6.2/server-python/LICENSE deleted file mode 100644 index fc7c051a91..0000000000 --- a/app/sdks/0.6.2/server-python/LICENSE +++ /dev/null @@ -1,12 +0,0 @@ -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.6.2/server-python/README.md b/app/sdks/0.6.2/server-python/README.md deleted file mode 100644 index 04421ff241..0000000000 --- a/app/sdks/0.6.2/server-python/README.md +++ /dev/null @@ -1,30 +0,0 @@ -# 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.6.2/server-python/appwrite/__init__.py b/app/sdks/0.6.2/server-python/appwrite/__init__.py deleted file mode 100644 index 0519ecba6e..0000000000 --- a/app/sdks/0.6.2/server-python/appwrite/__init__.py +++ /dev/null @@ -1 +0,0 @@ - \ No newline at end of file diff --git a/app/sdks/0.6.2/server-python/appwrite/client.py b/app/sdks/0.6.2/server-python/appwrite/client.py deleted file mode 100644 index 8989fccb9c..0000000000 --- a/app/sdks/0.6.2/server-python/appwrite/client.py +++ /dev/null @@ -1,106 +0,0 @@ -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.6.2/server-python/appwrite/service.py b/app/sdks/0.6.2/server-python/appwrite/service.py deleted file mode 100644 index b5b60e6c22..0000000000 --- a/app/sdks/0.6.2/server-python/appwrite/service.py +++ /dev/null @@ -1,6 +0,0 @@ -from .client import Client - - -class Service: - def __init__(self, client: Client): - self.client = client diff --git a/app/sdks/0.6.2/server-python/appwrite/services/__init__.py b/app/sdks/0.6.2/server-python/appwrite/services/__init__.py deleted file mode 100644 index 0519ecba6e..0000000000 --- a/app/sdks/0.6.2/server-python/appwrite/services/__init__.py +++ /dev/null @@ -1 +0,0 @@ - \ No newline at end of file diff --git a/app/sdks/0.6.2/server-python/appwrite/services/avatars.py b/app/sdks/0.6.2/server-python/appwrite/services/avatars.py deleted file mode 100644 index 12341106d0..0000000000 --- a/app/sdks/0.6.2/server-python/appwrite/services/avatars.py +++ /dev/null @@ -1,102 +0,0 @@ -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_initials(self, name='', width=500, height=500, color='', background=''): - """Get User Initials""" - - params = {} - path = '/avatars/initials' - params['name'] = name - params['width'] = width - params['height'] = height - params['color'] = color - params['background'] = background - - return self.client.call('get', path, { - 'content-type': 'application/json', - }, params) - - def get_q_r(self, text, size=400, margin=1, download=False): - """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.6.2/server-python/appwrite/services/database.py b/app/sdks/0.6.2/server-python/appwrite/services/database.py deleted file mode 100644 index 7611cf25ba..0000000000 --- a/app/sdks/0.6.2/server-python/appwrite/services/database.py +++ /dev/null @@ -1,146 +0,0 @@ -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=''): - """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 - - 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) diff --git a/app/sdks/0.6.2/server-python/appwrite/services/health.py b/app/sdks/0.6.2/server-python/appwrite/services/health.py deleted file mode 100644 index 5e08ebe6e8..0000000000 --- a/app/sdks/0.6.2/server-python/appwrite/services/health.py +++ /dev/null @@ -1,127 +0,0 @@ -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.6.2/server-python/appwrite/services/locale.py b/app/sdks/0.6.2/server-python/appwrite/services/locale.py deleted file mode 100644 index fe3ad5e988..0000000000 --- a/app/sdks/0.6.2/server-python/appwrite/services/locale.py +++ /dev/null @@ -1,77 +0,0 @@ -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) - - def get_languages(self): - """List Languages""" - - params = {} - path = '/locale/languages' - - return self.client.call('get', path, { - 'content-type': 'application/json', - }, params) diff --git a/app/sdks/0.6.2/server-python/appwrite/services/storage.py b/app/sdks/0.6.2/server-python/appwrite/services/storage.py deleted file mode 100644 index 7e2a986f6e..0000000000 --- a/app/sdks/0.6.2/server-python/appwrite/services/storage.py +++ /dev/null @@ -1,108 +0,0 @@ -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.6.2/server-python/appwrite/services/teams.py b/app/sdks/0.6.2/server-python/appwrite/services/teams.py deleted file mode 100644 index 72c6a6e9d3..0000000000 --- a/app/sdks/0.6.2/server-python/appwrite/services/teams.py +++ /dev/null @@ -1,109 +0,0 @@ -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, search='', limit=25, offset=0, order_type='ASC'): - """Get Team Memberships""" - - params = {} - path = '/teams/{teamId}/memberships' - path = path.replace('{teamId}', team_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_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.6.2/server-python/appwrite/services/users.py b/app/sdks/0.6.2/server-python/appwrite/services/users.py deleted file mode 100644 index 2608f07a50..0000000000 --- a/app/sdks/0.6.2/server-python/appwrite/services/users.py +++ /dev/null @@ -1,125 +0,0 @@ -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.6.2/server-python/docs/examples/avatars/get-browser.md b/app/sdks/0.6.2/server-python/docs/examples/avatars/get-browser.md deleted file mode 100644 index 138c0d1b3e..0000000000 --- a/app/sdks/0.6.2/server-python/docs/examples/avatars/get-browser.md +++ /dev/null @@ -1,14 +0,0 @@ -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.6.2/server-python/docs/examples/avatars/get-credit-card.md b/app/sdks/0.6.2/server-python/docs/examples/avatars/get-credit-card.md deleted file mode 100644 index 83f76aca42..0000000000 --- a/app/sdks/0.6.2/server-python/docs/examples/avatars/get-credit-card.md +++ /dev/null @@ -1,14 +0,0 @@ -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.6.2/server-python/docs/examples/avatars/get-favicon.md b/app/sdks/0.6.2/server-python/docs/examples/avatars/get-favicon.md deleted file mode 100644 index 6946080bee..0000000000 --- a/app/sdks/0.6.2/server-python/docs/examples/avatars/get-favicon.md +++ /dev/null @@ -1,14 +0,0 @@ -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.6.2/server-python/docs/examples/avatars/get-flag.md b/app/sdks/0.6.2/server-python/docs/examples/avatars/get-flag.md deleted file mode 100644 index 188d6d35bd..0000000000 --- a/app/sdks/0.6.2/server-python/docs/examples/avatars/get-flag.md +++ /dev/null @@ -1,14 +0,0 @@ -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.6.2/server-python/docs/examples/avatars/get-image.md b/app/sdks/0.6.2/server-python/docs/examples/avatars/get-image.md deleted file mode 100644 index 29a6430eab..0000000000 --- a/app/sdks/0.6.2/server-python/docs/examples/avatars/get-image.md +++ /dev/null @@ -1,14 +0,0 @@ -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.6.2/server-python/docs/examples/avatars/get-initials.md b/app/sdks/0.6.2/server-python/docs/examples/avatars/get-initials.md deleted file mode 100644 index 0c300af5da..0000000000 --- a/app/sdks/0.6.2/server-python/docs/examples/avatars/get-initials.md +++ /dev/null @@ -1,14 +0,0 @@ -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_initials() diff --git a/app/sdks/0.6.2/server-python/docs/examples/avatars/get-q-r.md b/app/sdks/0.6.2/server-python/docs/examples/avatars/get-q-r.md deleted file mode 100644 index 19551e99d7..0000000000 --- a/app/sdks/0.6.2/server-python/docs/examples/avatars/get-q-r.md +++ /dev/null @@ -1,14 +0,0 @@ -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.6.2/server-python/docs/examples/database/create-collection.md b/app/sdks/0.6.2/server-python/docs/examples/database/create-collection.md deleted file mode 100644 index eb704a80a1..0000000000 --- a/app/sdks/0.6.2/server-python/docs/examples/database/create-collection.md +++ /dev/null @@ -1,14 +0,0 @@ -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.6.2/server-python/docs/examples/database/create-document.md b/app/sdks/0.6.2/server-python/docs/examples/database/create-document.md deleted file mode 100644 index 919d5ebbf4..0000000000 --- a/app/sdks/0.6.2/server-python/docs/examples/database/create-document.md +++ /dev/null @@ -1,14 +0,0 @@ -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.6.2/server-python/docs/examples/database/delete-collection.md b/app/sdks/0.6.2/server-python/docs/examples/database/delete-collection.md deleted file mode 100644 index 0e188ade41..0000000000 --- a/app/sdks/0.6.2/server-python/docs/examples/database/delete-collection.md +++ /dev/null @@ -1,14 +0,0 @@ -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.6.2/server-python/docs/examples/database/delete-document.md b/app/sdks/0.6.2/server-python/docs/examples/database/delete-document.md deleted file mode 100644 index c085547c16..0000000000 --- a/app/sdks/0.6.2/server-python/docs/examples/database/delete-document.md +++ /dev/null @@ -1,14 +0,0 @@ -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.6.2/server-python/docs/examples/database/get-collection.md b/app/sdks/0.6.2/server-python/docs/examples/database/get-collection.md deleted file mode 100644 index f90f51f48b..0000000000 --- a/app/sdks/0.6.2/server-python/docs/examples/database/get-collection.md +++ /dev/null @@ -1,14 +0,0 @@ -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.6.2/server-python/docs/examples/database/get-document.md b/app/sdks/0.6.2/server-python/docs/examples/database/get-document.md deleted file mode 100644 index 79891709d1..0000000000 --- a/app/sdks/0.6.2/server-python/docs/examples/database/get-document.md +++ /dev/null @@ -1,14 +0,0 @@ -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.6.2/server-python/docs/examples/database/list-collections.md b/app/sdks/0.6.2/server-python/docs/examples/database/list-collections.md deleted file mode 100644 index f60d4b90e5..0000000000 --- a/app/sdks/0.6.2/server-python/docs/examples/database/list-collections.md +++ /dev/null @@ -1,14 +0,0 @@ -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.6.2/server-python/docs/examples/database/list-documents.md b/app/sdks/0.6.2/server-python/docs/examples/database/list-documents.md deleted file mode 100644 index cecb57d2fa..0000000000 --- a/app/sdks/0.6.2/server-python/docs/examples/database/list-documents.md +++ /dev/null @@ -1,14 +0,0 @@ -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.6.2/server-python/docs/examples/database/update-collection.md b/app/sdks/0.6.2/server-python/docs/examples/database/update-collection.md deleted file mode 100644 index 7dacd558ba..0000000000 --- a/app/sdks/0.6.2/server-python/docs/examples/database/update-collection.md +++ /dev/null @@ -1,14 +0,0 @@ -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.6.2/server-python/docs/examples/database/update-document.md b/app/sdks/0.6.2/server-python/docs/examples/database/update-document.md deleted file mode 100644 index 6296809dc5..0000000000 --- a/app/sdks/0.6.2/server-python/docs/examples/database/update-document.md +++ /dev/null @@ -1,14 +0,0 @@ -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.6.2/server-python/docs/examples/health/get-anti-virus.md b/app/sdks/0.6.2/server-python/docs/examples/health/get-anti-virus.md deleted file mode 100644 index c7628d90ea..0000000000 --- a/app/sdks/0.6.2/server-python/docs/examples/health/get-anti-virus.md +++ /dev/null @@ -1,14 +0,0 @@ -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.6.2/server-python/docs/examples/health/get-cache.md b/app/sdks/0.6.2/server-python/docs/examples/health/get-cache.md deleted file mode 100644 index 57c7939b7f..0000000000 --- a/app/sdks/0.6.2/server-python/docs/examples/health/get-cache.md +++ /dev/null @@ -1,14 +0,0 @@ -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.6.2/server-python/docs/examples/health/get-d-b.md b/app/sdks/0.6.2/server-python/docs/examples/health/get-d-b.md deleted file mode 100644 index db8eec5ce6..0000000000 --- a/app/sdks/0.6.2/server-python/docs/examples/health/get-d-b.md +++ /dev/null @@ -1,14 +0,0 @@ -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.6.2/server-python/docs/examples/health/get-queue-certificates.md b/app/sdks/0.6.2/server-python/docs/examples/health/get-queue-certificates.md deleted file mode 100644 index 1f87c2758a..0000000000 --- a/app/sdks/0.6.2/server-python/docs/examples/health/get-queue-certificates.md +++ /dev/null @@ -1,14 +0,0 @@ -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.6.2/server-python/docs/examples/health/get-queue-functions.md b/app/sdks/0.6.2/server-python/docs/examples/health/get-queue-functions.md deleted file mode 100644 index 3e0b0c01e0..0000000000 --- a/app/sdks/0.6.2/server-python/docs/examples/health/get-queue-functions.md +++ /dev/null @@ -1,14 +0,0 @@ -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.6.2/server-python/docs/examples/health/get-queue-logs.md b/app/sdks/0.6.2/server-python/docs/examples/health/get-queue-logs.md deleted file mode 100644 index fdf80c6d82..0000000000 --- a/app/sdks/0.6.2/server-python/docs/examples/health/get-queue-logs.md +++ /dev/null @@ -1,14 +0,0 @@ -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.6.2/server-python/docs/examples/health/get-queue-tasks.md b/app/sdks/0.6.2/server-python/docs/examples/health/get-queue-tasks.md deleted file mode 100644 index 17b17a081f..0000000000 --- a/app/sdks/0.6.2/server-python/docs/examples/health/get-queue-tasks.md +++ /dev/null @@ -1,14 +0,0 @@ -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.6.2/server-python/docs/examples/health/get-queue-usage.md b/app/sdks/0.6.2/server-python/docs/examples/health/get-queue-usage.md deleted file mode 100644 index aeb8e83130..0000000000 --- a/app/sdks/0.6.2/server-python/docs/examples/health/get-queue-usage.md +++ /dev/null @@ -1,14 +0,0 @@ -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.6.2/server-python/docs/examples/health/get-queue-webhooks.md b/app/sdks/0.6.2/server-python/docs/examples/health/get-queue-webhooks.md deleted file mode 100644 index 90c4238987..0000000000 --- a/app/sdks/0.6.2/server-python/docs/examples/health/get-queue-webhooks.md +++ /dev/null @@ -1,14 +0,0 @@ -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.6.2/server-python/docs/examples/health/get-storage-local.md b/app/sdks/0.6.2/server-python/docs/examples/health/get-storage-local.md deleted file mode 100644 index b06dcef245..0000000000 --- a/app/sdks/0.6.2/server-python/docs/examples/health/get-storage-local.md +++ /dev/null @@ -1,14 +0,0 @@ -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.6.2/server-python/docs/examples/health/get-time.md b/app/sdks/0.6.2/server-python/docs/examples/health/get-time.md deleted file mode 100644 index df68c1a0f9..0000000000 --- a/app/sdks/0.6.2/server-python/docs/examples/health/get-time.md +++ /dev/null @@ -1,14 +0,0 @@ -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.6.2/server-python/docs/examples/health/get.md b/app/sdks/0.6.2/server-python/docs/examples/health/get.md deleted file mode 100644 index f3416aef75..0000000000 --- a/app/sdks/0.6.2/server-python/docs/examples/health/get.md +++ /dev/null @@ -1,14 +0,0 @@ -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.6.2/server-python/docs/examples/locale/get-continents.md b/app/sdks/0.6.2/server-python/docs/examples/locale/get-continents.md deleted file mode 100644 index 393326ddab..0000000000 --- a/app/sdks/0.6.2/server-python/docs/examples/locale/get-continents.md +++ /dev/null @@ -1,14 +0,0 @@ -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.6.2/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 deleted file mode 100644 index 653fdd5abf..0000000000 --- a/app/sdks/0.6.2/server-python/docs/examples/locale/get-countries-e-u.md +++ /dev/null @@ -1,14 +0,0 @@ -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.6.2/server-python/docs/examples/locale/get-countries-phones.md b/app/sdks/0.6.2/server-python/docs/examples/locale/get-countries-phones.md deleted file mode 100644 index 8c7693a35c..0000000000 --- a/app/sdks/0.6.2/server-python/docs/examples/locale/get-countries-phones.md +++ /dev/null @@ -1,14 +0,0 @@ -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.6.2/server-python/docs/examples/locale/get-countries.md b/app/sdks/0.6.2/server-python/docs/examples/locale/get-countries.md deleted file mode 100644 index 8a6c7cb1c3..0000000000 --- a/app/sdks/0.6.2/server-python/docs/examples/locale/get-countries.md +++ /dev/null @@ -1,14 +0,0 @@ -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.6.2/server-python/docs/examples/locale/get-currencies.md b/app/sdks/0.6.2/server-python/docs/examples/locale/get-currencies.md deleted file mode 100644 index 17586de230..0000000000 --- a/app/sdks/0.6.2/server-python/docs/examples/locale/get-currencies.md +++ /dev/null @@ -1,14 +0,0 @@ -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.6.2/server-python/docs/examples/locale/get-languages.md b/app/sdks/0.6.2/server-python/docs/examples/locale/get-languages.md deleted file mode 100644 index 292a401f75..0000000000 --- a/app/sdks/0.6.2/server-python/docs/examples/locale/get-languages.md +++ /dev/null @@ -1,14 +0,0 @@ -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_languages() diff --git a/app/sdks/0.6.2/server-python/docs/examples/locale/get.md b/app/sdks/0.6.2/server-python/docs/examples/locale/get.md deleted file mode 100644 index 752df0123d..0000000000 --- a/app/sdks/0.6.2/server-python/docs/examples/locale/get.md +++ /dev/null @@ -1,14 +0,0 @@ -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.6.2/server-python/docs/examples/storage/create-file.md b/app/sdks/0.6.2/server-python/docs/examples/storage/create-file.md deleted file mode 100644 index 52bf8b8575..0000000000 --- a/app/sdks/0.6.2/server-python/docs/examples/storage/create-file.md +++ /dev/null @@ -1,14 +0,0 @@ -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.6.2/server-python/docs/examples/storage/delete-file.md b/app/sdks/0.6.2/server-python/docs/examples/storage/delete-file.md deleted file mode 100644 index 9379cb8820..0000000000 --- a/app/sdks/0.6.2/server-python/docs/examples/storage/delete-file.md +++ /dev/null @@ -1,14 +0,0 @@ -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.6.2/server-python/docs/examples/storage/get-file-download.md b/app/sdks/0.6.2/server-python/docs/examples/storage/get-file-download.md deleted file mode 100644 index bc815cebbe..0000000000 --- a/app/sdks/0.6.2/server-python/docs/examples/storage/get-file-download.md +++ /dev/null @@ -1,14 +0,0 @@ -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.6.2/server-python/docs/examples/storage/get-file-preview.md b/app/sdks/0.6.2/server-python/docs/examples/storage/get-file-preview.md deleted file mode 100644 index 2d14539513..0000000000 --- a/app/sdks/0.6.2/server-python/docs/examples/storage/get-file-preview.md +++ /dev/null @@ -1,14 +0,0 @@ -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.6.2/server-python/docs/examples/storage/get-file-view.md b/app/sdks/0.6.2/server-python/docs/examples/storage/get-file-view.md deleted file mode 100644 index 7d0b30b376..0000000000 --- a/app/sdks/0.6.2/server-python/docs/examples/storage/get-file-view.md +++ /dev/null @@ -1,14 +0,0 @@ -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.6.2/server-python/docs/examples/storage/get-file.md b/app/sdks/0.6.2/server-python/docs/examples/storage/get-file.md deleted file mode 100644 index e8d1202e27..0000000000 --- a/app/sdks/0.6.2/server-python/docs/examples/storage/get-file.md +++ /dev/null @@ -1,14 +0,0 @@ -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.6.2/server-python/docs/examples/storage/list-files.md b/app/sdks/0.6.2/server-python/docs/examples/storage/list-files.md deleted file mode 100644 index 0e72773fcb..0000000000 --- a/app/sdks/0.6.2/server-python/docs/examples/storage/list-files.md +++ /dev/null @@ -1,14 +0,0 @@ -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.6.2/server-python/docs/examples/storage/update-file.md b/app/sdks/0.6.2/server-python/docs/examples/storage/update-file.md deleted file mode 100644 index 7e1c5f61cd..0000000000 --- a/app/sdks/0.6.2/server-python/docs/examples/storage/update-file.md +++ /dev/null @@ -1,14 +0,0 @@ -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.6.2/server-python/docs/examples/teams/create-membership.md b/app/sdks/0.6.2/server-python/docs/examples/teams/create-membership.md deleted file mode 100644 index 9e2c832b3c..0000000000 --- a/app/sdks/0.6.2/server-python/docs/examples/teams/create-membership.md +++ /dev/null @@ -1,14 +0,0 @@ -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.6.2/server-python/docs/examples/teams/create.md b/app/sdks/0.6.2/server-python/docs/examples/teams/create.md deleted file mode 100644 index 1debdc6109..0000000000 --- a/app/sdks/0.6.2/server-python/docs/examples/teams/create.md +++ /dev/null @@ -1,14 +0,0 @@ -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.6.2/server-python/docs/examples/teams/delete-membership.md b/app/sdks/0.6.2/server-python/docs/examples/teams/delete-membership.md deleted file mode 100644 index af30bc1cf3..0000000000 --- a/app/sdks/0.6.2/server-python/docs/examples/teams/delete-membership.md +++ /dev/null @@ -1,14 +0,0 @@ -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.6.2/server-python/docs/examples/teams/delete.md b/app/sdks/0.6.2/server-python/docs/examples/teams/delete.md deleted file mode 100644 index 8fb037cd4a..0000000000 --- a/app/sdks/0.6.2/server-python/docs/examples/teams/delete.md +++ /dev/null @@ -1,14 +0,0 @@ -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.6.2/server-python/docs/examples/teams/get-memberships.md b/app/sdks/0.6.2/server-python/docs/examples/teams/get-memberships.md deleted file mode 100644 index 6c6482418b..0000000000 --- a/app/sdks/0.6.2/server-python/docs/examples/teams/get-memberships.md +++ /dev/null @@ -1,14 +0,0 @@ -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.6.2/server-python/docs/examples/teams/get.md b/app/sdks/0.6.2/server-python/docs/examples/teams/get.md deleted file mode 100644 index 6c2b404517..0000000000 --- a/app/sdks/0.6.2/server-python/docs/examples/teams/get.md +++ /dev/null @@ -1,14 +0,0 @@ -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.6.2/server-python/docs/examples/teams/list.md b/app/sdks/0.6.2/server-python/docs/examples/teams/list.md deleted file mode 100644 index c538aea340..0000000000 --- a/app/sdks/0.6.2/server-python/docs/examples/teams/list.md +++ /dev/null @@ -1,14 +0,0 @@ -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.6.2/server-python/docs/examples/teams/update.md b/app/sdks/0.6.2/server-python/docs/examples/teams/update.md deleted file mode 100644 index 2b9c222be0..0000000000 --- a/app/sdks/0.6.2/server-python/docs/examples/teams/update.md +++ /dev/null @@ -1,14 +0,0 @@ -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.6.2/server-python/docs/examples/users/create.md b/app/sdks/0.6.2/server-python/docs/examples/users/create.md deleted file mode 100644 index 2cfe228ee0..0000000000 --- a/app/sdks/0.6.2/server-python/docs/examples/users/create.md +++ /dev/null @@ -1,14 +0,0 @@ -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.6.2/server-python/docs/examples/users/delete-session.md b/app/sdks/0.6.2/server-python/docs/examples/users/delete-session.md deleted file mode 100644 index d25cfb3abc..0000000000 --- a/app/sdks/0.6.2/server-python/docs/examples/users/delete-session.md +++ /dev/null @@ -1,14 +0,0 @@ -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.6.2/server-python/docs/examples/users/delete-sessions.md b/app/sdks/0.6.2/server-python/docs/examples/users/delete-sessions.md deleted file mode 100644 index 9b24db1b5c..0000000000 --- a/app/sdks/0.6.2/server-python/docs/examples/users/delete-sessions.md +++ /dev/null @@ -1,14 +0,0 @@ -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.6.2/server-python/docs/examples/users/get-logs.md b/app/sdks/0.6.2/server-python/docs/examples/users/get-logs.md deleted file mode 100644 index c93ae244c8..0000000000 --- a/app/sdks/0.6.2/server-python/docs/examples/users/get-logs.md +++ /dev/null @@ -1,14 +0,0 @@ -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.6.2/server-python/docs/examples/users/get-prefs.md b/app/sdks/0.6.2/server-python/docs/examples/users/get-prefs.md deleted file mode 100644 index 9ef100f9e6..0000000000 --- a/app/sdks/0.6.2/server-python/docs/examples/users/get-prefs.md +++ /dev/null @@ -1,14 +0,0 @@ -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.6.2/server-python/docs/examples/users/get-sessions.md b/app/sdks/0.6.2/server-python/docs/examples/users/get-sessions.md deleted file mode 100644 index 4de3120dfb..0000000000 --- a/app/sdks/0.6.2/server-python/docs/examples/users/get-sessions.md +++ /dev/null @@ -1,14 +0,0 @@ -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.6.2/server-python/docs/examples/users/get.md b/app/sdks/0.6.2/server-python/docs/examples/users/get.md deleted file mode 100644 index c11f96e64b..0000000000 --- a/app/sdks/0.6.2/server-python/docs/examples/users/get.md +++ /dev/null @@ -1,14 +0,0 @@ -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.6.2/server-python/docs/examples/users/list.md b/app/sdks/0.6.2/server-python/docs/examples/users/list.md deleted file mode 100644 index c4a66e42d2..0000000000 --- a/app/sdks/0.6.2/server-python/docs/examples/users/list.md +++ /dev/null @@ -1,14 +0,0 @@ -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.6.2/server-python/docs/examples/users/update-prefs.md b/app/sdks/0.6.2/server-python/docs/examples/users/update-prefs.md deleted file mode 100644 index 7e0fe7c35a..0000000000 --- a/app/sdks/0.6.2/server-python/docs/examples/users/update-prefs.md +++ /dev/null @@ -1,14 +0,0 @@ -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.6.2/server-python/docs/examples/users/update-status.md b/app/sdks/0.6.2/server-python/docs/examples/users/update-status.md deleted file mode 100644 index 28fd587deb..0000000000 --- a/app/sdks/0.6.2/server-python/docs/examples/users/update-status.md +++ /dev/null @@ -1,14 +0,0 @@ -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.6.2/server-python/requirements.txt b/app/sdks/0.6.2/server-python/requirements.txt deleted file mode 100644 index e20605c43d..0000000000 --- a/app/sdks/0.6.2/server-python/requirements.txt +++ /dev/null @@ -1 +0,0 @@ -requests==2.22.0 \ No newline at end of file diff --git a/app/sdks/0.6.2/server-python/setup.cfg b/app/sdks/0.6.2/server-python/setup.cfg deleted file mode 100644 index 224a77957f..0000000000 --- a/app/sdks/0.6.2/server-python/setup.cfg +++ /dev/null @@ -1,2 +0,0 @@ -[metadata] -description-file = README.md \ No newline at end of file diff --git a/app/sdks/0.6.2/server-python/setup.py b/app/sdks/0.6.2/server-python/setup.py deleted file mode 100644 index 503ff387ea..0000000000 --- a/app/sdks/0.6.2/server-python/setup.py +++ /dev/null @@ -1,31 +0,0 @@ -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', - 'Programming Language :: Python :: 3.8', - ], -) diff --git a/app/sdks/0.6.2/server-ruby/CHANGELOG.md b/app/sdks/0.6.2/server-ruby/CHANGELOG.md deleted file mode 100644 index fa4d35e687..0000000000 --- a/app/sdks/0.6.2/server-ruby/CHANGELOG.md +++ /dev/null @@ -1 +0,0 @@ -# Change Log \ No newline at end of file diff --git a/app/sdks/0.6.2/server-ruby/Gemfile b/app/sdks/0.6.2/server-ruby/Gemfile deleted file mode 100644 index cd8aa9e04c..0000000000 --- a/app/sdks/0.6.2/server-ruby/Gemfile +++ /dev/null @@ -1,3 +0,0 @@ -source 'https://rubygems.org' - -gemspec \ No newline at end of file diff --git a/app/sdks/0.6.2/server-ruby/LICENSE b/app/sdks/0.6.2/server-ruby/LICENSE deleted file mode 100644 index fc7c051a91..0000000000 --- a/app/sdks/0.6.2/server-ruby/LICENSE +++ /dev/null @@ -1,12 +0,0 @@ -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.6.2/server-ruby/README.md b/app/sdks/0.6.2/server-ruby/README.md deleted file mode 100644 index 39c5ff1490..0000000000 --- a/app/sdks/0.6.2/server-ruby/README.md +++ /dev/null @@ -1,30 +0,0 @@ -# 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.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 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.6.2/server-ruby/appwrite.gemspec b/app/sdks/0.6.2/server-ruby/appwrite.gemspec deleted file mode 100644 index f550cecf9f..0000000000 --- a/app/sdks/0.6.2/server-ruby/appwrite.gemspec +++ /dev/null @@ -1,13 +0,0 @@ -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.6.2/server-ruby/docs/examples/avatars/get-browser.md b/app/sdks/0.6.2/server-ruby/docs/examples/avatars/get-browser.md deleted file mode 100644 index fc0cfc913f..0000000000 --- a/app/sdks/0.6.2/server-ruby/docs/examples/avatars/get-browser.md +++ /dev/null @@ -1,15 +0,0 @@ -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.6.2/server-ruby/docs/examples/avatars/get-credit-card.md b/app/sdks/0.6.2/server-ruby/docs/examples/avatars/get-credit-card.md deleted file mode 100644 index b3763f0846..0000000000 --- a/app/sdks/0.6.2/server-ruby/docs/examples/avatars/get-credit-card.md +++ /dev/null @@ -1,15 +0,0 @@ -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.6.2/server-ruby/docs/examples/avatars/get-favicon.md b/app/sdks/0.6.2/server-ruby/docs/examples/avatars/get-favicon.md deleted file mode 100644 index 2ee4e75789..0000000000 --- a/app/sdks/0.6.2/server-ruby/docs/examples/avatars/get-favicon.md +++ /dev/null @@ -1,15 +0,0 @@ -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.6.2/server-ruby/docs/examples/avatars/get-flag.md b/app/sdks/0.6.2/server-ruby/docs/examples/avatars/get-flag.md deleted file mode 100644 index 2e2f01f0f9..0000000000 --- a/app/sdks/0.6.2/server-ruby/docs/examples/avatars/get-flag.md +++ /dev/null @@ -1,15 +0,0 @@ -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.6.2/server-ruby/docs/examples/avatars/get-image.md b/app/sdks/0.6.2/server-ruby/docs/examples/avatars/get-image.md deleted file mode 100644 index 682d6bf9df..0000000000 --- a/app/sdks/0.6.2/server-ruby/docs/examples/avatars/get-image.md +++ /dev/null @@ -1,15 +0,0 @@ -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.6.2/server-ruby/docs/examples/avatars/get-initials.md b/app/sdks/0.6.2/server-ruby/docs/examples/avatars/get-initials.md deleted file mode 100644 index 11878a6da7..0000000000 --- a/app/sdks/0.6.2/server-ruby/docs/examples/avatars/get-initials.md +++ /dev/null @@ -1,15 +0,0 @@ -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_initials(); - -puts response \ No newline at end of file diff --git a/app/sdks/0.6.2/server-ruby/docs/examples/avatars/get-q-r.md b/app/sdks/0.6.2/server-ruby/docs/examples/avatars/get-q-r.md deleted file mode 100644 index f145425ca2..0000000000 --- a/app/sdks/0.6.2/server-ruby/docs/examples/avatars/get-q-r.md +++ /dev/null @@ -1,15 +0,0 @@ -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.6.2/server-ruby/docs/examples/database/create-collection.md b/app/sdks/0.6.2/server-ruby/docs/examples/database/create-collection.md deleted file mode 100644 index 0317ed9f05..0000000000 --- a/app/sdks/0.6.2/server-ruby/docs/examples/database/create-collection.md +++ /dev/null @@ -1,15 +0,0 @@ -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.6.2/server-ruby/docs/examples/database/create-document.md b/app/sdks/0.6.2/server-ruby/docs/examples/database/create-document.md deleted file mode 100644 index 0101c746b4..0000000000 --- a/app/sdks/0.6.2/server-ruby/docs/examples/database/create-document.md +++ /dev/null @@ -1,15 +0,0 @@ -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.6.2/server-ruby/docs/examples/database/delete-collection.md b/app/sdks/0.6.2/server-ruby/docs/examples/database/delete-collection.md deleted file mode 100644 index b91c369da7..0000000000 --- a/app/sdks/0.6.2/server-ruby/docs/examples/database/delete-collection.md +++ /dev/null @@ -1,15 +0,0 @@ -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.6.2/server-ruby/docs/examples/database/delete-document.md b/app/sdks/0.6.2/server-ruby/docs/examples/database/delete-document.md deleted file mode 100644 index 6548ec2946..0000000000 --- a/app/sdks/0.6.2/server-ruby/docs/examples/database/delete-document.md +++ /dev/null @@ -1,15 +0,0 @@ -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.6.2/server-ruby/docs/examples/database/get-collection.md b/app/sdks/0.6.2/server-ruby/docs/examples/database/get-collection.md deleted file mode 100644 index 1e54e94c10..0000000000 --- a/app/sdks/0.6.2/server-ruby/docs/examples/database/get-collection.md +++ /dev/null @@ -1,15 +0,0 @@ -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.6.2/server-ruby/docs/examples/database/get-document.md b/app/sdks/0.6.2/server-ruby/docs/examples/database/get-document.md deleted file mode 100644 index 3040b82c03..0000000000 --- a/app/sdks/0.6.2/server-ruby/docs/examples/database/get-document.md +++ /dev/null @@ -1,15 +0,0 @@ -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.6.2/server-ruby/docs/examples/database/list-collections.md b/app/sdks/0.6.2/server-ruby/docs/examples/database/list-collections.md deleted file mode 100644 index ec15fe3b08..0000000000 --- a/app/sdks/0.6.2/server-ruby/docs/examples/database/list-collections.md +++ /dev/null @@ -1,15 +0,0 @@ -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.6.2/server-ruby/docs/examples/database/list-documents.md b/app/sdks/0.6.2/server-ruby/docs/examples/database/list-documents.md deleted file mode 100644 index fa33f10ccf..0000000000 --- a/app/sdks/0.6.2/server-ruby/docs/examples/database/list-documents.md +++ /dev/null @@ -1,15 +0,0 @@ -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.6.2/server-ruby/docs/examples/database/update-collection.md b/app/sdks/0.6.2/server-ruby/docs/examples/database/update-collection.md deleted file mode 100644 index 3ecfbdb4ab..0000000000 --- a/app/sdks/0.6.2/server-ruby/docs/examples/database/update-collection.md +++ /dev/null @@ -1,15 +0,0 @@ -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.6.2/server-ruby/docs/examples/database/update-document.md b/app/sdks/0.6.2/server-ruby/docs/examples/database/update-document.md deleted file mode 100644 index 492d4f3edc..0000000000 --- a/app/sdks/0.6.2/server-ruby/docs/examples/database/update-document.md +++ /dev/null @@ -1,15 +0,0 @@ -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.6.2/server-ruby/docs/examples/health/get-anti-virus.md b/app/sdks/0.6.2/server-ruby/docs/examples/health/get-anti-virus.md deleted file mode 100644 index 0c83a06cf8..0000000000 --- a/app/sdks/0.6.2/server-ruby/docs/examples/health/get-anti-virus.md +++ /dev/null @@ -1,15 +0,0 @@ -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.6.2/server-ruby/docs/examples/health/get-cache.md b/app/sdks/0.6.2/server-ruby/docs/examples/health/get-cache.md deleted file mode 100644 index 6f51fb6e00..0000000000 --- a/app/sdks/0.6.2/server-ruby/docs/examples/health/get-cache.md +++ /dev/null @@ -1,15 +0,0 @@ -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.6.2/server-ruby/docs/examples/health/get-d-b.md b/app/sdks/0.6.2/server-ruby/docs/examples/health/get-d-b.md deleted file mode 100644 index 4bb00577a7..0000000000 --- a/app/sdks/0.6.2/server-ruby/docs/examples/health/get-d-b.md +++ /dev/null @@ -1,15 +0,0 @@ -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.6.2/server-ruby/docs/examples/health/get-queue-certificates.md b/app/sdks/0.6.2/server-ruby/docs/examples/health/get-queue-certificates.md deleted file mode 100644 index f758b7c3a4..0000000000 --- a/app/sdks/0.6.2/server-ruby/docs/examples/health/get-queue-certificates.md +++ /dev/null @@ -1,15 +0,0 @@ -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.6.2/server-ruby/docs/examples/health/get-queue-functions.md b/app/sdks/0.6.2/server-ruby/docs/examples/health/get-queue-functions.md deleted file mode 100644 index 653607f79d..0000000000 --- a/app/sdks/0.6.2/server-ruby/docs/examples/health/get-queue-functions.md +++ /dev/null @@ -1,15 +0,0 @@ -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.6.2/server-ruby/docs/examples/health/get-queue-logs.md b/app/sdks/0.6.2/server-ruby/docs/examples/health/get-queue-logs.md deleted file mode 100644 index c6751f7f91..0000000000 --- a/app/sdks/0.6.2/server-ruby/docs/examples/health/get-queue-logs.md +++ /dev/null @@ -1,15 +0,0 @@ -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.6.2/server-ruby/docs/examples/health/get-queue-tasks.md b/app/sdks/0.6.2/server-ruby/docs/examples/health/get-queue-tasks.md deleted file mode 100644 index c6da38832e..0000000000 --- a/app/sdks/0.6.2/server-ruby/docs/examples/health/get-queue-tasks.md +++ /dev/null @@ -1,15 +0,0 @@ -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.6.2/server-ruby/docs/examples/health/get-queue-usage.md b/app/sdks/0.6.2/server-ruby/docs/examples/health/get-queue-usage.md deleted file mode 100644 index ed81452d86..0000000000 --- a/app/sdks/0.6.2/server-ruby/docs/examples/health/get-queue-usage.md +++ /dev/null @@ -1,15 +0,0 @@ -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.6.2/server-ruby/docs/examples/health/get-queue-webhooks.md b/app/sdks/0.6.2/server-ruby/docs/examples/health/get-queue-webhooks.md deleted file mode 100644 index 9e55ab1d87..0000000000 --- a/app/sdks/0.6.2/server-ruby/docs/examples/health/get-queue-webhooks.md +++ /dev/null @@ -1,15 +0,0 @@ -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.6.2/server-ruby/docs/examples/health/get-storage-local.md b/app/sdks/0.6.2/server-ruby/docs/examples/health/get-storage-local.md deleted file mode 100644 index 09c47ae437..0000000000 --- a/app/sdks/0.6.2/server-ruby/docs/examples/health/get-storage-local.md +++ /dev/null @@ -1,15 +0,0 @@ -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.6.2/server-ruby/docs/examples/health/get-time.md b/app/sdks/0.6.2/server-ruby/docs/examples/health/get-time.md deleted file mode 100644 index 3d72794e93..0000000000 --- a/app/sdks/0.6.2/server-ruby/docs/examples/health/get-time.md +++ /dev/null @@ -1,15 +0,0 @@ -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.6.2/server-ruby/docs/examples/health/get.md b/app/sdks/0.6.2/server-ruby/docs/examples/health/get.md deleted file mode 100644 index 9496c31b36..0000000000 --- a/app/sdks/0.6.2/server-ruby/docs/examples/health/get.md +++ /dev/null @@ -1,15 +0,0 @@ -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.6.2/server-ruby/docs/examples/locale/get-continents.md b/app/sdks/0.6.2/server-ruby/docs/examples/locale/get-continents.md deleted file mode 100644 index 92f38922e1..0000000000 --- a/app/sdks/0.6.2/server-ruby/docs/examples/locale/get-continents.md +++ /dev/null @@ -1,15 +0,0 @@ -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.6.2/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 deleted file mode 100644 index b83125d4a6..0000000000 --- a/app/sdks/0.6.2/server-ruby/docs/examples/locale/get-countries-e-u.md +++ /dev/null @@ -1,15 +0,0 @@ -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.6.2/server-ruby/docs/examples/locale/get-countries-phones.md b/app/sdks/0.6.2/server-ruby/docs/examples/locale/get-countries-phones.md deleted file mode 100644 index 728a1b3cdc..0000000000 --- a/app/sdks/0.6.2/server-ruby/docs/examples/locale/get-countries-phones.md +++ /dev/null @@ -1,15 +0,0 @@ -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.6.2/server-ruby/docs/examples/locale/get-countries.md b/app/sdks/0.6.2/server-ruby/docs/examples/locale/get-countries.md deleted file mode 100644 index 54975db928..0000000000 --- a/app/sdks/0.6.2/server-ruby/docs/examples/locale/get-countries.md +++ /dev/null @@ -1,15 +0,0 @@ -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.6.2/server-ruby/docs/examples/locale/get-currencies.md b/app/sdks/0.6.2/server-ruby/docs/examples/locale/get-currencies.md deleted file mode 100644 index 4e39b435e1..0000000000 --- a/app/sdks/0.6.2/server-ruby/docs/examples/locale/get-currencies.md +++ /dev/null @@ -1,15 +0,0 @@ -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.6.2/server-ruby/docs/examples/locale/get-languages.md b/app/sdks/0.6.2/server-ruby/docs/examples/locale/get-languages.md deleted file mode 100644 index 64e74eece0..0000000000 --- a/app/sdks/0.6.2/server-ruby/docs/examples/locale/get-languages.md +++ /dev/null @@ -1,15 +0,0 @@ -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_languages(); - -puts response \ No newline at end of file diff --git a/app/sdks/0.6.2/server-ruby/docs/examples/locale/get.md b/app/sdks/0.6.2/server-ruby/docs/examples/locale/get.md deleted file mode 100644 index b390d505c4..0000000000 --- a/app/sdks/0.6.2/server-ruby/docs/examples/locale/get.md +++ /dev/null @@ -1,15 +0,0 @@ -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.6.2/server-ruby/docs/examples/storage/create-file.md b/app/sdks/0.6.2/server-ruby/docs/examples/storage/create-file.md deleted file mode 100644 index b044e35b86..0000000000 --- a/app/sdks/0.6.2/server-ruby/docs/examples/storage/create-file.md +++ /dev/null @@ -1,15 +0,0 @@ -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.6.2/server-ruby/docs/examples/storage/delete-file.md b/app/sdks/0.6.2/server-ruby/docs/examples/storage/delete-file.md deleted file mode 100644 index 1aa67b3537..0000000000 --- a/app/sdks/0.6.2/server-ruby/docs/examples/storage/delete-file.md +++ /dev/null @@ -1,15 +0,0 @@ -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.6.2/server-ruby/docs/examples/storage/get-file-download.md b/app/sdks/0.6.2/server-ruby/docs/examples/storage/get-file-download.md deleted file mode 100644 index 777c565d06..0000000000 --- a/app/sdks/0.6.2/server-ruby/docs/examples/storage/get-file-download.md +++ /dev/null @@ -1,15 +0,0 @@ -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.6.2/server-ruby/docs/examples/storage/get-file-preview.md b/app/sdks/0.6.2/server-ruby/docs/examples/storage/get-file-preview.md deleted file mode 100644 index 48be3a044e..0000000000 --- a/app/sdks/0.6.2/server-ruby/docs/examples/storage/get-file-preview.md +++ /dev/null @@ -1,15 +0,0 @@ -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.6.2/server-ruby/docs/examples/storage/get-file-view.md b/app/sdks/0.6.2/server-ruby/docs/examples/storage/get-file-view.md deleted file mode 100644 index a3dc012098..0000000000 --- a/app/sdks/0.6.2/server-ruby/docs/examples/storage/get-file-view.md +++ /dev/null @@ -1,15 +0,0 @@ -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.6.2/server-ruby/docs/examples/storage/get-file.md b/app/sdks/0.6.2/server-ruby/docs/examples/storage/get-file.md deleted file mode 100644 index 203a4dff7c..0000000000 --- a/app/sdks/0.6.2/server-ruby/docs/examples/storage/get-file.md +++ /dev/null @@ -1,15 +0,0 @@ -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.6.2/server-ruby/docs/examples/storage/list-files.md b/app/sdks/0.6.2/server-ruby/docs/examples/storage/list-files.md deleted file mode 100644 index a148da78f9..0000000000 --- a/app/sdks/0.6.2/server-ruby/docs/examples/storage/list-files.md +++ /dev/null @@ -1,15 +0,0 @@ -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.6.2/server-ruby/docs/examples/storage/update-file.md b/app/sdks/0.6.2/server-ruby/docs/examples/storage/update-file.md deleted file mode 100644 index 36d5049816..0000000000 --- a/app/sdks/0.6.2/server-ruby/docs/examples/storage/update-file.md +++ /dev/null @@ -1,15 +0,0 @@ -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.6.2/server-ruby/docs/examples/teams/create-membership.md b/app/sdks/0.6.2/server-ruby/docs/examples/teams/create-membership.md deleted file mode 100644 index fc0a249361..0000000000 --- a/app/sdks/0.6.2/server-ruby/docs/examples/teams/create-membership.md +++ /dev/null @@ -1,15 +0,0 @@ -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.6.2/server-ruby/docs/examples/teams/create.md b/app/sdks/0.6.2/server-ruby/docs/examples/teams/create.md deleted file mode 100644 index d7f9c2f8c0..0000000000 --- a/app/sdks/0.6.2/server-ruby/docs/examples/teams/create.md +++ /dev/null @@ -1,15 +0,0 @@ -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.6.2/server-ruby/docs/examples/teams/delete-membership.md b/app/sdks/0.6.2/server-ruby/docs/examples/teams/delete-membership.md deleted file mode 100644 index 545cacc51f..0000000000 --- a/app/sdks/0.6.2/server-ruby/docs/examples/teams/delete-membership.md +++ /dev/null @@ -1,15 +0,0 @@ -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.6.2/server-ruby/docs/examples/teams/delete.md b/app/sdks/0.6.2/server-ruby/docs/examples/teams/delete.md deleted file mode 100644 index d28907f741..0000000000 --- a/app/sdks/0.6.2/server-ruby/docs/examples/teams/delete.md +++ /dev/null @@ -1,15 +0,0 @@ -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.6.2/server-ruby/docs/examples/teams/get-memberships.md b/app/sdks/0.6.2/server-ruby/docs/examples/teams/get-memberships.md deleted file mode 100644 index 013d952afc..0000000000 --- a/app/sdks/0.6.2/server-ruby/docs/examples/teams/get-memberships.md +++ /dev/null @@ -1,15 +0,0 @@ -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.6.2/server-ruby/docs/examples/teams/get.md b/app/sdks/0.6.2/server-ruby/docs/examples/teams/get.md deleted file mode 100644 index 1dd4918a12..0000000000 --- a/app/sdks/0.6.2/server-ruby/docs/examples/teams/get.md +++ /dev/null @@ -1,15 +0,0 @@ -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.6.2/server-ruby/docs/examples/teams/list.md b/app/sdks/0.6.2/server-ruby/docs/examples/teams/list.md deleted file mode 100644 index c0cd72a362..0000000000 --- a/app/sdks/0.6.2/server-ruby/docs/examples/teams/list.md +++ /dev/null @@ -1,15 +0,0 @@ -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.6.2/server-ruby/docs/examples/teams/update.md b/app/sdks/0.6.2/server-ruby/docs/examples/teams/update.md deleted file mode 100644 index b7e87a8e09..0000000000 --- a/app/sdks/0.6.2/server-ruby/docs/examples/teams/update.md +++ /dev/null @@ -1,15 +0,0 @@ -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.6.2/server-ruby/docs/examples/users/create.md b/app/sdks/0.6.2/server-ruby/docs/examples/users/create.md deleted file mode 100644 index 0a152ac366..0000000000 --- a/app/sdks/0.6.2/server-ruby/docs/examples/users/create.md +++ /dev/null @@ -1,15 +0,0 @@ -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.6.2/server-ruby/docs/examples/users/delete-session.md b/app/sdks/0.6.2/server-ruby/docs/examples/users/delete-session.md deleted file mode 100644 index 149c7d9293..0000000000 --- a/app/sdks/0.6.2/server-ruby/docs/examples/users/delete-session.md +++ /dev/null @@ -1,15 +0,0 @@ -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.6.2/server-ruby/docs/examples/users/delete-sessions.md b/app/sdks/0.6.2/server-ruby/docs/examples/users/delete-sessions.md deleted file mode 100644 index 3f02e08dd1..0000000000 --- a/app/sdks/0.6.2/server-ruby/docs/examples/users/delete-sessions.md +++ /dev/null @@ -1,15 +0,0 @@ -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.6.2/server-ruby/docs/examples/users/get-logs.md b/app/sdks/0.6.2/server-ruby/docs/examples/users/get-logs.md deleted file mode 100644 index 695a77ad27..0000000000 --- a/app/sdks/0.6.2/server-ruby/docs/examples/users/get-logs.md +++ /dev/null @@ -1,15 +0,0 @@ -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.6.2/server-ruby/docs/examples/users/get-prefs.md b/app/sdks/0.6.2/server-ruby/docs/examples/users/get-prefs.md deleted file mode 100644 index 4a0761e283..0000000000 --- a/app/sdks/0.6.2/server-ruby/docs/examples/users/get-prefs.md +++ /dev/null @@ -1,15 +0,0 @@ -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.6.2/server-ruby/docs/examples/users/get-sessions.md b/app/sdks/0.6.2/server-ruby/docs/examples/users/get-sessions.md deleted file mode 100644 index 52f37a4609..0000000000 --- a/app/sdks/0.6.2/server-ruby/docs/examples/users/get-sessions.md +++ /dev/null @@ -1,15 +0,0 @@ -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.6.2/server-ruby/docs/examples/users/get.md b/app/sdks/0.6.2/server-ruby/docs/examples/users/get.md deleted file mode 100644 index 562ac958c3..0000000000 --- a/app/sdks/0.6.2/server-ruby/docs/examples/users/get.md +++ /dev/null @@ -1,15 +0,0 @@ -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.6.2/server-ruby/docs/examples/users/list.md b/app/sdks/0.6.2/server-ruby/docs/examples/users/list.md deleted file mode 100644 index 096ce859e3..0000000000 --- a/app/sdks/0.6.2/server-ruby/docs/examples/users/list.md +++ /dev/null @@ -1,15 +0,0 @@ -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.6.2/server-ruby/docs/examples/users/update-prefs.md b/app/sdks/0.6.2/server-ruby/docs/examples/users/update-prefs.md deleted file mode 100644 index 2bb2d42e16..0000000000 --- a/app/sdks/0.6.2/server-ruby/docs/examples/users/update-prefs.md +++ /dev/null @@ -1,15 +0,0 @@ -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.6.2/server-ruby/docs/examples/users/update-status.md b/app/sdks/0.6.2/server-ruby/docs/examples/users/update-status.md deleted file mode 100644 index 088ee380d8..0000000000 --- a/app/sdks/0.6.2/server-ruby/docs/examples/users/update-status.md +++ /dev/null @@ -1,15 +0,0 @@ -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.6.2/server-ruby/lib/appwrite.rb b/app/sdks/0.6.2/server-ruby/lib/appwrite.rb deleted file mode 100644 index 8e88842789..0000000000 --- a/app/sdks/0.6.2/server-ruby/lib/appwrite.rb +++ /dev/null @@ -1,12 +0,0 @@ -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/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.6.2/server-ruby/lib/appwrite/client.rb b/app/sdks/0.6.2/server-ruby/lib/appwrite/client.rb deleted file mode 100644 index 2cd09d52fe..0000000000 --- a/app/sdks/0.6.2/server-ruby/lib/appwrite/client.rb +++ /dev/null @@ -1,116 +0,0 @@ -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.6.2/server-ruby/lib/appwrite/service.rb b/app/sdks/0.6.2/server-ruby/lib/appwrite/service.rb deleted file mode 100644 index 0d954c6d17..0000000000 --- a/app/sdks/0.6.2/server-ruby/lib/appwrite/service.rb +++ /dev/null @@ -1,12 +0,0 @@ -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.6.2/server-ruby/lib/appwrite/services/avatars.rb b/app/sdks/0.6.2/server-ruby/lib/appwrite/services/avatars.rb deleted file mode 100644 index afc94c20c3..0000000000 --- a/app/sdks/0.6.2/server-ruby/lib/appwrite/services/avatars.rb +++ /dev/null @@ -1,111 +0,0 @@ -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_initials(name: '', width: 500, height: 500, color: '', background: '') - path = '/avatars/initials' - - params = { - 'name': name, - 'width': width, - 'height': height, - 'color': color, - 'background': background - } - - return @client.call('get', path, { - 'content-type' => 'application/json', - }, params); - end - - def get_q_r(text:, size: 400, margin: 1, download: false) - 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.6.2/server-ruby/lib/appwrite/services/database.rb b/app/sdks/0.6.2/server-ruby/lib/appwrite/services/database.rb deleted file mode 100644 index cf8e048953..0000000000 --- a/app/sdks/0.6.2/server-ruby/lib/appwrite/services/database.rb +++ /dev/null @@ -1,158 +0,0 @@ -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: '') - 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 - } - - 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 - - - protected - - private - end -end \ No newline at end of file diff --git a/app/sdks/0.6.2/server-ruby/lib/appwrite/services/health.rb b/app/sdks/0.6.2/server-ruby/lib/appwrite/services/health.rb deleted file mode 100644 index d2c6bc7b60..0000000000 --- a/app/sdks/0.6.2/server-ruby/lib/appwrite/services/health.rb +++ /dev/null @@ -1,141 +0,0 @@ -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.6.2/server-ruby/lib/appwrite/services/locale.rb b/app/sdks/0.6.2/server-ruby/lib/appwrite/services/locale.rb deleted file mode 100644 index e71756b2a7..0000000000 --- a/app/sdks/0.6.2/server-ruby/lib/appwrite/services/locale.rb +++ /dev/null @@ -1,86 +0,0 @@ -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 - - def get_languages() - path = '/locale/languages' - - 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.6.2/server-ruby/lib/appwrite/services/storage.rb b/app/sdks/0.6.2/server-ruby/lib/appwrite/services/storage.rb deleted file mode 100644 index 0e99a2b0d5..0000000000 --- a/app/sdks/0.6.2/server-ruby/lib/appwrite/services/storage.rb +++ /dev/null @@ -1,118 +0,0 @@ -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.6.2/server-ruby/lib/appwrite/services/teams.rb b/app/sdks/0.6.2/server-ruby/lib/appwrite/services/teams.rb deleted file mode 100644 index 0480a4507e..0000000000 --- a/app/sdks/0.6.2/server-ruby/lib/appwrite/services/teams.rb +++ /dev/null @@ -1,119 +0,0 @@ -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:, search: '', limit: 25, offset: 0, order_type: 'ASC') - path = '/teams/{teamId}/memberships' - .gsub('{teamId}', team_id) - - params = { - 'search': search, - 'limit': limit, - 'offset': offset, - 'orderType': order_type - } - - 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.6.2/server-ruby/lib/appwrite/services/users.rb b/app/sdks/0.6.2/server-ruby/lib/appwrite/services/users.rb deleted file mode 100644 index f75434bd1a..0000000000 --- a/app/sdks/0.6.2/server-ruby/lib/appwrite/services/users.rb +++ /dev/null @@ -1,137 +0,0 @@ -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 diff --git a/app/sdks/0.7.0/client-flutter/CHANGELOG.md b/app/sdks/0.7.0/client-flutter/CHANGELOG.md deleted file mode 100644 index a584ad8b9a..0000000000 --- a/app/sdks/0.7.0/client-flutter/CHANGELOG.md +++ /dev/null @@ -1,60 +0,0 @@ -## 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 deleted file mode 100644 index fc7c051a91..0000000000 --- a/app/sdks/0.7.0/client-flutter/LICENSE +++ /dev/null @@ -1,12 +0,0 @@ -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 deleted file mode 100644 index 6477acebf6..0000000000 --- a/app/sdks/0.7.0/client-flutter/README.md +++ /dev/null @@ -1,38 +0,0 @@ -# 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.7.0-blue.svg?v=1) - -**This SDK is compatible with Appwrite server version 0.7.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 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 deleted file mode 100644 index 0e26dd27af..0000000000 --- a/app/sdks/0.7.0/client-flutter/docs/examples/account/create-o-auth2session.md +++ /dev/null @@ -1,22 +0,0 @@ -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 deleted file mode 100644 index 50db45b15d..0000000000 --- a/app/sdks/0.7.0/client-flutter/docs/examples/account/create-recovery.md +++ /dev/null @@ -1,23 +0,0 @@ -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 deleted file mode 100644 index ef824b4eca..0000000000 --- a/app/sdks/0.7.0/client-flutter/docs/examples/account/create-session.md +++ /dev/null @@ -1,23 +0,0 @@ -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 deleted file mode 100644 index 6b9b1ace40..0000000000 --- a/app/sdks/0.7.0/client-flutter/docs/examples/account/create-verification.md +++ /dev/null @@ -1,22 +0,0 @@ -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 deleted file mode 100644 index 384258ae68..0000000000 --- a/app/sdks/0.7.0/client-flutter/docs/examples/account/create.md +++ /dev/null @@ -1,23 +0,0 @@ -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 deleted file mode 100644 index 80a3f505d0..0000000000 --- a/app/sdks/0.7.0/client-flutter/docs/examples/account/delete-session.md +++ /dev/null @@ -1,22 +0,0 @@ -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 deleted file mode 100644 index 74e494db25..0000000000 --- a/app/sdks/0.7.0/client-flutter/docs/examples/account/delete-sessions.md +++ /dev/null @@ -1,20 +0,0 @@ -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 deleted file mode 100644 index 2d9d302af0..0000000000 --- a/app/sdks/0.7.0/client-flutter/docs/examples/account/delete.md +++ /dev/null @@ -1,20 +0,0 @@ -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 deleted file mode 100644 index 4240e55eec..0000000000 --- a/app/sdks/0.7.0/client-flutter/docs/examples/account/get-logs.md +++ /dev/null @@ -1,20 +0,0 @@ -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 deleted file mode 100644 index d98dcd7290..0000000000 --- a/app/sdks/0.7.0/client-flutter/docs/examples/account/get-prefs.md +++ /dev/null @@ -1,20 +0,0 @@ -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 deleted file mode 100644 index b5ecd34e45..0000000000 --- a/app/sdks/0.7.0/client-flutter/docs/examples/account/get-sessions.md +++ /dev/null @@ -1,20 +0,0 @@ -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 deleted file mode 100644 index a77fbf3ad5..0000000000 --- a/app/sdks/0.7.0/client-flutter/docs/examples/account/get.md +++ /dev/null @@ -1,20 +0,0 @@ -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 deleted file mode 100644 index 4a1a002db4..0000000000 --- a/app/sdks/0.7.0/client-flutter/docs/examples/account/update-email.md +++ /dev/null @@ -1,23 +0,0 @@ -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 deleted file mode 100644 index fa432bb34a..0000000000 --- a/app/sdks/0.7.0/client-flutter/docs/examples/account/update-name.md +++ /dev/null @@ -1,22 +0,0 @@ -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 deleted file mode 100644 index 9bd8ad9b77..0000000000 --- a/app/sdks/0.7.0/client-flutter/docs/examples/account/update-password.md +++ /dev/null @@ -1,23 +0,0 @@ -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 deleted file mode 100644 index 443252f89a..0000000000 --- a/app/sdks/0.7.0/client-flutter/docs/examples/account/update-prefs.md +++ /dev/null @@ -1,22 +0,0 @@ -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 deleted file mode 100644 index 5140235d49..0000000000 --- a/app/sdks/0.7.0/client-flutter/docs/examples/account/update-recovery.md +++ /dev/null @@ -1,25 +0,0 @@ -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 deleted file mode 100644 index b795cde92d..0000000000 --- a/app/sdks/0.7.0/client-flutter/docs/examples/account/update-verification.md +++ /dev/null @@ -1,23 +0,0 @@ -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 deleted file mode 100644 index 464767c4c0..0000000000 --- a/app/sdks/0.7.0/client-flutter/docs/examples/avatars/get-browser.md +++ /dev/null @@ -1,17 +0,0 @@ -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 deleted file mode 100644 index 482c642402..0000000000 --- a/app/sdks/0.7.0/client-flutter/docs/examples/avatars/get-credit-card.md +++ /dev/null @@ -1,17 +0,0 @@ -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 deleted file mode 100644 index 60397b0af2..0000000000 --- a/app/sdks/0.7.0/client-flutter/docs/examples/avatars/get-favicon.md +++ /dev/null @@ -1,17 +0,0 @@ -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 deleted file mode 100644 index a9f7a711d9..0000000000 --- a/app/sdks/0.7.0/client-flutter/docs/examples/avatars/get-flag.md +++ /dev/null @@ -1,17 +0,0 @@ -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 deleted file mode 100644 index 7cead1cb2f..0000000000 --- a/app/sdks/0.7.0/client-flutter/docs/examples/avatars/get-image.md +++ /dev/null @@ -1,17 +0,0 @@ -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 deleted file mode 100644 index b2e70788d6..0000000000 --- a/app/sdks/0.7.0/client-flutter/docs/examples/avatars/get-initials.md +++ /dev/null @@ -1,16 +0,0 @@ -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 deleted file mode 100644 index a5bcfd2c05..0000000000 --- a/app/sdks/0.7.0/client-flutter/docs/examples/avatars/get-q-r.md +++ /dev/null @@ -1,17 +0,0 @@ -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 deleted file mode 100644 index b7d540bc2d..0000000000 --- a/app/sdks/0.7.0/client-flutter/docs/examples/database/create-document.md +++ /dev/null @@ -1,25 +0,0 @@ -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 deleted file mode 100644 index 40c1cbdfe2..0000000000 --- a/app/sdks/0.7.0/client-flutter/docs/examples/database/delete-document.md +++ /dev/null @@ -1,23 +0,0 @@ -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 deleted file mode 100644 index 0c98142315..0000000000 --- a/app/sdks/0.7.0/client-flutter/docs/examples/database/get-document.md +++ /dev/null @@ -1,23 +0,0 @@ -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 deleted file mode 100644 index 0685e7f1aa..0000000000 --- a/app/sdks/0.7.0/client-flutter/docs/examples/database/list-documents.md +++ /dev/null @@ -1,22 +0,0 @@ -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 deleted file mode 100644 index 2f37cd767a..0000000000 --- a/app/sdks/0.7.0/client-flutter/docs/examples/database/update-document.md +++ /dev/null @@ -1,26 +0,0 @@ -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 deleted file mode 100644 index 60d4f32c4f..0000000000 --- a/app/sdks/0.7.0/client-flutter/docs/examples/locale/get-continents.md +++ /dev/null @@ -1,20 +0,0 @@ -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 deleted file mode 100644 index 766006fecc..0000000000 --- a/app/sdks/0.7.0/client-flutter/docs/examples/locale/get-countries-e-u.md +++ /dev/null @@ -1,20 +0,0 @@ -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 deleted file mode 100644 index 786eeb0b70..0000000000 --- a/app/sdks/0.7.0/client-flutter/docs/examples/locale/get-countries-phones.md +++ /dev/null @@ -1,20 +0,0 @@ -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 deleted file mode 100644 index 0570421ef9..0000000000 --- a/app/sdks/0.7.0/client-flutter/docs/examples/locale/get-countries.md +++ /dev/null @@ -1,20 +0,0 @@ -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 deleted file mode 100644 index 7846c3c710..0000000000 --- a/app/sdks/0.7.0/client-flutter/docs/examples/locale/get-currencies.md +++ /dev/null @@ -1,20 +0,0 @@ -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 deleted file mode 100644 index 4f526383fa..0000000000 --- a/app/sdks/0.7.0/client-flutter/docs/examples/locale/get-languages.md +++ /dev/null @@ -1,20 +0,0 @@ -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 deleted file mode 100644 index 2dbdd47f63..0000000000 --- a/app/sdks/0.7.0/client-flutter/docs/examples/locale/get.md +++ /dev/null @@ -1,20 +0,0 @@ -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 deleted file mode 100644 index 9f61be12f4..0000000000 --- a/app/sdks/0.7.0/client-flutter/docs/examples/storage/create-file.md +++ /dev/null @@ -1,25 +0,0 @@ -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 deleted file mode 100644 index 271ed7b2dd..0000000000 --- a/app/sdks/0.7.0/client-flutter/docs/examples/storage/delete-file.md +++ /dev/null @@ -1,22 +0,0 @@ -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 deleted file mode 100644 index be3385a61b..0000000000 --- a/app/sdks/0.7.0/client-flutter/docs/examples/storage/get-file-download.md +++ /dev/null @@ -1,17 +0,0 @@ -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 deleted file mode 100644 index 8bd1a47457..0000000000 --- a/app/sdks/0.7.0/client-flutter/docs/examples/storage/get-file-preview.md +++ /dev/null @@ -1,17 +0,0 @@ -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 deleted file mode 100644 index 5803fd409f..0000000000 --- a/app/sdks/0.7.0/client-flutter/docs/examples/storage/get-file-view.md +++ /dev/null @@ -1,17 +0,0 @@ -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 deleted file mode 100644 index feca667fa9..0000000000 --- a/app/sdks/0.7.0/client-flutter/docs/examples/storage/get-file.md +++ /dev/null @@ -1,22 +0,0 @@ -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 deleted file mode 100644 index 1963ec694d..0000000000 --- a/app/sdks/0.7.0/client-flutter/docs/examples/storage/list-files.md +++ /dev/null @@ -1,21 +0,0 @@ -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 deleted file mode 100644 index a5ecbfe987..0000000000 --- a/app/sdks/0.7.0/client-flutter/docs/examples/storage/update-file.md +++ /dev/null @@ -1,24 +0,0 @@ -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 deleted file mode 100644 index e5e82de7b4..0000000000 --- a/app/sdks/0.7.0/client-flutter/docs/examples/teams/create-membership.md +++ /dev/null @@ -1,25 +0,0 @@ -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 deleted file mode 100644 index d11958ae6d..0000000000 --- a/app/sdks/0.7.0/client-flutter/docs/examples/teams/create.md +++ /dev/null @@ -1,22 +0,0 @@ -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 deleted file mode 100644 index 3f57b840fe..0000000000 --- a/app/sdks/0.7.0/client-flutter/docs/examples/teams/delete-membership.md +++ /dev/null @@ -1,23 +0,0 @@ -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 deleted file mode 100644 index 9fb488afec..0000000000 --- a/app/sdks/0.7.0/client-flutter/docs/examples/teams/delete.md +++ /dev/null @@ -1,22 +0,0 @@ -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 deleted file mode 100644 index 4edadfa2b4..0000000000 --- a/app/sdks/0.7.0/client-flutter/docs/examples/teams/get-memberships.md +++ /dev/null @@ -1,22 +0,0 @@ -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 deleted file mode 100644 index 083565f7a6..0000000000 --- a/app/sdks/0.7.0/client-flutter/docs/examples/teams/get.md +++ /dev/null @@ -1,22 +0,0 @@ -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 deleted file mode 100644 index 665020e928..0000000000 --- a/app/sdks/0.7.0/client-flutter/docs/examples/teams/list.md +++ /dev/null @@ -1,21 +0,0 @@ -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 deleted file mode 100644 index 616f64e148..0000000000 --- a/app/sdks/0.7.0/client-flutter/docs/examples/teams/update-membership-status.md +++ /dev/null @@ -1,25 +0,0 @@ -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 deleted file mode 100644 index 915fb57d38..0000000000 --- a/app/sdks/0.7.0/client-flutter/docs/examples/teams/update.md +++ /dev/null @@ -1,23 +0,0 @@ -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 deleted file mode 100644 index f6768a5f85..0000000000 --- a/app/sdks/0.7.0/client-flutter/example/README.md +++ /dev/null @@ -1,55 +0,0 @@ -# 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 deleted file mode 100644 index 95d0b72cfe..0000000000 --- a/app/sdks/0.7.0/client-flutter/lib/appwrite.dart +++ /dev/null @@ -1,10 +0,0 @@ -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 deleted file mode 100644 index 96fbf60780..0000000000 --- a/app/sdks/0.7.0/client-flutter/lib/client.dart +++ /dev/null @@ -1,144 +0,0 @@ -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)); - if(Platform.isAndroid || Platform.isIOS) { - PackageInfo packageInfo = await PackageInfo.fromPlatform(); - addHeader('Origin', 'appwrite-' + type + '://' + packageInfo.packageName); - } else if(Platform.isLinux) { - addHeader('Origin', 'appwrite-linux://'); - } else if(Platform.isMacOS) { - addHeader('Origin', 'appwrite-macos://'); - } else if(Platform.isWindows) { - addHeader('Origin', 'appwrite-windows://'); - } else if(Platform.isFuchsia) { - addHeader('Origin', 'appwrite-fuchsia://'); - } - }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 deleted file mode 100644 index 2757f6073e..0000000000 --- a/app/sdks/0.7.0/client-flutter/lib/enums.dart +++ /dev/null @@ -1,15 +0,0 @@ -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 deleted file mode 100644 index 1ae319b705..0000000000 --- a/app/sdks/0.7.0/client-flutter/lib/service.dart +++ /dev/null @@ -1,7 +0,0 @@ -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 deleted file mode 100644 index 48a3dc0309..0000000000 --- a/app/sdks/0.7.0/client-flutter/lib/services/account.dart +++ /dev/null @@ -1,435 +0,0 @@ - -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 the new user to login - /// to their 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 their 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 their account using the OAuth2 provider of their - /// choice. Each OAuth2 provider should be enabled from the Appwrite console - /// first. Use the success and failure arguments to provide a redirect URL's - /// back to your app when login is completed. - /// - 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 their - /// account sessions across all of their 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#updateVerification). - /// - /// 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 deleted file mode 100644 index 89caef576c..0000000000 --- a/app/sdks/0.7.0/client-flutter/lib/services/avatars.dart +++ /dev/null @@ -1,239 +0,0 @@ - - -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 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 deleted file mode 100644 index c45afe661f..0000000000 --- a/app/sdks/0.7.0/client-flutter/lib/services/database.dart +++ /dev/null @@ -1,119 +0,0 @@ - - -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 limit = 25, int offset = 0, String orderField = '', 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, - 'limit': limit, - 'offset': offset, - '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, its 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 deleted file mode 100644 index 095af4792c..0000000000 --- a/app/sdks/0.7.0/client-flutter/lib/services/locale.dart +++ /dev/null @@ -1,143 +0,0 @@ - - -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 deleted file mode 100644 index 51f9345050..0000000000 --- a/app/sdks/0.7.0/client-flutter/lib/services/storage.dart +++ /dev/null @@ -1,203 +0,0 @@ - - -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 deleted file mode 100644 index 050aeaf06d..0000000000 --- a/app/sdks/0.7.0/client-flutter/lib/services/teams.dart +++ /dev/null @@ -1,207 +0,0 @@ - - -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 it is not accepted. - /// - 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 being redirected back to your app from the invitation email recieved - /// by the user. - /// - 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 deleted file mode 100644 index cabc271c5e..0000000000 --- a/app/sdks/0.7.0/client-flutter/pubspec.yaml +++ /dev/null @@ -1,24 +0,0 @@ -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-web/CHANGELOG.md b/app/sdks/0.7.0/client-web/CHANGELOG.md deleted file mode 100644 index fa4d35e687..0000000000 --- a/app/sdks/0.7.0/client-web/CHANGELOG.md +++ /dev/null @@ -1 +0,0 @@ -# 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 deleted file mode 100644 index fc7c051a91..0000000000 --- a/app/sdks/0.7.0/client-web/LICENSE +++ /dev/null @@ -1,12 +0,0 @@ -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 deleted file mode 100644 index 5cec3831b0..0000000000 --- a/app/sdks/0.7.0/client-web/README.md +++ /dev/null @@ -1,59 +0,0 @@ -# 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 - -``` - -## Getting Started - -Initialise the Appwrite SDK in your code, and setup your API credentials: - -```js - -// Init your Web SDK -var appwrite = new Appwrite(); - -appwrite - .setEndpoint('http://localhost/v1') // Set only when using self-hosted solution - .setProject('455x34dfkj') // Your Appwrite Project UID -; - -``` - - -## 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 deleted file mode 100644 index 25b02e632e..0000000000 --- a/app/sdks/0.7.0/client-web/docs/examples/account/create-o-auth2session.md +++ /dev/null @@ -1,10 +0,0 @@ -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 deleted file mode 100644 index 72130f4de4..0000000000 --- a/app/sdks/0.7.0/client-web/docs/examples/account/create-recovery.md +++ /dev/null @@ -1,14 +0,0 @@ -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 deleted file mode 100644 index 4a7682c13d..0000000000 --- a/app/sdks/0.7.0/client-web/docs/examples/account/create-session.md +++ /dev/null @@ -1,14 +0,0 @@ -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 deleted file mode 100644 index 7903384a9f..0000000000 --- a/app/sdks/0.7.0/client-web/docs/examples/account/create-verification.md +++ /dev/null @@ -1,14 +0,0 @@ -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 deleted file mode 100644 index c9ce798b6a..0000000000 --- a/app/sdks/0.7.0/client-web/docs/examples/account/create.md +++ /dev/null @@ -1,14 +0,0 @@ -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 deleted file mode 100644 index 581e5d132d..0000000000 --- a/app/sdks/0.7.0/client-web/docs/examples/account/delete-session.md +++ /dev/null @@ -1,14 +0,0 @@ -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 deleted file mode 100644 index d037673eb3..0000000000 --- a/app/sdks/0.7.0/client-web/docs/examples/account/delete-sessions.md +++ /dev/null @@ -1,14 +0,0 @@ -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 deleted file mode 100644 index d952d77d7a..0000000000 --- a/app/sdks/0.7.0/client-web/docs/examples/account/delete.md +++ /dev/null @@ -1,14 +0,0 @@ -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 deleted file mode 100644 index c53e0446e9..0000000000 --- a/app/sdks/0.7.0/client-web/docs/examples/account/get-logs.md +++ /dev/null @@ -1,14 +0,0 @@ -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 deleted file mode 100644 index 75835e37fb..0000000000 --- a/app/sdks/0.7.0/client-web/docs/examples/account/get-prefs.md +++ /dev/null @@ -1,14 +0,0 @@ -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 deleted file mode 100644 index b4434de336..0000000000 --- a/app/sdks/0.7.0/client-web/docs/examples/account/get-sessions.md +++ /dev/null @@ -1,14 +0,0 @@ -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 deleted file mode 100644 index f0184a8513..0000000000 --- a/app/sdks/0.7.0/client-web/docs/examples/account/get.md +++ /dev/null @@ -1,14 +0,0 @@ -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 deleted file mode 100644 index f48fed78bc..0000000000 --- a/app/sdks/0.7.0/client-web/docs/examples/account/update-email.md +++ /dev/null @@ -1,14 +0,0 @@ -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 deleted file mode 100644 index e03e72c4b2..0000000000 --- a/app/sdks/0.7.0/client-web/docs/examples/account/update-name.md +++ /dev/null @@ -1,14 +0,0 @@ -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 deleted file mode 100644 index 22539f3f64..0000000000 --- a/app/sdks/0.7.0/client-web/docs/examples/account/update-password.md +++ /dev/null @@ -1,14 +0,0 @@ -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 deleted file mode 100644 index b2d4ff175e..0000000000 --- a/app/sdks/0.7.0/client-web/docs/examples/account/update-prefs.md +++ /dev/null @@ -1,14 +0,0 @@ -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 deleted file mode 100644 index 33cf1b63c9..0000000000 --- a/app/sdks/0.7.0/client-web/docs/examples/account/update-recovery.md +++ /dev/null @@ -1,14 +0,0 @@ -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 deleted file mode 100644 index a80e125e30..0000000000 --- a/app/sdks/0.7.0/client-web/docs/examples/account/update-verification.md +++ /dev/null @@ -1,14 +0,0 @@ -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 deleted file mode 100644 index 0855209f58..0000000000 --- a/app/sdks/0.7.0/client-web/docs/examples/avatars/get-browser.md +++ /dev/null @@ -1,10 +0,0 @@ -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 deleted file mode 100644 index 1aa595bd65..0000000000 --- a/app/sdks/0.7.0/client-web/docs/examples/avatars/get-credit-card.md +++ /dev/null @@ -1,10 +0,0 @@ -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 deleted file mode 100644 index a945e50bb2..0000000000 --- a/app/sdks/0.7.0/client-web/docs/examples/avatars/get-favicon.md +++ /dev/null @@ -1,10 +0,0 @@ -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 deleted file mode 100644 index 222b388afc..0000000000 --- a/app/sdks/0.7.0/client-web/docs/examples/avatars/get-flag.md +++ /dev/null @@ -1,10 +0,0 @@ -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 deleted file mode 100644 index 3f15981c71..0000000000 --- a/app/sdks/0.7.0/client-web/docs/examples/avatars/get-image.md +++ /dev/null @@ -1,10 +0,0 @@ -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 deleted file mode 100644 index ef04988e2d..0000000000 --- a/app/sdks/0.7.0/client-web/docs/examples/avatars/get-initials.md +++ /dev/null @@ -1,10 +0,0 @@ -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 deleted file mode 100644 index 9d9ee3fea2..0000000000 --- a/app/sdks/0.7.0/client-web/docs/examples/avatars/get-q-r.md +++ /dev/null @@ -1,10 +0,0 @@ -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 deleted file mode 100644 index e04f73f73e..0000000000 --- a/app/sdks/0.7.0/client-web/docs/examples/database/create-document.md +++ /dev/null @@ -1,14 +0,0 @@ -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 deleted file mode 100644 index 79799b6907..0000000000 --- a/app/sdks/0.7.0/client-web/docs/examples/database/delete-document.md +++ /dev/null @@ -1,14 +0,0 @@ -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 deleted file mode 100644 index b9605dccc6..0000000000 --- a/app/sdks/0.7.0/client-web/docs/examples/database/get-document.md +++ /dev/null @@ -1,14 +0,0 @@ -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 deleted file mode 100644 index 14f8a423a1..0000000000 --- a/app/sdks/0.7.0/client-web/docs/examples/database/list-documents.md +++ /dev/null @@ -1,14 +0,0 @@ -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 deleted file mode 100644 index 9104b77a71..0000000000 --- a/app/sdks/0.7.0/client-web/docs/examples/database/update-document.md +++ /dev/null @@ -1,14 +0,0 @@ -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 deleted file mode 100644 index 1dfdf8013b..0000000000 --- a/app/sdks/0.7.0/client-web/docs/examples/locale/get-continents.md +++ /dev/null @@ -1,14 +0,0 @@ -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 deleted file mode 100644 index 6b3f210a1e..0000000000 --- a/app/sdks/0.7.0/client-web/docs/examples/locale/get-countries-e-u.md +++ /dev/null @@ -1,14 +0,0 @@ -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 deleted file mode 100644 index f35e2152e4..0000000000 --- a/app/sdks/0.7.0/client-web/docs/examples/locale/get-countries-phones.md +++ /dev/null @@ -1,14 +0,0 @@ -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 deleted file mode 100644 index 53b96375a1..0000000000 --- a/app/sdks/0.7.0/client-web/docs/examples/locale/get-countries.md +++ /dev/null @@ -1,14 +0,0 @@ -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 deleted file mode 100644 index 57db66401f..0000000000 --- a/app/sdks/0.7.0/client-web/docs/examples/locale/get-currencies.md +++ /dev/null @@ -1,14 +0,0 @@ -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 deleted file mode 100644 index 04e3063ee7..0000000000 --- a/app/sdks/0.7.0/client-web/docs/examples/locale/get-languages.md +++ /dev/null @@ -1,14 +0,0 @@ -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 deleted file mode 100644 index 469a046dbc..0000000000 --- a/app/sdks/0.7.0/client-web/docs/examples/locale/get.md +++ /dev/null @@ -1,14 +0,0 @@ -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 deleted file mode 100644 index b23c47027a..0000000000 --- a/app/sdks/0.7.0/client-web/docs/examples/storage/create-file.md +++ /dev/null @@ -1,14 +0,0 @@ -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 deleted file mode 100644 index c38ab4ba9c..0000000000 --- a/app/sdks/0.7.0/client-web/docs/examples/storage/delete-file.md +++ /dev/null @@ -1,14 +0,0 @@ -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 deleted file mode 100644 index 1323b8b8df..0000000000 --- a/app/sdks/0.7.0/client-web/docs/examples/storage/get-file-download.md +++ /dev/null @@ -1,10 +0,0 @@ -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 deleted file mode 100644 index 5ede9fdb93..0000000000 --- a/app/sdks/0.7.0/client-web/docs/examples/storage/get-file-preview.md +++ /dev/null @@ -1,10 +0,0 @@ -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 deleted file mode 100644 index 53877ae352..0000000000 --- a/app/sdks/0.7.0/client-web/docs/examples/storage/get-file-view.md +++ /dev/null @@ -1,10 +0,0 @@ -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 deleted file mode 100644 index a1f94c08a6..0000000000 --- a/app/sdks/0.7.0/client-web/docs/examples/storage/get-file.md +++ /dev/null @@ -1,14 +0,0 @@ -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 deleted file mode 100644 index c489a0b46d..0000000000 --- a/app/sdks/0.7.0/client-web/docs/examples/storage/list-files.md +++ /dev/null @@ -1,14 +0,0 @@ -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 deleted file mode 100644 index 2a2f579b3b..0000000000 --- a/app/sdks/0.7.0/client-web/docs/examples/storage/update-file.md +++ /dev/null @@ -1,14 +0,0 @@ -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 deleted file mode 100644 index 78b2d7fa77..0000000000 --- a/app/sdks/0.7.0/client-web/docs/examples/teams/create-membership.md +++ /dev/null @@ -1,14 +0,0 @@ -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 deleted file mode 100644 index 43205ba888..0000000000 --- a/app/sdks/0.7.0/client-web/docs/examples/teams/create.md +++ /dev/null @@ -1,14 +0,0 @@ -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 deleted file mode 100644 index 1b85ef08da..0000000000 --- a/app/sdks/0.7.0/client-web/docs/examples/teams/delete-membership.md +++ /dev/null @@ -1,14 +0,0 @@ -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 deleted file mode 100644 index 4665ad5773..0000000000 --- a/app/sdks/0.7.0/client-web/docs/examples/teams/delete.md +++ /dev/null @@ -1,14 +0,0 @@ -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 deleted file mode 100644 index 6235ce33f4..0000000000 --- a/app/sdks/0.7.0/client-web/docs/examples/teams/get-memberships.md +++ /dev/null @@ -1,14 +0,0 @@ -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 deleted file mode 100644 index f4b0f040b1..0000000000 --- a/app/sdks/0.7.0/client-web/docs/examples/teams/get.md +++ /dev/null @@ -1,14 +0,0 @@ -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 deleted file mode 100644 index c4229e2400..0000000000 --- a/app/sdks/0.7.0/client-web/docs/examples/teams/list.md +++ /dev/null @@ -1,14 +0,0 @@ -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 deleted file mode 100644 index e8b3de0a0b..0000000000 --- a/app/sdks/0.7.0/client-web/docs/examples/teams/update-membership-status.md +++ /dev/null @@ -1,14 +0,0 @@ -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 deleted file mode 100644 index bbab80937d..0000000000 --- a/app/sdks/0.7.0/client-web/docs/examples/teams/update.md +++ /dev/null @@ -1,14 +0,0 @@ -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 deleted file mode 100644 index 4f1e4ffc52..0000000000 --- a/app/sdks/0.7.0/client-web/package.json +++ /dev/null @@ -1,17 +0,0 @@ -{ - "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.2.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 deleted file mode 100644 index 2c30a9ae0d..0000000000 --- a/app/sdks/0.7.0/client-web/src/sdk.js +++ /dev/null @@ -1,2387 +0,0 @@ -(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:web:1.2.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 the new user to login - * to their 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 their 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 their account using the OAuth2 provider of their - * choice. Each OAuth2 provider should be enabled from the Appwrite console - * first. Use the success and failure arguments to provide a redirect URL's - * back to your app when login is completed. - * - * @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 their - * account sessions across all of their 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#updateVerification). - * - * 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 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 = '', 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, its 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 it is not accepted. - * - * @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 being redirected back to your app from the invitation email recieved - * by the user. - * - * @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 deleted file mode 100644 index e353d34c8e..0000000000 --- a/app/sdks/0.7.0/client-web/src/sdk.min.js +++ /dev/null @@ -1,187 +0,0 @@ -(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 the new user to login - * to their 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 their 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 their account using the OAuth2 provider of their - * choice. Each OAuth2 provider should be enabled from the Appwrite console - * first. Use the success and failure arguments to provide a redirect URL's - * back to your app when login is completed. - * - * @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 their - * account sessions across all of their 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#updateVerification). - * - * 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 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, its 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 it is not accepted. - * - * @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 being redirected back to your app from the invitation email recieved - * by the user. - * - * @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 deleted file mode 100644 index fa4d35e687..0000000000 --- a/app/sdks/0.7.0/console-web/CHANGELOG.md +++ /dev/null @@ -1 +0,0 @@ -# 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 deleted file mode 100644 index fc7c051a91..0000000000 --- a/app/sdks/0.7.0/console-web/LICENSE +++ /dev/null @@ -1,12 +0,0 @@ -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 deleted file mode 100644 index 2c32f3c57a..0000000000 --- a/app/sdks/0.7.0/console-web/README.md +++ /dev/null @@ -1,59 +0,0 @@ -# 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 - -``` - -## Getting Started - -Initialise the Appwrite SDK in your code, and setup your API credentials: - -```js - -// Init your Web SDK -var appwrite = new Appwrite(); - -appwrite - .setEndpoint('http://localhost/v1') // Set only when using self-hosted solution - .setProject('455x34dfkj') // Your Appwrite Project UID -; - -``` - - -## 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 deleted file mode 100644 index 3a2dcba651..0000000000 --- a/app/sdks/0.7.0/console-web/docs/examples/account/create-o-auth2session.md +++ /dev/null @@ -1,11 +0,0 @@ -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 deleted file mode 100644 index d69269b351..0000000000 --- a/app/sdks/0.7.0/console-web/docs/examples/account/create-recovery.md +++ /dev/null @@ -1,15 +0,0 @@ -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 deleted file mode 100644 index 0734a84aaa..0000000000 --- a/app/sdks/0.7.0/console-web/docs/examples/account/create-session.md +++ /dev/null @@ -1,15 +0,0 @@ -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 deleted file mode 100644 index 1211b5c642..0000000000 --- a/app/sdks/0.7.0/console-web/docs/examples/account/create-verification.md +++ /dev/null @@ -1,15 +0,0 @@ -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 deleted file mode 100644 index e61b1fbac4..0000000000 --- a/app/sdks/0.7.0/console-web/docs/examples/account/create.md +++ /dev/null @@ -1,15 +0,0 @@ -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 deleted file mode 100644 index 84505281f0..0000000000 --- a/app/sdks/0.7.0/console-web/docs/examples/account/delete-session.md +++ /dev/null @@ -1,15 +0,0 @@ -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 deleted file mode 100644 index 61bec86399..0000000000 --- a/app/sdks/0.7.0/console-web/docs/examples/account/delete-sessions.md +++ /dev/null @@ -1,15 +0,0 @@ -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 deleted file mode 100644 index dbb8dbf250..0000000000 --- a/app/sdks/0.7.0/console-web/docs/examples/account/delete.md +++ /dev/null @@ -1,15 +0,0 @@ -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 deleted file mode 100644 index 12e6656c96..0000000000 --- a/app/sdks/0.7.0/console-web/docs/examples/account/get-logs.md +++ /dev/null @@ -1,15 +0,0 @@ -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 deleted file mode 100644 index e328baba32..0000000000 --- a/app/sdks/0.7.0/console-web/docs/examples/account/get-prefs.md +++ /dev/null @@ -1,15 +0,0 @@ -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 deleted file mode 100644 index cb281dd4db..0000000000 --- a/app/sdks/0.7.0/console-web/docs/examples/account/get-sessions.md +++ /dev/null @@ -1,15 +0,0 @@ -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 deleted file mode 100644 index 82c96fb9db..0000000000 --- a/app/sdks/0.7.0/console-web/docs/examples/account/get.md +++ /dev/null @@ -1,15 +0,0 @@ -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 deleted file mode 100644 index c2caaf060e..0000000000 --- a/app/sdks/0.7.0/console-web/docs/examples/account/update-email.md +++ /dev/null @@ -1,15 +0,0 @@ -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 deleted file mode 100644 index 047eba688b..0000000000 --- a/app/sdks/0.7.0/console-web/docs/examples/account/update-name.md +++ /dev/null @@ -1,15 +0,0 @@ -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 deleted file mode 100644 index d305031fa0..0000000000 --- a/app/sdks/0.7.0/console-web/docs/examples/account/update-password.md +++ /dev/null @@ -1,15 +0,0 @@ -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 deleted file mode 100644 index 8c4e402ae1..0000000000 --- a/app/sdks/0.7.0/console-web/docs/examples/account/update-prefs.md +++ /dev/null @@ -1,15 +0,0 @@ -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 deleted file mode 100644 index 235a4db481..0000000000 --- a/app/sdks/0.7.0/console-web/docs/examples/account/update-recovery.md +++ /dev/null @@ -1,15 +0,0 @@ -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 deleted file mode 100644 index ef2c384853..0000000000 --- a/app/sdks/0.7.0/console-web/docs/examples/account/update-verification.md +++ /dev/null @@ -1,15 +0,0 @@ -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 deleted file mode 100644 index bbbdb9738f..0000000000 --- a/app/sdks/0.7.0/console-web/docs/examples/avatars/get-browser.md +++ /dev/null @@ -1,11 +0,0 @@ -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 deleted file mode 100644 index e1fab01cf2..0000000000 --- a/app/sdks/0.7.0/console-web/docs/examples/avatars/get-credit-card.md +++ /dev/null @@ -1,11 +0,0 @@ -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 deleted file mode 100644 index 397986b11a..0000000000 --- a/app/sdks/0.7.0/console-web/docs/examples/avatars/get-favicon.md +++ /dev/null @@ -1,11 +0,0 @@ -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 deleted file mode 100644 index 6e90b72feb..0000000000 --- a/app/sdks/0.7.0/console-web/docs/examples/avatars/get-flag.md +++ /dev/null @@ -1,11 +0,0 @@ -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 deleted file mode 100644 index afd1a17cb5..0000000000 --- a/app/sdks/0.7.0/console-web/docs/examples/avatars/get-image.md +++ /dev/null @@ -1,11 +0,0 @@ -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 deleted file mode 100644 index dab6417ca5..0000000000 --- a/app/sdks/0.7.0/console-web/docs/examples/avatars/get-initials.md +++ /dev/null @@ -1,11 +0,0 @@ -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 deleted file mode 100644 index 31f490cedd..0000000000 --- a/app/sdks/0.7.0/console-web/docs/examples/avatars/get-q-r.md +++ /dev/null @@ -1,11 +0,0 @@ -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/database/create-collection.md b/app/sdks/0.7.0/console-web/docs/examples/database/create-collection.md deleted file mode 100644 index a7a4b90197..0000000000 --- a/app/sdks/0.7.0/console-web/docs/examples/database/create-collection.md +++ /dev/null @@ -1,15 +0,0 @@ -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 deleted file mode 100644 index 64809c6156..0000000000 --- a/app/sdks/0.7.0/console-web/docs/examples/database/create-document.md +++ /dev/null @@ -1,15 +0,0 @@ -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 deleted file mode 100644 index bfb0706bf5..0000000000 --- a/app/sdks/0.7.0/console-web/docs/examples/database/delete-collection.md +++ /dev/null @@ -1,15 +0,0 @@ -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 deleted file mode 100644 index 356a71a437..0000000000 --- a/app/sdks/0.7.0/console-web/docs/examples/database/delete-document.md +++ /dev/null @@ -1,15 +0,0 @@ -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.md b/app/sdks/0.7.0/console-web/docs/examples/database/get-collection.md deleted file mode 100644 index d74d4b3225..0000000000 --- a/app/sdks/0.7.0/console-web/docs/examples/database/get-collection.md +++ /dev/null @@ -1,15 +0,0 @@ -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 deleted file mode 100644 index 51638880c5..0000000000 --- a/app/sdks/0.7.0/console-web/docs/examples/database/get-document.md +++ /dev/null @@ -1,15 +0,0 @@ -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 deleted file mode 100644 index 8a18249748..0000000000 --- a/app/sdks/0.7.0/console-web/docs/examples/database/list-collections.md +++ /dev/null @@ -1,15 +0,0 @@ -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 deleted file mode 100644 index 1d895a566a..0000000000 --- a/app/sdks/0.7.0/console-web/docs/examples/database/list-documents.md +++ /dev/null @@ -1,15 +0,0 @@ -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 deleted file mode 100644 index f00a6c6f8c..0000000000 --- a/app/sdks/0.7.0/console-web/docs/examples/database/update-collection.md +++ /dev/null @@ -1,15 +0,0 @@ -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 deleted file mode 100644 index 52c172ab6a..0000000000 --- a/app/sdks/0.7.0/console-web/docs/examples/database/update-document.md +++ /dev/null @@ -1,15 +0,0 @@ -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/functions/create-execution.md b/app/sdks/0.7.0/console-web/docs/examples/functions/create-execution.md deleted file mode 100644 index e70d7f931a..0000000000 --- a/app/sdks/0.7.0/console-web/docs/examples/functions/create-execution.md +++ /dev/null @@ -1,15 +0,0 @@ -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 deleted file mode 100644 index 743517ff1a..0000000000 --- a/app/sdks/0.7.0/console-web/docs/examples/functions/create-tag.md +++ /dev/null @@ -1,15 +0,0 @@ -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 deleted file mode 100644 index 6fb506816f..0000000000 --- a/app/sdks/0.7.0/console-web/docs/examples/functions/create.md +++ /dev/null @@ -1,15 +0,0 @@ -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 deleted file mode 100644 index 9c1b5cdda3..0000000000 --- a/app/sdks/0.7.0/console-web/docs/examples/functions/delete-tag.md +++ /dev/null @@ -1,15 +0,0 @@ -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 deleted file mode 100644 index f76f809c2b..0000000000 --- a/app/sdks/0.7.0/console-web/docs/examples/functions/delete.md +++ /dev/null @@ -1,15 +0,0 @@ -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 deleted file mode 100644 index 8287c4709e..0000000000 --- a/app/sdks/0.7.0/console-web/docs/examples/functions/get-execution.md +++ /dev/null @@ -1,15 +0,0 @@ -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 deleted file mode 100644 index c6021ccdac..0000000000 --- a/app/sdks/0.7.0/console-web/docs/examples/functions/get-tag.md +++ /dev/null @@ -1,15 +0,0 @@ -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-usage.md b/app/sdks/0.7.0/console-web/docs/examples/functions/get-usage.md deleted file mode 100644 index 7515c0fe5c..0000000000 --- a/app/sdks/0.7.0/console-web/docs/examples/functions/get-usage.md +++ /dev/null @@ -1,15 +0,0 @@ -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.getUsage('[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.md b/app/sdks/0.7.0/console-web/docs/examples/functions/get.md deleted file mode 100644 index dc068ffa09..0000000000 --- a/app/sdks/0.7.0/console-web/docs/examples/functions/get.md +++ /dev/null @@ -1,15 +0,0 @@ -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 deleted file mode 100644 index 9367a9eb52..0000000000 --- a/app/sdks/0.7.0/console-web/docs/examples/functions/list-executions.md +++ /dev/null @@ -1,15 +0,0 @@ -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 deleted file mode 100644 index 4542bae44b..0000000000 --- a/app/sdks/0.7.0/console-web/docs/examples/functions/list-tags.md +++ /dev/null @@ -1,15 +0,0 @@ -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 deleted file mode 100644 index e2ce2511e0..0000000000 --- a/app/sdks/0.7.0/console-web/docs/examples/functions/list.md +++ /dev/null @@ -1,15 +0,0 @@ -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-tag.md b/app/sdks/0.7.0/console-web/docs/examples/functions/update-tag.md deleted file mode 100644 index 7ea2ba1808..0000000000 --- a/app/sdks/0.7.0/console-web/docs/examples/functions/update-tag.md +++ /dev/null @@ -1,15 +0,0 @@ -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 deleted file mode 100644 index c6a34cff5c..0000000000 --- a/app/sdks/0.7.0/console-web/docs/examples/functions/update.md +++ /dev/null @@ -1,15 +0,0 @@ -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/health/get-anti-virus.md b/app/sdks/0.7.0/console-web/docs/examples/health/get-anti-virus.md deleted file mode 100644 index 95b671992b..0000000000 --- a/app/sdks/0.7.0/console-web/docs/examples/health/get-anti-virus.md +++ /dev/null @@ -1,15 +0,0 @@ -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 deleted file mode 100644 index 5c41d81868..0000000000 --- a/app/sdks/0.7.0/console-web/docs/examples/health/get-cache.md +++ /dev/null @@ -1,15 +0,0 @@ -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 deleted file mode 100644 index 407f87e2a1..0000000000 --- a/app/sdks/0.7.0/console-web/docs/examples/health/get-d-b.md +++ /dev/null @@ -1,15 +0,0 @@ -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 deleted file mode 100644 index a115c869ba..0000000000 --- a/app/sdks/0.7.0/console-web/docs/examples/health/get-queue-certificates.md +++ /dev/null @@ -1,15 +0,0 @@ -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 deleted file mode 100644 index 3c0dc33acf..0000000000 --- a/app/sdks/0.7.0/console-web/docs/examples/health/get-queue-functions.md +++ /dev/null @@ -1,15 +0,0 @@ -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 deleted file mode 100644 index b3d41b49c6..0000000000 --- a/app/sdks/0.7.0/console-web/docs/examples/health/get-queue-logs.md +++ /dev/null @@ -1,15 +0,0 @@ -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 deleted file mode 100644 index 4f34f670a6..0000000000 --- a/app/sdks/0.7.0/console-web/docs/examples/health/get-queue-tasks.md +++ /dev/null @@ -1,15 +0,0 @@ -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 deleted file mode 100644 index 3d234be2de..0000000000 --- a/app/sdks/0.7.0/console-web/docs/examples/health/get-queue-usage.md +++ /dev/null @@ -1,15 +0,0 @@ -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 deleted file mode 100644 index c5825dcf6c..0000000000 --- a/app/sdks/0.7.0/console-web/docs/examples/health/get-queue-webhooks.md +++ /dev/null @@ -1,15 +0,0 @@ -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 deleted file mode 100644 index 7287745704..0000000000 --- a/app/sdks/0.7.0/console-web/docs/examples/health/get-storage-local.md +++ /dev/null @@ -1,15 +0,0 @@ -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 deleted file mode 100644 index b6087b73d5..0000000000 --- a/app/sdks/0.7.0/console-web/docs/examples/health/get-time.md +++ /dev/null @@ -1,15 +0,0 @@ -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 deleted file mode 100644 index 1e7d6fe4e8..0000000000 --- a/app/sdks/0.7.0/console-web/docs/examples/health/get.md +++ /dev/null @@ -1,15 +0,0 @@ -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 deleted file mode 100644 index 93144335ea..0000000000 --- a/app/sdks/0.7.0/console-web/docs/examples/locale/get-continents.md +++ /dev/null @@ -1,15 +0,0 @@ -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 deleted file mode 100644 index fffc8696e8..0000000000 --- a/app/sdks/0.7.0/console-web/docs/examples/locale/get-countries-e-u.md +++ /dev/null @@ -1,15 +0,0 @@ -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 deleted file mode 100644 index 751f4f6cc4..0000000000 --- a/app/sdks/0.7.0/console-web/docs/examples/locale/get-countries-phones.md +++ /dev/null @@ -1,15 +0,0 @@ -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 deleted file mode 100644 index 30b1dd95c7..0000000000 --- a/app/sdks/0.7.0/console-web/docs/examples/locale/get-countries.md +++ /dev/null @@ -1,15 +0,0 @@ -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 deleted file mode 100644 index 4c92714062..0000000000 --- a/app/sdks/0.7.0/console-web/docs/examples/locale/get-currencies.md +++ /dev/null @@ -1,15 +0,0 @@ -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 deleted file mode 100644 index 2d1f713eeb..0000000000 --- a/app/sdks/0.7.0/console-web/docs/examples/locale/get-languages.md +++ /dev/null @@ -1,15 +0,0 @@ -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 deleted file mode 100644 index 1fba9877b5..0000000000 --- a/app/sdks/0.7.0/console-web/docs/examples/locale/get.md +++ /dev/null @@ -1,15 +0,0 @@ -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 deleted file mode 100644 index 756b869a85..0000000000 --- a/app/sdks/0.7.0/console-web/docs/examples/projects/create-domain.md +++ /dev/null @@ -1,15 +0,0 @@ -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 deleted file mode 100644 index 9556f5b7f7..0000000000 --- a/app/sdks/0.7.0/console-web/docs/examples/projects/create-key.md +++ /dev/null @@ -1,15 +0,0 @@ -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 deleted file mode 100644 index f4476fe599..0000000000 --- a/app/sdks/0.7.0/console-web/docs/examples/projects/create-platform.md +++ /dev/null @@ -1,15 +0,0 @@ -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 deleted file mode 100644 index 9b0f3c1e03..0000000000 --- a/app/sdks/0.7.0/console-web/docs/examples/projects/create-task.md +++ /dev/null @@ -1,15 +0,0 @@ -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 deleted file mode 100644 index be722f3dbe..0000000000 --- a/app/sdks/0.7.0/console-web/docs/examples/projects/create-webhook.md +++ /dev/null @@ -1,15 +0,0 @@ -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 deleted file mode 100644 index 8041ed154e..0000000000 --- a/app/sdks/0.7.0/console-web/docs/examples/projects/create.md +++ /dev/null @@ -1,15 +0,0 @@ -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 deleted file mode 100644 index 1b3df9363b..0000000000 --- a/app/sdks/0.7.0/console-web/docs/examples/projects/delete-domain.md +++ /dev/null @@ -1,15 +0,0 @@ -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 deleted file mode 100644 index dc855bcc30..0000000000 --- a/app/sdks/0.7.0/console-web/docs/examples/projects/delete-key.md +++ /dev/null @@ -1,15 +0,0 @@ -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 deleted file mode 100644 index 2a180c47e4..0000000000 --- a/app/sdks/0.7.0/console-web/docs/examples/projects/delete-platform.md +++ /dev/null @@ -1,15 +0,0 @@ -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 deleted file mode 100644 index b7f9ad3e47..0000000000 --- a/app/sdks/0.7.0/console-web/docs/examples/projects/delete-task.md +++ /dev/null @@ -1,15 +0,0 @@ -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 deleted file mode 100644 index c5e0588ad1..0000000000 --- a/app/sdks/0.7.0/console-web/docs/examples/projects/delete-webhook.md +++ /dev/null @@ -1,15 +0,0 @@ -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 deleted file mode 100644 index 20b67370f0..0000000000 --- a/app/sdks/0.7.0/console-web/docs/examples/projects/delete.md +++ /dev/null @@ -1,15 +0,0 @@ -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 deleted file mode 100644 index 1622546719..0000000000 --- a/app/sdks/0.7.0/console-web/docs/examples/projects/get-domain.md +++ /dev/null @@ -1,15 +0,0 @@ -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 deleted file mode 100644 index 8bb458c335..0000000000 --- a/app/sdks/0.7.0/console-web/docs/examples/projects/get-key.md +++ /dev/null @@ -1,15 +0,0 @@ -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 deleted file mode 100644 index bfeb49393b..0000000000 --- a/app/sdks/0.7.0/console-web/docs/examples/projects/get-platform.md +++ /dev/null @@ -1,15 +0,0 @@ -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 deleted file mode 100644 index c405299d74..0000000000 --- a/app/sdks/0.7.0/console-web/docs/examples/projects/get-task.md +++ /dev/null @@ -1,15 +0,0 @@ -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 deleted file mode 100644 index e024a2966c..0000000000 --- a/app/sdks/0.7.0/console-web/docs/examples/projects/get-usage.md +++ /dev/null @@ -1,15 +0,0 @@ -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 deleted file mode 100644 index 2629d4424d..0000000000 --- a/app/sdks/0.7.0/console-web/docs/examples/projects/get-webhook.md +++ /dev/null @@ -1,15 +0,0 @@ -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 deleted file mode 100644 index bcfb35186b..0000000000 --- a/app/sdks/0.7.0/console-web/docs/examples/projects/get.md +++ /dev/null @@ -1,15 +0,0 @@ -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 deleted file mode 100644 index 5ddfec49b5..0000000000 --- a/app/sdks/0.7.0/console-web/docs/examples/projects/list-domains.md +++ /dev/null @@ -1,15 +0,0 @@ -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 deleted file mode 100644 index 497ddf9bac..0000000000 --- a/app/sdks/0.7.0/console-web/docs/examples/projects/list-keys.md +++ /dev/null @@ -1,15 +0,0 @@ -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 deleted file mode 100644 index 4fd2d311f3..0000000000 --- a/app/sdks/0.7.0/console-web/docs/examples/projects/list-platforms.md +++ /dev/null @@ -1,15 +0,0 @@ -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 deleted file mode 100644 index d42efc2b80..0000000000 --- a/app/sdks/0.7.0/console-web/docs/examples/projects/list-tasks.md +++ /dev/null @@ -1,15 +0,0 @@ -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 deleted file mode 100644 index 6c45849399..0000000000 --- a/app/sdks/0.7.0/console-web/docs/examples/projects/list-webhooks.md +++ /dev/null @@ -1,15 +0,0 @@ -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 deleted file mode 100644 index 428fc4545f..0000000000 --- a/app/sdks/0.7.0/console-web/docs/examples/projects/list.md +++ /dev/null @@ -1,15 +0,0 @@ -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 deleted file mode 100644 index ea53295bcf..0000000000 --- a/app/sdks/0.7.0/console-web/docs/examples/projects/update-domain-verification.md +++ /dev/null @@ -1,15 +0,0 @@ -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 deleted file mode 100644 index f19b593c9f..0000000000 --- a/app/sdks/0.7.0/console-web/docs/examples/projects/update-key.md +++ /dev/null @@ -1,15 +0,0 @@ -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 deleted file mode 100644 index 479c5e9d30..0000000000 --- a/app/sdks/0.7.0/console-web/docs/examples/projects/update-o-auth2.md +++ /dev/null @@ -1,15 +0,0 @@ -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 deleted file mode 100644 index 0e22080ed0..0000000000 --- a/app/sdks/0.7.0/console-web/docs/examples/projects/update-platform.md +++ /dev/null @@ -1,15 +0,0 @@ -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 deleted file mode 100644 index 38744a36bd..0000000000 --- a/app/sdks/0.7.0/console-web/docs/examples/projects/update-task.md +++ /dev/null @@ -1,15 +0,0 @@ -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 deleted file mode 100644 index cdef2ec479..0000000000 --- a/app/sdks/0.7.0/console-web/docs/examples/projects/update-webhook.md +++ /dev/null @@ -1,15 +0,0 @@ -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 deleted file mode 100644 index 9d06850534..0000000000 --- a/app/sdks/0.7.0/console-web/docs/examples/projects/update.md +++ /dev/null @@ -1,15 +0,0 @@ -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 deleted file mode 100644 index 673777e380..0000000000 --- a/app/sdks/0.7.0/console-web/docs/examples/storage/create-file.md +++ /dev/null @@ -1,15 +0,0 @@ -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 deleted file mode 100644 index 7278b682ae..0000000000 --- a/app/sdks/0.7.0/console-web/docs/examples/storage/delete-file.md +++ /dev/null @@ -1,15 +0,0 @@ -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 deleted file mode 100644 index 0a4677fe80..0000000000 --- a/app/sdks/0.7.0/console-web/docs/examples/storage/get-file-download.md +++ /dev/null @@ -1,11 +0,0 @@ -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 deleted file mode 100644 index a44cb6479c..0000000000 --- a/app/sdks/0.7.0/console-web/docs/examples/storage/get-file-preview.md +++ /dev/null @@ -1,11 +0,0 @@ -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 deleted file mode 100644 index adfb6320c3..0000000000 --- a/app/sdks/0.7.0/console-web/docs/examples/storage/get-file-view.md +++ /dev/null @@ -1,11 +0,0 @@ -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 deleted file mode 100644 index 9691be3056..0000000000 --- a/app/sdks/0.7.0/console-web/docs/examples/storage/get-file.md +++ /dev/null @@ -1,15 +0,0 @@ -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 deleted file mode 100644 index 5c2560d06d..0000000000 --- a/app/sdks/0.7.0/console-web/docs/examples/storage/list-files.md +++ /dev/null @@ -1,15 +0,0 @@ -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 deleted file mode 100644 index c053d60470..0000000000 --- a/app/sdks/0.7.0/console-web/docs/examples/storage/update-file.md +++ /dev/null @@ -1,15 +0,0 @@ -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 deleted file mode 100644 index 534577ead3..0000000000 --- a/app/sdks/0.7.0/console-web/docs/examples/teams/create-membership.md +++ /dev/null @@ -1,15 +0,0 @@ -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 deleted file mode 100644 index 6f7232b9c5..0000000000 --- a/app/sdks/0.7.0/console-web/docs/examples/teams/create.md +++ /dev/null @@ -1,15 +0,0 @@ -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 deleted file mode 100644 index fa1efe401b..0000000000 --- a/app/sdks/0.7.0/console-web/docs/examples/teams/delete-membership.md +++ /dev/null @@ -1,15 +0,0 @@ -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 deleted file mode 100644 index cacad26c02..0000000000 --- a/app/sdks/0.7.0/console-web/docs/examples/teams/delete.md +++ /dev/null @@ -1,15 +0,0 @@ -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 deleted file mode 100644 index e1b959d1eb..0000000000 --- a/app/sdks/0.7.0/console-web/docs/examples/teams/get-memberships.md +++ /dev/null @@ -1,15 +0,0 @@ -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 deleted file mode 100644 index a8496ad76d..0000000000 --- a/app/sdks/0.7.0/console-web/docs/examples/teams/get.md +++ /dev/null @@ -1,15 +0,0 @@ -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 deleted file mode 100644 index b94d6c32ff..0000000000 --- a/app/sdks/0.7.0/console-web/docs/examples/teams/list.md +++ /dev/null @@ -1,15 +0,0 @@ -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 deleted file mode 100644 index 4931f02689..0000000000 --- a/app/sdks/0.7.0/console-web/docs/examples/teams/update-membership-status.md +++ /dev/null @@ -1,15 +0,0 @@ -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 deleted file mode 100644 index 5b73121518..0000000000 --- a/app/sdks/0.7.0/console-web/docs/examples/teams/update.md +++ /dev/null @@ -1,15 +0,0 @@ -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 deleted file mode 100644 index 9adc060ff5..0000000000 --- a/app/sdks/0.7.0/console-web/docs/examples/users/create.md +++ /dev/null @@ -1,15 +0,0 @@ -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 deleted file mode 100644 index 96a9b5c94f..0000000000 --- a/app/sdks/0.7.0/console-web/docs/examples/users/delete-session.md +++ /dev/null @@ -1,15 +0,0 @@ -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 deleted file mode 100644 index 56092ab5fc..0000000000 --- a/app/sdks/0.7.0/console-web/docs/examples/users/delete-sessions.md +++ /dev/null @@ -1,15 +0,0 @@ -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 deleted file mode 100644 index 40f33e34c2..0000000000 --- a/app/sdks/0.7.0/console-web/docs/examples/users/delete-user.md +++ /dev/null @@ -1,15 +0,0 @@ -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 deleted file mode 100644 index c349383ec1..0000000000 --- a/app/sdks/0.7.0/console-web/docs/examples/users/get-logs.md +++ /dev/null @@ -1,15 +0,0 @@ -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 deleted file mode 100644 index 7d8a3cd33f..0000000000 --- a/app/sdks/0.7.0/console-web/docs/examples/users/get-prefs.md +++ /dev/null @@ -1,15 +0,0 @@ -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 deleted file mode 100644 index 1b7535855e..0000000000 --- a/app/sdks/0.7.0/console-web/docs/examples/users/get-sessions.md +++ /dev/null @@ -1,15 +0,0 @@ -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 deleted file mode 100644 index 751798de39..0000000000 --- a/app/sdks/0.7.0/console-web/docs/examples/users/get.md +++ /dev/null @@ -1,15 +0,0 @@ -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 deleted file mode 100644 index bbc4895412..0000000000 --- a/app/sdks/0.7.0/console-web/docs/examples/users/list.md +++ /dev/null @@ -1,15 +0,0 @@ -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 deleted file mode 100644 index 877aa309a1..0000000000 --- a/app/sdks/0.7.0/console-web/docs/examples/users/update-prefs.md +++ /dev/null @@ -1,15 +0,0 @@ -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 deleted file mode 100644 index 6c432ff4c6..0000000000 --- a/app/sdks/0.7.0/console-web/docs/examples/users/update-status.md +++ /dev/null @@ -1,15 +0,0 @@ -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 deleted file mode 100644 index 6c53a70307..0000000000 --- a/app/sdks/0.7.0/console-web/package.json +++ /dev/null @@ -1,17 +0,0 @@ -{ - "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 deleted file mode 100644 index c497dd6c95..0000000000 --- a/app/sdks/0.7.0/console-web/src/sdk.js +++ /dev/null @@ -1,5017 +0,0 @@ -(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:web: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 the new user to login - * to their 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 their 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 their account using the OAuth2 provider of their - * choice. Each OAuth2 provider should be enabled from the Appwrite console - * first. Use the success and failure arguments to provide a redirect URL's - * back to your app when login is completed. - * - * @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 their - * account sessions across all of their 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#updateVerification). - * - * 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 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 = '', 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, its 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 - * @throws {Error} - * @return {Promise} - */ - createExecution: function(functionId) { - if(functionId === undefined) { - throw new Error('Missing required parameter: "functionId"'); - } - - let path = '/functions/{functionId}/executions'.replace(new RegExp('{functionId}', 'g'), functionId); - - let payload = {}; - - 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); - }, - - /** - * Get Function Usage - * - * - * @param {string} functionId - * @param {string} range - * @throws {Error} - * @return {Promise} - */ - getUsage: function(functionId, range = '30d') { - if(functionId === undefined) { - throw new Error('Missing required parameter: "functionId"'); - } - - let path = '/functions/{functionId}/usage'.replace(new RegExp('{functionId}', 'g'), functionId); - - let payload = {}; - - if(range) { - payload['range'] = range; - } - - return http - .get(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 = '30d') { - 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 it is not accepted. - * - * @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 being redirected back to your app from the invitation email recieved - * by the user. - * - * @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 deleted file mode 100644 index 29411571f6..0000000000 --- a/app/sdks/0.7.0/console-web/src/sdk.min.js +++ /dev/null @@ -1,432 +0,0 @@ -(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 the new user to login - * to their 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 their 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 their account using the OAuth2 provider of their - * choice. Each OAuth2 provider should be enabled from the Appwrite console - * first. Use the success and failure arguments to provide a redirect URL's - * back to your app when login is completed. - * - * @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 their - * account sessions across all of their 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#updateVerification). - * - * 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 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, its 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 - * @throws {Error} - * @return {Promise} - */ - createExecution(functionId: string): 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; - - /** - * Get Function Usage - * - * - * @param {string} functionId - * @param {string} range - * @throws {Error} - * @return {Promise} - */ - getUsage(functionId: string, range?: 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 it is not accepted. - * - * @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 being redirected back to your app from the invitation email recieved - * by the user. - * - * @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 deleted file mode 100644 index fa4d35e687..0000000000 --- a/app/sdks/0.7.0/server-deno/CHANGELOG.md +++ /dev/null @@ -1 +0,0 @@ -# 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 deleted file mode 100644 index fc7c051a91..0000000000 --- a/app/sdks/0.7.0/server-deno/LICENSE +++ /dev/null @@ -1,12 +0,0 @@ -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 deleted file mode 100644 index d857e22f24..0000000000 --- a/app/sdks/0.7.0/server-deno/README.md +++ /dev/null @@ -1,28 +0,0 @@ -# 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.7.0-blue.svg?v=1) - -**This SDK is compatible with Appwrite server version 0.7.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 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 deleted file mode 100644 index 27c0336054..0000000000 --- a/app/sdks/0.7.0/server-deno/docs/examples/avatars/get-browser.md +++ /dev/null @@ -1,20 +0,0 @@ -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 deleted file mode 100644 index 998356a106..0000000000 --- a/app/sdks/0.7.0/server-deno/docs/examples/avatars/get-credit-card.md +++ /dev/null @@ -1,20 +0,0 @@ -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 deleted file mode 100644 index 43afe096c4..0000000000 --- a/app/sdks/0.7.0/server-deno/docs/examples/avatars/get-favicon.md +++ /dev/null @@ -1,20 +0,0 @@ -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 deleted file mode 100644 index 6b28e5db2f..0000000000 --- a/app/sdks/0.7.0/server-deno/docs/examples/avatars/get-flag.md +++ /dev/null @@ -1,20 +0,0 @@ -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 deleted file mode 100644 index 0a2693c768..0000000000 --- a/app/sdks/0.7.0/server-deno/docs/examples/avatars/get-image.md +++ /dev/null @@ -1,20 +0,0 @@ -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-initials.md b/app/sdks/0.7.0/server-deno/docs/examples/avatars/get-initials.md deleted file mode 100644 index af35445bb3..0000000000 --- a/app/sdks/0.7.0/server-deno/docs/examples/avatars/get-initials.md +++ /dev/null @@ -1,20 +0,0 @@ -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.getInitials(); - -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 deleted file mode 100644 index 6d8446b105..0000000000 --- a/app/sdks/0.7.0/server-deno/docs/examples/avatars/get-q-r.md +++ /dev/null @@ -1,20 +0,0 @@ -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 deleted file mode 100644 index 316ae6b222..0000000000 --- a/app/sdks/0.7.0/server-deno/docs/examples/database/create-collection.md +++ /dev/null @@ -1,20 +0,0 @@ -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 deleted file mode 100644 index ef78a839a4..0000000000 --- a/app/sdks/0.7.0/server-deno/docs/examples/database/create-document.md +++ /dev/null @@ -1,20 +0,0 @@ -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 deleted file mode 100644 index e9b5d6392b..0000000000 --- a/app/sdks/0.7.0/server-deno/docs/examples/database/delete-collection.md +++ /dev/null @@ -1,20 +0,0 @@ -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 deleted file mode 100644 index b7d3f52c71..0000000000 --- a/app/sdks/0.7.0/server-deno/docs/examples/database/delete-document.md +++ /dev/null @@ -1,20 +0,0 @@ -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.md b/app/sdks/0.7.0/server-deno/docs/examples/database/get-collection.md deleted file mode 100644 index 323bc7ec74..0000000000 --- a/app/sdks/0.7.0/server-deno/docs/examples/database/get-collection.md +++ /dev/null @@ -1,20 +0,0 @@ -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 deleted file mode 100644 index 7a0332251a..0000000000 --- a/app/sdks/0.7.0/server-deno/docs/examples/database/get-document.md +++ /dev/null @@ -1,20 +0,0 @@ -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 deleted file mode 100644 index 292e46f860..0000000000 --- a/app/sdks/0.7.0/server-deno/docs/examples/database/list-collections.md +++ /dev/null @@ -1,20 +0,0 @@ -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 deleted file mode 100644 index bb22a3956a..0000000000 --- a/app/sdks/0.7.0/server-deno/docs/examples/database/list-documents.md +++ /dev/null @@ -1,20 +0,0 @@ -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 deleted file mode 100644 index 8239e45f28..0000000000 --- a/app/sdks/0.7.0/server-deno/docs/examples/database/update-collection.md +++ /dev/null @@ -1,20 +0,0 @@ -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 deleted file mode 100644 index cd079c8f2d..0000000000 --- a/app/sdks/0.7.0/server-deno/docs/examples/database/update-document.md +++ /dev/null @@ -1,20 +0,0 @@ -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/functions/create-execution.md b/app/sdks/0.7.0/server-deno/docs/examples/functions/create-execution.md deleted file mode 100644 index 8ba9844d64..0000000000 --- a/app/sdks/0.7.0/server-deno/docs/examples/functions/create-execution.md +++ /dev/null @@ -1,20 +0,0 @@ -import * as sdk from "https://deno.land/x/appwrite/mod.ts"; - -// 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-deno/docs/examples/functions/create-tag.md b/app/sdks/0.7.0/server-deno/docs/examples/functions/create-tag.md deleted file mode 100644 index 7fcaaa8725..0000000000 --- a/app/sdks/0.7.0/server-deno/docs/examples/functions/create-tag.md +++ /dev/null @@ -1,20 +0,0 @@ -import * as sdk from "https://deno.land/x/appwrite/mod.ts"; - -// 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]', '[COMMAND]', 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/functions/create.md b/app/sdks/0.7.0/server-deno/docs/examples/functions/create.md deleted file mode 100644 index 95a0760ec0..0000000000 --- a/app/sdks/0.7.0/server-deno/docs/examples/functions/create.md +++ /dev/null @@ -1,20 +0,0 @@ -import * as sdk from "https://deno.land/x/appwrite/mod.ts"; - -// 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]', 'node-14'); - -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/functions/delete-tag.md b/app/sdks/0.7.0/server-deno/docs/examples/functions/delete-tag.md deleted file mode 100644 index da50cdd77f..0000000000 --- a/app/sdks/0.7.0/server-deno/docs/examples/functions/delete-tag.md +++ /dev/null @@ -1,20 +0,0 @@ -import * as sdk from "https://deno.land/x/appwrite/mod.ts"; - -// 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-deno/docs/examples/functions/delete.md b/app/sdks/0.7.0/server-deno/docs/examples/functions/delete.md deleted file mode 100644 index f987765b93..0000000000 --- a/app/sdks/0.7.0/server-deno/docs/examples/functions/delete.md +++ /dev/null @@ -1,20 +0,0 @@ -import * as sdk from "https://deno.land/x/appwrite/mod.ts"; - -// 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-deno/docs/examples/functions/get-execution.md b/app/sdks/0.7.0/server-deno/docs/examples/functions/get-execution.md deleted file mode 100644 index 49ed2abe8d..0000000000 --- a/app/sdks/0.7.0/server-deno/docs/examples/functions/get-execution.md +++ /dev/null @@ -1,20 +0,0 @@ -import * as sdk from "https://deno.land/x/appwrite/mod.ts"; - -// 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-deno/docs/examples/functions/get-tag.md b/app/sdks/0.7.0/server-deno/docs/examples/functions/get-tag.md deleted file mode 100644 index 8d267eabf2..0000000000 --- a/app/sdks/0.7.0/server-deno/docs/examples/functions/get-tag.md +++ /dev/null @@ -1,20 +0,0 @@ -import * as sdk from "https://deno.land/x/appwrite/mod.ts"; - -// 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-deno/docs/examples/functions/get.md b/app/sdks/0.7.0/server-deno/docs/examples/functions/get.md deleted file mode 100644 index 0be5a98de8..0000000000 --- a/app/sdks/0.7.0/server-deno/docs/examples/functions/get.md +++ /dev/null @@ -1,20 +0,0 @@ -import * as sdk from "https://deno.land/x/appwrite/mod.ts"; - -// 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-deno/docs/examples/functions/list-executions.md b/app/sdks/0.7.0/server-deno/docs/examples/functions/list-executions.md deleted file mode 100644 index 862e81f01e..0000000000 --- a/app/sdks/0.7.0/server-deno/docs/examples/functions/list-executions.md +++ /dev/null @@ -1,20 +0,0 @@ -import * as sdk from "https://deno.land/x/appwrite/mod.ts"; - -// 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-deno/docs/examples/functions/list-tags.md b/app/sdks/0.7.0/server-deno/docs/examples/functions/list-tags.md deleted file mode 100644 index 5ca2da7b61..0000000000 --- a/app/sdks/0.7.0/server-deno/docs/examples/functions/list-tags.md +++ /dev/null @@ -1,20 +0,0 @@ -import * as sdk from "https://deno.land/x/appwrite/mod.ts"; - -// 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-deno/docs/examples/functions/list.md b/app/sdks/0.7.0/server-deno/docs/examples/functions/list.md deleted file mode 100644 index 43e0201e82..0000000000 --- a/app/sdks/0.7.0/server-deno/docs/examples/functions/list.md +++ /dev/null @@ -1,20 +0,0 @@ -import * as sdk from "https://deno.land/x/appwrite/mod.ts"; - -// 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-deno/docs/examples/functions/update-tag.md b/app/sdks/0.7.0/server-deno/docs/examples/functions/update-tag.md deleted file mode 100644 index cfa961cb25..0000000000 --- a/app/sdks/0.7.0/server-deno/docs/examples/functions/update-tag.md +++ /dev/null @@ -1,20 +0,0 @@ -import * as sdk from "https://deno.land/x/appwrite/mod.ts"; - -// 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-deno/docs/examples/functions/update.md b/app/sdks/0.7.0/server-deno/docs/examples/functions/update.md deleted file mode 100644 index 579b6b7d21..0000000000 --- a/app/sdks/0.7.0/server-deno/docs/examples/functions/update.md +++ /dev/null @@ -1,20 +0,0 @@ -import * as sdk from "https://deno.land/x/appwrite/mod.ts"; - -// 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-deno/docs/examples/health/get-anti-virus.md b/app/sdks/0.7.0/server-deno/docs/examples/health/get-anti-virus.md deleted file mode 100644 index e06fbf86de..0000000000 --- a/app/sdks/0.7.0/server-deno/docs/examples/health/get-anti-virus.md +++ /dev/null @@ -1,20 +0,0 @@ -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 deleted file mode 100644 index b58ca1bc15..0000000000 --- a/app/sdks/0.7.0/server-deno/docs/examples/health/get-cache.md +++ /dev/null @@ -1,20 +0,0 @@ -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 deleted file mode 100644 index 946cfb03a8..0000000000 --- a/app/sdks/0.7.0/server-deno/docs/examples/health/get-d-b.md +++ /dev/null @@ -1,20 +0,0 @@ -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 deleted file mode 100644 index a86358bb22..0000000000 --- a/app/sdks/0.7.0/server-deno/docs/examples/health/get-queue-certificates.md +++ /dev/null @@ -1,20 +0,0 @@ -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 deleted file mode 100644 index 033248b118..0000000000 --- a/app/sdks/0.7.0/server-deno/docs/examples/health/get-queue-functions.md +++ /dev/null @@ -1,20 +0,0 @@ -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 deleted file mode 100644 index d4c3300a35..0000000000 --- a/app/sdks/0.7.0/server-deno/docs/examples/health/get-queue-logs.md +++ /dev/null @@ -1,20 +0,0 @@ -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 deleted file mode 100644 index 01e3094ffc..0000000000 --- a/app/sdks/0.7.0/server-deno/docs/examples/health/get-queue-tasks.md +++ /dev/null @@ -1,20 +0,0 @@ -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 deleted file mode 100644 index d0d8faf7b6..0000000000 --- a/app/sdks/0.7.0/server-deno/docs/examples/health/get-queue-usage.md +++ /dev/null @@ -1,20 +0,0 @@ -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 deleted file mode 100644 index 268c521373..0000000000 --- a/app/sdks/0.7.0/server-deno/docs/examples/health/get-queue-webhooks.md +++ /dev/null @@ -1,20 +0,0 @@ -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 deleted file mode 100644 index 77bb658f9a..0000000000 --- a/app/sdks/0.7.0/server-deno/docs/examples/health/get-storage-local.md +++ /dev/null @@ -1,20 +0,0 @@ -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 deleted file mode 100644 index 0e5205b075..0000000000 --- a/app/sdks/0.7.0/server-deno/docs/examples/health/get-time.md +++ /dev/null @@ -1,20 +0,0 @@ -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 deleted file mode 100644 index c2e6ecdf65..0000000000 --- a/app/sdks/0.7.0/server-deno/docs/examples/health/get.md +++ /dev/null @@ -1,20 +0,0 @@ -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 deleted file mode 100644 index 18221d44b4..0000000000 --- a/app/sdks/0.7.0/server-deno/docs/examples/locale/get-continents.md +++ /dev/null @@ -1,20 +0,0 @@ -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 deleted file mode 100644 index 4a3e49f755..0000000000 --- a/app/sdks/0.7.0/server-deno/docs/examples/locale/get-countries-e-u.md +++ /dev/null @@ -1,20 +0,0 @@ -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 deleted file mode 100644 index 61a1790806..0000000000 --- a/app/sdks/0.7.0/server-deno/docs/examples/locale/get-countries-phones.md +++ /dev/null @@ -1,20 +0,0 @@ -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 deleted file mode 100644 index 20f544e617..0000000000 --- a/app/sdks/0.7.0/server-deno/docs/examples/locale/get-countries.md +++ /dev/null @@ -1,20 +0,0 @@ -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 deleted file mode 100644 index 13b975291d..0000000000 --- a/app/sdks/0.7.0/server-deno/docs/examples/locale/get-currencies.md +++ /dev/null @@ -1,20 +0,0 @@ -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-languages.md b/app/sdks/0.7.0/server-deno/docs/examples/locale/get-languages.md deleted file mode 100644 index 95c5c6b355..0000000000 --- a/app/sdks/0.7.0/server-deno/docs/examples/locale/get-languages.md +++ /dev/null @@ -1,20 +0,0 @@ -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.getLanguages(); - -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 deleted file mode 100644 index 2336c3289d..0000000000 --- a/app/sdks/0.7.0/server-deno/docs/examples/locale/get.md +++ /dev/null @@ -1,20 +0,0 @@ -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 deleted file mode 100644 index 5b446e1a38..0000000000 --- a/app/sdks/0.7.0/server-deno/docs/examples/storage/create-file.md +++ /dev/null @@ -1,20 +0,0 @@ -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 deleted file mode 100644 index 6469308c74..0000000000 --- a/app/sdks/0.7.0/server-deno/docs/examples/storage/delete-file.md +++ /dev/null @@ -1,20 +0,0 @@ -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 deleted file mode 100644 index 4510257bad..0000000000 --- a/app/sdks/0.7.0/server-deno/docs/examples/storage/get-file-download.md +++ /dev/null @@ -1,20 +0,0 @@ -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 deleted file mode 100644 index 282fb30324..0000000000 --- a/app/sdks/0.7.0/server-deno/docs/examples/storage/get-file-preview.md +++ /dev/null @@ -1,20 +0,0 @@ -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 deleted file mode 100644 index 8af5391017..0000000000 --- a/app/sdks/0.7.0/server-deno/docs/examples/storage/get-file-view.md +++ /dev/null @@ -1,20 +0,0 @@ -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 deleted file mode 100644 index 393ce229cb..0000000000 --- a/app/sdks/0.7.0/server-deno/docs/examples/storage/get-file.md +++ /dev/null @@ -1,20 +0,0 @@ -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 deleted file mode 100644 index 0e57cd01de..0000000000 --- a/app/sdks/0.7.0/server-deno/docs/examples/storage/list-files.md +++ /dev/null @@ -1,20 +0,0 @@ -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 deleted file mode 100644 index 33b2263540..0000000000 --- a/app/sdks/0.7.0/server-deno/docs/examples/storage/update-file.md +++ /dev/null @@ -1,20 +0,0 @@ -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 deleted file mode 100644 index b277899c91..0000000000 --- a/app/sdks/0.7.0/server-deno/docs/examples/teams/create-membership.md +++ /dev/null @@ -1,20 +0,0 @@ -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 deleted file mode 100644 index 1ef3e01b81..0000000000 --- a/app/sdks/0.7.0/server-deno/docs/examples/teams/create.md +++ /dev/null @@ -1,20 +0,0 @@ -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 deleted file mode 100644 index 911fa30075..0000000000 --- a/app/sdks/0.7.0/server-deno/docs/examples/teams/delete-membership.md +++ /dev/null @@ -1,20 +0,0 @@ -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 deleted file mode 100644 index 61ac03483f..0000000000 --- a/app/sdks/0.7.0/server-deno/docs/examples/teams/delete.md +++ /dev/null @@ -1,20 +0,0 @@ -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 deleted file mode 100644 index b652f8e4e5..0000000000 --- a/app/sdks/0.7.0/server-deno/docs/examples/teams/get-memberships.md +++ /dev/null @@ -1,20 +0,0 @@ -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 deleted file mode 100644 index 69496e3eef..0000000000 --- a/app/sdks/0.7.0/server-deno/docs/examples/teams/get.md +++ /dev/null @@ -1,20 +0,0 @@ -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 deleted file mode 100644 index 70851dda51..0000000000 --- a/app/sdks/0.7.0/server-deno/docs/examples/teams/list.md +++ /dev/null @@ -1,20 +0,0 @@ -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 deleted file mode 100644 index 7b815b4050..0000000000 --- a/app/sdks/0.7.0/server-deno/docs/examples/teams/update.md +++ /dev/null @@ -1,20 +0,0 @@ -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 deleted file mode 100644 index 593eee6e9f..0000000000 --- a/app/sdks/0.7.0/server-deno/docs/examples/users/create.md +++ /dev/null @@ -1,20 +0,0 @@ -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 deleted file mode 100644 index e4940773e4..0000000000 --- a/app/sdks/0.7.0/server-deno/docs/examples/users/delete-session.md +++ /dev/null @@ -1,20 +0,0 @@ -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 deleted file mode 100644 index e772c00a5f..0000000000 --- a/app/sdks/0.7.0/server-deno/docs/examples/users/delete-sessions.md +++ /dev/null @@ -1,20 +0,0 @@ -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/delete-user.md b/app/sdks/0.7.0/server-deno/docs/examples/users/delete-user.md deleted file mode 100644 index 657cf61bcb..0000000000 --- a/app/sdks/0.7.0/server-deno/docs/examples/users/delete-user.md +++ /dev/null @@ -1,20 +0,0 @@ -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.deleteUser('[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 deleted file mode 100644 index 58cc4fc529..0000000000 --- a/app/sdks/0.7.0/server-deno/docs/examples/users/get-logs.md +++ /dev/null @@ -1,20 +0,0 @@ -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 deleted file mode 100644 index 4cda0bb73e..0000000000 --- a/app/sdks/0.7.0/server-deno/docs/examples/users/get-prefs.md +++ /dev/null @@ -1,20 +0,0 @@ -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 deleted file mode 100644 index 6686e21564..0000000000 --- a/app/sdks/0.7.0/server-deno/docs/examples/users/get-sessions.md +++ /dev/null @@ -1,20 +0,0 @@ -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 deleted file mode 100644 index dce73d62c5..0000000000 --- a/app/sdks/0.7.0/server-deno/docs/examples/users/get.md +++ /dev/null @@ -1,20 +0,0 @@ -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 deleted file mode 100644 index b089c3e7e9..0000000000 --- a/app/sdks/0.7.0/server-deno/docs/examples/users/list.md +++ /dev/null @@ -1,20 +0,0 @@ -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 deleted file mode 100644 index b06185ee91..0000000000 --- a/app/sdks/0.7.0/server-deno/docs/examples/users/update-prefs.md +++ /dev/null @@ -1,20 +0,0 @@ -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 deleted file mode 100644 index a0f028bde5..0000000000 --- a/app/sdks/0.7.0/server-deno/docs/examples/users/update-status.md +++ /dev/null @@ -1,20 +0,0 @@ -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 deleted file mode 100644 index 3484edd93f..0000000000 --- a/app/sdks/0.7.0/server-deno/mod.ts +++ /dev/null @@ -1,21 +0,0 @@ -import { Client } from "./src/client.ts"; -import { Avatars } from "./src/services/avatars.ts"; -import { Database } from "./src/services/database.ts"; -import { Functions } from "./src/services/functions.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, - Functions, - 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 deleted file mode 100644 index 3bf22034b8..0000000000 --- a/app/sdks/0.7.0/server-deno/src/client.ts +++ /dev/null @@ -1,138 +0,0 @@ -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 deleted file mode 100644 index ceedf1a0c3..0000000000 --- a/app/sdks/0.7.0/server-deno/src/service.ts +++ /dev/null @@ -1,13 +0,0 @@ -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 deleted file mode 100644 index fc08624829..0000000000 --- a/app/sdks/0.7.0/server-deno/src/services/avatars.ts +++ /dev/null @@ -1,201 +0,0 @@ -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 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 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 Exception - * @return Promise - */ - async getInitials(name: string = '', width: number = 500, height: number = 500, color: string = '', background: string = ''): Promise { - let path = '/avatars/initials'; - - return await this.client.call('get', path, { - 'content-type': 'application/json', - }, - { - 'name': name, - 'width': width, - 'height': height, - 'color': color, - 'background': background - }); - } - - /** - * 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 Exception - * @return Promise - */ - async getQR(text: string, size: number = 400, margin: number = 1, download: boolean = false): 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 deleted file mode 100644 index 31b331b301..0000000000 --- a/app/sdks/0.7.0/server-deno/src/services/database.ts +++ /dev/null @@ -1,264 +0,0 @@ -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 limit - * @param number offset - * @param string orderField - * @param string orderType - * @param string orderCast - * @param string search - * @throws Exception - * @return Promise - */ - async listDocuments(collectionId: string, filters: Array = [], limit: number = 25, offset: number = 0, orderField: string = '', orderType: string = 'ASC', orderCast: string = 'string', search: string = ''): 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, - 'limit': limit, - 'offset': offset, - 'orderField': orderField, - 'orderType': orderType, - 'orderCast': orderCast, - 'search': search - }); - } - - /** - * 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, its 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', - }, - { - }); - } -} \ No newline at end of file diff --git a/app/sdks/0.7.0/server-deno/src/services/functions.ts b/app/sdks/0.7.0/server-deno/src/services/functions.ts deleted file mode 100644 index 265cbfab98..0000000000 --- a/app/sdks/0.7.0/server-deno/src/services/functions.ts +++ /dev/null @@ -1,279 +0,0 @@ -import { Service } from "../service.ts"; -import { DocumentData } from '../client.ts' - -export class Functions extends Service { - - /** - * List Functions - * - * @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 = '/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 string env - * @param DocumentData vars - * @param Array events - * @param string schedule - * @param number timeout - * @throws Exception - * @return Promise - */ - async create(name: string, env: string, vars: DocumentData = [], events: Array = [], schedule: string = '', timeout: number = 15): Promise { - let path = '/functions'; - - return await this.client.call('post', path, { - 'content-type': 'application/json', - }, - { - 'name': name, - 'env': env, - 'vars': vars, - 'events': events, - 'schedule': schedule, - 'timeout': timeout - }); - } - - /** - * Get Function - * - * @param string functionId - * @throws Exception - * @return Promise - */ - async get(functionId: string): Promise { - 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 DocumentData vars - * @param Array events - * @param string schedule - * @param number timeout - * @throws Exception - * @return Promise - */ - async update(functionId: string, name: string, vars: DocumentData = [], events: Array = [], schedule: string = '', timeout: number = 15): Promise { - 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 Promise - */ - async delete(functionId: string): Promise { - 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 Promise - */ - async listExecutions(functionId: string, search: string = '', limit: number = 25, offset: number = 0, orderType: string = 'ASC'): Promise { - 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 - * @throws Exception - * @return Promise - */ - async createExecution(functionId: string): Promise { - let path = '/functions/{functionId}/executions'.replace(new RegExp('{functionId}', 'g'), functionId); - - return await this.client.call('post', path, { - 'content-type': 'application/json', - }, - { - }); - } - - /** - * Get Execution - * - * @param string functionId - * @param string executionId - * @throws Exception - * @return Promise - */ - async getExecution(functionId: string, executionId: string): Promise { - 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 Promise - */ - async updateTag(functionId: string, tag: string): Promise { - 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 Promise - */ - async listTags(functionId: string, search: string = '', limit: number = 25, offset: number = 0, orderType: string = 'ASC'): Promise { - 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 command - * @param File | Blob code - * @throws Exception - * @return Promise - */ - async createTag(functionId: string, command: string, code: File | Blob): Promise { - let path = '/functions/{functionId}/tags'.replace(new RegExp('{functionId}', 'g'), functionId); - - return await this.client.call('post', path, { - 'content-type': 'multipart/form-data', - }, - { - 'command': command, - 'code': code - }); - } - - /** - * Get Tag - * - * @param string functionId - * @param string tagId - * @throws Exception - * @return Promise - */ - async getTag(functionId: string, tagId: string): Promise { - 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 Promise - */ - async deleteTag(functionId: string, tagId: string): Promise { - 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', - }, - { - }); - } -} \ 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 deleted file mode 100644 index df5c18a2cb..0000000000 --- a/app/sdks/0.7.0/server-deno/src/services/health.ts +++ /dev/null @@ -1,232 +0,0 @@ -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 deleted file mode 100644 index 9d8e066c70..0000000000 --- a/app/sdks/0.7.0/server-deno/src/services/locale.ts +++ /dev/null @@ -1,143 +0,0 @@ -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 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 Promise - */ - async getCurrencies(): Promise { - let path = '/locale/currencies'; - - return await this.client.call('get', path, { - 'content-type': 'application/json', - }, - { - }); - } - - /** - * 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 Promise - */ - async getLanguages(): Promise { - let path = '/locale/languages'; - - 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 deleted file mode 100644 index b663739e05..0000000000 --- a/app/sdks/0.7.0/server-deno/src/services/storage.ts +++ /dev/null @@ -1,198 +0,0 @@ -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 deleted file mode 100644 index 864e6f6ed4..0000000000 --- a/app/sdks/0.7.0/server-deno/src/services/teams.ts +++ /dev/null @@ -1,209 +0,0 @@ -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 - * @param string search - * @param number limit - * @param number offset - * @param string orderType - * @throws Exception - * @return Promise - */ - async getMemberships(teamId: string, search: string = '', limit: number = 25, offset: number = 0, orderType: string = 'ASC'): Promise { - let path = '/teams/{teamId}/memberships'.replace(new RegExp('{teamId}', 'g'), teamId); - - return await this.client.call('get', path, { - 'content-type': 'application/json', - }, - { - 'search': search, - 'limit': limit, - 'offset': offset, - 'orderType': orderType - }); - } - - /** - * 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 it is not accepted. - * - * @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 deleted file mode 100644 index 0db02d83cd..0000000000 --- a/app/sdks/0.7.0/server-deno/src/services/users.ts +++ /dev/null @@ -1,233 +0,0 @@ -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', - }, - { - }); - } - - /** - * Delete User - * - * Delete a user by its unique ID. - * - * @param string userId - * @throws Exception - * @return Promise - */ - async deleteUser(userId: string): Promise { - let path = '/users/{userId}'.replace(new RegExp('{userId}', 'g'), userId); - - return await this.client.call('delete', 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-nodejs/CHANGELOG.md b/app/sdks/0.7.0/server-nodejs/CHANGELOG.md deleted file mode 100644 index fa4d35e687..0000000000 --- a/app/sdks/0.7.0/server-nodejs/CHANGELOG.md +++ /dev/null @@ -1 +0,0 @@ -# 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 deleted file mode 100644 index fc7c051a91..0000000000 --- a/app/sdks/0.7.0/server-nodejs/LICENSE +++ /dev/null @@ -1,12 +0,0 @@ -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 deleted file mode 100644 index 130f0362d3..0000000000 --- a/app/sdks/0.7.0/server-nodejs/README.md +++ /dev/null @@ -1,28 +0,0 @@ -# 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.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 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 deleted file mode 100644 index 2a670ce08b..0000000000 --- a/app/sdks/0.7.0/server-nodejs/docs/examples/avatars/get-browser.md +++ /dev/null @@ -1,20 +0,0 @@ -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 deleted file mode 100644 index afd38f5a97..0000000000 --- a/app/sdks/0.7.0/server-nodejs/docs/examples/avatars/get-credit-card.md +++ /dev/null @@ -1,20 +0,0 @@ -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 deleted file mode 100644 index bb347371d4..0000000000 --- a/app/sdks/0.7.0/server-nodejs/docs/examples/avatars/get-favicon.md +++ /dev/null @@ -1,20 +0,0 @@ -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 deleted file mode 100644 index db677bc4f8..0000000000 --- a/app/sdks/0.7.0/server-nodejs/docs/examples/avatars/get-flag.md +++ /dev/null @@ -1,20 +0,0 @@ -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 deleted file mode 100644 index efa871ea63..0000000000 --- a/app/sdks/0.7.0/server-nodejs/docs/examples/avatars/get-image.md +++ /dev/null @@ -1,20 +0,0 @@ -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-initials.md b/app/sdks/0.7.0/server-nodejs/docs/examples/avatars/get-initials.md deleted file mode 100644 index d6175bff13..0000000000 --- a/app/sdks/0.7.0/server-nodejs/docs/examples/avatars/get-initials.md +++ /dev/null @@ -1,20 +0,0 @@ -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.getInitials(); - -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 deleted file mode 100644 index e79b3235af..0000000000 --- a/app/sdks/0.7.0/server-nodejs/docs/examples/avatars/get-q-r.md +++ /dev/null @@ -1,20 +0,0 @@ -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 deleted file mode 100644 index c0207f30f0..0000000000 --- a/app/sdks/0.7.0/server-nodejs/docs/examples/database/create-collection.md +++ /dev/null @@ -1,20 +0,0 @@ -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 deleted file mode 100644 index 8676dfb84d..0000000000 --- a/app/sdks/0.7.0/server-nodejs/docs/examples/database/create-document.md +++ /dev/null @@ -1,20 +0,0 @@ -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 deleted file mode 100644 index 503da98a73..0000000000 --- a/app/sdks/0.7.0/server-nodejs/docs/examples/database/delete-collection.md +++ /dev/null @@ -1,20 +0,0 @@ -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 deleted file mode 100644 index f14c985e83..0000000000 --- a/app/sdks/0.7.0/server-nodejs/docs/examples/database/delete-document.md +++ /dev/null @@ -1,20 +0,0 @@ -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.md b/app/sdks/0.7.0/server-nodejs/docs/examples/database/get-collection.md deleted file mode 100644 index a14ce0d49a..0000000000 --- a/app/sdks/0.7.0/server-nodejs/docs/examples/database/get-collection.md +++ /dev/null @@ -1,20 +0,0 @@ -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 deleted file mode 100644 index 55cce32b9b..0000000000 --- a/app/sdks/0.7.0/server-nodejs/docs/examples/database/get-document.md +++ /dev/null @@ -1,20 +0,0 @@ -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 deleted file mode 100644 index bacfdb062c..0000000000 --- a/app/sdks/0.7.0/server-nodejs/docs/examples/database/list-collections.md +++ /dev/null @@ -1,20 +0,0 @@ -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 deleted file mode 100644 index ad02d05e2a..0000000000 --- a/app/sdks/0.7.0/server-nodejs/docs/examples/database/list-documents.md +++ /dev/null @@ -1,20 +0,0 @@ -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 deleted file mode 100644 index eb9326565a..0000000000 --- a/app/sdks/0.7.0/server-nodejs/docs/examples/database/update-collection.md +++ /dev/null @@ -1,20 +0,0 @@ -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 deleted file mode 100644 index 131722cd26..0000000000 --- a/app/sdks/0.7.0/server-nodejs/docs/examples/database/update-document.md +++ /dev/null @@ -1,20 +0,0 @@ -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 deleted file mode 100644 index 895b70cd1b..0000000000 --- a/app/sdks/0.7.0/server-nodejs/docs/examples/functions/create-execution.md +++ /dev/null @@ -1,20 +0,0 @@ -const sdk = require('node-appwrite'); - -// Init SDK -let client = new sdk.Client(); - -let functions = new sdk.Functions(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 = 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 deleted file mode 100644 index 7949790f16..0000000000 --- a/app/sdks/0.7.0/server-nodejs/docs/examples/functions/create-tag.md +++ /dev/null @@ -1,21 +0,0 @@ -const sdk = require('node-appwrite'); -const fs = require('fs'); - -// Init SDK -let client = new sdk.Client(); - -let functions = new sdk.Functions(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 = functions.createTag('[FUNCTION_ID]', '[COMMAND]', 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/functions/create.md b/app/sdks/0.7.0/server-nodejs/docs/examples/functions/create.md deleted file mode 100644 index 1e1a255bc2..0000000000 --- a/app/sdks/0.7.0/server-nodejs/docs/examples/functions/create.md +++ /dev/null @@ -1,20 +0,0 @@ -const sdk = require('node-appwrite'); - -// Init SDK -let client = new sdk.Client(); - -let functions = new sdk.Functions(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 = functions.create('[NAME]', 'node-14'); - -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 deleted file mode 100644 index 938bb5cc19..0000000000 --- a/app/sdks/0.7.0/server-nodejs/docs/examples/functions/delete-tag.md +++ /dev/null @@ -1,20 +0,0 @@ -const sdk = require('node-appwrite'); - -// Init SDK -let client = new sdk.Client(); - -let functions = new sdk.Functions(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 = 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 deleted file mode 100644 index 6f079cb7f7..0000000000 --- a/app/sdks/0.7.0/server-nodejs/docs/examples/functions/delete.md +++ /dev/null @@ -1,20 +0,0 @@ -const sdk = require('node-appwrite'); - -// Init SDK -let client = new sdk.Client(); - -let functions = new sdk.Functions(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 = 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 deleted file mode 100644 index 1e2f5ea88a..0000000000 --- a/app/sdks/0.7.0/server-nodejs/docs/examples/functions/get-execution.md +++ /dev/null @@ -1,20 +0,0 @@ -const sdk = require('node-appwrite'); - -// Init SDK -let client = new sdk.Client(); - -let functions = new sdk.Functions(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 = 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 deleted file mode 100644 index a016699a11..0000000000 --- a/app/sdks/0.7.0/server-nodejs/docs/examples/functions/get-tag.md +++ /dev/null @@ -1,20 +0,0 @@ -const sdk = require('node-appwrite'); - -// Init SDK -let client = new sdk.Client(); - -let functions = new sdk.Functions(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 = 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 deleted file mode 100644 index 620deec88c..0000000000 --- a/app/sdks/0.7.0/server-nodejs/docs/examples/functions/get.md +++ /dev/null @@ -1,20 +0,0 @@ -const sdk = require('node-appwrite'); - -// Init SDK -let client = new sdk.Client(); - -let functions = new sdk.Functions(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 = 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 deleted file mode 100644 index 40c44b12e5..0000000000 --- a/app/sdks/0.7.0/server-nodejs/docs/examples/functions/list-executions.md +++ /dev/null @@ -1,20 +0,0 @@ -const sdk = require('node-appwrite'); - -// Init SDK -let client = new sdk.Client(); - -let functions = new sdk.Functions(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 = 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 deleted file mode 100644 index c9c043a8b4..0000000000 --- a/app/sdks/0.7.0/server-nodejs/docs/examples/functions/list-tags.md +++ /dev/null @@ -1,20 +0,0 @@ -const sdk = require('node-appwrite'); - -// Init SDK -let client = new sdk.Client(); - -let functions = new sdk.Functions(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 = 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 deleted file mode 100644 index 9ecd37237d..0000000000 --- a/app/sdks/0.7.0/server-nodejs/docs/examples/functions/list.md +++ /dev/null @@ -1,20 +0,0 @@ -const sdk = require('node-appwrite'); - -// Init SDK -let client = new sdk.Client(); - -let functions = new sdk.Functions(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 = 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-tag.md b/app/sdks/0.7.0/server-nodejs/docs/examples/functions/update-tag.md deleted file mode 100644 index 0ea180e1d9..0000000000 --- a/app/sdks/0.7.0/server-nodejs/docs/examples/functions/update-tag.md +++ /dev/null @@ -1,20 +0,0 @@ -const sdk = require('node-appwrite'); - -// Init SDK -let client = new sdk.Client(); - -let functions = new sdk.Functions(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 = 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 deleted file mode 100644 index 209346ef89..0000000000 --- a/app/sdks/0.7.0/server-nodejs/docs/examples/functions/update.md +++ /dev/null @@ -1,20 +0,0 @@ -const sdk = require('node-appwrite'); - -// Init SDK -let client = new sdk.Client(); - -let functions = new sdk.Functions(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 = 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 deleted file mode 100644 index c08e612bcf..0000000000 --- a/app/sdks/0.7.0/server-nodejs/docs/examples/health/get-anti-virus.md +++ /dev/null @@ -1,20 +0,0 @@ -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 deleted file mode 100644 index d19cc8abd5..0000000000 --- a/app/sdks/0.7.0/server-nodejs/docs/examples/health/get-cache.md +++ /dev/null @@ -1,20 +0,0 @@ -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 deleted file mode 100644 index 08505367d4..0000000000 --- a/app/sdks/0.7.0/server-nodejs/docs/examples/health/get-d-b.md +++ /dev/null @@ -1,20 +0,0 @@ -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 deleted file mode 100644 index 2eb69e0126..0000000000 --- a/app/sdks/0.7.0/server-nodejs/docs/examples/health/get-queue-certificates.md +++ /dev/null @@ -1,20 +0,0 @@ -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 deleted file mode 100644 index 9470e11646..0000000000 --- a/app/sdks/0.7.0/server-nodejs/docs/examples/health/get-queue-functions.md +++ /dev/null @@ -1,20 +0,0 @@ -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 deleted file mode 100644 index 10f1cb24e3..0000000000 --- a/app/sdks/0.7.0/server-nodejs/docs/examples/health/get-queue-logs.md +++ /dev/null @@ -1,20 +0,0 @@ -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 deleted file mode 100644 index c159f4e6ee..0000000000 --- a/app/sdks/0.7.0/server-nodejs/docs/examples/health/get-queue-tasks.md +++ /dev/null @@ -1,20 +0,0 @@ -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 deleted file mode 100644 index 6286c741ee..0000000000 --- a/app/sdks/0.7.0/server-nodejs/docs/examples/health/get-queue-usage.md +++ /dev/null @@ -1,20 +0,0 @@ -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 deleted file mode 100644 index 3a788eb895..0000000000 --- a/app/sdks/0.7.0/server-nodejs/docs/examples/health/get-queue-webhooks.md +++ /dev/null @@ -1,20 +0,0 @@ -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-local.md b/app/sdks/0.7.0/server-nodejs/docs/examples/health/get-storage-local.md deleted file mode 100644 index 84b8fb47a6..0000000000 --- a/app/sdks/0.7.0/server-nodejs/docs/examples/health/get-storage-local.md +++ /dev/null @@ -1,20 +0,0 @@ -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 deleted file mode 100644 index 563bf2fb52..0000000000 --- a/app/sdks/0.7.0/server-nodejs/docs/examples/health/get-time.md +++ /dev/null @@ -1,20 +0,0 @@ -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 deleted file mode 100644 index 20c3d40801..0000000000 --- a/app/sdks/0.7.0/server-nodejs/docs/examples/health/get.md +++ /dev/null @@ -1,20 +0,0 @@ -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 deleted file mode 100644 index 323237b4ab..0000000000 --- a/app/sdks/0.7.0/server-nodejs/docs/examples/locale/get-continents.md +++ /dev/null @@ -1,20 +0,0 @@ -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 deleted file mode 100644 index fc9170dba4..0000000000 --- a/app/sdks/0.7.0/server-nodejs/docs/examples/locale/get-countries-e-u.md +++ /dev/null @@ -1,20 +0,0 @@ -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 deleted file mode 100644 index 42be901677..0000000000 --- a/app/sdks/0.7.0/server-nodejs/docs/examples/locale/get-countries-phones.md +++ /dev/null @@ -1,20 +0,0 @@ -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 deleted file mode 100644 index 437c9bb502..0000000000 --- a/app/sdks/0.7.0/server-nodejs/docs/examples/locale/get-countries.md +++ /dev/null @@ -1,20 +0,0 @@ -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 deleted file mode 100644 index 1b7d605760..0000000000 --- a/app/sdks/0.7.0/server-nodejs/docs/examples/locale/get-currencies.md +++ /dev/null @@ -1,20 +0,0 @@ -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-languages.md b/app/sdks/0.7.0/server-nodejs/docs/examples/locale/get-languages.md deleted file mode 100644 index b6f45311b3..0000000000 --- a/app/sdks/0.7.0/server-nodejs/docs/examples/locale/get-languages.md +++ /dev/null @@ -1,20 +0,0 @@ -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.getLanguages(); - -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 deleted file mode 100644 index 2f2eb95d90..0000000000 --- a/app/sdks/0.7.0/server-nodejs/docs/examples/locale/get.md +++ /dev/null @@ -1,20 +0,0 @@ -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 deleted file mode 100644 index 1eda9fd868..0000000000 --- a/app/sdks/0.7.0/server-nodejs/docs/examples/storage/create-file.md +++ /dev/null @@ -1,21 +0,0 @@ -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 deleted file mode 100644 index 9ce0ff7f2e..0000000000 --- a/app/sdks/0.7.0/server-nodejs/docs/examples/storage/delete-file.md +++ /dev/null @@ -1,20 +0,0 @@ -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 deleted file mode 100644 index 1683ed87e0..0000000000 --- a/app/sdks/0.7.0/server-nodejs/docs/examples/storage/get-file-download.md +++ /dev/null @@ -1,20 +0,0 @@ -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 deleted file mode 100644 index 771dcd35f0..0000000000 --- a/app/sdks/0.7.0/server-nodejs/docs/examples/storage/get-file-preview.md +++ /dev/null @@ -1,20 +0,0 @@ -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 deleted file mode 100644 index 83029ecdee..0000000000 --- a/app/sdks/0.7.0/server-nodejs/docs/examples/storage/get-file-view.md +++ /dev/null @@ -1,20 +0,0 @@ -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 deleted file mode 100644 index 2a76fdf189..0000000000 --- a/app/sdks/0.7.0/server-nodejs/docs/examples/storage/get-file.md +++ /dev/null @@ -1,20 +0,0 @@ -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 deleted file mode 100644 index e11fd95300..0000000000 --- a/app/sdks/0.7.0/server-nodejs/docs/examples/storage/list-files.md +++ /dev/null @@ -1,20 +0,0 @@ -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 deleted file mode 100644 index 4726169146..0000000000 --- a/app/sdks/0.7.0/server-nodejs/docs/examples/storage/update-file.md +++ /dev/null @@ -1,20 +0,0 @@ -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 deleted file mode 100644 index cd17042e58..0000000000 --- a/app/sdks/0.7.0/server-nodejs/docs/examples/teams/create-membership.md +++ /dev/null @@ -1,20 +0,0 @@ -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 deleted file mode 100644 index c0d0611a49..0000000000 --- a/app/sdks/0.7.0/server-nodejs/docs/examples/teams/create.md +++ /dev/null @@ -1,20 +0,0 @@ -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 deleted file mode 100644 index f9a76f3ec0..0000000000 --- a/app/sdks/0.7.0/server-nodejs/docs/examples/teams/delete-membership.md +++ /dev/null @@ -1,20 +0,0 @@ -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 deleted file mode 100644 index e833fdfb9b..0000000000 --- a/app/sdks/0.7.0/server-nodejs/docs/examples/teams/delete.md +++ /dev/null @@ -1,20 +0,0 @@ -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 deleted file mode 100644 index 75cdf38e5c..0000000000 --- a/app/sdks/0.7.0/server-nodejs/docs/examples/teams/get-memberships.md +++ /dev/null @@ -1,20 +0,0 @@ -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 deleted file mode 100644 index a51322df27..0000000000 --- a/app/sdks/0.7.0/server-nodejs/docs/examples/teams/get.md +++ /dev/null @@ -1,20 +0,0 @@ -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 deleted file mode 100644 index 259bbd22b2..0000000000 --- a/app/sdks/0.7.0/server-nodejs/docs/examples/teams/list.md +++ /dev/null @@ -1,20 +0,0 @@ -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 deleted file mode 100644 index 2118e8a90f..0000000000 --- a/app/sdks/0.7.0/server-nodejs/docs/examples/teams/update.md +++ /dev/null @@ -1,20 +0,0 @@ -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 deleted file mode 100644 index 83704cbd9d..0000000000 --- a/app/sdks/0.7.0/server-nodejs/docs/examples/users/create.md +++ /dev/null @@ -1,20 +0,0 @@ -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 deleted file mode 100644 index 22308d4fa6..0000000000 --- a/app/sdks/0.7.0/server-nodejs/docs/examples/users/delete-session.md +++ /dev/null @@ -1,20 +0,0 @@ -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 deleted file mode 100644 index 75f8f96bda..0000000000 --- a/app/sdks/0.7.0/server-nodejs/docs/examples/users/delete-sessions.md +++ /dev/null @@ -1,20 +0,0 @@ -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/delete-user.md b/app/sdks/0.7.0/server-nodejs/docs/examples/users/delete-user.md deleted file mode 100644 index e72e600015..0000000000 --- a/app/sdks/0.7.0/server-nodejs/docs/examples/users/delete-user.md +++ /dev/null @@ -1,20 +0,0 @@ -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.deleteUser('[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 deleted file mode 100644 index 1287b5ef5f..0000000000 --- a/app/sdks/0.7.0/server-nodejs/docs/examples/users/get-logs.md +++ /dev/null @@ -1,20 +0,0 @@ -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 deleted file mode 100644 index 088e6b0811..0000000000 --- a/app/sdks/0.7.0/server-nodejs/docs/examples/users/get-prefs.md +++ /dev/null @@ -1,20 +0,0 @@ -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 deleted file mode 100644 index f5ad029ebe..0000000000 --- a/app/sdks/0.7.0/server-nodejs/docs/examples/users/get-sessions.md +++ /dev/null @@ -1,20 +0,0 @@ -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 deleted file mode 100644 index 5b91577284..0000000000 --- a/app/sdks/0.7.0/server-nodejs/docs/examples/users/get.md +++ /dev/null @@ -1,20 +0,0 @@ -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 deleted file mode 100644 index 0bc83b06bf..0000000000 --- a/app/sdks/0.7.0/server-nodejs/docs/examples/users/list.md +++ /dev/null @@ -1,20 +0,0 @@ -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 deleted file mode 100644 index 7d1011d6be..0000000000 --- a/app/sdks/0.7.0/server-nodejs/docs/examples/users/update-prefs.md +++ /dev/null @@ -1,20 +0,0 @@ -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 deleted file mode 100644 index 86f54381da..0000000000 --- a/app/sdks/0.7.0/server-nodejs/docs/examples/users/update-status.md +++ /dev/null @@ -1,20 +0,0 @@ -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 deleted file mode 100644 index deb571190d..0000000000 --- a/app/sdks/0.7.0/server-nodejs/index.js +++ /dev/null @@ -1,21 +0,0 @@ -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 deleted file mode 100644 index 821ef5f424..0000000000 --- a/app/sdks/0.7.0/server-nodejs/lib/client.js +++ /dev/null @@ -1,152 +0,0 @@ -const URL = require('url').URL; -const axios = require('axios'); -const FormData = require('form-data'); - -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 formData = null; - - // Compute FormData for axios and appwrite. - if (contentType.startsWith('multipart/form-data')) { - const form = new FormData(); - - let flatParams = this.flatten(params); - - for (const key in flatParams) { - form.append(key, flatParams[key]) - } - - headers = { - ...headers, - ...form.getHeaders() - }; - - formData = form; - } - - let options = { - method: method.toUpperCase(), - url: this.endpoint + path, - params: (method.toUpperCase() === 'GET') ? params : {}, - headers: headers, - data: (method.toUpperCase() === 'GET' || contentType.startsWith('multipart/form-data')) ? formData : params, - json: (contentType.startsWith('application/json')) - }; - - let response = await axios(options); - - return response.data; - } - - 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 deleted file mode 100644 index e799c064be..0000000000 --- a/app/sdks/0.7.0/server-nodejs/lib/service.js +++ /dev/null @@ -1,10 +0,0 @@ -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 deleted file mode 100644 index 0227b2ac7f..0000000000 --- a/app/sdks/0.7.0/server-nodejs/lib/services/avatars.js +++ /dev/null @@ -1,202 +0,0 @@ -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 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 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 Exception - * @return {} - */ - async getInitials(name = '', width = 500, height = 500, color = '', background = '') { - let path = '/avatars/initials'; - - return await this.client.call('get', path, { - 'content-type': 'application/json', - }, - { - 'name': name, - 'width': width, - 'height': height, - 'color': color, - 'background': background - }); - } - - /** - * 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 Exception - * @return {} - */ - async getQR(text, size = 400, margin = 1, download = false) { - 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 deleted file mode 100644 index ee5f3de22e..0000000000 --- a/app/sdks/0.7.0/server-nodejs/lib/services/database.js +++ /dev/null @@ -1,265 +0,0 @@ -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 limit - * @param number offset - * @param string orderField - * @param string orderType - * @param string orderCast - * @param string search - * @throws Exception - * @return {} - */ - async listDocuments(collectionId, filters = [], limit = 25, offset = 0, orderField = '', orderType = 'ASC', orderCast = 'string', search = '') { - 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, - 'limit': limit, - 'offset': offset, - 'orderField': orderField, - 'orderType': orderType, - 'orderCast': orderCast, - 'search': search - }); - } - - /** - * 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 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, its 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', - }, - { - }); - } -} - -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 deleted file mode 100644 index 95e4626b33..0000000000 --- a/app/sdks/0.7.0/server-nodejs/lib/services/functions.js +++ /dev/null @@ -1,280 +0,0 @@ -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 string env - * @param object vars - * @param string[] events - * @param string schedule - * @param number timeout - * @throws Exception - * @return {} - */ - async create(name, env, vars = [], events = [], schedule = '', timeout = 15) { - let path = '/functions'; - - return await this.client.call('post', path, { - 'content-type': 'application/json', - }, - { - 'name': name, - 'env': env, - '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 - * @throws Exception - * @return {} - */ - async createExecution(functionId) { - let path = '/functions/{functionId}/executions'.replace(new RegExp('{functionId}', 'g'), functionId); - - return await this.client.call('post', path, { - 'content-type': 'application/json', - }, - { - }); - } - - /** - * 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 command - * @param File code - * @throws Exception - * @return {} - */ - async createTag(functionId, command, code) { - let path = '/functions/{functionId}/tags'.replace(new RegExp('{functionId}', 'g'), functionId); - - return await this.client.call('post', path, { - 'content-type': 'multipart/form-data', - }, - { - '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 deleted file mode 100644 index a0aed052ce..0000000000 --- a/app/sdks/0.7.0/server-nodejs/lib/services/health.js +++ /dev/null @@ -1,233 +0,0 @@ -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 deleted file mode 100644 index 8bb45bf45e..0000000000 --- a/app/sdks/0.7.0/server-nodejs/lib/services/locale.js +++ /dev/null @@ -1,144 +0,0 @@ -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 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 {} - */ - async getCurrencies() { - let path = '/locale/currencies'; - - return await this.client.call('get', path, { - 'content-type': 'application/json', - }, - { - }); - } - - /** - * 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 {} - */ - async getLanguages() { - let path = '/locale/languages'; - - 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 deleted file mode 100644 index 2b670db31a..0000000000 --- a/app/sdks/0.7.0/server-nodejs/lib/services/storage.js +++ /dev/null @@ -1,199 +0,0 @@ -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 deleted file mode 100644 index 30025efef4..0000000000 --- a/app/sdks/0.7.0/server-nodejs/lib/services/teams.js +++ /dev/null @@ -1,210 +0,0 @@ -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 - * @param string search - * @param number limit - * @param number offset - * @param string orderType - * @throws Exception - * @return {} - */ - async getMemberships(teamId, search = '', limit = 25, offset = 0, orderType = 'ASC') { - let path = '/teams/{teamId}/memberships'.replace(new RegExp('{teamId}', 'g'), teamId); - - return await this.client.call('get', path, { - 'content-type': 'application/json', - }, - { - 'search': search, - 'limit': limit, - 'offset': offset, - 'orderType': orderType - }); - } - - /** - * 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 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 it is not accepted. - * - * @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 deleted file mode 100644 index 7beea9d4f5..0000000000 --- a/app/sdks/0.7.0/server-nodejs/lib/services/users.js +++ /dev/null @@ -1,234 +0,0 @@ -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', - }, - { - }); - } - - /** - * Delete User - * - * Delete a user by its unique ID. - * - * @param string userId - * @throws Exception - * @return {} - */ - async deleteUser(userId) { - let path = '/users/{userId}'.replace(new RegExp('{userId}', 'g'), userId); - - return await this.client.call('delete', 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 deleted file mode 100644 index c38677a33b..0000000000 --- a/app/sdks/0.7.0/server-nodejs/package.json +++ /dev/null @@ -1,17 +0,0 @@ -{ - "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": { - "axios": "^0.20.0", - "form-data": "^3.0.0" - } -} \ 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 deleted file mode 100644 index fa4d35e687..0000000000 --- a/app/sdks/0.7.0/server-php/CHANGELOG.md +++ /dev/null @@ -1 +0,0 @@ -# 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 deleted file mode 100644 index fc7c051a91..0000000000 --- a/app/sdks/0.7.0/server-php/LICENSE +++ /dev/null @@ -1,12 +0,0 @@ -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 deleted file mode 100644 index 518f26e933..0000000000 --- a/app/sdks/0.7.0/server-php/README.md +++ /dev/null @@ -1,28 +0,0 @@ -# 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.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 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 deleted file mode 100644 index fc13cb3bed..0000000000 --- a/app/sdks/0.7.0/server-php/composer.json +++ /dev/null @@ -1,26 +0,0 @@ -{ - "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@appwrite.io" - }, - "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 deleted file mode 100644 index b143d0bb07..0000000000 --- a/app/sdks/0.7.0/server-php/docs/avatars.md +++ /dev/null @@ -1,121 +0,0 @@ -# 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, mir, maestro. | | -| 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 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. Max length: 128 chars. | | -| 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/server-php/docs/database.md b/app/sdks/0.7.0/server-php/docs/database.md deleted file mode 100644 index 6c9110a89a..0000000000 --- a/app/sdks/0.7.0/server-php/docs/database.md +++ /dev/null @@ -1,169 +0,0 @@ -# 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. Max length: 256 chars. | | -| 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. Max length: 128 chars. | | -| 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. Max length: 128 chars. | | -| 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/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. By default will return maximum 25 results. Maximum of 100 results allowed per request. | 25 | -| offset | integer | Offset value. The default value is 0. Use this param to manage pagination. | 0 | -| orderField | string | Document field that results will be sorted by. | | -| 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. Max length: 256 chars. | | - -## 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. | | -| 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/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, its 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/server-php/docs/examples/avatars/get-browser.md b/app/sdks/0.7.0/server-php/docs/examples/avatars/get-browser.md deleted file mode 100644 index 795d79157e..0000000000 --- a/app/sdks/0.7.0/server-php/docs/examples/avatars/get-browser.md +++ /dev/null @@ -1,16 +0,0 @@ -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 deleted file mode 100644 index 33879d0179..0000000000 --- a/app/sdks/0.7.0/server-php/docs/examples/avatars/get-credit-card.md +++ /dev/null @@ -1,16 +0,0 @@ -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 deleted file mode 100644 index dee19dbf04..0000000000 --- a/app/sdks/0.7.0/server-php/docs/examples/avatars/get-favicon.md +++ /dev/null @@ -1,16 +0,0 @@ -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 deleted file mode 100644 index d70d7e43ec..0000000000 --- a/app/sdks/0.7.0/server-php/docs/examples/avatars/get-flag.md +++ /dev/null @@ -1,16 +0,0 @@ -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 deleted file mode 100644 index a46b9fbe37..0000000000 --- a/app/sdks/0.7.0/server-php/docs/examples/avatars/get-image.md +++ /dev/null @@ -1,16 +0,0 @@ -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-initials.md b/app/sdks/0.7.0/server-php/docs/examples/avatars/get-initials.md deleted file mode 100644 index f5e549ace6..0000000000 --- a/app/sdks/0.7.0/server-php/docs/examples/avatars/get-initials.md +++ /dev/null @@ -1,16 +0,0 @@ -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->getInitials(); \ 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 deleted file mode 100644 index 95b5a6d7b3..0000000000 --- a/app/sdks/0.7.0/server-php/docs/examples/avatars/get-q-r.md +++ /dev/null @@ -1,16 +0,0 @@ -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 deleted file mode 100644 index 276d5049fe..0000000000 --- a/app/sdks/0.7.0/server-php/docs/examples/database/create-collection.md +++ /dev/null @@ -1,16 +0,0 @@ -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 deleted file mode 100644 index 6c32cdf950..0000000000 --- a/app/sdks/0.7.0/server-php/docs/examples/database/create-document.md +++ /dev/null @@ -1,16 +0,0 @@ -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 deleted file mode 100644 index 4018420188..0000000000 --- a/app/sdks/0.7.0/server-php/docs/examples/database/delete-collection.md +++ /dev/null @@ -1,16 +0,0 @@ -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 deleted file mode 100644 index 3ed45d6ee1..0000000000 --- a/app/sdks/0.7.0/server-php/docs/examples/database/delete-document.md +++ /dev/null @@ -1,16 +0,0 @@ -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.md b/app/sdks/0.7.0/server-php/docs/examples/database/get-collection.md deleted file mode 100644 index a088b24bb6..0000000000 --- a/app/sdks/0.7.0/server-php/docs/examples/database/get-collection.md +++ /dev/null @@ -1,16 +0,0 @@ -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 deleted file mode 100644 index d506bd8414..0000000000 --- a/app/sdks/0.7.0/server-php/docs/examples/database/get-document.md +++ /dev/null @@ -1,16 +0,0 @@ -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 deleted file mode 100644 index 4f4aa1b775..0000000000 --- a/app/sdks/0.7.0/server-php/docs/examples/database/list-collections.md +++ /dev/null @@ -1,16 +0,0 @@ -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 deleted file mode 100644 index 359da4ce33..0000000000 --- a/app/sdks/0.7.0/server-php/docs/examples/database/list-documents.md +++ /dev/null @@ -1,16 +0,0 @@ -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 deleted file mode 100644 index 70d596066a..0000000000 --- a/app/sdks/0.7.0/server-php/docs/examples/database/update-collection.md +++ /dev/null @@ -1,16 +0,0 @@ -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 deleted file mode 100644 index 4389034640..0000000000 --- a/app/sdks/0.7.0/server-php/docs/examples/database/update-document.md +++ /dev/null @@ -1,16 +0,0 @@ -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 deleted file mode 100644 index 422331a0df..0000000000 --- a/app/sdks/0.7.0/server-php/docs/examples/functions/create-execution.md +++ /dev/null @@ -1,16 +0,0 @@ -setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint - ->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 deleted file mode 100644 index 72007a7d4f..0000000000 --- a/app/sdks/0.7.0/server-php/docs/examples/functions/create-tag.md +++ /dev/null @@ -1,16 +0,0 @@ -setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint - ->setProject('5df5acd0d48c2') // Your project ID - ->setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key -; - -$functions = new Functions($client); - -$result = $functions->createTag('[FUNCTION_ID]', '[COMMAND]', 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/functions/create.md b/app/sdks/0.7.0/server-php/docs/examples/functions/create.md deleted file mode 100644 index 2e7b8ea044..0000000000 --- a/app/sdks/0.7.0/server-php/docs/examples/functions/create.md +++ /dev/null @@ -1,16 +0,0 @@ -setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint - ->setProject('5df5acd0d48c2') // Your project ID - ->setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key -; - -$functions = new Functions($client); - -$result = $functions->create('[NAME]', 'node-14'); \ 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 deleted file mode 100644 index 0a47accec9..0000000000 --- a/app/sdks/0.7.0/server-php/docs/examples/functions/delete-tag.md +++ /dev/null @@ -1,16 +0,0 @@ -setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint - ->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 deleted file mode 100644 index 319856522e..0000000000 --- a/app/sdks/0.7.0/server-php/docs/examples/functions/delete.md +++ /dev/null @@ -1,16 +0,0 @@ -setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint - ->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 deleted file mode 100644 index b02cfa08f7..0000000000 --- a/app/sdks/0.7.0/server-php/docs/examples/functions/get-execution.md +++ /dev/null @@ -1,16 +0,0 @@ -setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint - ->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 deleted file mode 100644 index 5cee355f7e..0000000000 --- a/app/sdks/0.7.0/server-php/docs/examples/functions/get-tag.md +++ /dev/null @@ -1,16 +0,0 @@ -setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint - ->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 deleted file mode 100644 index 06ddece1ca..0000000000 --- a/app/sdks/0.7.0/server-php/docs/examples/functions/get.md +++ /dev/null @@ -1,16 +0,0 @@ -setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint - ->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 deleted file mode 100644 index 4417fc8860..0000000000 --- a/app/sdks/0.7.0/server-php/docs/examples/functions/list-executions.md +++ /dev/null @@ -1,16 +0,0 @@ -setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint - ->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 deleted file mode 100644 index ac652d5647..0000000000 --- a/app/sdks/0.7.0/server-php/docs/examples/functions/list-tags.md +++ /dev/null @@ -1,16 +0,0 @@ -setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint - ->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 deleted file mode 100644 index 3eaa8c567e..0000000000 --- a/app/sdks/0.7.0/server-php/docs/examples/functions/list.md +++ /dev/null @@ -1,16 +0,0 @@ -setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint - ->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-tag.md b/app/sdks/0.7.0/server-php/docs/examples/functions/update-tag.md deleted file mode 100644 index 42c74d4f95..0000000000 --- a/app/sdks/0.7.0/server-php/docs/examples/functions/update-tag.md +++ /dev/null @@ -1,16 +0,0 @@ -setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint - ->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 deleted file mode 100644 index c9ca3f5071..0000000000 --- a/app/sdks/0.7.0/server-php/docs/examples/functions/update.md +++ /dev/null @@ -1,16 +0,0 @@ -setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint - ->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 deleted file mode 100644 index 89a5fb2a7a..0000000000 --- a/app/sdks/0.7.0/server-php/docs/examples/health/get-anti-virus.md +++ /dev/null @@ -1,16 +0,0 @@ -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 deleted file mode 100644 index e654c26f51..0000000000 --- a/app/sdks/0.7.0/server-php/docs/examples/health/get-cache.md +++ /dev/null @@ -1,16 +0,0 @@ -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 deleted file mode 100644 index 2d37991a3d..0000000000 --- a/app/sdks/0.7.0/server-php/docs/examples/health/get-d-b.md +++ /dev/null @@ -1,16 +0,0 @@ -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 deleted file mode 100644 index 57f2c5793e..0000000000 --- a/app/sdks/0.7.0/server-php/docs/examples/health/get-queue-certificates.md +++ /dev/null @@ -1,16 +0,0 @@ -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 deleted file mode 100644 index 8ff6510e1c..0000000000 --- a/app/sdks/0.7.0/server-php/docs/examples/health/get-queue-functions.md +++ /dev/null @@ -1,16 +0,0 @@ -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 deleted file mode 100644 index fa723d7391..0000000000 --- a/app/sdks/0.7.0/server-php/docs/examples/health/get-queue-logs.md +++ /dev/null @@ -1,16 +0,0 @@ -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 deleted file mode 100644 index b8f1794a1a..0000000000 --- a/app/sdks/0.7.0/server-php/docs/examples/health/get-queue-tasks.md +++ /dev/null @@ -1,16 +0,0 @@ -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 deleted file mode 100644 index 371d02f5b4..0000000000 --- a/app/sdks/0.7.0/server-php/docs/examples/health/get-queue-usage.md +++ /dev/null @@ -1,16 +0,0 @@ -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 deleted file mode 100644 index af48a72d06..0000000000 --- a/app/sdks/0.7.0/server-php/docs/examples/health/get-queue-webhooks.md +++ /dev/null @@ -1,16 +0,0 @@ -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-local.md b/app/sdks/0.7.0/server-php/docs/examples/health/get-storage-local.md deleted file mode 100644 index eba15a1652..0000000000 --- a/app/sdks/0.7.0/server-php/docs/examples/health/get-storage-local.md +++ /dev/null @@ -1,16 +0,0 @@ -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 deleted file mode 100644 index 849f499460..0000000000 --- a/app/sdks/0.7.0/server-php/docs/examples/health/get-time.md +++ /dev/null @@ -1,16 +0,0 @@ -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 deleted file mode 100644 index 9f1ec8970c..0000000000 --- a/app/sdks/0.7.0/server-php/docs/examples/health/get.md +++ /dev/null @@ -1,16 +0,0 @@ -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 deleted file mode 100644 index bb099d31f5..0000000000 --- a/app/sdks/0.7.0/server-php/docs/examples/locale/get-continents.md +++ /dev/null @@ -1,16 +0,0 @@ -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 deleted file mode 100644 index 87287a5cea..0000000000 --- a/app/sdks/0.7.0/server-php/docs/examples/locale/get-countries-e-u.md +++ /dev/null @@ -1,16 +0,0 @@ -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 deleted file mode 100644 index 71a39303da..0000000000 --- a/app/sdks/0.7.0/server-php/docs/examples/locale/get-countries-phones.md +++ /dev/null @@ -1,16 +0,0 @@ -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 deleted file mode 100644 index 1c8f863a76..0000000000 --- a/app/sdks/0.7.0/server-php/docs/examples/locale/get-countries.md +++ /dev/null @@ -1,16 +0,0 @@ -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 deleted file mode 100644 index b799bf6b80..0000000000 --- a/app/sdks/0.7.0/server-php/docs/examples/locale/get-currencies.md +++ /dev/null @@ -1,16 +0,0 @@ -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-languages.md b/app/sdks/0.7.0/server-php/docs/examples/locale/get-languages.md deleted file mode 100644 index 47fdc6eb34..0000000000 --- a/app/sdks/0.7.0/server-php/docs/examples/locale/get-languages.md +++ /dev/null @@ -1,16 +0,0 @@ -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->getLanguages(); \ 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 deleted file mode 100644 index 8e11f17689..0000000000 --- a/app/sdks/0.7.0/server-php/docs/examples/locale/get.md +++ /dev/null @@ -1,16 +0,0 @@ -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 deleted file mode 100644 index ba533dd2e7..0000000000 --- a/app/sdks/0.7.0/server-php/docs/examples/storage/create-file.md +++ /dev/null @@ -1,16 +0,0 @@ -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 deleted file mode 100644 index 23d4013d22..0000000000 --- a/app/sdks/0.7.0/server-php/docs/examples/storage/delete-file.md +++ /dev/null @@ -1,16 +0,0 @@ -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 deleted file mode 100644 index 3064481141..0000000000 --- a/app/sdks/0.7.0/server-php/docs/examples/storage/get-file-download.md +++ /dev/null @@ -1,16 +0,0 @@ -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 deleted file mode 100644 index 00cb63696b..0000000000 --- a/app/sdks/0.7.0/server-php/docs/examples/storage/get-file-preview.md +++ /dev/null @@ -1,16 +0,0 @@ -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 deleted file mode 100644 index 07b7ab32ba..0000000000 --- a/app/sdks/0.7.0/server-php/docs/examples/storage/get-file-view.md +++ /dev/null @@ -1,16 +0,0 @@ -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 deleted file mode 100644 index c8b6495f18..0000000000 --- a/app/sdks/0.7.0/server-php/docs/examples/storage/get-file.md +++ /dev/null @@ -1,16 +0,0 @@ -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 deleted file mode 100644 index 787c38e320..0000000000 --- a/app/sdks/0.7.0/server-php/docs/examples/storage/list-files.md +++ /dev/null @@ -1,16 +0,0 @@ -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 deleted file mode 100644 index 7515217b97..0000000000 --- a/app/sdks/0.7.0/server-php/docs/examples/storage/update-file.md +++ /dev/null @@ -1,16 +0,0 @@ -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 deleted file mode 100644 index 9c88b1bba5..0000000000 --- a/app/sdks/0.7.0/server-php/docs/examples/teams/create-membership.md +++ /dev/null @@ -1,16 +0,0 @@ -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 deleted file mode 100644 index 7b0946bc83..0000000000 --- a/app/sdks/0.7.0/server-php/docs/examples/teams/create.md +++ /dev/null @@ -1,16 +0,0 @@ -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 deleted file mode 100644 index ca9d3d57c0..0000000000 --- a/app/sdks/0.7.0/server-php/docs/examples/teams/delete-membership.md +++ /dev/null @@ -1,16 +0,0 @@ -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 deleted file mode 100644 index 394a1940fc..0000000000 --- a/app/sdks/0.7.0/server-php/docs/examples/teams/delete.md +++ /dev/null @@ -1,16 +0,0 @@ -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 deleted file mode 100644 index 56f6d59063..0000000000 --- a/app/sdks/0.7.0/server-php/docs/examples/teams/get-memberships.md +++ /dev/null @@ -1,16 +0,0 @@ -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 deleted file mode 100644 index 6f0b705707..0000000000 --- a/app/sdks/0.7.0/server-php/docs/examples/teams/get.md +++ /dev/null @@ -1,16 +0,0 @@ -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 deleted file mode 100644 index d17bb7689b..0000000000 --- a/app/sdks/0.7.0/server-php/docs/examples/teams/list.md +++ /dev/null @@ -1,16 +0,0 @@ -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 deleted file mode 100644 index 945001dc36..0000000000 --- a/app/sdks/0.7.0/server-php/docs/examples/teams/update.md +++ /dev/null @@ -1,16 +0,0 @@ -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 deleted file mode 100644 index 53497b4277..0000000000 --- a/app/sdks/0.7.0/server-php/docs/examples/users/create.md +++ /dev/null @@ -1,16 +0,0 @@ -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 deleted file mode 100644 index ead6de7549..0000000000 --- a/app/sdks/0.7.0/server-php/docs/examples/users/delete-session.md +++ /dev/null @@ -1,16 +0,0 @@ -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 deleted file mode 100644 index 968d788ea7..0000000000 --- a/app/sdks/0.7.0/server-php/docs/examples/users/delete-sessions.md +++ /dev/null @@ -1,16 +0,0 @@ -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/delete-user.md b/app/sdks/0.7.0/server-php/docs/examples/users/delete-user.md deleted file mode 100644 index 1e9f0cb227..0000000000 --- a/app/sdks/0.7.0/server-php/docs/examples/users/delete-user.md +++ /dev/null @@ -1,16 +0,0 @@ -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->deleteUser('[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 deleted file mode 100644 index 5602536920..0000000000 --- a/app/sdks/0.7.0/server-php/docs/examples/users/get-logs.md +++ /dev/null @@ -1,16 +0,0 @@ -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 deleted file mode 100644 index 1c9978a0fb..0000000000 --- a/app/sdks/0.7.0/server-php/docs/examples/users/get-prefs.md +++ /dev/null @@ -1,16 +0,0 @@ -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 deleted file mode 100644 index fef9f1db74..0000000000 --- a/app/sdks/0.7.0/server-php/docs/examples/users/get-sessions.md +++ /dev/null @@ -1,16 +0,0 @@ -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 deleted file mode 100644 index 16c29f9a5a..0000000000 --- a/app/sdks/0.7.0/server-php/docs/examples/users/get.md +++ /dev/null @@ -1,16 +0,0 @@ -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 deleted file mode 100644 index efce771ea1..0000000000 --- a/app/sdks/0.7.0/server-php/docs/examples/users/list.md +++ /dev/null @@ -1,16 +0,0 @@ -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 deleted file mode 100644 index 9e9141f8a7..0000000000 --- a/app/sdks/0.7.0/server-php/docs/examples/users/update-prefs.md +++ /dev/null @@ -1,16 +0,0 @@ -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 deleted file mode 100644 index 87f9bceb46..0000000000 --- a/app/sdks/0.7.0/server-php/docs/examples/users/update-status.md +++ /dev/null @@ -1,16 +0,0 @@ -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 deleted file mode 100644 index 4ee1455e0b..0000000000 --- a/app/sdks/0.7.0/server-php/docs/functions.md +++ /dev/null @@ -1,185 +0,0 @@ -# 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. Max length: 256 chars. | | -| 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. Max length: 128 chars. | | -| env | string | Execution enviornment. | | -| 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. Max length: 128 chars. | | -| 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. Max length: 256 chars. | | -| 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. | | - -## 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. Max length: 256 chars. | | -| 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. | | -| command | string | Code execution command. | | -| code | file | Gzip file containing your code. | | - -## 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 deleted file mode 100644 index 38b814b633..0000000000 --- a/app/sdks/0.7.0/server-php/docs/health.md +++ /dev/null @@ -1,96 +0,0 @@ -# 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 deleted file mode 100644 index 1591f4a1a8..0000000000 --- a/app/sdks/0.7.0/server-php/docs/locale.md +++ /dev/null @@ -1,60 +0,0 @@ -# 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/server-php/docs/storage.md b/app/sdks/0.7.0/server-php/docs/storage.md deleted file mode 100644 index d23f986a0c..0000000000 --- a/app/sdks/0.7.0/server-php/docs/storage.md +++ /dev/null @@ -1,127 +0,0 @@ -# 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. Max length: 256 chars. | | -| 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 deleted file mode 100644 index 6ee37b7949..0000000000 --- a/app/sdks/0.7.0/server-php/docs/teams.md +++ /dev/null @@ -1,132 +0,0 @@ -# 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. Max length: 256 chars. | | -| 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. Max length: 128 chars. | | -| 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). Max length for each role is 32 chars. | ["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. Max length: 128 chars. | | - -## 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. Max length: 256 chars. | | -| 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. Max length: 128 chars. | | -| 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). Max length for each role is 32 chars. | | -| 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 it is not accepted. ** - -### 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 deleted file mode 100644 index f01db86da9..0000000000 --- a/app/sdks/0.7.0/server-php/docs/users.md +++ /dev/null @@ -1,164 +0,0 @@ -# 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. Max length: 256 chars. | | -| 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. Must be between 6 to 32 chars. | | -| name | string | User name. Max length: 128 chars. | | - -## 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. | | - -## Delete User - -```http request -DELETE https://appwrite.io/v1/users/{userId} -``` - -** Delete a 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 deleted file mode 100644 index b87c929b9b..0000000000 --- a/app/sdks/0.7.0/server-php/src/Appwrite/Client.php +++ /dev/null @@ -1,240 +0,0 @@ - '', - '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 = $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 deleted file mode 100644 index ea3ad92e2d..0000000000 --- a/app/sdks/0.7.0/server-php/src/Appwrite/Service.php +++ /dev/null @@ -1,19 +0,0 @@ -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 deleted file mode 100644 index 2c9a0d4877..0000000000 --- a/app/sdks/0.7.0/server-php/src/Appwrite/Services/Avatars.php +++ /dev/null @@ -1,214 +0,0 @@ -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 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 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 - */ - public function getInitials(string $name = '', int $width = 500, int $height = 500, string $color = '', string $background = ''):array - { - $path = str_replace([], [], '/avatars/initials'); - $params = []; - - $params['name'] = $name; - $params['width'] = $width; - $params['height'] = $height; - $params['color'] = $color; - $params['background'] = $background; - - 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 boolean $download - * @throws Exception - * @return array - */ - public function getQR(string $text, int $size = 400, int $margin = 1, boolean $download = false):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 deleted file mode 100644 index c57e29374a..0000000000 --- a/app/sdks/0.7.0/server-php/src/Appwrite/Services/Database.php +++ /dev/null @@ -1,280 +0,0 @@ -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 $limit - * @param int $offset - * @param string $orderField - * @param string $orderType - * @param string $orderCast - * @param string $search - * @throws Exception - * @return array - */ - public function listDocuments(string $collectionId, array $filters = [], int $limit = 25, int $offset = 0, string $orderField = '', string $orderType = 'ASC', string $orderCast = 'string', string $search = ''):array - { - $path = str_replace(['{collectionId}'], [$collectionId], '/database/collections/{collectionId}/documents'); - $params = []; - - $params['filters'] = $filters; - $params['limit'] = $limit; - $params['offset'] = $offset; - $params['orderField'] = $orderField; - $params['orderType'] = $orderType; - $params['orderCast'] = $orderCast; - $params['search'] = $search; - - return $this->client->call(Client::METHOD_GET, $path, [ - 'content-type' => 'application/json', - ], $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 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, its 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); - } - -} \ 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 deleted file mode 100644 index 12c887a911..0000000000 --- a/app/sdks/0.7.0/server-php/src/Appwrite/Services/Functions.php +++ /dev/null @@ -1,298 +0,0 @@ -client->call(Client::METHOD_GET, $path, [ - 'content-type' => 'application/json', - ], $params); - } - - /** - * Create Function - * - * @param string $name - * @param string $env - * @param array $vars - * @param array $events - * @param string $schedule - * @param int $timeout - * @throws Exception - * @return array - */ - public function create(string $name, string $env, array $vars = , array $events = [], string $schedule = '', int $timeout = 15):array - { - $path = str_replace([], [], '/functions'); - $params = []; - - $params['name'] = $name; - $params['env'] = $env; - $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 - * @throws Exception - * @return array - */ - public function createExecution(string $functionId):array - { - $path = str_replace(['{functionId}'], [$functionId], '/functions/{functionId}/executions'); - $params = []; - - - 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 $command - * @param \CurlFile $code - * @throws Exception - * @return array - */ - public function createTag(string $functionId, string $command, \CurlFile $code):array - { - $path = str_replace(['{functionId}'], [$functionId], '/functions/{functionId}/tags'); - $params = []; - - $params['command'] = $command; - $params['code'] = $code; - - return $this->client->call(Client::METHOD_POST, $path, [ - 'content-type' => 'multipart/form-data', - ], $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 deleted file mode 100644 index d39f1f406d..0000000000 --- a/app/sdks/0.7.0/server-php/src/Appwrite/Services/Health.php +++ /dev/null @@ -1,250 +0,0 @@ -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 deleted file mode 100644 index 93318d57cb..0000000000 --- a/app/sdks/0.7.0/server-php/src/Appwrite/Services/Locale.php +++ /dev/null @@ -1,156 +0,0 @@ -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 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 - */ - public function getCurrencies():array - { - $path = str_replace([], [], '/locale/currencies'); - $params = []; - - - return $this->client->call(Client::METHOD_GET, $path, [ - 'content-type' => 'application/json', - ], $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 - */ - public function getLanguages():array - { - $path = str_replace([], [], '/locale/languages'); - $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 deleted file mode 100644 index 09b74fbf8f..0000000000 --- a/app/sdks/0.7.0/server-php/src/Appwrite/Services/Storage.php +++ /dev/null @@ -1,212 +0,0 @@ -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 deleted file mode 100644 index edb6445e57..0000000000 --- a/app/sdks/0.7.0/server-php/src/Appwrite/Services/Teams.php +++ /dev/null @@ -1,223 +0,0 @@ -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 - * @param string $search - * @param int $limit - * @param int $offset - * @param string $orderType - * @throws Exception - * @return array - */ - public function getMemberships(string $teamId, string $search = '', int $limit = 25, int $offset = 0, string $orderType = 'ASC'):array - { - $path = str_replace(['{teamId}'], [$teamId], '/teams/{teamId}/memberships'); - $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 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 - */ - 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 it is not accepted. - * - * @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 deleted file mode 100644 index 099f1bc31e..0000000000 --- a/app/sdks/0.7.0/server-php/src/Appwrite/Services/Users.php +++ /dev/null @@ -1,250 +0,0 @@ -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); - } - - /** - * Delete User - * - * Delete a user by its unique ID. - * - * @param string $userId - * @throws Exception - * @return array - */ - public function deleteUser(string $userId):array - { - $path = str_replace(['{userId}'], [$userId], '/users/{userId}'); - $params = []; - - - return $this->client->call(Client::METHOD_DELETE, $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 deleted file mode 100644 index fa4d35e687..0000000000 --- a/app/sdks/0.7.0/server-python/CHANGELOG.md +++ /dev/null @@ -1 +0,0 @@ -# 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 deleted file mode 100644 index fc7c051a91..0000000000 --- a/app/sdks/0.7.0/server-python/LICENSE +++ /dev/null @@ -1,12 +0,0 @@ -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 deleted file mode 100644 index eb73775936..0000000000 --- a/app/sdks/0.7.0/server-python/README.md +++ /dev/null @@ -1,30 +0,0 @@ -# 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.7.0-blue.svg?v=1) - -**This SDK is compatible with Appwrite server version 0.7.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 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 deleted file mode 100644 index 0519ecba6e..0000000000 --- a/app/sdks/0.7.0/server-python/appwrite/__init__.py +++ /dev/null @@ -1 +0,0 @@ - \ 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 deleted file mode 100644 index 8989fccb9c..0000000000 --- a/app/sdks/0.7.0/server-python/appwrite/client.py +++ /dev/null @@ -1,106 +0,0 @@ -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 deleted file mode 100644 index b5b60e6c22..0000000000 --- a/app/sdks/0.7.0/server-python/appwrite/service.py +++ /dev/null @@ -1,6 +0,0 @@ -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 deleted file mode 100644 index 0519ecba6e..0000000000 --- a/app/sdks/0.7.0/server-python/appwrite/services/__init__.py +++ /dev/null @@ -1 +0,0 @@ - \ 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 deleted file mode 100644 index 12341106d0..0000000000 --- a/app/sdks/0.7.0/server-python/appwrite/services/avatars.py +++ /dev/null @@ -1,102 +0,0 @@ -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_initials(self, name='', width=500, height=500, color='', background=''): - """Get User Initials""" - - params = {} - path = '/avatars/initials' - params['name'] = name - params['width'] = width - params['height'] = height - params['color'] = color - params['background'] = background - - return self.client.call('get', path, { - 'content-type': 'application/json', - }, params) - - def get_q_r(self, text, size=400, margin=1, download=False): - """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 deleted file mode 100644 index 4f20c5aba6..0000000000 --- a/app/sdks/0.7.0/server-python/appwrite/services/database.py +++ /dev/null @@ -1,146 +0,0 @@ -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=[], limit=25, offset=0, order_field='', order_type='ASC', order_cast='string', search=''): - """List Documents""" - - params = {} - path = '/database/collections/{collectionId}/documents' - path = path.replace('{collectionId}', collection_id) - params['filters'] = filters - params['limit'] = limit - params['offset'] = offset - params['orderField'] = order_field - params['orderType'] = order_type - params['orderCast'] = order_cast - params['search'] = search - - 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) 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 deleted file mode 100644 index da0a759d7c..0000000000 --- a/app/sdks/0.7.0/server-python/appwrite/services/functions.py +++ /dev/null @@ -1,177 +0,0 @@ -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, env, vars={}, events=[], schedule='', timeout=15): - """Create Function""" - - params = {} - path = '/functions' - params['name'] = name - params['env'] = env - 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): - """Create Execution""" - - params = {} - path = '/functions/{functionId}/executions' - path = path.replace('{functionId}', function_id) - - 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, command, code): - """Create Tag""" - - params = {} - path = '/functions/{functionId}/tags' - path = path.replace('{functionId}', function_id) - params['command'] = command - params['code'] = code - - return self.client.call('post', path, { - 'content-type': 'multipart/form-data', - }, 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 deleted file mode 100644 index 5e08ebe6e8..0000000000 --- a/app/sdks/0.7.0/server-python/appwrite/services/health.py +++ /dev/null @@ -1,127 +0,0 @@ -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 deleted file mode 100644 index fe3ad5e988..0000000000 --- a/app/sdks/0.7.0/server-python/appwrite/services/locale.py +++ /dev/null @@ -1,77 +0,0 @@ -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) - - def get_languages(self): - """List Languages""" - - params = {} - path = '/locale/languages' - - 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 deleted file mode 100644 index 7e2a986f6e..0000000000 --- a/app/sdks/0.7.0/server-python/appwrite/services/storage.py +++ /dev/null @@ -1,108 +0,0 @@ -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 deleted file mode 100644 index 72c6a6e9d3..0000000000 --- a/app/sdks/0.7.0/server-python/appwrite/services/teams.py +++ /dev/null @@ -1,109 +0,0 @@ -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, search='', limit=25, offset=0, order_type='ASC'): - """Get Team Memberships""" - - params = {} - path = '/teams/{teamId}/memberships' - path = path.replace('{teamId}', team_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_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 deleted file mode 100644 index 56a73883d0..0000000000 --- a/app/sdks/0.7.0/server-python/appwrite/services/users.py +++ /dev/null @@ -1,136 +0,0 @@ -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 delete_user(self, user_id): - """Delete User""" - - params = {} - path = '/users/{userId}' - path = path.replace('{userId}', user_id) - - return self.client.call('delete', 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 deleted file mode 100644 index 138c0d1b3e..0000000000 --- a/app/sdks/0.7.0/server-python/docs/examples/avatars/get-browser.md +++ /dev/null @@ -1,14 +0,0 @@ -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 deleted file mode 100644 index 83f76aca42..0000000000 --- a/app/sdks/0.7.0/server-python/docs/examples/avatars/get-credit-card.md +++ /dev/null @@ -1,14 +0,0 @@ -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 deleted file mode 100644 index 6946080bee..0000000000 --- a/app/sdks/0.7.0/server-python/docs/examples/avatars/get-favicon.md +++ /dev/null @@ -1,14 +0,0 @@ -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 deleted file mode 100644 index 188d6d35bd..0000000000 --- a/app/sdks/0.7.0/server-python/docs/examples/avatars/get-flag.md +++ /dev/null @@ -1,14 +0,0 @@ -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 deleted file mode 100644 index 29a6430eab..0000000000 --- a/app/sdks/0.7.0/server-python/docs/examples/avatars/get-image.md +++ /dev/null @@ -1,14 +0,0 @@ -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-initials.md b/app/sdks/0.7.0/server-python/docs/examples/avatars/get-initials.md deleted file mode 100644 index 0c300af5da..0000000000 --- a/app/sdks/0.7.0/server-python/docs/examples/avatars/get-initials.md +++ /dev/null @@ -1,14 +0,0 @@ -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_initials() 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 deleted file mode 100644 index 19551e99d7..0000000000 --- a/app/sdks/0.7.0/server-python/docs/examples/avatars/get-q-r.md +++ /dev/null @@ -1,14 +0,0 @@ -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 deleted file mode 100644 index eb704a80a1..0000000000 --- a/app/sdks/0.7.0/server-python/docs/examples/database/create-collection.md +++ /dev/null @@ -1,14 +0,0 @@ -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 deleted file mode 100644 index 919d5ebbf4..0000000000 --- a/app/sdks/0.7.0/server-python/docs/examples/database/create-document.md +++ /dev/null @@ -1,14 +0,0 @@ -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 deleted file mode 100644 index 0e188ade41..0000000000 --- a/app/sdks/0.7.0/server-python/docs/examples/database/delete-collection.md +++ /dev/null @@ -1,14 +0,0 @@ -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 deleted file mode 100644 index c085547c16..0000000000 --- a/app/sdks/0.7.0/server-python/docs/examples/database/delete-document.md +++ /dev/null @@ -1,14 +0,0 @@ -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.md b/app/sdks/0.7.0/server-python/docs/examples/database/get-collection.md deleted file mode 100644 index f90f51f48b..0000000000 --- a/app/sdks/0.7.0/server-python/docs/examples/database/get-collection.md +++ /dev/null @@ -1,14 +0,0 @@ -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 deleted file mode 100644 index 79891709d1..0000000000 --- a/app/sdks/0.7.0/server-python/docs/examples/database/get-document.md +++ /dev/null @@ -1,14 +0,0 @@ -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 deleted file mode 100644 index f60d4b90e5..0000000000 --- a/app/sdks/0.7.0/server-python/docs/examples/database/list-collections.md +++ /dev/null @@ -1,14 +0,0 @@ -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 deleted file mode 100644 index cecb57d2fa..0000000000 --- a/app/sdks/0.7.0/server-python/docs/examples/database/list-documents.md +++ /dev/null @@ -1,14 +0,0 @@ -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 deleted file mode 100644 index 7dacd558ba..0000000000 --- a/app/sdks/0.7.0/server-python/docs/examples/database/update-collection.md +++ /dev/null @@ -1,14 +0,0 @@ -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 deleted file mode 100644 index 6296809dc5..0000000000 --- a/app/sdks/0.7.0/server-python/docs/examples/database/update-document.md +++ /dev/null @@ -1,14 +0,0 @@ -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 deleted file mode 100644 index dc4442cd84..0000000000 --- a/app/sdks/0.7.0/server-python/docs/examples/functions/create-execution.md +++ /dev/null @@ -1,14 +0,0 @@ -from appwrite.client import Client -from appwrite.services.functions import Functions - -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 -) - -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 deleted file mode 100644 index 1995a64c33..0000000000 --- a/app/sdks/0.7.0/server-python/docs/examples/functions/create-tag.md +++ /dev/null @@ -1,14 +0,0 @@ -from appwrite.client import Client -from appwrite.services.functions import Functions - -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 -) - -functions = Functions(client) - -result = functions.create_tag('[FUNCTION_ID]', '[COMMAND]', open('/path/to/file.png', 'rb')) 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 deleted file mode 100644 index c6fd31bcb1..0000000000 --- a/app/sdks/0.7.0/server-python/docs/examples/functions/create.md +++ /dev/null @@ -1,14 +0,0 @@ -from appwrite.client import Client -from appwrite.services.functions import Functions - -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 -) - -functions = Functions(client) - -result = functions.create('[NAME]', 'node-14') 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 deleted file mode 100644 index a4cb1b7a85..0000000000 --- a/app/sdks/0.7.0/server-python/docs/examples/functions/delete-tag.md +++ /dev/null @@ -1,14 +0,0 @@ -from appwrite.client import Client -from appwrite.services.functions import Functions - -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 -) - -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 deleted file mode 100644 index 52658e8c30..0000000000 --- a/app/sdks/0.7.0/server-python/docs/examples/functions/delete.md +++ /dev/null @@ -1,14 +0,0 @@ -from appwrite.client import Client -from appwrite.services.functions import Functions - -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 -) - -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 deleted file mode 100644 index 1e101304d3..0000000000 --- a/app/sdks/0.7.0/server-python/docs/examples/functions/get-execution.md +++ /dev/null @@ -1,14 +0,0 @@ -from appwrite.client import Client -from appwrite.services.functions import Functions - -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 -) - -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 deleted file mode 100644 index 4cded469dd..0000000000 --- a/app/sdks/0.7.0/server-python/docs/examples/functions/get-tag.md +++ /dev/null @@ -1,14 +0,0 @@ -from appwrite.client import Client -from appwrite.services.functions import Functions - -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 -) - -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 deleted file mode 100644 index 0007667da6..0000000000 --- a/app/sdks/0.7.0/server-python/docs/examples/functions/get.md +++ /dev/null @@ -1,14 +0,0 @@ -from appwrite.client import Client -from appwrite.services.functions import Functions - -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 -) - -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 deleted file mode 100644 index 6d75e093f4..0000000000 --- a/app/sdks/0.7.0/server-python/docs/examples/functions/list-executions.md +++ /dev/null @@ -1,14 +0,0 @@ -from appwrite.client import Client -from appwrite.services.functions import Functions - -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 -) - -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 deleted file mode 100644 index 67a81a9d89..0000000000 --- a/app/sdks/0.7.0/server-python/docs/examples/functions/list-tags.md +++ /dev/null @@ -1,14 +0,0 @@ -from appwrite.client import Client -from appwrite.services.functions import Functions - -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 -) - -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 deleted file mode 100644 index cc1f04d9c6..0000000000 --- a/app/sdks/0.7.0/server-python/docs/examples/functions/list.md +++ /dev/null @@ -1,14 +0,0 @@ -from appwrite.client import Client -from appwrite.services.functions import Functions - -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 -) - -functions = Functions(client) - -result = functions.list() 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 deleted file mode 100644 index 7a9da50b2f..0000000000 --- a/app/sdks/0.7.0/server-python/docs/examples/functions/update-tag.md +++ /dev/null @@ -1,14 +0,0 @@ -from appwrite.client import Client -from appwrite.services.functions import Functions - -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 -) - -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 deleted file mode 100644 index f55767d0ae..0000000000 --- a/app/sdks/0.7.0/server-python/docs/examples/functions/update.md +++ /dev/null @@ -1,14 +0,0 @@ -from appwrite.client import Client -from appwrite.services.functions import Functions - -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 -) - -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 deleted file mode 100644 index c7628d90ea..0000000000 --- a/app/sdks/0.7.0/server-python/docs/examples/health/get-anti-virus.md +++ /dev/null @@ -1,14 +0,0 @@ -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 deleted file mode 100644 index 57c7939b7f..0000000000 --- a/app/sdks/0.7.0/server-python/docs/examples/health/get-cache.md +++ /dev/null @@ -1,14 +0,0 @@ -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 deleted file mode 100644 index db8eec5ce6..0000000000 --- a/app/sdks/0.7.0/server-python/docs/examples/health/get-d-b.md +++ /dev/null @@ -1,14 +0,0 @@ -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 deleted file mode 100644 index 1f87c2758a..0000000000 --- a/app/sdks/0.7.0/server-python/docs/examples/health/get-queue-certificates.md +++ /dev/null @@ -1,14 +0,0 @@ -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 deleted file mode 100644 index 3e0b0c01e0..0000000000 --- a/app/sdks/0.7.0/server-python/docs/examples/health/get-queue-functions.md +++ /dev/null @@ -1,14 +0,0 @@ -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 deleted file mode 100644 index fdf80c6d82..0000000000 --- a/app/sdks/0.7.0/server-python/docs/examples/health/get-queue-logs.md +++ /dev/null @@ -1,14 +0,0 @@ -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 deleted file mode 100644 index 17b17a081f..0000000000 --- a/app/sdks/0.7.0/server-python/docs/examples/health/get-queue-tasks.md +++ /dev/null @@ -1,14 +0,0 @@ -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 deleted file mode 100644 index aeb8e83130..0000000000 --- a/app/sdks/0.7.0/server-python/docs/examples/health/get-queue-usage.md +++ /dev/null @@ -1,14 +0,0 @@ -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 deleted file mode 100644 index 90c4238987..0000000000 --- a/app/sdks/0.7.0/server-python/docs/examples/health/get-queue-webhooks.md +++ /dev/null @@ -1,14 +0,0 @@ -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-local.md b/app/sdks/0.7.0/server-python/docs/examples/health/get-storage-local.md deleted file mode 100644 index b06dcef245..0000000000 --- a/app/sdks/0.7.0/server-python/docs/examples/health/get-storage-local.md +++ /dev/null @@ -1,14 +0,0 @@ -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 deleted file mode 100644 index df68c1a0f9..0000000000 --- a/app/sdks/0.7.0/server-python/docs/examples/health/get-time.md +++ /dev/null @@ -1,14 +0,0 @@ -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 deleted file mode 100644 index f3416aef75..0000000000 --- a/app/sdks/0.7.0/server-python/docs/examples/health/get.md +++ /dev/null @@ -1,14 +0,0 @@ -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 deleted file mode 100644 index 393326ddab..0000000000 --- a/app/sdks/0.7.0/server-python/docs/examples/locale/get-continents.md +++ /dev/null @@ -1,14 +0,0 @@ -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 deleted file mode 100644 index 653fdd5abf..0000000000 --- a/app/sdks/0.7.0/server-python/docs/examples/locale/get-countries-e-u.md +++ /dev/null @@ -1,14 +0,0 @@ -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 deleted file mode 100644 index 8c7693a35c..0000000000 --- a/app/sdks/0.7.0/server-python/docs/examples/locale/get-countries-phones.md +++ /dev/null @@ -1,14 +0,0 @@ -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 deleted file mode 100644 index 8a6c7cb1c3..0000000000 --- a/app/sdks/0.7.0/server-python/docs/examples/locale/get-countries.md +++ /dev/null @@ -1,14 +0,0 @@ -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 deleted file mode 100644 index 17586de230..0000000000 --- a/app/sdks/0.7.0/server-python/docs/examples/locale/get-currencies.md +++ /dev/null @@ -1,14 +0,0 @@ -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-languages.md b/app/sdks/0.7.0/server-python/docs/examples/locale/get-languages.md deleted file mode 100644 index 292a401f75..0000000000 --- a/app/sdks/0.7.0/server-python/docs/examples/locale/get-languages.md +++ /dev/null @@ -1,14 +0,0 @@ -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_languages() 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 deleted file mode 100644 index 752df0123d..0000000000 --- a/app/sdks/0.7.0/server-python/docs/examples/locale/get.md +++ /dev/null @@ -1,14 +0,0 @@ -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 deleted file mode 100644 index 52bf8b8575..0000000000 --- a/app/sdks/0.7.0/server-python/docs/examples/storage/create-file.md +++ /dev/null @@ -1,14 +0,0 @@ -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 deleted file mode 100644 index 9379cb8820..0000000000 --- a/app/sdks/0.7.0/server-python/docs/examples/storage/delete-file.md +++ /dev/null @@ -1,14 +0,0 @@ -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 deleted file mode 100644 index bc815cebbe..0000000000 --- a/app/sdks/0.7.0/server-python/docs/examples/storage/get-file-download.md +++ /dev/null @@ -1,14 +0,0 @@ -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 deleted file mode 100644 index 2d14539513..0000000000 --- a/app/sdks/0.7.0/server-python/docs/examples/storage/get-file-preview.md +++ /dev/null @@ -1,14 +0,0 @@ -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 deleted file mode 100644 index 7d0b30b376..0000000000 --- a/app/sdks/0.7.0/server-python/docs/examples/storage/get-file-view.md +++ /dev/null @@ -1,14 +0,0 @@ -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 deleted file mode 100644 index e8d1202e27..0000000000 --- a/app/sdks/0.7.0/server-python/docs/examples/storage/get-file.md +++ /dev/null @@ -1,14 +0,0 @@ -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 deleted file mode 100644 index 0e72773fcb..0000000000 --- a/app/sdks/0.7.0/server-python/docs/examples/storage/list-files.md +++ /dev/null @@ -1,14 +0,0 @@ -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 deleted file mode 100644 index 7e1c5f61cd..0000000000 --- a/app/sdks/0.7.0/server-python/docs/examples/storage/update-file.md +++ /dev/null @@ -1,14 +0,0 @@ -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 deleted file mode 100644 index 9e2c832b3c..0000000000 --- a/app/sdks/0.7.0/server-python/docs/examples/teams/create-membership.md +++ /dev/null @@ -1,14 +0,0 @@ -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 deleted file mode 100644 index 1debdc6109..0000000000 --- a/app/sdks/0.7.0/server-python/docs/examples/teams/create.md +++ /dev/null @@ -1,14 +0,0 @@ -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 deleted file mode 100644 index af30bc1cf3..0000000000 --- a/app/sdks/0.7.0/server-python/docs/examples/teams/delete-membership.md +++ /dev/null @@ -1,14 +0,0 @@ -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 deleted file mode 100644 index 8fb037cd4a..0000000000 --- a/app/sdks/0.7.0/server-python/docs/examples/teams/delete.md +++ /dev/null @@ -1,14 +0,0 @@ -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 deleted file mode 100644 index 6c6482418b..0000000000 --- a/app/sdks/0.7.0/server-python/docs/examples/teams/get-memberships.md +++ /dev/null @@ -1,14 +0,0 @@ -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 deleted file mode 100644 index 6c2b404517..0000000000 --- a/app/sdks/0.7.0/server-python/docs/examples/teams/get.md +++ /dev/null @@ -1,14 +0,0 @@ -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 deleted file mode 100644 index c538aea340..0000000000 --- a/app/sdks/0.7.0/server-python/docs/examples/teams/list.md +++ /dev/null @@ -1,14 +0,0 @@ -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 deleted file mode 100644 index 2b9c222be0..0000000000 --- a/app/sdks/0.7.0/server-python/docs/examples/teams/update.md +++ /dev/null @@ -1,14 +0,0 @@ -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 deleted file mode 100644 index 2cfe228ee0..0000000000 --- a/app/sdks/0.7.0/server-python/docs/examples/users/create.md +++ /dev/null @@ -1,14 +0,0 @@ -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 deleted file mode 100644 index d25cfb3abc..0000000000 --- a/app/sdks/0.7.0/server-python/docs/examples/users/delete-session.md +++ /dev/null @@ -1,14 +0,0 @@ -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 deleted file mode 100644 index 9b24db1b5c..0000000000 --- a/app/sdks/0.7.0/server-python/docs/examples/users/delete-sessions.md +++ /dev/null @@ -1,14 +0,0 @@ -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/delete-user.md b/app/sdks/0.7.0/server-python/docs/examples/users/delete-user.md deleted file mode 100644 index 1520823a36..0000000000 --- a/app/sdks/0.7.0/server-python/docs/examples/users/delete-user.md +++ /dev/null @@ -1,14 +0,0 @@ -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_user('[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 deleted file mode 100644 index c93ae244c8..0000000000 --- a/app/sdks/0.7.0/server-python/docs/examples/users/get-logs.md +++ /dev/null @@ -1,14 +0,0 @@ -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 deleted file mode 100644 index 9ef100f9e6..0000000000 --- a/app/sdks/0.7.0/server-python/docs/examples/users/get-prefs.md +++ /dev/null @@ -1,14 +0,0 @@ -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 deleted file mode 100644 index 4de3120dfb..0000000000 --- a/app/sdks/0.7.0/server-python/docs/examples/users/get-sessions.md +++ /dev/null @@ -1,14 +0,0 @@ -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 deleted file mode 100644 index c11f96e64b..0000000000 --- a/app/sdks/0.7.0/server-python/docs/examples/users/get.md +++ /dev/null @@ -1,14 +0,0 @@ -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 deleted file mode 100644 index c4a66e42d2..0000000000 --- a/app/sdks/0.7.0/server-python/docs/examples/users/list.md +++ /dev/null @@ -1,14 +0,0 @@ -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 deleted file mode 100644 index 7e0fe7c35a..0000000000 --- a/app/sdks/0.7.0/server-python/docs/examples/users/update-prefs.md +++ /dev/null @@ -1,14 +0,0 @@ -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 deleted file mode 100644 index 28fd587deb..0000000000 --- a/app/sdks/0.7.0/server-python/docs/examples/users/update-status.md +++ /dev/null @@ -1,14 +0,0 @@ -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 deleted file mode 100644 index e20605c43d..0000000000 --- a/app/sdks/0.7.0/server-python/requirements.txt +++ /dev/null @@ -1 +0,0 @@ -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 deleted file mode 100644 index 224a77957f..0000000000 --- a/app/sdks/0.7.0/server-python/setup.cfg +++ /dev/null @@ -1,2 +0,0 @@ -[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 deleted file mode 100644 index ef51270c42..0000000000 --- a/app/sdks/0.7.0/server-python/setup.py +++ /dev/null @@ -1,31 +0,0 @@ -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@appwrite.io', - maintainer = 'Appwrite Team', - maintainer_email = 'team@appwrite.io', - 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', - 'Programming Language :: Python :: 3.8', - ], -) diff --git a/app/sdks/0.7.0/server-ruby/CHANGELOG.md b/app/sdks/0.7.0/server-ruby/CHANGELOG.md deleted file mode 100644 index fa4d35e687..0000000000 --- a/app/sdks/0.7.0/server-ruby/CHANGELOG.md +++ /dev/null @@ -1 +0,0 @@ -# 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 deleted file mode 100644 index cd8aa9e04c..0000000000 --- a/app/sdks/0.7.0/server-ruby/Gemfile +++ /dev/null @@ -1,3 +0,0 @@ -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 deleted file mode 100644 index fc7c051a91..0000000000 --- a/app/sdks/0.7.0/server-ruby/LICENSE +++ /dev/null @@ -1,12 +0,0 @@ -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 deleted file mode 100644 index d1c7112a98..0000000000 --- a/app/sdks/0.7.0/server-ruby/README.md +++ /dev/null @@ -1,30 +0,0 @@ -# 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.7.0-blue.svg?v=1) - -**This SDK is compatible with Appwrite server version 0.7.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 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 deleted file mode 100644 index 8f4c99be3f..0000000000 --- a/app/sdks/0.7.0/server-ruby/appwrite.gemspec +++ /dev/null @@ -1,13 +0,0 @@ -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@appwrite.io' - 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 deleted file mode 100644 index fc0cfc913f..0000000000 --- a/app/sdks/0.7.0/server-ruby/docs/examples/avatars/get-browser.md +++ /dev/null @@ -1,15 +0,0 @@ -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 deleted file mode 100644 index b3763f0846..0000000000 --- a/app/sdks/0.7.0/server-ruby/docs/examples/avatars/get-credit-card.md +++ /dev/null @@ -1,15 +0,0 @@ -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 deleted file mode 100644 index 2ee4e75789..0000000000 --- a/app/sdks/0.7.0/server-ruby/docs/examples/avatars/get-favicon.md +++ /dev/null @@ -1,15 +0,0 @@ -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 deleted file mode 100644 index 2e2f01f0f9..0000000000 --- a/app/sdks/0.7.0/server-ruby/docs/examples/avatars/get-flag.md +++ /dev/null @@ -1,15 +0,0 @@ -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 deleted file mode 100644 index 682d6bf9df..0000000000 --- a/app/sdks/0.7.0/server-ruby/docs/examples/avatars/get-image.md +++ /dev/null @@ -1,15 +0,0 @@ -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-initials.md b/app/sdks/0.7.0/server-ruby/docs/examples/avatars/get-initials.md deleted file mode 100644 index 11878a6da7..0000000000 --- a/app/sdks/0.7.0/server-ruby/docs/examples/avatars/get-initials.md +++ /dev/null @@ -1,15 +0,0 @@ -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_initials(); - -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 deleted file mode 100644 index f145425ca2..0000000000 --- a/app/sdks/0.7.0/server-ruby/docs/examples/avatars/get-q-r.md +++ /dev/null @@ -1,15 +0,0 @@ -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 deleted file mode 100644 index 0317ed9f05..0000000000 --- a/app/sdks/0.7.0/server-ruby/docs/examples/database/create-collection.md +++ /dev/null @@ -1,15 +0,0 @@ -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 deleted file mode 100644 index 0101c746b4..0000000000 --- a/app/sdks/0.7.0/server-ruby/docs/examples/database/create-document.md +++ /dev/null @@ -1,15 +0,0 @@ -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 deleted file mode 100644 index b91c369da7..0000000000 --- a/app/sdks/0.7.0/server-ruby/docs/examples/database/delete-collection.md +++ /dev/null @@ -1,15 +0,0 @@ -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 deleted file mode 100644 index 6548ec2946..0000000000 --- a/app/sdks/0.7.0/server-ruby/docs/examples/database/delete-document.md +++ /dev/null @@ -1,15 +0,0 @@ -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.md b/app/sdks/0.7.0/server-ruby/docs/examples/database/get-collection.md deleted file mode 100644 index 1e54e94c10..0000000000 --- a/app/sdks/0.7.0/server-ruby/docs/examples/database/get-collection.md +++ /dev/null @@ -1,15 +0,0 @@ -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 deleted file mode 100644 index 3040b82c03..0000000000 --- a/app/sdks/0.7.0/server-ruby/docs/examples/database/get-document.md +++ /dev/null @@ -1,15 +0,0 @@ -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 deleted file mode 100644 index ec15fe3b08..0000000000 --- a/app/sdks/0.7.0/server-ruby/docs/examples/database/list-collections.md +++ /dev/null @@ -1,15 +0,0 @@ -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 deleted file mode 100644 index fa33f10ccf..0000000000 --- a/app/sdks/0.7.0/server-ruby/docs/examples/database/list-documents.md +++ /dev/null @@ -1,15 +0,0 @@ -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 deleted file mode 100644 index 3ecfbdb4ab..0000000000 --- a/app/sdks/0.7.0/server-ruby/docs/examples/database/update-collection.md +++ /dev/null @@ -1,15 +0,0 @@ -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 deleted file mode 100644 index 492d4f3edc..0000000000 --- a/app/sdks/0.7.0/server-ruby/docs/examples/database/update-document.md +++ /dev/null @@ -1,15 +0,0 @@ -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/functions/create-execution.md b/app/sdks/0.7.0/server-ruby/docs/examples/functions/create-execution.md deleted file mode 100644 index 775b4d7a98..0000000000 --- a/app/sdks/0.7.0/server-ruby/docs/examples/functions/create-execution.md +++ /dev/null @@ -1,15 +0,0 @@ -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 -; - -functions = Appwrite::Functions.new(client); - -response = functions.create_execution(function_id: '[FUNCTION_ID]'); - -puts response \ No newline at end of file diff --git a/app/sdks/0.7.0/server-ruby/docs/examples/functions/create-tag.md b/app/sdks/0.7.0/server-ruby/docs/examples/functions/create-tag.md deleted file mode 100644 index 3e05f11b94..0000000000 --- a/app/sdks/0.7.0/server-ruby/docs/examples/functions/create-tag.md +++ /dev/null @@ -1,15 +0,0 @@ -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 -; - -functions = Appwrite::Functions.new(client); - -response = functions.create_tag(function_id: '[FUNCTION_ID]', command: '[COMMAND]', code: File.new()); - -puts response \ No newline at end of file diff --git a/app/sdks/0.7.0/server-ruby/docs/examples/functions/create.md b/app/sdks/0.7.0/server-ruby/docs/examples/functions/create.md deleted file mode 100644 index e790c1ae1a..0000000000 --- a/app/sdks/0.7.0/server-ruby/docs/examples/functions/create.md +++ /dev/null @@ -1,15 +0,0 @@ -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 -; - -functions = Appwrite::Functions.new(client); - -response = functions.create(name: '[NAME]', env: 'node-14'); - -puts response \ No newline at end of file diff --git a/app/sdks/0.7.0/server-ruby/docs/examples/functions/delete-tag.md b/app/sdks/0.7.0/server-ruby/docs/examples/functions/delete-tag.md deleted file mode 100644 index 72e9b00164..0000000000 --- a/app/sdks/0.7.0/server-ruby/docs/examples/functions/delete-tag.md +++ /dev/null @@ -1,15 +0,0 @@ -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 -; - -functions = Appwrite::Functions.new(client); - -response = functions.delete_tag(function_id: '[FUNCTION_ID]', tag_id: '[TAG_ID]'); - -puts response \ No newline at end of file diff --git a/app/sdks/0.7.0/server-ruby/docs/examples/functions/delete.md b/app/sdks/0.7.0/server-ruby/docs/examples/functions/delete.md deleted file mode 100644 index 41a02e994e..0000000000 --- a/app/sdks/0.7.0/server-ruby/docs/examples/functions/delete.md +++ /dev/null @@ -1,15 +0,0 @@ -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 -; - -functions = Appwrite::Functions.new(client); - -response = functions.delete(function_id: '[FUNCTION_ID]'); - -puts response \ No newline at end of file diff --git a/app/sdks/0.7.0/server-ruby/docs/examples/functions/get-execution.md b/app/sdks/0.7.0/server-ruby/docs/examples/functions/get-execution.md deleted file mode 100644 index 73e2ddd5d6..0000000000 --- a/app/sdks/0.7.0/server-ruby/docs/examples/functions/get-execution.md +++ /dev/null @@ -1,15 +0,0 @@ -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 -; - -functions = Appwrite::Functions.new(client); - -response = functions.get_execution(function_id: '[FUNCTION_ID]', execution_id: '[EXECUTION_ID]'); - -puts response \ No newline at end of file diff --git a/app/sdks/0.7.0/server-ruby/docs/examples/functions/get-tag.md b/app/sdks/0.7.0/server-ruby/docs/examples/functions/get-tag.md deleted file mode 100644 index 61c78a0d61..0000000000 --- a/app/sdks/0.7.0/server-ruby/docs/examples/functions/get-tag.md +++ /dev/null @@ -1,15 +0,0 @@ -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 -; - -functions = Appwrite::Functions.new(client); - -response = functions.get_tag(function_id: '[FUNCTION_ID]', tag_id: '[TAG_ID]'); - -puts response \ No newline at end of file diff --git a/app/sdks/0.7.0/server-ruby/docs/examples/functions/get.md b/app/sdks/0.7.0/server-ruby/docs/examples/functions/get.md deleted file mode 100644 index 44d89f873b..0000000000 --- a/app/sdks/0.7.0/server-ruby/docs/examples/functions/get.md +++ /dev/null @@ -1,15 +0,0 @@ -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 -; - -functions = Appwrite::Functions.new(client); - -response = functions.get(function_id: '[FUNCTION_ID]'); - -puts response \ No newline at end of file diff --git a/app/sdks/0.7.0/server-ruby/docs/examples/functions/list-executions.md b/app/sdks/0.7.0/server-ruby/docs/examples/functions/list-executions.md deleted file mode 100644 index cd7eef772a..0000000000 --- a/app/sdks/0.7.0/server-ruby/docs/examples/functions/list-executions.md +++ /dev/null @@ -1,15 +0,0 @@ -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 -; - -functions = Appwrite::Functions.new(client); - -response = functions.list_executions(function_id: '[FUNCTION_ID]'); - -puts response \ No newline at end of file diff --git a/app/sdks/0.7.0/server-ruby/docs/examples/functions/list-tags.md b/app/sdks/0.7.0/server-ruby/docs/examples/functions/list-tags.md deleted file mode 100644 index ea1a613570..0000000000 --- a/app/sdks/0.7.0/server-ruby/docs/examples/functions/list-tags.md +++ /dev/null @@ -1,15 +0,0 @@ -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 -; - -functions = Appwrite::Functions.new(client); - -response = functions.list_tags(function_id: '[FUNCTION_ID]'); - -puts response \ No newline at end of file diff --git a/app/sdks/0.7.0/server-ruby/docs/examples/functions/list.md b/app/sdks/0.7.0/server-ruby/docs/examples/functions/list.md deleted file mode 100644 index 6d5a151bba..0000000000 --- a/app/sdks/0.7.0/server-ruby/docs/examples/functions/list.md +++ /dev/null @@ -1,15 +0,0 @@ -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 -; - -functions = Appwrite::Functions.new(client); - -response = functions.list(); - -puts response \ No newline at end of file diff --git a/app/sdks/0.7.0/server-ruby/docs/examples/functions/update-tag.md b/app/sdks/0.7.0/server-ruby/docs/examples/functions/update-tag.md deleted file mode 100644 index e95c8fb945..0000000000 --- a/app/sdks/0.7.0/server-ruby/docs/examples/functions/update-tag.md +++ /dev/null @@ -1,15 +0,0 @@ -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 -; - -functions = Appwrite::Functions.new(client); - -response = functions.update_tag(function_id: '[FUNCTION_ID]', tag: '[TAG]'); - -puts response \ No newline at end of file diff --git a/app/sdks/0.7.0/server-ruby/docs/examples/functions/update.md b/app/sdks/0.7.0/server-ruby/docs/examples/functions/update.md deleted file mode 100644 index 16133e9e59..0000000000 --- a/app/sdks/0.7.0/server-ruby/docs/examples/functions/update.md +++ /dev/null @@ -1,15 +0,0 @@ -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 -; - -functions = Appwrite::Functions.new(client); - -response = functions.update(function_id: '[FUNCTION_ID]', name: '[NAME]'); - -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 deleted file mode 100644 index 0c83a06cf8..0000000000 --- a/app/sdks/0.7.0/server-ruby/docs/examples/health/get-anti-virus.md +++ /dev/null @@ -1,15 +0,0 @@ -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 deleted file mode 100644 index 6f51fb6e00..0000000000 --- a/app/sdks/0.7.0/server-ruby/docs/examples/health/get-cache.md +++ /dev/null @@ -1,15 +0,0 @@ -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 deleted file mode 100644 index 4bb00577a7..0000000000 --- a/app/sdks/0.7.0/server-ruby/docs/examples/health/get-d-b.md +++ /dev/null @@ -1,15 +0,0 @@ -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 deleted file mode 100644 index f758b7c3a4..0000000000 --- a/app/sdks/0.7.0/server-ruby/docs/examples/health/get-queue-certificates.md +++ /dev/null @@ -1,15 +0,0 @@ -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 deleted file mode 100644 index 653607f79d..0000000000 --- a/app/sdks/0.7.0/server-ruby/docs/examples/health/get-queue-functions.md +++ /dev/null @@ -1,15 +0,0 @@ -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 deleted file mode 100644 index c6751f7f91..0000000000 --- a/app/sdks/0.7.0/server-ruby/docs/examples/health/get-queue-logs.md +++ /dev/null @@ -1,15 +0,0 @@ -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 deleted file mode 100644 index c6da38832e..0000000000 --- a/app/sdks/0.7.0/server-ruby/docs/examples/health/get-queue-tasks.md +++ /dev/null @@ -1,15 +0,0 @@ -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 deleted file mode 100644 index ed81452d86..0000000000 --- a/app/sdks/0.7.0/server-ruby/docs/examples/health/get-queue-usage.md +++ /dev/null @@ -1,15 +0,0 @@ -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 deleted file mode 100644 index 9e55ab1d87..0000000000 --- a/app/sdks/0.7.0/server-ruby/docs/examples/health/get-queue-webhooks.md +++ /dev/null @@ -1,15 +0,0 @@ -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 deleted file mode 100644 index 09c47ae437..0000000000 --- a/app/sdks/0.7.0/server-ruby/docs/examples/health/get-storage-local.md +++ /dev/null @@ -1,15 +0,0 @@ -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 deleted file mode 100644 index 3d72794e93..0000000000 --- a/app/sdks/0.7.0/server-ruby/docs/examples/health/get-time.md +++ /dev/null @@ -1,15 +0,0 @@ -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 deleted file mode 100644 index 9496c31b36..0000000000 --- a/app/sdks/0.7.0/server-ruby/docs/examples/health/get.md +++ /dev/null @@ -1,15 +0,0 @@ -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 deleted file mode 100644 index 92f38922e1..0000000000 --- a/app/sdks/0.7.0/server-ruby/docs/examples/locale/get-continents.md +++ /dev/null @@ -1,15 +0,0 @@ -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 deleted file mode 100644 index b83125d4a6..0000000000 --- a/app/sdks/0.7.0/server-ruby/docs/examples/locale/get-countries-e-u.md +++ /dev/null @@ -1,15 +0,0 @@ -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 deleted file mode 100644 index 728a1b3cdc..0000000000 --- a/app/sdks/0.7.0/server-ruby/docs/examples/locale/get-countries-phones.md +++ /dev/null @@ -1,15 +0,0 @@ -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 deleted file mode 100644 index 54975db928..0000000000 --- a/app/sdks/0.7.0/server-ruby/docs/examples/locale/get-countries.md +++ /dev/null @@ -1,15 +0,0 @@ -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 deleted file mode 100644 index 4e39b435e1..0000000000 --- a/app/sdks/0.7.0/server-ruby/docs/examples/locale/get-currencies.md +++ /dev/null @@ -1,15 +0,0 @@ -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-languages.md b/app/sdks/0.7.0/server-ruby/docs/examples/locale/get-languages.md deleted file mode 100644 index 64e74eece0..0000000000 --- a/app/sdks/0.7.0/server-ruby/docs/examples/locale/get-languages.md +++ /dev/null @@ -1,15 +0,0 @@ -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_languages(); - -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 deleted file mode 100644 index b390d505c4..0000000000 --- a/app/sdks/0.7.0/server-ruby/docs/examples/locale/get.md +++ /dev/null @@ -1,15 +0,0 @@ -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 deleted file mode 100644 index b044e35b86..0000000000 --- a/app/sdks/0.7.0/server-ruby/docs/examples/storage/create-file.md +++ /dev/null @@ -1,15 +0,0 @@ -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 deleted file mode 100644 index 1aa67b3537..0000000000 --- a/app/sdks/0.7.0/server-ruby/docs/examples/storage/delete-file.md +++ /dev/null @@ -1,15 +0,0 @@ -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 deleted file mode 100644 index 777c565d06..0000000000 --- a/app/sdks/0.7.0/server-ruby/docs/examples/storage/get-file-download.md +++ /dev/null @@ -1,15 +0,0 @@ -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 deleted file mode 100644 index 48be3a044e..0000000000 --- a/app/sdks/0.7.0/server-ruby/docs/examples/storage/get-file-preview.md +++ /dev/null @@ -1,15 +0,0 @@ -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 deleted file mode 100644 index a3dc012098..0000000000 --- a/app/sdks/0.7.0/server-ruby/docs/examples/storage/get-file-view.md +++ /dev/null @@ -1,15 +0,0 @@ -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 deleted file mode 100644 index 203a4dff7c..0000000000 --- a/app/sdks/0.7.0/server-ruby/docs/examples/storage/get-file.md +++ /dev/null @@ -1,15 +0,0 @@ -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 deleted file mode 100644 index a148da78f9..0000000000 --- a/app/sdks/0.7.0/server-ruby/docs/examples/storage/list-files.md +++ /dev/null @@ -1,15 +0,0 @@ -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 deleted file mode 100644 index 36d5049816..0000000000 --- a/app/sdks/0.7.0/server-ruby/docs/examples/storage/update-file.md +++ /dev/null @@ -1,15 +0,0 @@ -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 deleted file mode 100644 index fc0a249361..0000000000 --- a/app/sdks/0.7.0/server-ruby/docs/examples/teams/create-membership.md +++ /dev/null @@ -1,15 +0,0 @@ -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 deleted file mode 100644 index d7f9c2f8c0..0000000000 --- a/app/sdks/0.7.0/server-ruby/docs/examples/teams/create.md +++ /dev/null @@ -1,15 +0,0 @@ -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 deleted file mode 100644 index 545cacc51f..0000000000 --- a/app/sdks/0.7.0/server-ruby/docs/examples/teams/delete-membership.md +++ /dev/null @@ -1,15 +0,0 @@ -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 deleted file mode 100644 index d28907f741..0000000000 --- a/app/sdks/0.7.0/server-ruby/docs/examples/teams/delete.md +++ /dev/null @@ -1,15 +0,0 @@ -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 deleted file mode 100644 index 013d952afc..0000000000 --- a/app/sdks/0.7.0/server-ruby/docs/examples/teams/get-memberships.md +++ /dev/null @@ -1,15 +0,0 @@ -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 deleted file mode 100644 index 1dd4918a12..0000000000 --- a/app/sdks/0.7.0/server-ruby/docs/examples/teams/get.md +++ /dev/null @@ -1,15 +0,0 @@ -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 deleted file mode 100644 index c0cd72a362..0000000000 --- a/app/sdks/0.7.0/server-ruby/docs/examples/teams/list.md +++ /dev/null @@ -1,15 +0,0 @@ -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 deleted file mode 100644 index b7e87a8e09..0000000000 --- a/app/sdks/0.7.0/server-ruby/docs/examples/teams/update.md +++ /dev/null @@ -1,15 +0,0 @@ -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 deleted file mode 100644 index 0a152ac366..0000000000 --- a/app/sdks/0.7.0/server-ruby/docs/examples/users/create.md +++ /dev/null @@ -1,15 +0,0 @@ -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 deleted file mode 100644 index 149c7d9293..0000000000 --- a/app/sdks/0.7.0/server-ruby/docs/examples/users/delete-session.md +++ /dev/null @@ -1,15 +0,0 @@ -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 deleted file mode 100644 index 3f02e08dd1..0000000000 --- a/app/sdks/0.7.0/server-ruby/docs/examples/users/delete-sessions.md +++ /dev/null @@ -1,15 +0,0 @@ -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/delete-user.md b/app/sdks/0.7.0/server-ruby/docs/examples/users/delete-user.md deleted file mode 100644 index 3a0bcb0407..0000000000 --- a/app/sdks/0.7.0/server-ruby/docs/examples/users/delete-user.md +++ /dev/null @@ -1,15 +0,0 @@ -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_user(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 deleted file mode 100644 index 695a77ad27..0000000000 --- a/app/sdks/0.7.0/server-ruby/docs/examples/users/get-logs.md +++ /dev/null @@ -1,15 +0,0 @@ -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 deleted file mode 100644 index 4a0761e283..0000000000 --- a/app/sdks/0.7.0/server-ruby/docs/examples/users/get-prefs.md +++ /dev/null @@ -1,15 +0,0 @@ -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 deleted file mode 100644 index 52f37a4609..0000000000 --- a/app/sdks/0.7.0/server-ruby/docs/examples/users/get-sessions.md +++ /dev/null @@ -1,15 +0,0 @@ -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 deleted file mode 100644 index 562ac958c3..0000000000 --- a/app/sdks/0.7.0/server-ruby/docs/examples/users/get.md +++ /dev/null @@ -1,15 +0,0 @@ -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 deleted file mode 100644 index 096ce859e3..0000000000 --- a/app/sdks/0.7.0/server-ruby/docs/examples/users/list.md +++ /dev/null @@ -1,15 +0,0 @@ -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 deleted file mode 100644 index 2bb2d42e16..0000000000 --- a/app/sdks/0.7.0/server-ruby/docs/examples/users/update-prefs.md +++ /dev/null @@ -1,15 +0,0 @@ -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 deleted file mode 100644 index 088ee380d8..0000000000 --- a/app/sdks/0.7.0/server-ruby/docs/examples/users/update-status.md +++ /dev/null @@ -1,15 +0,0 @@ -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 deleted file mode 100644 index 1b4f38bea2..0000000000 --- a/app/sdks/0.7.0/server-ruby/lib/appwrite.rb +++ /dev/null @@ -1,13 +0,0 @@ -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 deleted file mode 100644 index 2cd09d52fe..0000000000 --- a/app/sdks/0.7.0/server-ruby/lib/appwrite/client.rb +++ /dev/null @@ -1,116 +0,0 @@ -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 deleted file mode 100644 index 0d954c6d17..0000000000 --- a/app/sdks/0.7.0/server-ruby/lib/appwrite/service.rb +++ /dev/null @@ -1,12 +0,0 @@ -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 deleted file mode 100644 index afc94c20c3..0000000000 --- a/app/sdks/0.7.0/server-ruby/lib/appwrite/services/avatars.rb +++ /dev/null @@ -1,111 +0,0 @@ -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_initials(name: '', width: 500, height: 500, color: '', background: '') - path = '/avatars/initials' - - params = { - 'name': name, - 'width': width, - 'height': height, - 'color': color, - 'background': background - } - - return @client.call('get', path, { - 'content-type' => 'application/json', - }, params); - end - - def get_q_r(text:, size: 400, margin: 1, download: false) - 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 deleted file mode 100644 index 41a151c73a..0000000000 --- a/app/sdks/0.7.0/server-ruby/lib/appwrite/services/database.rb +++ /dev/null @@ -1,158 +0,0 @@ -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: [], limit: 25, offset: 0, order_field: '', order_type: 'ASC', order_cast: 'string', search: '') - path = '/database/collections/{collectionId}/documents' - .gsub('{collectionId}', collection_id) - - params = { - 'filters': filters, - 'limit': limit, - 'offset': offset, - 'orderField': order_field, - 'orderType': order_type, - 'orderCast': order_cast, - 'search': search - } - - 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 - - - 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 deleted file mode 100644 index 3d133efc9d..0000000000 --- a/app/sdks/0.7.0/server-ruby/lib/appwrite/services/functions.rb +++ /dev/null @@ -1,192 +0,0 @@ -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:, env:, vars: [], events: [], schedule: '', timeout: 15) - path = '/functions' - - params = { - 'name': name, - 'env': env, - '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('{functionId}', 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('{functionId}', 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('{functionId}', 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('{functionId}', 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:) - path = '/functions/{functionId}/executions' - .gsub('{functionId}', function_id) - - params = { - } - - return @client.call('post', path, { - 'content-type' => 'application/json', - }, params); - end - - def get_execution(function_id:, execution_id:) - path = '/functions/{functionId}/executions/{executionId}' - .gsub('{functionId}', function_id) - .gsub('{executionId}', 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('{functionId}', 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('{functionId}', 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:, command:, code:) - path = '/functions/{functionId}/tags' - .gsub('{functionId}', function_id) - - params = { - 'command': command, - 'code': code - } - - return @client.call('post', path, { - 'content-type' => 'multipart/form-data', - }, params); - end - - def get_tag(function_id:, tag_id:) - path = '/functions/{functionId}/tags/{tagId}' - .gsub('{functionId}', function_id) - .gsub('{tagId}', 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('{functionId}', function_id) - .gsub('{tagId}', 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 deleted file mode 100644 index d2c6bc7b60..0000000000 --- a/app/sdks/0.7.0/server-ruby/lib/appwrite/services/health.rb +++ /dev/null @@ -1,141 +0,0 @@ -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 deleted file mode 100644 index e71756b2a7..0000000000 --- a/app/sdks/0.7.0/server-ruby/lib/appwrite/services/locale.rb +++ /dev/null @@ -1,86 +0,0 @@ -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 - - def get_languages() - path = '/locale/languages' - - 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 deleted file mode 100644 index 0e99a2b0d5..0000000000 --- a/app/sdks/0.7.0/server-ruby/lib/appwrite/services/storage.rb +++ /dev/null @@ -1,118 +0,0 @@ -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 deleted file mode 100644 index 0480a4507e..0000000000 --- a/app/sdks/0.7.0/server-ruby/lib/appwrite/services/teams.rb +++ /dev/null @@ -1,119 +0,0 @@ -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:, search: '', limit: 25, offset: 0, order_type: 'ASC') - path = '/teams/{teamId}/memberships' - .gsub('{teamId}', team_id) - - params = { - 'search': search, - 'limit': limit, - 'offset': offset, - 'orderType': order_type - } - - 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 deleted file mode 100644 index 3c70843519..0000000000 --- a/app/sdks/0.7.0/server-ruby/lib/appwrite/services/users.rb +++ /dev/null @@ -1,149 +0,0 @@ -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 delete_user(user_id:) - path = '/users/{userId}' - .gsub('{userId}', user_id) - - params = { - } - - return @client.call('delete', 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