@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
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
export function generateRecommendationEvent(activity: any, callback: any): void;
|
|
2
|
+
export function getRecommendationFor(req: any, userId: any, dateOptions: any, options: any, callback: any, userLocale: any): void;
|
|
3
|
+
export function isItemRecommended(req: any, itemId: any, userId: any, dateRange: any, options: any, callback: any): void;
|
|
4
|
+
export function createAction(userAgent: any, ipAddress: any, postId: any, userId: any, date: any, action: any, callback: any): void;
|
|
5
|
+
export function createManyActions(posts: any, callback: any): void;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export function addPostPointsToSheet(worksheet: any, post: any, group: any): void;
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import ExcelJS from "exceljs";
|
|
2
|
+
export declare const updateUploadJobStatus: (jobId: number, uploadProgress: number, data?: object | undefined) => Promise<void>;
|
|
3
|
+
export declare const setJobError: (jobId: number, errorToUser: string, errorDetail?: Error | undefined) => Promise<void>;
|
|
4
|
+
export declare const downloadImage: (uri: string, filename: string) => Promise<void>;
|
|
5
|
+
export declare const uploadToS3: (jobId: number, userId: string, filename: string, exportType: string, data: ExcelJS.Buffer, done: (error: Error | null, url?: string) => void) => void;
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
export function getExportFileDataForGroup(group: any, hostName: any, callback: any): void;
|
|
2
|
+
export function getLoginsExportDataForCommunity(communityId: any, hostName: any, callback: any): void;
|
|
3
|
+
export function getLoginsExportDataForDomain(domainId: any, hostName: any, callback: any): void;
|
|
4
|
+
export function getGroupPosts(group: any, hostName: any, callback: any): void;
|
|
5
|
+
export function getUsersForCommunity(communityId: any, callback: any): void;
|
|
6
|
+
export function getDescriptionHeaders(group: any): string;
|
|
7
|
+
export function getPostUrl(post: any, hostname: any): string;
|
|
8
|
+
export function getCategory(post: any): any;
|
|
9
|
+
export function getImages(post: any): string;
|
|
10
|
+
export function clean(text: any): any;
|
|
11
|
+
export function getDescriptionColumns(group: any, post: any): string;
|
|
12
|
+
export function getPointsDown(post: any): {
|
|
13
|
+
content: any;
|
|
14
|
+
id: any;
|
|
15
|
+
public_data: any;
|
|
16
|
+
created_at: any;
|
|
17
|
+
PointRevisions: any;
|
|
18
|
+
User: any;
|
|
19
|
+
}[];
|
|
20
|
+
export function getPointsUp(post: any): {
|
|
21
|
+
content: any;
|
|
22
|
+
id: any;
|
|
23
|
+
public_data: any;
|
|
24
|
+
created_at: any;
|
|
25
|
+
PointRevisions: any;
|
|
26
|
+
User: any;
|
|
27
|
+
}[];
|
|
28
|
+
export function getUserEmail(post: any): any;
|
|
29
|
+
export function getRatingHeaders(customRatings: any): string;
|
|
30
|
+
export function getContactData(post: any): string;
|
|
31
|
+
export function getLocation(post: any): string;
|
|
32
|
+
export function getAttachmentData(post: any): string;
|
|
33
|
+
export function getMediaURLs(post: any): string;
|
|
34
|
+
export function getMediaTranscripts(post: any): string;
|
|
35
|
+
export function getPostRatings(customRatings: any, postRatings: any): string;
|
|
36
|
+
export function updateJobStatusIfNeeded(jobId: any, totalPosts: any, processedCount: any, lastReportedCount: any, done: any): void;
|
|
37
|
+
export function getTranslatedPoints(points: any, targetLanguage: any): Promise<any>;
|
|
38
|
+
export function getTranslation(model: any, textType: any, targetLanguage: any): Promise<any>;
|
|
39
|
+
export function getOrderedPosts(posts: any): any[];
|
|
40
|
+
export function setJobError(jobId: any, errorToUser: any, errorDetail: any, done: any): void;
|
|
41
|
+
export function preparePosts(workPackage: any, callback: any): Promise<void>;
|
|
42
|
+
export function uploadToS3(jobId: any, userId: any, filename: any, exportType: any, data: any, done: any): void;
|
|
43
|
+
export function getImageFromUrl(url: any, done: any): void;
|
|
44
|
+
export function getPointMediaUrls(post: any): string;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export function createDocxReport(workPackage: any, callback: any): void;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare function exportChoiceVotes(workPackage: AcXlsExportJobData, done: (error: Error | undefined, url?: string | undefined) => void): Promise<void>;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export function createXlsReport(workPackage: any, callback: any): void;
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
import { OpenAI } from "openai";
|
|
2
|
+
import { Stream } from "openai/streaming.js";
|
|
3
|
+
import WebSocket from "ws";
|
|
4
|
+
import ioredis from "ioredis";
|
|
5
|
+
export declare class YpBaseChatBot {
|
|
6
|
+
wsClientId: string;
|
|
7
|
+
wsClientSocket: WebSocket;
|
|
8
|
+
wsClients: Map<string, WebSocket>;
|
|
9
|
+
openaiClient: OpenAI;
|
|
10
|
+
memory: YpBaseChatBotMemoryData;
|
|
11
|
+
static redisMemoryKeyPrefix: string;
|
|
12
|
+
temperature: number;
|
|
13
|
+
maxTokens: number;
|
|
14
|
+
llmModel: string;
|
|
15
|
+
persistMemory: boolean;
|
|
16
|
+
redisKey: string;
|
|
17
|
+
lastSentToUserAt?: Date;
|
|
18
|
+
currentAssistantAvatarUrl?: string;
|
|
19
|
+
destroy(): void;
|
|
20
|
+
loadMemory(): Promise<PsAgentBaseMemoryData | undefined>;
|
|
21
|
+
redis: ioredis.default;
|
|
22
|
+
constructor(wsClientId: string, wsClients: Map<string, WebSocket>, redisConnection: ioredis.default, redisKey: string);
|
|
23
|
+
saveMemory(): Promise<void>;
|
|
24
|
+
renderSystemPrompt(): string;
|
|
25
|
+
sendAgentStart(name: string, hasNoStreaming?: boolean): void;
|
|
26
|
+
sendAgentCompleted(name: string, lastAgent?: boolean, error?: string | undefined): void;
|
|
27
|
+
sendAgentUpdate(message: string): void;
|
|
28
|
+
sendToClient(sender: YpSenderType, message: string, type?: YpAssistantMessageType, uniqueToken?: string | undefined, hiddenContextMessage?: boolean): void;
|
|
29
|
+
streamWebSocketResponses(stream: Stream<OpenAI.Chat.Completions.ChatCompletionChunk>): Promise<void>;
|
|
30
|
+
saveMemoryIfNeeded(): Promise<void>;
|
|
31
|
+
setChatLog(chatLog: YpSimpleChatLog[]): Promise<void>;
|
|
32
|
+
conversation(chatLog: YpSimpleChatLog[]): Promise<void>;
|
|
33
|
+
}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { IImageGenerator, YpAiGenerateImageTypes } from "./iImageGenerator.js";
|
|
2
|
+
export declare class ChatGptImageGenerator implements IImageGenerator {
|
|
3
|
+
private readonly maxRetryCount;
|
|
4
|
+
private readonly openAiKey?;
|
|
5
|
+
constructor(openAiKey?: string);
|
|
6
|
+
/**
|
|
7
|
+
* Generates an image URL from a prompt using OpenAI’s gpt-image-1 model.
|
|
8
|
+
* The returned link remains live for ~60 minutes – be sure to download
|
|
9
|
+
* or cache it right away in the calling service.
|
|
10
|
+
*/
|
|
11
|
+
generateImageUrl(prompt: string, type?: YpAiGenerateImageTypes): Promise<string | undefined>;
|
|
12
|
+
}
|
|
13
|
+
export default ChatGptImageGenerator;
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import { FluxImageGenerator } from "./fluxImageGenerator.js";
|
|
2
|
+
import { DalleImageGenerator } from "./dalleImageGenerator.js";
|
|
3
|
+
import { ImageProcessorService } from "./imageProcessorService.js";
|
|
4
|
+
import { S3Service } from "./s3Service.js";
|
|
5
|
+
import { ImagenImageGenerator } from "./imagenImageGenerator.js";
|
|
6
|
+
import { ChatGptImageGenerator } from "./chatGptImageGenerator.js";
|
|
7
|
+
export declare class CollectionImageGenerator {
|
|
8
|
+
protected s3Service: S3Service;
|
|
9
|
+
protected imageProcessorService: ImageProcessorService;
|
|
10
|
+
protected fluxImageGenerator?: FluxImageGenerator;
|
|
11
|
+
protected dalleImageGenerator: DalleImageGenerator;
|
|
12
|
+
protected imagenImageGenerator?: ImagenImageGenerator;
|
|
13
|
+
protected chatGptImageGenerator: ChatGptImageGenerator;
|
|
14
|
+
constructor();
|
|
15
|
+
/**
|
|
16
|
+
* Orchestrates image generation (via Flux or DALL·E), downloads that image,
|
|
17
|
+
* uploads it to S3, and saves a record in the DB.
|
|
18
|
+
*/
|
|
19
|
+
createCollectionImage(workPackage: YpGenerativeAiWorkPackageData): Promise<{
|
|
20
|
+
imageId: number;
|
|
21
|
+
imageUrl: string;
|
|
22
|
+
}>;
|
|
23
|
+
}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { IImageGenerator, YpAiGenerateImageTypes } from "./iImageGenerator.js";
|
|
2
|
+
export declare class DalleImageGenerator implements IImageGenerator {
|
|
3
|
+
private maxRetryCount;
|
|
4
|
+
private azureOpenaAiBase?;
|
|
5
|
+
private azureOpenAiApiKey?;
|
|
6
|
+
private azureDalleDeployment?;
|
|
7
|
+
private openAiKey?;
|
|
8
|
+
constructor(azureOpenaAiBase: string | undefined, azureOpenAiApiKey: string | undefined, azureDalleDeployment: string | undefined, openAiKey: string | undefined);
|
|
9
|
+
generateImageUrl(prompt: string, type?: YpAiGenerateImageTypes): Promise<string | undefined>;
|
|
10
|
+
}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { IImageGenerator, YpAiGenerateImageTypes } from "./iImageGenerator.js";
|
|
2
|
+
export declare class FluxImageGenerator implements IImageGenerator {
|
|
3
|
+
private replicateApiKey;
|
|
4
|
+
private fluxProModelName;
|
|
5
|
+
private replicate;
|
|
6
|
+
private maxRetryCount;
|
|
7
|
+
constructor(replicateApiKey: string, fluxProModelName: string);
|
|
8
|
+
generateImageUrl(prompt: string, type?: YpAiGenerateImageTypes): Promise<string | undefined>;
|
|
9
|
+
}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
export type YpAiGenerateImageTypes = "logo" | "icon" | "other";
|
|
2
|
+
export interface IImageGenerator {
|
|
3
|
+
/**
|
|
4
|
+
* Generates an image URL given a prompt and a type (logo, icon, etc.)
|
|
5
|
+
*/
|
|
6
|
+
generateImageUrl(prompt: string, type: YpAiGenerateImageTypes): Promise<string | undefined>;
|
|
7
|
+
}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
export declare class ImageProcessorService {
|
|
2
|
+
private validFormats;
|
|
3
|
+
/**
|
|
4
|
+
* Downloads an image from a given URL into the specified filepath.
|
|
5
|
+
*/
|
|
6
|
+
downloadImage(imageUrl: string, imageFilePath: string, axiosInstance: any): Promise<void>;
|
|
7
|
+
/**
|
|
8
|
+
* Resizes an image to given dimensions (width x height).
|
|
9
|
+
* If the image is smaller, it won't be enlarged.
|
|
10
|
+
*/
|
|
11
|
+
resizeImage(imagePath: string, width: number, height: number): Promise<string>;
|
|
12
|
+
}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { IImageGenerator, YpAiGenerateImageTypes } from "./iImageGenerator.js";
|
|
2
|
+
import { S3Service } from "./s3Service.js";
|
|
3
|
+
export declare class ImagenImageGenerator implements IImageGenerator {
|
|
4
|
+
private s3Service;
|
|
5
|
+
private maxRetryCount;
|
|
6
|
+
private projectId;
|
|
7
|
+
private location;
|
|
8
|
+
private endpoint;
|
|
9
|
+
private s3Bucket;
|
|
10
|
+
constructor(s3Service: S3Service);
|
|
11
|
+
/**
|
|
12
|
+
* Generates an image from a text prompt using Vertex AI Imagen
|
|
13
|
+
* and returns a public S3 URL to the uploaded image.
|
|
14
|
+
*/
|
|
15
|
+
generateImageUrl(prompt: string, type?: YpAiGenerateImageTypes): Promise<string | undefined>;
|
|
16
|
+
}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
export declare class S3Service {
|
|
2
|
+
private cloudflareApiKey?;
|
|
3
|
+
private cloudflareZoneId?;
|
|
4
|
+
constructor(cloudflareApiKey?: string | undefined, cloudflareZoneId?: string | undefined);
|
|
5
|
+
uploadImageToS3(bucket: string, filePath: string, key: string): Promise<unknown>;
|
|
6
|
+
deleteS3Url(imageUrl: string): Promise<unknown>;
|
|
7
|
+
parseImageUrl(imageUrl: string): {
|
|
8
|
+
bucket: string | undefined;
|
|
9
|
+
key: string | undefined;
|
|
10
|
+
};
|
|
11
|
+
deleteMediaFormatsUrls(formats: string[]): Promise<void>;
|
|
12
|
+
}
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import { OpenAI } from "openai";
|
|
2
|
+
export declare class YpLlmTranslation {
|
|
3
|
+
openaiClient: OpenAI;
|
|
4
|
+
modelName: string;
|
|
5
|
+
maxTokens: number;
|
|
6
|
+
temperature: number;
|
|
7
|
+
constructor();
|
|
8
|
+
extractHtmlStrings(html: string): string[];
|
|
9
|
+
replaceHtmlStrings(html: string, originalStrings: string[], translatedStrings: string[]): string;
|
|
10
|
+
renderSchemaSystemMessage(jsonInSchema: string, jsonOutSchema: string, lengthInfo: string): string;
|
|
11
|
+
renderSchemaTryAgainSystemMessage(jsonInSchema: string, jsonOutSchema: string, lengthInfo: string, currentToLong: string): string;
|
|
12
|
+
renderOneTranslationSystemMessage(): string;
|
|
13
|
+
renderListTranslationSystemMessage(): string;
|
|
14
|
+
renderOneTranslationUserMessage(language: string, stringToTranslate: string): string;
|
|
15
|
+
renderListTranslationUserMessage(language: string, textsToTranslate: Array<string>): string;
|
|
16
|
+
renderAnswersUserMessage(language: string, question: string, answer: AoiTranslationAnswerInData): string;
|
|
17
|
+
renderQuestionUserMessage(language: string, question: string, questionData: AoiTranslationQuestionInData): string;
|
|
18
|
+
getModerationFlag(content: string): Promise<boolean>;
|
|
19
|
+
getHtmlTranslation(languageIsoCode: string, htmlToTranslate: string): Promise<string | null | undefined>;
|
|
20
|
+
getOneTranslation(languageIsoCode: string, stringToTranslate: string): Promise<string | null | undefined>;
|
|
21
|
+
getListTranslation(languageIsoCode: string, stringsToTranslate: string[]): Promise<string[] | null | undefined>;
|
|
22
|
+
getChoiceTranslation(languageIsoCode: string, answerContent: string, maxCharactersInTranslation?: number): Promise<string | null | undefined>;
|
|
23
|
+
getQuestionTranslation(languageIsoCode: string, question: string, maxCharactersInTranslation?: number): Promise<string | null | undefined>;
|
|
24
|
+
callSimpleLlm(languageName: string, toTranslate: string[] | string, parseJson: boolean, systemRenderer: Function, userRenderer: Function): Promise<string | object | null | undefined>;
|
|
25
|
+
callSchemaLlm(jsonInSchema: string, jsonOutSchema: string, lengthInfo: string, languageName: string, question: string, toTranslate: AoiTranslationAnswerInData | AoiTranslationQuestionInData | string[] | string, maxCharactersInTranslation: number | undefined, systemRenderer: Function, userRenderer: Function): Promise<string | null | undefined>;
|
|
26
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
export function cloneTranslationForPoint(inPoint: any, outPoint: any, done: any): void;
|
|
2
|
+
export function cloneTranslationForPost(inPost: any, outPost: any, done: any): void;
|
|
3
|
+
export function cloneTranslationForCommunity(inCommunity: any, outCommunity: any, done: any): void;
|
|
4
|
+
export function cloneTranslationForGroup(inGroup: any, outGroup: any, done: any): void;
|
|
5
|
+
export function cloneTranslationForConfig(textType: any, inObjectId: any, outObjectId: any, callback: any): void;
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
export function getTranslatedTextsForCommunity(targetLocale: any, communityId: any, done: any): void;
|
|
2
|
+
export function getTranslatedTextsForGroup(targetLocale: any, groupId: any, done: any): void;
|
|
3
|
+
export function updateTranslationForCommunity(communityId: any, item: any, done: any): void;
|
|
4
|
+
export function updateTranslationForGroup(groupId: any, item: any, done: any): void;
|
|
5
|
+
export function updateAnswerTranslation(postId: any, textType: any, targetLocale: any, translations: any, contentHash: any, done: any): void;
|
|
6
|
+
export function fixTargetLocale(itemTargetLocale: any): any;
|
|
7
|
+
export function updateTranslation(item: any, done: any): void;
|
|
8
|
+
export function updateSurveyTranslation(groupId: any, textType: any, targetLocale: any, translations: any, questions: any, done: any): void;
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import { OpenAI } from "openai";
|
|
2
|
+
export declare class YpLocaleTranslation {
|
|
3
|
+
openaiClient: OpenAI;
|
|
4
|
+
modelName: string;
|
|
5
|
+
maxTokens: number;
|
|
6
|
+
temperature: number;
|
|
7
|
+
constructor();
|
|
8
|
+
getValueByPath(obj: any, path: any): any;
|
|
9
|
+
loadAndCompareTranslations(): Promise<void>;
|
|
10
|
+
setValueAtPath(obj: any, path: any, value: any): void;
|
|
11
|
+
private loadJsonFile;
|
|
12
|
+
private updateWithMissingKeys;
|
|
13
|
+
excludeKeysFromTranslation: string[];
|
|
14
|
+
private extractMissingTranslations;
|
|
15
|
+
private chunkArray;
|
|
16
|
+
renderSystemPrompt(): string;
|
|
17
|
+
renderUserMessage(language: string, textsToTranslate: Array<string>): string;
|
|
18
|
+
translateUITexts(languageIsoCode: string, textsToTranslate: string[]): Promise<string[] | undefined>;
|
|
19
|
+
callLlm(languageName: string, inObject: string[]): Promise<string[] | undefined>;
|
|
20
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -12,8 +12,18 @@ const generatePostNotification = require('../engine/notifications/generate_post_
|
|
|
12
12
|
const generatePointNotification = require('../engine/notifications/generate_point_notifications.cjs');
|
|
13
13
|
const generateRecommendationEvent = require('../engine/recommendations/events_manager.cjs').generateRecommendationEvent;
|
|
14
14
|
const generatePostStatusChangeNotification = require('../engine/notifications/generate_post_status_change_notifications.cjs');
|
|
15
|
-
|
|
16
|
-
|
|
15
|
+
/**
|
|
16
|
+
* Defines the ActivityWorker class.
|
|
17
|
+
* @class ActivityWorker
|
|
18
|
+
*/
|
|
19
|
+
function ActivityWorker() { }
|
|
20
|
+
/**
|
|
21
|
+
* Processes an activity.
|
|
22
|
+
* @param {object} activityJson - The activity JSON object.
|
|
23
|
+
* @param {(error?: any) => void} callback - The callback function.
|
|
24
|
+
* @memberof ActivityWorker
|
|
25
|
+
*/
|
|
26
|
+
ActivityWorker.prototype.process = function (activityJson, callback) {
|
|
17
27
|
let activity;
|
|
18
28
|
log.info('Processing activity Started');
|
|
19
29
|
async.series([
|
|
@@ -186,4 +196,5 @@ ActivityWorker.prototype.process = (activityJson, callback) => {
|
|
|
186
196
|
}
|
|
187
197
|
});
|
|
188
198
|
};
|
|
199
|
+
/** @type {ActivityWorker} */
|
|
189
200
|
module.exports = new ActivityWorker();
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
declare const _exports: ActivityWorker;
|
|
2
|
+
export = _exports;
|
|
3
|
+
/**
|
|
4
|
+
* Defines the ActivityWorker class.
|
|
5
|
+
* @class ActivityWorker
|
|
6
|
+
*/
|
|
7
|
+
declare function ActivityWorker(): void;
|
|
8
|
+
declare class ActivityWorker {
|
|
9
|
+
/**
|
|
10
|
+
* Processes an activity.
|
|
11
|
+
* @param {object} activityJson - The activity JSON object.
|
|
12
|
+
* @param {(error?: any) => void} callback - The callback function.
|
|
13
|
+
* @memberof ActivityWorker
|
|
14
|
+
*/
|
|
15
|
+
process(activityJson: 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
|
+
* Defines the AnonymizationWorker class.
|
|
16
|
+
* @class AnonymizationWorker
|
|
17
|
+
*/
|
|
18
|
+
function AnonymizationWorker() { }
|
|
15
19
|
const anonymizePointActivities = (workPackage, callback) => {
|
|
16
20
|
const pointId = workPackage.pointId;
|
|
17
21
|
const userId = workPackage.userId;
|
|
@@ -690,7 +694,13 @@ const notifyCommunityUsers = (workPackage, callback) => {
|
|
|
690
694
|
}
|
|
691
695
|
], (error) => { callback(error); });
|
|
692
696
|
};
|
|
693
|
-
|
|
697
|
+
/**
|
|
698
|
+
* Processes an anonymization work package.
|
|
699
|
+
* @param {object} workPackage - The work package containing details for anonymization.
|
|
700
|
+
* @param {(error?: any) => void} callback - The callback function.
|
|
701
|
+
* @memberof AnonymizationWorker
|
|
702
|
+
*/
|
|
703
|
+
AnonymizationWorker.prototype.process = function (workPackage, callback) {
|
|
694
704
|
getAnonymousUser((error, anonymousUser) => {
|
|
695
705
|
if (error) {
|
|
696
706
|
callback(error);
|
|
@@ -731,4 +741,5 @@ AnonymizationWorker.prototype.process = (workPackage, callback) => {
|
|
|
731
741
|
}
|
|
732
742
|
});
|
|
733
743
|
};
|
|
744
|
+
/** @type {AnonymizationWorker} */
|
|
734
745
|
module.exports = new AnonymizationWorker();
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
declare const _exports: AnonymizationWorker;
|
|
2
|
+
export = _exports;
|
|
3
|
+
/**
|
|
4
|
+
* Defines the AnonymizationWorker class.
|
|
5
|
+
* @class AnonymizationWorker
|
|
6
|
+
*/
|
|
7
|
+
declare function AnonymizationWorker(): void;
|
|
8
|
+
declare class AnonymizationWorker {
|
|
9
|
+
/**
|
|
10
|
+
* Processes an anonymization work package.
|
|
11
|
+
* @param {object} workPackage - The work package containing details for anonymization.
|
|
12
|
+
* @param {(error?: any) => void} callback - The callback function.
|
|
13
|
+
* @memberof AnonymizationWorker
|
|
14
|
+
*/
|
|
15
|
+
process(workPackage: object, callback: (error?: any) => void): void;
|
|
16
|
+
}
|
|
@@ -11,7 +11,11 @@ if (process.env.AIRBRAKE_PROJECT_ID) {
|
|
|
11
11
|
airbrake = require('../utils/airbrake.cjs');
|
|
12
12
|
}
|
|
13
13
|
var _ = require('lodash');
|
|
14
|
-
|
|
14
|
+
/**
|
|
15
|
+
* @class BulkStatusUpdateWorker
|
|
16
|
+
* @constructor
|
|
17
|
+
*/
|
|
18
|
+
function BulkStatusUpdateWorker() { }
|
|
15
19
|
var verifyMode = true;
|
|
16
20
|
var verifiedMovedPostCount, verifiedStatusChangedPostsCount;
|
|
17
21
|
var movePostToGroupId = function (postId, toGroupId, done) {
|
|
@@ -375,6 +379,12 @@ const createBulkStatusUpdates = function (statusUpdateJson, users, callback) {
|
|
|
375
379
|
callback(error);
|
|
376
380
|
});
|
|
377
381
|
};
|
|
382
|
+
/**
|
|
383
|
+
* Processes a bulk status update.
|
|
384
|
+
* @param {object} bulkStatusUpdateInfo - Information for the bulk status update.
|
|
385
|
+
* @param {(error?: any) => void} callback - The callback function.
|
|
386
|
+
* @memberof BulkStatusUpdateWorker
|
|
387
|
+
*/
|
|
378
388
|
BulkStatusUpdateWorker.prototype.process = function (bulkStatusUpdateInfo, callback) {
|
|
379
389
|
var statusUpdate;
|
|
380
390
|
var allUsersWithEndorsements;
|
|
@@ -455,4 +465,5 @@ BulkStatusUpdateWorker.prototype.process = function (bulkStatusUpdateInfo, callb
|
|
|
455
465
|
}
|
|
456
466
|
});
|
|
457
467
|
};
|
|
468
|
+
/** @type {BulkStatusUpdateWorker} */
|
|
458
469
|
module.exports = new BulkStatusUpdateWorker();
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
declare const _exports: BulkStatusUpdateWorker;
|
|
2
|
+
export = _exports;
|
|
3
|
+
/**
|
|
4
|
+
* @class BulkStatusUpdateWorker
|
|
5
|
+
* @constructor
|
|
6
|
+
*/
|
|
7
|
+
declare function BulkStatusUpdateWorker(): void;
|
|
8
|
+
declare class BulkStatusUpdateWorker {
|
|
9
|
+
/**
|
|
10
|
+
* Processes a bulk status update.
|
|
11
|
+
* @param {object} bulkStatusUpdateInfo - Information for the bulk status update.
|
|
12
|
+
* @param {(error?: any) => void} callback - The callback function.
|
|
13
|
+
* @memberof BulkStatusUpdateWorker
|
|
14
|
+
*/
|
|
15
|
+
process(bulkStatusUpdateInfo: object, callback: (error?: any) => void): void;
|
|
16
|
+
}
|