@eveai/eve-sdk-for-node 0.0.1 → 0.0.3
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/README.md.bak +510 -0
- package/README.md.orig +510 -0
- package/dist/client.d.mts +110 -0
- package/dist/client.d.ts +110 -0
- package/dist/client.js +292 -0
- package/dist/client.js.map +1 -0
- package/dist/client.mjs +286 -0
- package/dist/client.mjs.map +1 -0
- package/dist/enums/adapter.d.mts +6 -0
- package/dist/enums/adapter.d.ts +6 -0
- package/dist/enums/adapter.js +11 -0
- package/dist/enums/adapter.js.map +1 -0
- package/dist/enums/adapter.mjs +10 -0
- package/dist/enums/adapter.mjs.map +1 -0
- package/dist/enums/attribute-status.d.mts +9 -0
- package/dist/enums/attribute-status.d.ts +9 -0
- package/dist/enums/attribute-status.js +14 -0
- package/dist/enums/attribute-status.js.map +1 -0
- package/dist/enums/attribute-status.mjs +13 -0
- package/dist/enums/attribute-status.mjs.map +1 -0
- package/dist/enums/authentication-factor.d.mts +8 -0
- package/dist/enums/authentication-factor.d.ts +8 -0
- package/dist/enums/authentication-factor.js +13 -0
- package/dist/enums/authentication-factor.js.map +1 -0
- package/dist/enums/authentication-factor.mjs +12 -0
- package/dist/enums/authentication-factor.mjs.map +1 -0
- package/dist/enums/authenticator-type.d.mts +5 -0
- package/dist/enums/authenticator-type.d.ts +5 -0
- package/dist/enums/authenticator-type.js +10 -0
- package/dist/enums/authenticator-type.js.map +1 -0
- package/dist/enums/authenticator-type.mjs +9 -0
- package/dist/enums/authenticator-type.mjs.map +1 -0
- package/dist/enums/browser.d.mts +18 -0
- package/dist/enums/browser.d.ts +18 -0
- package/dist/enums/browser.js +23 -0
- package/dist/enums/browser.js.map +1 -0
- package/dist/enums/browser.mjs +22 -0
- package/dist/enums/browser.mjs.map +1 -0
- package/dist/enums/build-runtime.d.mts +71 -0
- package/dist/enums/build-runtime.d.ts +71 -0
- package/dist/enums/build-runtime.js +76 -0
- package/dist/enums/build-runtime.js.map +1 -0
- package/dist/enums/build-runtime.mjs +75 -0
- package/dist/enums/build-runtime.mjs.map +1 -0
- package/dist/enums/column-status.d.mts +9 -0
- package/dist/enums/column-status.d.ts +9 -0
- package/dist/enums/column-status.js +14 -0
- package/dist/enums/column-status.js.map +1 -0
- package/dist/enums/column-status.mjs +13 -0
- package/dist/enums/column-status.mjs.map +1 -0
- package/dist/enums/compression.d.mts +7 -0
- package/dist/enums/compression.d.ts +7 -0
- package/dist/enums/compression.js +12 -0
- package/dist/enums/compression.js.map +1 -0
- package/dist/enums/compression.mjs +11 -0
- package/dist/enums/compression.mjs.map +1 -0
- package/dist/enums/credit-card.d.mts +21 -0
- package/dist/enums/credit-card.d.ts +21 -0
- package/dist/enums/credit-card.js +26 -0
- package/dist/enums/credit-card.js.map +1 -0
- package/dist/enums/credit-card.mjs +25 -0
- package/dist/enums/credit-card.mjs.map +1 -0
- package/dist/enums/database-type.d.mts +6 -0
- package/dist/enums/database-type.d.ts +6 -0
- package/dist/enums/database-type.js +11 -0
- package/dist/enums/database-type.js.map +1 -0
- package/dist/enums/database-type.mjs +10 -0
- package/dist/enums/database-type.mjs.map +1 -0
- package/dist/enums/deployment-download-type.d.mts +6 -0
- package/dist/enums/deployment-download-type.d.ts +6 -0
- package/dist/enums/deployment-download-type.js +11 -0
- package/dist/enums/deployment-download-type.js.map +1 -0
- package/dist/enums/deployment-download-type.mjs +10 -0
- package/dist/enums/deployment-download-type.mjs.map +1 -0
- package/dist/enums/deployment-status.d.mts +9 -0
- package/dist/enums/deployment-status.d.ts +9 -0
- package/dist/enums/deployment-status.js +14 -0
- package/dist/enums/deployment-status.js.map +1 -0
- package/dist/enums/deployment-status.mjs +13 -0
- package/dist/enums/deployment-status.mjs.map +1 -0
- package/dist/enums/execution-method.d.mts +11 -0
- package/dist/enums/execution-method.d.ts +11 -0
- package/dist/enums/execution-method.js +16 -0
- package/dist/enums/execution-method.js.map +1 -0
- package/dist/enums/execution-method.mjs +15 -0
- package/dist/enums/execution-method.mjs.map +1 -0
- package/dist/enums/execution-status.d.mts +9 -0
- package/dist/enums/execution-status.d.ts +9 -0
- package/dist/enums/execution-status.js +14 -0
- package/dist/enums/execution-status.js.map +1 -0
- package/dist/enums/execution-status.mjs +13 -0
- package/dist/enums/execution-status.mjs.map +1 -0
- package/dist/enums/execution-trigger.d.mts +7 -0
- package/dist/enums/execution-trigger.d.ts +7 -0
- package/dist/enums/execution-trigger.js +12 -0
- package/dist/enums/execution-trigger.js.map +1 -0
- package/dist/enums/execution-trigger.mjs +11 -0
- package/dist/enums/execution-trigger.mjs.map +1 -0
- package/dist/enums/flag.d.mts +199 -0
- package/dist/enums/flag.d.ts +199 -0
- package/dist/enums/flag.js +204 -0
- package/dist/enums/flag.js.map +1 -0
- package/dist/enums/flag.mjs +203 -0
- package/dist/enums/flag.mjs.map +1 -0
- package/dist/enums/framework.d.mts +19 -0
- package/dist/enums/framework.d.ts +19 -0
- package/dist/enums/framework.js +24 -0
- package/dist/enums/framework.js.map +1 -0
- package/dist/enums/framework.mjs +23 -0
- package/dist/enums/framework.mjs.map +1 -0
- package/dist/enums/health-antivirus-status.d.mts +7 -0
- package/dist/enums/health-antivirus-status.d.ts +7 -0
- package/dist/enums/health-antivirus-status.js +12 -0
- package/dist/enums/health-antivirus-status.js.map +1 -0
- package/dist/enums/health-antivirus-status.mjs +11 -0
- package/dist/enums/health-antivirus-status.mjs.map +1 -0
- package/dist/enums/health-check-status.d.mts +6 -0
- package/dist/enums/health-check-status.d.ts +6 -0
- package/dist/enums/health-check-status.js +11 -0
- package/dist/enums/health-check-status.js.map +1 -0
- package/dist/enums/health-check-status.mjs +10 -0
- package/dist/enums/health-check-status.mjs.map +1 -0
- package/dist/enums/image-format.d.mts +11 -0
- package/dist/enums/image-format.d.ts +11 -0
- package/dist/enums/image-format.js +16 -0
- package/dist/enums/image-format.js.map +1 -0
- package/dist/enums/image-format.mjs +15 -0
- package/dist/enums/image-format.mjs.map +1 -0
- package/dist/enums/image-gravity.d.mts +13 -0
- package/dist/enums/image-gravity.d.ts +13 -0
- package/dist/enums/image-gravity.js +18 -0
- package/dist/enums/image-gravity.js.map +1 -0
- package/dist/enums/image-gravity.mjs +17 -0
- package/dist/enums/image-gravity.mjs.map +1 -0
- package/dist/enums/index-status.d.mts +9 -0
- package/dist/enums/index-status.d.ts +9 -0
- package/dist/enums/index-status.js +14 -0
- package/dist/enums/index-status.js.map +1 -0
- package/dist/enums/index-status.mjs +13 -0
- package/dist/enums/index-status.mjs.map +1 -0
- package/dist/enums/index-type.d.mts +8 -0
- package/dist/enums/index-type.d.ts +8 -0
- package/dist/enums/index-type.js +13 -0
- package/dist/enums/index-type.js.map +1 -0
- package/dist/enums/index-type.mjs +12 -0
- package/dist/enums/index-type.mjs.map +1 -0
- package/dist/enums/message-priority.d.mts +6 -0
- package/dist/enums/message-priority.d.ts +6 -0
- package/dist/enums/message-priority.js +11 -0
- package/dist/enums/message-priority.js.map +1 -0
- package/dist/enums/message-priority.mjs +10 -0
- package/dist/enums/message-priority.mjs.map +1 -0
- package/dist/enums/message-status.d.mts +9 -0
- package/dist/enums/message-status.d.ts +9 -0
- package/dist/enums/message-status.js +14 -0
- package/dist/enums/message-status.js.map +1 -0
- package/dist/enums/message-status.mjs +13 -0
- package/dist/enums/message-status.mjs.map +1 -0
- package/dist/enums/messaging-provider-type.d.mts +7 -0
- package/dist/enums/messaging-provider-type.d.ts +7 -0
- package/dist/enums/messaging-provider-type.js +12 -0
- package/dist/enums/messaging-provider-type.js.map +1 -0
- package/dist/enums/messaging-provider-type.mjs +11 -0
- package/dist/enums/messaging-provider-type.mjs.map +1 -0
- package/dist/enums/name.d.mts +16 -0
- package/dist/enums/name.d.ts +16 -0
- package/dist/enums/name.js +21 -0
- package/dist/enums/name.js.map +1 -0
- package/dist/enums/name.mjs +20 -0
- package/dist/enums/name.mjs.map +1 -0
- package/dist/enums/o-auth-provider.d.mts +44 -0
- package/dist/enums/o-auth-provider.d.ts +44 -0
- package/dist/enums/o-auth-provider.js +49 -0
- package/dist/enums/o-auth-provider.js.map +1 -0
- package/dist/enums/o-auth-provider.mjs +48 -0
- package/dist/enums/o-auth-provider.mjs.map +1 -0
- package/dist/enums/output.d.mts +11 -0
- package/dist/enums/output.d.ts +11 -0
- package/dist/enums/output.js +16 -0
- package/dist/enums/output.js.map +1 -0
- package/dist/enums/output.mjs +15 -0
- package/dist/enums/output.mjs.map +1 -0
- package/dist/enums/password-hash.d.mts +15 -0
- package/dist/enums/password-hash.d.ts +15 -0
- package/dist/enums/password-hash.js +20 -0
- package/dist/enums/password-hash.js.map +1 -0
- package/dist/enums/password-hash.mjs +19 -0
- package/dist/enums/password-hash.mjs.map +1 -0
- package/dist/enums/relation-mutate.d.mts +7 -0
- package/dist/enums/relation-mutate.d.ts +7 -0
- package/dist/enums/relation-mutate.js +12 -0
- package/dist/enums/relation-mutate.js.map +1 -0
- package/dist/enums/relation-mutate.mjs +11 -0
- package/dist/enums/relation-mutate.mjs.map +1 -0
- package/dist/enums/relationship-type.d.mts +8 -0
- package/dist/enums/relationship-type.d.ts +8 -0
- package/dist/enums/relationship-type.js +13 -0
- package/dist/enums/relationship-type.js.map +1 -0
- package/dist/enums/relationship-type.mjs +12 -0
- package/dist/enums/relationship-type.mjs.map +1 -0
- package/dist/enums/runtime.d.mts +71 -0
- package/dist/enums/runtime.d.ts +71 -0
- package/dist/enums/runtime.js +76 -0
- package/dist/enums/runtime.js.map +1 -0
- package/dist/enums/runtime.mjs +75 -0
- package/dist/enums/runtime.mjs.map +1 -0
- package/dist/enums/smtp-encryption.d.mts +7 -0
- package/dist/enums/smtp-encryption.d.ts +7 -0
- package/dist/enums/smtp-encryption.js +12 -0
- package/dist/enums/smtp-encryption.js.map +1 -0
- package/dist/enums/smtp-encryption.mjs +11 -0
- package/dist/enums/smtp-encryption.mjs.map +1 -0
- package/dist/enums/template-reference-type.d.mts +7 -0
- package/dist/enums/template-reference-type.d.ts +7 -0
- package/dist/enums/template-reference-type.js +12 -0
- package/dist/enums/template-reference-type.js.map +1 -0
- package/dist/enums/template-reference-type.mjs +11 -0
- package/dist/enums/template-reference-type.mjs.map +1 -0
- package/dist/enums/theme.d.mts +6 -0
- package/dist/enums/theme.d.ts +6 -0
- package/dist/enums/theme.js +11 -0
- package/dist/enums/theme.js.map +1 -0
- package/dist/enums/theme.mjs +10 -0
- package/dist/enums/theme.mjs.map +1 -0
- package/dist/enums/timezone.d.mts +423 -0
- package/dist/enums/timezone.d.ts +423 -0
- package/dist/enums/timezone.js +428 -0
- package/dist/enums/timezone.js.map +1 -0
- package/dist/enums/timezone.mjs +427 -0
- package/dist/enums/timezone.mjs.map +1 -0
- package/dist/enums/vcs-reference-type.d.mts +7 -0
- package/dist/enums/vcs-reference-type.d.ts +7 -0
- package/dist/enums/vcs-reference-type.js +12 -0
- package/dist/enums/vcs-reference-type.js.map +1 -0
- package/dist/enums/vcs-reference-type.mjs +11 -0
- package/dist/enums/vcs-reference-type.mjs.map +1 -0
- package/dist/id.d.mts +22 -0
- package/dist/id.d.ts +22 -0
- package/dist/id.js +45 -0
- package/dist/id.js.map +1 -0
- package/dist/id.mjs +44 -0
- package/dist/id.mjs.map +1 -0
- package/dist/index.d.mts +72 -0
- package/dist/index.d.ts +72 -0
- package/dist/index.js +369 -0
- package/dist/index.js.map +1 -0
- package/dist/index.mjs +72 -0
- package/dist/index.mjs.map +1 -0
- package/dist/inputFile.d.mts +9 -0
- package/dist/inputFile.d.ts +9 -0
- package/dist/inputFile.js +23 -0
- package/dist/inputFile.js.map +1 -0
- package/dist/inputFile.mjs +22 -0
- package/dist/inputFile.mjs.map +1 -0
- package/dist/models.d.mts +3829 -0
- package/dist/models.d.ts +3829 -0
- package/dist/models.js +4 -0
- package/dist/models.js.map +1 -0
- package/dist/models.mjs +3 -0
- package/dist/models.mjs.map +1 -0
- package/dist/operator.d.mts +181 -0
- package/dist/operator.d.ts +181 -0
- package/dist/operator.js +268 -0
- package/dist/operator.js.map +1 -0
- package/dist/operator.mjs +266 -0
- package/dist/operator.mjs.map +1 -0
- package/dist/permission.d.mts +45 -0
- package/dist/permission.d.ts +45 -0
- package/dist/permission.js +56 -0
- package/dist/permission.js.map +1 -0
- package/dist/permission.mjs +55 -0
- package/dist/permission.mjs.map +1 -0
- package/dist/query.d.mts +391 -0
- package/dist/query.d.ts +391 -0
- package/dist/query.js +402 -0
- package/dist/query.js.map +1 -0
- package/dist/query.mjs +401 -0
- package/dist/query.mjs.map +1 -0
- package/dist/role.d.mts +72 -0
- package/dist/role.d.ts +72 -0
- package/dist/role.js +96 -0
- package/dist/role.js.map +1 -0
- package/dist/role.mjs +95 -0
- package/dist/role.mjs.map +1 -0
- package/dist/services/account.d.mts +1011 -0
- package/dist/services/account.d.ts +1011 -0
- package/dist/services/account.js +1596 -0
- package/dist/services/account.js.map +1 -0
- package/dist/services/account.mjs +1595 -0
- package/dist/services/account.mjs.map +1 -0
- package/dist/services/auth.d.mts +52 -0
- package/dist/services/auth.d.ts +52 -0
- package/dist/services/auth.js +85 -0
- package/dist/services/auth.js.map +1 -0
- package/dist/services/auth.mjs +84 -0
- package/dist/services/auth.mjs.map +1 -0
- package/dist/services/avatars.d.mts +334 -0
- package/dist/services/avatars.d.ts +334 -0
- package/dist/services/avatars.js +405 -0
- package/dist/services/avatars.js.map +1 -0
- package/dist/services/avatars.mjs +404 -0
- package/dist/services/avatars.mjs.map +1 -0
- package/dist/services/comment.d.mts +92 -0
- package/dist/services/comment.d.ts +92 -0
- package/dist/services/comment.js +175 -0
- package/dist/services/comment.js.map +1 -0
- package/dist/services/comment.mjs +174 -0
- package/dist/services/comment.mjs.map +1 -0
- package/dist/services/databases.d.mts +1991 -0
- package/dist/services/databases.d.ts +1991 -0
- package/dist/services/databases.js +2957 -0
- package/dist/services/databases.js.map +1 -0
- package/dist/services/databases.mjs +2956 -0
- package/dist/services/databases.mjs.map +1 -0
- package/dist/services/eveai-chat.d.mts +118 -0
- package/dist/services/eveai-chat.d.ts +118 -0
- package/dist/services/eveai-chat.js +115 -0
- package/dist/services/eveai-chat.js.map +1 -0
- package/dist/services/eveai-chat.mjs +114 -0
- package/dist/services/eveai-chat.mjs.map +1 -0
- package/dist/services/eveai-payment.d.mts +145 -0
- package/dist/services/eveai-payment.d.ts +145 -0
- package/dist/services/eveai-payment.js +132 -0
- package/dist/services/eveai-payment.js.map +1 -0
- package/dist/services/eveai-payment.mjs +131 -0
- package/dist/services/eveai-payment.mjs.map +1 -0
- package/dist/services/eveai-provider-discovery.d.mts +126 -0
- package/dist/services/eveai-provider-discovery.d.ts +126 -0
- package/dist/services/eveai-provider-discovery.js +96 -0
- package/dist/services/eveai-provider-discovery.js.map +1 -0
- package/dist/services/eveai-provider-discovery.mjs +95 -0
- package/dist/services/eveai-provider-discovery.mjs.map +1 -0
- package/dist/services/eveai-task.d.mts +137 -0
- package/dist/services/eveai-task.d.ts +137 -0
- package/dist/services/eveai-task.js +143 -0
- package/dist/services/eveai-task.js.map +1 -0
- package/dist/services/eveai-task.mjs +142 -0
- package/dist/services/eveai-task.mjs.map +1 -0
- package/dist/services/favorite.d.mts +68 -0
- package/dist/services/favorite.d.ts +68 -0
- package/dist/services/favorite.js +127 -0
- package/dist/services/favorite.js.map +1 -0
- package/dist/services/favorite.mjs +126 -0
- package/dist/services/favorite.mjs.map +1 -0
- package/dist/services/feed.d.mts +62 -0
- package/dist/services/feed.d.ts +62 -0
- package/dist/services/feed.js +76 -0
- package/dist/services/feed.js.map +1 -0
- package/dist/services/feed.mjs +75 -0
- package/dist/services/feed.mjs.map +1 -0
- package/dist/services/functions.d.mts +749 -0
- package/dist/services/functions.d.ts +749 -0
- package/dist/services/functions.js +1109 -0
- package/dist/services/functions.js.map +1 -0
- package/dist/services/functions.mjs +1108 -0
- package/dist/services/functions.mjs.map +1 -0
- package/dist/services/graphql.d.mts +58 -0
- package/dist/services/graphql.d.ts +58 -0
- package/dist/services/graphql.js +73 -0
- package/dist/services/graphql.js.map +1 -0
- package/dist/services/graphql.mjs +72 -0
- package/dist/services/graphql.mjs.map +1 -0
- package/dist/services/gugotik-storage.d.mts +34 -0
- package/dist/services/gugotik-storage.d.ts +34 -0
- package/dist/services/gugotik-storage.js +40 -0
- package/dist/services/gugotik-storage.js.map +1 -0
- package/dist/services/gugotik-storage.mjs +39 -0
- package/dist/services/gugotik-storage.mjs.map +1 -0
- package/dist/services/health.d.mts +351 -0
- package/dist/services/health.d.ts +351 -0
- package/dist/services/health.js +503 -0
- package/dist/services/health.js.map +1 -0
- package/dist/services/health.mjs +502 -0
- package/dist/services/health.mjs.map +1 -0
- package/dist/services/locale.d.mts +78 -0
- package/dist/services/locale.d.ts +78 -0
- package/dist/services/locale.js +157 -0
- package/dist/services/locale.js.map +1 -0
- package/dist/services/locale.mjs +156 -0
- package/dist/services/locale.mjs.map +1 -0
- package/dist/services/message.d.mts +60 -0
- package/dist/services/message.d.ts +60 -0
- package/dist/services/message.js +98 -0
- package/dist/services/message.js.map +1 -0
- package/dist/services/message.mjs +97 -0
- package/dist/services/message.mjs.map +1 -0
- package/dist/services/messaging.d.mts +2003 -0
- package/dist/services/messaging.d.ts +2003 -0
- package/dist/services/messaging.js +3054 -0
- package/dist/services/messaging.js.map +1 -0
- package/dist/services/messaging.mjs +3053 -0
- package/dist/services/messaging.mjs.map +1 -0
- package/dist/services/publish.d.mts +70 -0
- package/dist/services/publish.d.ts +70 -0
- package/dist/services/publish.js +154 -0
- package/dist/services/publish.js.map +1 -0
- package/dist/services/publish.mjs +153 -0
- package/dist/services/publish.mjs.map +1 -0
- package/dist/services/relation.d.mts +113 -0
- package/dist/services/relation.d.ts +113 -0
- package/dist/services/relation.js +239 -0
- package/dist/services/relation.js.map +1 -0
- package/dist/services/relation.mjs +238 -0
- package/dist/services/relation.mjs.map +1 -0
- package/dist/services/sites.d.mts +705 -0
- package/dist/services/sites.d.ts +705 -0
- package/dist/services/sites.js +1059 -0
- package/dist/services/sites.js.map +1 -0
- package/dist/services/sites.mjs +1058 -0
- package/dist/services/sites.mjs.map +1 -0
- package/dist/services/storage.d.mts +435 -0
- package/dist/services/storage.d.ts +435 -0
- package/dist/services/storage.js +609 -0
- package/dist/services/storage.js.map +1 -0
- package/dist/services/storage.mjs +608 -0
- package/dist/services/storage.mjs.map +1 -0
- package/dist/services/tables-db.d.mts +1934 -0
- package/dist/services/tables-db.d.ts +1934 -0
- package/dist/services/tables-db.js +2954 -0
- package/dist/services/tables-db.js.map +1 -0
- package/dist/services/tables-db.mjs +2953 -0
- package/dist/services/tables-db.mjs.map +1 -0
- package/dist/services/teams.d.mts +355 -0
- package/dist/services/teams.d.ts +355 -0
- package/dist/services/teams.js +475 -0
- package/dist/services/teams.js.map +1 -0
- package/dist/services/teams.mjs +474 -0
- package/dist/services/teams.mjs.map +1 -0
- package/dist/services/tokens.d.mts +133 -0
- package/dist/services/tokens.d.ts +133 -0
- package/dist/services/tokens.js +169 -0
- package/dist/services/tokens.js.map +1 -0
- package/dist/services/tokens.mjs +168 -0
- package/dist/services/tokens.mjs.map +1 -0
- package/dist/services/user.d.mts +66 -0
- package/dist/services/user.d.ts +66 -0
- package/dist/services/user.js +101 -0
- package/dist/services/user.js.map +1 -0
- package/dist/services/user.mjs +100 -0
- package/dist/services/user.mjs.map +1 -0
- package/dist/services/users.d.mts +1176 -0
- package/dist/services/users.d.ts +1176 -0
- package/dist/services/users.js +1742 -0
- package/dist/services/users.js.map +1 -0
- package/dist/services/users.mjs +1741 -0
- package/dist/services/users.mjs.map +1 -0
- package/package.json +15 -1
|
@@ -0,0 +1,2954 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
var client = require('../client');
|
|
4
|
+
|
|
5
|
+
class TablesDB {
|
|
6
|
+
constructor(client) {
|
|
7
|
+
this.client = client;
|
|
8
|
+
}
|
|
9
|
+
list(paramsOrFirst, ...rest) {
|
|
10
|
+
let params;
|
|
11
|
+
if (!paramsOrFirst || paramsOrFirst && typeof paramsOrFirst === "object" && !Array.isArray(paramsOrFirst)) {
|
|
12
|
+
params = paramsOrFirst || {};
|
|
13
|
+
} else {
|
|
14
|
+
params = {
|
|
15
|
+
queries: paramsOrFirst,
|
|
16
|
+
search: rest[0],
|
|
17
|
+
total: rest[1]
|
|
18
|
+
};
|
|
19
|
+
}
|
|
20
|
+
const queries = params.queries;
|
|
21
|
+
const search = params.search;
|
|
22
|
+
const total = params.total;
|
|
23
|
+
const apiPath = "/tablesdb";
|
|
24
|
+
const payload = {};
|
|
25
|
+
if (typeof queries !== "undefined") {
|
|
26
|
+
payload["queries"] = queries;
|
|
27
|
+
}
|
|
28
|
+
if (typeof search !== "undefined") {
|
|
29
|
+
payload["search"] = search;
|
|
30
|
+
}
|
|
31
|
+
if (typeof total !== "undefined") {
|
|
32
|
+
payload["total"] = total;
|
|
33
|
+
}
|
|
34
|
+
const uri = new URL(this.client.config.endpoint + apiPath);
|
|
35
|
+
const apiHeaders = {};
|
|
36
|
+
return this.client.call(
|
|
37
|
+
"get",
|
|
38
|
+
uri,
|
|
39
|
+
apiHeaders,
|
|
40
|
+
payload
|
|
41
|
+
);
|
|
42
|
+
}
|
|
43
|
+
create(paramsOrFirst, ...rest) {
|
|
44
|
+
let params;
|
|
45
|
+
if (paramsOrFirst && typeof paramsOrFirst === "object" && !Array.isArray(paramsOrFirst)) {
|
|
46
|
+
params = paramsOrFirst || {};
|
|
47
|
+
} else {
|
|
48
|
+
params = {
|
|
49
|
+
databaseId: paramsOrFirst,
|
|
50
|
+
name: rest[0],
|
|
51
|
+
enabled: rest[1]
|
|
52
|
+
};
|
|
53
|
+
}
|
|
54
|
+
const databaseId = params.databaseId;
|
|
55
|
+
const name = params.name;
|
|
56
|
+
const enabled = params.enabled;
|
|
57
|
+
if (typeof databaseId === "undefined") {
|
|
58
|
+
throw new client.AppwriteException('Missing required parameter: "databaseId"');
|
|
59
|
+
}
|
|
60
|
+
if (typeof name === "undefined") {
|
|
61
|
+
throw new client.AppwriteException('Missing required parameter: "name"');
|
|
62
|
+
}
|
|
63
|
+
const apiPath = "/tablesdb";
|
|
64
|
+
const payload = {};
|
|
65
|
+
if (typeof databaseId !== "undefined") {
|
|
66
|
+
payload["databaseId"] = databaseId;
|
|
67
|
+
}
|
|
68
|
+
if (typeof name !== "undefined") {
|
|
69
|
+
payload["name"] = name;
|
|
70
|
+
}
|
|
71
|
+
if (typeof enabled !== "undefined") {
|
|
72
|
+
payload["enabled"] = enabled;
|
|
73
|
+
}
|
|
74
|
+
const uri = new URL(this.client.config.endpoint + apiPath);
|
|
75
|
+
const apiHeaders = {
|
|
76
|
+
"content-type": "application/json"
|
|
77
|
+
};
|
|
78
|
+
return this.client.call(
|
|
79
|
+
"post",
|
|
80
|
+
uri,
|
|
81
|
+
apiHeaders,
|
|
82
|
+
payload
|
|
83
|
+
);
|
|
84
|
+
}
|
|
85
|
+
listTransactions(paramsOrFirst) {
|
|
86
|
+
let params;
|
|
87
|
+
if (!paramsOrFirst || paramsOrFirst && typeof paramsOrFirst === "object" && !Array.isArray(paramsOrFirst)) {
|
|
88
|
+
params = paramsOrFirst || {};
|
|
89
|
+
} else {
|
|
90
|
+
params = {
|
|
91
|
+
queries: paramsOrFirst
|
|
92
|
+
};
|
|
93
|
+
}
|
|
94
|
+
const queries = params.queries;
|
|
95
|
+
const apiPath = "/tablesdb/transactions";
|
|
96
|
+
const payload = {};
|
|
97
|
+
if (typeof queries !== "undefined") {
|
|
98
|
+
payload["queries"] = queries;
|
|
99
|
+
}
|
|
100
|
+
const uri = new URL(this.client.config.endpoint + apiPath);
|
|
101
|
+
const apiHeaders = {};
|
|
102
|
+
return this.client.call(
|
|
103
|
+
"get",
|
|
104
|
+
uri,
|
|
105
|
+
apiHeaders,
|
|
106
|
+
payload
|
|
107
|
+
);
|
|
108
|
+
}
|
|
109
|
+
createTransaction(paramsOrFirst) {
|
|
110
|
+
let params;
|
|
111
|
+
if (!paramsOrFirst || paramsOrFirst && typeof paramsOrFirst === "object" && !Array.isArray(paramsOrFirst)) {
|
|
112
|
+
params = paramsOrFirst || {};
|
|
113
|
+
} else {
|
|
114
|
+
params = {
|
|
115
|
+
ttl: paramsOrFirst
|
|
116
|
+
};
|
|
117
|
+
}
|
|
118
|
+
const ttl = params.ttl;
|
|
119
|
+
const apiPath = "/tablesdb/transactions";
|
|
120
|
+
const payload = {};
|
|
121
|
+
if (typeof ttl !== "undefined") {
|
|
122
|
+
payload["ttl"] = ttl;
|
|
123
|
+
}
|
|
124
|
+
const uri = new URL(this.client.config.endpoint + apiPath);
|
|
125
|
+
const apiHeaders = {
|
|
126
|
+
"content-type": "application/json"
|
|
127
|
+
};
|
|
128
|
+
return this.client.call(
|
|
129
|
+
"post",
|
|
130
|
+
uri,
|
|
131
|
+
apiHeaders,
|
|
132
|
+
payload
|
|
133
|
+
);
|
|
134
|
+
}
|
|
135
|
+
getTransaction(paramsOrFirst) {
|
|
136
|
+
let params;
|
|
137
|
+
if (paramsOrFirst && typeof paramsOrFirst === "object" && !Array.isArray(paramsOrFirst)) {
|
|
138
|
+
params = paramsOrFirst || {};
|
|
139
|
+
} else {
|
|
140
|
+
params = {
|
|
141
|
+
transactionId: paramsOrFirst
|
|
142
|
+
};
|
|
143
|
+
}
|
|
144
|
+
const transactionId = params.transactionId;
|
|
145
|
+
if (typeof transactionId === "undefined") {
|
|
146
|
+
throw new client.AppwriteException('Missing required parameter: "transactionId"');
|
|
147
|
+
}
|
|
148
|
+
const apiPath = "/tablesdb/transactions/{transactionId}".replace("{transactionId}", transactionId);
|
|
149
|
+
const payload = {};
|
|
150
|
+
const uri = new URL(this.client.config.endpoint + apiPath);
|
|
151
|
+
const apiHeaders = {};
|
|
152
|
+
return this.client.call(
|
|
153
|
+
"get",
|
|
154
|
+
uri,
|
|
155
|
+
apiHeaders,
|
|
156
|
+
payload
|
|
157
|
+
);
|
|
158
|
+
}
|
|
159
|
+
updateTransaction(paramsOrFirst, ...rest) {
|
|
160
|
+
let params;
|
|
161
|
+
if (paramsOrFirst && typeof paramsOrFirst === "object" && !Array.isArray(paramsOrFirst)) {
|
|
162
|
+
params = paramsOrFirst || {};
|
|
163
|
+
} else {
|
|
164
|
+
params = {
|
|
165
|
+
transactionId: paramsOrFirst,
|
|
166
|
+
commit: rest[0],
|
|
167
|
+
rollback: rest[1]
|
|
168
|
+
};
|
|
169
|
+
}
|
|
170
|
+
const transactionId = params.transactionId;
|
|
171
|
+
const commit = params.commit;
|
|
172
|
+
const rollback = params.rollback;
|
|
173
|
+
if (typeof transactionId === "undefined") {
|
|
174
|
+
throw new client.AppwriteException('Missing required parameter: "transactionId"');
|
|
175
|
+
}
|
|
176
|
+
const apiPath = "/tablesdb/transactions/{transactionId}".replace("{transactionId}", transactionId);
|
|
177
|
+
const payload = {};
|
|
178
|
+
if (typeof commit !== "undefined") {
|
|
179
|
+
payload["commit"] = commit;
|
|
180
|
+
}
|
|
181
|
+
if (typeof rollback !== "undefined") {
|
|
182
|
+
payload["rollback"] = rollback;
|
|
183
|
+
}
|
|
184
|
+
const uri = new URL(this.client.config.endpoint + apiPath);
|
|
185
|
+
const apiHeaders = {
|
|
186
|
+
"content-type": "application/json"
|
|
187
|
+
};
|
|
188
|
+
return this.client.call(
|
|
189
|
+
"patch",
|
|
190
|
+
uri,
|
|
191
|
+
apiHeaders,
|
|
192
|
+
payload
|
|
193
|
+
);
|
|
194
|
+
}
|
|
195
|
+
deleteTransaction(paramsOrFirst) {
|
|
196
|
+
let params;
|
|
197
|
+
if (paramsOrFirst && typeof paramsOrFirst === "object" && !Array.isArray(paramsOrFirst)) {
|
|
198
|
+
params = paramsOrFirst || {};
|
|
199
|
+
} else {
|
|
200
|
+
params = {
|
|
201
|
+
transactionId: paramsOrFirst
|
|
202
|
+
};
|
|
203
|
+
}
|
|
204
|
+
const transactionId = params.transactionId;
|
|
205
|
+
if (typeof transactionId === "undefined") {
|
|
206
|
+
throw new client.AppwriteException('Missing required parameter: "transactionId"');
|
|
207
|
+
}
|
|
208
|
+
const apiPath = "/tablesdb/transactions/{transactionId}".replace("{transactionId}", transactionId);
|
|
209
|
+
const payload = {};
|
|
210
|
+
const uri = new URL(this.client.config.endpoint + apiPath);
|
|
211
|
+
const apiHeaders = {
|
|
212
|
+
"content-type": "application/json"
|
|
213
|
+
};
|
|
214
|
+
return this.client.call(
|
|
215
|
+
"delete",
|
|
216
|
+
uri,
|
|
217
|
+
apiHeaders,
|
|
218
|
+
payload
|
|
219
|
+
);
|
|
220
|
+
}
|
|
221
|
+
createOperations(paramsOrFirst, ...rest) {
|
|
222
|
+
let params;
|
|
223
|
+
if (paramsOrFirst && typeof paramsOrFirst === "object" && !Array.isArray(paramsOrFirst)) {
|
|
224
|
+
params = paramsOrFirst || {};
|
|
225
|
+
} else {
|
|
226
|
+
params = {
|
|
227
|
+
transactionId: paramsOrFirst,
|
|
228
|
+
operations: rest[0]
|
|
229
|
+
};
|
|
230
|
+
}
|
|
231
|
+
const transactionId = params.transactionId;
|
|
232
|
+
const operations = params.operations;
|
|
233
|
+
if (typeof transactionId === "undefined") {
|
|
234
|
+
throw new client.AppwriteException('Missing required parameter: "transactionId"');
|
|
235
|
+
}
|
|
236
|
+
const apiPath = "/tablesdb/transactions/{transactionId}/operations".replace("{transactionId}", transactionId);
|
|
237
|
+
const payload = {};
|
|
238
|
+
if (typeof operations !== "undefined") {
|
|
239
|
+
payload["operations"] = operations;
|
|
240
|
+
}
|
|
241
|
+
const uri = new URL(this.client.config.endpoint + apiPath);
|
|
242
|
+
const apiHeaders = {
|
|
243
|
+
"content-type": "application/json"
|
|
244
|
+
};
|
|
245
|
+
return this.client.call(
|
|
246
|
+
"post",
|
|
247
|
+
uri,
|
|
248
|
+
apiHeaders,
|
|
249
|
+
payload
|
|
250
|
+
);
|
|
251
|
+
}
|
|
252
|
+
get(paramsOrFirst) {
|
|
253
|
+
let params;
|
|
254
|
+
if (paramsOrFirst && typeof paramsOrFirst === "object" && !Array.isArray(paramsOrFirst)) {
|
|
255
|
+
params = paramsOrFirst || {};
|
|
256
|
+
} else {
|
|
257
|
+
params = {
|
|
258
|
+
databaseId: paramsOrFirst
|
|
259
|
+
};
|
|
260
|
+
}
|
|
261
|
+
const databaseId = params.databaseId;
|
|
262
|
+
if (typeof databaseId === "undefined") {
|
|
263
|
+
throw new client.AppwriteException('Missing required parameter: "databaseId"');
|
|
264
|
+
}
|
|
265
|
+
const apiPath = "/tablesdb/{databaseId}".replace("{databaseId}", databaseId);
|
|
266
|
+
const payload = {};
|
|
267
|
+
const uri = new URL(this.client.config.endpoint + apiPath);
|
|
268
|
+
const apiHeaders = {};
|
|
269
|
+
return this.client.call(
|
|
270
|
+
"get",
|
|
271
|
+
uri,
|
|
272
|
+
apiHeaders,
|
|
273
|
+
payload
|
|
274
|
+
);
|
|
275
|
+
}
|
|
276
|
+
update(paramsOrFirst, ...rest) {
|
|
277
|
+
let params;
|
|
278
|
+
if (paramsOrFirst && typeof paramsOrFirst === "object" && !Array.isArray(paramsOrFirst)) {
|
|
279
|
+
params = paramsOrFirst || {};
|
|
280
|
+
} else {
|
|
281
|
+
params = {
|
|
282
|
+
databaseId: paramsOrFirst,
|
|
283
|
+
name: rest[0],
|
|
284
|
+
enabled: rest[1]
|
|
285
|
+
};
|
|
286
|
+
}
|
|
287
|
+
const databaseId = params.databaseId;
|
|
288
|
+
const name = params.name;
|
|
289
|
+
const enabled = params.enabled;
|
|
290
|
+
if (typeof databaseId === "undefined") {
|
|
291
|
+
throw new client.AppwriteException('Missing required parameter: "databaseId"');
|
|
292
|
+
}
|
|
293
|
+
if (typeof name === "undefined") {
|
|
294
|
+
throw new client.AppwriteException('Missing required parameter: "name"');
|
|
295
|
+
}
|
|
296
|
+
const apiPath = "/tablesdb/{databaseId}".replace("{databaseId}", databaseId);
|
|
297
|
+
const payload = {};
|
|
298
|
+
if (typeof name !== "undefined") {
|
|
299
|
+
payload["name"] = name;
|
|
300
|
+
}
|
|
301
|
+
if (typeof enabled !== "undefined") {
|
|
302
|
+
payload["enabled"] = enabled;
|
|
303
|
+
}
|
|
304
|
+
const uri = new URL(this.client.config.endpoint + apiPath);
|
|
305
|
+
const apiHeaders = {
|
|
306
|
+
"content-type": "application/json"
|
|
307
|
+
};
|
|
308
|
+
return this.client.call(
|
|
309
|
+
"put",
|
|
310
|
+
uri,
|
|
311
|
+
apiHeaders,
|
|
312
|
+
payload
|
|
313
|
+
);
|
|
314
|
+
}
|
|
315
|
+
delete(paramsOrFirst) {
|
|
316
|
+
let params;
|
|
317
|
+
if (paramsOrFirst && typeof paramsOrFirst === "object" && !Array.isArray(paramsOrFirst)) {
|
|
318
|
+
params = paramsOrFirst || {};
|
|
319
|
+
} else {
|
|
320
|
+
params = {
|
|
321
|
+
databaseId: paramsOrFirst
|
|
322
|
+
};
|
|
323
|
+
}
|
|
324
|
+
const databaseId = params.databaseId;
|
|
325
|
+
if (typeof databaseId === "undefined") {
|
|
326
|
+
throw new client.AppwriteException('Missing required parameter: "databaseId"');
|
|
327
|
+
}
|
|
328
|
+
const apiPath = "/tablesdb/{databaseId}".replace("{databaseId}", databaseId);
|
|
329
|
+
const payload = {};
|
|
330
|
+
const uri = new URL(this.client.config.endpoint + apiPath);
|
|
331
|
+
const apiHeaders = {
|
|
332
|
+
"content-type": "application/json"
|
|
333
|
+
};
|
|
334
|
+
return this.client.call(
|
|
335
|
+
"delete",
|
|
336
|
+
uri,
|
|
337
|
+
apiHeaders,
|
|
338
|
+
payload
|
|
339
|
+
);
|
|
340
|
+
}
|
|
341
|
+
listTables(paramsOrFirst, ...rest) {
|
|
342
|
+
let params;
|
|
343
|
+
if (paramsOrFirst && typeof paramsOrFirst === "object" && !Array.isArray(paramsOrFirst)) {
|
|
344
|
+
params = paramsOrFirst || {};
|
|
345
|
+
} else {
|
|
346
|
+
params = {
|
|
347
|
+
databaseId: paramsOrFirst,
|
|
348
|
+
queries: rest[0],
|
|
349
|
+
search: rest[1],
|
|
350
|
+
total: rest[2]
|
|
351
|
+
};
|
|
352
|
+
}
|
|
353
|
+
const databaseId = params.databaseId;
|
|
354
|
+
const queries = params.queries;
|
|
355
|
+
const search = params.search;
|
|
356
|
+
const total = params.total;
|
|
357
|
+
if (typeof databaseId === "undefined") {
|
|
358
|
+
throw new client.AppwriteException('Missing required parameter: "databaseId"');
|
|
359
|
+
}
|
|
360
|
+
const apiPath = "/tablesdb/{databaseId}/tables".replace("{databaseId}", databaseId);
|
|
361
|
+
const payload = {};
|
|
362
|
+
if (typeof queries !== "undefined") {
|
|
363
|
+
payload["queries"] = queries;
|
|
364
|
+
}
|
|
365
|
+
if (typeof search !== "undefined") {
|
|
366
|
+
payload["search"] = search;
|
|
367
|
+
}
|
|
368
|
+
if (typeof total !== "undefined") {
|
|
369
|
+
payload["total"] = total;
|
|
370
|
+
}
|
|
371
|
+
const uri = new URL(this.client.config.endpoint + apiPath);
|
|
372
|
+
const apiHeaders = {};
|
|
373
|
+
return this.client.call(
|
|
374
|
+
"get",
|
|
375
|
+
uri,
|
|
376
|
+
apiHeaders,
|
|
377
|
+
payload
|
|
378
|
+
);
|
|
379
|
+
}
|
|
380
|
+
createTable(paramsOrFirst, ...rest) {
|
|
381
|
+
let params;
|
|
382
|
+
if (paramsOrFirst && typeof paramsOrFirst === "object" && !Array.isArray(paramsOrFirst)) {
|
|
383
|
+
params = paramsOrFirst || {};
|
|
384
|
+
} else {
|
|
385
|
+
params = {
|
|
386
|
+
databaseId: paramsOrFirst,
|
|
387
|
+
tableId: rest[0],
|
|
388
|
+
name: rest[1],
|
|
389
|
+
permissions: rest[2],
|
|
390
|
+
rowSecurity: rest[3],
|
|
391
|
+
enabled: rest[4],
|
|
392
|
+
columns: rest[5],
|
|
393
|
+
indexes: rest[6]
|
|
394
|
+
};
|
|
395
|
+
}
|
|
396
|
+
const databaseId = params.databaseId;
|
|
397
|
+
const tableId = params.tableId;
|
|
398
|
+
const name = params.name;
|
|
399
|
+
const permissions = params.permissions;
|
|
400
|
+
const rowSecurity = params.rowSecurity;
|
|
401
|
+
const enabled = params.enabled;
|
|
402
|
+
const columns = params.columns;
|
|
403
|
+
const indexes = params.indexes;
|
|
404
|
+
if (typeof databaseId === "undefined") {
|
|
405
|
+
throw new client.AppwriteException('Missing required parameter: "databaseId"');
|
|
406
|
+
}
|
|
407
|
+
if (typeof tableId === "undefined") {
|
|
408
|
+
throw new client.AppwriteException('Missing required parameter: "tableId"');
|
|
409
|
+
}
|
|
410
|
+
if (typeof name === "undefined") {
|
|
411
|
+
throw new client.AppwriteException('Missing required parameter: "name"');
|
|
412
|
+
}
|
|
413
|
+
const apiPath = "/tablesdb/{databaseId}/tables".replace("{databaseId}", databaseId);
|
|
414
|
+
const payload = {};
|
|
415
|
+
if (typeof tableId !== "undefined") {
|
|
416
|
+
payload["tableId"] = tableId;
|
|
417
|
+
}
|
|
418
|
+
if (typeof name !== "undefined") {
|
|
419
|
+
payload["name"] = name;
|
|
420
|
+
}
|
|
421
|
+
if (typeof permissions !== "undefined") {
|
|
422
|
+
payload["permissions"] = permissions;
|
|
423
|
+
}
|
|
424
|
+
if (typeof rowSecurity !== "undefined") {
|
|
425
|
+
payload["rowSecurity"] = rowSecurity;
|
|
426
|
+
}
|
|
427
|
+
if (typeof enabled !== "undefined") {
|
|
428
|
+
payload["enabled"] = enabled;
|
|
429
|
+
}
|
|
430
|
+
if (typeof columns !== "undefined") {
|
|
431
|
+
payload["columns"] = columns;
|
|
432
|
+
}
|
|
433
|
+
if (typeof indexes !== "undefined") {
|
|
434
|
+
payload["indexes"] = indexes;
|
|
435
|
+
}
|
|
436
|
+
const uri = new URL(this.client.config.endpoint + apiPath);
|
|
437
|
+
const apiHeaders = {
|
|
438
|
+
"content-type": "application/json"
|
|
439
|
+
};
|
|
440
|
+
return this.client.call(
|
|
441
|
+
"post",
|
|
442
|
+
uri,
|
|
443
|
+
apiHeaders,
|
|
444
|
+
payload
|
|
445
|
+
);
|
|
446
|
+
}
|
|
447
|
+
getTable(paramsOrFirst, ...rest) {
|
|
448
|
+
let params;
|
|
449
|
+
if (paramsOrFirst && typeof paramsOrFirst === "object" && !Array.isArray(paramsOrFirst)) {
|
|
450
|
+
params = paramsOrFirst || {};
|
|
451
|
+
} else {
|
|
452
|
+
params = {
|
|
453
|
+
databaseId: paramsOrFirst,
|
|
454
|
+
tableId: rest[0]
|
|
455
|
+
};
|
|
456
|
+
}
|
|
457
|
+
const databaseId = params.databaseId;
|
|
458
|
+
const tableId = params.tableId;
|
|
459
|
+
if (typeof databaseId === "undefined") {
|
|
460
|
+
throw new client.AppwriteException('Missing required parameter: "databaseId"');
|
|
461
|
+
}
|
|
462
|
+
if (typeof tableId === "undefined") {
|
|
463
|
+
throw new client.AppwriteException('Missing required parameter: "tableId"');
|
|
464
|
+
}
|
|
465
|
+
const apiPath = "/tablesdb/{databaseId}/tables/{tableId}".replace("{databaseId}", databaseId).replace("{tableId}", tableId);
|
|
466
|
+
const payload = {};
|
|
467
|
+
const uri = new URL(this.client.config.endpoint + apiPath);
|
|
468
|
+
const apiHeaders = {};
|
|
469
|
+
return this.client.call(
|
|
470
|
+
"get",
|
|
471
|
+
uri,
|
|
472
|
+
apiHeaders,
|
|
473
|
+
payload
|
|
474
|
+
);
|
|
475
|
+
}
|
|
476
|
+
updateTable(paramsOrFirst, ...rest) {
|
|
477
|
+
let params;
|
|
478
|
+
if (paramsOrFirst && typeof paramsOrFirst === "object" && !Array.isArray(paramsOrFirst)) {
|
|
479
|
+
params = paramsOrFirst || {};
|
|
480
|
+
} else {
|
|
481
|
+
params = {
|
|
482
|
+
databaseId: paramsOrFirst,
|
|
483
|
+
tableId: rest[0],
|
|
484
|
+
name: rest[1],
|
|
485
|
+
permissions: rest[2],
|
|
486
|
+
rowSecurity: rest[3],
|
|
487
|
+
enabled: rest[4]
|
|
488
|
+
};
|
|
489
|
+
}
|
|
490
|
+
const databaseId = params.databaseId;
|
|
491
|
+
const tableId = params.tableId;
|
|
492
|
+
const name = params.name;
|
|
493
|
+
const permissions = params.permissions;
|
|
494
|
+
const rowSecurity = params.rowSecurity;
|
|
495
|
+
const enabled = params.enabled;
|
|
496
|
+
if (typeof databaseId === "undefined") {
|
|
497
|
+
throw new client.AppwriteException('Missing required parameter: "databaseId"');
|
|
498
|
+
}
|
|
499
|
+
if (typeof tableId === "undefined") {
|
|
500
|
+
throw new client.AppwriteException('Missing required parameter: "tableId"');
|
|
501
|
+
}
|
|
502
|
+
if (typeof name === "undefined") {
|
|
503
|
+
throw new client.AppwriteException('Missing required parameter: "name"');
|
|
504
|
+
}
|
|
505
|
+
const apiPath = "/tablesdb/{databaseId}/tables/{tableId}".replace("{databaseId}", databaseId).replace("{tableId}", tableId);
|
|
506
|
+
const payload = {};
|
|
507
|
+
if (typeof name !== "undefined") {
|
|
508
|
+
payload["name"] = name;
|
|
509
|
+
}
|
|
510
|
+
if (typeof permissions !== "undefined") {
|
|
511
|
+
payload["permissions"] = permissions;
|
|
512
|
+
}
|
|
513
|
+
if (typeof rowSecurity !== "undefined") {
|
|
514
|
+
payload["rowSecurity"] = rowSecurity;
|
|
515
|
+
}
|
|
516
|
+
if (typeof enabled !== "undefined") {
|
|
517
|
+
payload["enabled"] = enabled;
|
|
518
|
+
}
|
|
519
|
+
const uri = new URL(this.client.config.endpoint + apiPath);
|
|
520
|
+
const apiHeaders = {
|
|
521
|
+
"content-type": "application/json"
|
|
522
|
+
};
|
|
523
|
+
return this.client.call(
|
|
524
|
+
"put",
|
|
525
|
+
uri,
|
|
526
|
+
apiHeaders,
|
|
527
|
+
payload
|
|
528
|
+
);
|
|
529
|
+
}
|
|
530
|
+
deleteTable(paramsOrFirst, ...rest) {
|
|
531
|
+
let params;
|
|
532
|
+
if (paramsOrFirst && typeof paramsOrFirst === "object" && !Array.isArray(paramsOrFirst)) {
|
|
533
|
+
params = paramsOrFirst || {};
|
|
534
|
+
} else {
|
|
535
|
+
params = {
|
|
536
|
+
databaseId: paramsOrFirst,
|
|
537
|
+
tableId: rest[0]
|
|
538
|
+
};
|
|
539
|
+
}
|
|
540
|
+
const databaseId = params.databaseId;
|
|
541
|
+
const tableId = params.tableId;
|
|
542
|
+
if (typeof databaseId === "undefined") {
|
|
543
|
+
throw new client.AppwriteException('Missing required parameter: "databaseId"');
|
|
544
|
+
}
|
|
545
|
+
if (typeof tableId === "undefined") {
|
|
546
|
+
throw new client.AppwriteException('Missing required parameter: "tableId"');
|
|
547
|
+
}
|
|
548
|
+
const apiPath = "/tablesdb/{databaseId}/tables/{tableId}".replace("{databaseId}", databaseId).replace("{tableId}", tableId);
|
|
549
|
+
const payload = {};
|
|
550
|
+
const uri = new URL(this.client.config.endpoint + apiPath);
|
|
551
|
+
const apiHeaders = {
|
|
552
|
+
"content-type": "application/json"
|
|
553
|
+
};
|
|
554
|
+
return this.client.call(
|
|
555
|
+
"delete",
|
|
556
|
+
uri,
|
|
557
|
+
apiHeaders,
|
|
558
|
+
payload
|
|
559
|
+
);
|
|
560
|
+
}
|
|
561
|
+
listColumns(paramsOrFirst, ...rest) {
|
|
562
|
+
let params;
|
|
563
|
+
if (paramsOrFirst && typeof paramsOrFirst === "object" && !Array.isArray(paramsOrFirst)) {
|
|
564
|
+
params = paramsOrFirst || {};
|
|
565
|
+
} else {
|
|
566
|
+
params = {
|
|
567
|
+
databaseId: paramsOrFirst,
|
|
568
|
+
tableId: rest[0],
|
|
569
|
+
queries: rest[1],
|
|
570
|
+
total: rest[2]
|
|
571
|
+
};
|
|
572
|
+
}
|
|
573
|
+
const databaseId = params.databaseId;
|
|
574
|
+
const tableId = params.tableId;
|
|
575
|
+
const queries = params.queries;
|
|
576
|
+
const total = params.total;
|
|
577
|
+
if (typeof databaseId === "undefined") {
|
|
578
|
+
throw new client.AppwriteException('Missing required parameter: "databaseId"');
|
|
579
|
+
}
|
|
580
|
+
if (typeof tableId === "undefined") {
|
|
581
|
+
throw new client.AppwriteException('Missing required parameter: "tableId"');
|
|
582
|
+
}
|
|
583
|
+
const apiPath = "/tablesdb/{databaseId}/tables/{tableId}/columns".replace("{databaseId}", databaseId).replace("{tableId}", tableId);
|
|
584
|
+
const payload = {};
|
|
585
|
+
if (typeof queries !== "undefined") {
|
|
586
|
+
payload["queries"] = queries;
|
|
587
|
+
}
|
|
588
|
+
if (typeof total !== "undefined") {
|
|
589
|
+
payload["total"] = total;
|
|
590
|
+
}
|
|
591
|
+
const uri = new URL(this.client.config.endpoint + apiPath);
|
|
592
|
+
const apiHeaders = {};
|
|
593
|
+
return this.client.call(
|
|
594
|
+
"get",
|
|
595
|
+
uri,
|
|
596
|
+
apiHeaders,
|
|
597
|
+
payload
|
|
598
|
+
);
|
|
599
|
+
}
|
|
600
|
+
createBooleanColumn(paramsOrFirst, ...rest) {
|
|
601
|
+
let params;
|
|
602
|
+
if (paramsOrFirst && typeof paramsOrFirst === "object" && !Array.isArray(paramsOrFirst)) {
|
|
603
|
+
params = paramsOrFirst || {};
|
|
604
|
+
} else {
|
|
605
|
+
params = {
|
|
606
|
+
databaseId: paramsOrFirst,
|
|
607
|
+
tableId: rest[0],
|
|
608
|
+
key: rest[1],
|
|
609
|
+
required: rest[2],
|
|
610
|
+
xdefault: rest[3],
|
|
611
|
+
array: rest[4]
|
|
612
|
+
};
|
|
613
|
+
}
|
|
614
|
+
const databaseId = params.databaseId;
|
|
615
|
+
const tableId = params.tableId;
|
|
616
|
+
const key = params.key;
|
|
617
|
+
const required = params.required;
|
|
618
|
+
const xdefault = params.xdefault;
|
|
619
|
+
const array = params.array;
|
|
620
|
+
if (typeof databaseId === "undefined") {
|
|
621
|
+
throw new client.AppwriteException('Missing required parameter: "databaseId"');
|
|
622
|
+
}
|
|
623
|
+
if (typeof tableId === "undefined") {
|
|
624
|
+
throw new client.AppwriteException('Missing required parameter: "tableId"');
|
|
625
|
+
}
|
|
626
|
+
if (typeof key === "undefined") {
|
|
627
|
+
throw new client.AppwriteException('Missing required parameter: "key"');
|
|
628
|
+
}
|
|
629
|
+
if (typeof required === "undefined") {
|
|
630
|
+
throw new client.AppwriteException('Missing required parameter: "required"');
|
|
631
|
+
}
|
|
632
|
+
const apiPath = "/tablesdb/{databaseId}/tables/{tableId}/columns/boolean".replace("{databaseId}", databaseId).replace("{tableId}", tableId);
|
|
633
|
+
const payload = {};
|
|
634
|
+
if (typeof key !== "undefined") {
|
|
635
|
+
payload["key"] = key;
|
|
636
|
+
}
|
|
637
|
+
if (typeof required !== "undefined") {
|
|
638
|
+
payload["required"] = required;
|
|
639
|
+
}
|
|
640
|
+
if (typeof xdefault !== "undefined") {
|
|
641
|
+
payload["default"] = xdefault;
|
|
642
|
+
}
|
|
643
|
+
if (typeof array !== "undefined") {
|
|
644
|
+
payload["array"] = array;
|
|
645
|
+
}
|
|
646
|
+
const uri = new URL(this.client.config.endpoint + apiPath);
|
|
647
|
+
const apiHeaders = {
|
|
648
|
+
"content-type": "application/json"
|
|
649
|
+
};
|
|
650
|
+
return this.client.call(
|
|
651
|
+
"post",
|
|
652
|
+
uri,
|
|
653
|
+
apiHeaders,
|
|
654
|
+
payload
|
|
655
|
+
);
|
|
656
|
+
}
|
|
657
|
+
updateBooleanColumn(paramsOrFirst, ...rest) {
|
|
658
|
+
let params;
|
|
659
|
+
if (paramsOrFirst && typeof paramsOrFirst === "object" && !Array.isArray(paramsOrFirst)) {
|
|
660
|
+
params = paramsOrFirst || {};
|
|
661
|
+
} else {
|
|
662
|
+
params = {
|
|
663
|
+
databaseId: paramsOrFirst,
|
|
664
|
+
tableId: rest[0],
|
|
665
|
+
key: rest[1],
|
|
666
|
+
required: rest[2],
|
|
667
|
+
xdefault: rest[3],
|
|
668
|
+
newKey: rest[4]
|
|
669
|
+
};
|
|
670
|
+
}
|
|
671
|
+
const databaseId = params.databaseId;
|
|
672
|
+
const tableId = params.tableId;
|
|
673
|
+
const key = params.key;
|
|
674
|
+
const required = params.required;
|
|
675
|
+
const xdefault = params.xdefault;
|
|
676
|
+
const newKey = params.newKey;
|
|
677
|
+
if (typeof databaseId === "undefined") {
|
|
678
|
+
throw new client.AppwriteException('Missing required parameter: "databaseId"');
|
|
679
|
+
}
|
|
680
|
+
if (typeof tableId === "undefined") {
|
|
681
|
+
throw new client.AppwriteException('Missing required parameter: "tableId"');
|
|
682
|
+
}
|
|
683
|
+
if (typeof key === "undefined") {
|
|
684
|
+
throw new client.AppwriteException('Missing required parameter: "key"');
|
|
685
|
+
}
|
|
686
|
+
if (typeof required === "undefined") {
|
|
687
|
+
throw new client.AppwriteException('Missing required parameter: "required"');
|
|
688
|
+
}
|
|
689
|
+
if (typeof xdefault === "undefined") {
|
|
690
|
+
throw new client.AppwriteException('Missing required parameter: "xdefault"');
|
|
691
|
+
}
|
|
692
|
+
const apiPath = "/tablesdb/{databaseId}/tables/{tableId}/columns/boolean/{key}".replace("{databaseId}", databaseId).replace("{tableId}", tableId).replace("{key}", key);
|
|
693
|
+
const payload = {};
|
|
694
|
+
if (typeof required !== "undefined") {
|
|
695
|
+
payload["required"] = required;
|
|
696
|
+
}
|
|
697
|
+
if (typeof xdefault !== "undefined") {
|
|
698
|
+
payload["default"] = xdefault;
|
|
699
|
+
}
|
|
700
|
+
if (typeof newKey !== "undefined") {
|
|
701
|
+
payload["newKey"] = newKey;
|
|
702
|
+
}
|
|
703
|
+
const uri = new URL(this.client.config.endpoint + apiPath);
|
|
704
|
+
const apiHeaders = {
|
|
705
|
+
"content-type": "application/json"
|
|
706
|
+
};
|
|
707
|
+
return this.client.call(
|
|
708
|
+
"patch",
|
|
709
|
+
uri,
|
|
710
|
+
apiHeaders,
|
|
711
|
+
payload
|
|
712
|
+
);
|
|
713
|
+
}
|
|
714
|
+
createDatetimeColumn(paramsOrFirst, ...rest) {
|
|
715
|
+
let params;
|
|
716
|
+
if (paramsOrFirst && typeof paramsOrFirst === "object" && !Array.isArray(paramsOrFirst)) {
|
|
717
|
+
params = paramsOrFirst || {};
|
|
718
|
+
} else {
|
|
719
|
+
params = {
|
|
720
|
+
databaseId: paramsOrFirst,
|
|
721
|
+
tableId: rest[0],
|
|
722
|
+
key: rest[1],
|
|
723
|
+
required: rest[2],
|
|
724
|
+
xdefault: rest[3],
|
|
725
|
+
array: rest[4]
|
|
726
|
+
};
|
|
727
|
+
}
|
|
728
|
+
const databaseId = params.databaseId;
|
|
729
|
+
const tableId = params.tableId;
|
|
730
|
+
const key = params.key;
|
|
731
|
+
const required = params.required;
|
|
732
|
+
const xdefault = params.xdefault;
|
|
733
|
+
const array = params.array;
|
|
734
|
+
if (typeof databaseId === "undefined") {
|
|
735
|
+
throw new client.AppwriteException('Missing required parameter: "databaseId"');
|
|
736
|
+
}
|
|
737
|
+
if (typeof tableId === "undefined") {
|
|
738
|
+
throw new client.AppwriteException('Missing required parameter: "tableId"');
|
|
739
|
+
}
|
|
740
|
+
if (typeof key === "undefined") {
|
|
741
|
+
throw new client.AppwriteException('Missing required parameter: "key"');
|
|
742
|
+
}
|
|
743
|
+
if (typeof required === "undefined") {
|
|
744
|
+
throw new client.AppwriteException('Missing required parameter: "required"');
|
|
745
|
+
}
|
|
746
|
+
const apiPath = "/tablesdb/{databaseId}/tables/{tableId}/columns/datetime".replace("{databaseId}", databaseId).replace("{tableId}", tableId);
|
|
747
|
+
const payload = {};
|
|
748
|
+
if (typeof key !== "undefined") {
|
|
749
|
+
payload["key"] = key;
|
|
750
|
+
}
|
|
751
|
+
if (typeof required !== "undefined") {
|
|
752
|
+
payload["required"] = required;
|
|
753
|
+
}
|
|
754
|
+
if (typeof xdefault !== "undefined") {
|
|
755
|
+
payload["default"] = xdefault;
|
|
756
|
+
}
|
|
757
|
+
if (typeof array !== "undefined") {
|
|
758
|
+
payload["array"] = array;
|
|
759
|
+
}
|
|
760
|
+
const uri = new URL(this.client.config.endpoint + apiPath);
|
|
761
|
+
const apiHeaders = {
|
|
762
|
+
"content-type": "application/json"
|
|
763
|
+
};
|
|
764
|
+
return this.client.call(
|
|
765
|
+
"post",
|
|
766
|
+
uri,
|
|
767
|
+
apiHeaders,
|
|
768
|
+
payload
|
|
769
|
+
);
|
|
770
|
+
}
|
|
771
|
+
updateDatetimeColumn(paramsOrFirst, ...rest) {
|
|
772
|
+
let params;
|
|
773
|
+
if (paramsOrFirst && typeof paramsOrFirst === "object" && !Array.isArray(paramsOrFirst)) {
|
|
774
|
+
params = paramsOrFirst || {};
|
|
775
|
+
} else {
|
|
776
|
+
params = {
|
|
777
|
+
databaseId: paramsOrFirst,
|
|
778
|
+
tableId: rest[0],
|
|
779
|
+
key: rest[1],
|
|
780
|
+
required: rest[2],
|
|
781
|
+
xdefault: rest[3],
|
|
782
|
+
newKey: rest[4]
|
|
783
|
+
};
|
|
784
|
+
}
|
|
785
|
+
const databaseId = params.databaseId;
|
|
786
|
+
const tableId = params.tableId;
|
|
787
|
+
const key = params.key;
|
|
788
|
+
const required = params.required;
|
|
789
|
+
const xdefault = params.xdefault;
|
|
790
|
+
const newKey = params.newKey;
|
|
791
|
+
if (typeof databaseId === "undefined") {
|
|
792
|
+
throw new client.AppwriteException('Missing required parameter: "databaseId"');
|
|
793
|
+
}
|
|
794
|
+
if (typeof tableId === "undefined") {
|
|
795
|
+
throw new client.AppwriteException('Missing required parameter: "tableId"');
|
|
796
|
+
}
|
|
797
|
+
if (typeof key === "undefined") {
|
|
798
|
+
throw new client.AppwriteException('Missing required parameter: "key"');
|
|
799
|
+
}
|
|
800
|
+
if (typeof required === "undefined") {
|
|
801
|
+
throw new client.AppwriteException('Missing required parameter: "required"');
|
|
802
|
+
}
|
|
803
|
+
if (typeof xdefault === "undefined") {
|
|
804
|
+
throw new client.AppwriteException('Missing required parameter: "xdefault"');
|
|
805
|
+
}
|
|
806
|
+
const apiPath = "/tablesdb/{databaseId}/tables/{tableId}/columns/datetime/{key}".replace("{databaseId}", databaseId).replace("{tableId}", tableId).replace("{key}", key);
|
|
807
|
+
const payload = {};
|
|
808
|
+
if (typeof required !== "undefined") {
|
|
809
|
+
payload["required"] = required;
|
|
810
|
+
}
|
|
811
|
+
if (typeof xdefault !== "undefined") {
|
|
812
|
+
payload["default"] = xdefault;
|
|
813
|
+
}
|
|
814
|
+
if (typeof newKey !== "undefined") {
|
|
815
|
+
payload["newKey"] = newKey;
|
|
816
|
+
}
|
|
817
|
+
const uri = new URL(this.client.config.endpoint + apiPath);
|
|
818
|
+
const apiHeaders = {
|
|
819
|
+
"content-type": "application/json"
|
|
820
|
+
};
|
|
821
|
+
return this.client.call(
|
|
822
|
+
"patch",
|
|
823
|
+
uri,
|
|
824
|
+
apiHeaders,
|
|
825
|
+
payload
|
|
826
|
+
);
|
|
827
|
+
}
|
|
828
|
+
createEmailColumn(paramsOrFirst, ...rest) {
|
|
829
|
+
let params;
|
|
830
|
+
if (paramsOrFirst && typeof paramsOrFirst === "object" && !Array.isArray(paramsOrFirst)) {
|
|
831
|
+
params = paramsOrFirst || {};
|
|
832
|
+
} else {
|
|
833
|
+
params = {
|
|
834
|
+
databaseId: paramsOrFirst,
|
|
835
|
+
tableId: rest[0],
|
|
836
|
+
key: rest[1],
|
|
837
|
+
required: rest[2],
|
|
838
|
+
xdefault: rest[3],
|
|
839
|
+
array: rest[4]
|
|
840
|
+
};
|
|
841
|
+
}
|
|
842
|
+
const databaseId = params.databaseId;
|
|
843
|
+
const tableId = params.tableId;
|
|
844
|
+
const key = params.key;
|
|
845
|
+
const required = params.required;
|
|
846
|
+
const xdefault = params.xdefault;
|
|
847
|
+
const array = params.array;
|
|
848
|
+
if (typeof databaseId === "undefined") {
|
|
849
|
+
throw new client.AppwriteException('Missing required parameter: "databaseId"');
|
|
850
|
+
}
|
|
851
|
+
if (typeof tableId === "undefined") {
|
|
852
|
+
throw new client.AppwriteException('Missing required parameter: "tableId"');
|
|
853
|
+
}
|
|
854
|
+
if (typeof key === "undefined") {
|
|
855
|
+
throw new client.AppwriteException('Missing required parameter: "key"');
|
|
856
|
+
}
|
|
857
|
+
if (typeof required === "undefined") {
|
|
858
|
+
throw new client.AppwriteException('Missing required parameter: "required"');
|
|
859
|
+
}
|
|
860
|
+
const apiPath = "/tablesdb/{databaseId}/tables/{tableId}/columns/email".replace("{databaseId}", databaseId).replace("{tableId}", tableId);
|
|
861
|
+
const payload = {};
|
|
862
|
+
if (typeof key !== "undefined") {
|
|
863
|
+
payload["key"] = key;
|
|
864
|
+
}
|
|
865
|
+
if (typeof required !== "undefined") {
|
|
866
|
+
payload["required"] = required;
|
|
867
|
+
}
|
|
868
|
+
if (typeof xdefault !== "undefined") {
|
|
869
|
+
payload["default"] = xdefault;
|
|
870
|
+
}
|
|
871
|
+
if (typeof array !== "undefined") {
|
|
872
|
+
payload["array"] = array;
|
|
873
|
+
}
|
|
874
|
+
const uri = new URL(this.client.config.endpoint + apiPath);
|
|
875
|
+
const apiHeaders = {
|
|
876
|
+
"content-type": "application/json"
|
|
877
|
+
};
|
|
878
|
+
return this.client.call(
|
|
879
|
+
"post",
|
|
880
|
+
uri,
|
|
881
|
+
apiHeaders,
|
|
882
|
+
payload
|
|
883
|
+
);
|
|
884
|
+
}
|
|
885
|
+
updateEmailColumn(paramsOrFirst, ...rest) {
|
|
886
|
+
let params;
|
|
887
|
+
if (paramsOrFirst && typeof paramsOrFirst === "object" && !Array.isArray(paramsOrFirst)) {
|
|
888
|
+
params = paramsOrFirst || {};
|
|
889
|
+
} else {
|
|
890
|
+
params = {
|
|
891
|
+
databaseId: paramsOrFirst,
|
|
892
|
+
tableId: rest[0],
|
|
893
|
+
key: rest[1],
|
|
894
|
+
required: rest[2],
|
|
895
|
+
xdefault: rest[3],
|
|
896
|
+
newKey: rest[4]
|
|
897
|
+
};
|
|
898
|
+
}
|
|
899
|
+
const databaseId = params.databaseId;
|
|
900
|
+
const tableId = params.tableId;
|
|
901
|
+
const key = params.key;
|
|
902
|
+
const required = params.required;
|
|
903
|
+
const xdefault = params.xdefault;
|
|
904
|
+
const newKey = params.newKey;
|
|
905
|
+
if (typeof databaseId === "undefined") {
|
|
906
|
+
throw new client.AppwriteException('Missing required parameter: "databaseId"');
|
|
907
|
+
}
|
|
908
|
+
if (typeof tableId === "undefined") {
|
|
909
|
+
throw new client.AppwriteException('Missing required parameter: "tableId"');
|
|
910
|
+
}
|
|
911
|
+
if (typeof key === "undefined") {
|
|
912
|
+
throw new client.AppwriteException('Missing required parameter: "key"');
|
|
913
|
+
}
|
|
914
|
+
if (typeof required === "undefined") {
|
|
915
|
+
throw new client.AppwriteException('Missing required parameter: "required"');
|
|
916
|
+
}
|
|
917
|
+
if (typeof xdefault === "undefined") {
|
|
918
|
+
throw new client.AppwriteException('Missing required parameter: "xdefault"');
|
|
919
|
+
}
|
|
920
|
+
const apiPath = "/tablesdb/{databaseId}/tables/{tableId}/columns/email/{key}".replace("{databaseId}", databaseId).replace("{tableId}", tableId).replace("{key}", key);
|
|
921
|
+
const payload = {};
|
|
922
|
+
if (typeof required !== "undefined") {
|
|
923
|
+
payload["required"] = required;
|
|
924
|
+
}
|
|
925
|
+
if (typeof xdefault !== "undefined") {
|
|
926
|
+
payload["default"] = xdefault;
|
|
927
|
+
}
|
|
928
|
+
if (typeof newKey !== "undefined") {
|
|
929
|
+
payload["newKey"] = newKey;
|
|
930
|
+
}
|
|
931
|
+
const uri = new URL(this.client.config.endpoint + apiPath);
|
|
932
|
+
const apiHeaders = {
|
|
933
|
+
"content-type": "application/json"
|
|
934
|
+
};
|
|
935
|
+
return this.client.call(
|
|
936
|
+
"patch",
|
|
937
|
+
uri,
|
|
938
|
+
apiHeaders,
|
|
939
|
+
payload
|
|
940
|
+
);
|
|
941
|
+
}
|
|
942
|
+
createEnumColumn(paramsOrFirst, ...rest) {
|
|
943
|
+
let params;
|
|
944
|
+
if (paramsOrFirst && typeof paramsOrFirst === "object" && !Array.isArray(paramsOrFirst)) {
|
|
945
|
+
params = paramsOrFirst || {};
|
|
946
|
+
} else {
|
|
947
|
+
params = {
|
|
948
|
+
databaseId: paramsOrFirst,
|
|
949
|
+
tableId: rest[0],
|
|
950
|
+
key: rest[1],
|
|
951
|
+
elements: rest[2],
|
|
952
|
+
required: rest[3],
|
|
953
|
+
xdefault: rest[4],
|
|
954
|
+
array: rest[5]
|
|
955
|
+
};
|
|
956
|
+
}
|
|
957
|
+
const databaseId = params.databaseId;
|
|
958
|
+
const tableId = params.tableId;
|
|
959
|
+
const key = params.key;
|
|
960
|
+
const elements = params.elements;
|
|
961
|
+
const required = params.required;
|
|
962
|
+
const xdefault = params.xdefault;
|
|
963
|
+
const array = params.array;
|
|
964
|
+
if (typeof databaseId === "undefined") {
|
|
965
|
+
throw new client.AppwriteException('Missing required parameter: "databaseId"');
|
|
966
|
+
}
|
|
967
|
+
if (typeof tableId === "undefined") {
|
|
968
|
+
throw new client.AppwriteException('Missing required parameter: "tableId"');
|
|
969
|
+
}
|
|
970
|
+
if (typeof key === "undefined") {
|
|
971
|
+
throw new client.AppwriteException('Missing required parameter: "key"');
|
|
972
|
+
}
|
|
973
|
+
if (typeof elements === "undefined") {
|
|
974
|
+
throw new client.AppwriteException('Missing required parameter: "elements"');
|
|
975
|
+
}
|
|
976
|
+
if (typeof required === "undefined") {
|
|
977
|
+
throw new client.AppwriteException('Missing required parameter: "required"');
|
|
978
|
+
}
|
|
979
|
+
const apiPath = "/tablesdb/{databaseId}/tables/{tableId}/columns/enum".replace("{databaseId}", databaseId).replace("{tableId}", tableId);
|
|
980
|
+
const payload = {};
|
|
981
|
+
if (typeof key !== "undefined") {
|
|
982
|
+
payload["key"] = key;
|
|
983
|
+
}
|
|
984
|
+
if (typeof elements !== "undefined") {
|
|
985
|
+
payload["elements"] = elements;
|
|
986
|
+
}
|
|
987
|
+
if (typeof required !== "undefined") {
|
|
988
|
+
payload["required"] = required;
|
|
989
|
+
}
|
|
990
|
+
if (typeof xdefault !== "undefined") {
|
|
991
|
+
payload["default"] = xdefault;
|
|
992
|
+
}
|
|
993
|
+
if (typeof array !== "undefined") {
|
|
994
|
+
payload["array"] = array;
|
|
995
|
+
}
|
|
996
|
+
const uri = new URL(this.client.config.endpoint + apiPath);
|
|
997
|
+
const apiHeaders = {
|
|
998
|
+
"content-type": "application/json"
|
|
999
|
+
};
|
|
1000
|
+
return this.client.call(
|
|
1001
|
+
"post",
|
|
1002
|
+
uri,
|
|
1003
|
+
apiHeaders,
|
|
1004
|
+
payload
|
|
1005
|
+
);
|
|
1006
|
+
}
|
|
1007
|
+
updateEnumColumn(paramsOrFirst, ...rest) {
|
|
1008
|
+
let params;
|
|
1009
|
+
if (paramsOrFirst && typeof paramsOrFirst === "object" && !Array.isArray(paramsOrFirst)) {
|
|
1010
|
+
params = paramsOrFirst || {};
|
|
1011
|
+
} else {
|
|
1012
|
+
params = {
|
|
1013
|
+
databaseId: paramsOrFirst,
|
|
1014
|
+
tableId: rest[0],
|
|
1015
|
+
key: rest[1],
|
|
1016
|
+
elements: rest[2],
|
|
1017
|
+
required: rest[3],
|
|
1018
|
+
xdefault: rest[4],
|
|
1019
|
+
newKey: rest[5]
|
|
1020
|
+
};
|
|
1021
|
+
}
|
|
1022
|
+
const databaseId = params.databaseId;
|
|
1023
|
+
const tableId = params.tableId;
|
|
1024
|
+
const key = params.key;
|
|
1025
|
+
const elements = params.elements;
|
|
1026
|
+
const required = params.required;
|
|
1027
|
+
const xdefault = params.xdefault;
|
|
1028
|
+
const newKey = params.newKey;
|
|
1029
|
+
if (typeof databaseId === "undefined") {
|
|
1030
|
+
throw new client.AppwriteException('Missing required parameter: "databaseId"');
|
|
1031
|
+
}
|
|
1032
|
+
if (typeof tableId === "undefined") {
|
|
1033
|
+
throw new client.AppwriteException('Missing required parameter: "tableId"');
|
|
1034
|
+
}
|
|
1035
|
+
if (typeof key === "undefined") {
|
|
1036
|
+
throw new client.AppwriteException('Missing required parameter: "key"');
|
|
1037
|
+
}
|
|
1038
|
+
if (typeof elements === "undefined") {
|
|
1039
|
+
throw new client.AppwriteException('Missing required parameter: "elements"');
|
|
1040
|
+
}
|
|
1041
|
+
if (typeof required === "undefined") {
|
|
1042
|
+
throw new client.AppwriteException('Missing required parameter: "required"');
|
|
1043
|
+
}
|
|
1044
|
+
if (typeof xdefault === "undefined") {
|
|
1045
|
+
throw new client.AppwriteException('Missing required parameter: "xdefault"');
|
|
1046
|
+
}
|
|
1047
|
+
const apiPath = "/tablesdb/{databaseId}/tables/{tableId}/columns/enum/{key}".replace("{databaseId}", databaseId).replace("{tableId}", tableId).replace("{key}", key);
|
|
1048
|
+
const payload = {};
|
|
1049
|
+
if (typeof elements !== "undefined") {
|
|
1050
|
+
payload["elements"] = elements;
|
|
1051
|
+
}
|
|
1052
|
+
if (typeof required !== "undefined") {
|
|
1053
|
+
payload["required"] = required;
|
|
1054
|
+
}
|
|
1055
|
+
if (typeof xdefault !== "undefined") {
|
|
1056
|
+
payload["default"] = xdefault;
|
|
1057
|
+
}
|
|
1058
|
+
if (typeof newKey !== "undefined") {
|
|
1059
|
+
payload["newKey"] = newKey;
|
|
1060
|
+
}
|
|
1061
|
+
const uri = new URL(this.client.config.endpoint + apiPath);
|
|
1062
|
+
const apiHeaders = {
|
|
1063
|
+
"content-type": "application/json"
|
|
1064
|
+
};
|
|
1065
|
+
return this.client.call(
|
|
1066
|
+
"patch",
|
|
1067
|
+
uri,
|
|
1068
|
+
apiHeaders,
|
|
1069
|
+
payload
|
|
1070
|
+
);
|
|
1071
|
+
}
|
|
1072
|
+
createFloatColumn(paramsOrFirst, ...rest) {
|
|
1073
|
+
let params;
|
|
1074
|
+
if (paramsOrFirst && typeof paramsOrFirst === "object" && !Array.isArray(paramsOrFirst)) {
|
|
1075
|
+
params = paramsOrFirst || {};
|
|
1076
|
+
} else {
|
|
1077
|
+
params = {
|
|
1078
|
+
databaseId: paramsOrFirst,
|
|
1079
|
+
tableId: rest[0],
|
|
1080
|
+
key: rest[1],
|
|
1081
|
+
required: rest[2],
|
|
1082
|
+
min: rest[3],
|
|
1083
|
+
max: rest[4],
|
|
1084
|
+
xdefault: rest[5],
|
|
1085
|
+
array: rest[6]
|
|
1086
|
+
};
|
|
1087
|
+
}
|
|
1088
|
+
const databaseId = params.databaseId;
|
|
1089
|
+
const tableId = params.tableId;
|
|
1090
|
+
const key = params.key;
|
|
1091
|
+
const required = params.required;
|
|
1092
|
+
const min = params.min;
|
|
1093
|
+
const max = params.max;
|
|
1094
|
+
const xdefault = params.xdefault;
|
|
1095
|
+
const array = params.array;
|
|
1096
|
+
if (typeof databaseId === "undefined") {
|
|
1097
|
+
throw new client.AppwriteException('Missing required parameter: "databaseId"');
|
|
1098
|
+
}
|
|
1099
|
+
if (typeof tableId === "undefined") {
|
|
1100
|
+
throw new client.AppwriteException('Missing required parameter: "tableId"');
|
|
1101
|
+
}
|
|
1102
|
+
if (typeof key === "undefined") {
|
|
1103
|
+
throw new client.AppwriteException('Missing required parameter: "key"');
|
|
1104
|
+
}
|
|
1105
|
+
if (typeof required === "undefined") {
|
|
1106
|
+
throw new client.AppwriteException('Missing required parameter: "required"');
|
|
1107
|
+
}
|
|
1108
|
+
const apiPath = "/tablesdb/{databaseId}/tables/{tableId}/columns/float".replace("{databaseId}", databaseId).replace("{tableId}", tableId);
|
|
1109
|
+
const payload = {};
|
|
1110
|
+
if (typeof key !== "undefined") {
|
|
1111
|
+
payload["key"] = key;
|
|
1112
|
+
}
|
|
1113
|
+
if (typeof required !== "undefined") {
|
|
1114
|
+
payload["required"] = required;
|
|
1115
|
+
}
|
|
1116
|
+
if (typeof min !== "undefined") {
|
|
1117
|
+
payload["min"] = min;
|
|
1118
|
+
}
|
|
1119
|
+
if (typeof max !== "undefined") {
|
|
1120
|
+
payload["max"] = max;
|
|
1121
|
+
}
|
|
1122
|
+
if (typeof xdefault !== "undefined") {
|
|
1123
|
+
payload["default"] = xdefault;
|
|
1124
|
+
}
|
|
1125
|
+
if (typeof array !== "undefined") {
|
|
1126
|
+
payload["array"] = array;
|
|
1127
|
+
}
|
|
1128
|
+
const uri = new URL(this.client.config.endpoint + apiPath);
|
|
1129
|
+
const apiHeaders = {
|
|
1130
|
+
"content-type": "application/json"
|
|
1131
|
+
};
|
|
1132
|
+
return this.client.call(
|
|
1133
|
+
"post",
|
|
1134
|
+
uri,
|
|
1135
|
+
apiHeaders,
|
|
1136
|
+
payload
|
|
1137
|
+
);
|
|
1138
|
+
}
|
|
1139
|
+
updateFloatColumn(paramsOrFirst, ...rest) {
|
|
1140
|
+
let params;
|
|
1141
|
+
if (paramsOrFirst && typeof paramsOrFirst === "object" && !Array.isArray(paramsOrFirst)) {
|
|
1142
|
+
params = paramsOrFirst || {};
|
|
1143
|
+
} else {
|
|
1144
|
+
params = {
|
|
1145
|
+
databaseId: paramsOrFirst,
|
|
1146
|
+
tableId: rest[0],
|
|
1147
|
+
key: rest[1],
|
|
1148
|
+
required: rest[2],
|
|
1149
|
+
xdefault: rest[3],
|
|
1150
|
+
min: rest[4],
|
|
1151
|
+
max: rest[5],
|
|
1152
|
+
newKey: rest[6]
|
|
1153
|
+
};
|
|
1154
|
+
}
|
|
1155
|
+
const databaseId = params.databaseId;
|
|
1156
|
+
const tableId = params.tableId;
|
|
1157
|
+
const key = params.key;
|
|
1158
|
+
const required = params.required;
|
|
1159
|
+
const xdefault = params.xdefault;
|
|
1160
|
+
const min = params.min;
|
|
1161
|
+
const max = params.max;
|
|
1162
|
+
const newKey = params.newKey;
|
|
1163
|
+
if (typeof databaseId === "undefined") {
|
|
1164
|
+
throw new client.AppwriteException('Missing required parameter: "databaseId"');
|
|
1165
|
+
}
|
|
1166
|
+
if (typeof tableId === "undefined") {
|
|
1167
|
+
throw new client.AppwriteException('Missing required parameter: "tableId"');
|
|
1168
|
+
}
|
|
1169
|
+
if (typeof key === "undefined") {
|
|
1170
|
+
throw new client.AppwriteException('Missing required parameter: "key"');
|
|
1171
|
+
}
|
|
1172
|
+
if (typeof required === "undefined") {
|
|
1173
|
+
throw new client.AppwriteException('Missing required parameter: "required"');
|
|
1174
|
+
}
|
|
1175
|
+
if (typeof xdefault === "undefined") {
|
|
1176
|
+
throw new client.AppwriteException('Missing required parameter: "xdefault"');
|
|
1177
|
+
}
|
|
1178
|
+
const apiPath = "/tablesdb/{databaseId}/tables/{tableId}/columns/float/{key}".replace("{databaseId}", databaseId).replace("{tableId}", tableId).replace("{key}", key);
|
|
1179
|
+
const payload = {};
|
|
1180
|
+
if (typeof required !== "undefined") {
|
|
1181
|
+
payload["required"] = required;
|
|
1182
|
+
}
|
|
1183
|
+
if (typeof min !== "undefined") {
|
|
1184
|
+
payload["min"] = min;
|
|
1185
|
+
}
|
|
1186
|
+
if (typeof max !== "undefined") {
|
|
1187
|
+
payload["max"] = max;
|
|
1188
|
+
}
|
|
1189
|
+
if (typeof xdefault !== "undefined") {
|
|
1190
|
+
payload["default"] = xdefault;
|
|
1191
|
+
}
|
|
1192
|
+
if (typeof newKey !== "undefined") {
|
|
1193
|
+
payload["newKey"] = newKey;
|
|
1194
|
+
}
|
|
1195
|
+
const uri = new URL(this.client.config.endpoint + apiPath);
|
|
1196
|
+
const apiHeaders = {
|
|
1197
|
+
"content-type": "application/json"
|
|
1198
|
+
};
|
|
1199
|
+
return this.client.call(
|
|
1200
|
+
"patch",
|
|
1201
|
+
uri,
|
|
1202
|
+
apiHeaders,
|
|
1203
|
+
payload
|
|
1204
|
+
);
|
|
1205
|
+
}
|
|
1206
|
+
createIntegerColumn(paramsOrFirst, ...rest) {
|
|
1207
|
+
let params;
|
|
1208
|
+
if (paramsOrFirst && typeof paramsOrFirst === "object" && !Array.isArray(paramsOrFirst)) {
|
|
1209
|
+
params = paramsOrFirst || {};
|
|
1210
|
+
} else {
|
|
1211
|
+
params = {
|
|
1212
|
+
databaseId: paramsOrFirst,
|
|
1213
|
+
tableId: rest[0],
|
|
1214
|
+
key: rest[1],
|
|
1215
|
+
required: rest[2],
|
|
1216
|
+
min: rest[3],
|
|
1217
|
+
max: rest[4],
|
|
1218
|
+
xdefault: rest[5],
|
|
1219
|
+
array: rest[6]
|
|
1220
|
+
};
|
|
1221
|
+
}
|
|
1222
|
+
const databaseId = params.databaseId;
|
|
1223
|
+
const tableId = params.tableId;
|
|
1224
|
+
const key = params.key;
|
|
1225
|
+
const required = params.required;
|
|
1226
|
+
const min = params.min;
|
|
1227
|
+
const max = params.max;
|
|
1228
|
+
const xdefault = params.xdefault;
|
|
1229
|
+
const array = params.array;
|
|
1230
|
+
if (typeof databaseId === "undefined") {
|
|
1231
|
+
throw new client.AppwriteException('Missing required parameter: "databaseId"');
|
|
1232
|
+
}
|
|
1233
|
+
if (typeof tableId === "undefined") {
|
|
1234
|
+
throw new client.AppwriteException('Missing required parameter: "tableId"');
|
|
1235
|
+
}
|
|
1236
|
+
if (typeof key === "undefined") {
|
|
1237
|
+
throw new client.AppwriteException('Missing required parameter: "key"');
|
|
1238
|
+
}
|
|
1239
|
+
if (typeof required === "undefined") {
|
|
1240
|
+
throw new client.AppwriteException('Missing required parameter: "required"');
|
|
1241
|
+
}
|
|
1242
|
+
const apiPath = "/tablesdb/{databaseId}/tables/{tableId}/columns/integer".replace("{databaseId}", databaseId).replace("{tableId}", tableId);
|
|
1243
|
+
const payload = {};
|
|
1244
|
+
if (typeof key !== "undefined") {
|
|
1245
|
+
payload["key"] = key;
|
|
1246
|
+
}
|
|
1247
|
+
if (typeof required !== "undefined") {
|
|
1248
|
+
payload["required"] = required;
|
|
1249
|
+
}
|
|
1250
|
+
if (typeof min !== "undefined") {
|
|
1251
|
+
payload["min"] = min;
|
|
1252
|
+
}
|
|
1253
|
+
if (typeof max !== "undefined") {
|
|
1254
|
+
payload["max"] = max;
|
|
1255
|
+
}
|
|
1256
|
+
if (typeof xdefault !== "undefined") {
|
|
1257
|
+
payload["default"] = xdefault;
|
|
1258
|
+
}
|
|
1259
|
+
if (typeof array !== "undefined") {
|
|
1260
|
+
payload["array"] = array;
|
|
1261
|
+
}
|
|
1262
|
+
const uri = new URL(this.client.config.endpoint + apiPath);
|
|
1263
|
+
const apiHeaders = {
|
|
1264
|
+
"content-type": "application/json"
|
|
1265
|
+
};
|
|
1266
|
+
return this.client.call(
|
|
1267
|
+
"post",
|
|
1268
|
+
uri,
|
|
1269
|
+
apiHeaders,
|
|
1270
|
+
payload
|
|
1271
|
+
);
|
|
1272
|
+
}
|
|
1273
|
+
updateIntegerColumn(paramsOrFirst, ...rest) {
|
|
1274
|
+
let params;
|
|
1275
|
+
if (paramsOrFirst && typeof paramsOrFirst === "object" && !Array.isArray(paramsOrFirst)) {
|
|
1276
|
+
params = paramsOrFirst || {};
|
|
1277
|
+
} else {
|
|
1278
|
+
params = {
|
|
1279
|
+
databaseId: paramsOrFirst,
|
|
1280
|
+
tableId: rest[0],
|
|
1281
|
+
key: rest[1],
|
|
1282
|
+
required: rest[2],
|
|
1283
|
+
xdefault: rest[3],
|
|
1284
|
+
min: rest[4],
|
|
1285
|
+
max: rest[5],
|
|
1286
|
+
newKey: rest[6]
|
|
1287
|
+
};
|
|
1288
|
+
}
|
|
1289
|
+
const databaseId = params.databaseId;
|
|
1290
|
+
const tableId = params.tableId;
|
|
1291
|
+
const key = params.key;
|
|
1292
|
+
const required = params.required;
|
|
1293
|
+
const xdefault = params.xdefault;
|
|
1294
|
+
const min = params.min;
|
|
1295
|
+
const max = params.max;
|
|
1296
|
+
const newKey = params.newKey;
|
|
1297
|
+
if (typeof databaseId === "undefined") {
|
|
1298
|
+
throw new client.AppwriteException('Missing required parameter: "databaseId"');
|
|
1299
|
+
}
|
|
1300
|
+
if (typeof tableId === "undefined") {
|
|
1301
|
+
throw new client.AppwriteException('Missing required parameter: "tableId"');
|
|
1302
|
+
}
|
|
1303
|
+
if (typeof key === "undefined") {
|
|
1304
|
+
throw new client.AppwriteException('Missing required parameter: "key"');
|
|
1305
|
+
}
|
|
1306
|
+
if (typeof required === "undefined") {
|
|
1307
|
+
throw new client.AppwriteException('Missing required parameter: "required"');
|
|
1308
|
+
}
|
|
1309
|
+
if (typeof xdefault === "undefined") {
|
|
1310
|
+
throw new client.AppwriteException('Missing required parameter: "xdefault"');
|
|
1311
|
+
}
|
|
1312
|
+
const apiPath = "/tablesdb/{databaseId}/tables/{tableId}/columns/integer/{key}".replace("{databaseId}", databaseId).replace("{tableId}", tableId).replace("{key}", key);
|
|
1313
|
+
const payload = {};
|
|
1314
|
+
if (typeof required !== "undefined") {
|
|
1315
|
+
payload["required"] = required;
|
|
1316
|
+
}
|
|
1317
|
+
if (typeof min !== "undefined") {
|
|
1318
|
+
payload["min"] = min;
|
|
1319
|
+
}
|
|
1320
|
+
if (typeof max !== "undefined") {
|
|
1321
|
+
payload["max"] = max;
|
|
1322
|
+
}
|
|
1323
|
+
if (typeof xdefault !== "undefined") {
|
|
1324
|
+
payload["default"] = xdefault;
|
|
1325
|
+
}
|
|
1326
|
+
if (typeof newKey !== "undefined") {
|
|
1327
|
+
payload["newKey"] = newKey;
|
|
1328
|
+
}
|
|
1329
|
+
const uri = new URL(this.client.config.endpoint + apiPath);
|
|
1330
|
+
const apiHeaders = {
|
|
1331
|
+
"content-type": "application/json"
|
|
1332
|
+
};
|
|
1333
|
+
return this.client.call(
|
|
1334
|
+
"patch",
|
|
1335
|
+
uri,
|
|
1336
|
+
apiHeaders,
|
|
1337
|
+
payload
|
|
1338
|
+
);
|
|
1339
|
+
}
|
|
1340
|
+
createIpColumn(paramsOrFirst, ...rest) {
|
|
1341
|
+
let params;
|
|
1342
|
+
if (paramsOrFirst && typeof paramsOrFirst === "object" && !Array.isArray(paramsOrFirst)) {
|
|
1343
|
+
params = paramsOrFirst || {};
|
|
1344
|
+
} else {
|
|
1345
|
+
params = {
|
|
1346
|
+
databaseId: paramsOrFirst,
|
|
1347
|
+
tableId: rest[0],
|
|
1348
|
+
key: rest[1],
|
|
1349
|
+
required: rest[2],
|
|
1350
|
+
xdefault: rest[3],
|
|
1351
|
+
array: rest[4]
|
|
1352
|
+
};
|
|
1353
|
+
}
|
|
1354
|
+
const databaseId = params.databaseId;
|
|
1355
|
+
const tableId = params.tableId;
|
|
1356
|
+
const key = params.key;
|
|
1357
|
+
const required = params.required;
|
|
1358
|
+
const xdefault = params.xdefault;
|
|
1359
|
+
const array = params.array;
|
|
1360
|
+
if (typeof databaseId === "undefined") {
|
|
1361
|
+
throw new client.AppwriteException('Missing required parameter: "databaseId"');
|
|
1362
|
+
}
|
|
1363
|
+
if (typeof tableId === "undefined") {
|
|
1364
|
+
throw new client.AppwriteException('Missing required parameter: "tableId"');
|
|
1365
|
+
}
|
|
1366
|
+
if (typeof key === "undefined") {
|
|
1367
|
+
throw new client.AppwriteException('Missing required parameter: "key"');
|
|
1368
|
+
}
|
|
1369
|
+
if (typeof required === "undefined") {
|
|
1370
|
+
throw new client.AppwriteException('Missing required parameter: "required"');
|
|
1371
|
+
}
|
|
1372
|
+
const apiPath = "/tablesdb/{databaseId}/tables/{tableId}/columns/ip".replace("{databaseId}", databaseId).replace("{tableId}", tableId);
|
|
1373
|
+
const payload = {};
|
|
1374
|
+
if (typeof key !== "undefined") {
|
|
1375
|
+
payload["key"] = key;
|
|
1376
|
+
}
|
|
1377
|
+
if (typeof required !== "undefined") {
|
|
1378
|
+
payload["required"] = required;
|
|
1379
|
+
}
|
|
1380
|
+
if (typeof xdefault !== "undefined") {
|
|
1381
|
+
payload["default"] = xdefault;
|
|
1382
|
+
}
|
|
1383
|
+
if (typeof array !== "undefined") {
|
|
1384
|
+
payload["array"] = array;
|
|
1385
|
+
}
|
|
1386
|
+
const uri = new URL(this.client.config.endpoint + apiPath);
|
|
1387
|
+
const apiHeaders = {
|
|
1388
|
+
"content-type": "application/json"
|
|
1389
|
+
};
|
|
1390
|
+
return this.client.call(
|
|
1391
|
+
"post",
|
|
1392
|
+
uri,
|
|
1393
|
+
apiHeaders,
|
|
1394
|
+
payload
|
|
1395
|
+
);
|
|
1396
|
+
}
|
|
1397
|
+
updateIpColumn(paramsOrFirst, ...rest) {
|
|
1398
|
+
let params;
|
|
1399
|
+
if (paramsOrFirst && typeof paramsOrFirst === "object" && !Array.isArray(paramsOrFirst)) {
|
|
1400
|
+
params = paramsOrFirst || {};
|
|
1401
|
+
} else {
|
|
1402
|
+
params = {
|
|
1403
|
+
databaseId: paramsOrFirst,
|
|
1404
|
+
tableId: rest[0],
|
|
1405
|
+
key: rest[1],
|
|
1406
|
+
required: rest[2],
|
|
1407
|
+
xdefault: rest[3],
|
|
1408
|
+
newKey: rest[4]
|
|
1409
|
+
};
|
|
1410
|
+
}
|
|
1411
|
+
const databaseId = params.databaseId;
|
|
1412
|
+
const tableId = params.tableId;
|
|
1413
|
+
const key = params.key;
|
|
1414
|
+
const required = params.required;
|
|
1415
|
+
const xdefault = params.xdefault;
|
|
1416
|
+
const newKey = params.newKey;
|
|
1417
|
+
if (typeof databaseId === "undefined") {
|
|
1418
|
+
throw new client.AppwriteException('Missing required parameter: "databaseId"');
|
|
1419
|
+
}
|
|
1420
|
+
if (typeof tableId === "undefined") {
|
|
1421
|
+
throw new client.AppwriteException('Missing required parameter: "tableId"');
|
|
1422
|
+
}
|
|
1423
|
+
if (typeof key === "undefined") {
|
|
1424
|
+
throw new client.AppwriteException('Missing required parameter: "key"');
|
|
1425
|
+
}
|
|
1426
|
+
if (typeof required === "undefined") {
|
|
1427
|
+
throw new client.AppwriteException('Missing required parameter: "required"');
|
|
1428
|
+
}
|
|
1429
|
+
if (typeof xdefault === "undefined") {
|
|
1430
|
+
throw new client.AppwriteException('Missing required parameter: "xdefault"');
|
|
1431
|
+
}
|
|
1432
|
+
const apiPath = "/tablesdb/{databaseId}/tables/{tableId}/columns/ip/{key}".replace("{databaseId}", databaseId).replace("{tableId}", tableId).replace("{key}", key);
|
|
1433
|
+
const payload = {};
|
|
1434
|
+
if (typeof required !== "undefined") {
|
|
1435
|
+
payload["required"] = required;
|
|
1436
|
+
}
|
|
1437
|
+
if (typeof xdefault !== "undefined") {
|
|
1438
|
+
payload["default"] = xdefault;
|
|
1439
|
+
}
|
|
1440
|
+
if (typeof newKey !== "undefined") {
|
|
1441
|
+
payload["newKey"] = newKey;
|
|
1442
|
+
}
|
|
1443
|
+
const uri = new URL(this.client.config.endpoint + apiPath);
|
|
1444
|
+
const apiHeaders = {
|
|
1445
|
+
"content-type": "application/json"
|
|
1446
|
+
};
|
|
1447
|
+
return this.client.call(
|
|
1448
|
+
"patch",
|
|
1449
|
+
uri,
|
|
1450
|
+
apiHeaders,
|
|
1451
|
+
payload
|
|
1452
|
+
);
|
|
1453
|
+
}
|
|
1454
|
+
createLineColumn(paramsOrFirst, ...rest) {
|
|
1455
|
+
let params;
|
|
1456
|
+
if (paramsOrFirst && typeof paramsOrFirst === "object" && !Array.isArray(paramsOrFirst)) {
|
|
1457
|
+
params = paramsOrFirst || {};
|
|
1458
|
+
} else {
|
|
1459
|
+
params = {
|
|
1460
|
+
databaseId: paramsOrFirst,
|
|
1461
|
+
tableId: rest[0],
|
|
1462
|
+
key: rest[1],
|
|
1463
|
+
required: rest[2],
|
|
1464
|
+
xdefault: rest[3]
|
|
1465
|
+
};
|
|
1466
|
+
}
|
|
1467
|
+
const databaseId = params.databaseId;
|
|
1468
|
+
const tableId = params.tableId;
|
|
1469
|
+
const key = params.key;
|
|
1470
|
+
const required = params.required;
|
|
1471
|
+
const xdefault = params.xdefault;
|
|
1472
|
+
if (typeof databaseId === "undefined") {
|
|
1473
|
+
throw new client.AppwriteException('Missing required parameter: "databaseId"');
|
|
1474
|
+
}
|
|
1475
|
+
if (typeof tableId === "undefined") {
|
|
1476
|
+
throw new client.AppwriteException('Missing required parameter: "tableId"');
|
|
1477
|
+
}
|
|
1478
|
+
if (typeof key === "undefined") {
|
|
1479
|
+
throw new client.AppwriteException('Missing required parameter: "key"');
|
|
1480
|
+
}
|
|
1481
|
+
if (typeof required === "undefined") {
|
|
1482
|
+
throw new client.AppwriteException('Missing required parameter: "required"');
|
|
1483
|
+
}
|
|
1484
|
+
const apiPath = "/tablesdb/{databaseId}/tables/{tableId}/columns/line".replace("{databaseId}", databaseId).replace("{tableId}", tableId);
|
|
1485
|
+
const payload = {};
|
|
1486
|
+
if (typeof key !== "undefined") {
|
|
1487
|
+
payload["key"] = key;
|
|
1488
|
+
}
|
|
1489
|
+
if (typeof required !== "undefined") {
|
|
1490
|
+
payload["required"] = required;
|
|
1491
|
+
}
|
|
1492
|
+
if (typeof xdefault !== "undefined") {
|
|
1493
|
+
payload["default"] = xdefault;
|
|
1494
|
+
}
|
|
1495
|
+
const uri = new URL(this.client.config.endpoint + apiPath);
|
|
1496
|
+
const apiHeaders = {
|
|
1497
|
+
"content-type": "application/json"
|
|
1498
|
+
};
|
|
1499
|
+
return this.client.call(
|
|
1500
|
+
"post",
|
|
1501
|
+
uri,
|
|
1502
|
+
apiHeaders,
|
|
1503
|
+
payload
|
|
1504
|
+
);
|
|
1505
|
+
}
|
|
1506
|
+
updateLineColumn(paramsOrFirst, ...rest) {
|
|
1507
|
+
let params;
|
|
1508
|
+
if (paramsOrFirst && typeof paramsOrFirst === "object" && !Array.isArray(paramsOrFirst)) {
|
|
1509
|
+
params = paramsOrFirst || {};
|
|
1510
|
+
} else {
|
|
1511
|
+
params = {
|
|
1512
|
+
databaseId: paramsOrFirst,
|
|
1513
|
+
tableId: rest[0],
|
|
1514
|
+
key: rest[1],
|
|
1515
|
+
required: rest[2],
|
|
1516
|
+
xdefault: rest[3],
|
|
1517
|
+
newKey: rest[4]
|
|
1518
|
+
};
|
|
1519
|
+
}
|
|
1520
|
+
const databaseId = params.databaseId;
|
|
1521
|
+
const tableId = params.tableId;
|
|
1522
|
+
const key = params.key;
|
|
1523
|
+
const required = params.required;
|
|
1524
|
+
const xdefault = params.xdefault;
|
|
1525
|
+
const newKey = params.newKey;
|
|
1526
|
+
if (typeof databaseId === "undefined") {
|
|
1527
|
+
throw new client.AppwriteException('Missing required parameter: "databaseId"');
|
|
1528
|
+
}
|
|
1529
|
+
if (typeof tableId === "undefined") {
|
|
1530
|
+
throw new client.AppwriteException('Missing required parameter: "tableId"');
|
|
1531
|
+
}
|
|
1532
|
+
if (typeof key === "undefined") {
|
|
1533
|
+
throw new client.AppwriteException('Missing required parameter: "key"');
|
|
1534
|
+
}
|
|
1535
|
+
if (typeof required === "undefined") {
|
|
1536
|
+
throw new client.AppwriteException('Missing required parameter: "required"');
|
|
1537
|
+
}
|
|
1538
|
+
const apiPath = "/tablesdb/{databaseId}/tables/{tableId}/columns/line/{key}".replace("{databaseId}", databaseId).replace("{tableId}", tableId).replace("{key}", key);
|
|
1539
|
+
const payload = {};
|
|
1540
|
+
if (typeof required !== "undefined") {
|
|
1541
|
+
payload["required"] = required;
|
|
1542
|
+
}
|
|
1543
|
+
if (typeof xdefault !== "undefined") {
|
|
1544
|
+
payload["default"] = xdefault;
|
|
1545
|
+
}
|
|
1546
|
+
if (typeof newKey !== "undefined") {
|
|
1547
|
+
payload["newKey"] = newKey;
|
|
1548
|
+
}
|
|
1549
|
+
const uri = new URL(this.client.config.endpoint + apiPath);
|
|
1550
|
+
const apiHeaders = {
|
|
1551
|
+
"content-type": "application/json"
|
|
1552
|
+
};
|
|
1553
|
+
return this.client.call(
|
|
1554
|
+
"patch",
|
|
1555
|
+
uri,
|
|
1556
|
+
apiHeaders,
|
|
1557
|
+
payload
|
|
1558
|
+
);
|
|
1559
|
+
}
|
|
1560
|
+
createPointColumn(paramsOrFirst, ...rest) {
|
|
1561
|
+
let params;
|
|
1562
|
+
if (paramsOrFirst && typeof paramsOrFirst === "object" && !Array.isArray(paramsOrFirst)) {
|
|
1563
|
+
params = paramsOrFirst || {};
|
|
1564
|
+
} else {
|
|
1565
|
+
params = {
|
|
1566
|
+
databaseId: paramsOrFirst,
|
|
1567
|
+
tableId: rest[0],
|
|
1568
|
+
key: rest[1],
|
|
1569
|
+
required: rest[2],
|
|
1570
|
+
xdefault: rest[3]
|
|
1571
|
+
};
|
|
1572
|
+
}
|
|
1573
|
+
const databaseId = params.databaseId;
|
|
1574
|
+
const tableId = params.tableId;
|
|
1575
|
+
const key = params.key;
|
|
1576
|
+
const required = params.required;
|
|
1577
|
+
const xdefault = params.xdefault;
|
|
1578
|
+
if (typeof databaseId === "undefined") {
|
|
1579
|
+
throw new client.AppwriteException('Missing required parameter: "databaseId"');
|
|
1580
|
+
}
|
|
1581
|
+
if (typeof tableId === "undefined") {
|
|
1582
|
+
throw new client.AppwriteException('Missing required parameter: "tableId"');
|
|
1583
|
+
}
|
|
1584
|
+
if (typeof key === "undefined") {
|
|
1585
|
+
throw new client.AppwriteException('Missing required parameter: "key"');
|
|
1586
|
+
}
|
|
1587
|
+
if (typeof required === "undefined") {
|
|
1588
|
+
throw new client.AppwriteException('Missing required parameter: "required"');
|
|
1589
|
+
}
|
|
1590
|
+
const apiPath = "/tablesdb/{databaseId}/tables/{tableId}/columns/point".replace("{databaseId}", databaseId).replace("{tableId}", tableId);
|
|
1591
|
+
const payload = {};
|
|
1592
|
+
if (typeof key !== "undefined") {
|
|
1593
|
+
payload["key"] = key;
|
|
1594
|
+
}
|
|
1595
|
+
if (typeof required !== "undefined") {
|
|
1596
|
+
payload["required"] = required;
|
|
1597
|
+
}
|
|
1598
|
+
if (typeof xdefault !== "undefined") {
|
|
1599
|
+
payload["default"] = xdefault;
|
|
1600
|
+
}
|
|
1601
|
+
const uri = new URL(this.client.config.endpoint + apiPath);
|
|
1602
|
+
const apiHeaders = {
|
|
1603
|
+
"content-type": "application/json"
|
|
1604
|
+
};
|
|
1605
|
+
return this.client.call(
|
|
1606
|
+
"post",
|
|
1607
|
+
uri,
|
|
1608
|
+
apiHeaders,
|
|
1609
|
+
payload
|
|
1610
|
+
);
|
|
1611
|
+
}
|
|
1612
|
+
updatePointColumn(paramsOrFirst, ...rest) {
|
|
1613
|
+
let params;
|
|
1614
|
+
if (paramsOrFirst && typeof paramsOrFirst === "object" && !Array.isArray(paramsOrFirst)) {
|
|
1615
|
+
params = paramsOrFirst || {};
|
|
1616
|
+
} else {
|
|
1617
|
+
params = {
|
|
1618
|
+
databaseId: paramsOrFirst,
|
|
1619
|
+
tableId: rest[0],
|
|
1620
|
+
key: rest[1],
|
|
1621
|
+
required: rest[2],
|
|
1622
|
+
xdefault: rest[3],
|
|
1623
|
+
newKey: rest[4]
|
|
1624
|
+
};
|
|
1625
|
+
}
|
|
1626
|
+
const databaseId = params.databaseId;
|
|
1627
|
+
const tableId = params.tableId;
|
|
1628
|
+
const key = params.key;
|
|
1629
|
+
const required = params.required;
|
|
1630
|
+
const xdefault = params.xdefault;
|
|
1631
|
+
const newKey = params.newKey;
|
|
1632
|
+
if (typeof databaseId === "undefined") {
|
|
1633
|
+
throw new client.AppwriteException('Missing required parameter: "databaseId"');
|
|
1634
|
+
}
|
|
1635
|
+
if (typeof tableId === "undefined") {
|
|
1636
|
+
throw new client.AppwriteException('Missing required parameter: "tableId"');
|
|
1637
|
+
}
|
|
1638
|
+
if (typeof key === "undefined") {
|
|
1639
|
+
throw new client.AppwriteException('Missing required parameter: "key"');
|
|
1640
|
+
}
|
|
1641
|
+
if (typeof required === "undefined") {
|
|
1642
|
+
throw new client.AppwriteException('Missing required parameter: "required"');
|
|
1643
|
+
}
|
|
1644
|
+
const apiPath = "/tablesdb/{databaseId}/tables/{tableId}/columns/point/{key}".replace("{databaseId}", databaseId).replace("{tableId}", tableId).replace("{key}", key);
|
|
1645
|
+
const payload = {};
|
|
1646
|
+
if (typeof required !== "undefined") {
|
|
1647
|
+
payload["required"] = required;
|
|
1648
|
+
}
|
|
1649
|
+
if (typeof xdefault !== "undefined") {
|
|
1650
|
+
payload["default"] = xdefault;
|
|
1651
|
+
}
|
|
1652
|
+
if (typeof newKey !== "undefined") {
|
|
1653
|
+
payload["newKey"] = newKey;
|
|
1654
|
+
}
|
|
1655
|
+
const uri = new URL(this.client.config.endpoint + apiPath);
|
|
1656
|
+
const apiHeaders = {
|
|
1657
|
+
"content-type": "application/json"
|
|
1658
|
+
};
|
|
1659
|
+
return this.client.call(
|
|
1660
|
+
"patch",
|
|
1661
|
+
uri,
|
|
1662
|
+
apiHeaders,
|
|
1663
|
+
payload
|
|
1664
|
+
);
|
|
1665
|
+
}
|
|
1666
|
+
createPolygonColumn(paramsOrFirst, ...rest) {
|
|
1667
|
+
let params;
|
|
1668
|
+
if (paramsOrFirst && typeof paramsOrFirst === "object" && !Array.isArray(paramsOrFirst)) {
|
|
1669
|
+
params = paramsOrFirst || {};
|
|
1670
|
+
} else {
|
|
1671
|
+
params = {
|
|
1672
|
+
databaseId: paramsOrFirst,
|
|
1673
|
+
tableId: rest[0],
|
|
1674
|
+
key: rest[1],
|
|
1675
|
+
required: rest[2],
|
|
1676
|
+
xdefault: rest[3]
|
|
1677
|
+
};
|
|
1678
|
+
}
|
|
1679
|
+
const databaseId = params.databaseId;
|
|
1680
|
+
const tableId = params.tableId;
|
|
1681
|
+
const key = params.key;
|
|
1682
|
+
const required = params.required;
|
|
1683
|
+
const xdefault = params.xdefault;
|
|
1684
|
+
if (typeof databaseId === "undefined") {
|
|
1685
|
+
throw new client.AppwriteException('Missing required parameter: "databaseId"');
|
|
1686
|
+
}
|
|
1687
|
+
if (typeof tableId === "undefined") {
|
|
1688
|
+
throw new client.AppwriteException('Missing required parameter: "tableId"');
|
|
1689
|
+
}
|
|
1690
|
+
if (typeof key === "undefined") {
|
|
1691
|
+
throw new client.AppwriteException('Missing required parameter: "key"');
|
|
1692
|
+
}
|
|
1693
|
+
if (typeof required === "undefined") {
|
|
1694
|
+
throw new client.AppwriteException('Missing required parameter: "required"');
|
|
1695
|
+
}
|
|
1696
|
+
const apiPath = "/tablesdb/{databaseId}/tables/{tableId}/columns/polygon".replace("{databaseId}", databaseId).replace("{tableId}", tableId);
|
|
1697
|
+
const payload = {};
|
|
1698
|
+
if (typeof key !== "undefined") {
|
|
1699
|
+
payload["key"] = key;
|
|
1700
|
+
}
|
|
1701
|
+
if (typeof required !== "undefined") {
|
|
1702
|
+
payload["required"] = required;
|
|
1703
|
+
}
|
|
1704
|
+
if (typeof xdefault !== "undefined") {
|
|
1705
|
+
payload["default"] = xdefault;
|
|
1706
|
+
}
|
|
1707
|
+
const uri = new URL(this.client.config.endpoint + apiPath);
|
|
1708
|
+
const apiHeaders = {
|
|
1709
|
+
"content-type": "application/json"
|
|
1710
|
+
};
|
|
1711
|
+
return this.client.call(
|
|
1712
|
+
"post",
|
|
1713
|
+
uri,
|
|
1714
|
+
apiHeaders,
|
|
1715
|
+
payload
|
|
1716
|
+
);
|
|
1717
|
+
}
|
|
1718
|
+
updatePolygonColumn(paramsOrFirst, ...rest) {
|
|
1719
|
+
let params;
|
|
1720
|
+
if (paramsOrFirst && typeof paramsOrFirst === "object" && !Array.isArray(paramsOrFirst)) {
|
|
1721
|
+
params = paramsOrFirst || {};
|
|
1722
|
+
} else {
|
|
1723
|
+
params = {
|
|
1724
|
+
databaseId: paramsOrFirst,
|
|
1725
|
+
tableId: rest[0],
|
|
1726
|
+
key: rest[1],
|
|
1727
|
+
required: rest[2],
|
|
1728
|
+
xdefault: rest[3],
|
|
1729
|
+
newKey: rest[4]
|
|
1730
|
+
};
|
|
1731
|
+
}
|
|
1732
|
+
const databaseId = params.databaseId;
|
|
1733
|
+
const tableId = params.tableId;
|
|
1734
|
+
const key = params.key;
|
|
1735
|
+
const required = params.required;
|
|
1736
|
+
const xdefault = params.xdefault;
|
|
1737
|
+
const newKey = params.newKey;
|
|
1738
|
+
if (typeof databaseId === "undefined") {
|
|
1739
|
+
throw new client.AppwriteException('Missing required parameter: "databaseId"');
|
|
1740
|
+
}
|
|
1741
|
+
if (typeof tableId === "undefined") {
|
|
1742
|
+
throw new client.AppwriteException('Missing required parameter: "tableId"');
|
|
1743
|
+
}
|
|
1744
|
+
if (typeof key === "undefined") {
|
|
1745
|
+
throw new client.AppwriteException('Missing required parameter: "key"');
|
|
1746
|
+
}
|
|
1747
|
+
if (typeof required === "undefined") {
|
|
1748
|
+
throw new client.AppwriteException('Missing required parameter: "required"');
|
|
1749
|
+
}
|
|
1750
|
+
const apiPath = "/tablesdb/{databaseId}/tables/{tableId}/columns/polygon/{key}".replace("{databaseId}", databaseId).replace("{tableId}", tableId).replace("{key}", key);
|
|
1751
|
+
const payload = {};
|
|
1752
|
+
if (typeof required !== "undefined") {
|
|
1753
|
+
payload["required"] = required;
|
|
1754
|
+
}
|
|
1755
|
+
if (typeof xdefault !== "undefined") {
|
|
1756
|
+
payload["default"] = xdefault;
|
|
1757
|
+
}
|
|
1758
|
+
if (typeof newKey !== "undefined") {
|
|
1759
|
+
payload["newKey"] = newKey;
|
|
1760
|
+
}
|
|
1761
|
+
const uri = new URL(this.client.config.endpoint + apiPath);
|
|
1762
|
+
const apiHeaders = {
|
|
1763
|
+
"content-type": "application/json"
|
|
1764
|
+
};
|
|
1765
|
+
return this.client.call(
|
|
1766
|
+
"patch",
|
|
1767
|
+
uri,
|
|
1768
|
+
apiHeaders,
|
|
1769
|
+
payload
|
|
1770
|
+
);
|
|
1771
|
+
}
|
|
1772
|
+
createRelationshipColumn(paramsOrFirst, ...rest) {
|
|
1773
|
+
let params;
|
|
1774
|
+
if (paramsOrFirst && typeof paramsOrFirst === "object" && !Array.isArray(paramsOrFirst)) {
|
|
1775
|
+
params = paramsOrFirst || {};
|
|
1776
|
+
} else {
|
|
1777
|
+
params = {
|
|
1778
|
+
databaseId: paramsOrFirst,
|
|
1779
|
+
tableId: rest[0],
|
|
1780
|
+
relatedTableId: rest[1],
|
|
1781
|
+
type: rest[2],
|
|
1782
|
+
twoWay: rest[3],
|
|
1783
|
+
key: rest[4],
|
|
1784
|
+
twoWayKey: rest[5],
|
|
1785
|
+
onDelete: rest[6]
|
|
1786
|
+
};
|
|
1787
|
+
}
|
|
1788
|
+
const databaseId = params.databaseId;
|
|
1789
|
+
const tableId = params.tableId;
|
|
1790
|
+
const relatedTableId = params.relatedTableId;
|
|
1791
|
+
const type = params.type;
|
|
1792
|
+
const twoWay = params.twoWay;
|
|
1793
|
+
const key = params.key;
|
|
1794
|
+
const twoWayKey = params.twoWayKey;
|
|
1795
|
+
const onDelete = params.onDelete;
|
|
1796
|
+
if (typeof databaseId === "undefined") {
|
|
1797
|
+
throw new client.AppwriteException('Missing required parameter: "databaseId"');
|
|
1798
|
+
}
|
|
1799
|
+
if (typeof tableId === "undefined") {
|
|
1800
|
+
throw new client.AppwriteException('Missing required parameter: "tableId"');
|
|
1801
|
+
}
|
|
1802
|
+
if (typeof relatedTableId === "undefined") {
|
|
1803
|
+
throw new client.AppwriteException('Missing required parameter: "relatedTableId"');
|
|
1804
|
+
}
|
|
1805
|
+
if (typeof type === "undefined") {
|
|
1806
|
+
throw new client.AppwriteException('Missing required parameter: "type"');
|
|
1807
|
+
}
|
|
1808
|
+
const apiPath = "/tablesdb/{databaseId}/tables/{tableId}/columns/relationship".replace("{databaseId}", databaseId).replace("{tableId}", tableId);
|
|
1809
|
+
const payload = {};
|
|
1810
|
+
if (typeof relatedTableId !== "undefined") {
|
|
1811
|
+
payload["relatedTableId"] = relatedTableId;
|
|
1812
|
+
}
|
|
1813
|
+
if (typeof type !== "undefined") {
|
|
1814
|
+
payload["type"] = type;
|
|
1815
|
+
}
|
|
1816
|
+
if (typeof twoWay !== "undefined") {
|
|
1817
|
+
payload["twoWay"] = twoWay;
|
|
1818
|
+
}
|
|
1819
|
+
if (typeof key !== "undefined") {
|
|
1820
|
+
payload["key"] = key;
|
|
1821
|
+
}
|
|
1822
|
+
if (typeof twoWayKey !== "undefined") {
|
|
1823
|
+
payload["twoWayKey"] = twoWayKey;
|
|
1824
|
+
}
|
|
1825
|
+
if (typeof onDelete !== "undefined") {
|
|
1826
|
+
payload["onDelete"] = onDelete;
|
|
1827
|
+
}
|
|
1828
|
+
const uri = new URL(this.client.config.endpoint + apiPath);
|
|
1829
|
+
const apiHeaders = {
|
|
1830
|
+
"content-type": "application/json"
|
|
1831
|
+
};
|
|
1832
|
+
return this.client.call(
|
|
1833
|
+
"post",
|
|
1834
|
+
uri,
|
|
1835
|
+
apiHeaders,
|
|
1836
|
+
payload
|
|
1837
|
+
);
|
|
1838
|
+
}
|
|
1839
|
+
createStringColumn(paramsOrFirst, ...rest) {
|
|
1840
|
+
let params;
|
|
1841
|
+
if (paramsOrFirst && typeof paramsOrFirst === "object" && !Array.isArray(paramsOrFirst)) {
|
|
1842
|
+
params = paramsOrFirst || {};
|
|
1843
|
+
} else {
|
|
1844
|
+
params = {
|
|
1845
|
+
databaseId: paramsOrFirst,
|
|
1846
|
+
tableId: rest[0],
|
|
1847
|
+
key: rest[1],
|
|
1848
|
+
size: rest[2],
|
|
1849
|
+
required: rest[3],
|
|
1850
|
+
xdefault: rest[4],
|
|
1851
|
+
array: rest[5],
|
|
1852
|
+
encrypt: rest[6]
|
|
1853
|
+
};
|
|
1854
|
+
}
|
|
1855
|
+
const databaseId = params.databaseId;
|
|
1856
|
+
const tableId = params.tableId;
|
|
1857
|
+
const key = params.key;
|
|
1858
|
+
const size = params.size;
|
|
1859
|
+
const required = params.required;
|
|
1860
|
+
const xdefault = params.xdefault;
|
|
1861
|
+
const array = params.array;
|
|
1862
|
+
const encrypt = params.encrypt;
|
|
1863
|
+
if (typeof databaseId === "undefined") {
|
|
1864
|
+
throw new client.AppwriteException('Missing required parameter: "databaseId"');
|
|
1865
|
+
}
|
|
1866
|
+
if (typeof tableId === "undefined") {
|
|
1867
|
+
throw new client.AppwriteException('Missing required parameter: "tableId"');
|
|
1868
|
+
}
|
|
1869
|
+
if (typeof key === "undefined") {
|
|
1870
|
+
throw new client.AppwriteException('Missing required parameter: "key"');
|
|
1871
|
+
}
|
|
1872
|
+
if (typeof size === "undefined") {
|
|
1873
|
+
throw new client.AppwriteException('Missing required parameter: "size"');
|
|
1874
|
+
}
|
|
1875
|
+
if (typeof required === "undefined") {
|
|
1876
|
+
throw new client.AppwriteException('Missing required parameter: "required"');
|
|
1877
|
+
}
|
|
1878
|
+
const apiPath = "/tablesdb/{databaseId}/tables/{tableId}/columns/string".replace("{databaseId}", databaseId).replace("{tableId}", tableId);
|
|
1879
|
+
const payload = {};
|
|
1880
|
+
if (typeof key !== "undefined") {
|
|
1881
|
+
payload["key"] = key;
|
|
1882
|
+
}
|
|
1883
|
+
if (typeof size !== "undefined") {
|
|
1884
|
+
payload["size"] = size;
|
|
1885
|
+
}
|
|
1886
|
+
if (typeof required !== "undefined") {
|
|
1887
|
+
payload["required"] = required;
|
|
1888
|
+
}
|
|
1889
|
+
if (typeof xdefault !== "undefined") {
|
|
1890
|
+
payload["default"] = xdefault;
|
|
1891
|
+
}
|
|
1892
|
+
if (typeof array !== "undefined") {
|
|
1893
|
+
payload["array"] = array;
|
|
1894
|
+
}
|
|
1895
|
+
if (typeof encrypt !== "undefined") {
|
|
1896
|
+
payload["encrypt"] = encrypt;
|
|
1897
|
+
}
|
|
1898
|
+
const uri = new URL(this.client.config.endpoint + apiPath);
|
|
1899
|
+
const apiHeaders = {
|
|
1900
|
+
"content-type": "application/json"
|
|
1901
|
+
};
|
|
1902
|
+
return this.client.call(
|
|
1903
|
+
"post",
|
|
1904
|
+
uri,
|
|
1905
|
+
apiHeaders,
|
|
1906
|
+
payload
|
|
1907
|
+
);
|
|
1908
|
+
}
|
|
1909
|
+
updateStringColumn(paramsOrFirst, ...rest) {
|
|
1910
|
+
let params;
|
|
1911
|
+
if (paramsOrFirst && typeof paramsOrFirst === "object" && !Array.isArray(paramsOrFirst)) {
|
|
1912
|
+
params = paramsOrFirst || {};
|
|
1913
|
+
} else {
|
|
1914
|
+
params = {
|
|
1915
|
+
databaseId: paramsOrFirst,
|
|
1916
|
+
tableId: rest[0],
|
|
1917
|
+
key: rest[1],
|
|
1918
|
+
required: rest[2],
|
|
1919
|
+
xdefault: rest[3],
|
|
1920
|
+
size: rest[4],
|
|
1921
|
+
newKey: rest[5]
|
|
1922
|
+
};
|
|
1923
|
+
}
|
|
1924
|
+
const databaseId = params.databaseId;
|
|
1925
|
+
const tableId = params.tableId;
|
|
1926
|
+
const key = params.key;
|
|
1927
|
+
const required = params.required;
|
|
1928
|
+
const xdefault = params.xdefault;
|
|
1929
|
+
const size = params.size;
|
|
1930
|
+
const newKey = params.newKey;
|
|
1931
|
+
if (typeof databaseId === "undefined") {
|
|
1932
|
+
throw new client.AppwriteException('Missing required parameter: "databaseId"');
|
|
1933
|
+
}
|
|
1934
|
+
if (typeof tableId === "undefined") {
|
|
1935
|
+
throw new client.AppwriteException('Missing required parameter: "tableId"');
|
|
1936
|
+
}
|
|
1937
|
+
if (typeof key === "undefined") {
|
|
1938
|
+
throw new client.AppwriteException('Missing required parameter: "key"');
|
|
1939
|
+
}
|
|
1940
|
+
if (typeof required === "undefined") {
|
|
1941
|
+
throw new client.AppwriteException('Missing required parameter: "required"');
|
|
1942
|
+
}
|
|
1943
|
+
if (typeof xdefault === "undefined") {
|
|
1944
|
+
throw new client.AppwriteException('Missing required parameter: "xdefault"');
|
|
1945
|
+
}
|
|
1946
|
+
const apiPath = "/tablesdb/{databaseId}/tables/{tableId}/columns/string/{key}".replace("{databaseId}", databaseId).replace("{tableId}", tableId).replace("{key}", key);
|
|
1947
|
+
const payload = {};
|
|
1948
|
+
if (typeof required !== "undefined") {
|
|
1949
|
+
payload["required"] = required;
|
|
1950
|
+
}
|
|
1951
|
+
if (typeof xdefault !== "undefined") {
|
|
1952
|
+
payload["default"] = xdefault;
|
|
1953
|
+
}
|
|
1954
|
+
if (typeof size !== "undefined") {
|
|
1955
|
+
payload["size"] = size;
|
|
1956
|
+
}
|
|
1957
|
+
if (typeof newKey !== "undefined") {
|
|
1958
|
+
payload["newKey"] = newKey;
|
|
1959
|
+
}
|
|
1960
|
+
const uri = new URL(this.client.config.endpoint + apiPath);
|
|
1961
|
+
const apiHeaders = {
|
|
1962
|
+
"content-type": "application/json"
|
|
1963
|
+
};
|
|
1964
|
+
return this.client.call(
|
|
1965
|
+
"patch",
|
|
1966
|
+
uri,
|
|
1967
|
+
apiHeaders,
|
|
1968
|
+
payload
|
|
1969
|
+
);
|
|
1970
|
+
}
|
|
1971
|
+
createUrlColumn(paramsOrFirst, ...rest) {
|
|
1972
|
+
let params;
|
|
1973
|
+
if (paramsOrFirst && typeof paramsOrFirst === "object" && !Array.isArray(paramsOrFirst)) {
|
|
1974
|
+
params = paramsOrFirst || {};
|
|
1975
|
+
} else {
|
|
1976
|
+
params = {
|
|
1977
|
+
databaseId: paramsOrFirst,
|
|
1978
|
+
tableId: rest[0],
|
|
1979
|
+
key: rest[1],
|
|
1980
|
+
required: rest[2],
|
|
1981
|
+
xdefault: rest[3],
|
|
1982
|
+
array: rest[4]
|
|
1983
|
+
};
|
|
1984
|
+
}
|
|
1985
|
+
const databaseId = params.databaseId;
|
|
1986
|
+
const tableId = params.tableId;
|
|
1987
|
+
const key = params.key;
|
|
1988
|
+
const required = params.required;
|
|
1989
|
+
const xdefault = params.xdefault;
|
|
1990
|
+
const array = params.array;
|
|
1991
|
+
if (typeof databaseId === "undefined") {
|
|
1992
|
+
throw new client.AppwriteException('Missing required parameter: "databaseId"');
|
|
1993
|
+
}
|
|
1994
|
+
if (typeof tableId === "undefined") {
|
|
1995
|
+
throw new client.AppwriteException('Missing required parameter: "tableId"');
|
|
1996
|
+
}
|
|
1997
|
+
if (typeof key === "undefined") {
|
|
1998
|
+
throw new client.AppwriteException('Missing required parameter: "key"');
|
|
1999
|
+
}
|
|
2000
|
+
if (typeof required === "undefined") {
|
|
2001
|
+
throw new client.AppwriteException('Missing required parameter: "required"');
|
|
2002
|
+
}
|
|
2003
|
+
const apiPath = "/tablesdb/{databaseId}/tables/{tableId}/columns/url".replace("{databaseId}", databaseId).replace("{tableId}", tableId);
|
|
2004
|
+
const payload = {};
|
|
2005
|
+
if (typeof key !== "undefined") {
|
|
2006
|
+
payload["key"] = key;
|
|
2007
|
+
}
|
|
2008
|
+
if (typeof required !== "undefined") {
|
|
2009
|
+
payload["required"] = required;
|
|
2010
|
+
}
|
|
2011
|
+
if (typeof xdefault !== "undefined") {
|
|
2012
|
+
payload["default"] = xdefault;
|
|
2013
|
+
}
|
|
2014
|
+
if (typeof array !== "undefined") {
|
|
2015
|
+
payload["array"] = array;
|
|
2016
|
+
}
|
|
2017
|
+
const uri = new URL(this.client.config.endpoint + apiPath);
|
|
2018
|
+
const apiHeaders = {
|
|
2019
|
+
"content-type": "application/json"
|
|
2020
|
+
};
|
|
2021
|
+
return this.client.call(
|
|
2022
|
+
"post",
|
|
2023
|
+
uri,
|
|
2024
|
+
apiHeaders,
|
|
2025
|
+
payload
|
|
2026
|
+
);
|
|
2027
|
+
}
|
|
2028
|
+
updateUrlColumn(paramsOrFirst, ...rest) {
|
|
2029
|
+
let params;
|
|
2030
|
+
if (paramsOrFirst && typeof paramsOrFirst === "object" && !Array.isArray(paramsOrFirst)) {
|
|
2031
|
+
params = paramsOrFirst || {};
|
|
2032
|
+
} else {
|
|
2033
|
+
params = {
|
|
2034
|
+
databaseId: paramsOrFirst,
|
|
2035
|
+
tableId: rest[0],
|
|
2036
|
+
key: rest[1],
|
|
2037
|
+
required: rest[2],
|
|
2038
|
+
xdefault: rest[3],
|
|
2039
|
+
newKey: rest[4]
|
|
2040
|
+
};
|
|
2041
|
+
}
|
|
2042
|
+
const databaseId = params.databaseId;
|
|
2043
|
+
const tableId = params.tableId;
|
|
2044
|
+
const key = params.key;
|
|
2045
|
+
const required = params.required;
|
|
2046
|
+
const xdefault = params.xdefault;
|
|
2047
|
+
const newKey = params.newKey;
|
|
2048
|
+
if (typeof databaseId === "undefined") {
|
|
2049
|
+
throw new client.AppwriteException('Missing required parameter: "databaseId"');
|
|
2050
|
+
}
|
|
2051
|
+
if (typeof tableId === "undefined") {
|
|
2052
|
+
throw new client.AppwriteException('Missing required parameter: "tableId"');
|
|
2053
|
+
}
|
|
2054
|
+
if (typeof key === "undefined") {
|
|
2055
|
+
throw new client.AppwriteException('Missing required parameter: "key"');
|
|
2056
|
+
}
|
|
2057
|
+
if (typeof required === "undefined") {
|
|
2058
|
+
throw new client.AppwriteException('Missing required parameter: "required"');
|
|
2059
|
+
}
|
|
2060
|
+
if (typeof xdefault === "undefined") {
|
|
2061
|
+
throw new client.AppwriteException('Missing required parameter: "xdefault"');
|
|
2062
|
+
}
|
|
2063
|
+
const apiPath = "/tablesdb/{databaseId}/tables/{tableId}/columns/url/{key}".replace("{databaseId}", databaseId).replace("{tableId}", tableId).replace("{key}", key);
|
|
2064
|
+
const payload = {};
|
|
2065
|
+
if (typeof required !== "undefined") {
|
|
2066
|
+
payload["required"] = required;
|
|
2067
|
+
}
|
|
2068
|
+
if (typeof xdefault !== "undefined") {
|
|
2069
|
+
payload["default"] = xdefault;
|
|
2070
|
+
}
|
|
2071
|
+
if (typeof newKey !== "undefined") {
|
|
2072
|
+
payload["newKey"] = newKey;
|
|
2073
|
+
}
|
|
2074
|
+
const uri = new URL(this.client.config.endpoint + apiPath);
|
|
2075
|
+
const apiHeaders = {
|
|
2076
|
+
"content-type": "application/json"
|
|
2077
|
+
};
|
|
2078
|
+
return this.client.call(
|
|
2079
|
+
"patch",
|
|
2080
|
+
uri,
|
|
2081
|
+
apiHeaders,
|
|
2082
|
+
payload
|
|
2083
|
+
);
|
|
2084
|
+
}
|
|
2085
|
+
getColumn(paramsOrFirst, ...rest) {
|
|
2086
|
+
let params;
|
|
2087
|
+
if (paramsOrFirst && typeof paramsOrFirst === "object" && !Array.isArray(paramsOrFirst)) {
|
|
2088
|
+
params = paramsOrFirst || {};
|
|
2089
|
+
} else {
|
|
2090
|
+
params = {
|
|
2091
|
+
databaseId: paramsOrFirst,
|
|
2092
|
+
tableId: rest[0],
|
|
2093
|
+
key: rest[1]
|
|
2094
|
+
};
|
|
2095
|
+
}
|
|
2096
|
+
const databaseId = params.databaseId;
|
|
2097
|
+
const tableId = params.tableId;
|
|
2098
|
+
const key = params.key;
|
|
2099
|
+
if (typeof databaseId === "undefined") {
|
|
2100
|
+
throw new client.AppwriteException('Missing required parameter: "databaseId"');
|
|
2101
|
+
}
|
|
2102
|
+
if (typeof tableId === "undefined") {
|
|
2103
|
+
throw new client.AppwriteException('Missing required parameter: "tableId"');
|
|
2104
|
+
}
|
|
2105
|
+
if (typeof key === "undefined") {
|
|
2106
|
+
throw new client.AppwriteException('Missing required parameter: "key"');
|
|
2107
|
+
}
|
|
2108
|
+
const apiPath = "/tablesdb/{databaseId}/tables/{tableId}/columns/{key}".replace("{databaseId}", databaseId).replace("{tableId}", tableId).replace("{key}", key);
|
|
2109
|
+
const payload = {};
|
|
2110
|
+
const uri = new URL(this.client.config.endpoint + apiPath);
|
|
2111
|
+
const apiHeaders = {};
|
|
2112
|
+
return this.client.call(
|
|
2113
|
+
"get",
|
|
2114
|
+
uri,
|
|
2115
|
+
apiHeaders,
|
|
2116
|
+
payload
|
|
2117
|
+
);
|
|
2118
|
+
}
|
|
2119
|
+
deleteColumn(paramsOrFirst, ...rest) {
|
|
2120
|
+
let params;
|
|
2121
|
+
if (paramsOrFirst && typeof paramsOrFirst === "object" && !Array.isArray(paramsOrFirst)) {
|
|
2122
|
+
params = paramsOrFirst || {};
|
|
2123
|
+
} else {
|
|
2124
|
+
params = {
|
|
2125
|
+
databaseId: paramsOrFirst,
|
|
2126
|
+
tableId: rest[0],
|
|
2127
|
+
key: rest[1]
|
|
2128
|
+
};
|
|
2129
|
+
}
|
|
2130
|
+
const databaseId = params.databaseId;
|
|
2131
|
+
const tableId = params.tableId;
|
|
2132
|
+
const key = params.key;
|
|
2133
|
+
if (typeof databaseId === "undefined") {
|
|
2134
|
+
throw new client.AppwriteException('Missing required parameter: "databaseId"');
|
|
2135
|
+
}
|
|
2136
|
+
if (typeof tableId === "undefined") {
|
|
2137
|
+
throw new client.AppwriteException('Missing required parameter: "tableId"');
|
|
2138
|
+
}
|
|
2139
|
+
if (typeof key === "undefined") {
|
|
2140
|
+
throw new client.AppwriteException('Missing required parameter: "key"');
|
|
2141
|
+
}
|
|
2142
|
+
const apiPath = "/tablesdb/{databaseId}/tables/{tableId}/columns/{key}".replace("{databaseId}", databaseId).replace("{tableId}", tableId).replace("{key}", key);
|
|
2143
|
+
const payload = {};
|
|
2144
|
+
const uri = new URL(this.client.config.endpoint + apiPath);
|
|
2145
|
+
const apiHeaders = {
|
|
2146
|
+
"content-type": "application/json"
|
|
2147
|
+
};
|
|
2148
|
+
return this.client.call(
|
|
2149
|
+
"delete",
|
|
2150
|
+
uri,
|
|
2151
|
+
apiHeaders,
|
|
2152
|
+
payload
|
|
2153
|
+
);
|
|
2154
|
+
}
|
|
2155
|
+
updateRelationshipColumn(paramsOrFirst, ...rest) {
|
|
2156
|
+
let params;
|
|
2157
|
+
if (paramsOrFirst && typeof paramsOrFirst === "object" && !Array.isArray(paramsOrFirst)) {
|
|
2158
|
+
params = paramsOrFirst || {};
|
|
2159
|
+
} else {
|
|
2160
|
+
params = {
|
|
2161
|
+
databaseId: paramsOrFirst,
|
|
2162
|
+
tableId: rest[0],
|
|
2163
|
+
key: rest[1],
|
|
2164
|
+
onDelete: rest[2],
|
|
2165
|
+
newKey: rest[3]
|
|
2166
|
+
};
|
|
2167
|
+
}
|
|
2168
|
+
const databaseId = params.databaseId;
|
|
2169
|
+
const tableId = params.tableId;
|
|
2170
|
+
const key = params.key;
|
|
2171
|
+
const onDelete = params.onDelete;
|
|
2172
|
+
const newKey = params.newKey;
|
|
2173
|
+
if (typeof databaseId === "undefined") {
|
|
2174
|
+
throw new client.AppwriteException('Missing required parameter: "databaseId"');
|
|
2175
|
+
}
|
|
2176
|
+
if (typeof tableId === "undefined") {
|
|
2177
|
+
throw new client.AppwriteException('Missing required parameter: "tableId"');
|
|
2178
|
+
}
|
|
2179
|
+
if (typeof key === "undefined") {
|
|
2180
|
+
throw new client.AppwriteException('Missing required parameter: "key"');
|
|
2181
|
+
}
|
|
2182
|
+
const apiPath = "/tablesdb/{databaseId}/tables/{tableId}/columns/{key}/relationship".replace("{databaseId}", databaseId).replace("{tableId}", tableId).replace("{key}", key);
|
|
2183
|
+
const payload = {};
|
|
2184
|
+
if (typeof onDelete !== "undefined") {
|
|
2185
|
+
payload["onDelete"] = onDelete;
|
|
2186
|
+
}
|
|
2187
|
+
if (typeof newKey !== "undefined") {
|
|
2188
|
+
payload["newKey"] = newKey;
|
|
2189
|
+
}
|
|
2190
|
+
const uri = new URL(this.client.config.endpoint + apiPath);
|
|
2191
|
+
const apiHeaders = {
|
|
2192
|
+
"content-type": "application/json"
|
|
2193
|
+
};
|
|
2194
|
+
return this.client.call(
|
|
2195
|
+
"patch",
|
|
2196
|
+
uri,
|
|
2197
|
+
apiHeaders,
|
|
2198
|
+
payload
|
|
2199
|
+
);
|
|
2200
|
+
}
|
|
2201
|
+
listIndexes(paramsOrFirst, ...rest) {
|
|
2202
|
+
let params;
|
|
2203
|
+
if (paramsOrFirst && typeof paramsOrFirst === "object" && !Array.isArray(paramsOrFirst)) {
|
|
2204
|
+
params = paramsOrFirst || {};
|
|
2205
|
+
} else {
|
|
2206
|
+
params = {
|
|
2207
|
+
databaseId: paramsOrFirst,
|
|
2208
|
+
tableId: rest[0],
|
|
2209
|
+
queries: rest[1],
|
|
2210
|
+
total: rest[2]
|
|
2211
|
+
};
|
|
2212
|
+
}
|
|
2213
|
+
const databaseId = params.databaseId;
|
|
2214
|
+
const tableId = params.tableId;
|
|
2215
|
+
const queries = params.queries;
|
|
2216
|
+
const total = params.total;
|
|
2217
|
+
if (typeof databaseId === "undefined") {
|
|
2218
|
+
throw new client.AppwriteException('Missing required parameter: "databaseId"');
|
|
2219
|
+
}
|
|
2220
|
+
if (typeof tableId === "undefined") {
|
|
2221
|
+
throw new client.AppwriteException('Missing required parameter: "tableId"');
|
|
2222
|
+
}
|
|
2223
|
+
const apiPath = "/tablesdb/{databaseId}/tables/{tableId}/indexes".replace("{databaseId}", databaseId).replace("{tableId}", tableId);
|
|
2224
|
+
const payload = {};
|
|
2225
|
+
if (typeof queries !== "undefined") {
|
|
2226
|
+
payload["queries"] = queries;
|
|
2227
|
+
}
|
|
2228
|
+
if (typeof total !== "undefined") {
|
|
2229
|
+
payload["total"] = total;
|
|
2230
|
+
}
|
|
2231
|
+
const uri = new URL(this.client.config.endpoint + apiPath);
|
|
2232
|
+
const apiHeaders = {};
|
|
2233
|
+
return this.client.call(
|
|
2234
|
+
"get",
|
|
2235
|
+
uri,
|
|
2236
|
+
apiHeaders,
|
|
2237
|
+
payload
|
|
2238
|
+
);
|
|
2239
|
+
}
|
|
2240
|
+
createIndex(paramsOrFirst, ...rest) {
|
|
2241
|
+
let params;
|
|
2242
|
+
if (paramsOrFirst && typeof paramsOrFirst === "object" && !Array.isArray(paramsOrFirst)) {
|
|
2243
|
+
params = paramsOrFirst || {};
|
|
2244
|
+
} else {
|
|
2245
|
+
params = {
|
|
2246
|
+
databaseId: paramsOrFirst,
|
|
2247
|
+
tableId: rest[0],
|
|
2248
|
+
key: rest[1],
|
|
2249
|
+
type: rest[2],
|
|
2250
|
+
columns: rest[3],
|
|
2251
|
+
orders: rest[4],
|
|
2252
|
+
lengths: rest[5]
|
|
2253
|
+
};
|
|
2254
|
+
}
|
|
2255
|
+
const databaseId = params.databaseId;
|
|
2256
|
+
const tableId = params.tableId;
|
|
2257
|
+
const key = params.key;
|
|
2258
|
+
const type = params.type;
|
|
2259
|
+
const columns = params.columns;
|
|
2260
|
+
const orders = params.orders;
|
|
2261
|
+
const lengths = params.lengths;
|
|
2262
|
+
if (typeof databaseId === "undefined") {
|
|
2263
|
+
throw new client.AppwriteException('Missing required parameter: "databaseId"');
|
|
2264
|
+
}
|
|
2265
|
+
if (typeof tableId === "undefined") {
|
|
2266
|
+
throw new client.AppwriteException('Missing required parameter: "tableId"');
|
|
2267
|
+
}
|
|
2268
|
+
if (typeof key === "undefined") {
|
|
2269
|
+
throw new client.AppwriteException('Missing required parameter: "key"');
|
|
2270
|
+
}
|
|
2271
|
+
if (typeof type === "undefined") {
|
|
2272
|
+
throw new client.AppwriteException('Missing required parameter: "type"');
|
|
2273
|
+
}
|
|
2274
|
+
if (typeof columns === "undefined") {
|
|
2275
|
+
throw new client.AppwriteException('Missing required parameter: "columns"');
|
|
2276
|
+
}
|
|
2277
|
+
const apiPath = "/tablesdb/{databaseId}/tables/{tableId}/indexes".replace("{databaseId}", databaseId).replace("{tableId}", tableId);
|
|
2278
|
+
const payload = {};
|
|
2279
|
+
if (typeof key !== "undefined") {
|
|
2280
|
+
payload["key"] = key;
|
|
2281
|
+
}
|
|
2282
|
+
if (typeof type !== "undefined") {
|
|
2283
|
+
payload["type"] = type;
|
|
2284
|
+
}
|
|
2285
|
+
if (typeof columns !== "undefined") {
|
|
2286
|
+
payload["columns"] = columns;
|
|
2287
|
+
}
|
|
2288
|
+
if (typeof orders !== "undefined") {
|
|
2289
|
+
payload["orders"] = orders;
|
|
2290
|
+
}
|
|
2291
|
+
if (typeof lengths !== "undefined") {
|
|
2292
|
+
payload["lengths"] = lengths;
|
|
2293
|
+
}
|
|
2294
|
+
const uri = new URL(this.client.config.endpoint + apiPath);
|
|
2295
|
+
const apiHeaders = {
|
|
2296
|
+
"content-type": "application/json"
|
|
2297
|
+
};
|
|
2298
|
+
return this.client.call(
|
|
2299
|
+
"post",
|
|
2300
|
+
uri,
|
|
2301
|
+
apiHeaders,
|
|
2302
|
+
payload
|
|
2303
|
+
);
|
|
2304
|
+
}
|
|
2305
|
+
getIndex(paramsOrFirst, ...rest) {
|
|
2306
|
+
let params;
|
|
2307
|
+
if (paramsOrFirst && typeof paramsOrFirst === "object" && !Array.isArray(paramsOrFirst)) {
|
|
2308
|
+
params = paramsOrFirst || {};
|
|
2309
|
+
} else {
|
|
2310
|
+
params = {
|
|
2311
|
+
databaseId: paramsOrFirst,
|
|
2312
|
+
tableId: rest[0],
|
|
2313
|
+
key: rest[1]
|
|
2314
|
+
};
|
|
2315
|
+
}
|
|
2316
|
+
const databaseId = params.databaseId;
|
|
2317
|
+
const tableId = params.tableId;
|
|
2318
|
+
const key = params.key;
|
|
2319
|
+
if (typeof databaseId === "undefined") {
|
|
2320
|
+
throw new client.AppwriteException('Missing required parameter: "databaseId"');
|
|
2321
|
+
}
|
|
2322
|
+
if (typeof tableId === "undefined") {
|
|
2323
|
+
throw new client.AppwriteException('Missing required parameter: "tableId"');
|
|
2324
|
+
}
|
|
2325
|
+
if (typeof key === "undefined") {
|
|
2326
|
+
throw new client.AppwriteException('Missing required parameter: "key"');
|
|
2327
|
+
}
|
|
2328
|
+
const apiPath = "/tablesdb/{databaseId}/tables/{tableId}/indexes/{key}".replace("{databaseId}", databaseId).replace("{tableId}", tableId).replace("{key}", key);
|
|
2329
|
+
const payload = {};
|
|
2330
|
+
const uri = new URL(this.client.config.endpoint + apiPath);
|
|
2331
|
+
const apiHeaders = {};
|
|
2332
|
+
return this.client.call(
|
|
2333
|
+
"get",
|
|
2334
|
+
uri,
|
|
2335
|
+
apiHeaders,
|
|
2336
|
+
payload
|
|
2337
|
+
);
|
|
2338
|
+
}
|
|
2339
|
+
deleteIndex(paramsOrFirst, ...rest) {
|
|
2340
|
+
let params;
|
|
2341
|
+
if (paramsOrFirst && typeof paramsOrFirst === "object" && !Array.isArray(paramsOrFirst)) {
|
|
2342
|
+
params = paramsOrFirst || {};
|
|
2343
|
+
} else {
|
|
2344
|
+
params = {
|
|
2345
|
+
databaseId: paramsOrFirst,
|
|
2346
|
+
tableId: rest[0],
|
|
2347
|
+
key: rest[1]
|
|
2348
|
+
};
|
|
2349
|
+
}
|
|
2350
|
+
const databaseId = params.databaseId;
|
|
2351
|
+
const tableId = params.tableId;
|
|
2352
|
+
const key = params.key;
|
|
2353
|
+
if (typeof databaseId === "undefined") {
|
|
2354
|
+
throw new client.AppwriteException('Missing required parameter: "databaseId"');
|
|
2355
|
+
}
|
|
2356
|
+
if (typeof tableId === "undefined") {
|
|
2357
|
+
throw new client.AppwriteException('Missing required parameter: "tableId"');
|
|
2358
|
+
}
|
|
2359
|
+
if (typeof key === "undefined") {
|
|
2360
|
+
throw new client.AppwriteException('Missing required parameter: "key"');
|
|
2361
|
+
}
|
|
2362
|
+
const apiPath = "/tablesdb/{databaseId}/tables/{tableId}/indexes/{key}".replace("{databaseId}", databaseId).replace("{tableId}", tableId).replace("{key}", key);
|
|
2363
|
+
const payload = {};
|
|
2364
|
+
const uri = new URL(this.client.config.endpoint + apiPath);
|
|
2365
|
+
const apiHeaders = {
|
|
2366
|
+
"content-type": "application/json"
|
|
2367
|
+
};
|
|
2368
|
+
return this.client.call(
|
|
2369
|
+
"delete",
|
|
2370
|
+
uri,
|
|
2371
|
+
apiHeaders,
|
|
2372
|
+
payload
|
|
2373
|
+
);
|
|
2374
|
+
}
|
|
2375
|
+
listRows(paramsOrFirst, ...rest) {
|
|
2376
|
+
let params;
|
|
2377
|
+
if (paramsOrFirst && typeof paramsOrFirst === "object" && !Array.isArray(paramsOrFirst)) {
|
|
2378
|
+
params = paramsOrFirst || {};
|
|
2379
|
+
} else {
|
|
2380
|
+
params = {
|
|
2381
|
+
databaseId: paramsOrFirst,
|
|
2382
|
+
tableId: rest[0],
|
|
2383
|
+
queries: rest[1],
|
|
2384
|
+
transactionId: rest[2],
|
|
2385
|
+
total: rest[3]
|
|
2386
|
+
};
|
|
2387
|
+
}
|
|
2388
|
+
const databaseId = params.databaseId;
|
|
2389
|
+
const tableId = params.tableId;
|
|
2390
|
+
const queries = params.queries;
|
|
2391
|
+
const transactionId = params.transactionId;
|
|
2392
|
+
const total = params.total;
|
|
2393
|
+
if (typeof databaseId === "undefined") {
|
|
2394
|
+
throw new client.AppwriteException('Missing required parameter: "databaseId"');
|
|
2395
|
+
}
|
|
2396
|
+
if (typeof tableId === "undefined") {
|
|
2397
|
+
throw new client.AppwriteException('Missing required parameter: "tableId"');
|
|
2398
|
+
}
|
|
2399
|
+
const apiPath = "/tablesdb/{databaseId}/tables/{tableId}/rows".replace("{databaseId}", databaseId).replace("{tableId}", tableId);
|
|
2400
|
+
const payload = {};
|
|
2401
|
+
if (typeof queries !== "undefined") {
|
|
2402
|
+
payload["queries"] = queries;
|
|
2403
|
+
}
|
|
2404
|
+
if (typeof transactionId !== "undefined") {
|
|
2405
|
+
payload["transactionId"] = transactionId;
|
|
2406
|
+
}
|
|
2407
|
+
if (typeof total !== "undefined") {
|
|
2408
|
+
payload["total"] = total;
|
|
2409
|
+
}
|
|
2410
|
+
const uri = new URL(this.client.config.endpoint + apiPath);
|
|
2411
|
+
const apiHeaders = {};
|
|
2412
|
+
return this.client.call(
|
|
2413
|
+
"get",
|
|
2414
|
+
uri,
|
|
2415
|
+
apiHeaders,
|
|
2416
|
+
payload
|
|
2417
|
+
);
|
|
2418
|
+
}
|
|
2419
|
+
createRow(paramsOrFirst, ...rest) {
|
|
2420
|
+
let params;
|
|
2421
|
+
if (paramsOrFirst && typeof paramsOrFirst === "object" && !Array.isArray(paramsOrFirst)) {
|
|
2422
|
+
params = paramsOrFirst || {};
|
|
2423
|
+
} else {
|
|
2424
|
+
params = {
|
|
2425
|
+
databaseId: paramsOrFirst,
|
|
2426
|
+
tableId: rest[0],
|
|
2427
|
+
rowId: rest[1],
|
|
2428
|
+
data: rest[2],
|
|
2429
|
+
permissions: rest[3],
|
|
2430
|
+
transactionId: rest[4]
|
|
2431
|
+
};
|
|
2432
|
+
}
|
|
2433
|
+
const databaseId = params.databaseId;
|
|
2434
|
+
const tableId = params.tableId;
|
|
2435
|
+
const rowId = params.rowId;
|
|
2436
|
+
const data = params.data;
|
|
2437
|
+
const permissions = params.permissions;
|
|
2438
|
+
const transactionId = params.transactionId;
|
|
2439
|
+
if (typeof databaseId === "undefined") {
|
|
2440
|
+
throw new client.AppwriteException('Missing required parameter: "databaseId"');
|
|
2441
|
+
}
|
|
2442
|
+
if (typeof tableId === "undefined") {
|
|
2443
|
+
throw new client.AppwriteException('Missing required parameter: "tableId"');
|
|
2444
|
+
}
|
|
2445
|
+
if (typeof rowId === "undefined") {
|
|
2446
|
+
throw new client.AppwriteException('Missing required parameter: "rowId"');
|
|
2447
|
+
}
|
|
2448
|
+
if (typeof data === "undefined") {
|
|
2449
|
+
throw new client.AppwriteException('Missing required parameter: "data"');
|
|
2450
|
+
}
|
|
2451
|
+
const apiPath = "/tablesdb/{databaseId}/tables/{tableId}/rows".replace("{databaseId}", databaseId).replace("{tableId}", tableId);
|
|
2452
|
+
const payload = {};
|
|
2453
|
+
if (typeof rowId !== "undefined") {
|
|
2454
|
+
payload["rowId"] = rowId;
|
|
2455
|
+
}
|
|
2456
|
+
if (typeof data !== "undefined") {
|
|
2457
|
+
payload["data"] = data;
|
|
2458
|
+
}
|
|
2459
|
+
if (typeof permissions !== "undefined") {
|
|
2460
|
+
payload["permissions"] = permissions;
|
|
2461
|
+
}
|
|
2462
|
+
if (typeof transactionId !== "undefined") {
|
|
2463
|
+
payload["transactionId"] = transactionId;
|
|
2464
|
+
}
|
|
2465
|
+
const uri = new URL(this.client.config.endpoint + apiPath);
|
|
2466
|
+
const apiHeaders = {
|
|
2467
|
+
"content-type": "application/json"
|
|
2468
|
+
};
|
|
2469
|
+
return this.client.call(
|
|
2470
|
+
"post",
|
|
2471
|
+
uri,
|
|
2472
|
+
apiHeaders,
|
|
2473
|
+
payload
|
|
2474
|
+
);
|
|
2475
|
+
}
|
|
2476
|
+
createRows(paramsOrFirst, ...rest) {
|
|
2477
|
+
let params;
|
|
2478
|
+
if (paramsOrFirst && typeof paramsOrFirst === "object" && !Array.isArray(paramsOrFirst)) {
|
|
2479
|
+
params = paramsOrFirst || {};
|
|
2480
|
+
} else {
|
|
2481
|
+
params = {
|
|
2482
|
+
databaseId: paramsOrFirst,
|
|
2483
|
+
tableId: rest[0],
|
|
2484
|
+
rows: rest[1],
|
|
2485
|
+
transactionId: rest[2]
|
|
2486
|
+
};
|
|
2487
|
+
}
|
|
2488
|
+
const databaseId = params.databaseId;
|
|
2489
|
+
const tableId = params.tableId;
|
|
2490
|
+
const rows = params.rows;
|
|
2491
|
+
const transactionId = params.transactionId;
|
|
2492
|
+
if (typeof databaseId === "undefined") {
|
|
2493
|
+
throw new client.AppwriteException('Missing required parameter: "databaseId"');
|
|
2494
|
+
}
|
|
2495
|
+
if (typeof tableId === "undefined") {
|
|
2496
|
+
throw new client.AppwriteException('Missing required parameter: "tableId"');
|
|
2497
|
+
}
|
|
2498
|
+
if (typeof rows === "undefined") {
|
|
2499
|
+
throw new client.AppwriteException('Missing required parameter: "rows"');
|
|
2500
|
+
}
|
|
2501
|
+
const apiPath = "/tablesdb/{databaseId}/tables/{tableId}/rows".replace("{databaseId}", databaseId).replace("{tableId}", tableId);
|
|
2502
|
+
const payload = {};
|
|
2503
|
+
if (typeof rows !== "undefined") {
|
|
2504
|
+
payload["rows"] = rows;
|
|
2505
|
+
}
|
|
2506
|
+
if (typeof transactionId !== "undefined") {
|
|
2507
|
+
payload["transactionId"] = transactionId;
|
|
2508
|
+
}
|
|
2509
|
+
const uri = new URL(this.client.config.endpoint + apiPath);
|
|
2510
|
+
const apiHeaders = {
|
|
2511
|
+
"content-type": "application/json"
|
|
2512
|
+
};
|
|
2513
|
+
return this.client.call(
|
|
2514
|
+
"post",
|
|
2515
|
+
uri,
|
|
2516
|
+
apiHeaders,
|
|
2517
|
+
payload
|
|
2518
|
+
);
|
|
2519
|
+
}
|
|
2520
|
+
upsertRows(paramsOrFirst, ...rest) {
|
|
2521
|
+
let params;
|
|
2522
|
+
if (paramsOrFirst && typeof paramsOrFirst === "object" && !Array.isArray(paramsOrFirst)) {
|
|
2523
|
+
params = paramsOrFirst || {};
|
|
2524
|
+
} else {
|
|
2525
|
+
params = {
|
|
2526
|
+
databaseId: paramsOrFirst,
|
|
2527
|
+
tableId: rest[0],
|
|
2528
|
+
rows: rest[1],
|
|
2529
|
+
transactionId: rest[2]
|
|
2530
|
+
};
|
|
2531
|
+
}
|
|
2532
|
+
const databaseId = params.databaseId;
|
|
2533
|
+
const tableId = params.tableId;
|
|
2534
|
+
const rows = params.rows;
|
|
2535
|
+
const transactionId = params.transactionId;
|
|
2536
|
+
if (typeof databaseId === "undefined") {
|
|
2537
|
+
throw new client.AppwriteException('Missing required parameter: "databaseId"');
|
|
2538
|
+
}
|
|
2539
|
+
if (typeof tableId === "undefined") {
|
|
2540
|
+
throw new client.AppwriteException('Missing required parameter: "tableId"');
|
|
2541
|
+
}
|
|
2542
|
+
if (typeof rows === "undefined") {
|
|
2543
|
+
throw new client.AppwriteException('Missing required parameter: "rows"');
|
|
2544
|
+
}
|
|
2545
|
+
const apiPath = "/tablesdb/{databaseId}/tables/{tableId}/rows".replace("{databaseId}", databaseId).replace("{tableId}", tableId);
|
|
2546
|
+
const payload = {};
|
|
2547
|
+
if (typeof rows !== "undefined") {
|
|
2548
|
+
payload["rows"] = rows;
|
|
2549
|
+
}
|
|
2550
|
+
if (typeof transactionId !== "undefined") {
|
|
2551
|
+
payload["transactionId"] = transactionId;
|
|
2552
|
+
}
|
|
2553
|
+
const uri = new URL(this.client.config.endpoint + apiPath);
|
|
2554
|
+
const apiHeaders = {
|
|
2555
|
+
"content-type": "application/json"
|
|
2556
|
+
};
|
|
2557
|
+
return this.client.call(
|
|
2558
|
+
"put",
|
|
2559
|
+
uri,
|
|
2560
|
+
apiHeaders,
|
|
2561
|
+
payload
|
|
2562
|
+
);
|
|
2563
|
+
}
|
|
2564
|
+
updateRows(paramsOrFirst, ...rest) {
|
|
2565
|
+
let params;
|
|
2566
|
+
if (paramsOrFirst && typeof paramsOrFirst === "object" && !Array.isArray(paramsOrFirst)) {
|
|
2567
|
+
params = paramsOrFirst || {};
|
|
2568
|
+
} else {
|
|
2569
|
+
params = {
|
|
2570
|
+
databaseId: paramsOrFirst,
|
|
2571
|
+
tableId: rest[0],
|
|
2572
|
+
data: rest[1],
|
|
2573
|
+
queries: rest[2],
|
|
2574
|
+
transactionId: rest[3]
|
|
2575
|
+
};
|
|
2576
|
+
}
|
|
2577
|
+
const databaseId = params.databaseId;
|
|
2578
|
+
const tableId = params.tableId;
|
|
2579
|
+
const data = params.data;
|
|
2580
|
+
const queries = params.queries;
|
|
2581
|
+
const transactionId = params.transactionId;
|
|
2582
|
+
if (typeof databaseId === "undefined") {
|
|
2583
|
+
throw new client.AppwriteException('Missing required parameter: "databaseId"');
|
|
2584
|
+
}
|
|
2585
|
+
if (typeof tableId === "undefined") {
|
|
2586
|
+
throw new client.AppwriteException('Missing required parameter: "tableId"');
|
|
2587
|
+
}
|
|
2588
|
+
const apiPath = "/tablesdb/{databaseId}/tables/{tableId}/rows".replace("{databaseId}", databaseId).replace("{tableId}", tableId);
|
|
2589
|
+
const payload = {};
|
|
2590
|
+
if (typeof data !== "undefined") {
|
|
2591
|
+
payload["data"] = data;
|
|
2592
|
+
}
|
|
2593
|
+
if (typeof queries !== "undefined") {
|
|
2594
|
+
payload["queries"] = queries;
|
|
2595
|
+
}
|
|
2596
|
+
if (typeof transactionId !== "undefined") {
|
|
2597
|
+
payload["transactionId"] = transactionId;
|
|
2598
|
+
}
|
|
2599
|
+
const uri = new URL(this.client.config.endpoint + apiPath);
|
|
2600
|
+
const apiHeaders = {
|
|
2601
|
+
"content-type": "application/json"
|
|
2602
|
+
};
|
|
2603
|
+
return this.client.call(
|
|
2604
|
+
"patch",
|
|
2605
|
+
uri,
|
|
2606
|
+
apiHeaders,
|
|
2607
|
+
payload
|
|
2608
|
+
);
|
|
2609
|
+
}
|
|
2610
|
+
deleteRows(paramsOrFirst, ...rest) {
|
|
2611
|
+
let params;
|
|
2612
|
+
if (paramsOrFirst && typeof paramsOrFirst === "object" && !Array.isArray(paramsOrFirst)) {
|
|
2613
|
+
params = paramsOrFirst || {};
|
|
2614
|
+
} else {
|
|
2615
|
+
params = {
|
|
2616
|
+
databaseId: paramsOrFirst,
|
|
2617
|
+
tableId: rest[0],
|
|
2618
|
+
queries: rest[1],
|
|
2619
|
+
transactionId: rest[2]
|
|
2620
|
+
};
|
|
2621
|
+
}
|
|
2622
|
+
const databaseId = params.databaseId;
|
|
2623
|
+
const tableId = params.tableId;
|
|
2624
|
+
const queries = params.queries;
|
|
2625
|
+
const transactionId = params.transactionId;
|
|
2626
|
+
if (typeof databaseId === "undefined") {
|
|
2627
|
+
throw new client.AppwriteException('Missing required parameter: "databaseId"');
|
|
2628
|
+
}
|
|
2629
|
+
if (typeof tableId === "undefined") {
|
|
2630
|
+
throw new client.AppwriteException('Missing required parameter: "tableId"');
|
|
2631
|
+
}
|
|
2632
|
+
const apiPath = "/tablesdb/{databaseId}/tables/{tableId}/rows".replace("{databaseId}", databaseId).replace("{tableId}", tableId);
|
|
2633
|
+
const payload = {};
|
|
2634
|
+
if (typeof queries !== "undefined") {
|
|
2635
|
+
payload["queries"] = queries;
|
|
2636
|
+
}
|
|
2637
|
+
if (typeof transactionId !== "undefined") {
|
|
2638
|
+
payload["transactionId"] = transactionId;
|
|
2639
|
+
}
|
|
2640
|
+
const uri = new URL(this.client.config.endpoint + apiPath);
|
|
2641
|
+
const apiHeaders = {
|
|
2642
|
+
"content-type": "application/json"
|
|
2643
|
+
};
|
|
2644
|
+
return this.client.call(
|
|
2645
|
+
"delete",
|
|
2646
|
+
uri,
|
|
2647
|
+
apiHeaders,
|
|
2648
|
+
payload
|
|
2649
|
+
);
|
|
2650
|
+
}
|
|
2651
|
+
getRow(paramsOrFirst, ...rest) {
|
|
2652
|
+
let params;
|
|
2653
|
+
if (paramsOrFirst && typeof paramsOrFirst === "object" && !Array.isArray(paramsOrFirst)) {
|
|
2654
|
+
params = paramsOrFirst || {};
|
|
2655
|
+
} else {
|
|
2656
|
+
params = {
|
|
2657
|
+
databaseId: paramsOrFirst,
|
|
2658
|
+
tableId: rest[0],
|
|
2659
|
+
rowId: rest[1],
|
|
2660
|
+
queries: rest[2],
|
|
2661
|
+
transactionId: rest[3]
|
|
2662
|
+
};
|
|
2663
|
+
}
|
|
2664
|
+
const databaseId = params.databaseId;
|
|
2665
|
+
const tableId = params.tableId;
|
|
2666
|
+
const rowId = params.rowId;
|
|
2667
|
+
const queries = params.queries;
|
|
2668
|
+
const transactionId = params.transactionId;
|
|
2669
|
+
if (typeof databaseId === "undefined") {
|
|
2670
|
+
throw new client.AppwriteException('Missing required parameter: "databaseId"');
|
|
2671
|
+
}
|
|
2672
|
+
if (typeof tableId === "undefined") {
|
|
2673
|
+
throw new client.AppwriteException('Missing required parameter: "tableId"');
|
|
2674
|
+
}
|
|
2675
|
+
if (typeof rowId === "undefined") {
|
|
2676
|
+
throw new client.AppwriteException('Missing required parameter: "rowId"');
|
|
2677
|
+
}
|
|
2678
|
+
const apiPath = "/tablesdb/{databaseId}/tables/{tableId}/rows/{rowId}".replace("{databaseId}", databaseId).replace("{tableId}", tableId).replace("{rowId}", rowId);
|
|
2679
|
+
const payload = {};
|
|
2680
|
+
if (typeof queries !== "undefined") {
|
|
2681
|
+
payload["queries"] = queries;
|
|
2682
|
+
}
|
|
2683
|
+
if (typeof transactionId !== "undefined") {
|
|
2684
|
+
payload["transactionId"] = transactionId;
|
|
2685
|
+
}
|
|
2686
|
+
const uri = new URL(this.client.config.endpoint + apiPath);
|
|
2687
|
+
const apiHeaders = {};
|
|
2688
|
+
return this.client.call(
|
|
2689
|
+
"get",
|
|
2690
|
+
uri,
|
|
2691
|
+
apiHeaders,
|
|
2692
|
+
payload
|
|
2693
|
+
);
|
|
2694
|
+
}
|
|
2695
|
+
upsertRow(paramsOrFirst, ...rest) {
|
|
2696
|
+
let params;
|
|
2697
|
+
if (paramsOrFirst && typeof paramsOrFirst === "object" && !Array.isArray(paramsOrFirst)) {
|
|
2698
|
+
params = paramsOrFirst || {};
|
|
2699
|
+
} else {
|
|
2700
|
+
params = {
|
|
2701
|
+
databaseId: paramsOrFirst,
|
|
2702
|
+
tableId: rest[0],
|
|
2703
|
+
rowId: rest[1],
|
|
2704
|
+
data: rest[2],
|
|
2705
|
+
permissions: rest[3],
|
|
2706
|
+
transactionId: rest[4]
|
|
2707
|
+
};
|
|
2708
|
+
}
|
|
2709
|
+
const databaseId = params.databaseId;
|
|
2710
|
+
const tableId = params.tableId;
|
|
2711
|
+
const rowId = params.rowId;
|
|
2712
|
+
const data = params.data;
|
|
2713
|
+
const permissions = params.permissions;
|
|
2714
|
+
const transactionId = params.transactionId;
|
|
2715
|
+
if (typeof databaseId === "undefined") {
|
|
2716
|
+
throw new client.AppwriteException('Missing required parameter: "databaseId"');
|
|
2717
|
+
}
|
|
2718
|
+
if (typeof tableId === "undefined") {
|
|
2719
|
+
throw new client.AppwriteException('Missing required parameter: "tableId"');
|
|
2720
|
+
}
|
|
2721
|
+
if (typeof rowId === "undefined") {
|
|
2722
|
+
throw new client.AppwriteException('Missing required parameter: "rowId"');
|
|
2723
|
+
}
|
|
2724
|
+
const apiPath = "/tablesdb/{databaseId}/tables/{tableId}/rows/{rowId}".replace("{databaseId}", databaseId).replace("{tableId}", tableId).replace("{rowId}", rowId);
|
|
2725
|
+
const payload = {};
|
|
2726
|
+
if (typeof data !== "undefined") {
|
|
2727
|
+
payload["data"] = data;
|
|
2728
|
+
}
|
|
2729
|
+
if (typeof permissions !== "undefined") {
|
|
2730
|
+
payload["permissions"] = permissions;
|
|
2731
|
+
}
|
|
2732
|
+
if (typeof transactionId !== "undefined") {
|
|
2733
|
+
payload["transactionId"] = transactionId;
|
|
2734
|
+
}
|
|
2735
|
+
const uri = new URL(this.client.config.endpoint + apiPath);
|
|
2736
|
+
const apiHeaders = {
|
|
2737
|
+
"content-type": "application/json"
|
|
2738
|
+
};
|
|
2739
|
+
return this.client.call(
|
|
2740
|
+
"put",
|
|
2741
|
+
uri,
|
|
2742
|
+
apiHeaders,
|
|
2743
|
+
payload
|
|
2744
|
+
);
|
|
2745
|
+
}
|
|
2746
|
+
updateRow(paramsOrFirst, ...rest) {
|
|
2747
|
+
let params;
|
|
2748
|
+
if (paramsOrFirst && typeof paramsOrFirst === "object" && !Array.isArray(paramsOrFirst)) {
|
|
2749
|
+
params = paramsOrFirst || {};
|
|
2750
|
+
} else {
|
|
2751
|
+
params = {
|
|
2752
|
+
databaseId: paramsOrFirst,
|
|
2753
|
+
tableId: rest[0],
|
|
2754
|
+
rowId: rest[1],
|
|
2755
|
+
data: rest[2],
|
|
2756
|
+
permissions: rest[3],
|
|
2757
|
+
transactionId: rest[4]
|
|
2758
|
+
};
|
|
2759
|
+
}
|
|
2760
|
+
const databaseId = params.databaseId;
|
|
2761
|
+
const tableId = params.tableId;
|
|
2762
|
+
const rowId = params.rowId;
|
|
2763
|
+
const data = params.data;
|
|
2764
|
+
const permissions = params.permissions;
|
|
2765
|
+
const transactionId = params.transactionId;
|
|
2766
|
+
if (typeof databaseId === "undefined") {
|
|
2767
|
+
throw new client.AppwriteException('Missing required parameter: "databaseId"');
|
|
2768
|
+
}
|
|
2769
|
+
if (typeof tableId === "undefined") {
|
|
2770
|
+
throw new client.AppwriteException('Missing required parameter: "tableId"');
|
|
2771
|
+
}
|
|
2772
|
+
if (typeof rowId === "undefined") {
|
|
2773
|
+
throw new client.AppwriteException('Missing required parameter: "rowId"');
|
|
2774
|
+
}
|
|
2775
|
+
const apiPath = "/tablesdb/{databaseId}/tables/{tableId}/rows/{rowId}".replace("{databaseId}", databaseId).replace("{tableId}", tableId).replace("{rowId}", rowId);
|
|
2776
|
+
const payload = {};
|
|
2777
|
+
if (typeof data !== "undefined") {
|
|
2778
|
+
payload["data"] = data;
|
|
2779
|
+
}
|
|
2780
|
+
if (typeof permissions !== "undefined") {
|
|
2781
|
+
payload["permissions"] = permissions;
|
|
2782
|
+
}
|
|
2783
|
+
if (typeof transactionId !== "undefined") {
|
|
2784
|
+
payload["transactionId"] = transactionId;
|
|
2785
|
+
}
|
|
2786
|
+
const uri = new URL(this.client.config.endpoint + apiPath);
|
|
2787
|
+
const apiHeaders = {
|
|
2788
|
+
"content-type": "application/json"
|
|
2789
|
+
};
|
|
2790
|
+
return this.client.call(
|
|
2791
|
+
"patch",
|
|
2792
|
+
uri,
|
|
2793
|
+
apiHeaders,
|
|
2794
|
+
payload
|
|
2795
|
+
);
|
|
2796
|
+
}
|
|
2797
|
+
deleteRow(paramsOrFirst, ...rest) {
|
|
2798
|
+
let params;
|
|
2799
|
+
if (paramsOrFirst && typeof paramsOrFirst === "object" && !Array.isArray(paramsOrFirst)) {
|
|
2800
|
+
params = paramsOrFirst || {};
|
|
2801
|
+
} else {
|
|
2802
|
+
params = {
|
|
2803
|
+
databaseId: paramsOrFirst,
|
|
2804
|
+
tableId: rest[0],
|
|
2805
|
+
rowId: rest[1],
|
|
2806
|
+
transactionId: rest[2]
|
|
2807
|
+
};
|
|
2808
|
+
}
|
|
2809
|
+
const databaseId = params.databaseId;
|
|
2810
|
+
const tableId = params.tableId;
|
|
2811
|
+
const rowId = params.rowId;
|
|
2812
|
+
const transactionId = params.transactionId;
|
|
2813
|
+
if (typeof databaseId === "undefined") {
|
|
2814
|
+
throw new client.AppwriteException('Missing required parameter: "databaseId"');
|
|
2815
|
+
}
|
|
2816
|
+
if (typeof tableId === "undefined") {
|
|
2817
|
+
throw new client.AppwriteException('Missing required parameter: "tableId"');
|
|
2818
|
+
}
|
|
2819
|
+
if (typeof rowId === "undefined") {
|
|
2820
|
+
throw new client.AppwriteException('Missing required parameter: "rowId"');
|
|
2821
|
+
}
|
|
2822
|
+
const apiPath = "/tablesdb/{databaseId}/tables/{tableId}/rows/{rowId}".replace("{databaseId}", databaseId).replace("{tableId}", tableId).replace("{rowId}", rowId);
|
|
2823
|
+
const payload = {};
|
|
2824
|
+
if (typeof transactionId !== "undefined") {
|
|
2825
|
+
payload["transactionId"] = transactionId;
|
|
2826
|
+
}
|
|
2827
|
+
const uri = new URL(this.client.config.endpoint + apiPath);
|
|
2828
|
+
const apiHeaders = {
|
|
2829
|
+
"content-type": "application/json"
|
|
2830
|
+
};
|
|
2831
|
+
return this.client.call(
|
|
2832
|
+
"delete",
|
|
2833
|
+
uri,
|
|
2834
|
+
apiHeaders,
|
|
2835
|
+
payload
|
|
2836
|
+
);
|
|
2837
|
+
}
|
|
2838
|
+
decrementRowColumn(paramsOrFirst, ...rest) {
|
|
2839
|
+
let params;
|
|
2840
|
+
if (paramsOrFirst && typeof paramsOrFirst === "object" && !Array.isArray(paramsOrFirst)) {
|
|
2841
|
+
params = paramsOrFirst || {};
|
|
2842
|
+
} else {
|
|
2843
|
+
params = {
|
|
2844
|
+
databaseId: paramsOrFirst,
|
|
2845
|
+
tableId: rest[0],
|
|
2846
|
+
rowId: rest[1],
|
|
2847
|
+
column: rest[2],
|
|
2848
|
+
value: rest[3],
|
|
2849
|
+
min: rest[4],
|
|
2850
|
+
transactionId: rest[5]
|
|
2851
|
+
};
|
|
2852
|
+
}
|
|
2853
|
+
const databaseId = params.databaseId;
|
|
2854
|
+
const tableId = params.tableId;
|
|
2855
|
+
const rowId = params.rowId;
|
|
2856
|
+
const column = params.column;
|
|
2857
|
+
const value = params.value;
|
|
2858
|
+
const min = params.min;
|
|
2859
|
+
const transactionId = params.transactionId;
|
|
2860
|
+
if (typeof databaseId === "undefined") {
|
|
2861
|
+
throw new client.AppwriteException('Missing required parameter: "databaseId"');
|
|
2862
|
+
}
|
|
2863
|
+
if (typeof tableId === "undefined") {
|
|
2864
|
+
throw new client.AppwriteException('Missing required parameter: "tableId"');
|
|
2865
|
+
}
|
|
2866
|
+
if (typeof rowId === "undefined") {
|
|
2867
|
+
throw new client.AppwriteException('Missing required parameter: "rowId"');
|
|
2868
|
+
}
|
|
2869
|
+
if (typeof column === "undefined") {
|
|
2870
|
+
throw new client.AppwriteException('Missing required parameter: "column"');
|
|
2871
|
+
}
|
|
2872
|
+
const apiPath = "/tablesdb/{databaseId}/tables/{tableId}/rows/{rowId}/{column}/decrement".replace("{databaseId}", databaseId).replace("{tableId}", tableId).replace("{rowId}", rowId).replace("{column}", column);
|
|
2873
|
+
const payload = {};
|
|
2874
|
+
if (typeof value !== "undefined") {
|
|
2875
|
+
payload["value"] = value;
|
|
2876
|
+
}
|
|
2877
|
+
if (typeof min !== "undefined") {
|
|
2878
|
+
payload["min"] = min;
|
|
2879
|
+
}
|
|
2880
|
+
if (typeof transactionId !== "undefined") {
|
|
2881
|
+
payload["transactionId"] = transactionId;
|
|
2882
|
+
}
|
|
2883
|
+
const uri = new URL(this.client.config.endpoint + apiPath);
|
|
2884
|
+
const apiHeaders = {
|
|
2885
|
+
"content-type": "application/json"
|
|
2886
|
+
};
|
|
2887
|
+
return this.client.call(
|
|
2888
|
+
"patch",
|
|
2889
|
+
uri,
|
|
2890
|
+
apiHeaders,
|
|
2891
|
+
payload
|
|
2892
|
+
);
|
|
2893
|
+
}
|
|
2894
|
+
incrementRowColumn(paramsOrFirst, ...rest) {
|
|
2895
|
+
let params;
|
|
2896
|
+
if (paramsOrFirst && typeof paramsOrFirst === "object" && !Array.isArray(paramsOrFirst)) {
|
|
2897
|
+
params = paramsOrFirst || {};
|
|
2898
|
+
} else {
|
|
2899
|
+
params = {
|
|
2900
|
+
databaseId: paramsOrFirst,
|
|
2901
|
+
tableId: rest[0],
|
|
2902
|
+
rowId: rest[1],
|
|
2903
|
+
column: rest[2],
|
|
2904
|
+
value: rest[3],
|
|
2905
|
+
max: rest[4],
|
|
2906
|
+
transactionId: rest[5]
|
|
2907
|
+
};
|
|
2908
|
+
}
|
|
2909
|
+
const databaseId = params.databaseId;
|
|
2910
|
+
const tableId = params.tableId;
|
|
2911
|
+
const rowId = params.rowId;
|
|
2912
|
+
const column = params.column;
|
|
2913
|
+
const value = params.value;
|
|
2914
|
+
const max = params.max;
|
|
2915
|
+
const transactionId = params.transactionId;
|
|
2916
|
+
if (typeof databaseId === "undefined") {
|
|
2917
|
+
throw new client.AppwriteException('Missing required parameter: "databaseId"');
|
|
2918
|
+
}
|
|
2919
|
+
if (typeof tableId === "undefined") {
|
|
2920
|
+
throw new client.AppwriteException('Missing required parameter: "tableId"');
|
|
2921
|
+
}
|
|
2922
|
+
if (typeof rowId === "undefined") {
|
|
2923
|
+
throw new client.AppwriteException('Missing required parameter: "rowId"');
|
|
2924
|
+
}
|
|
2925
|
+
if (typeof column === "undefined") {
|
|
2926
|
+
throw new client.AppwriteException('Missing required parameter: "column"');
|
|
2927
|
+
}
|
|
2928
|
+
const apiPath = "/tablesdb/{databaseId}/tables/{tableId}/rows/{rowId}/{column}/increment".replace("{databaseId}", databaseId).replace("{tableId}", tableId).replace("{rowId}", rowId).replace("{column}", column);
|
|
2929
|
+
const payload = {};
|
|
2930
|
+
if (typeof value !== "undefined") {
|
|
2931
|
+
payload["value"] = value;
|
|
2932
|
+
}
|
|
2933
|
+
if (typeof max !== "undefined") {
|
|
2934
|
+
payload["max"] = max;
|
|
2935
|
+
}
|
|
2936
|
+
if (typeof transactionId !== "undefined") {
|
|
2937
|
+
payload["transactionId"] = transactionId;
|
|
2938
|
+
}
|
|
2939
|
+
const uri = new URL(this.client.config.endpoint + apiPath);
|
|
2940
|
+
const apiHeaders = {
|
|
2941
|
+
"content-type": "application/json"
|
|
2942
|
+
};
|
|
2943
|
+
return this.client.call(
|
|
2944
|
+
"patch",
|
|
2945
|
+
uri,
|
|
2946
|
+
apiHeaders,
|
|
2947
|
+
payload
|
|
2948
|
+
);
|
|
2949
|
+
}
|
|
2950
|
+
}
|
|
2951
|
+
|
|
2952
|
+
exports.TablesDB = TablesDB;
|
|
2953
|
+
//# sourceMappingURL=out.js.map
|
|
2954
|
+
//# sourceMappingURL=tables-db.js.map
|