@yrpri/api 9.0.108 → 9.0.110
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/active-citizen/controllers/activities.d.cts +2 -0
- package/active-citizen/controllers/activities.d.ts +5 -0
- package/active-citizen/controllers/news_feeds.d.cts +2 -0
- package/active-citizen/controllers/notifications.d.cts +2 -0
- package/active-citizen/controllers/notifications.d.ts +5 -0
- package/active-citizen/controllers/recommendations.d.cts +2 -0
- package/active-citizen/engine/allOurIdeas/aiHelper.d.ts +22 -0
- package/active-citizen/engine/allOurIdeas/explainAnswersAssistant.d.ts +13 -0
- package/active-citizen/engine/allOurIdeas/iconGenerator.d.ts +7 -0
- package/active-citizen/engine/analytics/export_anon_community_activities.d.ts +1 -0
- package/active-citizen/engine/analytics/importer.d.ts +1 -0
- package/active-citizen/engine/analytics/manager.d.cts +6 -0
- package/active-citizen/engine/analytics/plausible/manager.d.cts +5 -0
- package/active-citizen/engine/analytics/statsCalc.d.cts +94 -0
- package/active-citizen/engine/analytics/utils.d.cts +5 -0
- package/active-citizen/engine/marketing/campaign.d.cts +1 -0
- package/active-citizen/engine/moderation/fraud/CreateFraudAuditReport.d.cts +1 -0
- package/active-citizen/engine/moderation/fraud/FraudBase.d.cts +31 -0
- package/active-citizen/engine/moderation/fraud/FraudDeleteBase.d.cts +21 -0
- package/active-citizen/engine/moderation/fraud/FraudDeleteEndorsements.d.cts +8 -0
- package/active-citizen/engine/moderation/fraud/FraudDeletePointQualities.d.cts +6 -0
- package/active-citizen/engine/moderation/fraud/FraudDeletePoints.d.cts +6 -0
- package/active-citizen/engine/moderation/fraud/FraudDeletePosts.d.cts +4 -0
- package/active-citizen/engine/moderation/fraud/FraudDeleteRatings.d.cts +4 -0
- package/active-citizen/engine/moderation/fraud/FraudGetBase.d.cts +8 -0
- package/active-citizen/engine/moderation/fraud/FraudGetEndorsements.d.cts +7 -0
- package/active-citizen/engine/moderation/fraud/FraudGetPointQualities.d.cts +7 -0
- package/active-citizen/engine/moderation/fraud/FraudGetPoints.d.cts +6 -0
- package/active-citizen/engine/moderation/fraud/FraudGetPosts.d.cts +6 -0
- package/active-citizen/engine/moderation/fraud/FraudGetRatings.d.cts +5 -0
- package/active-citizen/engine/moderation/fraud/FraudScannerNotifier.d.cts +1 -0
- package/active-citizen/engine/moderation/get_moderation_items.d.cts +55 -0
- package/active-citizen/engine/moderation/image_labeling/CommunityLabeling.d.cts +6 -0
- package/active-citizen/engine/moderation/image_labeling/GroupLabeling.d.cts +6 -0
- package/active-citizen/engine/moderation/image_labeling/ImageLabelingBase.d.cts +30 -0
- package/active-citizen/engine/moderation/image_labeling/PointLabeling.d.cts +6 -0
- package/active-citizen/engine/moderation/image_labeling/PostLabeling.d.cts +6 -0
- package/active-citizen/engine/moderation/perspective_api_client.d.cts +33 -0
- package/active-citizen/engine/moderation/process_moderation_items.d.cts +2 -0
- package/active-citizen/engine/moderation/toxicity_analysis.d.cts +3 -0
- package/active-citizen/engine/news_feeds/activity_and_item_index_definitions.d.cts +7 -0
- package/active-citizen/engine/news_feeds/generate_dynamically.d.cts +2 -0
- package/active-citizen/engine/news_feeds/generate_from_notifications.d.cts +2 -0
- package/active-citizen/engine/news_feeds/news_feeds_utils.d.cts +99 -0
- package/active-citizen/engine/notifications/emails_utils.d.cts +2 -0
- package/active-citizen/engine/notifications/generate_point_notifications.d.cts +2 -0
- package/active-citizen/engine/notifications/generate_post_notifications.d.cts +2 -0
- package/active-citizen/engine/notifications/generate_post_status_change_notifications.d.cts +2 -0
- package/active-citizen/engine/notifications/notifications_utils.d.cts +3 -0
- package/active-citizen/engine/notifications/point_delivery.d.cts +2 -0
- package/active-citizen/engine/notifications/post_delivery.d.cts +2 -0
- package/active-citizen/engine/notifications/process_delayed_notifications.d.cts +1 -0
- package/active-citizen/engine/notifications/process_general_notifications.d.cts +2 -0
- package/active-citizen/engine/old/exporters/categories_dataset.d.ts +1 -0
- package/active-citizen/engine/old/exporters/dataset_tools.d.ts +3 -0
- package/active-citizen/engine/old/exporters/sentiment_dataset.d.ts +1 -0
- package/active-citizen/engine/recommendations/events_importer.d.cts +1 -0
- package/active-citizen/engine/recommendations/events_manager.d.cts +5 -0
- package/active-citizen/engine/reports/add_points_to_sheet.d.cts +1 -0
- package/active-citizen/engine/reports/commonUtils.d.ts +5 -0
- package/active-citizen/engine/reports/common_utils.d.cts +44 -0
- package/active-citizen/engine/reports/docx_group_report.d.cts +1 -0
- package/active-citizen/engine/reports/xlsAllOurIdeasExport.d.ts +1 -0
- package/active-citizen/engine/reports/xls_community_users_report.d.cts +2 -0
- package/active-citizen/engine/reports/xls_group_report.d.cts +1 -0
- package/active-citizen/llms/baseChatBot.d.ts +33 -0
- package/active-citizen/llms/imageGeneration/chatGptImageGenerator.d.ts +13 -0
- package/active-citizen/llms/imageGeneration/collectionImageGenerator.d.ts +23 -0
- package/active-citizen/llms/imageGeneration/dalleImageGenerator.d.ts +10 -0
- package/active-citizen/llms/imageGeneration/fluxImageGenerator.d.ts +9 -0
- package/active-citizen/llms/imageGeneration/iImageGenerator.d.ts +7 -0
- package/active-citizen/llms/imageGeneration/imageProcessorService.d.ts +12 -0
- package/active-citizen/llms/imageGeneration/imagenImageGenerator.d.ts +16 -0
- package/active-citizen/llms/imageGeneration/s3Service.d.ts +12 -0
- package/active-citizen/llms/llmTranslation.d.ts +26 -0
- package/active-citizen/models/ac_activity.d.cts +2 -0
- package/active-citizen/models/ac_background_job.d.cts +2 -0
- package/active-citizen/models/ac_campaign.d.cts +2 -0
- package/active-citizen/models/ac_client_activity.d.cts +2 -0
- package/active-citizen/models/ac_delayed_notification.d.cts +2 -0
- package/active-citizen/models/ac_following.d.cts +2 -0
- package/active-citizen/models/ac_list.d.cts +2 -0
- package/active-citizen/models/ac_list_users.d.cts +2 -0
- package/active-citizen/models/ac_mute.d.cts +2 -0
- package/active-citizen/models/ac_news_feed_item.d.cts +2 -0
- package/active-citizen/models/ac_news_feed_processed_range.d.cts +2 -0
- package/active-citizen/models/ac_notification.d.cts +2 -0
- package/active-citizen/models/ac_translation_cache.d.cts +2 -0
- package/active-citizen/models/ac_watching.d.cts +2 -0
- package/active-citizen/scripts/analytics/setup_all_plausible_goals.d.cts +1 -0
- package/active-citizen/scripts/fix_old_delayed_notifications.d.ts +1 -0
- package/active-citizen/scripts/kue_status.d.ts +2 -0
- package/active-citizen/scripts/kue_watch_stuck_jobs.d.ts +2 -0
- package/active-citizen/scripts/translation_clear_language.d.ts +1 -0
- package/active-citizen/scripts/translation_delete.d.ts +1 -0
- package/active-citizen/scripts/translation_replace_text_from_url.d.ts +1 -0
- package/active-citizen/scripts/translation_update.d.ts +1 -0
- package/active-citizen/scripts/translations_list.d.ts +1 -0
- package/active-citizen/utils/airbrake.d.cts +2 -0
- package/active-citizen/utils/get_anonymous_system_user.d.cts +2 -0
- package/active-citizen/utils/i18n.d.cts +2 -0
- package/active-citizen/utils/logger.d.cts +2 -0
- package/active-citizen/utils/redisConnection.d.cts +2 -0
- package/active-citizen/utils/to_json.d.cts +2 -0
- package/active-citizen/utils/translation_cloning.d.cts +5 -0
- package/active-citizen/utils/translation_helpers.d.cts +8 -0
- package/active-citizen/utils/truncate_text.d.cts +2 -0
- package/active-citizen/utils/updateAllLocalesFromEn.d.ts +20 -0
- package/active-citizen/utils/updateLocaleFolders.d.ts +1 -0
- package/active-citizen/workers/activity.cjs +13 -2
- package/active-citizen/workers/activity.d.cts +16 -0
- package/active-citizen/workers/anonymizations.cjs +13 -2
- package/active-citizen/workers/anonymizations.d.cts +16 -0
- package/active-citizen/workers/bulk_status_update.cjs +12 -1
- package/active-citizen/workers/bulk_status_update.d.cts +16 -0
- package/active-citizen/workers/delayed_jobs.cjs +13 -2
- package/active-citizen/workers/delayed_jobs.d.cts +16 -0
- package/active-citizen/workers/deletions.cjs +14 -3
- package/active-citizen/workers/deletions.d.cts +16 -0
- package/active-citizen/workers/email.cjs +12 -1
- package/active-citizen/workers/email.d.cts +16 -0
- package/active-citizen/workers/fraud_management.cjs +13 -2
- package/active-citizen/workers/fraud_management.d.cts +16 -0
- package/active-citizen/workers/generativeAi.d.ts +3 -0
- package/active-citizen/workers/main.d.cts +1 -0
- package/active-citizen/workers/marketing.cjs +13 -2
- package/active-citizen/workers/marketing.d.cts +16 -0
- package/active-citizen/workers/moderation.cjs +13 -2
- package/active-citizen/workers/moderation.d.cts +16 -0
- package/active-citizen/workers/notification_delivery.cjs +12 -1
- package/active-citizen/workers/notification_delivery.d.cts +16 -0
- package/active-citizen/workers/notification_news_feed.cjs +12 -1
- package/active-citizen/workers/notification_news_feed.d.cts +16 -0
- package/active-citizen/workers/queue.d.cts +21 -0
- package/active-citizen/workers/recount.d.cts +1 -0
- package/active-citizen/workers/reports.d.cts +2 -0
- package/active-citizen/workers/similarities.cjs +13 -2
- package/active-citizen/workers/similarities.d.cts +16 -0
- package/active-citizen/workers/speech_to_text.cjs +13 -2
- package/active-citizen/workers/speech_to_text.d.cts +16 -0
- package/agents/assistants/agentAssistant.d.ts +27 -0
- package/agents/assistants/assistant.d.ts +156 -0
- package/agents/assistants/baseAssistant.d.ts +115 -0
- package/agents/assistants/baseAssistantWithVoice.d.ts +18 -0
- package/agents/assistants/modes/agentDirectConnection.d.ts +16 -0
- package/agents/assistants/modes/agentSelectionMode.d.ts +12 -0
- package/agents/assistants/modes/baseAssistantMode.d.ts +10 -0
- package/agents/assistants/modes/tools/agentTools.d.ts +100 -0
- package/agents/assistants/modes/tools/baseTools.d.ts +21 -0
- package/agents/assistants/modes/tools/loginTools.d.ts +51 -0
- package/agents/assistants/modes/tools/models/agents.d.ts +27 -0
- package/agents/assistants/modes/tools/models/subscriptions.d.ts +13 -0
- package/agents/assistants/modes/tools/models/users.d.ts +7 -0
- package/agents/assistants/modes/tools/navigationTools.d.ts +33 -0
- package/agents/assistants/modes/tools/subscriptionTools.d.ts +53 -0
- package/agents/assistants/modes/tools/workflowConverstationTools.d.ts +49 -0
- package/agents/assistants/voiceAssistant.d.ts +78 -0
- package/agents/controllers/agentProductController.d.ts +23 -0
- package/agents/controllers/agentSubscriptionController.d.ts +30 -0
- package/agents/controllers/assistantsController.d.ts +47 -0
- package/agents/controllers/policySynthAgents.d.ts +49 -0
- package/agents/managers/agentProductManager.d.ts +12 -0
- package/agents/managers/emailInvitesManager.d.ts +6 -0
- package/agents/managers/emailTemplateRenderer.d.ts +25 -0
- package/agents/managers/newAiModelSetup.d.ts +37 -0
- package/agents/managers/notificationAgentQueueManager.d.ts +23 -0
- package/agents/managers/subscriptionManager.d.ts +29 -0
- package/agents/managers/workflowConversationManager.d.ts +14 -0
- package/agents/models/agentProduct.d.ts +31 -0
- package/agents/models/agentProductBoosterPurchase.d.ts +27 -0
- package/agents/models/agentProductBundle.d.ts +12 -0
- package/agents/models/agentProductRun.d.ts +23 -0
- package/agents/models/discount.d.ts +21 -0
- package/agents/models/subscription.d.ts +26 -0
- package/agents/models/subscriptionPlan.d.ts +17 -0
- package/agents/models/subscriptionUser.d.ts +11 -0
- package/agents/models/testData/createEvolyAgentProduct.d.ts +1 -0
- package/agents/models/testData/old/updateAgentWorkflowConfiguration.d.ts +1 -0
- package/agents/models/testData/setupEvolyAgentProductConfig.d.ts +1 -0
- package/agents/models/testData/updateAgentWorkflowConfiguration.d.ts +1 -0
- package/agents/models/workflowConversation.d.ts +11 -0
- package/agents/tools/setTemplateWorkflowCommunityId.d.ts +1 -0
- package/app.d.ts +53 -0
- package/authorization.d.cts +1 -0
- package/bot_control.d.ts +4 -0
- package/controllers/allOurIdeas.d.ts +40 -0
- package/controllers/audios.d.cts +2 -0
- package/controllers/bulkStatusUpdates.d.cts +2 -0
- package/controllers/categories.d.cts +2 -0
- package/controllers/communities.d.cts +2 -0
- package/controllers/domains.d.cts +2 -0
- package/controllers/externalIds.d.cts +2 -0
- package/controllers/groups.d.cts +2 -0
- package/controllers/images.d.cts +2 -0
- package/controllers/index.d.cts +2 -0
- package/controllers/legacyPages.d.cts +2 -0
- package/controllers/legacyPosts.d.cts +2 -0
- package/controllers/legacyUsers.d.cts +2 -0
- package/controllers/nonSpa.d.cts +2 -0
- package/controllers/organizations.d.cts +2 -0
- package/controllers/points.d.cts +2 -0
- package/controllers/posts.d.cts +2 -0
- package/controllers/ratings.d.cts +2 -0
- package/controllers/users.d.cts +2 -0
- package/controllers/videos.d.cts +2 -0
- package/deleteUnwantedDeclerations.d.cts +1 -0
- package/migrations/agentAuditLogs.d.cts +1 -0
- package/migrations/agentClasses.d.cts +1 -0
- package/migrations/agentConnectorClasses.d.cts +1 -0
- package/migrations/agentConnectors.d.cts +1 -0
- package/migrations/agentEvals.d.cts +1 -0
- package/migrations/agentRegistries.d.cts +1 -0
- package/migrations/agents.d.cts +1 -0
- package/migrations/aiModels.d.cts +1 -0
- package/migrations/apiUsage.d.cts +1 -0
- package/migrations/apis.d.cts +1 -0
- package/migrations/groupPrivateData.d.cts +2 -0
- package/migrations/modelUsage.d.cts +2 -0
- package/migrations/privateAccessStore.d.cts +1 -0
- package/migrations/zzz_associations.d.cts +1 -0
- package/migrations/zzzz_createUsersAndAdminsForClasses.d.cts +1 -0
- package/migrations/zzzzz_create_agent_runs.d.cts +2 -0
- package/migrations/zzzzzz_create_agent_runs_fix.d.cts +2 -0
- package/migrations/zzzzzzz_create_trees.d.cts +2 -0
- package/models/audio.d.cts +2 -0
- package/models/bulk_status_update.d.cts +2 -0
- package/models/campaign.d.cts +2 -0
- package/models/category.d.cts +2 -0
- package/models/community.d.cts +2 -0
- package/models/domain.d.cts +2 -0
- package/models/endorsement.d.cts +2 -0
- package/models/general_data_store.d.cts +2 -0
- package/models/group.d.cts +2 -0
- package/models/image.d.cts +2 -0
- package/models/index.cjs +2 -2
- package/models/index.d.cts +3 -0
- package/models/invite.d.cts +2 -0
- package/models/iso_country.d.cts +2 -0
- package/models/organization.d.cts +2 -0
- package/models/page.d.cts +2 -0
- package/models/point.d.cts +2 -0
- package/models/point_quality.d.cts +2 -0
- package/models/point_revision.d.cts +2 -0
- package/models/post.d.cts +2 -0
- package/models/post_revision.d.cts +2 -0
- package/models/post_status_change.d.cts +2 -0
- package/models/promotion.d.cts +2 -0
- package/models/rating.d.cts +2 -0
- package/models/relationship.d.cts +2 -0
- package/models/request_to_join.d.cts +2 -0
- package/models/user.d.cts +2 -0
- package/models/user_legacy_password.d.cts +2 -0
- package/models/video.d.cts +2 -0
- package/package.json +3 -2
- package/publish.d.ts +1 -0
- package/repack.d.ts +1 -0
- package/scripts/addRatingUsersToGroup.d.ts +1 -0
- package/scripts/addUserToOrganization.d.ts +1 -0
- package/scripts/analyseRatingsForCommunity.d.ts +1 -0
- package/scripts/analyzeAndFixBrokenPointUsers.d.ts +1 -0
- package/scripts/analyzeEndorsementsByCountry.d.ts +1 -0
- package/scripts/analyzePostsForCommunity.d.ts +1 -0
- package/scripts/bulkStatusUpdates/listUpdates.d.ts +1 -0
- package/scripts/bulkStatusUpdates/mergeLatestPostsToUpdate.d.ts +1 -0
- package/scripts/bulkStatusUpdates/performUpdate.d.ts +1 -0
- package/scripts/bulkStatusUpdates/performUpdateForGroup.d.cts +1 -0
- package/scripts/bulkStatusUpdates/performUpdateForStatus.d.ts +1 -0
- package/scripts/change/changeVideoAspectTo.d.ts +1 -0
- package/scripts/change/setUseNewVersion.d.cts +1 -0
- package/scripts/changeCommunityGroupcount.d.ts +1 -0
- package/scripts/changeCommunityPostCount.d.ts +1 -0
- package/scripts/changeGroupPostCount.d.ts +1 -0
- package/scripts/changeLanguage.d.ts +1 -0
- package/scripts/changeOfficalStatus.d.ts +1 -0
- package/scripts/cleanups/deleteAnonNotifications.d.cts +1 -0
- package/scripts/cleanups/deleteLinkGroupsWithDeletedCommunities.d.ts +1 -0
- package/scripts/cleanups/deleteYearOldNotifications.d.cts +1 -0
- package/scripts/cleanups/removeAllUsersFromHiddenPublicGroup.d.ts +1 -0
- package/scripts/clearAllEndorsementInGroup.d.ts +1 -0
- package/scripts/cloning/clearUsersForCommunitiesFromUrl.d.ts +1 -0
- package/scripts/cloning/cloneFromUrlScript.d.ts +1 -0
- package/scripts/cloning/cloneWBFromUrlScriptAndCreateLinks.d.ts +1 -0
- package/scripts/cloning/cloneWBFromUrlScriptNoUsersOrPoints.d.ts +1 -0
- package/scripts/cloning/cloneWBSerbianFromUrlScriptAndCreateLinks.d.ts +1 -0
- package/scripts/cloning/copyCommunityConfigAndTranslationsFromURL.d.ts +1 -0
- package/scripts/cloning/copyCommunityOneGroupToDomainNoUsersNoEndorsements.d.ts +1 -0
- package/scripts/cloning/copyCommunityToDomainNoUsersNoEndorsements.d.ts +1 -0
- package/scripts/cloning/copyCommunityToDomainWithEverything.d.ts +1 -0
- package/scripts/cloning/copyCommunityToDomainWithOnlyGroups.d.ts +1 -0
- package/scripts/cloning/copyGroupConfigAndTranslationsFromURL.d.ts +1 -0
- package/scripts/cloning/copyPostToGroupOld.d.ts +1 -0
- package/scripts/cloning/copyPostVideosFromURL.d.ts +1 -0
- package/scripts/cloning/copyPostWithOutAnyVotingOrActivities.d.ts +1 -0
- package/scripts/cloning/deepCloneSerbianWBFromUrlScriptAndCreateLinks.d.ts +1 -0
- package/scripts/cloning/deepCloneWBFromUrlScriptAndCreateLinks.d.ts +1 -0
- package/scripts/cloning/setAdminsFromURL.d.ts +1 -0
- package/scripts/cloning/setExternalIdsFromURL.d.ts +1 -0
- package/scripts/countCommunity.d.ts +1 -0
- package/scripts/countCommunityUsers.d.ts +1 -0
- package/scripts/countDelayedNotifications.d.ts +1 -0
- package/scripts/countGroup.d.ts +1 -0
- package/scripts/countStuff.d.ts +1 -0
- package/scripts/countUniqueVotersInAGroup.d.ts +1 -0
- package/scripts/createInvitesAndShow.d.ts +1 -0
- package/scripts/database/sync_database.d.ts +1 -0
- package/scripts/database/sync_dev_database.d.ts +1 -0
- package/scripts/debugNotifications.d.ts +1 -0
- package/scripts/deleteAllNewsFeeds.d.ts +1 -0
- package/scripts/deleteCategory.d.ts +1 -0
- package/scripts/deleteOldAppActivities.d.ts +1 -0
- package/scripts/deletePostContactDataForCommunity.d.ts +1 -0
- package/scripts/destroy/destroy_all_but_one_domain.d.ts +1 -0
- package/scripts/displayAuthorForPost.d.ts +1 -0
- package/scripts/endorsementFraudDetection/analyseEndorsementsForCommunity.d.ts +1 -0
- package/scripts/endorsementFraudDetection/bulkDeleteDuplicateEndorsmentsFromUrl.d.ts +1 -0
- package/scripts/exportAllStatusChanges.d.ts +1 -0
- package/scripts/exportClientAcitivity.d.ts +1 -0
- package/scripts/exportEndorsementsForCommunity.d.ts +1 -0
- package/scripts/exportPointQualitiesForCommunity.d.ts +1 -0
- package/scripts/exportPostsAndPointsForCommunity.d.ts +1 -0
- package/scripts/exportPostsDataSetForDomain.d.ts +1 -0
- package/scripts/exportPostsForGroup.d.ts +1 -0
- package/scripts/exportRatingsForPost.d.ts +1 -0
- package/scripts/exportUserEndorsementsWithUserAnalysis.d.ts +1 -0
- package/scripts/exportUsersForCommunity.d.ts +1 -0
- package/scripts/exportUsersForDomain.d.ts +1 -0
- package/scripts/exportUsersForGroup.d.ts +1 -0
- package/scripts/exports/ratingDistribution.d.ts +1 -0
- package/scripts/exports/whoEndorsedWhatByCommunity.d.ts +1 -0
- package/scripts/findUnusedClientImports.d.ts +1 -0
- package/scripts/fixAllPostPointCounts.d.ts +1 -0
- package/scripts/fixAnonNotificationsSettings.d.ts +1 -0
- package/scripts/fixCountKopavogur.d.ts +1 -0
- package/scripts/fixEndorsementsAfterCopyPostToGroup.d.ts +1 -0
- package/scripts/fixExternalUserId.d.ts +1 -0
- package/scripts/fixGroupAccess.d.ts +1 -0
- package/scripts/fixGroupIdeasAndPointsCount.d.ts +1 -0
- package/scripts/fixNotificationSettings.d.ts +1 -0
- package/scripts/fixSurveyRadioBakedInSubCodes.d.ts +1 -0
- package/scripts/fixWrongUserIdForStatusUpdates.d.ts +1 -0
- package/scripts/gallery/exportGalleryData.d.ts +1 -0
- package/scripts/gallery/importGalleryForCommunity.d.ts +1 -0
- package/scripts/gallery/readJsonAndDownloadImagesVersion2.d.ts +1 -0
- package/scripts/gallery/refreshAcApiPostIdsForCommunity.d.ts +1 -0
- package/scripts/genderAnalysis.d.ts +1 -0
- package/scripts/genderAnalysisByStatus.d.ts +1 -0
- package/scripts/importAllLocalesFromLocalFolders.d.ts +1 -0
- package/scripts/importDomain.d.ts +1 -0
- package/scripts/keys/addOidcToDomain.d.cts +1 -0
- package/scripts/landUseGame/export3Ddata.d.ts +1 -0
- package/scripts/listLanguagesForGroup.d.ts +1 -0
- package/scripts/loadTestCreateDummyContentForGroup.d.ts +1 -0
- package/scripts/makeRecursiveMapData.d.ts +1 -0
- package/scripts/mapping/community_map_csv.d.ts +1 -0
- package/scripts/moveCommunityToDomain.d.ts +1 -0
- package/scripts/moveGroupToCommunity.d.ts +1 -0
- package/scripts/movePostToGroup.d.ts +1 -0
- package/scripts/movePostsToGroupsRecountGroupFromUrl.d.ts +1 -0
- package/scripts/oldMovePostToGroup.d.ts +1 -0
- package/scripts/processCsvForPdfUrls.d.ts +1 -0
- package/scripts/processCsvForTranslationAndToxicity.d.ts +1 -0
- package/scripts/recount/recount_recursive_communities.d.ts +1 -0
- package/scripts/recountALLCommunityGroupCounts.d.ts +1 -0
- package/scripts/recountAll.d.ts +1 -0
- package/scripts/recountCommunitesFromUrl.d.ts +1 -0
- package/scripts/recountCommunity.d.ts +1 -0
- package/scripts/recountGroup.d.ts +1 -0
- package/scripts/recountGroupNoUserChange.d.ts +1 -0
- package/scripts/resetAllEndorsementsForGroup.d.ts +1 -0
- package/scripts/resetEnTranslationForGroup.d.ts +1 -0
- package/scripts/setAdminOnAll.d.cts +1 -0
- package/scripts/setDomainAdmin.d.cts +1 -0
- package/scripts/setDomainLocales.d.ts +1 -0
- package/scripts/setEarlQuestionIdOnGroup.d.cts +1 -0
- package/scripts/setLanguageOnGroupCommunitesFromUrl.d.ts +1 -0
- package/scripts/setMemberOfAll.d.ts +1 -0
- package/scripts/setNewUserForContentOfCommunity.d.ts +1 -0
- package/scripts/setOfficialStatusOnAllPostsForCommunity.d.ts +1 -0
- package/scripts/setUserOnAll.d.ts +1 -0
- package/scripts/showCategoryForGroup.d.ts +1 -0
- package/scripts/showOldActivityTypes.d.ts +1 -0
- package/scripts/showPostsMissingCategoryForGroup.d.ts +1 -0
- package/scripts/showStatuses.d.ts +1 -0
- package/scripts/showUniqueVotersInCommunity.d.ts +1 -0
- package/scripts/showUserAgentsAndIpsForEmails.d.ts +1 -0
- package/scripts/simpleExportForGroupsForCommunity.d.ts +1 -0
- package/scripts/simpleExportForPointsForCommunity.d.ts +1 -0
- package/scripts/simpleExportForPostsForCommunity.d.ts +1 -0
- package/scripts/testForEndorsments.d.ts +1 -0
- package/scripts/undeleteGroupAndAllContent.d.ts +1 -0
- package/scripts/undeletePost.d.ts +1 -0
- package/scripts/unlinkSsn.d.ts +1 -0
- package/scripts/updateFromAlthingi.d.ts +1 -0
- package/server.d.ts +1 -104
- package/utils/airbrake.d.cts +2 -0
- package/utils/cjsCodeReview.d.ts +13 -0
- package/utils/community_mapping_tools.d.cts +1 -0
- package/utils/copy_utils.d.cts +11 -0
- package/utils/copy_utils.d.ts +4 -0
- package/utils/docx_utils.d.cts +1 -0
- package/utils/export_utils.d.cts +21 -0
- package/utils/i18n.d.cts +2 -0
- package/utils/is_valid_db_id.d.cts +1 -0
- package/utils/logger.d.cts +2 -0
- package/utils/loggerTs.d.ts +3 -0
- package/utils/manifest_generator.d.cts +2 -0
- package/utils/manifest_generator.d.ts +18 -0
- package/utils/parse_domain.d.cts +6 -0
- package/utils/recount_utils.d.cts +7 -0
- package/utils/sharing_parameters.d.cts +8 -0
- package/utils/sitemap_generator.d.cts +2 -0
- package/utils/to_json.d.cts +2 -0
- package/utils/ypLanguages.d.ts +16 -0
- package/webSockets.d.ts +26 -0
|
@@ -12,7 +12,11 @@ let airbrake = null;
|
|
|
12
12
|
if (process.env.AIRBRAKE_PROJECT_ID) {
|
|
13
13
|
airbrake = require("../utils/airbrake.cjs");
|
|
14
14
|
}
|
|
15
|
-
|
|
15
|
+
/**
|
|
16
|
+
* @class DelayedJobWorker
|
|
17
|
+
* @constructor
|
|
18
|
+
*/
|
|
19
|
+
function DelayedJobWorker() { }
|
|
16
20
|
const delayedCreatePriorityActivity = (workPackage, callback) => {
|
|
17
21
|
const options = workPackage.workData;
|
|
18
22
|
var context, actor, object;
|
|
@@ -226,7 +230,13 @@ const delayedCreateActivityFromApp = (workPackage, callback) => {
|
|
|
226
230
|
callback(error);
|
|
227
231
|
});
|
|
228
232
|
};
|
|
229
|
-
|
|
233
|
+
/**
|
|
234
|
+
* Processes a delayed job.
|
|
235
|
+
* @param {object} workPackage - The work package for the delayed job.
|
|
236
|
+
* @param {(error?: any) => void} callback - The callback function.
|
|
237
|
+
* @memberof DelayedJobWorker
|
|
238
|
+
*/
|
|
239
|
+
DelayedJobWorker.prototype.process = function (workPackage, callback) {
|
|
230
240
|
switch (workPackage.type) {
|
|
231
241
|
case "create-activity-from-app":
|
|
232
242
|
delayedCreateActivityFromApp(workPackage, callback);
|
|
@@ -241,4 +251,5 @@ DelayedJobWorker.prototype.process = (workPackage, callback) => {
|
|
|
241
251
|
callback("Unknown type for workPackage: " + workPackage.type);
|
|
242
252
|
}
|
|
243
253
|
};
|
|
254
|
+
/** @type {DelayedJobWorker} */
|
|
244
255
|
module.exports = new DelayedJobWorker();
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
declare const _exports: DelayedJobWorker;
|
|
2
|
+
export = _exports;
|
|
3
|
+
/**
|
|
4
|
+
* @class DelayedJobWorker
|
|
5
|
+
* @constructor
|
|
6
|
+
*/
|
|
7
|
+
declare function DelayedJobWorker(): void;
|
|
8
|
+
declare class DelayedJobWorker {
|
|
9
|
+
/**
|
|
10
|
+
* Processes a delayed job.
|
|
11
|
+
* @param {object} workPackage - The work package for the delayed job.
|
|
12
|
+
* @param {(error?: any) => void} callback - The callback function.
|
|
13
|
+
* @memberof DelayedJobWorker
|
|
14
|
+
*/
|
|
15
|
+
process(workPackage: object, callback: (error?: any) => void): void;
|
|
16
|
+
}
|
|
@@ -11,7 +11,11 @@ let airbrake = null;
|
|
|
11
11
|
if (process.env.AIRBRAKE_PROJECT_ID) {
|
|
12
12
|
airbrake = require('../utils/airbrake.cjs');
|
|
13
13
|
}
|
|
14
|
-
|
|
14
|
+
/**
|
|
15
|
+
* @class DeletionWorker
|
|
16
|
+
* @constructor
|
|
17
|
+
*/
|
|
18
|
+
function DeletionWorker() { }
|
|
15
19
|
const getGroupAndUser = (groupId, userId, userEmail, callback) => {
|
|
16
20
|
var user, group;
|
|
17
21
|
async.series([
|
|
@@ -401,7 +405,7 @@ const recountCommunity = (workPackage, callback) => {
|
|
|
401
405
|
log.info("Community recounted", { context: 'ac-delete', communityId: workPackage.communityId });
|
|
402
406
|
innerCallback();
|
|
403
407
|
}).catch((error) => {
|
|
404
|
-
innerCallback(
|
|
408
|
+
innerCallback();
|
|
405
409
|
});
|
|
406
410
|
}).catch((error) => {
|
|
407
411
|
innerCallback();
|
|
@@ -1825,7 +1829,13 @@ const removeManyDomainUsersAndDeleteContent = (workPackage, callback) => {
|
|
|
1825
1829
|
callback("No userIds for removeManyDomainUsersAndDeleteContent");
|
|
1826
1830
|
}
|
|
1827
1831
|
};
|
|
1828
|
-
|
|
1832
|
+
/**
|
|
1833
|
+
* Processes a deletion work package.
|
|
1834
|
+
* @param {object} workPackage - The work package containing details for the deletion.
|
|
1835
|
+
* @param {(error?: any) => void} callback - The callback function.
|
|
1836
|
+
* @memberof DeletionWorker
|
|
1837
|
+
*/
|
|
1838
|
+
DeletionWorker.prototype.process = function (workPackage, callback) {
|
|
1829
1839
|
getAnonymousUser((error, anonymousUser) => {
|
|
1830
1840
|
if (error) {
|
|
1831
1841
|
callback(error);
|
|
@@ -1908,4 +1918,5 @@ DeletionWorker.prototype.process = (workPackage, callback) => {
|
|
|
1908
1918
|
}
|
|
1909
1919
|
});
|
|
1910
1920
|
};
|
|
1921
|
+
/** @type {DeletionWorker} */
|
|
1911
1922
|
module.exports = new DeletionWorker();
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
declare const _exports: DeletionWorker;
|
|
2
|
+
export = _exports;
|
|
3
|
+
/**
|
|
4
|
+
* @class DeletionWorker
|
|
5
|
+
* @constructor
|
|
6
|
+
*/
|
|
7
|
+
declare function DeletionWorker(): void;
|
|
8
|
+
declare class DeletionWorker {
|
|
9
|
+
/**
|
|
10
|
+
* Processes a deletion work package.
|
|
11
|
+
* @param {object} workPackage - The work package containing details for the deletion.
|
|
12
|
+
* @param {(error?: any) => void} callback - The callback function.
|
|
13
|
+
* @memberof DeletionWorker
|
|
14
|
+
*/
|
|
15
|
+
process(workPackage: object, callback: (error?: any) => void): void;
|
|
16
|
+
}
|
|
@@ -1,9 +1,20 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
// https://gist.github.com/mojodna/1251812
|
|
3
3
|
var log = require('../utils/logger.cjs');
|
|
4
|
-
|
|
4
|
+
/**
|
|
5
|
+
* @class EmailWorker
|
|
6
|
+
* @constructor
|
|
7
|
+
*/
|
|
8
|
+
function EmailWorker() { }
|
|
9
|
+
/**
|
|
10
|
+
* Sends a single email.
|
|
11
|
+
* @param {object} emailLocals - Locals for the email template.
|
|
12
|
+
* @param {(error?: any) => void} callback - The callback function.
|
|
13
|
+
* @memberof EmailWorker
|
|
14
|
+
*/
|
|
5
15
|
EmailWorker.prototype.sendOne = function (emailLocals, callback) {
|
|
6
16
|
var sendOneEmail = require('../engine/notifications/emails_utils.cjs').sendOneEmail;
|
|
7
17
|
sendOneEmail(emailLocals, callback);
|
|
8
18
|
};
|
|
19
|
+
/** @type {EmailWorker} */
|
|
9
20
|
module.exports = new EmailWorker();
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
declare const _exports: EmailWorker;
|
|
2
|
+
export = _exports;
|
|
3
|
+
/**
|
|
4
|
+
* @class EmailWorker
|
|
5
|
+
* @constructor
|
|
6
|
+
*/
|
|
7
|
+
declare function EmailWorker(): void;
|
|
8
|
+
declare class EmailWorker {
|
|
9
|
+
/**
|
|
10
|
+
* Sends a single email.
|
|
11
|
+
* @param {object} emailLocals - Locals for the email template.
|
|
12
|
+
* @param {(error?: any) => void} callback - The callback function.
|
|
13
|
+
* @memberof EmailWorker
|
|
14
|
+
*/
|
|
15
|
+
sendOne(emailLocals: object, callback: (error?: any) => void): void;
|
|
16
|
+
}
|
|
@@ -20,7 +20,11 @@ let airbrake = null;
|
|
|
20
20
|
if (process.env.AIRBRAKE_PROJECT_ID) {
|
|
21
21
|
airbrake = require('../utils/airbrake.cjs');
|
|
22
22
|
}
|
|
23
|
-
|
|
23
|
+
/**
|
|
24
|
+
* @class FraudManagementWorker
|
|
25
|
+
* @constructor
|
|
26
|
+
*/
|
|
27
|
+
function FraudManagementWorker() { }
|
|
24
28
|
const ProcessFraudGet = async (workPackage, done) => {
|
|
25
29
|
let fraudGetEngine;
|
|
26
30
|
try {
|
|
@@ -89,7 +93,13 @@ const ProcessFraudDelete = async (workPackage, done) => {
|
|
|
89
93
|
done(error);
|
|
90
94
|
}
|
|
91
95
|
};
|
|
92
|
-
|
|
96
|
+
/**
|
|
97
|
+
* Processes a fraud management work package.
|
|
98
|
+
* @param {object} workPackage - The work package for fraud management.
|
|
99
|
+
* @param {(error?: any) => void} callback - The callback function.
|
|
100
|
+
* @memberof FraudManagementWorker
|
|
101
|
+
*/
|
|
102
|
+
FraudManagementWorker.prototype.process = async function (workPackage, callback) {
|
|
93
103
|
switch (workPackage.type) {
|
|
94
104
|
case 'delete-one-item':
|
|
95
105
|
case 'delete-items':
|
|
@@ -106,4 +116,5 @@ FraudManagementWorker.prototype.process = async (workPackage, callback) => {
|
|
|
106
116
|
callback("Unknown type for workPackage: " + workPackage.type);
|
|
107
117
|
}
|
|
108
118
|
};
|
|
119
|
+
/** @type {FraudManagementWorker} */
|
|
109
120
|
module.exports = new FraudManagementWorker();
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
declare const _exports: FraudManagementWorker;
|
|
2
|
+
export = _exports;
|
|
3
|
+
/**
|
|
4
|
+
* @class FraudManagementWorker
|
|
5
|
+
* @constructor
|
|
6
|
+
*/
|
|
7
|
+
declare function FraudManagementWorker(): void;
|
|
8
|
+
declare class FraudManagementWorker {
|
|
9
|
+
/**
|
|
10
|
+
* Processes a fraud management work package.
|
|
11
|
+
* @param {object} workPackage - The work package for fraud management.
|
|
12
|
+
* @param {(error?: any) => void} callback - The callback function.
|
|
13
|
+
* @memberof FraudManagementWorker
|
|
14
|
+
*/
|
|
15
|
+
process(workPackage: object, callback: (error?: any) => void): Promise<void>;
|
|
16
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -12,8 +12,18 @@ let airbrake = null;
|
|
|
12
12
|
if (process.env.AIRBRAKE_PROJECT_ID) {
|
|
13
13
|
airbrake = require('../utils/airbrake.cjs');
|
|
14
14
|
}
|
|
15
|
-
|
|
16
|
-
|
|
15
|
+
/**
|
|
16
|
+
* @class MarketingWorker
|
|
17
|
+
* @constructor
|
|
18
|
+
*/
|
|
19
|
+
function MarketingWorker() { }
|
|
20
|
+
/**
|
|
21
|
+
* Processes a marketing work package.
|
|
22
|
+
* @param {object} workPackage - The work package for marketing.
|
|
23
|
+
* @param {(error?: any) => void} callback - The callback function.
|
|
24
|
+
* @memberof MarketingWorker
|
|
25
|
+
*/
|
|
26
|
+
MarketingWorker.prototype.process = function (workPackage, callback) {
|
|
17
27
|
switch (workPackage.type) {
|
|
18
28
|
case 'send-campaign':
|
|
19
29
|
sendCampaign(workPackage, callback);
|
|
@@ -22,4 +32,5 @@ MarketingWorker.prototype.process = (workPackage, callback) => {
|
|
|
22
32
|
callback("Unknown type for workPackage: " + workPackage.type);
|
|
23
33
|
}
|
|
24
34
|
};
|
|
35
|
+
/** @type {MarketingWorker} */
|
|
25
36
|
module.exports = new MarketingWorker();
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
declare const _exports: MarketingWorker;
|
|
2
|
+
export = _exports;
|
|
3
|
+
/**
|
|
4
|
+
* @class MarketingWorker
|
|
5
|
+
* @constructor
|
|
6
|
+
*/
|
|
7
|
+
declare function MarketingWorker(): void;
|
|
8
|
+
declare class MarketingWorker {
|
|
9
|
+
/**
|
|
10
|
+
* Processes a marketing work package.
|
|
11
|
+
* @param {object} workPackage - The work package for marketing.
|
|
12
|
+
* @param {(error?: any) => void} callback - The callback function.
|
|
13
|
+
* @memberof MarketingWorker
|
|
14
|
+
*/
|
|
15
|
+
process(workPackage: object, callback: (error?: any) => void): void;
|
|
16
|
+
}
|
|
@@ -19,8 +19,18 @@ let airbrake = null;
|
|
|
19
19
|
if (process.env.AIRBRAKE_PROJECT_ID) {
|
|
20
20
|
airbrake = require('../utils/airbrake.cjs');
|
|
21
21
|
}
|
|
22
|
-
|
|
23
|
-
|
|
22
|
+
/**
|
|
23
|
+
* @class ModerationWorker
|
|
24
|
+
* @constructor
|
|
25
|
+
*/
|
|
26
|
+
function ModerationWorker() { }
|
|
27
|
+
/**
|
|
28
|
+
* Processes a moderation work package.
|
|
29
|
+
* @param {object} workPackage - The work package for moderation.
|
|
30
|
+
* @param {(error?: any) => void} callback - The callback function.
|
|
31
|
+
* @memberof ModerationWorker
|
|
32
|
+
*/
|
|
33
|
+
ModerationWorker.prototype.process = async function (workPackage, callback) {
|
|
24
34
|
switch (workPackage.type) {
|
|
25
35
|
case 'estimate-post-toxicity':
|
|
26
36
|
estimateToxicityScoreForPost(workPackage, callback);
|
|
@@ -70,4 +80,5 @@ ModerationWorker.prototype.process = async (workPackage, callback) => {
|
|
|
70
80
|
callback("Unknown type for workPackage: " + workPackage.type);
|
|
71
81
|
}
|
|
72
82
|
};
|
|
83
|
+
/** @type {ModerationWorker} */
|
|
73
84
|
module.exports = new ModerationWorker();
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
declare const _exports: ModerationWorker;
|
|
2
|
+
export = _exports;
|
|
3
|
+
/**
|
|
4
|
+
* @class ModerationWorker
|
|
5
|
+
* @constructor
|
|
6
|
+
*/
|
|
7
|
+
declare function ModerationWorker(): void;
|
|
8
|
+
declare class ModerationWorker {
|
|
9
|
+
/**
|
|
10
|
+
* Processes a moderation work package.
|
|
11
|
+
* @param {object} workPackage - The work package for moderation.
|
|
12
|
+
* @param {(error?: any) => void} callback - The callback function.
|
|
13
|
+
* @memberof ModerationWorker
|
|
14
|
+
*/
|
|
15
|
+
process(workPackage: object, callback: (error?: any) => void): Promise<void>;
|
|
16
|
+
}
|
|
@@ -13,7 +13,17 @@ var airbrake = null;
|
|
|
13
13
|
if (process.env.AIRBRAKE_PROJECT_ID) {
|
|
14
14
|
airbrake = require('../utils/airbrake.cjs');
|
|
15
15
|
}
|
|
16
|
-
|
|
16
|
+
/**
|
|
17
|
+
* @class NotificationDeliveryWorker
|
|
18
|
+
* @constructor
|
|
19
|
+
*/
|
|
20
|
+
function NotificationDeliveryWorker() { }
|
|
21
|
+
/**
|
|
22
|
+
* Processes a notification for delivery.
|
|
23
|
+
* @param {object} notificationJson - The notification JSON object.
|
|
24
|
+
* @param {(error?: any) => void} callback - The callback function.
|
|
25
|
+
* @memberof NotificationDeliveryWorker
|
|
26
|
+
*/
|
|
17
27
|
NotificationDeliveryWorker.prototype.process = function (notificationJson, callback) {
|
|
18
28
|
var user;
|
|
19
29
|
var notification;
|
|
@@ -365,4 +375,5 @@ NotificationDeliveryWorker.prototype.process = function (notificationJson, callb
|
|
|
365
375
|
}
|
|
366
376
|
});
|
|
367
377
|
};
|
|
378
|
+
/** @type {NotificationDeliveryWorker} */
|
|
368
379
|
module.exports = new NotificationDeliveryWorker();
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
declare const _exports: NotificationDeliveryWorker;
|
|
2
|
+
export = _exports;
|
|
3
|
+
/**
|
|
4
|
+
* @class NotificationDeliveryWorker
|
|
5
|
+
* @constructor
|
|
6
|
+
*/
|
|
7
|
+
declare function NotificationDeliveryWorker(): void;
|
|
8
|
+
declare class NotificationDeliveryWorker {
|
|
9
|
+
/**
|
|
10
|
+
* Processes a notification for delivery.
|
|
11
|
+
* @param {object} notificationJson - The notification JSON object.
|
|
12
|
+
* @param {(error?: any) => void} callback - The callback function.
|
|
13
|
+
* @memberof NotificationDeliveryWorker
|
|
14
|
+
*/
|
|
15
|
+
process(notificationJson: object, callback: (error?: any) => void): void;
|
|
16
|
+
}
|
|
@@ -11,7 +11,17 @@ if (process.env.AIRBRAKE_PROJECT_ID) {
|
|
|
11
11
|
airbrake = require('../utils/airbrake.cjs');
|
|
12
12
|
}
|
|
13
13
|
var GenerateNewsFeedFromNotifications = require('../engine/news_feeds/generate_from_notifications.cjs');
|
|
14
|
-
|
|
14
|
+
/**
|
|
15
|
+
* @class NotificationNewsFeedWorker
|
|
16
|
+
* @constructor
|
|
17
|
+
*/
|
|
18
|
+
function NotificationNewsFeedWorker() { }
|
|
19
|
+
/**
|
|
20
|
+
* Processes a notification to generate a news feed item.
|
|
21
|
+
* @param {object} notificationJson - The notification JSON object.
|
|
22
|
+
* @param {(error?: any) => void} callback - The callback function.
|
|
23
|
+
* @memberof NotificationNewsFeedWorker
|
|
24
|
+
*/
|
|
15
25
|
NotificationNewsFeedWorker.prototype.process = function (notificationJson, callback) {
|
|
16
26
|
var user;
|
|
17
27
|
var notification;
|
|
@@ -139,4 +149,5 @@ NotificationNewsFeedWorker.prototype.process = function (notificationJson, callb
|
|
|
139
149
|
}
|
|
140
150
|
});
|
|
141
151
|
};
|
|
152
|
+
/** @type {NotificationNewsFeedWorker} */
|
|
142
153
|
module.exports = new NotificationNewsFeedWorker();
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
declare const _exports: NotificationNewsFeedWorker;
|
|
2
|
+
export = _exports;
|
|
3
|
+
/**
|
|
4
|
+
* @class NotificationNewsFeedWorker
|
|
5
|
+
* @constructor
|
|
6
|
+
*/
|
|
7
|
+
declare function NotificationNewsFeedWorker(): void;
|
|
8
|
+
declare class NotificationNewsFeedWorker {
|
|
9
|
+
/**
|
|
10
|
+
* Processes a notification to generate a news feed item.
|
|
11
|
+
* @param {object} notificationJson - The notification JSON object.
|
|
12
|
+
* @param {(error?: any) => void} callback - The callback function.
|
|
13
|
+
* @memberof NotificationNewsFeedWorker
|
|
14
|
+
*/
|
|
15
|
+
process(notificationJson: object, callback: (error?: any) => void): void;
|
|
16
|
+
}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
declare const _exports: YpQueue;
|
|
2
|
+
export = _exports;
|
|
3
|
+
declare class YpQueue {
|
|
4
|
+
get defaultQueueOptions(): {
|
|
5
|
+
redis: {
|
|
6
|
+
tls: {
|
|
7
|
+
rejectUnauthorized: boolean;
|
|
8
|
+
};
|
|
9
|
+
} | undefined;
|
|
10
|
+
defaultJobOptions: {
|
|
11
|
+
attempts: number;
|
|
12
|
+
removeOnComplete: boolean;
|
|
13
|
+
removeOnFail: boolean;
|
|
14
|
+
};
|
|
15
|
+
};
|
|
16
|
+
process(name: any, concurrency: any, processor: any): void;
|
|
17
|
+
add(name: any, workPackage: any, priority: any, options: any): void;
|
|
18
|
+
createQueues(): void;
|
|
19
|
+
mainQueue: BullQueue.Queue<any> | undefined;
|
|
20
|
+
}
|
|
21
|
+
import BullQueue = require("bull");
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export function recountGroupFolder(workPackage: any, callback: any): Promise<void>;
|
|
@@ -8,8 +8,18 @@ const toJson = require('../utils/to_json.cjs');
|
|
|
8
8
|
const _ = require('lodash');
|
|
9
9
|
const fs = require('fs');
|
|
10
10
|
const updateSimilaritiesCollection = require('../engine/analytics/manager.cjs').updateCollection;
|
|
11
|
-
|
|
12
|
-
|
|
11
|
+
/**
|
|
12
|
+
* @class SimilaritiesWorker
|
|
13
|
+
* @constructor
|
|
14
|
+
*/
|
|
15
|
+
function SimilaritiesWorker() { }
|
|
16
|
+
/**
|
|
17
|
+
* Processes a similarities work package.
|
|
18
|
+
* @param {object} workPackage - The work package for similarities.
|
|
19
|
+
* @param {(error?: any) => void} callback - The callback function.
|
|
20
|
+
* @memberof SimilaritiesWorker
|
|
21
|
+
*/
|
|
22
|
+
SimilaritiesWorker.prototype.process = function (workPackage, callback) {
|
|
13
23
|
switch (workPackage.type) {
|
|
14
24
|
case 'update-collection':
|
|
15
25
|
updateSimilaritiesCollection(workPackage, callback);
|
|
@@ -18,4 +28,5 @@ SimilaritiesWorker.prototype.process = (workPackage, callback) => {
|
|
|
18
28
|
callback("Unknown type for workPackage: " + workPackage.type);
|
|
19
29
|
}
|
|
20
30
|
};
|
|
31
|
+
/** @type {SimilaritiesWorker} */
|
|
21
32
|
module.exports = new SimilaritiesWorker();
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
declare const _exports: SimilaritiesWorker;
|
|
2
|
+
export = _exports;
|
|
3
|
+
/**
|
|
4
|
+
* @class SimilaritiesWorker
|
|
5
|
+
* @constructor
|
|
6
|
+
*/
|
|
7
|
+
declare function SimilaritiesWorker(): void;
|
|
8
|
+
declare class SimilaritiesWorker {
|
|
9
|
+
/**
|
|
10
|
+
* Processes a similarities work package.
|
|
11
|
+
* @param {object} workPackage - The work package for similarities.
|
|
12
|
+
* @param {(error?: any) => void} callback - The callback function.
|
|
13
|
+
* @memberof SimilaritiesWorker
|
|
14
|
+
*/
|
|
15
|
+
process(workPackage: object, callback: (error?: any) => void): void;
|
|
16
|
+
}
|
|
@@ -24,7 +24,11 @@ let airbrake = null;
|
|
|
24
24
|
if (process.env.AIRBRAKE_PROJECT_ID) {
|
|
25
25
|
airbrake = require('../utils/airbrake.cjs');
|
|
26
26
|
}
|
|
27
|
-
|
|
27
|
+
/**
|
|
28
|
+
* @class VoiceToTextWorker
|
|
29
|
+
* @constructor
|
|
30
|
+
*/
|
|
31
|
+
function VoiceToTextWorker() { }
|
|
28
32
|
const supportedGoogleLanguges = [
|
|
29
33
|
['af-ZA', true, false],
|
|
30
34
|
['am-ET', true, false],
|
|
@@ -467,7 +471,13 @@ const createTranscriptForAudio = (workPackage, callback) => {
|
|
|
467
471
|
callback(error);
|
|
468
472
|
});
|
|
469
473
|
};
|
|
470
|
-
|
|
474
|
+
/**
|
|
475
|
+
* Processes a speech-to-text work package.
|
|
476
|
+
* @param {object} workPackage - The work package for speech-to-text.
|
|
477
|
+
* @param {(error?: any) => void} callback - The callback function.
|
|
478
|
+
* @memberof VoiceToTextWorker
|
|
479
|
+
*/
|
|
480
|
+
VoiceToTextWorker.prototype.process = function (workPackage, callback) {
|
|
471
481
|
switch (workPackage.type) {
|
|
472
482
|
case 'create-video-transcript':
|
|
473
483
|
createTranscriptForVideo(workPackage, callback);
|
|
@@ -479,4 +489,5 @@ VoiceToTextWorker.prototype.process = (workPackage, callback) => {
|
|
|
479
489
|
callback("Unknown type for workPackage: " + workPackage.type);
|
|
480
490
|
}
|
|
481
491
|
};
|
|
492
|
+
/** @type {VoiceToTextWorker} */
|
|
482
493
|
module.exports = new VoiceToTextWorker();
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
declare const _exports: VoiceToTextWorker;
|
|
2
|
+
export = _exports;
|
|
3
|
+
/**
|
|
4
|
+
* @class VoiceToTextWorker
|
|
5
|
+
* @constructor
|
|
6
|
+
*/
|
|
7
|
+
declare function VoiceToTextWorker(): void;
|
|
8
|
+
declare class VoiceToTextWorker {
|
|
9
|
+
/**
|
|
10
|
+
* Processes a speech-to-text work package.
|
|
11
|
+
* @param {object} workPackage - The work package for speech-to-text.
|
|
12
|
+
* @param {(error?: any) => void} callback - The callback function.
|
|
13
|
+
* @memberof VoiceToTextWorker
|
|
14
|
+
*/
|
|
15
|
+
process(workPackage: object, callback: (error?: any) => void): void;
|
|
16
|
+
}
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import { YpBaseAssistantWithVoice } from "./baseAssistantWithVoice.js";
|
|
2
|
+
import { PsAgent } from "@policysynth/agents/dbModels/agent.js";
|
|
3
|
+
import WebSocket from "ws";
|
|
4
|
+
import ioredis from "ioredis";
|
|
5
|
+
import { SubscriptionManager } from "../managers/subscriptionManager.js";
|
|
6
|
+
export declare class YpAgentAssistant extends YpBaseAssistantWithVoice {
|
|
7
|
+
availableAgents: PsAgent[];
|
|
8
|
+
runningAgents: PsAgent[];
|
|
9
|
+
private agentSelectionMode;
|
|
10
|
+
private directConversationMode;
|
|
11
|
+
subscriptionManager: SubscriptionManager;
|
|
12
|
+
constructor(wsClientId: string, wsClients: Map<string, WebSocket>, redis: ioredis.Redis, voiceEnabled: boolean, redisKey: string, domainId: number);
|
|
13
|
+
defineAvailableModes(): Promise<AssistantChatbotMode[]>;
|
|
14
|
+
get simplifiedMemory(): Partial<YpBaseAssistantMemoryData>;
|
|
15
|
+
handleMemoryChanged(memory: YpBaseAssistantMemoryData): void;
|
|
16
|
+
get isLoggedIn(): boolean;
|
|
17
|
+
get isSubscribedToCurrentAgentProduct(): boolean;
|
|
18
|
+
get hasConfiguredcurrentAgentProduct(): boolean;
|
|
19
|
+
isCurrentAgentRunning(): Promise<boolean>;
|
|
20
|
+
isCurrentAgentActive(): Promise<boolean>;
|
|
21
|
+
get haveShownConfigurationWidget(): boolean;
|
|
22
|
+
get haveShownLoginWidget(): boolean;
|
|
23
|
+
getCurrentAgentWorkflow(): Promise<YpAgentRunWorkflowConfiguration | undefined>;
|
|
24
|
+
getCurrentAgentWorkflowCurrentStep(): Promise<YpAgentRunWorkflowStep | undefined>;
|
|
25
|
+
isCurrentAgentWaitingOnUserInput(): Promise<boolean>;
|
|
26
|
+
triggerResponseIfNeeded(message: string): void;
|
|
27
|
+
}
|