chirag-appwrite-cli 0.1.1 → 0.2.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.github/workflows/build-verify.yml +71 -0
- package/.github/workflows/npm-publish.yml +41 -22
- package/CHANGELOG.md +190 -1
- package/LICENSE.md +12 -1
- package/README.md +182 -15
- package/bun.lock +627 -0
- package/dist/bundle.cjs +108228 -0
- package/dist/index.d.ts +7 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +149 -0
- package/dist/index.js.map +1 -0
- package/dist/lib/client.d.ts +88 -0
- package/dist/lib/client.d.ts.map +1 -0
- package/dist/lib/client.js +238 -0
- package/dist/lib/client.js.map +1 -0
- package/dist/lib/commands/config.d.ts +557 -0
- package/dist/lib/commands/config.d.ts.map +1 -0
- package/dist/lib/commands/config.js +415 -0
- package/dist/lib/commands/config.js.map +1 -0
- package/dist/lib/commands/db.d.ts +34 -0
- package/dist/lib/commands/db.d.ts.map +1 -0
- package/dist/lib/commands/db.js +247 -0
- package/dist/lib/commands/db.js.map +1 -0
- package/dist/lib/commands/errors.d.ts +68 -0
- package/dist/lib/commands/errors.d.ts.map +1 -0
- package/dist/lib/commands/errors.js +72 -0
- package/dist/lib/commands/errors.js.map +1 -0
- package/dist/lib/commands/generic.d.ts +17 -0
- package/dist/lib/commands/generic.d.ts.map +1 -0
- package/dist/lib/commands/generic.js +292 -0
- package/dist/lib/commands/generic.js.map +1 -0
- package/dist/lib/commands/init.d.ts +3 -0
- package/dist/lib/commands/init.d.ts.map +1 -0
- package/dist/lib/commands/init.js +526 -0
- package/dist/lib/commands/init.js.map +1 -0
- package/dist/lib/commands/pull.d.ts +110 -0
- package/dist/lib/commands/pull.d.ts.map +1 -0
- package/dist/lib/commands/pull.js +626 -0
- package/dist/lib/commands/pull.js.map +1 -0
- package/dist/lib/commands/push.d.ts +82 -0
- package/dist/lib/commands/push.d.ts.map +1 -0
- package/dist/lib/commands/push.js +1666 -0
- package/dist/lib/commands/push.js.map +1 -0
- package/dist/lib/commands/run.d.ts +3 -0
- package/dist/lib/commands/run.d.ts.map +1 -0
- package/dist/lib/commands/run.js +289 -0
- package/dist/lib/commands/run.js.map +1 -0
- package/dist/lib/commands/schema.d.ts +57 -0
- package/dist/lib/commands/schema.d.ts.map +1 -0
- package/dist/lib/commands/schema.js +75 -0
- package/dist/lib/commands/schema.js.map +1 -0
- package/dist/lib/commands/services/account.d.ts +3 -0
- package/dist/lib/commands/services/account.d.ts.map +1 -0
- package/dist/lib/commands/services/account.js +306 -0
- package/dist/lib/commands/services/account.js.map +1 -0
- package/dist/lib/commands/services/avatars.d.ts +3 -0
- package/dist/lib/commands/services/avatars.d.ts.map +1 -0
- package/dist/lib/commands/services/avatars.js +118 -0
- package/dist/lib/commands/services/avatars.js.map +1 -0
- package/dist/lib/commands/services/console.d.ts +3 -0
- package/dist/lib/commands/services/console.d.ts.map +1 -0
- package/dist/lib/commands/services/console.js +41 -0
- package/dist/lib/commands/services/console.js.map +1 -0
- package/dist/lib/commands/services/databases.d.ts +3 -0
- package/dist/lib/commands/services/databases.d.ts.map +1 -0
- package/dist/lib/commands/services/databases.js +612 -0
- package/dist/lib/commands/services/databases.js.map +1 -0
- package/dist/lib/commands/services/functions.d.ts +3 -0
- package/dist/lib/commands/services/functions.d.ts.map +1 -0
- package/dist/lib/commands/services/functions.js +258 -0
- package/dist/lib/commands/services/functions.js.map +1 -0
- package/dist/lib/commands/services/graphql.d.ts +3 -0
- package/dist/lib/commands/services/graphql.d.ts.map +1 -0
- package/dist/lib/commands/services/graphql.js +28 -0
- package/dist/lib/commands/services/graphql.js.map +1 -0
- package/dist/lib/commands/services/health.d.ts +3 -0
- package/dist/lib/commands/services/health.d.ts.map +1 -0
- package/dist/lib/commands/services/health.js +123 -0
- package/dist/lib/commands/services/health.js.map +1 -0
- package/dist/lib/commands/services/locale.d.ts +3 -0
- package/dist/lib/commands/services/locale.d.ts.map +1 -0
- package/dist/lib/commands/services/locale.js +52 -0
- package/dist/lib/commands/services/locale.js.map +1 -0
- package/dist/lib/commands/services/messaging.d.ts +3 -0
- package/dist/lib/commands/services/messaging.d.ts.map +1 -0
- package/dist/lib/commands/services/messaging.js +505 -0
- package/dist/lib/commands/services/messaging.js.map +1 -0
- package/dist/lib/commands/services/migrations.d.ts +3 -0
- package/dist/lib/commands/services/migrations.d.ts.map +1 -0
- package/dist/lib/commands/services/migrations.js +135 -0
- package/dist/lib/commands/services/migrations.js.map +1 -0
- package/dist/lib/commands/services/project.d.ts +3 -0
- package/dist/lib/commands/services/project.d.ts.map +1 -0
- package/dist/lib/commands/services/project.js +54 -0
- package/dist/lib/commands/services/project.js.map +1 -0
- package/dist/lib/commands/services/projects.d.ts +3 -0
- package/dist/lib/commands/services/projects.d.ts.map +1 -0
- package/dist/lib/commands/services/projects.js +415 -0
- package/dist/lib/commands/services/projects.js.map +1 -0
- package/dist/lib/commands/services/proxy.d.ts +3 -0
- package/dist/lib/commands/services/proxy.d.ts.map +1 -0
- package/dist/lib/commands/services/proxy.js +68 -0
- package/dist/lib/commands/services/proxy.js.map +1 -0
- package/dist/lib/commands/services/sites.d.ts +3 -0
- package/dist/lib/commands/services/sites.d.ts.map +1 -0
- package/dist/lib/commands/services/sites.js +242 -0
- package/dist/lib/commands/services/sites.js.map +1 -0
- package/dist/lib/commands/services/storage.d.ts +3 -0
- package/dist/lib/commands/services/storage.d.ts.map +1 -0
- package/dist/lib/commands/services/storage.js +153 -0
- package/dist/lib/commands/services/storage.js.map +1 -0
- package/dist/lib/commands/services/tablesdb.d.ts +3 -0
- package/dist/lib/commands/services/tablesdb.d.ts.map +1 -0
- package/dist/lib/commands/services/tablesdb.js +605 -0
- package/dist/lib/commands/services/tablesdb.js.map +1 -0
- package/dist/lib/commands/services/teams.d.ts +3 -0
- package/dist/lib/commands/services/teams.d.ts.map +1 -0
- package/dist/lib/commands/services/teams.js +123 -0
- package/dist/lib/commands/services/teams.js.map +1 -0
- package/dist/lib/commands/services/tokens.d.ts +3 -0
- package/dist/lib/commands/services/tokens.d.ts.map +1 -0
- package/dist/lib/commands/services/tokens.js +49 -0
- package/dist/lib/commands/services/tokens.js.map +1 -0
- package/dist/lib/commands/services/users.d.ts +3 -0
- package/dist/lib/commands/services/users.d.ts.map +1 -0
- package/dist/lib/commands/services/users.js +312 -0
- package/dist/lib/commands/services/users.js.map +1 -0
- package/dist/lib/commands/services/vcs.d.ts +3 -0
- package/dist/lib/commands/services/vcs.d.ts.map +1 -0
- package/dist/lib/commands/services/vcs.js +87 -0
- package/dist/lib/commands/services/vcs.js.map +1 -0
- package/dist/lib/commands/types.d.ts +3 -0
- package/dist/lib/commands/types.d.ts.map +1 -0
- package/dist/lib/commands/types.js +151 -0
- package/dist/lib/commands/types.js.map +1 -0
- package/dist/lib/commands/update.d.ts +3 -0
- package/dist/lib/commands/update.d.ts.map +1 -0
- package/dist/lib/commands/update.js +201 -0
- package/dist/lib/commands/update.js.map +1 -0
- package/dist/lib/commands/utils/attributes.d.ts +46 -0
- package/dist/lib/commands/utils/attributes.d.ts.map +1 -0
- package/dist/lib/commands/utils/attributes.js +521 -0
- package/dist/lib/commands/utils/attributes.js.map +1 -0
- package/dist/lib/commands/utils/change-approval.d.ts +25 -0
- package/dist/lib/commands/utils/change-approval.d.ts.map +1 -0
- package/dist/lib/commands/utils/change-approval.js +129 -0
- package/dist/lib/commands/utils/change-approval.js.map +1 -0
- package/dist/lib/commands/utils/database-sync.d.ts +10 -0
- package/dist/lib/commands/utils/database-sync.d.ts.map +1 -0
- package/dist/lib/commands/utils/database-sync.js +136 -0
- package/dist/lib/commands/utils/database-sync.js.map +1 -0
- package/dist/lib/commands/utils/deployment.d.ts +34 -0
- package/dist/lib/commands/utils/deployment.d.ts.map +1 -0
- package/dist/lib/commands/utils/deployment.js +108 -0
- package/dist/lib/commands/utils/deployment.js.map +1 -0
- package/dist/lib/commands/utils/error-formatter.d.ts +19 -0
- package/dist/lib/commands/utils/error-formatter.d.ts.map +1 -0
- package/dist/lib/commands/utils/error-formatter.js +333 -0
- package/dist/lib/commands/utils/error-formatter.js.map +1 -0
- package/dist/lib/commands/utils/pools.d.ts +16 -0
- package/dist/lib/commands/utils/pools.d.ts.map +1 -0
- package/dist/lib/commands/utils/pools.js +197 -0
- package/dist/lib/commands/utils/pools.js.map +1 -0
- package/dist/lib/config.d.ts +119 -0
- package/dist/lib/config.d.ts.map +1 -0
- package/dist/lib/config.js +728 -0
- package/dist/lib/config.js.map +1 -0
- package/dist/lib/emulation/docker.d.ts +7 -0
- package/dist/lib/emulation/docker.d.ts.map +1 -0
- package/dist/lib/emulation/docker.js +224 -0
- package/dist/lib/emulation/docker.js.map +1 -0
- package/dist/lib/emulation/utils.d.ts +29 -0
- package/dist/lib/emulation/utils.d.ts.map +1 -0
- package/dist/lib/emulation/utils.js +165 -0
- package/dist/lib/emulation/utils.js.map +1 -0
- package/dist/lib/id.d.ts +7 -0
- package/dist/lib/id.d.ts.map +1 -0
- package/dist/lib/id.js +27 -0
- package/dist/lib/id.js.map +1 -0
- package/dist/lib/paginate.d.ts +9 -0
- package/dist/lib/paginate.d.ts.map +1 -0
- package/dist/lib/paginate.js +43 -0
- package/dist/lib/paginate.js.map +1 -0
- package/dist/lib/parser.d.ts +18 -0
- package/dist/lib/parser.d.ts.map +1 -0
- package/dist/lib/parser.js +225 -0
- package/dist/lib/parser.js.map +1 -0
- package/dist/lib/questions.d.ts +59 -0
- package/dist/lib/questions.d.ts.map +1 -0
- package/dist/lib/questions.js +991 -0
- package/dist/lib/questions.js.map +1 -0
- package/dist/lib/sdks.d.ts +4 -0
- package/dist/lib/sdks.d.ts.map +1 -0
- package/dist/lib/sdks.js +61 -0
- package/dist/lib/sdks.js.map +1 -0
- package/dist/lib/services.d.ts +13 -0
- package/dist/lib/services.d.ts.map +1 -0
- package/dist/lib/services.js +47 -0
- package/dist/lib/services.js.map +1 -0
- package/dist/lib/spinner.d.ts +28 -0
- package/dist/lib/spinner.d.ts.map +1 -0
- package/dist/lib/spinner.js +91 -0
- package/dist/lib/spinner.js.map +1 -0
- package/dist/lib/type-generation/attribute.d.ts +17 -0
- package/dist/lib/type-generation/attribute.d.ts.map +1 -0
- package/dist/lib/type-generation/attribute.js +16 -0
- package/dist/lib/type-generation/attribute.js.map +1 -0
- package/dist/lib/type-generation/languages/csharp.d.ts +7 -0
- package/dist/lib/type-generation/languages/csharp.d.ts.map +1 -0
- package/dist/lib/type-generation/languages/csharp.js +180 -0
- package/dist/lib/type-generation/languages/csharp.js.map +1 -0
- package/dist/lib/type-generation/languages/dart.d.ts +8 -0
- package/dist/lib/type-generation/languages/dart.d.ts.map +1 -0
- package/dist/lib/type-generation/languages/dart.js +197 -0
- package/dist/lib/type-generation/languages/dart.js.map +1 -0
- package/dist/lib/type-generation/languages/java.d.ts +7 -0
- package/dist/lib/type-generation/languages/java.d.ts.map +1 -0
- package/dist/lib/type-generation/languages/java.js +140 -0
- package/dist/lib/type-generation/languages/java.js.map +1 -0
- package/dist/lib/type-generation/languages/javascript.d.ts +9 -0
- package/dist/lib/type-generation/languages/javascript.d.ts.map +1 -0
- package/dist/lib/type-generation/languages/javascript.js +109 -0
- package/dist/lib/type-generation/languages/javascript.js.map +1 -0
- package/dist/lib/type-generation/languages/kotlin.d.ts +7 -0
- package/dist/lib/type-generation/languages/kotlin.d.ts.map +1 -0
- package/dist/lib/type-generation/languages/kotlin.js +95 -0
- package/dist/lib/type-generation/languages/kotlin.js.map +1 -0
- package/dist/lib/type-generation/languages/language.d.ts +43 -0
- package/dist/lib/type-generation/languages/language.d.ts.map +1 -0
- package/dist/lib/type-generation/languages/language.js +77 -0
- package/dist/lib/type-generation/languages/language.js.map +1 -0
- package/dist/lib/type-generation/languages/php.d.ts +7 -0
- package/dist/lib/type-generation/languages/php.d.ts.map +1 -0
- package/dist/lib/type-generation/languages/php.js +116 -0
- package/dist/lib/type-generation/languages/php.js.map +1 -0
- package/dist/lib/type-generation/languages/swift.d.ts +7 -0
- package/dist/lib/type-generation/languages/swift.d.ts.map +1 -0
- package/dist/lib/type-generation/languages/swift.js +179 -0
- package/dist/lib/type-generation/languages/swift.js.map +1 -0
- package/dist/lib/type-generation/languages/typescript.d.ts +9 -0
- package/dist/lib/type-generation/languages/typescript.d.ts.map +1 -0
- package/dist/lib/type-generation/languages/typescript.js +115 -0
- package/dist/lib/type-generation/languages/typescript.js.map +1 -0
- package/dist/lib/types.d.ts +63 -0
- package/dist/lib/types.d.ts.map +1 -0
- package/dist/lib/types.js +2 -0
- package/dist/lib/types.js.map +1 -0
- package/dist/lib/utils.d.ts +18 -0
- package/dist/lib/utils.d.ts.map +1 -0
- package/dist/lib/utils.js +323 -0
- package/dist/lib/utils.js.map +1 -0
- package/dist/lib/validations.d.ts +2 -0
- package/dist/lib/validations.d.ts.map +1 -0
- package/dist/lib/validations.js +16 -0
- package/dist/lib/validations.js.map +1 -0
- package/dist/package.json +68 -0
- package/dist/scripts/generate-commands.d.ts +2 -0
- package/dist/scripts/generate-commands.d.ts.map +1 -0
- package/dist/scripts/generate-commands.js +398 -0
- package/dist/scripts/generate-commands.js.map +1 -0
- package/dist/sites/profile-website/src/lib/utils.d.ts +4 -0
- package/dist/sites/profile-website/src/lib/utils.d.ts.map +1 -0
- package/dist/sites/profile-website/src/lib/utils.js +32 -0
- package/dist/sites/profile-website/src/lib/utils.js.map +1 -0
- package/dist/sites/profile-website/tailwind.config.d.ts +3 -0
- package/dist/sites/profile-website/tailwind.config.d.ts.map +1 -0
- package/dist/sites/profile-website/tailwind.config.js +110 -0
- package/dist/sites/profile-website/tailwind.config.js.map +1 -0
- package/dist/test.d.ts +2 -0
- package/dist/test.d.ts.map +1 -0
- package/dist/test.js +38 -0
- package/dist/test.js.map +1 -0
- package/index.ts +190 -0
- package/install.ps1 +5 -8
- package/install.sh +4 -5
- package/lib/client.ts +292 -0
- package/lib/commands/config.ts +493 -0
- package/lib/commands/db.ts +324 -0
- package/lib/commands/errors.ts +93 -0
- package/lib/commands/generic.ts +440 -0
- package/lib/commands/init.ts +713 -0
- package/lib/commands/pull.ts +944 -0
- package/lib/commands/push.ts +2355 -0
- package/lib/commands/run.ts +416 -0
- package/lib/commands/schema.ts +103 -0
- package/lib/commands/services/account.ts +832 -0
- package/lib/commands/services/avatars.ts +400 -0
- package/lib/commands/services/console.ts +73 -0
- package/lib/commands/services/databases.ts +2080 -0
- package/lib/commands/services/functions.ts +855 -0
- package/lib/commands/services/graphql.ts +47 -0
- package/lib/commands/services/health.ts +322 -0
- package/lib/commands/services/locale.ts +99 -0
- package/lib/commands/services/messaging.ts +1871 -0
- package/lib/commands/services/migrations.ts +421 -0
- package/lib/commands/services/project.ts +116 -0
- package/lib/commands/services/projects.ts +1317 -0
- package/lib/commands/services/proxy.ts +163 -0
- package/lib/commands/services/sites.ts +777 -0
- package/lib/commands/services/storage.ts +547 -0
- package/lib/commands/services/tablesdb.ts +1928 -0
- package/lib/commands/services/teams.ts +294 -0
- package/lib/commands/services/tokens.ts +106 -0
- package/lib/commands/services/users.ts +886 -0
- package/lib/commands/services/vcs.ts +268 -0
- package/lib/commands/types.ts +220 -0
- package/lib/commands/update.ts +245 -0
- package/lib/commands/utils/attributes.ts +734 -0
- package/lib/commands/utils/change-approval.ts +186 -0
- package/lib/commands/utils/database-sync.ts +180 -0
- package/lib/commands/utils/deployment.ts +180 -0
- package/lib/commands/utils/error-formatter.ts +417 -0
- package/lib/commands/utils/pools.ts +354 -0
- package/lib/config.ts +932 -0
- package/lib/emulation/docker.ts +312 -0
- package/lib/emulation/utils.ts +207 -0
- package/lib/id.ts +30 -0
- package/lib/paginate.ts +77 -0
- package/lib/parser.ts +264 -0
- package/lib/questions.ts +1167 -0
- package/lib/sdks.ts +84 -0
- package/lib/services.ts +72 -0
- package/lib/spinner.ts +131 -0
- package/lib/type-generation/attribute.ts +18 -0
- package/lib/type-generation/languages/csharp.ts +192 -0
- package/lib/type-generation/languages/dart.ts +217 -0
- package/lib/type-generation/languages/java.ts +152 -0
- package/lib/type-generation/languages/javascript.ts +122 -0
- package/lib/type-generation/languages/kotlin.ts +107 -0
- package/lib/type-generation/languages/language.ts +127 -0
- package/lib/type-generation/languages/php.ts +128 -0
- package/lib/type-generation/languages/swift.ts +191 -0
- package/lib/type-generation/languages/typescript.ts +133 -0
- package/lib/types.ts +75 -0
- package/lib/utils.ts +394 -0
- package/lib/validations.ts +20 -0
- package/package.json +39 -21
- package/scoop/appwrite.config.json +20 -0
- package/scripts/generate-commands.ts +539 -0
- package/tsconfig.json +24 -0
- package/appwrite.config.json +0 -420
- package/docs/examples/account/create-anonymous-session.md +0 -1
- package/docs/examples/account/create-email-password-session.md +0 -3
- package/docs/examples/account/create-email-token.md +0 -4
- package/docs/examples/account/create-j-w-t.md +0 -1
- package/docs/examples/account/create-magic-u-r-l-token.md +0 -5
- package/docs/examples/account/create-mfa-authenticator.md +0 -2
- package/docs/examples/account/create-mfa-challenge.md +0 -2
- package/docs/examples/account/create-mfa-recovery-codes.md +0 -1
- package/docs/examples/account/create-o-auth2session.md +0 -5
- package/docs/examples/account/create-o-auth2token.md +0 -5
- package/docs/examples/account/create-phone-token.md +0 -3
- package/docs/examples/account/create-phone-verification.md +0 -1
- package/docs/examples/account/create-push-target.md +0 -4
- package/docs/examples/account/create-recovery.md +0 -3
- package/docs/examples/account/create-session.md +0 -3
- package/docs/examples/account/create-verification.md +0 -2
- package/docs/examples/account/create.md +0 -5
- package/docs/examples/account/delete-identity.md +0 -2
- package/docs/examples/account/delete-mfa-authenticator.md +0 -2
- package/docs/examples/account/delete-push-target.md +0 -2
- package/docs/examples/account/delete-session.md +0 -2
- package/docs/examples/account/delete-sessions.md +0 -1
- package/docs/examples/account/delete.md +0 -1
- package/docs/examples/account/get-mfa-recovery-codes.md +0 -1
- package/docs/examples/account/get-prefs.md +0 -1
- package/docs/examples/account/get-session.md +0 -2
- package/docs/examples/account/get.md +0 -1
- package/docs/examples/account/list-identities.md +0 -2
- package/docs/examples/account/list-logs.md +0 -2
- package/docs/examples/account/list-mfa-factors.md +0 -1
- package/docs/examples/account/list-sessions.md +0 -1
- package/docs/examples/account/update-email.md +0 -3
- package/docs/examples/account/update-m-f-a.md +0 -2
- package/docs/examples/account/update-magic-u-r-l-session.md +0 -3
- package/docs/examples/account/update-mfa-authenticator.md +0 -3
- package/docs/examples/account/update-mfa-challenge.md +0 -3
- package/docs/examples/account/update-mfa-recovery-codes.md +0 -1
- package/docs/examples/account/update-name.md +0 -2
- package/docs/examples/account/update-password.md +0 -3
- package/docs/examples/account/update-phone-session.md +0 -3
- package/docs/examples/account/update-phone-verification.md +0 -3
- package/docs/examples/account/update-phone.md +0 -3
- package/docs/examples/account/update-prefs.md +0 -2
- package/docs/examples/account/update-push-target.md +0 -3
- package/docs/examples/account/update-recovery.md +0 -4
- package/docs/examples/account/update-session.md +0 -2
- package/docs/examples/account/update-status.md +0 -1
- package/docs/examples/account/update-verification.md +0 -3
- package/docs/examples/avatars/get-browser.md +0 -5
- package/docs/examples/avatars/get-credit-card.md +0 -5
- package/docs/examples/avatars/get-favicon.md +0 -2
- package/docs/examples/avatars/get-flag.md +0 -5
- package/docs/examples/avatars/get-image.md +0 -4
- package/docs/examples/avatars/get-initials.md +0 -5
- package/docs/examples/avatars/get-q-r.md +0 -5
- package/docs/examples/console/get-resource.md +0 -3
- package/docs/examples/console/variables.md +0 -1
- package/docs/examples/databases/create-boolean-attribute.md +0 -7
- package/docs/examples/databases/create-collection.md +0 -7
- package/docs/examples/databases/create-datetime-attribute.md +0 -7
- package/docs/examples/databases/create-document.md +0 -6
- package/docs/examples/databases/create-documents.md +0 -4
- package/docs/examples/databases/create-email-attribute.md +0 -7
- package/docs/examples/databases/create-enum-attribute.md +0 -8
- package/docs/examples/databases/create-float-attribute.md +0 -9
- package/docs/examples/databases/create-index.md +0 -8
- package/docs/examples/databases/create-integer-attribute.md +0 -9
- package/docs/examples/databases/create-ip-attribute.md +0 -7
- package/docs/examples/databases/create-relationship-attribute.md +0 -9
- package/docs/examples/databases/create-string-attribute.md +0 -9
- package/docs/examples/databases/create-url-attribute.md +0 -7
- package/docs/examples/databases/create.md +0 -4
- package/docs/examples/databases/decrement-document-attribute.md +0 -7
- package/docs/examples/databases/delete-attribute.md +0 -4
- package/docs/examples/databases/delete-collection.md +0 -3
- package/docs/examples/databases/delete-document.md +0 -4
- package/docs/examples/databases/delete-documents.md +0 -4
- package/docs/examples/databases/delete-index.md +0 -4
- package/docs/examples/databases/delete.md +0 -2
- package/docs/examples/databases/get-attribute.md +0 -4
- package/docs/examples/databases/get-collection-usage.md +0 -4
- package/docs/examples/databases/get-collection.md +0 -3
- package/docs/examples/databases/get-database-usage.md +0 -3
- package/docs/examples/databases/get-document.md +0 -5
- package/docs/examples/databases/get-index.md +0 -4
- package/docs/examples/databases/get-usage.md +0 -2
- package/docs/examples/databases/get.md +0 -2
- package/docs/examples/databases/increment-document-attribute.md +0 -7
- package/docs/examples/databases/list-attributes.md +0 -4
- package/docs/examples/databases/list-collection-logs.md +0 -4
- package/docs/examples/databases/list-collections.md +0 -4
- package/docs/examples/databases/list-document-logs.md +0 -5
- package/docs/examples/databases/list-documents.md +0 -4
- package/docs/examples/databases/list-indexes.md +0 -4
- package/docs/examples/databases/list-logs.md +0 -3
- package/docs/examples/databases/list-usage.md +0 -2
- package/docs/examples/databases/list.md +0 -3
- package/docs/examples/databases/update-boolean-attribute.md +0 -7
- package/docs/examples/databases/update-collection.md +0 -7
- package/docs/examples/databases/update-datetime-attribute.md +0 -7
- package/docs/examples/databases/update-document.md +0 -6
- package/docs/examples/databases/update-documents.md +0 -5
- package/docs/examples/databases/update-email-attribute.md +0 -7
- package/docs/examples/databases/update-enum-attribute.md +0 -8
- package/docs/examples/databases/update-float-attribute.md +0 -9
- package/docs/examples/databases/update-integer-attribute.md +0 -9
- package/docs/examples/databases/update-ip-attribute.md +0 -7
- package/docs/examples/databases/update-relationship-attribute.md +0 -6
- package/docs/examples/databases/update-string-attribute.md +0 -8
- package/docs/examples/databases/update-url-attribute.md +0 -7
- package/docs/examples/databases/update.md +0 -4
- package/docs/examples/databases/upsert-document.md +0 -6
- package/docs/examples/databases/upsert-documents.md +0 -4
- package/docs/examples/functions/create-deployment.md +0 -6
- package/docs/examples/functions/create-duplicate-deployment.md +0 -4
- package/docs/examples/functions/create-execution.md +0 -8
- package/docs/examples/functions/create-template-deployment.md +0 -7
- package/docs/examples/functions/create-variable.md +0 -5
- package/docs/examples/functions/create-vcs-deployment.md +0 -5
- package/docs/examples/functions/create.md +0 -19
- package/docs/examples/functions/delete-deployment.md +0 -3
- package/docs/examples/functions/delete-execution.md +0 -3
- package/docs/examples/functions/delete-variable.md +0 -3
- package/docs/examples/functions/delete.md +0 -2
- package/docs/examples/functions/get-deployment-download.md +0 -4
- package/docs/examples/functions/get-deployment.md +0 -3
- package/docs/examples/functions/get-execution.md +0 -3
- package/docs/examples/functions/get-template.md +0 -2
- package/docs/examples/functions/get-usage.md +0 -3
- package/docs/examples/functions/get-variable.md +0 -3
- package/docs/examples/functions/get.md +0 -2
- package/docs/examples/functions/list-deployments.md +0 -4
- package/docs/examples/functions/list-executions.md +0 -3
- package/docs/examples/functions/list-runtimes.md +0 -1
- package/docs/examples/functions/list-specifications.md +0 -1
- package/docs/examples/functions/list-templates.md +0 -5
- package/docs/examples/functions/list-usage.md +0 -2
- package/docs/examples/functions/list-variables.md +0 -2
- package/docs/examples/functions/list.md +0 -3
- package/docs/examples/functions/update-deployment-status.md +0 -3
- package/docs/examples/functions/update-function-deployment.md +0 -3
- package/docs/examples/functions/update-variable.md +0 -6
- package/docs/examples/functions/update.md +0 -19
- package/docs/examples/graphql/mutation.md +0 -2
- package/docs/examples/graphql/query.md +0 -2
- package/docs/examples/health/get-antivirus.md +0 -1
- package/docs/examples/health/get-cache.md +0 -1
- package/docs/examples/health/get-certificate.md +0 -2
- package/docs/examples/health/get-d-b.md +0 -1
- package/docs/examples/health/get-failed-jobs.md +0 -3
- package/docs/examples/health/get-pub-sub.md +0 -1
- package/docs/examples/health/get-queue-builds.md +0 -2
- package/docs/examples/health/get-queue-certificates.md +0 -2
- package/docs/examples/health/get-queue-databases.md +0 -3
- package/docs/examples/health/get-queue-deletes.md +0 -2
- package/docs/examples/health/get-queue-functions.md +0 -2
- package/docs/examples/health/get-queue-logs.md +0 -2
- package/docs/examples/health/get-queue-mails.md +0 -2
- package/docs/examples/health/get-queue-messaging.md +0 -2
- package/docs/examples/health/get-queue-migrations.md +0 -2
- package/docs/examples/health/get-queue-stats-resources.md +0 -2
- package/docs/examples/health/get-queue-usage.md +0 -2
- package/docs/examples/health/get-queue-webhooks.md +0 -2
- package/docs/examples/health/get-storage-local.md +0 -1
- package/docs/examples/health/get-storage.md +0 -1
- package/docs/examples/health/get-time.md +0 -1
- package/docs/examples/health/get.md +0 -1
- package/docs/examples/locale/get.md +0 -1
- package/docs/examples/locale/list-codes.md +0 -1
- package/docs/examples/locale/list-continents.md +0 -1
- package/docs/examples/locale/list-countries-e-u.md +0 -1
- package/docs/examples/locale/list-countries-phones.md +0 -1
- package/docs/examples/locale/list-countries.md +0 -1
- package/docs/examples/locale/list-currencies.md +0 -1
- package/docs/examples/locale/list-languages.md +0 -1
- package/docs/examples/messaging/create-apns-provider.md +0 -9
- package/docs/examples/messaging/create-email.md +0 -13
- package/docs/examples/messaging/create-fcm-provider.md +0 -5
- package/docs/examples/messaging/create-mailgun-provider.md +0 -11
- package/docs/examples/messaging/create-msg91provider.md +0 -7
- package/docs/examples/messaging/create-push.md +0 -20
- package/docs/examples/messaging/create-sendgrid-provider.md +0 -9
- package/docs/examples/messaging/create-sms.md +0 -8
- package/docs/examples/messaging/create-smtp-provider.md +0 -15
- package/docs/examples/messaging/create-subscriber.md +0 -4
- package/docs/examples/messaging/create-telesign-provider.md +0 -7
- package/docs/examples/messaging/create-textmagic-provider.md +0 -7
- package/docs/examples/messaging/create-topic.md +0 -4
- package/docs/examples/messaging/create-twilio-provider.md +0 -7
- package/docs/examples/messaging/create-vonage-provider.md +0 -7
- package/docs/examples/messaging/delete-provider.md +0 -2
- package/docs/examples/messaging/delete-subscriber.md +0 -3
- package/docs/examples/messaging/delete-topic.md +0 -2
- package/docs/examples/messaging/delete.md +0 -2
- package/docs/examples/messaging/get-message.md +0 -2
- package/docs/examples/messaging/get-provider.md +0 -2
- package/docs/examples/messaging/get-subscriber.md +0 -3
- package/docs/examples/messaging/get-topic.md +0 -2
- package/docs/examples/messaging/list-message-logs.md +0 -3
- package/docs/examples/messaging/list-messages.md +0 -3
- package/docs/examples/messaging/list-provider-logs.md +0 -3
- package/docs/examples/messaging/list-providers.md +0 -3
- package/docs/examples/messaging/list-subscriber-logs.md +0 -3
- package/docs/examples/messaging/list-subscribers.md +0 -4
- package/docs/examples/messaging/list-targets.md +0 -3
- package/docs/examples/messaging/list-topic-logs.md +0 -3
- package/docs/examples/messaging/list-topics.md +0 -3
- package/docs/examples/messaging/update-apns-provider.md +0 -9
- package/docs/examples/messaging/update-email.md +0 -13
- package/docs/examples/messaging/update-fcm-provider.md +0 -5
- package/docs/examples/messaging/update-mailgun-provider.md +0 -11
- package/docs/examples/messaging/update-msg91provider.md +0 -7
- package/docs/examples/messaging/update-push.md +0 -20
- package/docs/examples/messaging/update-sendgrid-provider.md +0 -9
- package/docs/examples/messaging/update-sms.md +0 -8
- package/docs/examples/messaging/update-smtp-provider.md +0 -15
- package/docs/examples/messaging/update-telesign-provider.md +0 -7
- package/docs/examples/messaging/update-textmagic-provider.md +0 -7
- package/docs/examples/messaging/update-topic.md +0 -4
- package/docs/examples/messaging/update-twilio-provider.md +0 -7
- package/docs/examples/messaging/update-vonage-provider.md +0 -7
- package/docs/examples/migrations/create-appwrite-migration.md +0 -5
- package/docs/examples/migrations/create-csv-migration.md +0 -4
- package/docs/examples/migrations/create-firebase-migration.md +0 -3
- package/docs/examples/migrations/create-n-host-migration.md +0 -9
- package/docs/examples/migrations/create-supabase-migration.md +0 -8
- package/docs/examples/migrations/delete.md +0 -2
- package/docs/examples/migrations/get-appwrite-report.md +0 -5
- package/docs/examples/migrations/get-firebase-report.md +0 -3
- package/docs/examples/migrations/get-n-host-report.md +0 -9
- package/docs/examples/migrations/get-supabase-report.md +0 -8
- package/docs/examples/migrations/get.md +0 -2
- package/docs/examples/migrations/list.md +0 -3
- package/docs/examples/migrations/retry.md +0 -2
- package/docs/examples/project/create-variable.md +0 -4
- package/docs/examples/project/delete-variable.md +0 -2
- package/docs/examples/project/get-usage.md +0 -4
- package/docs/examples/project/get-variable.md +0 -2
- package/docs/examples/project/list-variables.md +0 -1
- package/docs/examples/project/update-variable.md +0 -5
- package/docs/examples/projects/create-dev-key.md +0 -4
- package/docs/examples/projects/create-j-w-t.md +0 -4
- package/docs/examples/projects/create-key.md +0 -5
- package/docs/examples/projects/create-platform.md +0 -7
- package/docs/examples/projects/create-smtp-test.md +0 -11
- package/docs/examples/projects/create-webhook.md +0 -9
- package/docs/examples/projects/create.md +0 -14
- package/docs/examples/projects/delete-dev-key.md +0 -3
- package/docs/examples/projects/delete-email-template.md +0 -4
- package/docs/examples/projects/delete-key.md +0 -3
- package/docs/examples/projects/delete-platform.md +0 -3
- package/docs/examples/projects/delete-sms-template.md +0 -4
- package/docs/examples/projects/delete-webhook.md +0 -3
- package/docs/examples/projects/delete.md +0 -2
- package/docs/examples/projects/get-dev-key.md +0 -3
- package/docs/examples/projects/get-email-template.md +0 -4
- package/docs/examples/projects/get-key.md +0 -3
- package/docs/examples/projects/get-platform.md +0 -3
- package/docs/examples/projects/get-sms-template.md +0 -4
- package/docs/examples/projects/get-webhook.md +0 -3
- package/docs/examples/projects/get.md +0 -2
- package/docs/examples/projects/list-dev-keys.md +0 -3
- package/docs/examples/projects/list-keys.md +0 -2
- package/docs/examples/projects/list-platforms.md +0 -2
- package/docs/examples/projects/list-webhooks.md +0 -2
- package/docs/examples/projects/list.md +0 -3
- package/docs/examples/projects/update-api-status-all.md +0 -3
- package/docs/examples/projects/update-api-status.md +0 -4
- package/docs/examples/projects/update-auth-duration.md +0 -3
- package/docs/examples/projects/update-auth-limit.md +0 -3
- package/docs/examples/projects/update-auth-password-dictionary.md +0 -3
- package/docs/examples/projects/update-auth-password-history.md +0 -3
- package/docs/examples/projects/update-auth-sessions-limit.md +0 -3
- package/docs/examples/projects/update-auth-status.md +0 -4
- package/docs/examples/projects/update-dev-key.md +0 -5
- package/docs/examples/projects/update-email-template.md +0 -9
- package/docs/examples/projects/update-key.md +0 -6
- package/docs/examples/projects/update-memberships-privacy.md +0 -5
- package/docs/examples/projects/update-mock-numbers.md +0 -3
- package/docs/examples/projects/update-o-auth2.md +0 -6
- package/docs/examples/projects/update-personal-data-check.md +0 -3
- package/docs/examples/projects/update-platform.md +0 -7
- package/docs/examples/projects/update-service-status-all.md +0 -3
- package/docs/examples/projects/update-service-status.md +0 -4
- package/docs/examples/projects/update-session-alerts.md +0 -3
- package/docs/examples/projects/update-session-invalidation.md +0 -3
- package/docs/examples/projects/update-sms-template.md +0 -5
- package/docs/examples/projects/update-smtp.md +0 -11
- package/docs/examples/projects/update-team.md +0 -3
- package/docs/examples/projects/update-webhook-signature.md +0 -3
- package/docs/examples/projects/update-webhook.md +0 -10
- package/docs/examples/projects/update.md +0 -12
- package/docs/examples/proxy/create-a-p-i-rule.md +0 -2
- package/docs/examples/proxy/create-function-rule.md +0 -4
- package/docs/examples/proxy/create-redirect-rule.md +0 -6
- package/docs/examples/proxy/create-site-rule.md +0 -4
- package/docs/examples/proxy/delete-rule.md +0 -2
- package/docs/examples/proxy/get-rule.md +0 -2
- package/docs/examples/proxy/list-rules.md +0 -3
- package/docs/examples/proxy/update-rule-verification.md +0 -2
- package/docs/examples/sites/create-deployment.md +0 -7
- package/docs/examples/sites/create-duplicate-deployment.md +0 -3
- package/docs/examples/sites/create-template-deployment.md +0 -7
- package/docs/examples/sites/create-variable.md +0 -5
- package/docs/examples/sites/create-vcs-deployment.md +0 -5
- package/docs/examples/sites/create.md +0 -19
- package/docs/examples/sites/delete-deployment.md +0 -3
- package/docs/examples/sites/delete-log.md +0 -3
- package/docs/examples/sites/delete-variable.md +0 -3
- package/docs/examples/sites/delete.md +0 -2
- package/docs/examples/sites/get-deployment-download.md +0 -4
- package/docs/examples/sites/get-deployment.md +0 -3
- package/docs/examples/sites/get-log.md +0 -3
- package/docs/examples/sites/get-template.md +0 -2
- package/docs/examples/sites/get-usage.md +0 -3
- package/docs/examples/sites/get-variable.md +0 -3
- package/docs/examples/sites/get.md +0 -2
- package/docs/examples/sites/list-deployments.md +0 -4
- package/docs/examples/sites/list-frameworks.md +0 -1
- package/docs/examples/sites/list-logs.md +0 -3
- package/docs/examples/sites/list-specifications.md +0 -1
- package/docs/examples/sites/list-templates.md +0 -5
- package/docs/examples/sites/list-usage.md +0 -2
- package/docs/examples/sites/list-variables.md +0 -2
- package/docs/examples/sites/list.md +0 -3
- package/docs/examples/sites/update-deployment-status.md +0 -3
- package/docs/examples/sites/update-site-deployment.md +0 -3
- package/docs/examples/sites/update-variable.md +0 -6
- package/docs/examples/sites/update.md +0 -19
- package/docs/examples/storage/create-bucket.md +0 -11
- package/docs/examples/storage/create-file.md +0 -5
- package/docs/examples/storage/delete-bucket.md +0 -2
- package/docs/examples/storage/delete-file.md +0 -3
- package/docs/examples/storage/get-bucket-usage.md +0 -3
- package/docs/examples/storage/get-bucket.md +0 -2
- package/docs/examples/storage/get-file-download.md +0 -4
- package/docs/examples/storage/get-file-preview.md +0 -15
- package/docs/examples/storage/get-file-view.md +0 -4
- package/docs/examples/storage/get-file.md +0 -3
- package/docs/examples/storage/get-usage.md +0 -2
- package/docs/examples/storage/list-buckets.md +0 -3
- package/docs/examples/storage/list-files.md +0 -4
- package/docs/examples/storage/update-bucket.md +0 -11
- package/docs/examples/storage/update-file.md +0 -5
- package/docs/examples/tables/create-boolean-column.md +0 -7
- package/docs/examples/tables/create-datetime-column.md +0 -7
- package/docs/examples/tables/create-email-column.md +0 -7
- package/docs/examples/tables/create-enum-column.md +0 -8
- package/docs/examples/tables/create-float-column.md +0 -9
- package/docs/examples/tables/create-index.md +0 -8
- package/docs/examples/tables/create-integer-column.md +0 -9
- package/docs/examples/tables/create-ip-column.md +0 -7
- package/docs/examples/tables/create-relationship-column.md +0 -9
- package/docs/examples/tables/create-row.md +0 -6
- package/docs/examples/tables/create-rows.md +0 -4
- package/docs/examples/tables/create-string-column.md +0 -9
- package/docs/examples/tables/create-url-column.md +0 -7
- package/docs/examples/tables/create.md +0 -7
- package/docs/examples/tables/decrement-row-column.md +0 -7
- package/docs/examples/tables/delete-column.md +0 -4
- package/docs/examples/tables/delete-index.md +0 -4
- package/docs/examples/tables/delete-row.md +0 -4
- package/docs/examples/tables/delete-rows.md +0 -4
- package/docs/examples/tables/delete.md +0 -3
- package/docs/examples/tables/get-column.md +0 -4
- package/docs/examples/tables/get-index.md +0 -4
- package/docs/examples/tables/get-row.md +0 -5
- package/docs/examples/tables/get-usage.md +0 -4
- package/docs/examples/tables/get.md +0 -3
- package/docs/examples/tables/increment-row-column.md +0 -7
- package/docs/examples/tables/list-columns.md +0 -4
- package/docs/examples/tables/list-indexes.md +0 -4
- package/docs/examples/tables/list-logs.md +0 -4
- package/docs/examples/tables/list-row-logs.md +0 -5
- package/docs/examples/tables/list-rows.md +0 -4
- package/docs/examples/tables/list.md +0 -4
- package/docs/examples/tables/update-boolean-column.md +0 -7
- package/docs/examples/tables/update-datetime-column.md +0 -7
- package/docs/examples/tables/update-email-column.md +0 -7
- package/docs/examples/tables/update-enum-column.md +0 -8
- package/docs/examples/tables/update-float-column.md +0 -9
- package/docs/examples/tables/update-integer-column.md +0 -9
- package/docs/examples/tables/update-ip-column.md +0 -7
- package/docs/examples/tables/update-relationship-column.md +0 -6
- package/docs/examples/tables/update-row.md +0 -6
- package/docs/examples/tables/update-rows.md +0 -5
- package/docs/examples/tables/update-string-column.md +0 -8
- package/docs/examples/tables/update-url-column.md +0 -7
- package/docs/examples/tables/update.md +0 -7
- package/docs/examples/tables/upsert-row.md +0 -4
- package/docs/examples/tables/upsert-rows.md +0 -3
- package/docs/examples/teams/create-membership.md +0 -8
- package/docs/examples/teams/create.md +0 -4
- package/docs/examples/teams/delete-membership.md +0 -3
- package/docs/examples/teams/delete.md +0 -2
- package/docs/examples/teams/get-membership.md +0 -3
- package/docs/examples/teams/get-prefs.md +0 -2
- package/docs/examples/teams/get.md +0 -2
- package/docs/examples/teams/list-logs.md +0 -3
- package/docs/examples/teams/list-memberships.md +0 -4
- package/docs/examples/teams/list.md +0 -3
- package/docs/examples/teams/update-membership-status.md +0 -5
- package/docs/examples/teams/update-membership.md +0 -4
- package/docs/examples/teams/update-name.md +0 -3
- package/docs/examples/teams/update-prefs.md +0 -3
- package/docs/examples/tokens/create-file-token.md +0 -4
- package/docs/examples/tokens/delete.md +0 -2
- package/docs/examples/tokens/get.md +0 -2
- package/docs/examples/tokens/list.md +0 -4
- package/docs/examples/tokens/update.md +0 -3
- package/docs/examples/users/create-argon2user.md +0 -5
- package/docs/examples/users/create-bcrypt-user.md +0 -5
- package/docs/examples/users/create-j-w-t.md +0 -4
- package/docs/examples/users/create-m-d5user.md +0 -5
- package/docs/examples/users/create-mfa-recovery-codes.md +0 -2
- package/docs/examples/users/create-p-h-pass-user.md +0 -5
- package/docs/examples/users/create-s-h-a-user.md +0 -6
- package/docs/examples/users/create-scrypt-modified-user.md +0 -8
- package/docs/examples/users/create-scrypt-user.md +0 -10
- package/docs/examples/users/create-session.md +0 -2
- package/docs/examples/users/create-target.md +0 -7
- package/docs/examples/users/create-token.md +0 -4
- package/docs/examples/users/create.md +0 -6
- package/docs/examples/users/delete-identity.md +0 -2
- package/docs/examples/users/delete-mfa-authenticator.md +0 -3
- package/docs/examples/users/delete-session.md +0 -3
- package/docs/examples/users/delete-sessions.md +0 -2
- package/docs/examples/users/delete-target.md +0 -3
- package/docs/examples/users/delete.md +0 -2
- package/docs/examples/users/get-mfa-recovery-codes.md +0 -2
- package/docs/examples/users/get-prefs.md +0 -2
- package/docs/examples/users/get-target.md +0 -3
- package/docs/examples/users/get-usage.md +0 -2
- package/docs/examples/users/get.md +0 -2
- package/docs/examples/users/list-identities.md +0 -3
- package/docs/examples/users/list-logs.md +0 -3
- package/docs/examples/users/list-memberships.md +0 -4
- package/docs/examples/users/list-mfa-factors.md +0 -2
- package/docs/examples/users/list-sessions.md +0 -2
- package/docs/examples/users/list-targets.md +0 -3
- package/docs/examples/users/list.md +0 -3
- package/docs/examples/users/update-email-verification.md +0 -3
- package/docs/examples/users/update-email.md +0 -3
- package/docs/examples/users/update-labels.md +0 -3
- package/docs/examples/users/update-mfa-recovery-codes.md +0 -2
- package/docs/examples/users/update-mfa.md +0 -3
- package/docs/examples/users/update-name.md +0 -3
- package/docs/examples/users/update-password.md +0 -3
- package/docs/examples/users/update-phone-verification.md +0 -3
- package/docs/examples/users/update-phone.md +0 -3
- package/docs/examples/users/update-prefs.md +0 -3
- package/docs/examples/users/update-status.md +0 -3
- package/docs/examples/users/update-target.md +0 -6
- package/docs/examples/vcs/create-repository-detection.md +0 -5
- package/docs/examples/vcs/create-repository.md +0 -4
- package/docs/examples/vcs/delete-installation.md +0 -2
- package/docs/examples/vcs/get-installation.md +0 -2
- package/docs/examples/vcs/get-repository-contents.md +0 -5
- package/docs/examples/vcs/get-repository.md +0 -3
- package/docs/examples/vcs/list-installations.md +0 -3
- package/docs/examples/vcs/list-repositories.md +0 -4
- package/docs/examples/vcs/list-repository-branches.md +0 -3
- package/docs/examples/vcs/update-external-deployments.md +0 -4
- package/functions/Starter function/.prettierrc.json +0 -6
- package/functions/Starter function/README.md +0 -48
- package/functions/Starter function/package-lock.json +0 -60
- package/functions/Starter function/package.json +0 -16
- package/functions/Starter function/src/main.js +0 -35
- package/generate/appwrite.d.ts +0 -55
- package/generate/appwrite.db.ts +0 -75
- package/index.js +0 -109
- package/lib/client-generation/languages/typescript.js +0 -65
- package/lib/client.js +0 -259
- package/lib/commands/account.js +0 -2074
- package/lib/commands/avatars.js +0 -491
- package/lib/commands/console.js +0 -129
- package/lib/commands/databases.js +0 -2972
- package/lib/commands/functions.js +0 -1737
- package/lib/commands/generic.js +0 -328
- package/lib/commands/graphql.js +0 -128
- package/lib/commands/health.js +0 -891
- package/lib/commands/init.js +0 -566
- package/lib/commands/locale.js +0 -324
- package/lib/commands/messaging.js +0 -2970
- package/lib/commands/migrations.js +0 -751
- package/lib/commands/organizations.js +0 -48
- package/lib/commands/project.js +0 -308
- package/lib/commands/projects.js +0 -2615
- package/lib/commands/proxy.js +0 -406
- package/lib/commands/pull.js +0 -474
- package/lib/commands/push.js +0 -2117
- package/lib/commands/run.js +0 -330
- package/lib/commands/sites.js +0 -1663
- package/lib/commands/storage.js +0 -990
- package/lib/commands/tables.js +0 -2607
- package/lib/commands/teams.js +0 -682
- package/lib/commands/tokens.js +0 -261
- package/lib/commands/types.js +0 -191
- package/lib/commands/users.js +0 -2035
- package/lib/commands/vcs.js +0 -484
- package/lib/config.js +0 -717
- package/lib/emulation/docker.js +0 -264
- package/lib/emulation/utils.js +0 -186
- package/lib/exception.js +0 -9
- package/lib/id.js +0 -30
- package/lib/paginate.js +0 -52
- package/lib/parser.js +0 -246
- package/lib/questions.js +0 -1006
- package/lib/sdks.js +0 -60
- package/lib/spinner.js +0 -104
- package/lib/type-generation/attribute.js +0 -16
- package/lib/type-generation/languages/dart.js +0 -196
- package/lib/type-generation/languages/java.js +0 -130
- package/lib/type-generation/languages/javascript.js +0 -102
- package/lib/type-generation/languages/kotlin.js +0 -85
- package/lib/type-generation/languages/language.js +0 -125
- package/lib/type-generation/languages/php.js +0 -110
- package/lib/type-generation/languages/swift.js +0 -169
- package/lib/type-generation/languages/typescript.js +0 -105
- package/lib/utils.js +0 -289
- package/lib/validations.js +0 -17
- package/scoop/appwrite.json +0 -30
- package/sites/JavaScript starter2/.env.example +0 -3
- package/sites/JavaScript starter2/LICENSE +0 -21
- package/sites/JavaScript starter2/images/appwrite.svg +0 -8
- package/sites/JavaScript starter2/images/javascript.svg +0 -5
- package/sites/JavaScript starter2/index.html +0 -250
- package/sites/JavaScript starter2/lib/appwrite.js +0 -10
- package/sites/JavaScript starter2/package-lock.json +0 -1431
- package/sites/JavaScript starter2/package.json +0 -21
- package/sites/JavaScript starter2/readme.md +0 -26
- package/sites/JavaScript starter2/src/javascript.svg +0 -1
- package/sites/JavaScript starter2/style/app.css +0 -20
- package/sites/JavaScript starter2/vite.config.js +0 -7
package/dist/index.d.ts
ADDED
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
#! /usr/bin/env node
|
|
2
|
+
import { Push } from "./lib/commands/push.js";
|
|
3
|
+
import { Pull } from "./lib/commands/pull.js";
|
|
4
|
+
import { Schema } from "./lib/commands/schema.js";
|
|
5
|
+
export { Schema, Push, Pull };
|
|
6
|
+
export type { ConfigType, SettingsType, FunctionType, SiteType, DatabaseType, CollectionType, TableType, TopicType, TeamType, MessageType, BucketType, AttributeType, IndexType, ColumnType, TableIndexType, } from "./lib/commands/config.js";
|
|
7
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../index.ts"],"names":[],"mappings":";AAgDA,OAAO,EAAE,IAAI,EAAE,MAAM,wBAAwB,CAAC;AAC9C,OAAO,EAAE,IAAI,EAAE,MAAM,wBAAwB,CAAC;AAC9C,OAAO,EAAE,MAAM,EAAE,MAAM,0BAA0B,CAAC;AA0HlD,OAAO,EAAE,MAAM,EAAE,IAAI,EAAE,IAAI,EAAE,CAAC;AAC9B,YAAY,EACV,UAAU,EACV,YAAY,EACZ,YAAY,EACZ,QAAQ,EACR,YAAY,EACZ,cAAc,EACd,SAAS,EACT,SAAS,EACT,QAAQ,EACR,WAAW,EACX,UAAU,EACV,aAAa,EACb,SAAS,EACT,UAAU,EACV,cAAc,GACf,MAAM,0BAA0B,CAAC"}
|
package/dist/index.js
ADDED
|
@@ -0,0 +1,149 @@
|
|
|
1
|
+
#! /usr/bin/env node
|
|
2
|
+
/** Required to set max width of the help commands */
|
|
3
|
+
const oldWidth = process.stdout.columns;
|
|
4
|
+
process.stdout.columns = 100;
|
|
5
|
+
/** ---------------------------------------------- */
|
|
6
|
+
import { program } from "commander";
|
|
7
|
+
import chalk from "chalk";
|
|
8
|
+
import packageJson from "./package.json" with { type: "json" };
|
|
9
|
+
const { version } = packageJson;
|
|
10
|
+
import { commandDescriptions, cliConfig } from "./lib/parser.js";
|
|
11
|
+
import { client } from "./lib/commands/generic.js";
|
|
12
|
+
import { getLatestVersion, compareVersions } from "./lib/utils.js";
|
|
13
|
+
import inquirer from "inquirer";
|
|
14
|
+
import { login, logout, whoami, migrate, register, } from "./lib/commands/generic.js";
|
|
15
|
+
import { init } from "./lib/commands/init.js";
|
|
16
|
+
import { types } from "./lib/commands/types.js";
|
|
17
|
+
import { pull } from "./lib/commands/pull.js";
|
|
18
|
+
import { run } from "./lib/commands/run.js";
|
|
19
|
+
import { push, deploy } from "./lib/commands/push.js";
|
|
20
|
+
import { update } from "./lib/commands/update.js";
|
|
21
|
+
import { account } from "./lib/commands/services/account.js";
|
|
22
|
+
import { console } from "./lib/commands/services/console.js";
|
|
23
|
+
import { databases } from "./lib/commands/services/databases.js";
|
|
24
|
+
import { functions } from "./lib/commands/services/functions.js";
|
|
25
|
+
import { graphql } from "./lib/commands/services/graphql.js";
|
|
26
|
+
import { health } from "./lib/commands/services/health.js";
|
|
27
|
+
import { locale } from "./lib/commands/services/locale.js";
|
|
28
|
+
import { messaging } from "./lib/commands/services/messaging.js";
|
|
29
|
+
import { migrations } from "./lib/commands/services/migrations.js";
|
|
30
|
+
import { project } from "./lib/commands/services/project.js";
|
|
31
|
+
import { projects } from "./lib/commands/services/projects.js";
|
|
32
|
+
import { proxy } from "./lib/commands/services/proxy.js";
|
|
33
|
+
import { sites } from "./lib/commands/services/sites.js";
|
|
34
|
+
import { storage } from "./lib/commands/services/storage.js";
|
|
35
|
+
import { tablesdb } from "./lib/commands/services/tablesdb.js";
|
|
36
|
+
import { teams } from "./lib/commands/services/teams.js";
|
|
37
|
+
import { tokens } from "./lib/commands/services/tokens.js";
|
|
38
|
+
import { users } from "./lib/commands/services/users.js";
|
|
39
|
+
import { vcs } from "./lib/commands/services/vcs.js";
|
|
40
|
+
import searchList from "inquirer-search-list";
|
|
41
|
+
import { Push } from "./lib/commands/push.js";
|
|
42
|
+
import { Pull } from "./lib/commands/pull.js";
|
|
43
|
+
import { Schema } from "./lib/commands/schema.js";
|
|
44
|
+
inquirer.registerPrompt("search-list", searchList);
|
|
45
|
+
/**
|
|
46
|
+
* Check for updates and show version information
|
|
47
|
+
*/
|
|
48
|
+
async function checkVersion() {
|
|
49
|
+
process.stdout.write(chalk.bold(`appwrite version ${version}`) + "\n");
|
|
50
|
+
try {
|
|
51
|
+
const latestVersion = await getLatestVersion();
|
|
52
|
+
const comparison = compareVersions(version, latestVersion);
|
|
53
|
+
if (comparison > 0) {
|
|
54
|
+
// Current version is older than latest
|
|
55
|
+
process.stdout.write(chalk.yellow(`\n⚠️ A newer version is available: ${chalk.bold(latestVersion)}`) + "\n");
|
|
56
|
+
process.stdout.write(chalk.cyan(`💡 Run '${chalk.bold("appwrite update")}' to update to the latest version.`) + "\n");
|
|
57
|
+
}
|
|
58
|
+
else if (comparison === 0) {
|
|
59
|
+
process.stdout.write(chalk.green("\n✅ You are running the latest version!") + "\n");
|
|
60
|
+
}
|
|
61
|
+
else {
|
|
62
|
+
// Current version is newer than latest (pre-release/dev)
|
|
63
|
+
process.stdout.write(chalk.blue("\n🚀 You are running a pre-release or development version.") + "\n");
|
|
64
|
+
}
|
|
65
|
+
}
|
|
66
|
+
catch (error) {
|
|
67
|
+
// Silently fail version check, just show current version
|
|
68
|
+
process.stdout.write(chalk.gray("\n(Unable to check for updates)") + "\n");
|
|
69
|
+
}
|
|
70
|
+
}
|
|
71
|
+
// Intercept version flag before Commander.js processes it
|
|
72
|
+
if (process.argv.includes("-v") || process.argv.includes("--version")) {
|
|
73
|
+
(async () => {
|
|
74
|
+
await checkVersion();
|
|
75
|
+
process.exit(0);
|
|
76
|
+
})();
|
|
77
|
+
}
|
|
78
|
+
else {
|
|
79
|
+
program
|
|
80
|
+
.description(commandDescriptions["main"])
|
|
81
|
+
.configureHelp({
|
|
82
|
+
helpWidth: process.stdout.columns || 80,
|
|
83
|
+
sortSubcommands: true,
|
|
84
|
+
})
|
|
85
|
+
.helpOption("-h, --help", "Display help for command")
|
|
86
|
+
.version(version, "-v, --version", "Output the version number")
|
|
87
|
+
.option("-V, --verbose", "Show complete error log")
|
|
88
|
+
.option("-j, --json", "Output in JSON format")
|
|
89
|
+
.hook("preAction", migrate)
|
|
90
|
+
.option("-f,--force", "Flag to confirm all warnings")
|
|
91
|
+
.option("-a,--all", "Flag to push all resources")
|
|
92
|
+
.option("--id [id...]", "Flag to pass a list of ids for a given action")
|
|
93
|
+
.option("--report", "Enable reporting in case of CLI errors")
|
|
94
|
+
.on("option:json", () => {
|
|
95
|
+
cliConfig.json = true;
|
|
96
|
+
})
|
|
97
|
+
.on("option:verbose", () => {
|
|
98
|
+
cliConfig.verbose = true;
|
|
99
|
+
})
|
|
100
|
+
.on("option:report", function () {
|
|
101
|
+
cliConfig.report = true;
|
|
102
|
+
cliConfig.reportData = { data: this };
|
|
103
|
+
})
|
|
104
|
+
.on("option:force", () => {
|
|
105
|
+
cliConfig.force = true;
|
|
106
|
+
})
|
|
107
|
+
.on("option:all", () => {
|
|
108
|
+
cliConfig.all = true;
|
|
109
|
+
})
|
|
110
|
+
.on("option:id", function () {
|
|
111
|
+
cliConfig.ids = this.opts().id;
|
|
112
|
+
})
|
|
113
|
+
.showSuggestionAfterError()
|
|
114
|
+
.addCommand(whoami)
|
|
115
|
+
.addCommand(register)
|
|
116
|
+
.addCommand(login)
|
|
117
|
+
.addCommand(init)
|
|
118
|
+
.addCommand(pull)
|
|
119
|
+
.addCommand(push)
|
|
120
|
+
.addCommand(types)
|
|
121
|
+
.addCommand(deploy)
|
|
122
|
+
.addCommand(run)
|
|
123
|
+
.addCommand(update)
|
|
124
|
+
.addCommand(logout)
|
|
125
|
+
.addCommand(account)
|
|
126
|
+
.addCommand(console)
|
|
127
|
+
.addCommand(databases)
|
|
128
|
+
.addCommand(functions)
|
|
129
|
+
.addCommand(graphql)
|
|
130
|
+
.addCommand(health)
|
|
131
|
+
.addCommand(locale)
|
|
132
|
+
.addCommand(messaging)
|
|
133
|
+
.addCommand(migrations)
|
|
134
|
+
.addCommand(project)
|
|
135
|
+
.addCommand(projects)
|
|
136
|
+
.addCommand(proxy)
|
|
137
|
+
.addCommand(sites)
|
|
138
|
+
.addCommand(storage)
|
|
139
|
+
.addCommand(tablesdb)
|
|
140
|
+
.addCommand(teams)
|
|
141
|
+
.addCommand(tokens)
|
|
142
|
+
.addCommand(users)
|
|
143
|
+
.addCommand(vcs)
|
|
144
|
+
.addCommand(client)
|
|
145
|
+
.parse(process.argv);
|
|
146
|
+
process.stdout.columns = oldWidth;
|
|
147
|
+
}
|
|
148
|
+
export { Schema, Push, Pull };
|
|
149
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../index.ts"],"names":[],"mappings":";AAEA,qDAAqD;AACrD,MAAM,QAAQ,GAAG,OAAO,CAAC,MAAM,CAAC,OAAO,CAAC;AACxC,OAAO,CAAC,MAAM,CAAC,OAAO,GAAG,GAAG,CAAC;AAC7B,qDAAqD;AAErD,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AACpC,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,WAAW,MAAM,gBAAgB,CAAC,OAAO,IAAI,EAAE,MAAM,EAAE,CAAC;AAC/D,MAAM,EAAE,OAAO,EAAE,GAAG,WAAW,CAAC;AAChC,OAAO,EAAE,mBAAmB,EAAE,SAAS,EAAE,MAAM,iBAAiB,CAAC;AACjE,OAAO,EAAE,MAAM,EAAE,MAAM,2BAA2B,CAAC;AACnD,OAAO,EAAE,gBAAgB,EAAE,eAAe,EAAE,MAAM,gBAAgB,CAAC;AACnE,OAAO,QAAQ,MAAM,UAAU,CAAC;AAChC,OAAO,EAC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;SACrB,UAAU,CAAC,UAAU,CAAC;SACtB,UAAU,CAAC,OAAO,CAAC;SACnB,UAAU,CAAC,QAAQ,CAAC;SACpB,UAAU,CAAC,KAAK,CAAC;SACjB,UAAU,CAAC,KAAK,CAAC;SACjB,UAAU,CAAC,OAAO,CAAC;SACnB,UAAU,CAAC,QAAQ,CAAC;SACpB,UAAU,CAAC,KAAK,CAAC;SACjB,UAAU,CAAC,MAAM,CAAC;SAClB,UAAU,CAAC,KAAK,CAAC;SACjB,UAAU,CAAC,GAAG,CAAC;SACf,UAAU,CAAC,MAAM,CAAC;SAClB,KAAK,CAAC,OAAO,CAAC,IAAI,CAAC,CAAC;IAEvB,OAAO,CAAC,MAAM,CAAC,OAAO,GAAG,QAAQ,CAAC;AACpC,CAAC;AAED,OAAO,EAAE,MAAM,EAAE,IAAI,EAAE,IAAI,EAAE,CAAC"}
|
|
@@ -0,0 +1,88 @@
|
|
|
1
|
+
import type { Headers, RequestParams, ResponseType } from "./types.js";
|
|
2
|
+
declare class Client {
|
|
3
|
+
private endpoint;
|
|
4
|
+
private headers;
|
|
5
|
+
private selfSigned;
|
|
6
|
+
constructor();
|
|
7
|
+
/**
|
|
8
|
+
* Set Cookie
|
|
9
|
+
*
|
|
10
|
+
* Your cookie
|
|
11
|
+
*
|
|
12
|
+
* @param {string} cookie
|
|
13
|
+
*
|
|
14
|
+
* @return self
|
|
15
|
+
*/
|
|
16
|
+
setCookie(cookie: string): this;
|
|
17
|
+
/**
|
|
18
|
+
* Set Project
|
|
19
|
+
*
|
|
20
|
+
* Your project ID
|
|
21
|
+
*
|
|
22
|
+
* @param {string} project
|
|
23
|
+
*
|
|
24
|
+
* @return self
|
|
25
|
+
*/
|
|
26
|
+
setProject(project: string): this;
|
|
27
|
+
/**
|
|
28
|
+
* Set Key
|
|
29
|
+
*
|
|
30
|
+
* Your secret API key
|
|
31
|
+
*
|
|
32
|
+
* @param {string} key
|
|
33
|
+
*
|
|
34
|
+
* @return self
|
|
35
|
+
*/
|
|
36
|
+
setKey(key: string): this;
|
|
37
|
+
/**
|
|
38
|
+
* Set JWT
|
|
39
|
+
*
|
|
40
|
+
* Your secret JSON Web Token
|
|
41
|
+
*
|
|
42
|
+
* @param {string} jwt
|
|
43
|
+
*
|
|
44
|
+
* @return self
|
|
45
|
+
*/
|
|
46
|
+
setJWT(jwt: string): this;
|
|
47
|
+
/**
|
|
48
|
+
* Set Locale
|
|
49
|
+
*
|
|
50
|
+
* @param {string} locale
|
|
51
|
+
*
|
|
52
|
+
* @return self
|
|
53
|
+
*/
|
|
54
|
+
setLocale(locale: string): this;
|
|
55
|
+
/**
|
|
56
|
+
* Set Mode
|
|
57
|
+
*
|
|
58
|
+
* @param {string} mode
|
|
59
|
+
*
|
|
60
|
+
* @return self
|
|
61
|
+
*/
|
|
62
|
+
setMode(mode: string): this;
|
|
63
|
+
/**
|
|
64
|
+
* Set self signed.
|
|
65
|
+
*
|
|
66
|
+
* @param {bool} status
|
|
67
|
+
*
|
|
68
|
+
* @return this
|
|
69
|
+
*/
|
|
70
|
+
setSelfSigned(status: boolean): this;
|
|
71
|
+
/**
|
|
72
|
+
* Set endpoint.
|
|
73
|
+
*
|
|
74
|
+
* @param {string} endpoint
|
|
75
|
+
*
|
|
76
|
+
* @return this
|
|
77
|
+
*/
|
|
78
|
+
setEndpoint(endpoint: string): this;
|
|
79
|
+
/**
|
|
80
|
+
* @param {string} key
|
|
81
|
+
* @param {string} value
|
|
82
|
+
*/
|
|
83
|
+
addHeader(key: string, value: string): this;
|
|
84
|
+
call<T = unknown>(method: string, path?: string, headers?: Headers, params?: RequestParams, responseType?: ResponseType): Promise<T>;
|
|
85
|
+
static flatten(data: RequestParams, prefix?: string): Record<string, unknown>;
|
|
86
|
+
}
|
|
87
|
+
export default Client;
|
|
88
|
+
//# sourceMappingURL=client.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"client.d.ts","sourceRoot":"","sources":["../../lib/client.ts"],"names":[],"mappings":"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ici";
|
|
3
|
+
import JSONbig from "json-bigint";
|
|
4
|
+
import { AppwriteException } from "@appwrite.io/console";
|
|
5
|
+
import { globalConfig } from "./config.js";
|
|
6
|
+
import chalk from "chalk";
|
|
7
|
+
const JSONBigInt = JSONbig({ storeAsString: false });
|
|
8
|
+
class Client {
|
|
9
|
+
endpoint;
|
|
10
|
+
headers;
|
|
11
|
+
selfSigned;
|
|
12
|
+
constructor() {
|
|
13
|
+
this.endpoint = "https://cloud.appwrite.io/v1";
|
|
14
|
+
this.selfSigned = false;
|
|
15
|
+
this.headers = {
|
|
16
|
+
"content-type": "",
|
|
17
|
+
"x-sdk-name": "Command Line",
|
|
18
|
+
"x-sdk-platform": "console",
|
|
19
|
+
"x-sdk-language": "cli",
|
|
20
|
+
"x-sdk-version": "13.0.0-rc.3",
|
|
21
|
+
"user-agent": `AppwriteCLI/13.0.0-rc.3 (${os.type()} ${os.version()}; ${os.arch()})`,
|
|
22
|
+
"X-Appwrite-Response-Format": "1.8.1",
|
|
23
|
+
};
|
|
24
|
+
}
|
|
25
|
+
/**
|
|
26
|
+
* Set Cookie
|
|
27
|
+
*
|
|
28
|
+
* Your cookie
|
|
29
|
+
*
|
|
30
|
+
* @param {string} cookie
|
|
31
|
+
*
|
|
32
|
+
* @return self
|
|
33
|
+
*/
|
|
34
|
+
setCookie(cookie) {
|
|
35
|
+
this.addHeader("cookie", cookie);
|
|
36
|
+
return this;
|
|
37
|
+
}
|
|
38
|
+
/**
|
|
39
|
+
* Set Project
|
|
40
|
+
*
|
|
41
|
+
* Your project ID
|
|
42
|
+
*
|
|
43
|
+
* @param {string} project
|
|
44
|
+
*
|
|
45
|
+
* @return self
|
|
46
|
+
*/
|
|
47
|
+
setProject(project) {
|
|
48
|
+
this.addHeader("X-Appwrite-Project", project);
|
|
49
|
+
return this;
|
|
50
|
+
}
|
|
51
|
+
/**
|
|
52
|
+
* Set Key
|
|
53
|
+
*
|
|
54
|
+
* Your secret API key
|
|
55
|
+
*
|
|
56
|
+
* @param {string} key
|
|
57
|
+
*
|
|
58
|
+
* @return self
|
|
59
|
+
*/
|
|
60
|
+
setKey(key) {
|
|
61
|
+
this.addHeader("X-Appwrite-Key", key);
|
|
62
|
+
return this;
|
|
63
|
+
}
|
|
64
|
+
/**
|
|
65
|
+
* Set JWT
|
|
66
|
+
*
|
|
67
|
+
* Your secret JSON Web Token
|
|
68
|
+
*
|
|
69
|
+
* @param {string} jwt
|
|
70
|
+
*
|
|
71
|
+
* @return self
|
|
72
|
+
*/
|
|
73
|
+
setJWT(jwt) {
|
|
74
|
+
this.addHeader("X-Appwrite-JWT", jwt);
|
|
75
|
+
return this;
|
|
76
|
+
}
|
|
77
|
+
/**
|
|
78
|
+
* Set Locale
|
|
79
|
+
*
|
|
80
|
+
* @param {string} locale
|
|
81
|
+
*
|
|
82
|
+
* @return self
|
|
83
|
+
*/
|
|
84
|
+
setLocale(locale) {
|
|
85
|
+
this.addHeader("X-Appwrite-Locale", locale);
|
|
86
|
+
return this;
|
|
87
|
+
}
|
|
88
|
+
/**
|
|
89
|
+
* Set Mode
|
|
90
|
+
*
|
|
91
|
+
* @param {string} mode
|
|
92
|
+
*
|
|
93
|
+
* @return self
|
|
94
|
+
*/
|
|
95
|
+
setMode(mode) {
|
|
96
|
+
this.addHeader("X-Appwrite-Mode", mode);
|
|
97
|
+
return this;
|
|
98
|
+
}
|
|
99
|
+
/**
|
|
100
|
+
* Set self signed.
|
|
101
|
+
*
|
|
102
|
+
* @param {bool} status
|
|
103
|
+
*
|
|
104
|
+
* @return this
|
|
105
|
+
*/
|
|
106
|
+
setSelfSigned(status) {
|
|
107
|
+
this.selfSigned = status;
|
|
108
|
+
return this;
|
|
109
|
+
}
|
|
110
|
+
/**
|
|
111
|
+
* Set endpoint.
|
|
112
|
+
*
|
|
113
|
+
* @param {string} endpoint
|
|
114
|
+
*
|
|
115
|
+
* @return this
|
|
116
|
+
*/
|
|
117
|
+
setEndpoint(endpoint) {
|
|
118
|
+
if (!endpoint.startsWith("http://") && !endpoint.startsWith("https://")) {
|
|
119
|
+
throw new AppwriteException("Invalid endpoint URL: " + endpoint);
|
|
120
|
+
}
|
|
121
|
+
this.endpoint = endpoint;
|
|
122
|
+
return this;
|
|
123
|
+
}
|
|
124
|
+
/**
|
|
125
|
+
* @param {string} key
|
|
126
|
+
* @param {string} value
|
|
127
|
+
*/
|
|
128
|
+
addHeader(key, value) {
|
|
129
|
+
this.headers[key.toLowerCase()] = value;
|
|
130
|
+
return this;
|
|
131
|
+
}
|
|
132
|
+
async call(method, path = "", headers = {}, params = {}, responseType = "json") {
|
|
133
|
+
const mergedHeaders = { ...this.headers, ...headers };
|
|
134
|
+
const url = new URL(this.endpoint + path);
|
|
135
|
+
let body = undefined;
|
|
136
|
+
if (method.toUpperCase() === "GET") {
|
|
137
|
+
url.search = new URLSearchParams(Client.flatten(params)).toString();
|
|
138
|
+
}
|
|
139
|
+
else if (mergedHeaders["content-type"]
|
|
140
|
+
?.toLowerCase()
|
|
141
|
+
.startsWith("multipart/form-data")) {
|
|
142
|
+
delete mergedHeaders["content-type"];
|
|
143
|
+
const formData = new FormData();
|
|
144
|
+
const flatParams = Client.flatten(params);
|
|
145
|
+
for (const [key, value] of Object.entries(flatParams)) {
|
|
146
|
+
if (value &&
|
|
147
|
+
typeof value === "object" &&
|
|
148
|
+
"type" in value &&
|
|
149
|
+
value.type === "file") {
|
|
150
|
+
const fileUpload = value;
|
|
151
|
+
formData.append(key, fileUpload.file, fileUpload.filename);
|
|
152
|
+
}
|
|
153
|
+
else {
|
|
154
|
+
formData.append(key, value);
|
|
155
|
+
}
|
|
156
|
+
}
|
|
157
|
+
body = formData;
|
|
158
|
+
}
|
|
159
|
+
else {
|
|
160
|
+
body = JSONBigInt.stringify(params);
|
|
161
|
+
}
|
|
162
|
+
let response = undefined;
|
|
163
|
+
try {
|
|
164
|
+
response = await fetch(url.toString(), {
|
|
165
|
+
method: method.toUpperCase(),
|
|
166
|
+
headers: mergedHeaders,
|
|
167
|
+
body,
|
|
168
|
+
dispatcher: new Agent({
|
|
169
|
+
connect: {
|
|
170
|
+
rejectUnauthorized: !this.selfSigned,
|
|
171
|
+
},
|
|
172
|
+
}),
|
|
173
|
+
});
|
|
174
|
+
}
|
|
175
|
+
catch (error) {
|
|
176
|
+
throw new AppwriteException(error.message);
|
|
177
|
+
}
|
|
178
|
+
if (response.status >= 400) {
|
|
179
|
+
const text = await response.text();
|
|
180
|
+
let json = undefined;
|
|
181
|
+
try {
|
|
182
|
+
json = JSON.parse(text);
|
|
183
|
+
}
|
|
184
|
+
catch (error) {
|
|
185
|
+
throw new AppwriteException(text, response.status, "", text);
|
|
186
|
+
}
|
|
187
|
+
if (path !== "/account" &&
|
|
188
|
+
json.code === 401 &&
|
|
189
|
+
json.type === "user_more_factors_required") {
|
|
190
|
+
console.log(`${chalk.cyan.bold("ℹ Info")} ${chalk.cyan("Unusable account found, removing...")}`);
|
|
191
|
+
const current = globalConfig.getCurrentSession();
|
|
192
|
+
globalConfig.setCurrentSession("");
|
|
193
|
+
globalConfig.removeSession(current);
|
|
194
|
+
}
|
|
195
|
+
throw new AppwriteException(json.message || text, json.code, json.type, text);
|
|
196
|
+
}
|
|
197
|
+
if (responseType === "arraybuffer") {
|
|
198
|
+
const data = await response.arrayBuffer();
|
|
199
|
+
return data;
|
|
200
|
+
}
|
|
201
|
+
const cookies = response.headers.getSetCookie();
|
|
202
|
+
if (cookies && cookies.length > 0) {
|
|
203
|
+
for (const cookie of cookies) {
|
|
204
|
+
if (cookie.startsWith("a_session_console=")) {
|
|
205
|
+
globalConfig.setCookie(cookie);
|
|
206
|
+
}
|
|
207
|
+
}
|
|
208
|
+
}
|
|
209
|
+
const text = await response.text();
|
|
210
|
+
let json = undefined;
|
|
211
|
+
try {
|
|
212
|
+
json = JSONBigInt.parse(text);
|
|
213
|
+
}
|
|
214
|
+
catch (error) {
|
|
215
|
+
return text;
|
|
216
|
+
}
|
|
217
|
+
return json;
|
|
218
|
+
}
|
|
219
|
+
static flatten(data, prefix = "") {
|
|
220
|
+
let output = {};
|
|
221
|
+
for (const key in data) {
|
|
222
|
+
const value = data[key];
|
|
223
|
+
const finalKey = prefix ? prefix + "[" + key + "]" : key;
|
|
224
|
+
if (Array.isArray(value)) {
|
|
225
|
+
output = {
|
|
226
|
+
...output,
|
|
227
|
+
...Client.flatten(value, finalKey),
|
|
228
|
+
};
|
|
229
|
+
}
|
|
230
|
+
else {
|
|
231
|
+
output[finalKey] = value;
|
|
232
|
+
}
|
|
233
|
+
}
|
|
234
|
+
return output;
|
|
235
|
+
}
|
|
236
|
+
}
|
|
237
|
+
export default Client;
|
|
238
|
+
//# sourceMappingURL=client.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"client.js","sourceRoot":"","sources":["../../lib/client.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,IAAI,CAAC;AACpB,OAAO,EAAE,KAAK,EAAE,QAAQ,EAAE,KAAK,EAAE,MAAM,QAAQ,CAAC;AAChD,OAAO,OAAO,MAAM,aAAa,CAAC;AAClC,OAAO,EAAE,iBAAiB,EAAE,MAAM,sBAAsB,CAAC;AACzD,OAAO,EAAE,YAAY,EAAE,MAAM,aAAa,CAAC;AAC3C,OAAO,KAAK,MAAM,OAAO,CAAC;AAQ1B,MAAM,UAAU,GAAG,OAAO,CAAC,EAAE,aAAa,EAAE,KAAK,EAAE,CAAC,CAAC;AAErD,MAAM,MAAM;IACF,QAAQ,CAAS;IACjB,OAAO,CAAU;IACjB,UAAU,CAAU;IAE5B;QACE,IAAI,CAAC,QAAQ,GAAG,8BAA8B,CAAC;QAC/C,IAAI,CAAC,UAAU,GAAG,KAAK,CAAC;QACxB,IAAI,CAAC,OAAO,GAAG;YACb,cAAc,EAAE,EAAE;YAClB,YAAY,EAAE,cAAc;YAC5B,gBAAgB,EAAE,SAAS;YAC3B,gBAAgB,EAAE,KAAK;YACvB,eAAe,EAAE,aAAa;YAC9B,YAAY,EAAE,4BAA4B,EAAE,CA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