common-tg-service 1.0.1
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/LICENSE +21 -0
- package/README.md +201 -0
- package/dist/IMap/IMap.d.ts +13 -0
- package/dist/IMap/IMap.js +160 -0
- package/dist/IMap/IMap.js.map +1 -0
- package/dist/app.controller.d.ts +11 -0
- package/dist/app.controller.js +160 -0
- package/dist/app.controller.js.map +1 -0
- package/dist/app.module.d.ts +4 -0
- package/dist/app.module.js +79 -0
- package/dist/app.module.js.map +1 -0
- package/dist/app.service.d.ts +3 -0
- package/dist/app.service.js +20 -0
- package/dist/app.service.js.map +1 -0
- package/dist/cloudinary.d.ts +17 -0
- package/dist/cloudinary.js +207 -0
- package/dist/cloudinary.js.map +1 -0
- package/dist/components/ConfigurationInit/configuration.schema.d.ts +38 -0
- package/dist/components/ConfigurationInit/configuration.schema.js +31 -0
- package/dist/components/ConfigurationInit/configuration.schema.js.map +1 -0
- package/dist/components/ConfigurationInit/init.controller.d.ts +7 -0
- package/dist/components/ConfigurationInit/init.controller.js +52 -0
- package/dist/components/ConfigurationInit/init.controller.js.map +1 -0
- package/dist/components/ConfigurationInit/init.module.d.ts +34 -0
- package/dist/components/ConfigurationInit/init.module.js +65 -0
- package/dist/components/ConfigurationInit/init.module.js.map +1 -0
- package/dist/components/ConfigurationInit/init.service.d.ts +35 -0
- package/dist/components/ConfigurationInit/init.service.js +59 -0
- package/dist/components/ConfigurationInit/init.service.js.map +1 -0
- package/dist/components/Telegram/Telegram.controller.d.ts +356 -0
- package/dist/components/Telegram/Telegram.controller.js +1366 -0
- package/dist/components/Telegram/Telegram.controller.js.map +1 -0
- package/dist/components/Telegram/Telegram.module.d.ts +2 -0
- package/dist/components/Telegram/Telegram.module.js +47 -0
- package/dist/components/Telegram/Telegram.module.js.map +1 -0
- package/dist/components/Telegram/Telegram.service.d.ts +453 -0
- package/dist/components/Telegram/Telegram.service.js +679 -0
- package/dist/components/Telegram/Telegram.service.js.map +1 -0
- package/dist/components/Telegram/TelegramManager.d.ts +486 -0
- package/dist/components/Telegram/TelegramManager.js +2530 -0
- package/dist/components/Telegram/TelegramManager.js.map +1 -0
- package/dist/components/Telegram/config/telegram-validation.config.d.ts +15 -0
- package/dist/components/Telegram/config/telegram-validation.config.js +47 -0
- package/dist/components/Telegram/config/telegram-validation.config.js.map +1 -0
- package/dist/components/Telegram/dto/batch-operations.dto.d.ts +24 -0
- package/dist/components/Telegram/dto/batch-operations.dto.js +102 -0
- package/dist/components/Telegram/dto/batch-operations.dto.js.map +1 -0
- package/dist/components/Telegram/dto/channel-operation.dto.d.ts +5 -0
- package/dist/components/Telegram/dto/channel-operation.dto.js +35 -0
- package/dist/components/Telegram/dto/channel-operation.dto.js.map +1 -0
- package/dist/components/Telegram/dto/common-responses.dto.d.ts +18 -0
- package/dist/components/Telegram/dto/common-responses.dto.js +52 -0
- package/dist/components/Telegram/dto/common-responses.dto.js.map +1 -0
- package/dist/components/Telegram/dto/contact-block-list.dto.d.ts +4 -0
- package/dist/components/Telegram/dto/contact-block-list.dto.js +28 -0
- package/dist/components/Telegram/dto/contact-block-list.dto.js.map +1 -0
- package/dist/components/Telegram/dto/contact-management.dto.d.ts +25 -0
- package/dist/components/Telegram/dto/contact-management.dto.js +88 -0
- package/dist/components/Telegram/dto/contact-management.dto.js.map +1 -0
- package/dist/components/Telegram/dto/contact-operation.dto.d.ts +12 -0
- package/dist/components/Telegram/dto/contact-operation.dto.js +43 -0
- package/dist/components/Telegram/dto/contact-operation.dto.js.map +1 -0
- package/dist/components/Telegram/dto/create-chat-folder.dto.d.ts +13 -0
- package/dist/components/Telegram/dto/create-chat-folder.dto.js +84 -0
- package/dist/components/Telegram/dto/create-chat-folder.dto.js.map +1 -0
- package/dist/components/Telegram/dto/group-operations.dto.d.ts +77 -0
- package/dist/components/Telegram/dto/group-operations.dto.js +282 -0
- package/dist/components/Telegram/dto/group-operations.dto.js.map +1 -0
- package/dist/components/Telegram/dto/index.d.ts +12 -0
- package/dist/components/Telegram/dto/index.js +32 -0
- package/dist/components/Telegram/dto/index.js.map +1 -0
- package/dist/components/Telegram/dto/media-filter.dto.d.ts +14 -0
- package/dist/components/Telegram/dto/media-filter.dto.js +64 -0
- package/dist/components/Telegram/dto/media-filter.dto.js.map +1 -0
- package/dist/components/Telegram/dto/media-metadata.dto.d.ts +0 -0
- package/dist/components/Telegram/dto/media-metadata.dto.js +1 -0
- package/dist/components/Telegram/dto/media-metadata.dto.js.map +1 -0
- package/dist/components/Telegram/dto/media-operations.dto.d.ts +38 -0
- package/dist/components/Telegram/dto/media-operations.dto.js +152 -0
- package/dist/components/Telegram/dto/media-operations.dto.js.map +1 -0
- package/dist/components/Telegram/dto/message-operations.dto.d.ts +0 -0
- package/dist/components/Telegram/dto/message-operations.dto.js +1 -0
- package/dist/components/Telegram/dto/message-operations.dto.js.map +1 -0
- package/dist/components/Telegram/dto/message-search.dto.d.ts +15 -0
- package/dist/components/Telegram/dto/message-search.dto.js +60 -0
- package/dist/components/Telegram/dto/message-search.dto.js.map +1 -0
- package/dist/components/Telegram/dto/metadata-operations.dto.d.ts +20 -0
- package/dist/components/Telegram/dto/metadata-operations.dto.js +101 -0
- package/dist/components/Telegram/dto/metadata-operations.dto.js.map +1 -0
- package/dist/components/Telegram/dto/notification-settings.dto.d.ts +15 -0
- package/dist/components/Telegram/dto/notification-settings.dto.js +60 -0
- package/dist/components/Telegram/dto/notification-settings.dto.js.map +1 -0
- package/dist/components/Telegram/dto/profile-settings.dto.d.ts +20 -0
- package/dist/components/Telegram/dto/profile-settings.dto.js +91 -0
- package/dist/components/Telegram/dto/profile-settings.dto.js.map +1 -0
- package/dist/components/Telegram/dto/response-validation.dto.d.ts +7 -0
- package/dist/components/Telegram/dto/response-validation.dto.js +37 -0
- package/dist/components/Telegram/dto/response-validation.dto.js.map +1 -0
- package/dist/components/Telegram/dto/schedule-operations.dto.d.ts +22 -0
- package/dist/components/Telegram/dto/schedule-operations.dto.js +97 -0
- package/dist/components/Telegram/dto/schedule-operations.dto.js.map +1 -0
- package/dist/components/Telegram/dto/update-profile.dto.d.ts +4 -0
- package/dist/components/Telegram/dto/update-profile.dto.js +29 -0
- package/dist/components/Telegram/dto/update-profile.dto.js.map +1 -0
- package/dist/components/Telegram/index.d.ts +5 -0
- package/dist/components/Telegram/index.js +22 -0
- package/dist/components/Telegram/index.js.map +1 -0
- package/dist/components/Telegram/types/client-operations.d.ts +34 -0
- package/dist/components/Telegram/types/client-operations.js +3 -0
- package/dist/components/Telegram/types/client-operations.js.map +1 -0
- package/dist/components/Telegram/types/telegram-error.d.ts +15 -0
- package/dist/components/Telegram/types/telegram-error.js +23 -0
- package/dist/components/Telegram/types/telegram-error.js.map +1 -0
- package/dist/components/Telegram/types/telegram-responses.d.ts +7 -0
- package/dist/components/Telegram/types/telegram-responses.js +3 -0
- package/dist/components/Telegram/types/telegram-responses.js.map +1 -0
- package/dist/components/Telegram/types/telegram-types.d.ts +14 -0
- package/dist/components/Telegram/types/telegram-types.js +3 -0
- package/dist/components/Telegram/types/telegram-types.js.map +1 -0
- package/dist/components/Telegram/utils/client-metadata.d.ts +19 -0
- package/dist/components/Telegram/utils/client-metadata.js +71 -0
- package/dist/components/Telegram/utils/client-metadata.js.map +1 -0
- package/dist/components/Telegram/utils/connection-manager.d.ts +17 -0
- package/dist/components/Telegram/utils/connection-manager.js +75 -0
- package/dist/components/Telegram/utils/connection-manager.js.map +1 -0
- package/dist/components/Telegram/utils/rate-limiter.d.ts +9 -0
- package/dist/components/Telegram/utils/rate-limiter.js +31 -0
- package/dist/components/Telegram/utils/rate-limiter.js.map +1 -0
- package/dist/components/Telegram/utils/telegram-logger.d.ts +10 -0
- package/dist/components/Telegram/utils/telegram-logger.js +29 -0
- package/dist/components/Telegram/utils/telegram-logger.js.map +1 -0
- package/dist/components/TgSignup/TgSignup.module.d.ts +2 -0
- package/dist/components/TgSignup/TgSignup.module.js +25 -0
- package/dist/components/TgSignup/TgSignup.module.js.map +1 -0
- package/dist/components/TgSignup/TgSignup.service.d.ts +24 -0
- package/dist/components/TgSignup/TgSignup.service.js +351 -0
- package/dist/components/TgSignup/TgSignup.service.js.map +1 -0
- package/dist/components/TgSignup/dto/tg-signup.dto.d.ts +16 -0
- package/dist/components/TgSignup/dto/tg-signup.dto.js +111 -0
- package/dist/components/TgSignup/dto/tg-signup.dto.js.map +1 -0
- package/dist/components/TgSignup/tgSignup.controller.d.ts +9 -0
- package/dist/components/TgSignup/tgSignup.controller.js +142 -0
- package/dist/components/TgSignup/tgSignup.controller.js.map +1 -0
- package/dist/components/active-channels/active-channels.controller.d.ts +19 -0
- package/dist/components/active-channels/active-channels.controller.js +168 -0
- package/dist/components/active-channels/active-channels.controller.js.map +1 -0
- package/dist/components/active-channels/active-channels.module.d.ts +2 -0
- package/dist/components/active-channels/active-channels.module.js +32 -0
- package/dist/components/active-channels/active-channels.module.js.map +1 -0
- package/dist/components/active-channels/active-channels.service.d.ts +61 -0
- package/dist/components/active-channels/active-channels.service.js +229 -0
- package/dist/components/active-channels/active-channels.service.js.map +1 -0
- package/dist/components/active-channels/dto/add-reaction.dto.d.ts +3 -0
- package/dist/components/active-channels/dto/add-reaction.dto.js +21 -0
- package/dist/components/active-channels/dto/add-reaction.dto.js.map +1 -0
- package/dist/components/active-channels/dto/create-active-channel.dto.d.ts +19 -0
- package/dist/components/active-channels/dto/create-active-channel.dto.js +117 -0
- package/dist/components/active-channels/dto/create-active-channel.dto.js.map +1 -0
- package/dist/components/active-channels/dto/update-active-channel.dto.d.ts +5 -0
- package/dist/components/active-channels/dto/update-active-channel.dto.js +9 -0
- package/dist/components/active-channels/dto/update-active-channel.dto.js.map +1 -0
- package/dist/components/active-channels/schemas/active-channel.schema.d.ts +56 -0
- package/dist/components/active-channels/schemas/active-channel.schema.js +142 -0
- package/dist/components/active-channels/schemas/active-channel.schema.js.map +1 -0
- package/dist/components/archived-clients/archived-client.controller.d.ts +18 -0
- package/dist/components/archived-clients/archived-client.controller.js +137 -0
- package/dist/components/archived-clients/archived-client.controller.js.map +1 -0
- package/dist/components/archived-clients/archived-client.module.d.ts +2 -0
- package/dist/components/archived-clients/archived-client.module.js +34 -0
- package/dist/components/archived-clients/archived-client.module.js.map +1 -0
- package/dist/components/archived-clients/archived-client.service.d.ts +46 -0
- package/dist/components/archived-clients/archived-client.service.js +147 -0
- package/dist/components/archived-clients/archived-client.service.js.map +1 -0
- package/dist/components/buffer-clients/buffer-client.controller.d.ts +24 -0
- package/dist/components/buffer-clients/buffer-client.controller.js +174 -0
- package/dist/components/buffer-clients/buffer-client.controller.js.map +1 -0
- package/dist/components/buffer-clients/buffer-client.module.d.ts +2 -0
- package/dist/components/buffer-clients/buffer-client.module.js +42 -0
- package/dist/components/buffer-clients/buffer-client.module.js.map +1 -0
- package/dist/components/buffer-clients/buffer-client.service.d.ts +75 -0
- package/dist/components/buffer-clients/buffer-client.service.js +533 -0
- package/dist/components/buffer-clients/buffer-client.service.js.map +1 -0
- package/dist/components/buffer-clients/dto/create-buffer-client.dto.d.ts +7 -0
- package/dist/components/buffer-clients/dto/create-buffer-client.dto.js +59 -0
- package/dist/components/buffer-clients/dto/create-buffer-client.dto.js.map +1 -0
- package/dist/components/buffer-clients/dto/search-buffer- client.dto.d.ts +7 -0
- package/dist/components/buffer-clients/dto/search-buffer- client.dto.js +63 -0
- package/dist/components/buffer-clients/dto/search-buffer- client.dto.js.map +1 -0
- package/dist/components/buffer-clients/dto/update-buffer-client.dto.d.ts +5 -0
- package/dist/components/buffer-clients/dto/update-buffer-client.dto.js +9 -0
- package/dist/components/buffer-clients/dto/update-buffer-client.dto.js.map +1 -0
- package/dist/components/buffer-clients/schemas/buffer-client.schema.d.ts +43 -0
- package/dist/components/buffer-clients/schemas/buffer-client.schema.js +49 -0
- package/dist/components/buffer-clients/schemas/buffer-client.schema.js.map +1 -0
- package/dist/components/builds/build.controller.d.ts +7 -0
- package/dist/components/builds/build.controller.js +52 -0
- package/dist/components/builds/build.controller.js.map +1 -0
- package/dist/components/builds/build.module.d.ts +2 -0
- package/dist/components/builds/build.module.js +32 -0
- package/dist/components/builds/build.module.js.map +1 -0
- package/dist/components/builds/build.service.d.ts +36 -0
- package/dist/components/builds/build.service.js +58 -0
- package/dist/components/builds/build.service.js.map +1 -0
- package/dist/components/builds/builds.schema.d.ts +38 -0
- package/dist/components/builds/builds.schema.js +29 -0
- package/dist/components/builds/builds.schema.js.map +1 -0
- package/dist/components/channels/channels.controller.d.ts +16 -0
- package/dist/components/channels/channels.controller.js +112 -0
- package/dist/components/channels/channels.controller.js.map +1 -0
- package/dist/components/channels/channels.module.d.ts +2 -0
- package/dist/components/channels/channels.module.js +30 -0
- package/dist/components/channels/channels.module.js.map +1 -0
- package/dist/components/channels/channels.service.d.ts +43 -0
- package/dist/components/channels/channels.service.js +167 -0
- package/dist/components/channels/channels.service.js.map +1 -0
- package/dist/components/channels/dto/create-channel.dto.d.ts +13 -0
- package/dist/components/channels/dto/create-channel.dto.js +104 -0
- package/dist/components/channels/dto/create-channel.dto.js.map +1 -0
- package/dist/components/channels/dto/search-channel.dto.d.ts +9 -0
- package/dist/components/channels/dto/search-channel.dto.js +66 -0
- package/dist/components/channels/dto/search-channel.dto.js.map +1 -0
- package/dist/components/channels/dto/update-channel.dto.d.ts +5 -0
- package/dist/components/channels/dto/update-channel.dto.js +9 -0
- package/dist/components/channels/dto/update-channel.dto.js.map +1 -0
- package/dist/components/channels/schemas/channel.schema.d.ts +49 -0
- package/dist/components/channels/schemas/channel.schema.js +93 -0
- package/dist/components/channels/schemas/channel.schema.js.map +1 -0
- package/dist/components/clients/client.controller.d.ts +32 -0
- package/dist/components/clients/client.controller.js +230 -0
- package/dist/components/clients/client.controller.js.map +1 -0
- package/dist/components/clients/client.module.d.ts +2 -0
- package/dist/components/clients/client.module.js +40 -0
- package/dist/components/clients/client.module.js.map +1 -0
- package/dist/components/clients/client.service.d.ts +76 -0
- package/dist/components/clients/client.service.js +417 -0
- package/dist/components/clients/client.service.js.map +1 -0
- package/dist/components/clients/dto/create-client.dto.d.ts +17 -0
- package/dist/components/clients/dto/create-client.dto.js +77 -0
- package/dist/components/clients/dto/create-client.dto.js.map +1 -0
- package/dist/components/clients/dto/search-client.dto.d.ts +16 -0
- package/dist/components/clients/dto/search-client.dto.js +119 -0
- package/dist/components/clients/dto/search-client.dto.js.map +1 -0
- package/dist/components/clients/dto/setup-client.dto.d.ts +6 -0
- package/dist/components/clients/dto/setup-client.dto.js +66 -0
- package/dist/components/clients/dto/setup-client.dto.js.map +1 -0
- package/dist/components/clients/dto/update-client.dto.d.ts +5 -0
- package/dist/components/clients/dto/update-client.dto.js +9 -0
- package/dist/components/clients/dto/update-client.dto.js.map +1 -0
- package/dist/components/clients/schemas/client.schema.d.ts +53 -0
- package/dist/components/clients/schemas/client.schema.js +105 -0
- package/dist/components/clients/schemas/client.schema.js.map +1 -0
- package/dist/components/n-point/npoint.controller.d.ts +9 -0
- package/dist/components/n-point/npoint.controller.js +134 -0
- package/dist/components/n-point/npoint.controller.js.map +1 -0
- package/dist/components/n-point/npoint.module.d.ts +2 -0
- package/dist/components/n-point/npoint.module.js +23 -0
- package/dist/components/n-point/npoint.module.js.map +1 -0
- package/dist/components/n-point/npoint.service.d.ts +14 -0
- package/dist/components/n-point/npoint.service.js +158 -0
- package/dist/components/n-point/npoint.service.js.map +1 -0
- package/dist/components/promote-clients/dto/create-promote-client.dto.d.ts +7 -0
- package/dist/components/promote-clients/dto/create-promote-client.dto.js +59 -0
- package/dist/components/promote-clients/dto/create-promote-client.dto.js.map +1 -0
- package/dist/components/promote-clients/dto/search-promote-client.dto.d.ts +6 -0
- package/dist/components/promote-clients/dto/search-promote-client.dto.js +54 -0
- package/dist/components/promote-clients/dto/search-promote-client.dto.js.map +1 -0
- package/dist/components/promote-clients/dto/update-promote-client.dto.d.ts +5 -0
- package/dist/components/promote-clients/dto/update-promote-client.dto.js +9 -0
- package/dist/components/promote-clients/dto/update-promote-client.dto.js.map +1 -0
- package/dist/components/promote-clients/promote-client.controller.d.ts +24 -0
- package/dist/components/promote-clients/promote-client.controller.js +174 -0
- package/dist/components/promote-clients/promote-client.controller.js.map +1 -0
- package/dist/components/promote-clients/promote-client.module.d.ts +2 -0
- package/dist/components/promote-clients/promote-client.module.js +42 -0
- package/dist/components/promote-clients/promote-client.module.js.map +1 -0
- package/dist/components/promote-clients/promote-client.service.d.ts +73 -0
- package/dist/components/promote-clients/promote-client.service.js +564 -0
- package/dist/components/promote-clients/promote-client.service.js.map +1 -0
- package/dist/components/promote-clients/schemas/promote-client.schema.d.ts +43 -0
- package/dist/components/promote-clients/schemas/promote-client.schema.js +49 -0
- package/dist/components/promote-clients/schemas/promote-client.schema.js.map +1 -0
- package/dist/components/promote-msgs/promote-msgs.controller.d.ts +7 -0
- package/dist/components/promote-msgs/promote-msgs.controller.js +52 -0
- package/dist/components/promote-msgs/promote-msgs.controller.js.map +1 -0
- package/dist/components/promote-msgs/promote-msgs.module.d.ts +2 -0
- package/dist/components/promote-msgs/promote-msgs.module.js +30 -0
- package/dist/components/promote-msgs/promote-msgs.module.js.map +1 -0
- package/dist/components/promote-msgs/promote-msgs.schema.d.ts +38 -0
- package/dist/components/promote-msgs/promote-msgs.schema.js +29 -0
- package/dist/components/promote-msgs/promote-msgs.schema.js.map +1 -0
- package/dist/components/promote-msgs/promote-msgs.service.d.ts +34 -0
- package/dist/components/promote-msgs/promote-msgs.service.js +48 -0
- package/dist/components/promote-msgs/promote-msgs.service.js.map +1 -0
- package/dist/components/promote-stats/dto/create-promote-stat.dto.d.ts +10 -0
- package/dist/components/promote-stats/dto/create-promote-stat.dto.js +49 -0
- package/dist/components/promote-stats/dto/create-promote-stat.dto.js.map +1 -0
- package/dist/components/promote-stats/dto/update-promote-stat.dto.d.ts +5 -0
- package/dist/components/promote-stats/dto/update-promote-stat.dto.js +9 -0
- package/dist/components/promote-stats/dto/update-promote-stat.dto.js.map +1 -0
- package/dist/components/promote-stats/promote-stat.controller.d.ts +12 -0
- package/dist/components/promote-stats/promote-stat.controller.js +82 -0
- package/dist/components/promote-stats/promote-stat.controller.js.map +1 -0
- package/dist/components/promote-stats/promote-stat.module.d.ts +2 -0
- package/dist/components/promote-stats/promote-stat.module.js +31 -0
- package/dist/components/promote-stats/promote-stat.module.js.map +1 -0
- package/dist/components/promote-stats/promote-stat.service.d.ts +42 -0
- package/dist/components/promote-stats/promote-stat.service.js +80 -0
- package/dist/components/promote-stats/promote-stat.service.js.map +1 -0
- package/dist/components/promote-stats/schemas/promote-stat.schema.d.ts +46 -0
- package/dist/components/promote-stats/schemas/promote-stat.schema.js +62 -0
- package/dist/components/promote-stats/schemas/promote-stat.schema.js.map +1 -0
- package/dist/components/shared/dto/execute-request.dto.d.ts +21 -0
- package/dist/components/shared/dto/execute-request.dto.js +86 -0
- package/dist/components/shared/dto/execute-request.dto.js.map +1 -0
- package/dist/components/stats/create-stat.dto.d.ts +14 -0
- package/dist/components/stats/create-stat.dto.js +65 -0
- package/dist/components/stats/create-stat.dto.js.map +1 -0
- package/dist/components/stats/stat.controller.d.ts +12 -0
- package/dist/components/stats/stat.controller.js +85 -0
- package/dist/components/stats/stat.controller.js.map +1 -0
- package/dist/components/stats/stat.module.d.ts +2 -0
- package/dist/components/stats/stat.module.js +30 -0
- package/dist/components/stats/stat.module.js.map +1 -0
- package/dist/components/stats/stat.schema.d.ts +50 -0
- package/dist/components/stats/stat.schema.js +83 -0
- package/dist/components/stats/stat.schema.js.map +1 -0
- package/dist/components/stats/stat.service.d.ts +39 -0
- package/dist/components/stats/stat.service.js +61 -0
- package/dist/components/stats/stat.service.js.map +1 -0
- package/dist/components/stats/update-stat.dto.d.ts +5 -0
- package/dist/components/stats/update-stat.dto.js +9 -0
- package/dist/components/stats/update-stat.dto.js.map +1 -0
- package/dist/components/stats2/create-stat2.dto.d.ts +14 -0
- package/dist/components/stats2/create-stat2.dto.js +65 -0
- package/dist/components/stats2/create-stat2.dto.js.map +1 -0
- package/dist/components/stats2/stat2.controller.d.ts +12 -0
- package/dist/components/stats2/stat2.controller.js +85 -0
- package/dist/components/stats2/stat2.controller.js.map +1 -0
- package/dist/components/stats2/stat2.module.d.ts +2 -0
- package/dist/components/stats2/stat2.module.js +30 -0
- package/dist/components/stats2/stat2.module.js.map +1 -0
- package/dist/components/stats2/stat2.schema.d.ts +50 -0
- package/dist/components/stats2/stat2.schema.js +83 -0
- package/dist/components/stats2/stat2.schema.js.map +1 -0
- package/dist/components/stats2/stat2.service.d.ts +39 -0
- package/dist/components/stats2/stat2.service.js +61 -0
- package/dist/components/stats2/stat2.service.js.map +1 -0
- package/dist/components/stats2/update-stat2.dto.d.ts +5 -0
- package/dist/components/stats2/update-stat2.dto.js +9 -0
- package/dist/components/stats2/update-stat2.dto.js.map +1 -0
- package/dist/components/transactions/dto/create-transaction.dto.d.ts +10 -0
- package/dist/components/transactions/dto/create-transaction.dto.js +49 -0
- package/dist/components/transactions/dto/create-transaction.dto.js.map +1 -0
- package/dist/components/transactions/dto/update-transaction.dto.d.ts +5 -0
- package/dist/components/transactions/dto/update-transaction.dto.js +9 -0
- package/dist/components/transactions/dto/update-transaction.dto.js.map +1 -0
- package/dist/components/transactions/schemas/transaction.schema.d.ts +45 -0
- package/dist/components/transactions/schemas/transaction.schema.js +54 -0
- package/dist/components/transactions/schemas/transaction.schema.js.map +1 -0
- package/dist/components/transactions/transaction.controller.d.ts +15 -0
- package/dist/components/transactions/transaction.controller.js +99 -0
- package/dist/components/transactions/transaction.controller.js.map +1 -0
- package/dist/components/transactions/transaction.module.d.ts +2 -0
- package/dist/components/transactions/transaction.module.js +30 -0
- package/dist/components/transactions/transaction.module.js.map +1 -0
- package/dist/components/transactions/transaction.service.d.ts +41 -0
- package/dist/components/transactions/transaction.service.js +77 -0
- package/dist/components/transactions/transaction.service.js.map +1 -0
- package/dist/components/upi-ids/upi-ids.controller.d.ts +7 -0
- package/dist/components/upi-ids/upi-ids.controller.js +52 -0
- package/dist/components/upi-ids/upi-ids.controller.js.map +1 -0
- package/dist/components/upi-ids/upi-ids.module.d.ts +2 -0
- package/dist/components/upi-ids/upi-ids.module.js +32 -0
- package/dist/components/upi-ids/upi-ids.module.js.map +1 -0
- package/dist/components/upi-ids/upi-ids.schema.d.ts +38 -0
- package/dist/components/upi-ids/upi-ids.schema.js +33 -0
- package/dist/components/upi-ids/upi-ids.schema.js.map +1 -0
- package/dist/components/upi-ids/upi-ids.service.d.ts +39 -0
- package/dist/components/upi-ids/upi-ids.service.js +83 -0
- package/dist/components/upi-ids/upi-ids.service.js.map +1 -0
- package/dist/components/user-data/dto/create-user-data.dto.d.ts +22 -0
- package/dist/components/user-data/dto/create-user-data.dto.js +97 -0
- package/dist/components/user-data/dto/create-user-data.dto.js.map +1 -0
- package/dist/components/user-data/dto/search-user-data.dto.d.ts +18 -0
- package/dist/components/user-data/dto/search-user-data.dto.js +83 -0
- package/dist/components/user-data/dto/search-user-data.dto.js.map +1 -0
- package/dist/components/user-data/dto/update-user-data.dto.d.ts +5 -0
- package/dist/components/user-data/dto/update-user-data.dto.js +9 -0
- package/dist/components/user-data/dto/update-user-data.dto.js.map +1 -0
- package/dist/components/user-data/schemas/user-data.schema.d.ts +59 -0
- package/dist/components/user-data/schemas/user-data.schema.js +113 -0
- package/dist/components/user-data/schemas/user-data.schema.js.map +1 -0
- package/dist/components/user-data/user-data.controller.d.ts +18 -0
- package/dist/components/user-data/user-data.controller.js +141 -0
- package/dist/components/user-data/user-data.controller.js.map +1 -0
- package/dist/components/user-data/user-data.module.d.ts +2 -0
- package/dist/components/user-data/user-data.module.js +30 -0
- package/dist/components/user-data/user-data.module.js.map +1 -0
- package/dist/components/user-data/user-data.service.d.ts +46 -0
- package/dist/components/user-data/user-data.service.js +131 -0
- package/dist/components/user-data/user-data.service.js.map +1 -0
- package/dist/components/users/dto/create-user.dto.d.ts +33 -0
- package/dist/components/users/dto/create-user.dto.js +142 -0
- package/dist/components/users/dto/create-user.dto.js.map +1 -0
- package/dist/components/users/dto/search-user.dto.d.ts +24 -0
- package/dist/components/users/dto/search-user.dto.js +152 -0
- package/dist/components/users/dto/search-user.dto.js.map +1 -0
- package/dist/components/users/dto/update-user.dto.d.ts +5 -0
- package/dist/components/users/dto/update-user.dto.js +9 -0
- package/dist/components/users/dto/update-user.dto.js.map +1 -0
- package/dist/components/users/schemas/user.schema.d.ts +70 -0
- package/dist/components/users/schemas/user.schema.js +179 -0
- package/dist/components/users/schemas/user.schema.js.map +1 -0
- package/dist/components/users/users.controller.d.ts +16 -0
- package/dist/components/users/users.controller.js +120 -0
- package/dist/components/users/users.controller.js.map +1 -0
- package/dist/components/users/users.module.d.ts +2 -0
- package/dist/components/users/users.module.js +34 -0
- package/dist/components/users/users.module.js.map +1 -0
- package/dist/components/users/users.service.d.ts +46 -0
- package/dist/components/users/users.service.js +117 -0
- package/dist/components/users/users.service.js.map +1 -0
- package/dist/features/clients/index.d.ts +14 -0
- package/dist/features/clients/index.js +31 -0
- package/dist/features/clients/index.js.map +1 -0
- package/dist/features/stats/index.d.ts +10 -0
- package/dist/features/stats/index.js +31 -0
- package/dist/features/stats/index.js.map +1 -0
- package/dist/features/telegram/index.d.ts +4 -0
- package/dist/features/telegram/index.js +26 -0
- package/dist/features/telegram/index.js.map +1 -0
- package/dist/index.d.ts +30 -0
- package/dist/index.js +45 -0
- package/dist/index.js.map +1 -0
- package/dist/interfaces/telegram.d.ts +86 -0
- package/dist/interfaces/telegram.js +10 -0
- package/dist/interfaces/telegram.js.map +1 -0
- package/dist/main.d.ts +1 -0
- package/dist/main.js +81 -0
- package/dist/main.js.map +1 -0
- package/dist/middlewares/logger.middleware.d.ts +6 -0
- package/dist/middlewares/logger.middleware.js +60 -0
- package/dist/middlewares/logger.middleware.js.map +1 -0
- package/dist/tsconfig.build.tsbuildinfo +1 -0
- package/dist/utils/fetchWithTimeout.d.ts +4 -0
- package/dist/utils/fetchWithTimeout.js +180 -0
- package/dist/utils/fetchWithTimeout.js.map +1 -0
- package/dist/utils/index.d.ts +4 -0
- package/dist/utils/index.js +16 -0
- package/dist/utils/index.js.map +1 -0
- package/dist/utils/logbots.d.ts +2 -0
- package/dist/utils/logbots.js +36 -0
- package/dist/utils/logbots.js.map +1 -0
- package/dist/utils/parseError.d.ts +6 -0
- package/dist/utils/parseError.js +115 -0
- package/dist/utils/parseError.js.map +1 -0
- package/dist/utils.d.ts +8 -0
- package/dist/utils.js +87 -0
- package/dist/utils.js.map +1 -0
- package/package.json +109 -0
|
@@ -0,0 +1,1366 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
|
3
|
+
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
4
|
+
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
5
|
+
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
6
|
+
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
7
|
+
};
|
|
8
|
+
var __metadata = (this && this.__metadata) || function (k, v) {
|
|
9
|
+
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
|
|
10
|
+
};
|
|
11
|
+
var __param = (this && this.__param) || function (paramIndex, decorator) {
|
|
12
|
+
return function (target, key) { decorator(target, key, paramIndex); }
|
|
13
|
+
};
|
|
14
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
15
|
+
exports.TelegramController = void 0;
|
|
16
|
+
const common_1 = require("@nestjs/common");
|
|
17
|
+
const swagger_1 = require("@nestjs/swagger");
|
|
18
|
+
const Telegram_service_1 = require("./Telegram.service");
|
|
19
|
+
const dto_1 = require("./dto");
|
|
20
|
+
const message_search_dto_1 = require("./dto/message-search.dto");
|
|
21
|
+
const metadata_operations_dto_1 = require("./dto/metadata-operations.dto");
|
|
22
|
+
const create_chat_folder_dto_1 = require("./dto/create-chat-folder.dto");
|
|
23
|
+
const common_responses_dto_1 = require("./dto/common-responses.dto");
|
|
24
|
+
let TelegramController = class TelegramController {
|
|
25
|
+
constructor(telegramService) {
|
|
26
|
+
this.telegramService = telegramService;
|
|
27
|
+
}
|
|
28
|
+
async handleTelegramOperation(operation) {
|
|
29
|
+
try {
|
|
30
|
+
return await operation();
|
|
31
|
+
}
|
|
32
|
+
catch (error) {
|
|
33
|
+
if (error instanceof common_1.BadRequestException) {
|
|
34
|
+
throw error;
|
|
35
|
+
}
|
|
36
|
+
throw new common_1.BadRequestException(error.message || 'Telegram operation failed');
|
|
37
|
+
}
|
|
38
|
+
}
|
|
39
|
+
async connect(mobile) {
|
|
40
|
+
await this.telegramService.createClient(mobile);
|
|
41
|
+
return { message: 'Connected successfully' };
|
|
42
|
+
}
|
|
43
|
+
async disconnect(mobile) {
|
|
44
|
+
await this.telegramService.deleteClient(mobile);
|
|
45
|
+
return { message: 'Disconnected successfully' };
|
|
46
|
+
}
|
|
47
|
+
async disconnectAllClients() {
|
|
48
|
+
this.telegramService.disconnectAll();
|
|
49
|
+
return { message: 'All clients disconnected successfully' };
|
|
50
|
+
}
|
|
51
|
+
async getMe(mobile) {
|
|
52
|
+
return this.handleTelegramOperation(async () => {
|
|
53
|
+
await this.telegramService.createClient(mobile);
|
|
54
|
+
return this.telegramService.getMe(mobile);
|
|
55
|
+
});
|
|
56
|
+
}
|
|
57
|
+
async getEntity(mobile, entity) {
|
|
58
|
+
return this.handleTelegramOperation(async () => {
|
|
59
|
+
await this.telegramService.createClient(mobile);
|
|
60
|
+
return this.telegramService.getEntity(mobile, entity);
|
|
61
|
+
});
|
|
62
|
+
}
|
|
63
|
+
async updateProfile(mobile, updateProfileDto) {
|
|
64
|
+
return this.handleTelegramOperation(async () => {
|
|
65
|
+
await this.telegramService.createClient(mobile);
|
|
66
|
+
return this.telegramService.updateNameandBio(mobile, updateProfileDto.firstName, updateProfileDto.about);
|
|
67
|
+
});
|
|
68
|
+
}
|
|
69
|
+
async setProfilePhoto(mobile, photoDto) {
|
|
70
|
+
return this.handleTelegramOperation(async () => {
|
|
71
|
+
await this.telegramService.createClient(mobile);
|
|
72
|
+
return this.telegramService.setProfilePic(mobile, photoDto.name);
|
|
73
|
+
});
|
|
74
|
+
}
|
|
75
|
+
async deleteProfilePhotos(mobile) {
|
|
76
|
+
return this.handleTelegramOperation(async () => {
|
|
77
|
+
await this.telegramService.createClient(mobile);
|
|
78
|
+
return this.telegramService.deleteProfilePhotos(mobile);
|
|
79
|
+
});
|
|
80
|
+
}
|
|
81
|
+
async getMessages(mobile, chatId, limit) {
|
|
82
|
+
return this.handleTelegramOperation(async () => {
|
|
83
|
+
await this.telegramService.createClient(mobile);
|
|
84
|
+
return this.telegramService.getMessages(mobile, chatId, limit);
|
|
85
|
+
});
|
|
86
|
+
}
|
|
87
|
+
async forwardMessage(mobile, forwardDto) {
|
|
88
|
+
return this.handleTelegramOperation(async () => {
|
|
89
|
+
await this.telegramService.createClient(mobile);
|
|
90
|
+
return this.telegramService.forwardBulkMessages(mobile, forwardDto.fromChatId, forwardDto.toChatId, forwardDto.messageIds);
|
|
91
|
+
});
|
|
92
|
+
}
|
|
93
|
+
async processBatchMessages(mobile, batchOp) {
|
|
94
|
+
await this.telegramService.createClient(mobile);
|
|
95
|
+
return this.telegramService.processBatch(batchOp.items, batchOp.batchSize || 20, async (batch) => {
|
|
96
|
+
switch (batchOp.operation) {
|
|
97
|
+
case dto_1.BatchOperationType.FORWARD:
|
|
98
|
+
for (const item of batch) {
|
|
99
|
+
if ('messageId' in item && item.fromChatId && item.toChatId) {
|
|
100
|
+
await this.telegramService.forwardMessage(mobile, item.toChatId, item.fromChatId, item.messageId);
|
|
101
|
+
}
|
|
102
|
+
}
|
|
103
|
+
break;
|
|
104
|
+
case dto_1.BatchOperationType.DELETE:
|
|
105
|
+
for (const item of batch) {
|
|
106
|
+
await this.telegramService.deleteChat(mobile, item.chatId);
|
|
107
|
+
}
|
|
108
|
+
break;
|
|
109
|
+
default:
|
|
110
|
+
throw new common_1.BadRequestException('Unsupported batch operation');
|
|
111
|
+
}
|
|
112
|
+
}, batchOp.delayMs);
|
|
113
|
+
}
|
|
114
|
+
async forwardBulkMessages(mobile, bulkOp) {
|
|
115
|
+
return this.handleTelegramOperation(async () => {
|
|
116
|
+
await this.telegramService.createClient(mobile);
|
|
117
|
+
return this.telegramService.forwardBulkMessages(mobile, bulkOp.fromChatId, bulkOp.toChatId, bulkOp.messageIds);
|
|
118
|
+
});
|
|
119
|
+
}
|
|
120
|
+
async searchMessages(mobile, chatId, query, types, offset, limit = 20) {
|
|
121
|
+
return this.handleTelegramOperation(async () => {
|
|
122
|
+
await this.telegramService.createClient(mobile);
|
|
123
|
+
return this.telegramService.searchMessages(mobile, { chatId, query, types, offset, limit });
|
|
124
|
+
});
|
|
125
|
+
}
|
|
126
|
+
async getChannelInfo(mobile, includeIds) {
|
|
127
|
+
return this.handleTelegramOperation(async () => {
|
|
128
|
+
await this.telegramService.createClient(mobile);
|
|
129
|
+
return this.telegramService.getChannelInfo(mobile, includeIds);
|
|
130
|
+
});
|
|
131
|
+
}
|
|
132
|
+
async joinChannel(mobile, channel, forward, fromChatId) {
|
|
133
|
+
return this.handleTelegramOperation(async () => {
|
|
134
|
+
await this.telegramService.createClient(mobile);
|
|
135
|
+
if (forward && fromChatId) {
|
|
136
|
+
return this.telegramService.joinChannelAndForward(mobile, fromChatId, channel);
|
|
137
|
+
}
|
|
138
|
+
return this.telegramService.joinChannel(mobile, channel);
|
|
139
|
+
});
|
|
140
|
+
}
|
|
141
|
+
async leaveChannel(mobile, channel) {
|
|
142
|
+
return this.handleTelegramOperation(async () => {
|
|
143
|
+
await this.telegramService.createClient(mobile);
|
|
144
|
+
return this.telegramService.leaveChannel(mobile, channel);
|
|
145
|
+
});
|
|
146
|
+
}
|
|
147
|
+
async setup2FA(mobile) {
|
|
148
|
+
return this.handleTelegramOperation(async () => {
|
|
149
|
+
await this.telegramService.createClient(mobile);
|
|
150
|
+
return this.telegramService.set2Fa(mobile);
|
|
151
|
+
});
|
|
152
|
+
}
|
|
153
|
+
async updatePrivacy(mobile) {
|
|
154
|
+
return this.handleTelegramOperation(async () => {
|
|
155
|
+
await this.telegramService.createClient(mobile);
|
|
156
|
+
return this.telegramService.updatePrivacy(mobile);
|
|
157
|
+
});
|
|
158
|
+
}
|
|
159
|
+
async updatePrivacyBatch(mobile, settings) {
|
|
160
|
+
return this.handleTelegramOperation(async () => {
|
|
161
|
+
await this.telegramService.createClient(mobile);
|
|
162
|
+
return this.telegramService.updatePrivacyBatch(mobile, settings);
|
|
163
|
+
});
|
|
164
|
+
}
|
|
165
|
+
async getActiveSessions(mobile) {
|
|
166
|
+
return this.handleTelegramOperation(async () => {
|
|
167
|
+
await this.telegramService.createClient(mobile);
|
|
168
|
+
return this.telegramService.getAuths(mobile);
|
|
169
|
+
});
|
|
170
|
+
}
|
|
171
|
+
async terminateOtherSessions(mobile) {
|
|
172
|
+
return this.handleTelegramOperation(async () => {
|
|
173
|
+
await this.telegramService.createClient(mobile);
|
|
174
|
+
return this.telegramService.removeOtherAuths(mobile);
|
|
175
|
+
});
|
|
176
|
+
}
|
|
177
|
+
async createNewSession(mobile) {
|
|
178
|
+
return this.handleTelegramOperation(async () => {
|
|
179
|
+
await this.telegramService.createClient(mobile);
|
|
180
|
+
return this.telegramService.createNewSession(mobile);
|
|
181
|
+
});
|
|
182
|
+
}
|
|
183
|
+
async getSessionInfo(mobile) {
|
|
184
|
+
return this.handleTelegramOperation(async () => {
|
|
185
|
+
await this.telegramService.createClient(mobile);
|
|
186
|
+
return this.telegramService.getSessionInfo(mobile);
|
|
187
|
+
});
|
|
188
|
+
}
|
|
189
|
+
async terminateSession(mobile, data) {
|
|
190
|
+
return this.handleTelegramOperation(async () => {
|
|
191
|
+
await this.telegramService.createClient(mobile);
|
|
192
|
+
return this.telegramService.terminateSession(mobile, data);
|
|
193
|
+
});
|
|
194
|
+
}
|
|
195
|
+
async getConnectionStatus() {
|
|
196
|
+
return {
|
|
197
|
+
status: await this.telegramService.getConnectionStatus()
|
|
198
|
+
};
|
|
199
|
+
}
|
|
200
|
+
async getClientMetadata(mobile) {
|
|
201
|
+
return this.handleTelegramOperation(async () => {
|
|
202
|
+
await this.telegramService.createClient(mobile);
|
|
203
|
+
return this.telegramService.getClientMetadata(mobile);
|
|
204
|
+
});
|
|
205
|
+
}
|
|
206
|
+
async getClientStatistics() {
|
|
207
|
+
return await this.telegramService.getClientStatistics();
|
|
208
|
+
}
|
|
209
|
+
async getHealthStatus() {
|
|
210
|
+
return {
|
|
211
|
+
connections: await this.telegramService.getConnectionStatus(),
|
|
212
|
+
statistics: await this.telegramService.getClientStatistics()
|
|
213
|
+
};
|
|
214
|
+
}
|
|
215
|
+
async getCallLogStats(mobile) {
|
|
216
|
+
return this.handleTelegramOperation(async () => {
|
|
217
|
+
await this.telegramService.createClient(mobile);
|
|
218
|
+
return this.telegramService.getCallLog(mobile);
|
|
219
|
+
});
|
|
220
|
+
}
|
|
221
|
+
async addContactsBulk(mobile, contactsDto) {
|
|
222
|
+
return this.handleTelegramOperation(async () => {
|
|
223
|
+
await this.telegramService.createClient(mobile);
|
|
224
|
+
return this.telegramService.addContacts(mobile, contactsDto.phoneNumbers, contactsDto.prefix);
|
|
225
|
+
});
|
|
226
|
+
}
|
|
227
|
+
async getContacts(mobile) {
|
|
228
|
+
return this.handleTelegramOperation(async () => {
|
|
229
|
+
const client = await this.telegramService.createClient(mobile);
|
|
230
|
+
return client.getContacts();
|
|
231
|
+
});
|
|
232
|
+
}
|
|
233
|
+
async getMediaInfo(mobile, chatId, types, offset, limit) {
|
|
234
|
+
return this.handleTelegramOperation(async () => {
|
|
235
|
+
await this.telegramService.createClient(mobile);
|
|
236
|
+
return this.telegramService.getMediaMetadata(mobile, chatId, offset, limit);
|
|
237
|
+
});
|
|
238
|
+
}
|
|
239
|
+
async sendMedia(mobile, sendMediaDto) {
|
|
240
|
+
return this.handleTelegramOperation(async () => {
|
|
241
|
+
const client = await this.telegramService.createClient(mobile);
|
|
242
|
+
if (sendMediaDto.type === dto_1.MediaType.PHOTO) {
|
|
243
|
+
return client.sendPhotoChat(sendMediaDto.chatId, sendMediaDto.url, sendMediaDto.caption, sendMediaDto.filename);
|
|
244
|
+
}
|
|
245
|
+
return client.sendFileChat(sendMediaDto.chatId, sendMediaDto.url, sendMediaDto.caption, sendMediaDto.filename);
|
|
246
|
+
});
|
|
247
|
+
}
|
|
248
|
+
async downloadMedia(mobile, chatId, messageId, res) {
|
|
249
|
+
return this.handleTelegramOperation(async () => {
|
|
250
|
+
await this.telegramService.createClient(mobile);
|
|
251
|
+
return this.telegramService.downloadMediaFile(mobile, messageId, chatId, res);
|
|
252
|
+
});
|
|
253
|
+
}
|
|
254
|
+
async sendMediaAlbum(mobile, albumDto) {
|
|
255
|
+
return this.handleTelegramOperation(async () => {
|
|
256
|
+
await this.telegramService.createClient(mobile);
|
|
257
|
+
return this.telegramService.sendMediaAlbum(mobile, albumDto);
|
|
258
|
+
});
|
|
259
|
+
}
|
|
260
|
+
async getMediaMetadata(mobile, searchDto) {
|
|
261
|
+
return this.handleTelegramOperation(async () => {
|
|
262
|
+
await this.telegramService.createClient(mobile);
|
|
263
|
+
return this.telegramService.getMediaMetadata(mobile, searchDto.chatId, searchDto.offset, searchDto.limit);
|
|
264
|
+
});
|
|
265
|
+
}
|
|
266
|
+
async getFilteredMedia(mobile, chatId, types, startDate, endDate, limit, minId, maxId) {
|
|
267
|
+
return this.handleTelegramOperation(async () => {
|
|
268
|
+
await this.telegramService.createClient(mobile);
|
|
269
|
+
return this.telegramService.getFilteredMedia(mobile, {
|
|
270
|
+
chatId,
|
|
271
|
+
types,
|
|
272
|
+
startDate: startDate ? new Date(startDate) : undefined,
|
|
273
|
+
endDate: endDate ? new Date(endDate) : undefined,
|
|
274
|
+
limit,
|
|
275
|
+
minId,
|
|
276
|
+
maxId
|
|
277
|
+
});
|
|
278
|
+
});
|
|
279
|
+
}
|
|
280
|
+
async getGroupMembers(mobile, groupId) {
|
|
281
|
+
return this.handleTelegramOperation(async () => {
|
|
282
|
+
await this.telegramService.createClient(mobile);
|
|
283
|
+
return this.telegramService.getGrpMembers(mobile, groupId);
|
|
284
|
+
});
|
|
285
|
+
}
|
|
286
|
+
async blockChat(mobile, chatId) {
|
|
287
|
+
return this.handleTelegramOperation(async () => {
|
|
288
|
+
await this.telegramService.createClient(mobile);
|
|
289
|
+
return this.telegramService.blockUser(mobile, chatId);
|
|
290
|
+
});
|
|
291
|
+
}
|
|
292
|
+
async deleteChatHistory(mobile, chatId) {
|
|
293
|
+
return this.handleTelegramOperation(async () => {
|
|
294
|
+
await this.telegramService.createClient(mobile);
|
|
295
|
+
return this.telegramService.deleteChat(mobile, chatId);
|
|
296
|
+
});
|
|
297
|
+
}
|
|
298
|
+
async sendMessageWithInlineButton(mobile, chatId, message, url) {
|
|
299
|
+
return this.handleTelegramOperation(async () => {
|
|
300
|
+
await this.telegramService.createClient(mobile);
|
|
301
|
+
return this.telegramService.sendInlineMessage(mobile, chatId, message, url);
|
|
302
|
+
});
|
|
303
|
+
}
|
|
304
|
+
async getAllDialogs(mobile, limit = 500, offsetId = 0, archived = false) {
|
|
305
|
+
return this.handleTelegramOperation(async () => {
|
|
306
|
+
await this.telegramService.createClient(mobile);
|
|
307
|
+
return this.telegramService.getDialogs(mobile, { limit, archived, offsetId });
|
|
308
|
+
});
|
|
309
|
+
}
|
|
310
|
+
async getLastActiveTime(mobile) {
|
|
311
|
+
return this.handleTelegramOperation(async () => {
|
|
312
|
+
await this.telegramService.createClient(mobile);
|
|
313
|
+
return this.telegramService.getLastActiveTime(mobile);
|
|
314
|
+
});
|
|
315
|
+
}
|
|
316
|
+
async createGroupWithOptions(mobile, options) {
|
|
317
|
+
return this.handleTelegramOperation(async () => {
|
|
318
|
+
await this.telegramService.createClient(mobile);
|
|
319
|
+
return this.telegramService.createGroupWithOptions(mobile, options);
|
|
320
|
+
});
|
|
321
|
+
}
|
|
322
|
+
async updateGroupSettings(mobile, settings) {
|
|
323
|
+
return this.handleTelegramOperation(async () => {
|
|
324
|
+
await this.telegramService.createClient(mobile);
|
|
325
|
+
return this.telegramService.updateGroupSettings(mobile, settings);
|
|
326
|
+
});
|
|
327
|
+
}
|
|
328
|
+
async addGroupMembers(memberOp, mobile) {
|
|
329
|
+
return this.handleTelegramOperation(async () => {
|
|
330
|
+
await this.telegramService.createClient(mobile);
|
|
331
|
+
return this.telegramService.addGroupMembers(mobile, memberOp.groupId, memberOp.members);
|
|
332
|
+
});
|
|
333
|
+
}
|
|
334
|
+
async removeGroupMembers(memberOp, mobile) {
|
|
335
|
+
return this.handleTelegramOperation(async () => {
|
|
336
|
+
await this.telegramService.createClient(mobile);
|
|
337
|
+
return this.telegramService.removeGroupMembers(mobile, memberOp.groupId, memberOp.members);
|
|
338
|
+
});
|
|
339
|
+
}
|
|
340
|
+
async handleAdminOperation(adminOp, mobile) {
|
|
341
|
+
return this.handleTelegramOperation(async () => {
|
|
342
|
+
await this.telegramService.createClient(mobile);
|
|
343
|
+
if (adminOp.isPromote) {
|
|
344
|
+
return this.telegramService.promoteToAdmin(mobile, adminOp.groupId, adminOp.userId, adminOp.permissions, adminOp.rank);
|
|
345
|
+
}
|
|
346
|
+
else {
|
|
347
|
+
return this.telegramService.demoteAdmin(mobile, adminOp.groupId, adminOp.userId);
|
|
348
|
+
}
|
|
349
|
+
});
|
|
350
|
+
}
|
|
351
|
+
async cleanupChat(mobile, cleanup) {
|
|
352
|
+
await this.telegramService.createClient(mobile);
|
|
353
|
+
return this.telegramService.cleanupChat(mobile, {
|
|
354
|
+
chatId: cleanup.chatId,
|
|
355
|
+
beforeDate: cleanup.beforeDate ? new Date(cleanup.beforeDate) : undefined,
|
|
356
|
+
onlyMedia: cleanup.onlyMedia,
|
|
357
|
+
excludePinned: cleanup.excludePinned
|
|
358
|
+
});
|
|
359
|
+
}
|
|
360
|
+
async getChatStatistics(mobile, chatId, period = 'week') {
|
|
361
|
+
await this.telegramService.createClient(mobile);
|
|
362
|
+
return this.telegramService.getChatStatistics(mobile, chatId, period);
|
|
363
|
+
}
|
|
364
|
+
async scheduleMessage(mobile, schedule) {
|
|
365
|
+
return this.telegramService.scheduleMessage(mobile, {
|
|
366
|
+
chatId: schedule.chatId,
|
|
367
|
+
message: schedule.message,
|
|
368
|
+
scheduledTime: new Date(schedule.scheduledTime),
|
|
369
|
+
replyTo: schedule.replyTo,
|
|
370
|
+
silent: schedule.silent
|
|
371
|
+
});
|
|
372
|
+
}
|
|
373
|
+
async getScheduledMessages(mobile, chatId) {
|
|
374
|
+
return this.handleTelegramOperation(async () => {
|
|
375
|
+
await this.telegramService.createClient(mobile);
|
|
376
|
+
return this.telegramService.getScheduledMessages(mobile, chatId);
|
|
377
|
+
});
|
|
378
|
+
}
|
|
379
|
+
async sendVoiceMessage(mobile, voice) {
|
|
380
|
+
return this.handleTelegramOperation(async () => {
|
|
381
|
+
await this.telegramService.createClient(mobile);
|
|
382
|
+
return this.telegramService.sendVoiceMessage(mobile, voice);
|
|
383
|
+
});
|
|
384
|
+
}
|
|
385
|
+
async getChatHistory(mobile, chatId, offset, limit) {
|
|
386
|
+
return this.handleTelegramOperation(async () => {
|
|
387
|
+
await this.telegramService.createClient(mobile);
|
|
388
|
+
return this.telegramService.getMessagesNew(mobile, chatId, offset, limit);
|
|
389
|
+
});
|
|
390
|
+
}
|
|
391
|
+
async validateSession(mobile) {
|
|
392
|
+
return this.handleTelegramOperation(async () => {
|
|
393
|
+
const client = await this.telegramService.createClient(mobile);
|
|
394
|
+
const isConnected = await client.connected();
|
|
395
|
+
if (!isConnected) {
|
|
396
|
+
await client.connect();
|
|
397
|
+
}
|
|
398
|
+
return {
|
|
399
|
+
isValid: true,
|
|
400
|
+
isConnected,
|
|
401
|
+
phoneNumber: client.phoneNumber
|
|
402
|
+
};
|
|
403
|
+
});
|
|
404
|
+
}
|
|
405
|
+
async promoteToAdmin(mobile, adminOp) {
|
|
406
|
+
return this.handleTelegramOperation(async () => {
|
|
407
|
+
await this.telegramService.createClient(mobile);
|
|
408
|
+
return this.telegramService.promoteToAdmin(mobile, adminOp.groupId, adminOp.userId, adminOp.permissions, adminOp.rank);
|
|
409
|
+
});
|
|
410
|
+
}
|
|
411
|
+
async demoteAdmin(mobile, memberOp) {
|
|
412
|
+
return this.handleTelegramOperation(async () => {
|
|
413
|
+
await this.telegramService.createClient(mobile);
|
|
414
|
+
return this.telegramService.demoteAdmin(mobile, memberOp.groupId, memberOp.members[0]);
|
|
415
|
+
});
|
|
416
|
+
}
|
|
417
|
+
async unblockGroupUser(mobile, data) {
|
|
418
|
+
return this.handleTelegramOperation(async () => {
|
|
419
|
+
await this.telegramService.createClient(mobile);
|
|
420
|
+
return this.telegramService.unblockGroupUser(mobile, data.groupId, data.userId);
|
|
421
|
+
});
|
|
422
|
+
}
|
|
423
|
+
async getGroupAdmins(mobile, groupId) {
|
|
424
|
+
return this.handleTelegramOperation(async () => {
|
|
425
|
+
await this.telegramService.createClient(mobile);
|
|
426
|
+
return this.telegramService.getGroupAdmins(mobile, groupId);
|
|
427
|
+
});
|
|
428
|
+
}
|
|
429
|
+
async getGroupBannedUsers(mobile, groupId) {
|
|
430
|
+
return this.handleTelegramOperation(async () => {
|
|
431
|
+
await this.telegramService.createClient(mobile);
|
|
432
|
+
return this.telegramService.getGroupBannedUsers(mobile, groupId);
|
|
433
|
+
});
|
|
434
|
+
}
|
|
435
|
+
async exportContacts(mobile, exportDto, res) {
|
|
436
|
+
return this.handleTelegramOperation(async () => {
|
|
437
|
+
await this.telegramService.createClient(mobile);
|
|
438
|
+
const data = await this.telegramService.exportContacts(mobile, exportDto.format, exportDto.includeBlocked);
|
|
439
|
+
const filename = `contacts_${mobile}_${new Date().toISOString()}.${exportDto.format}`;
|
|
440
|
+
res.setHeader('Content-Type', exportDto.format === 'vcard' ? 'text/vcard' : 'text/csv');
|
|
441
|
+
res.setHeader('Content-Disposition', `attachment; filename="${filename}"`);
|
|
442
|
+
res.send(data);
|
|
443
|
+
});
|
|
444
|
+
}
|
|
445
|
+
async importContacts(mobile, contacts) {
|
|
446
|
+
return this.handleTelegramOperation(async () => {
|
|
447
|
+
await this.telegramService.createClient(mobile);
|
|
448
|
+
return this.telegramService.importContacts(mobile, contacts);
|
|
449
|
+
});
|
|
450
|
+
}
|
|
451
|
+
async manageBlockList(mobile, blockList) {
|
|
452
|
+
return this.handleTelegramOperation(async () => {
|
|
453
|
+
await this.telegramService.createClient(mobile);
|
|
454
|
+
return this.telegramService.manageBlockList(mobile, blockList.userIds, blockList.block);
|
|
455
|
+
});
|
|
456
|
+
}
|
|
457
|
+
async getContactStatistics(mobile) {
|
|
458
|
+
return this.handleTelegramOperation(async () => {
|
|
459
|
+
await this.telegramService.createClient(mobile);
|
|
460
|
+
return this.telegramService.getContactStatistics(mobile);
|
|
461
|
+
});
|
|
462
|
+
}
|
|
463
|
+
async createChatFolder(mobile, folder) {
|
|
464
|
+
return this.handleTelegramOperation(async () => {
|
|
465
|
+
await this.telegramService.createClient(mobile);
|
|
466
|
+
return this.telegramService.createChatFolder(mobile, folder);
|
|
467
|
+
});
|
|
468
|
+
}
|
|
469
|
+
async getChatFolders(mobile) {
|
|
470
|
+
return this.handleTelegramOperation(async () => {
|
|
471
|
+
await this.telegramService.createClient(mobile);
|
|
472
|
+
return this.telegramService.getChatFolders(mobile);
|
|
473
|
+
});
|
|
474
|
+
}
|
|
475
|
+
async editMessage(mobile, options) {
|
|
476
|
+
return this.handleTelegramOperation(async () => {
|
|
477
|
+
await this.telegramService.createClient(mobile);
|
|
478
|
+
return this.telegramService.editMessage(mobile, options);
|
|
479
|
+
});
|
|
480
|
+
}
|
|
481
|
+
async updateChatSettings(mobile, settings) {
|
|
482
|
+
return this.handleTelegramOperation(async () => {
|
|
483
|
+
await this.telegramService.createClient(mobile);
|
|
484
|
+
return this.telegramService.updateChatSettings(mobile, settings);
|
|
485
|
+
});
|
|
486
|
+
}
|
|
487
|
+
async sendMediaBatch(mobile, options) {
|
|
488
|
+
return this.handleTelegramOperation(async () => {
|
|
489
|
+
await this.telegramService.createClient(mobile);
|
|
490
|
+
return this.telegramService.sendMediaBatch(mobile, options);
|
|
491
|
+
});
|
|
492
|
+
}
|
|
493
|
+
async hasPassword(mobile) {
|
|
494
|
+
return this.handleTelegramOperation(async () => {
|
|
495
|
+
await this.telegramService.createClient(mobile);
|
|
496
|
+
return this.telegramService.hasPassword(mobile);
|
|
497
|
+
});
|
|
498
|
+
}
|
|
499
|
+
async getChats(mobile, limit, offsetDate, offsetId, offsetPeer, folderId) {
|
|
500
|
+
return this.handleTelegramOperation(async () => {
|
|
501
|
+
await this.telegramService.createClient(mobile);
|
|
502
|
+
return this.telegramService.getChats(mobile, {
|
|
503
|
+
limit,
|
|
504
|
+
offsetDate,
|
|
505
|
+
offsetId,
|
|
506
|
+
offsetPeer,
|
|
507
|
+
folderId
|
|
508
|
+
});
|
|
509
|
+
});
|
|
510
|
+
}
|
|
511
|
+
async getFileUrl(mobile, url, filename) {
|
|
512
|
+
return this.handleTelegramOperation(async () => {
|
|
513
|
+
await this.telegramService.createClient(mobile);
|
|
514
|
+
return this.telegramService.getFileUrl(mobile, url, filename);
|
|
515
|
+
});
|
|
516
|
+
}
|
|
517
|
+
async getMessageStats(mobile, options) {
|
|
518
|
+
return this.handleTelegramOperation(async () => {
|
|
519
|
+
await this.telegramService.createClient(mobile);
|
|
520
|
+
return this.telegramService.getMessageStats(mobile, options);
|
|
521
|
+
});
|
|
522
|
+
}
|
|
523
|
+
async getTopPrivateChats(mobile) {
|
|
524
|
+
return this.handleTelegramOperation(async () => {
|
|
525
|
+
await this.telegramService.createClient(mobile);
|
|
526
|
+
return this.telegramService.getTopPrivateChats(mobile);
|
|
527
|
+
});
|
|
528
|
+
}
|
|
529
|
+
};
|
|
530
|
+
exports.TelegramController = TelegramController;
|
|
531
|
+
__decorate([
|
|
532
|
+
(0, common_1.Get)('connect/:mobile'),
|
|
533
|
+
(0, swagger_1.ApiOperation)({ summary: 'Connect to Telegram' }),
|
|
534
|
+
(0, swagger_1.ApiParam)({ name: 'mobile', description: 'Mobile number', required: true }),
|
|
535
|
+
(0, swagger_1.ApiResponse)({ status: 200, description: 'Successfully connected' }),
|
|
536
|
+
(0, swagger_1.ApiResponse)({ status: 400, description: 'Connection failed' }),
|
|
537
|
+
__param(0, (0, common_1.Param)('mobile')),
|
|
538
|
+
__metadata("design:type", Function),
|
|
539
|
+
__metadata("design:paramtypes", [String]),
|
|
540
|
+
__metadata("design:returntype", Promise)
|
|
541
|
+
], TelegramController.prototype, "connect", null);
|
|
542
|
+
__decorate([
|
|
543
|
+
(0, common_1.Get)('disconnect/:mobile'),
|
|
544
|
+
(0, swagger_1.ApiOperation)({ summary: 'Disconnect from Telegram' }),
|
|
545
|
+
(0, swagger_1.ApiParam)({ name: 'mobile', description: 'Mobile number', required: true }),
|
|
546
|
+
(0, swagger_1.ApiResponse)({ status: 200, description: 'Successfully disconnected' }),
|
|
547
|
+
__param(0, (0, common_1.Param)('mobile')),
|
|
548
|
+
__metadata("design:type", Function),
|
|
549
|
+
__metadata("design:paramtypes", [String]),
|
|
550
|
+
__metadata("design:returntype", Promise)
|
|
551
|
+
], TelegramController.prototype, "disconnect", null);
|
|
552
|
+
__decorate([
|
|
553
|
+
(0, common_1.Post)('disconnect-all'),
|
|
554
|
+
(0, swagger_1.ApiOperation)({ summary: 'Disconnect all clients' }),
|
|
555
|
+
(0, swagger_1.ApiResponse)({ status: 200, description: 'All clients disconnected successfully' }),
|
|
556
|
+
__metadata("design:type", Function),
|
|
557
|
+
__metadata("design:paramtypes", []),
|
|
558
|
+
__metadata("design:returntype", Promise)
|
|
559
|
+
], TelegramController.prototype, "disconnectAllClients", null);
|
|
560
|
+
__decorate([
|
|
561
|
+
(0, common_1.Get)('me/:mobile'),
|
|
562
|
+
(0, swagger_1.ApiOperation)({ summary: 'Get current user profile' }),
|
|
563
|
+
(0, swagger_1.ApiParam)({ name: 'mobile', description: 'Mobile number', required: true }),
|
|
564
|
+
(0, swagger_1.ApiResponse)({ status: 200, description: 'Profile retrieved successfully' }),
|
|
565
|
+
__param(0, (0, common_1.Param)('mobile')),
|
|
566
|
+
__metadata("design:type", Function),
|
|
567
|
+
__metadata("design:paramtypes", [String]),
|
|
568
|
+
__metadata("design:returntype", Promise)
|
|
569
|
+
], TelegramController.prototype, "getMe", null);
|
|
570
|
+
__decorate([
|
|
571
|
+
(0, common_1.Get)('entity/:mobile/:entity'),
|
|
572
|
+
(0, swagger_1.ApiOperation)({ summary: 'Get Entity profile' }),
|
|
573
|
+
(0, swagger_1.ApiParam)({ name: 'mobile', description: 'Mobile number', required: true }),
|
|
574
|
+
(0, swagger_1.ApiParam)({ name: 'entity', description: 'Entity identifier', required: true }),
|
|
575
|
+
(0, swagger_1.ApiResponse)({ status: 200, description: 'Entity retrieved successfully' }),
|
|
576
|
+
__param(0, (0, common_1.Param)('mobile')),
|
|
577
|
+
__param(1, (0, common_1.Param)('entity')),
|
|
578
|
+
__metadata("design:type", Function),
|
|
579
|
+
__metadata("design:paramtypes", [String, String]),
|
|
580
|
+
__metadata("design:returntype", Promise)
|
|
581
|
+
], TelegramController.prototype, "getEntity", null);
|
|
582
|
+
__decorate([
|
|
583
|
+
(0, common_1.Post)('profile/update/:mobile'),
|
|
584
|
+
(0, swagger_1.ApiOperation)({ summary: 'Update profile information' }),
|
|
585
|
+
(0, swagger_1.ApiParam)({ name: 'mobile', description: 'Mobile number', required: true }),
|
|
586
|
+
(0, swagger_1.ApiBody)({ type: dto_1.UpdateProfileDto }),
|
|
587
|
+
__param(0, (0, common_1.Param)('mobile')),
|
|
588
|
+
__param(1, (0, common_1.Body)()),
|
|
589
|
+
__metadata("design:type", Function),
|
|
590
|
+
__metadata("design:paramtypes", [String, dto_1.UpdateProfileDto]),
|
|
591
|
+
__metadata("design:returntype", Promise)
|
|
592
|
+
], TelegramController.prototype, "updateProfile", null);
|
|
593
|
+
__decorate([
|
|
594
|
+
(0, common_1.Post)('profile/photo/:mobile'),
|
|
595
|
+
(0, swagger_1.ApiOperation)({ summary: 'Set profile photo' }),
|
|
596
|
+
(0, swagger_1.ApiParam)({ name: 'mobile', description: 'Mobile number', required: true }),
|
|
597
|
+
(0, swagger_1.ApiBody)({ type: dto_1.ProfilePhotoDto }),
|
|
598
|
+
__param(0, (0, common_1.Param)('mobile')),
|
|
599
|
+
__param(1, (0, common_1.Body)()),
|
|
600
|
+
__metadata("design:type", Function),
|
|
601
|
+
__metadata("design:paramtypes", [String, dto_1.ProfilePhotoDto]),
|
|
602
|
+
__metadata("design:returntype", Promise)
|
|
603
|
+
], TelegramController.prototype, "setProfilePhoto", null);
|
|
604
|
+
__decorate([
|
|
605
|
+
(0, common_1.Delete)('profile/photos/:mobile'),
|
|
606
|
+
(0, swagger_1.ApiOperation)({ summary: 'Delete all profile photos' }),
|
|
607
|
+
(0, swagger_1.ApiParam)({ name: 'mobile', description: 'Mobile number', required: true }),
|
|
608
|
+
__param(0, (0, common_1.Param)('mobile')),
|
|
609
|
+
__metadata("design:type", Function),
|
|
610
|
+
__metadata("design:paramtypes", [String]),
|
|
611
|
+
__metadata("design:returntype", Promise)
|
|
612
|
+
], TelegramController.prototype, "deleteProfilePhotos", null);
|
|
613
|
+
__decorate([
|
|
614
|
+
(0, common_1.Get)('messages/:mobile'),
|
|
615
|
+
(0, swagger_1.ApiOperation)({ summary: 'Get chat messages' }),
|
|
616
|
+
(0, swagger_1.ApiParam)({ name: 'mobile', description: 'Mobile number', required: true }),
|
|
617
|
+
(0, swagger_1.ApiQuery)({ name: 'chatId', required: true }),
|
|
618
|
+
(0, swagger_1.ApiQuery)({ name: 'limit', required: false, type: Number }),
|
|
619
|
+
__param(0, (0, common_1.Param)('mobile')),
|
|
620
|
+
__param(1, (0, common_1.Query)('chatId')),
|
|
621
|
+
__param(2, (0, common_1.Query)('limit')),
|
|
622
|
+
__metadata("design:type", Function),
|
|
623
|
+
__metadata("design:paramtypes", [String, String, Number]),
|
|
624
|
+
__metadata("design:returntype", Promise)
|
|
625
|
+
], TelegramController.prototype, "getMessages", null);
|
|
626
|
+
__decorate([
|
|
627
|
+
(0, common_1.Post)('messages/forward/:mobile'),
|
|
628
|
+
(0, swagger_1.ApiOperation)({ summary: 'Forward messages' }),
|
|
629
|
+
(0, swagger_1.ApiParam)({ name: 'mobile', description: 'Mobile number', required: true }),
|
|
630
|
+
(0, swagger_1.ApiBody)({ type: dto_1.ForwardBatchDto }),
|
|
631
|
+
__param(0, (0, common_1.Param)('mobile')),
|
|
632
|
+
__param(1, (0, common_1.Body)()),
|
|
633
|
+
__metadata("design:type", Function),
|
|
634
|
+
__metadata("design:paramtypes", [String, dto_1.ForwardBatchDto]),
|
|
635
|
+
__metadata("design:returntype", Promise)
|
|
636
|
+
], TelegramController.prototype, "forwardMessage", null);
|
|
637
|
+
__decorate([
|
|
638
|
+
(0, common_1.Post)('batch-process/:mobile'),
|
|
639
|
+
(0, swagger_1.ApiOperation)({ summary: 'Process operations in batches' }),
|
|
640
|
+
(0, swagger_1.ApiParam)({ name: 'mobile', description: 'Mobile number', required: true }),
|
|
641
|
+
(0, swagger_1.ApiBody)({ type: dto_1.BatchProcessDto }),
|
|
642
|
+
__param(0, (0, common_1.Param)('mobile')),
|
|
643
|
+
__param(1, (0, common_1.Body)()),
|
|
644
|
+
__metadata("design:type", Function),
|
|
645
|
+
__metadata("design:paramtypes", [String, dto_1.BatchProcessDto]),
|
|
646
|
+
__metadata("design:returntype", Promise)
|
|
647
|
+
], TelegramController.prototype, "processBatchMessages", null);
|
|
648
|
+
__decorate([
|
|
649
|
+
(0, common_1.Post)('messages/bulk-forward/:mobile'),
|
|
650
|
+
(0, swagger_1.ApiOperation)({ summary: 'Forward multiple messages' }),
|
|
651
|
+
(0, swagger_1.ApiParam)({ name: 'mobile', description: 'Mobile number', required: true }),
|
|
652
|
+
(0, swagger_1.ApiBody)({ type: dto_1.ForwardBatchDto }),
|
|
653
|
+
__param(0, (0, common_1.Param)('mobile')),
|
|
654
|
+
__param(1, (0, common_1.Body)()),
|
|
655
|
+
__metadata("design:type", Function),
|
|
656
|
+
__metadata("design:paramtypes", [String, dto_1.ForwardBatchDto]),
|
|
657
|
+
__metadata("design:returntype", Promise)
|
|
658
|
+
], TelegramController.prototype, "forwardBulkMessages", null);
|
|
659
|
+
__decorate([
|
|
660
|
+
(0, common_1.Get)('messages/search/:mobile'),
|
|
661
|
+
(0, swagger_1.ApiOperation)({ summary: 'Search messages in a chat' }),
|
|
662
|
+
(0, swagger_1.ApiParam)({ name: 'mobile', description: 'Mobile number', required: true }),
|
|
663
|
+
(0, swagger_1.ApiQuery)({ name: 'chatId', required: true }),
|
|
664
|
+
(0, swagger_1.ApiQuery)({ name: 'query', required: true }),
|
|
665
|
+
(0, swagger_1.ApiQuery)({ name: 'types', required: false, enum: message_search_dto_1.MessageType, isArray: true }),
|
|
666
|
+
(0, swagger_1.ApiQuery)({ name: 'offset', required: false, type: Number }),
|
|
667
|
+
(0, swagger_1.ApiQuery)({ name: 'limit', required: false, type: Number }),
|
|
668
|
+
__param(0, (0, common_1.Param)('mobile')),
|
|
669
|
+
__param(1, (0, common_1.Query)('chatId')),
|
|
670
|
+
__param(2, (0, common_1.Query)('query')),
|
|
671
|
+
__param(3, (0, common_1.Query)('types')),
|
|
672
|
+
__param(4, (0, common_1.Query)('offset')),
|
|
673
|
+
__param(5, (0, common_1.Query)('limit')),
|
|
674
|
+
__metadata("design:type", Function),
|
|
675
|
+
__metadata("design:paramtypes", [String, String, String, Array, Number, Number]),
|
|
676
|
+
__metadata("design:returntype", Promise)
|
|
677
|
+
], TelegramController.prototype, "searchMessages", null);
|
|
678
|
+
__decorate([
|
|
679
|
+
(0, common_1.Get)('channels/:mobile'),
|
|
680
|
+
(0, swagger_1.ApiOperation)({ summary: 'Get channel information' }),
|
|
681
|
+
(0, swagger_1.ApiParam)({ name: 'mobile', description: 'Mobile number', required: true }),
|
|
682
|
+
(0, swagger_1.ApiQuery)({ name: 'includeIds', required: false, type: Boolean }),
|
|
683
|
+
__param(0, (0, common_1.Param)('mobile')),
|
|
684
|
+
__param(1, (0, common_1.Query)('includeIds')),
|
|
685
|
+
__metadata("design:type", Function),
|
|
686
|
+
__metadata("design:paramtypes", [String, Boolean]),
|
|
687
|
+
__metadata("design:returntype", Promise)
|
|
688
|
+
], TelegramController.prototype, "getChannelInfo", null);
|
|
689
|
+
__decorate([
|
|
690
|
+
(0, common_1.Post)('channels/join/:mobile'),
|
|
691
|
+
(0, swagger_1.ApiOperation)({ summary: 'Join channel' }),
|
|
692
|
+
(0, swagger_1.ApiParam)({ name: 'mobile', description: 'Mobile number', required: true }),
|
|
693
|
+
(0, swagger_1.ApiParam)({ name: 'channel', description: 'Channel username or ID', required: true }),
|
|
694
|
+
(0, swagger_1.ApiQuery)({ name: 'forward', description: 'Whether to forward messages after joining', required: false, type: Boolean }),
|
|
695
|
+
(0, swagger_1.ApiQuery)({ name: 'fromChatId', description: 'Source chat ID to forward messages from', required: false }),
|
|
696
|
+
__param(0, (0, common_1.Param)('mobile')),
|
|
697
|
+
__param(1, (0, common_1.Param)('channel')),
|
|
698
|
+
__param(2, (0, common_1.Query)('forward')),
|
|
699
|
+
__param(3, (0, common_1.Query)('fromChatId')),
|
|
700
|
+
__metadata("design:type", Function),
|
|
701
|
+
__metadata("design:paramtypes", [String, String, Boolean, String]),
|
|
702
|
+
__metadata("design:returntype", Promise)
|
|
703
|
+
], TelegramController.prototype, "joinChannel", null);
|
|
704
|
+
__decorate([
|
|
705
|
+
(0, common_1.Post)('channels/leave/:mobile'),
|
|
706
|
+
(0, swagger_1.ApiOperation)({ summary: 'Leave channel' }),
|
|
707
|
+
(0, swagger_1.ApiParam)({ name: 'mobile', description: 'Mobile number', required: true }),
|
|
708
|
+
(0, swagger_1.ApiQuery)({ name: 'channel', description: 'Channel ID/username', required: true }),
|
|
709
|
+
__param(0, (0, common_1.Param)('mobile')),
|
|
710
|
+
__param(1, (0, common_1.Query)('channel')),
|
|
711
|
+
__metadata("design:type", Function),
|
|
712
|
+
__metadata("design:paramtypes", [String, String]),
|
|
713
|
+
__metadata("design:returntype", Promise)
|
|
714
|
+
], TelegramController.prototype, "leaveChannel", null);
|
|
715
|
+
__decorate([
|
|
716
|
+
(0, common_1.Post)('2fa/:mobile'),
|
|
717
|
+
(0, swagger_1.ApiOperation)({ summary: 'Setup two-factor authentication' }),
|
|
718
|
+
(0, swagger_1.ApiParam)({ name: 'mobile', description: 'Mobile number', required: true }),
|
|
719
|
+
__param(0, (0, common_1.Param)('mobile')),
|
|
720
|
+
__metadata("design:type", Function),
|
|
721
|
+
__metadata("design:paramtypes", [String]),
|
|
722
|
+
__metadata("design:returntype", Promise)
|
|
723
|
+
], TelegramController.prototype, "setup2FA", null);
|
|
724
|
+
__decorate([
|
|
725
|
+
(0, common_1.Post)('privacy/:mobile'),
|
|
726
|
+
(0, swagger_1.ApiOperation)({ summary: 'Update privacy settings' }),
|
|
727
|
+
(0, swagger_1.ApiParam)({ name: 'mobile', description: 'Mobile number', required: true }),
|
|
728
|
+
__param(0, (0, common_1.Param)('mobile')),
|
|
729
|
+
__metadata("design:type", Function),
|
|
730
|
+
__metadata("design:paramtypes", [String]),
|
|
731
|
+
__metadata("design:returntype", Promise)
|
|
732
|
+
], TelegramController.prototype, "updatePrivacy", null);
|
|
733
|
+
__decorate([
|
|
734
|
+
(0, common_1.Post)('privacy/batch/:mobile'),
|
|
735
|
+
(0, swagger_1.ApiOperation)({ summary: 'Update multiple privacy settings' }),
|
|
736
|
+
(0, swagger_1.ApiParam)({ name: 'mobile', description: 'Mobile number', required: true }),
|
|
737
|
+
(0, swagger_1.ApiBody)({ type: dto_1.PrivacySettingsDto }),
|
|
738
|
+
__param(0, (0, common_1.Param)('mobile')),
|
|
739
|
+
__param(1, (0, common_1.Body)()),
|
|
740
|
+
__metadata("design:type", Function),
|
|
741
|
+
__metadata("design:paramtypes", [String, dto_1.PrivacySettingsDto]),
|
|
742
|
+
__metadata("design:returntype", Promise)
|
|
743
|
+
], TelegramController.prototype, "updatePrivacyBatch", null);
|
|
744
|
+
__decorate([
|
|
745
|
+
(0, common_1.Get)('sessions/:mobile'),
|
|
746
|
+
(0, swagger_1.ApiOperation)({ summary: 'Get active sessions' }),
|
|
747
|
+
(0, swagger_1.ApiParam)({ name: 'mobile', description: 'Mobile number', required: true }),
|
|
748
|
+
(0, swagger_1.ApiResponse)({ status: 200, description: 'Active sessions retrieved successfully' }),
|
|
749
|
+
__param(0, (0, common_1.Param)('mobile')),
|
|
750
|
+
__metadata("design:type", Function),
|
|
751
|
+
__metadata("design:paramtypes", [String]),
|
|
752
|
+
__metadata("design:returntype", Promise)
|
|
753
|
+
], TelegramController.prototype, "getActiveSessions", null);
|
|
754
|
+
__decorate([
|
|
755
|
+
(0, common_1.Delete)('sessions/:mobile'),
|
|
756
|
+
(0, swagger_1.ApiOperation)({ summary: 'Terminate other sessions' }),
|
|
757
|
+
(0, swagger_1.ApiParam)({ name: 'mobile', description: 'Mobile number', required: true }),
|
|
758
|
+
(0, swagger_1.ApiResponse)({ status: 200, description: 'Other sessions terminated successfully' }),
|
|
759
|
+
__param(0, (0, common_1.Param)('mobile')),
|
|
760
|
+
__metadata("design:type", Function),
|
|
761
|
+
__metadata("design:paramtypes", [String]),
|
|
762
|
+
__metadata("design:returntype", Promise)
|
|
763
|
+
], TelegramController.prototype, "terminateOtherSessions", null);
|
|
764
|
+
__decorate([
|
|
765
|
+
(0, common_1.Post)('sessions/new/:mobile'),
|
|
766
|
+
(0, swagger_1.ApiOperation)({ summary: 'Create new session' }),
|
|
767
|
+
(0, swagger_1.ApiParam)({ name: 'mobile', description: 'Mobile number', required: true }),
|
|
768
|
+
(0, swagger_1.ApiResponse)({ status: 200, description: 'New session created successfully' }),
|
|
769
|
+
__param(0, (0, common_1.Param)('mobile')),
|
|
770
|
+
__metadata("design:type", Function),
|
|
771
|
+
__metadata("design:paramtypes", [String]),
|
|
772
|
+
__metadata("design:returntype", Promise)
|
|
773
|
+
], TelegramController.prototype, "createNewSession", null);
|
|
774
|
+
__decorate([
|
|
775
|
+
(0, common_1.Get)('session/info/:mobile'),
|
|
776
|
+
(0, swagger_1.ApiOperation)({ summary: 'Get session information' }),
|
|
777
|
+
(0, swagger_1.ApiParam)({ name: 'mobile', description: 'Mobile number', required: true }),
|
|
778
|
+
__param(0, (0, common_1.Param)('mobile')),
|
|
779
|
+
__metadata("design:type", Function),
|
|
780
|
+
__metadata("design:paramtypes", [String]),
|
|
781
|
+
__metadata("design:returntype", Promise)
|
|
782
|
+
], TelegramController.prototype, "getSessionInfo", null);
|
|
783
|
+
__decorate([
|
|
784
|
+
(0, common_1.Post)('session/terminate/:mobile'),
|
|
785
|
+
(0, swagger_1.ApiOperation)({ summary: 'Terminate specific session' }),
|
|
786
|
+
(0, swagger_1.ApiParam)({ name: 'mobile', description: 'Mobile number', required: true }),
|
|
787
|
+
__param(0, (0, common_1.Param)('mobile')),
|
|
788
|
+
__param(1, (0, common_1.Body)()),
|
|
789
|
+
__metadata("design:type", Function),
|
|
790
|
+
__metadata("design:paramtypes", [String, Object]),
|
|
791
|
+
__metadata("design:returntype", Promise)
|
|
792
|
+
], TelegramController.prototype, "terminateSession", null);
|
|
793
|
+
__decorate([
|
|
794
|
+
(0, common_1.Get)('monitoring/status'),
|
|
795
|
+
(0, swagger_1.ApiOperation)({ summary: 'Get service health and connection status' }),
|
|
796
|
+
(0, swagger_1.ApiResponse)({ status: 200, type: common_responses_dto_1.ConnectionStatusDto }),
|
|
797
|
+
__metadata("design:type", Function),
|
|
798
|
+
__metadata("design:paramtypes", []),
|
|
799
|
+
__metadata("design:returntype", Promise)
|
|
800
|
+
], TelegramController.prototype, "getConnectionStatus", null);
|
|
801
|
+
__decorate([
|
|
802
|
+
(0, common_1.Get)('monitoring/client/:mobile'),
|
|
803
|
+
(0, swagger_1.ApiOperation)({ summary: 'Get client metadata' }),
|
|
804
|
+
(0, swagger_1.ApiParam)({ name: 'mobile', description: 'Mobile number', required: true }),
|
|
805
|
+
(0, swagger_1.ApiResponse)({ status: 200, description: 'Client metadata retrieved successfully' }),
|
|
806
|
+
__param(0, (0, common_1.Param)('mobile')),
|
|
807
|
+
__metadata("design:type", Function),
|
|
808
|
+
__metadata("design:paramtypes", [String]),
|
|
809
|
+
__metadata("design:returntype", Promise)
|
|
810
|
+
], TelegramController.prototype, "getClientMetadata", null);
|
|
811
|
+
__decorate([
|
|
812
|
+
(0, common_1.Get)('monitoring/statistics'),
|
|
813
|
+
(0, swagger_1.ApiOperation)({ summary: 'Get client statistics' }),
|
|
814
|
+
(0, swagger_1.ApiResponse)({ status: 200, description: 'Statistics retrieved successfully' }),
|
|
815
|
+
__metadata("design:type", Function),
|
|
816
|
+
__metadata("design:paramtypes", []),
|
|
817
|
+
__metadata("design:returntype", Promise)
|
|
818
|
+
], TelegramController.prototype, "getClientStatistics", null);
|
|
819
|
+
__decorate([
|
|
820
|
+
(0, common_1.Get)('monitoring/health'),
|
|
821
|
+
(0, swagger_1.ApiOperation)({ summary: 'Get service health' }),
|
|
822
|
+
(0, swagger_1.ApiResponse)({ status: 200, description: 'Health status retrieved successfully' }),
|
|
823
|
+
__metadata("design:type", Function),
|
|
824
|
+
__metadata("design:paramtypes", []),
|
|
825
|
+
__metadata("design:returntype", Promise)
|
|
826
|
+
], TelegramController.prototype, "getHealthStatus", null);
|
|
827
|
+
__decorate([
|
|
828
|
+
(0, common_1.Get)('monitoring/calllog/:mobile'),
|
|
829
|
+
(0, swagger_1.ApiOperation)({ summary: 'Get call log statistics' }),
|
|
830
|
+
(0, swagger_1.ApiParam)({ name: 'mobile', description: 'Mobile number', required: true }),
|
|
831
|
+
__param(0, (0, common_1.Param)('mobile')),
|
|
832
|
+
__metadata("design:type", Function),
|
|
833
|
+
__metadata("design:paramtypes", [String]),
|
|
834
|
+
__metadata("design:returntype", Promise)
|
|
835
|
+
], TelegramController.prototype, "getCallLogStats", null);
|
|
836
|
+
__decorate([
|
|
837
|
+
(0, common_1.Post)('contacts/add-bulk/:mobile'),
|
|
838
|
+
(0, swagger_1.ApiOperation)({ summary: 'Add multiple contacts in bulk' }),
|
|
839
|
+
(0, swagger_1.ApiParam)({ name: 'mobile', description: 'Mobile number', required: true }),
|
|
840
|
+
(0, swagger_1.ApiBody)({ type: dto_1.AddContactsDto }),
|
|
841
|
+
(0, swagger_1.ApiResponse)({ status: 200, description: 'Contacts added successfully' }),
|
|
842
|
+
__param(0, (0, common_1.Param)('mobile')),
|
|
843
|
+
__param(1, (0, common_1.Body)()),
|
|
844
|
+
__metadata("design:type", Function),
|
|
845
|
+
__metadata("design:paramtypes", [String, dto_1.AddContactsDto]),
|
|
846
|
+
__metadata("design:returntype", Promise)
|
|
847
|
+
], TelegramController.prototype, "addContactsBulk", null);
|
|
848
|
+
__decorate([
|
|
849
|
+
(0, common_1.Get)('contacts/:mobile'),
|
|
850
|
+
(0, swagger_1.ApiOperation)({ summary: 'Get all contacts' }),
|
|
851
|
+
(0, swagger_1.ApiParam)({ name: 'mobile', description: 'Mobile number', required: true }),
|
|
852
|
+
(0, swagger_1.ApiResponse)({ status: 200, description: 'Contacts retrieved successfully' }),
|
|
853
|
+
__param(0, (0, common_1.Param)('mobile')),
|
|
854
|
+
__metadata("design:type", Function),
|
|
855
|
+
__metadata("design:paramtypes", [String]),
|
|
856
|
+
__metadata("design:returntype", Promise)
|
|
857
|
+
], TelegramController.prototype, "getContacts", null);
|
|
858
|
+
__decorate([
|
|
859
|
+
(0, common_1.Get)('media/info/:mobile'),
|
|
860
|
+
(0, swagger_1.ApiOperation)({ summary: 'Get media messages info' }),
|
|
861
|
+
(0, swagger_1.ApiParam)({ name: 'mobile', description: 'Mobile number', required: true }),
|
|
862
|
+
(0, swagger_1.ApiQuery)({ name: 'chatId', required: true }),
|
|
863
|
+
(0, swagger_1.ApiQuery)({ name: 'types', required: false, enum: dto_1.MediaType, isArray: true }),
|
|
864
|
+
(0, swagger_1.ApiQuery)({ name: 'offset', required: false, type: Number }),
|
|
865
|
+
(0, swagger_1.ApiQuery)({ name: 'limit', required: false, type: Number }),
|
|
866
|
+
__param(0, (0, common_1.Param)('mobile')),
|
|
867
|
+
__param(1, (0, common_1.Query)('chatId')),
|
|
868
|
+
__param(2, (0, common_1.Query)('types')),
|
|
869
|
+
__param(3, (0, common_1.Query)('offset')),
|
|
870
|
+
__param(4, (0, common_1.Query)('limit')),
|
|
871
|
+
__metadata("design:type", Function),
|
|
872
|
+
__metadata("design:paramtypes", [String, String, Array, Number, Number]),
|
|
873
|
+
__metadata("design:returntype", Promise)
|
|
874
|
+
], TelegramController.prototype, "getMediaInfo", null);
|
|
875
|
+
__decorate([
|
|
876
|
+
(0, common_1.Post)('media/send/:mobile'),
|
|
877
|
+
(0, swagger_1.ApiOperation)({ summary: 'Send media message' }),
|
|
878
|
+
(0, swagger_1.ApiParam)({ name: 'mobile', description: 'Mobile number', required: true }),
|
|
879
|
+
(0, swagger_1.ApiBody)({ type: dto_1.SendMediaDto }),
|
|
880
|
+
__param(0, (0, common_1.Param)('mobile')),
|
|
881
|
+
__param(1, (0, common_1.Body)()),
|
|
882
|
+
__metadata("design:type", Function),
|
|
883
|
+
__metadata("design:paramtypes", [String, dto_1.SendMediaDto]),
|
|
884
|
+
__metadata("design:returntype", Promise)
|
|
885
|
+
], TelegramController.prototype, "sendMedia", null);
|
|
886
|
+
__decorate([
|
|
887
|
+
(0, common_1.Get)('media/download/:mobile'),
|
|
888
|
+
(0, swagger_1.ApiOperation)({ summary: 'Download media from a message' }),
|
|
889
|
+
(0, swagger_1.ApiParam)({ name: 'mobile', description: 'Mobile number', required: true }),
|
|
890
|
+
(0, swagger_1.ApiQuery)({ name: 'chatId', required: true }),
|
|
891
|
+
(0, swagger_1.ApiQuery)({ name: 'messageId', required: true }),
|
|
892
|
+
__param(0, (0, common_1.Param)('mobile')),
|
|
893
|
+
__param(1, (0, common_1.Query)('chatId')),
|
|
894
|
+
__param(2, (0, common_1.Query)('messageId')),
|
|
895
|
+
__param(3, (0, common_1.Res)()),
|
|
896
|
+
__metadata("design:type", Function),
|
|
897
|
+
__metadata("design:paramtypes", [String, String, Number, Object]),
|
|
898
|
+
__metadata("design:returntype", Promise)
|
|
899
|
+
], TelegramController.prototype, "downloadMedia", null);
|
|
900
|
+
__decorate([
|
|
901
|
+
(0, common_1.Post)('media/album/:mobile'),
|
|
902
|
+
(0, swagger_1.ApiOperation)({ summary: 'Send media album (multiple photos/videos)' }),
|
|
903
|
+
(0, swagger_1.ApiParam)({ name: 'mobile', description: 'Mobile number', required: true }),
|
|
904
|
+
(0, swagger_1.ApiBody)({ type: dto_1.SendMediaAlbumDto }),
|
|
905
|
+
__param(0, (0, common_1.Param)('mobile')),
|
|
906
|
+
__param(1, (0, common_1.Body)()),
|
|
907
|
+
__metadata("design:type", Function),
|
|
908
|
+
__metadata("design:paramtypes", [String, Object]),
|
|
909
|
+
__metadata("design:returntype", Promise)
|
|
910
|
+
], TelegramController.prototype, "sendMediaAlbum", null);
|
|
911
|
+
__decorate([
|
|
912
|
+
(0, common_1.Get)('media/metadata/:mobile'),
|
|
913
|
+
(0, swagger_1.ApiOperation)({ summary: 'Get media metadata from a chat' }),
|
|
914
|
+
(0, swagger_1.ApiParam)({ name: 'mobile', description: 'Mobile number', required: true }),
|
|
915
|
+
(0, swagger_1.ApiQuery)({ type: dto_1.MediaSearchDto }),
|
|
916
|
+
(0, swagger_1.ApiResponse)({ status: 200, type: [metadata_operations_dto_1.MediaMetadataDto] }),
|
|
917
|
+
__param(0, (0, common_1.Param)('mobile')),
|
|
918
|
+
__param(1, (0, common_1.Query)()),
|
|
919
|
+
__metadata("design:type", Function),
|
|
920
|
+
__metadata("design:paramtypes", [String, dto_1.MediaSearchDto]),
|
|
921
|
+
__metadata("design:returntype", Promise)
|
|
922
|
+
], TelegramController.prototype, "getMediaMetadata", null);
|
|
923
|
+
__decorate([
|
|
924
|
+
(0, common_1.Get)('media/filter/:mobile'),
|
|
925
|
+
(0, swagger_1.ApiOperation)({ summary: 'Get filtered media messages from a chat' }),
|
|
926
|
+
(0, swagger_1.ApiParam)({ name: 'mobile', description: 'Mobile number', required: true }),
|
|
927
|
+
(0, swagger_1.ApiQuery)({ name: 'chatId', required: true }),
|
|
928
|
+
(0, swagger_1.ApiQuery)({ name: 'types', enum: ['photo', 'video', 'document'], required: false, isArray: true }),
|
|
929
|
+
(0, swagger_1.ApiQuery)({ name: 'startDate', required: false }),
|
|
930
|
+
(0, swagger_1.ApiQuery)({ name: 'endDate', required: false }),
|
|
931
|
+
(0, swagger_1.ApiQuery)({ name: 'limit', description: 'Number of messages to fetch', required: false, type: Number }),
|
|
932
|
+
(0, swagger_1.ApiQuery)({ name: 'minId', required: false, type: Number }),
|
|
933
|
+
(0, swagger_1.ApiQuery)({ name: 'maxId', required: false, type: Number }),
|
|
934
|
+
(0, swagger_1.ApiResponse)({ status: 200, type: [metadata_operations_dto_1.MediaMetadataDto] }),
|
|
935
|
+
__param(0, (0, common_1.Param)('mobile')),
|
|
936
|
+
__param(1, (0, common_1.Query)('chatId')),
|
|
937
|
+
__param(2, (0, common_1.Query)('types')),
|
|
938
|
+
__param(3, (0, common_1.Query)('startDate')),
|
|
939
|
+
__param(4, (0, common_1.Query)('endDate')),
|
|
940
|
+
__param(5, (0, common_1.Query)('limit')),
|
|
941
|
+
__param(6, (0, common_1.Query)('minId')),
|
|
942
|
+
__param(7, (0, common_1.Query)('maxId')),
|
|
943
|
+
__metadata("design:type", Function),
|
|
944
|
+
__metadata("design:paramtypes", [String, String, Array, String, String, Number, Number, Number]),
|
|
945
|
+
__metadata("design:returntype", Promise)
|
|
946
|
+
], TelegramController.prototype, "getFilteredMedia", null);
|
|
947
|
+
__decorate([
|
|
948
|
+
(0, common_1.Get)('group/members/:mobile'),
|
|
949
|
+
(0, swagger_1.ApiOperation)({ summary: 'Get group members' }),
|
|
950
|
+
(0, swagger_1.ApiParam)({ name: 'mobile', description: 'Mobile number', required: true }),
|
|
951
|
+
(0, swagger_1.ApiQuery)({ name: 'groupId', description: 'Group ID', required: true }),
|
|
952
|
+
__param(0, (0, common_1.Param)('mobile')),
|
|
953
|
+
__param(1, (0, common_1.Query)('groupId')),
|
|
954
|
+
__metadata("design:type", Function),
|
|
955
|
+
__metadata("design:paramtypes", [String, String]),
|
|
956
|
+
__metadata("design:returntype", Promise)
|
|
957
|
+
], TelegramController.prototype, "getGroupMembers", null);
|
|
958
|
+
__decorate([
|
|
959
|
+
(0, common_1.Post)('chat/block/:mobile'),
|
|
960
|
+
(0, swagger_1.ApiOperation)({ summary: 'Block a chat/user' }),
|
|
961
|
+
(0, swagger_1.ApiParam)({ name: 'mobile', description: 'Mobile number', required: true }),
|
|
962
|
+
(0, swagger_1.ApiQuery)({ name: 'chatId', description: 'Chat/User ID to block', required: true }),
|
|
963
|
+
__param(0, (0, common_1.Param)('mobile')),
|
|
964
|
+
__param(1, (0, common_1.Query)('chatId')),
|
|
965
|
+
__metadata("design:type", Function),
|
|
966
|
+
__metadata("design:paramtypes", [String, String]),
|
|
967
|
+
__metadata("design:returntype", Promise)
|
|
968
|
+
], TelegramController.prototype, "blockChat", null);
|
|
969
|
+
__decorate([
|
|
970
|
+
(0, common_1.Delete)('chat/:mobile'),
|
|
971
|
+
(0, swagger_1.ApiOperation)({ summary: 'Delete a chat' }),
|
|
972
|
+
(0, swagger_1.ApiParam)({ name: 'mobile', description: 'Mobile number', required: true }),
|
|
973
|
+
(0, swagger_1.ApiQuery)({ name: 'chatId', description: 'Chat ID to delete', required: true }),
|
|
974
|
+
__param(0, (0, common_1.Param)('mobile')),
|
|
975
|
+
__param(1, (0, common_1.Query)('chatId')),
|
|
976
|
+
__metadata("design:type", Function),
|
|
977
|
+
__metadata("design:paramtypes", [String, String]),
|
|
978
|
+
__metadata("design:returntype", Promise)
|
|
979
|
+
], TelegramController.prototype, "deleteChatHistory", null);
|
|
980
|
+
__decorate([
|
|
981
|
+
(0, common_1.Get)('messages/inline/:mobile'),
|
|
982
|
+
(0, swagger_1.ApiOperation)({ summary: 'Send message with inline button' }),
|
|
983
|
+
(0, swagger_1.ApiParam)({ name: 'mobile', description: 'Mobile number', required: true }),
|
|
984
|
+
(0, swagger_1.ApiQuery)({ name: 'chatId', required: true }),
|
|
985
|
+
(0, swagger_1.ApiQuery)({ name: 'message', required: true }),
|
|
986
|
+
(0, swagger_1.ApiQuery)({ name: 'url', required: true }),
|
|
987
|
+
__param(0, (0, common_1.Param)('mobile')),
|
|
988
|
+
__param(1, (0, common_1.Query)('chatId')),
|
|
989
|
+
__param(2, (0, common_1.Query)('message')),
|
|
990
|
+
__param(3, (0, common_1.Query)('url')),
|
|
991
|
+
__metadata("design:type", Function),
|
|
992
|
+
__metadata("design:paramtypes", [String, String, String, String]),
|
|
993
|
+
__metadata("design:returntype", Promise)
|
|
994
|
+
], TelegramController.prototype, "sendMessageWithInlineButton", null);
|
|
995
|
+
__decorate([
|
|
996
|
+
(0, common_1.Get)('dialogs/:mobile'),
|
|
997
|
+
(0, swagger_1.ApiOperation)({ summary: 'Get all dialogs' }),
|
|
998
|
+
(0, swagger_1.ApiParam)({ name: 'mobile', description: 'Mobile number', required: true }),
|
|
999
|
+
(0, swagger_1.ApiQuery)({ name: 'limit', description: 'Number of dialogs to fetch', required: false, type: Number }),
|
|
1000
|
+
(0, swagger_1.ApiQuery)({ name: 'offsetId', description: 'Number of dialogs to fetch', required: false, type: Number }),
|
|
1001
|
+
(0, swagger_1.ApiQuery)({ name: 'archived', description: 'Include archived chats', required: false, type: Boolean }),
|
|
1002
|
+
__param(0, (0, common_1.Param)('mobile')),
|
|
1003
|
+
__param(1, (0, common_1.Query)('limit')),
|
|
1004
|
+
__param(2, (0, common_1.Query)('offsetId')),
|
|
1005
|
+
__param(3, (0, common_1.Query)('archived')),
|
|
1006
|
+
__metadata("design:type", Function),
|
|
1007
|
+
__metadata("design:paramtypes", [String, Number, Number, Boolean]),
|
|
1008
|
+
__metadata("design:returntype", Promise)
|
|
1009
|
+
], TelegramController.prototype, "getAllDialogs", null);
|
|
1010
|
+
__decorate([
|
|
1011
|
+
(0, common_1.Get)('last-active/:mobile'),
|
|
1012
|
+
(0, swagger_1.ApiOperation)({ summary: 'Get last active time' }),
|
|
1013
|
+
(0, swagger_1.ApiParam)({ name: 'mobile', description: 'Mobile number', required: true }),
|
|
1014
|
+
(0, swagger_1.ApiResponse)({ status: 200, description: 'Last active time retrieved successfully' }),
|
|
1015
|
+
__param(0, (0, common_1.Param)('mobile')),
|
|
1016
|
+
__metadata("design:type", Function),
|
|
1017
|
+
__metadata("design:paramtypes", [String]),
|
|
1018
|
+
__metadata("design:returntype", Promise)
|
|
1019
|
+
], TelegramController.prototype, "getLastActiveTime", null);
|
|
1020
|
+
__decorate([
|
|
1021
|
+
(0, common_1.Post)('group/create/:mobile'),
|
|
1022
|
+
(0, swagger_1.ApiOperation)({ summary: 'Create a new group with advanced options' }),
|
|
1023
|
+
(0, swagger_1.ApiParam)({ name: 'mobile', description: 'Mobile number', required: true }),
|
|
1024
|
+
(0, swagger_1.ApiBody)({ type: dto_1.createGroupDto }),
|
|
1025
|
+
__param(0, (0, common_1.Param)('mobile')),
|
|
1026
|
+
__param(1, (0, common_1.Body)()),
|
|
1027
|
+
__metadata("design:type", Function),
|
|
1028
|
+
__metadata("design:paramtypes", [String, dto_1.createGroupDto]),
|
|
1029
|
+
__metadata("design:returntype", Promise)
|
|
1030
|
+
], TelegramController.prototype, "createGroupWithOptions", null);
|
|
1031
|
+
__decorate([
|
|
1032
|
+
(0, common_1.Post)('group/settings/:mobile'),
|
|
1033
|
+
(0, swagger_1.ApiOperation)({ summary: 'Update group settings' }),
|
|
1034
|
+
(0, swagger_1.ApiParam)({ name: 'mobile', description: 'Mobile number', required: true }),
|
|
1035
|
+
(0, swagger_1.ApiBody)({ type: dto_1.GroupSettingsDto }),
|
|
1036
|
+
__param(0, (0, common_1.Param)('mobile')),
|
|
1037
|
+
__param(1, (0, common_1.Body)()),
|
|
1038
|
+
__metadata("design:type", Function),
|
|
1039
|
+
__metadata("design:paramtypes", [String, dto_1.GroupSettingsDto]),
|
|
1040
|
+
__metadata("design:returntype", Promise)
|
|
1041
|
+
], TelegramController.prototype, "updateGroupSettings", null);
|
|
1042
|
+
__decorate([
|
|
1043
|
+
(0, common_1.Post)('group/members/:mobile'),
|
|
1044
|
+
(0, swagger_1.ApiOperation)({ summary: 'Add members to a group' }),
|
|
1045
|
+
(0, swagger_1.ApiParam)({ name: 'mobile', description: 'Mobile number', required: true }),
|
|
1046
|
+
(0, swagger_1.ApiBody)({ type: dto_1.GroupMemberOperationDto }),
|
|
1047
|
+
__param(0, (0, common_1.Body)()),
|
|
1048
|
+
__param(1, (0, common_1.Param)('mobile')),
|
|
1049
|
+
__metadata("design:type", Function),
|
|
1050
|
+
__metadata("design:paramtypes", [dto_1.GroupMemberOperationDto, String]),
|
|
1051
|
+
__metadata("design:returntype", Promise)
|
|
1052
|
+
], TelegramController.prototype, "addGroupMembers", null);
|
|
1053
|
+
__decorate([
|
|
1054
|
+
(0, common_1.Delete)('group/members/:mobile'),
|
|
1055
|
+
(0, swagger_1.ApiOperation)({ summary: 'Remove members from a group' }),
|
|
1056
|
+
(0, swagger_1.ApiParam)({ name: 'mobile', description: 'Mobile number', required: true }),
|
|
1057
|
+
(0, swagger_1.ApiBody)({ type: dto_1.GroupMemberOperationDto }),
|
|
1058
|
+
__param(0, (0, common_1.Body)()),
|
|
1059
|
+
__param(1, (0, common_1.Param)('mobile')),
|
|
1060
|
+
__metadata("design:type", Function),
|
|
1061
|
+
__metadata("design:paramtypes", [dto_1.GroupMemberOperationDto, String]),
|
|
1062
|
+
__metadata("design:returntype", Promise)
|
|
1063
|
+
], TelegramController.prototype, "removeGroupMembers", null);
|
|
1064
|
+
__decorate([
|
|
1065
|
+
(0, common_1.Post)('group/admin/:mobile'),
|
|
1066
|
+
(0, swagger_1.ApiOperation)({ summary: 'Promote or demote group admins' }),
|
|
1067
|
+
(0, swagger_1.ApiParam)({ name: 'mobile', description: 'Mobile number', required: true }),
|
|
1068
|
+
(0, swagger_1.ApiBody)({ type: dto_1.AdminOperationDto }),
|
|
1069
|
+
__param(0, (0, common_1.Body)()),
|
|
1070
|
+
__param(1, (0, common_1.Param)('mobile')),
|
|
1071
|
+
__metadata("design:type", Function),
|
|
1072
|
+
__metadata("design:paramtypes", [dto_1.AdminOperationDto, String]),
|
|
1073
|
+
__metadata("design:returntype", Promise)
|
|
1074
|
+
], TelegramController.prototype, "handleAdminOperation", null);
|
|
1075
|
+
__decorate([
|
|
1076
|
+
(0, common_1.Post)('chat/cleanup/:mobile'),
|
|
1077
|
+
(0, swagger_1.ApiOperation)({ summary: 'Clean up chat history' }),
|
|
1078
|
+
(0, swagger_1.ApiParam)({ name: 'mobile', description: 'Mobile number', required: true }),
|
|
1079
|
+
(0, swagger_1.ApiBody)({ type: dto_1.ChatCleanupDto }),
|
|
1080
|
+
__param(0, (0, common_1.Param)('mobile')),
|
|
1081
|
+
__param(1, (0, common_1.Body)()),
|
|
1082
|
+
__metadata("design:type", Function),
|
|
1083
|
+
__metadata("design:paramtypes", [String, dto_1.ChatCleanupDto]),
|
|
1084
|
+
__metadata("design:returntype", Promise)
|
|
1085
|
+
], TelegramController.prototype, "cleanupChat", null);
|
|
1086
|
+
__decorate([
|
|
1087
|
+
(0, common_1.Get)('chat/statistics/:mobile'),
|
|
1088
|
+
(0, swagger_1.ApiOperation)({ summary: 'Get chat statistics' }),
|
|
1089
|
+
(0, swagger_1.ApiParam)({ name: 'mobile', description: 'Mobile number', required: true }),
|
|
1090
|
+
(0, swagger_1.ApiQuery)({ name: 'chatId', description: 'Chat ID', required: true }),
|
|
1091
|
+
(0, swagger_1.ApiQuery)({ name: 'period', enum: ['day', 'week', 'month'], description: 'Statistics period', required: false }),
|
|
1092
|
+
__param(0, (0, common_1.Param)('mobile')),
|
|
1093
|
+
__param(1, (0, common_1.Query)('chatId')),
|
|
1094
|
+
__param(2, (0, common_1.Query)('period')),
|
|
1095
|
+
__metadata("design:type", Function),
|
|
1096
|
+
__metadata("design:paramtypes", [String, String, String]),
|
|
1097
|
+
__metadata("design:returntype", Promise)
|
|
1098
|
+
], TelegramController.prototype, "getChatStatistics", null);
|
|
1099
|
+
__decorate([
|
|
1100
|
+
(0, common_1.Post)('messages/schedule/:mobile'),
|
|
1101
|
+
(0, swagger_1.ApiOperation)({ summary: 'Schedule a message' }),
|
|
1102
|
+
(0, swagger_1.ApiParam)({ name: 'mobile', description: 'Mobile number', required: true }),
|
|
1103
|
+
(0, swagger_1.ApiBody)({ type: dto_1.ScheduleMessageDto }),
|
|
1104
|
+
__param(0, (0, common_1.Param)('mobile')),
|
|
1105
|
+
__param(1, (0, common_1.Body)()),
|
|
1106
|
+
__metadata("design:type", Function),
|
|
1107
|
+
__metadata("design:paramtypes", [String, dto_1.ScheduleMessageDto]),
|
|
1108
|
+
__metadata("design:returntype", Promise)
|
|
1109
|
+
], TelegramController.prototype, "scheduleMessage", null);
|
|
1110
|
+
__decorate([
|
|
1111
|
+
(0, common_1.Get)('messages/scheduled/:mobile'),
|
|
1112
|
+
(0, swagger_1.ApiOperation)({ summary: 'Get scheduled messages' }),
|
|
1113
|
+
(0, swagger_1.ApiParam)({ name: 'mobile', description: 'Mobile number', required: true }),
|
|
1114
|
+
(0, swagger_1.ApiQuery)({ name: 'chatId', description: 'Chat ID', required: true }),
|
|
1115
|
+
__param(0, (0, common_1.Param)('mobile')),
|
|
1116
|
+
__param(1, (0, common_1.Query)('chatId')),
|
|
1117
|
+
__metadata("design:type", Function),
|
|
1118
|
+
__metadata("design:paramtypes", [String, String]),
|
|
1119
|
+
__metadata("design:returntype", Promise)
|
|
1120
|
+
], TelegramController.prototype, "getScheduledMessages", null);
|
|
1121
|
+
__decorate([
|
|
1122
|
+
(0, common_1.Post)('media/voice/:mobile'),
|
|
1123
|
+
(0, swagger_1.ApiOperation)({ summary: 'Send voice message' }),
|
|
1124
|
+
(0, swagger_1.ApiParam)({ name: 'mobile', description: 'Mobile number', required: true }),
|
|
1125
|
+
__param(0, (0, common_1.Param)('mobile')),
|
|
1126
|
+
__param(1, (0, common_1.Body)()),
|
|
1127
|
+
__metadata("design:type", Function),
|
|
1128
|
+
__metadata("design:paramtypes", [String, Object]),
|
|
1129
|
+
__metadata("design:returntype", Promise)
|
|
1130
|
+
], TelegramController.prototype, "sendVoiceMessage", null);
|
|
1131
|
+
__decorate([
|
|
1132
|
+
(0, common_1.Get)('chat/history/:mobile'),
|
|
1133
|
+
(0, swagger_1.ApiOperation)({ summary: 'Get chat history with metadata' }),
|
|
1134
|
+
(0, swagger_1.ApiParam)({ name: 'mobile', description: 'Mobile number', required: true }),
|
|
1135
|
+
(0, swagger_1.ApiQuery)({ name: 'chatId', required: true }),
|
|
1136
|
+
(0, swagger_1.ApiQuery)({ name: 'offset', required: false, type: Number }),
|
|
1137
|
+
(0, swagger_1.ApiQuery)({ name: 'limit', required: false, type: Number }),
|
|
1138
|
+
__param(0, (0, common_1.Param)('mobile')),
|
|
1139
|
+
__param(1, (0, common_1.Query)('chatId')),
|
|
1140
|
+
__param(2, (0, common_1.Query)('offset')),
|
|
1141
|
+
__param(3, (0, common_1.Query)('limit')),
|
|
1142
|
+
__metadata("design:type", Function),
|
|
1143
|
+
__metadata("design:paramtypes", [String, String, Number, Number]),
|
|
1144
|
+
__metadata("design:returntype", Promise)
|
|
1145
|
+
], TelegramController.prototype, "getChatHistory", null);
|
|
1146
|
+
__decorate([
|
|
1147
|
+
(0, common_1.Get)('session/validate/:mobile'),
|
|
1148
|
+
(0, swagger_1.ApiOperation)({ summary: 'Validate session status' }),
|
|
1149
|
+
(0, swagger_1.ApiParam)({ name: 'mobile', description: 'Mobile number', required: true }),
|
|
1150
|
+
(0, swagger_1.ApiResponse)({ status: 200, description: 'Session status retrieved successfully' }),
|
|
1151
|
+
__param(0, (0, common_1.Param)('mobile')),
|
|
1152
|
+
__metadata("design:type", Function),
|
|
1153
|
+
__metadata("design:paramtypes", [String]),
|
|
1154
|
+
__metadata("design:returntype", Promise)
|
|
1155
|
+
], TelegramController.prototype, "validateSession", null);
|
|
1156
|
+
__decorate([
|
|
1157
|
+
(0, common_1.Post)('group/admin/promote/:mobile'),
|
|
1158
|
+
(0, swagger_1.ApiOperation)({ summary: 'Promote members to admin' }),
|
|
1159
|
+
(0, swagger_1.ApiParam)({ name: 'mobile', description: 'Mobile number', required: true }),
|
|
1160
|
+
(0, swagger_1.ApiBody)({ type: dto_1.AdminOperationDto }),
|
|
1161
|
+
__param(0, (0, common_1.Param)('mobile')),
|
|
1162
|
+
__param(1, (0, common_1.Body)()),
|
|
1163
|
+
__metadata("design:type", Function),
|
|
1164
|
+
__metadata("design:paramtypes", [String, dto_1.AdminOperationDto]),
|
|
1165
|
+
__metadata("design:returntype", Promise)
|
|
1166
|
+
], TelegramController.prototype, "promoteToAdmin", null);
|
|
1167
|
+
__decorate([
|
|
1168
|
+
(0, common_1.Post)('group/admin/demote/:mobile'),
|
|
1169
|
+
(0, swagger_1.ApiOperation)({ summary: 'Demote admin to regular member' }),
|
|
1170
|
+
(0, swagger_1.ApiParam)({ name: 'mobile', description: 'Mobile number', required: true }),
|
|
1171
|
+
(0, swagger_1.ApiBody)({ type: dto_1.GroupMemberOperationDto }),
|
|
1172
|
+
__param(0, (0, common_1.Param)('mobile')),
|
|
1173
|
+
__param(1, (0, common_1.Body)()),
|
|
1174
|
+
__metadata("design:type", Function),
|
|
1175
|
+
__metadata("design:paramtypes", [String, dto_1.GroupMemberOperationDto]),
|
|
1176
|
+
__metadata("design:returntype", Promise)
|
|
1177
|
+
], TelegramController.prototype, "demoteAdmin", null);
|
|
1178
|
+
__decorate([
|
|
1179
|
+
(0, common_1.Post)('group/unblock/:mobile'),
|
|
1180
|
+
(0, swagger_1.ApiOperation)({ summary: 'Unblock a user in a group' }),
|
|
1181
|
+
(0, swagger_1.ApiParam)({ name: 'mobile', description: 'Mobile number', required: true }),
|
|
1182
|
+
__param(0, (0, common_1.Param)('mobile')),
|
|
1183
|
+
__param(1, (0, common_1.Body)()),
|
|
1184
|
+
__metadata("design:type", Function),
|
|
1185
|
+
__metadata("design:paramtypes", [String, Object]),
|
|
1186
|
+
__metadata("design:returntype", Promise)
|
|
1187
|
+
], TelegramController.prototype, "unblockGroupUser", null);
|
|
1188
|
+
__decorate([
|
|
1189
|
+
(0, common_1.Get)('group/admins/:mobile'),
|
|
1190
|
+
(0, swagger_1.ApiOperation)({ summary: 'Get list of group admins' }),
|
|
1191
|
+
(0, swagger_1.ApiParam)({ name: 'mobile', description: 'Mobile number', required: true }),
|
|
1192
|
+
(0, swagger_1.ApiQuery)({ name: 'groupId', description: 'Group ID', required: true }),
|
|
1193
|
+
__param(0, (0, common_1.Param)('mobile')),
|
|
1194
|
+
__param(1, (0, common_1.Query)('groupId')),
|
|
1195
|
+
__metadata("design:type", Function),
|
|
1196
|
+
__metadata("design:paramtypes", [String, String]),
|
|
1197
|
+
__metadata("design:returntype", Promise)
|
|
1198
|
+
], TelegramController.prototype, "getGroupAdmins", null);
|
|
1199
|
+
__decorate([
|
|
1200
|
+
(0, common_1.Get)('group/banned/:mobile'),
|
|
1201
|
+
(0, swagger_1.ApiOperation)({ summary: 'Get list of banned users in a group' }),
|
|
1202
|
+
(0, swagger_1.ApiParam)({ name: 'mobile', description: 'Mobile number', required: true }),
|
|
1203
|
+
(0, swagger_1.ApiQuery)({ name: 'groupId', description: 'Group ID', required: true }),
|
|
1204
|
+
__param(0, (0, common_1.Param)('mobile')),
|
|
1205
|
+
__param(1, (0, common_1.Query)('groupId')),
|
|
1206
|
+
__metadata("design:type", Function),
|
|
1207
|
+
__metadata("design:paramtypes", [String, String]),
|
|
1208
|
+
__metadata("design:returntype", Promise)
|
|
1209
|
+
], TelegramController.prototype, "getGroupBannedUsers", null);
|
|
1210
|
+
__decorate([
|
|
1211
|
+
(0, common_1.Post)('contacts/export/:mobile'),
|
|
1212
|
+
(0, swagger_1.ApiOperation)({ summary: 'Export contacts in vCard or CSV format' }),
|
|
1213
|
+
(0, swagger_1.ApiParam)({ name: 'mobile', description: 'Mobile number', required: true }),
|
|
1214
|
+
(0, swagger_1.ApiBody)({ type: dto_1.ContactExportImportDto }),
|
|
1215
|
+
__param(0, (0, common_1.Param)('mobile')),
|
|
1216
|
+
__param(1, (0, common_1.Body)()),
|
|
1217
|
+
__param(2, (0, common_1.Res)()),
|
|
1218
|
+
__metadata("design:type", Function),
|
|
1219
|
+
__metadata("design:paramtypes", [String, dto_1.ContactExportImportDto, Object]),
|
|
1220
|
+
__metadata("design:returntype", Promise)
|
|
1221
|
+
], TelegramController.prototype, "exportContacts", null);
|
|
1222
|
+
__decorate([
|
|
1223
|
+
(0, common_1.Post)('contacts/import/:mobile'),
|
|
1224
|
+
(0, swagger_1.ApiOperation)({ summary: 'Import contacts from a list' }),
|
|
1225
|
+
(0, swagger_1.ApiParam)({ name: 'mobile', description: 'Mobile number', required: true }),
|
|
1226
|
+
__param(0, (0, common_1.Param)('mobile')),
|
|
1227
|
+
__param(1, (0, common_1.Body)()),
|
|
1228
|
+
__metadata("design:type", Function),
|
|
1229
|
+
__metadata("design:paramtypes", [String, Array]),
|
|
1230
|
+
__metadata("design:returntype", Promise)
|
|
1231
|
+
], TelegramController.prototype, "importContacts", null);
|
|
1232
|
+
__decorate([
|
|
1233
|
+
(0, common_1.Post)('contacts/block/:mobile'),
|
|
1234
|
+
(0, swagger_1.ApiOperation)({ summary: 'Manage blocked contacts' }),
|
|
1235
|
+
(0, swagger_1.ApiParam)({ name: 'mobile', description: 'Mobile number', required: true }),
|
|
1236
|
+
(0, swagger_1.ApiBody)({ type: dto_1.ContactBlockListDto }),
|
|
1237
|
+
__param(0, (0, common_1.Param)('mobile')),
|
|
1238
|
+
__param(1, (0, common_1.Body)()),
|
|
1239
|
+
__metadata("design:type", Function),
|
|
1240
|
+
__metadata("design:paramtypes", [String, dto_1.ContactBlockListDto]),
|
|
1241
|
+
__metadata("design:returntype", Promise)
|
|
1242
|
+
], TelegramController.prototype, "manageBlockList", null);
|
|
1243
|
+
__decorate([
|
|
1244
|
+
(0, common_1.Get)('contacts/statistics/:mobile'),
|
|
1245
|
+
(0, swagger_1.ApiOperation)({ summary: 'Get contact activity statistics' }),
|
|
1246
|
+
(0, swagger_1.ApiParam)({ name: 'mobile', description: 'Mobile number', required: true }),
|
|
1247
|
+
(0, swagger_1.ApiResponse)({ status: 200, description: 'Contact statistics retrieved successfully' }),
|
|
1248
|
+
__param(0, (0, common_1.Param)('mobile')),
|
|
1249
|
+
__metadata("design:type", Function),
|
|
1250
|
+
__metadata("design:paramtypes", [String]),
|
|
1251
|
+
__metadata("design:returntype", Promise)
|
|
1252
|
+
], TelegramController.prototype, "getContactStatistics", null);
|
|
1253
|
+
__decorate([
|
|
1254
|
+
(0, common_1.Post)('folders/create/:mobile'),
|
|
1255
|
+
(0, swagger_1.ApiOperation)({ summary: 'Create a new chat folder' }),
|
|
1256
|
+
(0, swagger_1.ApiParam)({ name: 'mobile', description: 'Mobile number', required: true }),
|
|
1257
|
+
(0, swagger_1.ApiBody)({ type: create_chat_folder_dto_1.CreateChatFolderDto }),
|
|
1258
|
+
__param(0, (0, common_1.Param)('mobile')),
|
|
1259
|
+
__param(1, (0, common_1.Body)()),
|
|
1260
|
+
__metadata("design:type", Function),
|
|
1261
|
+
__metadata("design:paramtypes", [String, create_chat_folder_dto_1.CreateChatFolderDto]),
|
|
1262
|
+
__metadata("design:returntype", Promise)
|
|
1263
|
+
], TelegramController.prototype, "createChatFolder", null);
|
|
1264
|
+
__decorate([
|
|
1265
|
+
(0, common_1.Get)('folders/:mobile'),
|
|
1266
|
+
(0, swagger_1.ApiOperation)({ summary: 'Get all chat folders' }),
|
|
1267
|
+
(0, swagger_1.ApiParam)({ name: 'mobile', description: 'Mobile number', required: true }),
|
|
1268
|
+
__param(0, (0, common_1.Param)('mobile')),
|
|
1269
|
+
__metadata("design:type", Function),
|
|
1270
|
+
__metadata("design:paramtypes", [String]),
|
|
1271
|
+
__metadata("design:returntype", Promise)
|
|
1272
|
+
], TelegramController.prototype, "getChatFolders", null);
|
|
1273
|
+
__decorate([
|
|
1274
|
+
(0, common_1.Put)('messages/:mobile'),
|
|
1275
|
+
(0, swagger_1.ApiOperation)({ summary: 'Edit message' }),
|
|
1276
|
+
(0, swagger_1.ApiParam)({ name: 'mobile', description: 'Mobile number', required: true }),
|
|
1277
|
+
__param(0, (0, common_1.Param)('mobile')),
|
|
1278
|
+
__param(1, (0, common_1.Body)()),
|
|
1279
|
+
__metadata("design:type", Function),
|
|
1280
|
+
__metadata("design:paramtypes", [String, Object]),
|
|
1281
|
+
__metadata("design:returntype", Promise)
|
|
1282
|
+
], TelegramController.prototype, "editMessage", null);
|
|
1283
|
+
__decorate([
|
|
1284
|
+
(0, common_1.Post)('chat/settings/:mobile'),
|
|
1285
|
+
(0, swagger_1.ApiOperation)({ summary: 'Update chat settings' }),
|
|
1286
|
+
(0, swagger_1.ApiParam)({ name: 'mobile', description: 'Mobile number', required: true }),
|
|
1287
|
+
__param(0, (0, common_1.Param)('mobile')),
|
|
1288
|
+
__param(1, (0, common_1.Body)()),
|
|
1289
|
+
__metadata("design:type", Function),
|
|
1290
|
+
__metadata("design:paramtypes", [String, Object]),
|
|
1291
|
+
__metadata("design:returntype", Promise)
|
|
1292
|
+
], TelegramController.prototype, "updateChatSettings", null);
|
|
1293
|
+
__decorate([
|
|
1294
|
+
(0, common_1.Post)('media/batch/:mobile'),
|
|
1295
|
+
(0, swagger_1.ApiOperation)({ summary: 'Send multiple media files in batch' }),
|
|
1296
|
+
(0, swagger_1.ApiParam)({ name: 'mobile', description: 'Mobile number', required: true }),
|
|
1297
|
+
__param(0, (0, common_1.Param)('mobile')),
|
|
1298
|
+
__param(1, (0, common_1.Body)()),
|
|
1299
|
+
__metadata("design:type", Function),
|
|
1300
|
+
__metadata("design:paramtypes", [String, Object]),
|
|
1301
|
+
__metadata("design:returntype", Promise)
|
|
1302
|
+
], TelegramController.prototype, "sendMediaBatch", null);
|
|
1303
|
+
__decorate([
|
|
1304
|
+
(0, common_1.Get)('security/2fa-status/:mobile'),
|
|
1305
|
+
(0, swagger_1.ApiOperation)({ summary: 'Check if 2FA password is set' }),
|
|
1306
|
+
(0, swagger_1.ApiParam)({ name: 'mobile', description: 'Mobile number', required: true }),
|
|
1307
|
+
__param(0, (0, common_1.Param)('mobile')),
|
|
1308
|
+
__metadata("design:type", Function),
|
|
1309
|
+
__metadata("design:paramtypes", [String]),
|
|
1310
|
+
__metadata("design:returntype", Promise)
|
|
1311
|
+
], TelegramController.prototype, "hasPassword", null);
|
|
1312
|
+
__decorate([
|
|
1313
|
+
(0, common_1.Get)('chats/:mobile'),
|
|
1314
|
+
(0, swagger_1.ApiOperation)({ summary: 'Get chats with advanced filtering' }),
|
|
1315
|
+
(0, swagger_1.ApiParam)({ name: 'mobile', description: 'Mobile number', required: true }),
|
|
1316
|
+
__param(0, (0, common_1.Param)('mobile')),
|
|
1317
|
+
__param(1, (0, common_1.Query)('limit')),
|
|
1318
|
+
__param(2, (0, common_1.Query)('offsetDate')),
|
|
1319
|
+
__param(3, (0, common_1.Query)('offsetId')),
|
|
1320
|
+
__param(4, (0, common_1.Query)('offsetPeer')),
|
|
1321
|
+
__param(5, (0, common_1.Query)('folderId')),
|
|
1322
|
+
__metadata("design:type", Function),
|
|
1323
|
+
__metadata("design:paramtypes", [String, Number, Number, Number, String, Number]),
|
|
1324
|
+
__metadata("design:returntype", Promise)
|
|
1325
|
+
], TelegramController.prototype, "getChats", null);
|
|
1326
|
+
__decorate([
|
|
1327
|
+
(0, common_1.Get)('file/url/:mobile'),
|
|
1328
|
+
(0, swagger_1.ApiOperation)({ summary: 'Get downloadable URL for a file' }),
|
|
1329
|
+
(0, swagger_1.ApiParam)({ name: 'mobile', description: 'Mobile number', required: true }),
|
|
1330
|
+
__param(0, (0, common_1.Param)('mobile')),
|
|
1331
|
+
__param(1, (0, common_1.Query)('url')),
|
|
1332
|
+
__param(2, (0, common_1.Query)('filename')),
|
|
1333
|
+
__metadata("design:type", Function),
|
|
1334
|
+
__metadata("design:paramtypes", [String, String, String]),
|
|
1335
|
+
__metadata("design:returntype", Promise)
|
|
1336
|
+
], TelegramController.prototype, "getFileUrl", null);
|
|
1337
|
+
__decorate([
|
|
1338
|
+
(0, common_1.Get)('messages/stats/:mobile'),
|
|
1339
|
+
(0, swagger_1.ApiOperation)({ summary: 'Get message statistics' }),
|
|
1340
|
+
(0, swagger_1.ApiParam)({ name: 'mobile', description: 'Mobile number', required: true }),
|
|
1341
|
+
__param(0, (0, common_1.Param)('mobile')),
|
|
1342
|
+
__param(1, (0, common_1.Body)()),
|
|
1343
|
+
__metadata("design:type", Function),
|
|
1344
|
+
__metadata("design:paramtypes", [String, Object]),
|
|
1345
|
+
__metadata("design:returntype", Promise)
|
|
1346
|
+
], TelegramController.prototype, "getMessageStats", null);
|
|
1347
|
+
__decorate([
|
|
1348
|
+
(0, common_1.Get)('chats/top-private/:mobile'),
|
|
1349
|
+
(0, swagger_1.ApiOperation)({ summary: 'Get top 5 private chats with detailed statistics' }),
|
|
1350
|
+
(0, swagger_1.ApiParam)({ name: 'mobile', description: 'Mobile number', required: true }),
|
|
1351
|
+
__param(0, (0, common_1.Param)('mobile')),
|
|
1352
|
+
__metadata("design:type", Function),
|
|
1353
|
+
__metadata("design:paramtypes", [String]),
|
|
1354
|
+
__metadata("design:returntype", Promise)
|
|
1355
|
+
], TelegramController.prototype, "getTopPrivateChats", null);
|
|
1356
|
+
exports.TelegramController = TelegramController = __decorate([
|
|
1357
|
+
(0, common_1.Controller)('telegram'),
|
|
1358
|
+
(0, swagger_1.ApiTags)('Telegram'),
|
|
1359
|
+
(0, common_1.UsePipes)(new common_1.ValidationPipe({
|
|
1360
|
+
transform: true,
|
|
1361
|
+
whitelist: true,
|
|
1362
|
+
forbidNonWhitelisted: true
|
|
1363
|
+
})),
|
|
1364
|
+
__metadata("design:paramtypes", [Telegram_service_1.TelegramService])
|
|
1365
|
+
], TelegramController);
|
|
1366
|
+
//# sourceMappingURL=Telegram.controller.js.map
|