@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,113 @@
|
|
|
1
|
+
import { Client } from '../client.js';
|
|
2
|
+
import { User } from './user.js';
|
|
3
|
+
import '../models.js';
|
|
4
|
+
import '../enums/database-type.js';
|
|
5
|
+
import '../enums/attribute-status.js';
|
|
6
|
+
import '../enums/column-status.js';
|
|
7
|
+
import '../enums/index-status.js';
|
|
8
|
+
import '../enums/deployment-status.js';
|
|
9
|
+
import '../enums/execution-trigger.js';
|
|
10
|
+
import '../enums/execution-status.js';
|
|
11
|
+
import '../enums/health-antivirus-status.js';
|
|
12
|
+
import '../enums/health-check-status.js';
|
|
13
|
+
import '../enums/message-status.js';
|
|
14
|
+
import '../query.js';
|
|
15
|
+
|
|
16
|
+
declare class Relation {
|
|
17
|
+
client: Client;
|
|
18
|
+
constructor(client: Client);
|
|
19
|
+
/**
|
|
20
|
+
* Follow User
|
|
21
|
+
*
|
|
22
|
+
* Follow a user
|
|
23
|
+
*
|
|
24
|
+
* @param {number} userId - User ID to follow
|
|
25
|
+
* @param {number} actorId - Current user ID
|
|
26
|
+
* @param {string} token - Authentication token
|
|
27
|
+
* @throws {AppwriteException}
|
|
28
|
+
* @returns {Promise<{status_code: number, status_msg: string}>}
|
|
29
|
+
*/
|
|
30
|
+
follow(userId: number, actorId: number, token: string): Promise<{
|
|
31
|
+
status_code: number;
|
|
32
|
+
status_msg: string;
|
|
33
|
+
}>;
|
|
34
|
+
/**
|
|
35
|
+
* Unfollow User
|
|
36
|
+
*
|
|
37
|
+
* Unfollow a user
|
|
38
|
+
*
|
|
39
|
+
* @param {number} userId - User ID to unfollow
|
|
40
|
+
* @param {number} actorId - Current user ID
|
|
41
|
+
* @param {string} token - Authentication token
|
|
42
|
+
* @throws {AppwriteException}
|
|
43
|
+
* @returns {Promise<{status_code: number, status_msg: string}>}
|
|
44
|
+
*/
|
|
45
|
+
unfollow(userId: number, actorId: number, token: string): Promise<{
|
|
46
|
+
status_code: number;
|
|
47
|
+
status_msg: string;
|
|
48
|
+
}>;
|
|
49
|
+
/**
|
|
50
|
+
* Get Follow List
|
|
51
|
+
*
|
|
52
|
+
* Get list of users that a user is following
|
|
53
|
+
*
|
|
54
|
+
* @param {number} userId - User ID
|
|
55
|
+
* @param {number} actorId - Current user ID
|
|
56
|
+
* @param {string} token - Authentication token
|
|
57
|
+
* @throws {AppwriteException}
|
|
58
|
+
* @returns {Promise<{status_code: number, status_msg: string, user_list: User[]}>}
|
|
59
|
+
*/
|
|
60
|
+
getFollowList(userId: number, actorId: number, token: string): Promise<{
|
|
61
|
+
status_code: number;
|
|
62
|
+
status_msg: string;
|
|
63
|
+
user_list: User[];
|
|
64
|
+
}>;
|
|
65
|
+
/**
|
|
66
|
+
* Get Follower List
|
|
67
|
+
*
|
|
68
|
+
* Get list of users following a user
|
|
69
|
+
*
|
|
70
|
+
* @param {number} userId - User ID
|
|
71
|
+
* @param {number} actorId - Current user ID
|
|
72
|
+
* @param {string} token - Authentication token
|
|
73
|
+
* @throws {AppwriteException}
|
|
74
|
+
* @returns {Promise<{status_code: number, status_msg: string, user_list: User[]}>}
|
|
75
|
+
*/
|
|
76
|
+
getFollowerList(userId: number, actorId: number, token: string): Promise<{
|
|
77
|
+
status_code: number;
|
|
78
|
+
status_msg: string;
|
|
79
|
+
user_list: User[];
|
|
80
|
+
}>;
|
|
81
|
+
/**
|
|
82
|
+
* Get Friend List
|
|
83
|
+
*
|
|
84
|
+
* Get list of mutual friends
|
|
85
|
+
*
|
|
86
|
+
* @param {number} userId - User ID
|
|
87
|
+
* @param {number} actorId - Current user ID
|
|
88
|
+
* @param {string} token - Authentication token
|
|
89
|
+
* @throws {AppwriteException}
|
|
90
|
+
* @returns {Promise<{status_code: number, status_msg: string, user_list: User[]}>}
|
|
91
|
+
*/
|
|
92
|
+
getFriendList(userId: number, actorId: number, token: string): Promise<{
|
|
93
|
+
status_code: number;
|
|
94
|
+
status_msg: string;
|
|
95
|
+
user_list: User[];
|
|
96
|
+
}>;
|
|
97
|
+
/**
|
|
98
|
+
* Check if Following
|
|
99
|
+
*
|
|
100
|
+
* Check if current user is following another user
|
|
101
|
+
*
|
|
102
|
+
* @param {number} userId - User ID to check
|
|
103
|
+
* @param {number} actorId - Current user ID
|
|
104
|
+
* @param {string} token - Authentication token
|
|
105
|
+
* @throws {AppwriteException}
|
|
106
|
+
* @returns {Promise<{result: boolean}>}
|
|
107
|
+
*/
|
|
108
|
+
isFollowing(userId: number, actorId: number, token: string): Promise<{
|
|
109
|
+
result: boolean;
|
|
110
|
+
}>;
|
|
111
|
+
}
|
|
112
|
+
|
|
113
|
+
export { Relation };
|
|
@@ -0,0 +1,239 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
var client = require('../client');
|
|
4
|
+
|
|
5
|
+
class Relation {
|
|
6
|
+
constructor(client) {
|
|
7
|
+
this.client = client;
|
|
8
|
+
}
|
|
9
|
+
/**
|
|
10
|
+
* Follow User
|
|
11
|
+
*
|
|
12
|
+
* Follow a user
|
|
13
|
+
*
|
|
14
|
+
* @param {number} userId - User ID to follow
|
|
15
|
+
* @param {number} actorId - Current user ID
|
|
16
|
+
* @param {string} token - Authentication token
|
|
17
|
+
* @throws {AppwriteException}
|
|
18
|
+
* @returns {Promise<{status_code: number, status_msg: string}>}
|
|
19
|
+
*/
|
|
20
|
+
async follow(userId, actorId, token) {
|
|
21
|
+
if (typeof userId === "undefined") {
|
|
22
|
+
throw new client.AppwriteException('Missing required parameter: "userId"');
|
|
23
|
+
}
|
|
24
|
+
if (typeof actorId === "undefined") {
|
|
25
|
+
throw new client.AppwriteException('Missing required parameter: "actorId"');
|
|
26
|
+
}
|
|
27
|
+
if (typeof token === "undefined") {
|
|
28
|
+
throw new client.AppwriteException('Missing required parameter: "token"');
|
|
29
|
+
}
|
|
30
|
+
const apiPath = "/douyin/relation/follow/";
|
|
31
|
+
const payload = {};
|
|
32
|
+
payload["to_user_id"] = userId;
|
|
33
|
+
payload["actor_id"] = actorId;
|
|
34
|
+
payload["token"] = token;
|
|
35
|
+
const uri = new URL(this.client.config.endpoint + apiPath);
|
|
36
|
+
const apiHeaders = {
|
|
37
|
+
"content-type": "application/x-www-form-urlencoded"
|
|
38
|
+
};
|
|
39
|
+
return this.client.call(
|
|
40
|
+
"post",
|
|
41
|
+
uri,
|
|
42
|
+
apiHeaders,
|
|
43
|
+
payload
|
|
44
|
+
);
|
|
45
|
+
}
|
|
46
|
+
/**
|
|
47
|
+
* Unfollow User
|
|
48
|
+
*
|
|
49
|
+
* Unfollow a user
|
|
50
|
+
*
|
|
51
|
+
* @param {number} userId - User ID to unfollow
|
|
52
|
+
* @param {number} actorId - Current user ID
|
|
53
|
+
* @param {string} token - Authentication token
|
|
54
|
+
* @throws {AppwriteException}
|
|
55
|
+
* @returns {Promise<{status_code: number, status_msg: string}>}
|
|
56
|
+
*/
|
|
57
|
+
async unfollow(userId, actorId, token) {
|
|
58
|
+
if (typeof userId === "undefined") {
|
|
59
|
+
throw new client.AppwriteException('Missing required parameter: "userId"');
|
|
60
|
+
}
|
|
61
|
+
if (typeof actorId === "undefined") {
|
|
62
|
+
throw new client.AppwriteException('Missing required parameter: "actorId"');
|
|
63
|
+
}
|
|
64
|
+
if (typeof token === "undefined") {
|
|
65
|
+
throw new client.AppwriteException('Missing required parameter: "token"');
|
|
66
|
+
}
|
|
67
|
+
const apiPath = "/douyin/relation/unfollow/";
|
|
68
|
+
const payload = {};
|
|
69
|
+
payload["to_user_id"] = userId;
|
|
70
|
+
payload["actor_id"] = actorId;
|
|
71
|
+
payload["token"] = token;
|
|
72
|
+
const uri = new URL(this.client.config.endpoint + apiPath);
|
|
73
|
+
const apiHeaders = {
|
|
74
|
+
"content-type": "application/x-www-form-urlencoded"
|
|
75
|
+
};
|
|
76
|
+
return this.client.call(
|
|
77
|
+
"post",
|
|
78
|
+
uri,
|
|
79
|
+
apiHeaders,
|
|
80
|
+
payload
|
|
81
|
+
);
|
|
82
|
+
}
|
|
83
|
+
/**
|
|
84
|
+
* Get Follow List
|
|
85
|
+
*
|
|
86
|
+
* Get list of users that a user is following
|
|
87
|
+
*
|
|
88
|
+
* @param {number} userId - User ID
|
|
89
|
+
* @param {number} actorId - Current user ID
|
|
90
|
+
* @param {string} token - Authentication token
|
|
91
|
+
* @throws {AppwriteException}
|
|
92
|
+
* @returns {Promise<{status_code: number, status_msg: string, user_list: User[]}>}
|
|
93
|
+
*/
|
|
94
|
+
async getFollowList(userId, actorId, token) {
|
|
95
|
+
if (typeof userId === "undefined") {
|
|
96
|
+
throw new client.AppwriteException('Missing required parameter: "userId"');
|
|
97
|
+
}
|
|
98
|
+
if (typeof actorId === "undefined") {
|
|
99
|
+
throw new client.AppwriteException('Missing required parameter: "actorId"');
|
|
100
|
+
}
|
|
101
|
+
if (typeof token === "undefined") {
|
|
102
|
+
throw new client.AppwriteException('Missing required parameter: "token"');
|
|
103
|
+
}
|
|
104
|
+
const apiPath = "/douyin/relation/follow/list/";
|
|
105
|
+
const payload = {};
|
|
106
|
+
payload["user_id"] = userId;
|
|
107
|
+
payload["actor_id"] = actorId;
|
|
108
|
+
payload["token"] = token;
|
|
109
|
+
const uri = new URL(this.client.config.endpoint + apiPath);
|
|
110
|
+
Object.keys(payload).forEach((key) => uri.searchParams.append(key, payload[key]));
|
|
111
|
+
const apiHeaders = {
|
|
112
|
+
"content-type": "application/json"
|
|
113
|
+
};
|
|
114
|
+
return this.client.call(
|
|
115
|
+
"get",
|
|
116
|
+
uri,
|
|
117
|
+
apiHeaders,
|
|
118
|
+
{}
|
|
119
|
+
);
|
|
120
|
+
}
|
|
121
|
+
/**
|
|
122
|
+
* Get Follower List
|
|
123
|
+
*
|
|
124
|
+
* Get list of users following a user
|
|
125
|
+
*
|
|
126
|
+
* @param {number} userId - User ID
|
|
127
|
+
* @param {number} actorId - Current user ID
|
|
128
|
+
* @param {string} token - Authentication token
|
|
129
|
+
* @throws {AppwriteException}
|
|
130
|
+
* @returns {Promise<{status_code: number, status_msg: string, user_list: User[]}>}
|
|
131
|
+
*/
|
|
132
|
+
async getFollowerList(userId, actorId, token) {
|
|
133
|
+
if (typeof userId === "undefined") {
|
|
134
|
+
throw new client.AppwriteException('Missing required parameter: "userId"');
|
|
135
|
+
}
|
|
136
|
+
if (typeof actorId === "undefined") {
|
|
137
|
+
throw new client.AppwriteException('Missing required parameter: "actorId"');
|
|
138
|
+
}
|
|
139
|
+
if (typeof token === "undefined") {
|
|
140
|
+
throw new client.AppwriteException('Missing required parameter: "token"');
|
|
141
|
+
}
|
|
142
|
+
const apiPath = "/douyin/relation/follower/list/";
|
|
143
|
+
const payload = {};
|
|
144
|
+
payload["user_id"] = userId;
|
|
145
|
+
payload["actor_id"] = actorId;
|
|
146
|
+
payload["token"] = token;
|
|
147
|
+
const uri = new URL(this.client.config.endpoint + apiPath);
|
|
148
|
+
Object.keys(payload).forEach((key) => uri.searchParams.append(key, payload[key]));
|
|
149
|
+
const apiHeaders = {
|
|
150
|
+
"content-type": "application/json"
|
|
151
|
+
};
|
|
152
|
+
return this.client.call(
|
|
153
|
+
"get",
|
|
154
|
+
uri,
|
|
155
|
+
apiHeaders,
|
|
156
|
+
{}
|
|
157
|
+
);
|
|
158
|
+
}
|
|
159
|
+
/**
|
|
160
|
+
* Get Friend List
|
|
161
|
+
*
|
|
162
|
+
* Get list of mutual friends
|
|
163
|
+
*
|
|
164
|
+
* @param {number} userId - User ID
|
|
165
|
+
* @param {number} actorId - Current user ID
|
|
166
|
+
* @param {string} token - Authentication token
|
|
167
|
+
* @throws {AppwriteException}
|
|
168
|
+
* @returns {Promise<{status_code: number, status_msg: string, user_list: User[]}>}
|
|
169
|
+
*/
|
|
170
|
+
async getFriendList(userId, actorId, token) {
|
|
171
|
+
if (typeof userId === "undefined") {
|
|
172
|
+
throw new client.AppwriteException('Missing required parameter: "userId"');
|
|
173
|
+
}
|
|
174
|
+
if (typeof actorId === "undefined") {
|
|
175
|
+
throw new client.AppwriteException('Missing required parameter: "actorId"');
|
|
176
|
+
}
|
|
177
|
+
if (typeof token === "undefined") {
|
|
178
|
+
throw new client.AppwriteException('Missing required parameter: "token"');
|
|
179
|
+
}
|
|
180
|
+
const apiPath = "/douyin/relation/friend/list/";
|
|
181
|
+
const payload = {};
|
|
182
|
+
payload["user_id"] = userId;
|
|
183
|
+
payload["actor_id"] = actorId;
|
|
184
|
+
payload["token"] = token;
|
|
185
|
+
const uri = new URL(this.client.config.endpoint + apiPath);
|
|
186
|
+
Object.keys(payload).forEach((key) => uri.searchParams.append(key, payload[key]));
|
|
187
|
+
const apiHeaders = {
|
|
188
|
+
"content-type": "application/json"
|
|
189
|
+
};
|
|
190
|
+
return this.client.call(
|
|
191
|
+
"get",
|
|
192
|
+
uri,
|
|
193
|
+
apiHeaders,
|
|
194
|
+
{}
|
|
195
|
+
);
|
|
196
|
+
}
|
|
197
|
+
/**
|
|
198
|
+
* Check if Following
|
|
199
|
+
*
|
|
200
|
+
* Check if current user is following another user
|
|
201
|
+
*
|
|
202
|
+
* @param {number} userId - User ID to check
|
|
203
|
+
* @param {number} actorId - Current user ID
|
|
204
|
+
* @param {string} token - Authentication token
|
|
205
|
+
* @throws {AppwriteException}
|
|
206
|
+
* @returns {Promise<{result: boolean}>}
|
|
207
|
+
*/
|
|
208
|
+
async isFollowing(userId, actorId, token) {
|
|
209
|
+
if (typeof userId === "undefined") {
|
|
210
|
+
throw new client.AppwriteException('Missing required parameter: "userId"');
|
|
211
|
+
}
|
|
212
|
+
if (typeof actorId === "undefined") {
|
|
213
|
+
throw new client.AppwriteException('Missing required parameter: "actorId"');
|
|
214
|
+
}
|
|
215
|
+
if (typeof token === "undefined") {
|
|
216
|
+
throw new client.AppwriteException('Missing required parameter: "token"');
|
|
217
|
+
}
|
|
218
|
+
const apiPath = "/douyin/relation/isFollow/";
|
|
219
|
+
const payload = {};
|
|
220
|
+
payload["user_id"] = userId;
|
|
221
|
+
payload["actor_id"] = actorId;
|
|
222
|
+
payload["token"] = token;
|
|
223
|
+
const uri = new URL(this.client.config.endpoint + apiPath);
|
|
224
|
+
Object.keys(payload).forEach((key) => uri.searchParams.append(key, payload[key]));
|
|
225
|
+
const apiHeaders = {
|
|
226
|
+
"content-type": "application/json"
|
|
227
|
+
};
|
|
228
|
+
return this.client.call(
|
|
229
|
+
"get",
|
|
230
|
+
uri,
|
|
231
|
+
apiHeaders,
|
|
232
|
+
{}
|
|
233
|
+
);
|
|
234
|
+
}
|
|
235
|
+
}
|
|
236
|
+
|
|
237
|
+
exports.Relation = Relation;
|
|
238
|
+
//# sourceMappingURL=out.js.map
|
|
239
|
+
//# sourceMappingURL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AA,MAC7C,gBAAgB;AAAA,IACpB;AAEA,WAAO,KAAK,OAAO;AAAA,MACf;AAAA,MACA;AAAA,MACA;AAAA,MACA,CAAC;AAAA,IACL;AAAA,EACJ;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EAaA,MAAM,YAAY,QAAgB,SAAiB,OAEhD;AACC,QAAI,OAAO,WAAW,aAAa;AAC/B,YAAM,IAAI,kBAAkB,sCAAsC;AAAA,IACtE;AACA,QAAI,OAAO,YAAY,aAAa;AAChC,YAAM,IAAI,kBAAkB,uCAAuC;AAAA,IACvE;AACA,QAAI,OAAO,UAAU,aAAa;AAC9B,YAAM,IAAI,kBAAkB,qCAAqC;AAAA,IACrE;AAEA,UAAM,UAAU;AAChB,UAAM,UAAmB,CAAC;AAE1B,YAAQ,SAAS,IAAI;AACrB,YAAQ,UAAU,IAAI;AACtB,YAAQ,OAAO,IAAI;AAEnB,UAAM,MAAM,IAAI,IAAI,KAAK,OAAO,OAAO,WAAW,OAAO;AACzD,WAAO,KAAK,OAAO,EAAE,QAAQ,SAAO,IAAI,aAAa,OAAO,KAAK,QAAQ,GAAG,CAAC,CAAC;AAE9E,UAAM,aAA2C;AAAA,MAC7C,gBAAgB;AAAA,IACpB;AAEA,WAAO,KAAK,OAAO;AAAA,MACf;AAAA,MACA;AAAA,MACA;AAAA,MACA,CAAC;AAAA,IACL;AAAA,EACJ;AACJ","sourcesContent":["import { AppwriteException, Client, type Payload } from '../client';\nimport { User } from './user';\n\nexport class Relation {\n client: Client;\n\n constructor(client: Client) {\n this.client = client;\n }\n\n /**\n * Follow User\n *\n * Follow a user\n *\n * @param {number} userId - User ID to follow\n * @param {number} actorId - Current user ID\n * @param {string} token - Authentication token\n * @throws {AppwriteException}\n * @returns {Promise<{status_code: number, status_msg: string}>}\n */\n async follow(userId: number, actorId: number, token: string): Promise<{\n status_code: number;\n status_msg: string;\n }> {\n if (typeof userId === 'undefined') {\n throw new AppwriteException('Missing required parameter: \"userId\"');\n }\n if (typeof actorId === 'undefined') {\n throw new AppwriteException('Missing required parameter: \"actorId\"');\n }\n if (typeof token === 'undefined') {\n throw new AppwriteException('Missing required parameter: \"token\"');\n }\n\n const apiPath = '/douyin/relation/follow/';\n const payload: Payload = {};\n\n payload['to_user_id'] = userId;\n payload['actor_id'] = actorId;\n payload['token'] = token;\n\n const uri = new URL(this.client.config.endpoint + apiPath);\n\n const apiHeaders: { [header: string]: string } = {\n 'content-type': 'application/x-www-form-urlencoded',\n };\n\n return this.client.call(\n 'post',\n uri,\n apiHeaders,\n payload,\n );\n }\n\n /**\n * Unfollow User\n *\n * Unfollow a user\n *\n * @param {number} userId - User ID to unfollow\n * @param {number} actorId - Current user ID\n * @param {string} token - Authentication token\n * @throws {AppwriteException}\n * @returns {Promise<{status_code: number, status_msg: string}>}\n */\n async unfollow(userId: number, actorId: number, token: string): Promise<{\n status_code: number;\n status_msg: string;\n }> {\n if (typeof userId === 'undefined') {\n throw new AppwriteException('Missing required parameter: \"userId\"');\n }\n if (typeof actorId === 'undefined') {\n throw new AppwriteException('Missing required parameter: \"actorId\"');\n }\n if (typeof token === 'undefined') {\n throw new AppwriteException('Missing required parameter: \"token\"');\n }\n\n const apiPath = '/douyin/relation/unfollow/';\n const payload: Payload = {};\n\n payload['to_user_id'] = userId;\n payload['actor_id'] = actorId;\n payload['token'] = token;\n\n const uri = new URL(this.client.config.endpoint + apiPath);\n\n const apiHeaders: { [header: string]: string } = {\n 'content-type': 'application/x-www-form-urlencoded',\n };\n\n return this.client.call(\n 'post',\n uri,\n apiHeaders,\n payload,\n );\n }\n\n /**\n * Get Follow List\n *\n * Get list of users that a user is following\n *\n * @param {number} userId - User ID\n * @param {number} actorId - Current user ID\n * @param {string} token - Authentication token\n * @throws {AppwriteException}\n * @returns {Promise<{status_code: number, status_msg: string, user_list: User[]}>}\n */\n async getFollowList(userId: number, actorId: number, token: string): Promise<{\n status_code: number;\n status_msg: string;\n user_list: User[];\n }> {\n if (typeof userId === 'undefined') {\n throw new AppwriteException('Missing required parameter: \"userId\"');\n }\n if (typeof actorId === 'undefined') {\n throw new AppwriteException('Missing required parameter: \"actorId\"');\n }\n if (typeof token === 'undefined') {\n throw new AppwriteException('Missing required parameter: \"token\"');\n }\n\n const apiPath = '/douyin/relation/follow/list/';\n const payload: Payload = {};\n\n payload['user_id'] = userId;\n payload['actor_id'] = actorId;\n payload['token'] = token;\n\n const uri = new URL(this.client.config.endpoint + apiPath);\n Object.keys(payload).forEach(key => uri.searchParams.append(key, payload[key]));\n\n const apiHeaders: { [header: string]: string } = {\n 'content-type': 'application/json',\n };\n\n return this.client.call(\n 'get',\n uri,\n apiHeaders,\n {},\n );\n }\n\n /**\n * Get Follower List\n *\n * Get list of users following a user\n *\n * @param {number} userId - User ID\n * @param {number} actorId - Current user ID\n * @param {string} token - Authentication token\n * @throws {AppwriteException}\n * @returns {Promise<{status_code: number, status_msg: string, user_list: User[]}>}\n */\n async getFollowerList(userId: number, actorId: number, token: string): Promise<{\n status_code: number;\n status_msg: string;\n user_list: User[];\n }> {\n if (typeof userId === 'undefined') {\n throw new AppwriteException('Missing required parameter: \"userId\"');\n }\n if (typeof actorId === 'undefined') {\n throw new AppwriteException('Missing required parameter: \"actorId\"');\n }\n if (typeof token === 'undefined') {\n throw new AppwriteException('Missing required parameter: \"token\"');\n }\n\n const apiPath = '/douyin/relation/follower/list/';\n const payload: Payload = {};\n\n payload['user_id'] = userId;\n payload['actor_id'] = actorId;\n payload['token'] = token;\n\n const uri = new URL(this.client.config.endpoint + apiPath);\n Object.keys(payload).forEach(key => uri.searchParams.append(key, payload[key]));\n\n const apiHeaders: { [header: string]: string } = {\n 'content-type': 'application/json',\n };\n\n return this.client.call(\n 'get',\n uri,\n apiHeaders,\n {},\n );\n }\n\n /**\n * Get Friend List\n *\n * Get list of mutual friends\n *\n * @param {number} userId - User ID\n * @param {number} actorId - Current user ID\n * @param {string} token - Authentication token\n * @throws {AppwriteException}\n * @returns {Promise<{status_code: number, status_msg: string, user_list: User[]}>}\n */\n async getFriendList(userId: number, actorId: number, token: string): Promise<{\n status_code: number;\n status_msg: string;\n user_list: User[];\n }> {\n if (typeof userId === 'undefined') {\n throw new AppwriteException('Missing required parameter: \"userId\"');\n }\n if (typeof actorId === 'undefined') {\n throw new AppwriteException('Missing required parameter: \"actorId\"');\n }\n if (typeof token === 'undefined') {\n throw new AppwriteException('Missing required parameter: \"token\"');\n }\n\n const apiPath = '/douyin/relation/friend/list/';\n const payload: Payload = {};\n\n payload['user_id'] = userId;\n payload['actor_id'] = actorId;\n payload['token'] = token;\n\n const uri = new URL(this.client.config.endpoint + apiPath);\n Object.keys(payload).forEach(key => uri.searchParams.append(key, payload[key]));\n\n const apiHeaders: { [header: string]: string } = {\n 'content-type': 'application/json',\n };\n\n return this.client.call(\n 'get',\n uri,\n apiHeaders,\n {},\n );\n }\n\n /**\n * Check if Following\n *\n * Check if current user is following another user\n *\n * @param {number} userId - User ID to check\n * @param {number} actorId - Current user ID\n * @param {string} token - Authentication token\n * @throws {AppwriteException}\n * @returns {Promise<{result: boolean}>}\n */\n async isFollowing(userId: number, actorId: number, token: string): Promise<{\n result: boolean;\n }> {\n if (typeof userId === 'undefined') {\n throw new AppwriteException('Missing required parameter: \"userId\"');\n }\n if (typeof actorId === 'undefined') {\n throw new AppwriteException('Missing required parameter: \"actorId\"');\n }\n if (typeof token === 'undefined') {\n throw new AppwriteException('Missing required parameter: \"token\"');\n }\n\n const apiPath = '/douyin/relation/isFollow/';\n const payload: Payload = {};\n\n payload['user_id'] = userId;\n payload['actor_id'] = actorId;\n payload['token'] = token;\n\n const uri = new URL(this.client.config.endpoint + apiPath);\n Object.keys(payload).forEach(key => uri.searchParams.append(key, payload[key]));\n\n const apiHeaders: { [header: string]: string } = {\n 'content-type': 'application/json',\n };\n\n return this.client.call(\n 'get',\n uri,\n apiHeaders,\n {},\n );\n }\n}\n\n"]}
|
|
@@ -0,0 +1,238 @@
|
|
|
1
|
+
import { AppwriteException } from '../client.mjs';
|
|
2
|
+
|
|
3
|
+
// src/services/relation.ts
|
|
4
|
+
var Relation = class {
|
|
5
|
+
constructor(client) {
|
|
6
|
+
this.client = client;
|
|
7
|
+
}
|
|
8
|
+
/**
|
|
9
|
+
* Follow User
|
|
10
|
+
*
|
|
11
|
+
* Follow a user
|
|
12
|
+
*
|
|
13
|
+
* @param {number} userId - User ID to follow
|
|
14
|
+
* @param {number} actorId - Current user ID
|
|
15
|
+
* @param {string} token - Authentication token
|
|
16
|
+
* @throws {AppwriteException}
|
|
17
|
+
* @returns {Promise<{status_code: number, status_msg: string}>}
|
|
18
|
+
*/
|
|
19
|
+
async follow(userId, actorId, token) {
|
|
20
|
+
if (typeof userId === "undefined") {
|
|
21
|
+
throw new AppwriteException('Missing required parameter: "userId"');
|
|
22
|
+
}
|
|
23
|
+
if (typeof actorId === "undefined") {
|
|
24
|
+
throw new AppwriteException('Missing required parameter: "actorId"');
|
|
25
|
+
}
|
|
26
|
+
if (typeof token === "undefined") {
|
|
27
|
+
throw new AppwriteException('Missing required parameter: "token"');
|
|
28
|
+
}
|
|
29
|
+
const apiPath = "/douyin/relation/follow/";
|
|
30
|
+
const payload = {};
|
|
31
|
+
payload["to_user_id"] = userId;
|
|
32
|
+
payload["actor_id"] = actorId;
|
|
33
|
+
payload["token"] = token;
|
|
34
|
+
const uri = new URL(this.client.config.endpoint + apiPath);
|
|
35
|
+
const apiHeaders = {
|
|
36
|
+
"content-type": "application/x-www-form-urlencoded"
|
|
37
|
+
};
|
|
38
|
+
return this.client.call(
|
|
39
|
+
"post",
|
|
40
|
+
uri,
|
|
41
|
+
apiHeaders,
|
|
42
|
+
payload
|
|
43
|
+
);
|
|
44
|
+
}
|
|
45
|
+
/**
|
|
46
|
+
* Unfollow User
|
|
47
|
+
*
|
|
48
|
+
* Unfollow a user
|
|
49
|
+
*
|
|
50
|
+
* @param {number} userId - User ID to unfollow
|
|
51
|
+
* @param {number} actorId - Current user ID
|
|
52
|
+
* @param {string} token - Authentication token
|
|
53
|
+
* @throws {AppwriteException}
|
|
54
|
+
* @returns {Promise<{status_code: number, status_msg: string}>}
|
|
55
|
+
*/
|
|
56
|
+
async unfollow(userId, actorId, token) {
|
|
57
|
+
if (typeof userId === "undefined") {
|
|
58
|
+
throw new AppwriteException('Missing required parameter: "userId"');
|
|
59
|
+
}
|
|
60
|
+
if (typeof actorId === "undefined") {
|
|
61
|
+
throw new AppwriteException('Missing required parameter: "actorId"');
|
|
62
|
+
}
|
|
63
|
+
if (typeof token === "undefined") {
|
|
64
|
+
throw new AppwriteException('Missing required parameter: "token"');
|
|
65
|
+
}
|
|
66
|
+
const apiPath = "/douyin/relation/unfollow/";
|
|
67
|
+
const payload = {};
|
|
68
|
+
payload["to_user_id"] = userId;
|
|
69
|
+
payload["actor_id"] = actorId;
|
|
70
|
+
payload["token"] = token;
|
|
71
|
+
const uri = new URL(this.client.config.endpoint + apiPath);
|
|
72
|
+
const apiHeaders = {
|
|
73
|
+
"content-type": "application/x-www-form-urlencoded"
|
|
74
|
+
};
|
|
75
|
+
return this.client.call(
|
|
76
|
+
"post",
|
|
77
|
+
uri,
|
|
78
|
+
apiHeaders,
|
|
79
|
+
payload
|
|
80
|
+
);
|
|
81
|
+
}
|
|
82
|
+
/**
|
|
83
|
+
* Get Follow List
|
|
84
|
+
*
|
|
85
|
+
* Get list of users that a user is following
|
|
86
|
+
*
|
|
87
|
+
* @param {number} userId - User ID
|
|
88
|
+
* @param {number} actorId - Current user ID
|
|
89
|
+
* @param {string} token - Authentication token
|
|
90
|
+
* @throws {AppwriteException}
|
|
91
|
+
* @returns {Promise<{status_code: number, status_msg: string, user_list: User[]}>}
|
|
92
|
+
*/
|
|
93
|
+
async getFollowList(userId, actorId, token) {
|
|
94
|
+
if (typeof userId === "undefined") {
|
|
95
|
+
throw new AppwriteException('Missing required parameter: "userId"');
|
|
96
|
+
}
|
|
97
|
+
if (typeof actorId === "undefined") {
|
|
98
|
+
throw new AppwriteException('Missing required parameter: "actorId"');
|
|
99
|
+
}
|
|
100
|
+
if (typeof token === "undefined") {
|
|
101
|
+
throw new AppwriteException('Missing required parameter: "token"');
|
|
102
|
+
}
|
|
103
|
+
const apiPath = "/douyin/relation/follow/list/";
|
|
104
|
+
const payload = {};
|
|
105
|
+
payload["user_id"] = userId;
|
|
106
|
+
payload["actor_id"] = actorId;
|
|
107
|
+
payload["token"] = token;
|
|
108
|
+
const uri = new URL(this.client.config.endpoint + apiPath);
|
|
109
|
+
Object.keys(payload).forEach((key) => uri.searchParams.append(key, payload[key]));
|
|
110
|
+
const apiHeaders = {
|
|
111
|
+
"content-type": "application/json"
|
|
112
|
+
};
|
|
113
|
+
return this.client.call(
|
|
114
|
+
"get",
|
|
115
|
+
uri,
|
|
116
|
+
apiHeaders,
|
|
117
|
+
{}
|
|
118
|
+
);
|
|
119
|
+
}
|
|
120
|
+
/**
|
|
121
|
+
* Get Follower List
|
|
122
|
+
*
|
|
123
|
+
* Get list of users following a user
|
|
124
|
+
*
|
|
125
|
+
* @param {number} userId - User ID
|
|
126
|
+
* @param {number} actorId - Current user ID
|
|
127
|
+
* @param {string} token - Authentication token
|
|
128
|
+
* @throws {AppwriteException}
|
|
129
|
+
* @returns {Promise<{status_code: number, status_msg: string, user_list: User[]}>}
|
|
130
|
+
*/
|
|
131
|
+
async getFollowerList(userId, actorId, token) {
|
|
132
|
+
if (typeof userId === "undefined") {
|
|
133
|
+
throw new AppwriteException('Missing required parameter: "userId"');
|
|
134
|
+
}
|
|
135
|
+
if (typeof actorId === "undefined") {
|
|
136
|
+
throw new AppwriteException('Missing required parameter: "actorId"');
|
|
137
|
+
}
|
|
138
|
+
if (typeof token === "undefined") {
|
|
139
|
+
throw new AppwriteException('Missing required parameter: "token"');
|
|
140
|
+
}
|
|
141
|
+
const apiPath = "/douyin/relation/follower/list/";
|
|
142
|
+
const payload = {};
|
|
143
|
+
payload["user_id"] = userId;
|
|
144
|
+
payload["actor_id"] = actorId;
|
|
145
|
+
payload["token"] = token;
|
|
146
|
+
const uri = new URL(this.client.config.endpoint + apiPath);
|
|
147
|
+
Object.keys(payload).forEach((key) => uri.searchParams.append(key, payload[key]));
|
|
148
|
+
const apiHeaders = {
|
|
149
|
+
"content-type": "application/json"
|
|
150
|
+
};
|
|
151
|
+
return this.client.call(
|
|
152
|
+
"get",
|
|
153
|
+
uri,
|
|
154
|
+
apiHeaders,
|
|
155
|
+
{}
|
|
156
|
+
);
|
|
157
|
+
}
|
|
158
|
+
/**
|
|
159
|
+
* Get Friend List
|
|
160
|
+
*
|
|
161
|
+
* Get list of mutual friends
|
|
162
|
+
*
|
|
163
|
+
* @param {number} userId - User ID
|
|
164
|
+
* @param {number} actorId - Current user ID
|
|
165
|
+
* @param {string} token - Authentication token
|
|
166
|
+
* @throws {AppwriteException}
|
|
167
|
+
* @returns {Promise<{status_code: number, status_msg: string, user_list: User[]}>}
|
|
168
|
+
*/
|
|
169
|
+
async getFriendList(userId, actorId, token) {
|
|
170
|
+
if (typeof userId === "undefined") {
|
|
171
|
+
throw new AppwriteException('Missing required parameter: "userId"');
|
|
172
|
+
}
|
|
173
|
+
if (typeof actorId === "undefined") {
|
|
174
|
+
throw new AppwriteException('Missing required parameter: "actorId"');
|
|
175
|
+
}
|
|
176
|
+
if (typeof token === "undefined") {
|
|
177
|
+
throw new AppwriteException('Missing required parameter: "token"');
|
|
178
|
+
}
|
|
179
|
+
const apiPath = "/douyin/relation/friend/list/";
|
|
180
|
+
const payload = {};
|
|
181
|
+
payload["user_id"] = userId;
|
|
182
|
+
payload["actor_id"] = actorId;
|
|
183
|
+
payload["token"] = token;
|
|
184
|
+
const uri = new URL(this.client.config.endpoint + apiPath);
|
|
185
|
+
Object.keys(payload).forEach((key) => uri.searchParams.append(key, payload[key]));
|
|
186
|
+
const apiHeaders = {
|
|
187
|
+
"content-type": "application/json"
|
|
188
|
+
};
|
|
189
|
+
return this.client.call(
|
|
190
|
+
"get",
|
|
191
|
+
uri,
|
|
192
|
+
apiHeaders,
|
|
193
|
+
{}
|
|
194
|
+
);
|
|
195
|
+
}
|
|
196
|
+
/**
|
|
197
|
+
* Check if Following
|
|
198
|
+
*
|
|
199
|
+
* Check if current user is following another user
|
|
200
|
+
*
|
|
201
|
+
* @param {number} userId - User ID to check
|
|
202
|
+
* @param {number} actorId - Current user ID
|
|
203
|
+
* @param {string} token - Authentication token
|
|
204
|
+
* @throws {AppwriteException}
|
|
205
|
+
* @returns {Promise<{result: boolean}>}
|
|
206
|
+
*/
|
|
207
|
+
async isFollowing(userId, actorId, token) {
|
|
208
|
+
if (typeof userId === "undefined") {
|
|
209
|
+
throw new AppwriteException('Missing required parameter: "userId"');
|
|
210
|
+
}
|
|
211
|
+
if (typeof actorId === "undefined") {
|
|
212
|
+
throw new AppwriteException('Missing required parameter: "actorId"');
|
|
213
|
+
}
|
|
214
|
+
if (typeof token === "undefined") {
|
|
215
|
+
throw new AppwriteException('Missing required parameter: "token"');
|
|
216
|
+
}
|
|
217
|
+
const apiPath = "/douyin/relation/isFollow/";
|
|
218
|
+
const payload = {};
|
|
219
|
+
payload["user_id"] = userId;
|
|
220
|
+
payload["actor_id"] = actorId;
|
|
221
|
+
payload["token"] = token;
|
|
222
|
+
const uri = new URL(this.client.config.endpoint + apiPath);
|
|
223
|
+
Object.keys(payload).forEach((key) => uri.searchParams.append(key, payload[key]));
|
|
224
|
+
const apiHeaders = {
|
|
225
|
+
"content-type": "application/json"
|
|
226
|
+
};
|
|
227
|
+
return this.client.call(
|
|
228
|
+
"get",
|
|
229
|
+
uri,
|
|
230
|
+
apiHeaders,
|
|
231
|
+
{}
|
|
232
|
+
);
|
|
233
|
+
}
|
|
234
|
+
};
|
|
235
|
+
|
|
236
|
+
export { Relation };
|
|
237
|
+
//# sourceMappingURL=out.js.map
|
|
238
|
+
//# sourceMappingURL=relation.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../src/services/relation.ts"],"names":[],"mappings":";AAAA,SAAS,yBAA+C;AA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AAAA,IACL;AAAA,EACJ;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EAaA,MAAM,YAAY,QAAgB,SAAiB,OAEhD;AACC,QAAI,OAAO,WAAW,aAAa;AAC/B,YAAM,IAAI,kBAAkB,sCAAsC;AAAA,IACtE;AACA,QAAI,OAAO,YAAY,aAAa;AAChC,YAAM,IAAI,kBAAkB,uCAAuC;AAAA,IACvE;AACA,QAAI,OAAO,UAAU,aAAa;AAC9B,YAAM,IAAI,kBAAkB,qCAAqC;AAAA,IACrE;AAEA,UAAM,UAAU;AAChB,UAAM,UAAmB,CAAC;AAE1B,YAAQ,SAAS,IAAI;AACrB,YAAQ,UAAU,IAAI;AACtB,YAAQ,OAAO,IAAI;AAEnB,UAAM,MAAM,IAAI,IAAI,KAAK,OAAO,OAAO,WAAW,OAAO;AACzD,WAAO,KAAK,OAAO,EAAE,QAAQ,SAAO,IAAI,aAAa,OAAO,KAAK,QAAQ,GAAG,CAAC,CAAC;AAE9E,UAAM,aAA2C;AAAA,MAC7C,gBAAgB;AAAA,IACpB;AAEA,WAAO,KAAK,OAAO;AAAA,MACf;AAAA,MACA;AAAA,MACA;AAAA,MACA,CAAC;AAAA,IACL;AAAA,EACJ;AACJ","sourcesContent":["import { AppwriteException, Client, type Payload } from '../client';\nimport { User } from './user';\n\nexport class Relation {\n client: Client;\n\n constructor(client: Client) {\n this.client = client;\n }\n\n /**\n * Follow User\n *\n * Follow a user\n *\n * @param {number} userId - User ID to follow\n * @param {number} actorId - Current user ID\n * @param {string} token - Authentication token\n * @throws {AppwriteException}\n * @returns {Promise<{status_code: number, status_msg: string}>}\n */\n async follow(userId: number, actorId: number, token: string): Promise<{\n status_code: number;\n status_msg: string;\n }> {\n if (typeof userId === 'undefined') {\n throw new AppwriteException('Missing required parameter: \"userId\"');\n }\n if (typeof actorId === 'undefined') {\n throw new AppwriteException('Missing required parameter: \"actorId\"');\n }\n if (typeof token === 'undefined') {\n throw new AppwriteException('Missing required parameter: \"token\"');\n }\n\n const apiPath = '/douyin/relation/follow/';\n const payload: Payload = {};\n\n payload['to_user_id'] = userId;\n payload['actor_id'] = actorId;\n payload['token'] = token;\n\n const uri = new URL(this.client.config.endpoint + apiPath);\n\n const apiHeaders: { [header: string]: string } = {\n 'content-type': 'application/x-www-form-urlencoded',\n };\n\n return this.client.call(\n 'post',\n uri,\n apiHeaders,\n payload,\n );\n }\n\n /**\n * Unfollow User\n *\n * Unfollow a user\n *\n * @param {number} userId - User ID to unfollow\n * @param {number} actorId - Current user ID\n * @param {string} token - Authentication token\n * @throws {AppwriteException}\n * @returns {Promise<{status_code: number, status_msg: string}>}\n */\n async unfollow(userId: number, actorId: number, token: string): Promise<{\n status_code: number;\n status_msg: string;\n }> {\n if (typeof userId === 'undefined') {\n throw new AppwriteException('Missing required parameter: \"userId\"');\n }\n if (typeof actorId === 'undefined') {\n throw new AppwriteException('Missing required parameter: \"actorId\"');\n }\n if (typeof token === 'undefined') {\n throw new AppwriteException('Missing required parameter: \"token\"');\n }\n\n const apiPath = '/douyin/relation/unfollow/';\n const payload: Payload = {};\n\n payload['to_user_id'] = userId;\n payload['actor_id'] = actorId;\n payload['token'] = token;\n\n const uri = new URL(this.client.config.endpoint + apiPath);\n\n const apiHeaders: { [header: string]: string } = {\n 'content-type': 'application/x-www-form-urlencoded',\n };\n\n return this.client.call(\n 'post',\n uri,\n apiHeaders,\n payload,\n );\n }\n\n /**\n * Get Follow List\n *\n * Get list of users that a user is following\n *\n * @param {number} userId - User ID\n * @param {number} actorId - Current user ID\n * @param {string} token - Authentication token\n * @throws {AppwriteException}\n * @returns {Promise<{status_code: number, status_msg: string, user_list: User[]}>}\n */\n async getFollowList(userId: number, actorId: number, token: string): Promise<{\n status_code: number;\n status_msg: string;\n user_list: User[];\n }> {\n if (typeof userId === 'undefined') {\n throw new AppwriteException('Missing required parameter: \"userId\"');\n }\n if (typeof actorId === 'undefined') {\n throw new AppwriteException('Missing required parameter: \"actorId\"');\n }\n if (typeof token === 'undefined') {\n throw new AppwriteException('Missing required parameter: \"token\"');\n }\n\n const apiPath = '/douyin/relation/follow/list/';\n const payload: Payload = {};\n\n payload['user_id'] = userId;\n payload['actor_id'] = actorId;\n payload['token'] = token;\n\n const uri = new URL(this.client.config.endpoint + apiPath);\n Object.keys(payload).forEach(key => uri.searchParams.append(key, payload[key]));\n\n const apiHeaders: { [header: string]: string } = {\n 'content-type': 'application/json',\n };\n\n return this.client.call(\n 'get',\n uri,\n apiHeaders,\n {},\n );\n }\n\n /**\n * Get Follower List\n *\n * Get list of users following a user\n *\n * @param {number} userId - User ID\n * @param {number} actorId - Current user ID\n * @param {string} token - Authentication token\n * @throws {AppwriteException}\n * @returns {Promise<{status_code: number, status_msg: string, user_list: User[]}>}\n */\n async getFollowerList(userId: number, actorId: number, token: string): Promise<{\n status_code: number;\n status_msg: string;\n user_list: User[];\n }> {\n if (typeof userId === 'undefined') {\n throw new AppwriteException('Missing required parameter: \"userId\"');\n }\n if (typeof actorId === 'undefined') {\n throw new AppwriteException('Missing required parameter: \"actorId\"');\n }\n if (typeof token === 'undefined') {\n throw new AppwriteException('Missing required parameter: \"token\"');\n }\n\n const apiPath = '/douyin/relation/follower/list/';\n const payload: Payload = {};\n\n payload['user_id'] = userId;\n payload['actor_id'] = actorId;\n payload['token'] = token;\n\n const uri = new URL(this.client.config.endpoint + apiPath);\n Object.keys(payload).forEach(key => uri.searchParams.append(key, payload[key]));\n\n const apiHeaders: { [header: string]: string } = {\n 'content-type': 'application/json',\n };\n\n return this.client.call(\n 'get',\n uri,\n apiHeaders,\n {},\n );\n }\n\n /**\n * Get Friend List\n *\n * Get list of mutual friends\n *\n * @param {number} userId - User ID\n * @param {number} actorId - Current user ID\n * @param {string} token - Authentication token\n * @throws {AppwriteException}\n * @returns {Promise<{status_code: number, status_msg: string, user_list: User[]}>}\n */\n async getFriendList(userId: number, actorId: number, token: string): Promise<{\n status_code: number;\n status_msg: string;\n user_list: User[];\n }> {\n if (typeof userId === 'undefined') {\n throw new AppwriteException('Missing required parameter: \"userId\"');\n }\n if (typeof actorId === 'undefined') {\n throw new AppwriteException('Missing required parameter: \"actorId\"');\n }\n if (typeof token === 'undefined') {\n throw new AppwriteException('Missing required parameter: \"token\"');\n }\n\n const apiPath = '/douyin/relation/friend/list/';\n const payload: Payload = {};\n\n payload['user_id'] = userId;\n payload['actor_id'] = actorId;\n payload['token'] = token;\n\n const uri = new URL(this.client.config.endpoint + apiPath);\n Object.keys(payload).forEach(key => uri.searchParams.append(key, payload[key]));\n\n const apiHeaders: { [header: string]: string } = {\n 'content-type': 'application/json',\n };\n\n return this.client.call(\n 'get',\n uri,\n apiHeaders,\n {},\n );\n }\n\n /**\n * Check if Following\n *\n * Check if current user is following another user\n *\n * @param {number} userId - User ID to check\n * @param {number} actorId - Current user ID\n * @param {string} token - Authentication token\n * @throws {AppwriteException}\n * @returns {Promise<{result: boolean}>}\n */\n async isFollowing(userId: number, actorId: number, token: string): Promise<{\n result: boolean;\n }> {\n if (typeof userId === 'undefined') {\n throw new AppwriteException('Missing required parameter: \"userId\"');\n }\n if (typeof actorId === 'undefined') {\n throw new AppwriteException('Missing required parameter: \"actorId\"');\n }\n if (typeof token === 'undefined') {\n throw new AppwriteException('Missing required parameter: \"token\"');\n }\n\n const apiPath = '/douyin/relation/isFollow/';\n const payload: Payload = {};\n\n payload['user_id'] = userId;\n payload['actor_id'] = actorId;\n payload['token'] = token;\n\n const uri = new URL(this.client.config.endpoint + apiPath);\n Object.keys(payload).forEach(key => uri.searchParams.append(key, payload[key]));\n\n const apiHeaders: { [header: string]: string } = {\n 'content-type': 'application/json',\n };\n\n return this.client.call(\n 'get',\n uri,\n apiHeaders,\n {},\n );\n }\n}\n\n"]}
|