@yrpri/api 9.0.103 → 9.0.104
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/package.json +1 -1
- package/dist/active-citizen/controllers/activities.cjs +0 -174
- package/dist/active-citizen/controllers/news_feeds.cjs +0 -96
- package/dist/active-citizen/controllers/notifications.cjs +0 -243
- package/dist/active-citizen/controllers/recommendations.cjs +0 -280
- package/dist/active-citizen/engine/allOurIdeas/aiHelper.js +0 -204
- package/dist/active-citizen/engine/allOurIdeas/explainAnswersAssistant.js +0 -66
- package/dist/active-citizen/engine/allOurIdeas/iconGenerator.js +0 -38
- package/dist/active-citizen/engine/analytics/export_anon_community_activities.js +0 -334
- package/dist/active-citizen/engine/analytics/importer.js +0 -308
- package/dist/active-citizen/engine/analytics/manager.cjs +0 -377
- package/dist/active-citizen/engine/analytics/plausible/manager.cjs +0 -500
- package/dist/active-citizen/engine/analytics/statsCalc.cjs +0 -194
- package/dist/active-citizen/engine/analytics/utils.cjs +0 -369
- package/dist/active-citizen/engine/marketing/campaign.cjs +0 -90
- package/dist/active-citizen/engine/moderation/fraud/CreateFraudAuditReport.cjs +0 -313
- package/dist/active-citizen/engine/moderation/fraud/FraudBase.cjs +0 -239
- package/dist/active-citizen/engine/moderation/fraud/FraudDeleteBase.cjs +0 -211
- package/dist/active-citizen/engine/moderation/fraud/FraudDeleteEndorsements.cjs +0 -120
- package/dist/active-citizen/engine/moderation/fraud/FraudDeletePointQualities.cjs +0 -114
- package/dist/active-citizen/engine/moderation/fraud/FraudDeletePoints.cjs +0 -101
- package/dist/active-citizen/engine/moderation/fraud/FraudDeletePosts.cjs +0 -84
- package/dist/active-citizen/engine/moderation/fraud/FraudDeleteRatings.cjs +0 -15
- package/dist/active-citizen/engine/moderation/fraud/FraudGetBase.cjs +0 -133
- package/dist/active-citizen/engine/moderation/fraud/FraudGetEndorsements.cjs +0 -185
- package/dist/active-citizen/engine/moderation/fraud/FraudGetPointQualities.cjs +0 -184
- package/dist/active-citizen/engine/moderation/fraud/FraudGetPoints.cjs +0 -170
- package/dist/active-citizen/engine/moderation/fraud/FraudGetPosts.cjs +0 -109
- package/dist/active-citizen/engine/moderation/fraud/FraudGetRatings.cjs +0 -140
- package/dist/active-citizen/engine/moderation/fraud/FraudScannerNotifier.cjs +0 -279
- package/dist/active-citizen/engine/moderation/get_moderation_items.cjs +0 -386
- package/dist/active-citizen/engine/moderation/image_labeling/CommunityLabeling.cjs +0 -49
- package/dist/active-citizen/engine/moderation/image_labeling/GroupLabeling.cjs +0 -68
- package/dist/active-citizen/engine/moderation/image_labeling/ImageLabelingBase.cjs +0 -288
- package/dist/active-citizen/engine/moderation/image_labeling/PointLabeling.cjs +0 -33
- package/dist/active-citizen/engine/moderation/image_labeling/PostLabeling.cjs +0 -56
- package/dist/active-citizen/engine/moderation/perspective_api_client.cjs +0 -106
- package/dist/active-citizen/engine/moderation/process_moderation_items.cjs +0 -344
- package/dist/active-citizen/engine/moderation/toxicity_analysis.cjs +0 -810
- package/dist/active-citizen/engine/news_feeds/activity_and_item_index_definitions.cjs +0 -15
- package/dist/active-citizen/engine/news_feeds/generate_dynamically.cjs +0 -362
- package/dist/active-citizen/engine/news_feeds/generate_from_notifications.cjs +0 -268
- package/dist/active-citizen/engine/news_feeds/news_feeds_utils.cjs +0 -439
- package/dist/active-citizen/engine/notifications/emails_utils.cjs +0 -569
- package/dist/active-citizen/engine/notifications/generate_point_notifications.cjs +0 -233
- package/dist/active-citizen/engine/notifications/generate_post_notifications.cjs +0 -118
- package/dist/active-citizen/engine/notifications/generate_post_status_change_notifications.cjs +0 -41
- package/dist/active-citizen/engine/notifications/notifications_utils.cjs +0 -148
- package/dist/active-citizen/engine/notifications/point_delivery.cjs +0 -54
- package/dist/active-citizen/engine/notifications/post_delivery.cjs +0 -31
- package/dist/active-citizen/engine/notifications/process_delayed_notifications.cjs +0 -471
- package/dist/active-citizen/engine/notifications/process_general_notifications.cjs +0 -212
- package/dist/active-citizen/engine/old/exporters/categories_dataset.js +0 -153
- package/dist/active-citizen/engine/old/exporters/dataset_tools.js +0 -80
- package/dist/active-citizen/engine/old/exporters/sentiment_dataset.js +0 -157
- package/dist/active-citizen/engine/recommendations/events_importer.cjs +0 -139
- package/dist/active-citizen/engine/recommendations/events_manager.cjs +0 -212
- package/dist/active-citizen/engine/reports/add_points_to_sheet.cjs +0 -83
- package/dist/active-citizen/engine/reports/commonUtils.js +0 -75
- package/dist/active-citizen/engine/reports/common_utils.cjs +0 -740
- package/dist/active-citizen/engine/reports/docx_group_report.cjs +0 -596
- package/dist/active-citizen/engine/reports/xlsAllOurIdeasExport.js +0 -232
- package/dist/active-citizen/engine/reports/xls_community_users_report.cjs +0 -277
- package/dist/active-citizen/engine/reports/xls_group_report.cjs +0 -718
- package/dist/active-citizen/llms/baseChatBot.js +0 -183
- package/dist/active-citizen/llms/imageGeneration/chatGptImageGenerator.js +0 -56
- package/dist/active-citizen/llms/imageGeneration/collectionImageGenerator.js +0 -109
- package/dist/active-citizen/llms/imageGeneration/dalleImageGenerator.js +0 -84
- package/dist/active-citizen/llms/imageGeneration/fluxImageGenerator.js +0 -49
- package/dist/active-citizen/llms/imageGeneration/iImageGenerator.js +0 -1
- package/dist/active-citizen/llms/imageGeneration/imageProcessorService.js +0 -64
- package/dist/active-citizen/llms/imageGeneration/imagenImageGenerator.js +0 -107
- package/dist/active-citizen/llms/imageGeneration/s3Service.js +0 -110
- package/dist/active-citizen/llms/llmTranslation.js +0 -472
- package/dist/active-citizen/models/ac_activity.cjs +0 -216
- package/dist/active-citizen/models/ac_background_job.cjs +0 -109
- package/dist/active-citizen/models/ac_campaign.cjs +0 -97
- package/dist/active-citizen/models/ac_client_activity.cjs +0 -23
- package/dist/active-citizen/models/ac_delayed_notification.cjs +0 -43
- package/dist/active-citizen/models/ac_following.cjs +0 -43
- package/dist/active-citizen/models/ac_list.cjs +0 -68
- package/dist/active-citizen/models/ac_list_users.cjs +0 -19
- package/dist/active-citizen/models/ac_mute.cjs +0 -27
- package/dist/active-citizen/models/ac_news_feed_item.cjs +0 -57
- package/dist/active-citizen/models/ac_news_feed_processed_range.cjs +0 -59
- package/dist/active-citizen/models/ac_notification.cjs +0 -292
- package/dist/active-citizen/models/ac_translation_cache.cjs +0 -750
- package/dist/active-citizen/models/ac_watching.cjs +0 -31
- package/dist/active-citizen/scripts/analytics/setup_all_plausible_goals.cjs +0 -13
- package/dist/active-citizen/scripts/fix_old_delayed_notifications.js +0 -63
- package/dist/active-citizen/scripts/kue_status.js +0 -31
- package/dist/active-citizen/scripts/kue_watch_stuck_jobs.js +0 -24
- package/dist/active-citizen/scripts/translation_clear_language.js +0 -117
- package/dist/active-citizen/scripts/translation_delete.js +0 -27
- package/dist/active-citizen/scripts/translation_replace_text_from_url.js +0 -180
- package/dist/active-citizen/scripts/translation_update.js +0 -28
- package/dist/active-citizen/scripts/translations_list.js +0 -27
- package/dist/active-citizen/utils/airbrake.cjs +0 -17
- package/dist/active-citizen/utils/get_anonymous_system_user.cjs +0 -21
- package/dist/active-citizen/utils/i18n.cjs +0 -3
- package/dist/active-citizen/utils/logger.cjs +0 -25
- package/dist/active-citizen/utils/redisConnection.cjs +0 -29
- package/dist/active-citizen/utils/to_json.cjs +0 -9
- package/dist/active-citizen/utils/translation_cloning.cjs +0 -171
- package/dist/active-citizen/utils/translation_helpers.cjs +0 -534
- package/dist/active-citizen/utils/truncate_text.cjs +0 -21
- package/dist/active-citizen/utils/updateAllLocalesFromEn.js +0 -253
- package/dist/active-citizen/utils/updateLocaleFolders.js +0 -34
- package/dist/active-citizen/workers/activity.cjs +0 -189
- package/dist/active-citizen/workers/anonymizations.cjs +0 -734
- package/dist/active-citizen/workers/bulk_status_update.cjs +0 -458
- package/dist/active-citizen/workers/delayed_jobs.cjs +0 -244
- package/dist/active-citizen/workers/deletions.cjs +0 -1911
- package/dist/active-citizen/workers/email.cjs +0 -9
- package/dist/active-citizen/workers/fraud_management.cjs +0 -109
- package/dist/active-citizen/workers/generativeAi.js +0 -56
- package/dist/active-citizen/workers/main.cjs +0 -89
- package/dist/active-citizen/workers/marketing.cjs +0 -25
- package/dist/active-citizen/workers/moderation.cjs +0 -73
- package/dist/active-citizen/workers/notification_delivery.cjs +0 -368
- package/dist/active-citizen/workers/notification_news_feed.cjs +0 -142
- package/dist/active-citizen/workers/queue.cjs +0 -99
- package/dist/active-citizen/workers/recount.cjs +0 -74
- package/dist/active-citizen/workers/reports.cjs +0 -42
- package/dist/active-citizen/workers/similarities.cjs +0 -21
- package/dist/active-citizen/workers/speech_to_text.cjs +0 -482
- package/dist/agents/assistants/agentAssistant.js +0 -88
- package/dist/agents/assistants/baseAssistant.js +0 -888
- package/dist/agents/assistants/baseAssistantWithVoice.js +0 -150
- package/dist/agents/assistants/modes/agentDirectConnection.js +0 -84
- package/dist/agents/assistants/modes/agentSelectionMode.js +0 -44
- package/dist/agents/assistants/modes/baseAssistantMode.js +0 -54
- package/dist/agents/assistants/modes/tools/agentTools.js +0 -447
- package/dist/agents/assistants/modes/tools/baseTools.js +0 -58
- package/dist/agents/assistants/modes/tools/loginTools.js +0 -156
- package/dist/agents/assistants/modes/tools/models/agents.js +0 -146
- package/dist/agents/assistants/modes/tools/models/subscriptions.js +0 -332
- package/dist/agents/assistants/modes/tools/models/users.js +0 -11
- package/dist/agents/assistants/modes/tools/navigationTools.js +0 -166
- package/dist/agents/assistants/modes/tools/subscriptionTools.js +0 -323
- package/dist/agents/assistants/modes/tools/workflowConverstationTools.js +0 -112
- package/dist/agents/assistants/voiceAssistant.js +0 -619
- package/dist/agents/controllers/agentProductController.js +0 -103
- package/dist/agents/controllers/agentSubscriptionController.js +0 -261
- package/dist/agents/controllers/assistantsController.js +0 -511
- package/dist/agents/controllers/policySynthAgents.js +0 -395
- package/dist/agents/managers/agentProductManager.js +0 -91
- package/dist/agents/managers/emailInvitesManager.js +0 -55
- package/dist/agents/managers/emailTemplateRenderer.js +0 -362
- package/dist/agents/managers/newAiModelSetup.js +0 -650
- package/dist/agents/managers/notificationAgentQueueManager.js +0 -510
- package/dist/agents/managers/subscriptionManager.js +0 -535
- package/dist/agents/managers/workflowConversationManager.js +0 -79
- package/dist/agents/models/agentProduct.js +0 -116
- package/dist/agents/models/agentProductBoosterPurchase.js +0 -58
- package/dist/agents/models/agentProductBundle.js +0 -68
- package/dist/agents/models/agentProductRun.js +0 -52
- package/dist/agents/models/discount.js +0 -88
- package/dist/agents/models/subscription.js +0 -79
- package/dist/agents/models/subscriptionPlan.js +0 -46
- package/dist/agents/models/subscriptionUser.js +0 -27
- package/dist/agents/models/testData/createEvolyAgentProduct.js +0 -477
- package/dist/agents/models/testData/old/updateAgentWorkflowConfiguration.js +0 -230
- package/dist/agents/models/testData/setupEvolyAgentProductConfig.js +0 -233
- package/dist/agents/models/testData/updateAgentWorkflowConfiguration.js +0 -230
- package/dist/agents/models/workflowConversation.js +0 -53
- package/dist/agents/tools/setTemplateWorkflowCommunityId.js +0 -46
- package/dist/app.js +0 -943
- package/dist/authorization.cjs +0 -1860
- package/dist/bot_control.js +0 -1930
- package/dist/config/config.cjs +0 -14
- package/dist/config/config.js +0 -14
- package/dist/controllers/allOurIdeas.js +0 -696
- package/dist/controllers/audios.cjs +0 -100
- package/dist/controllers/bulkStatusUpdates.cjs +0 -202
- package/dist/controllers/categories.cjs +0 -199
- package/dist/controllers/communities.cjs +0 -2996
- package/dist/controllers/domains.cjs +0 -1341
- package/dist/controllers/externalIds.cjs +0 -223
- package/dist/controllers/groups.cjs +0 -4309
- package/dist/controllers/images.cjs +0 -499
- package/dist/controllers/index.cjs +0 -449
- package/dist/controllers/legacyPages.cjs +0 -35
- package/dist/controllers/legacyPosts.cjs +0 -56
- package/dist/controllers/legacyUsers.cjs +0 -36
- package/dist/controllers/nonSpa.cjs +0 -574
- package/dist/controllers/organizations.cjs +0 -250
- package/dist/controllers/points.cjs +0 -1137
- package/dist/controllers/posts.cjs +0 -2036
- package/dist/controllers/ratings.cjs +0 -234
- package/dist/controllers/users.cjs +0 -2255
- package/dist/controllers/videos.cjs +0 -226
- package/dist/deleteUnwantedDeclerations.cjs +0 -55
- package/dist/migrations/agentAuditLogs.cjs +0 -46
- package/dist/migrations/agentClasses.cjs +0 -60
- package/dist/migrations/agentConnectorClasses.cjs +0 -61
- package/dist/migrations/agentConnectors.cjs +0 -50
- package/dist/migrations/agentEvals.cjs +0 -45
- package/dist/migrations/agentRegistries.cjs +0 -40
- package/dist/migrations/agents.cjs +0 -54
- package/dist/migrations/aiModels.cjs +0 -49
- package/dist/migrations/apiUsage.cjs +0 -47
- package/dist/migrations/apis.cjs +0 -49
- package/dist/migrations/groupPrivateData.cjs +0 -30
- package/dist/migrations/modelUsage.cjs +0 -60
- package/dist/migrations/oldMigrations/2019/20181030020612-AddActivitiesIndex.js +0 -23
- package/dist/migrations/oldMigrations/2019/20181102210612-AddFirstVideoFeatures.js +0 -360
- package/dist/migrations/oldMigrations/2019/20181212210612-ModerationFeatures.js +0 -29
- package/dist/migrations/oldMigrations/2019/2019010610612-CommunityFolders.js +0 -43
- package/dist/migrations/oldMigrations/2019/20190117020612-AddMissingIndexes.js +0 -24
- package/dist/migrations/oldMigrations/2019/20190117020612-RemoveUnusedIndexes.js +0 -29
- package/dist/migrations/oldMigrations/2019/20190127020612-RemoveUnusedIndexesPartThree.js +0 -22
- package/dist/migrations/oldMigrations/2019/20190127020612-RemoveUnusedIndexesPartTwo.js +0 -23
- package/dist/migrations/oldMigrations/2019/20190223020612-AddPrivateProfileDataToUsers.js +0 -18
- package/dist/migrations/oldMigrations/2019/20190706210612-AddCustomRatings.js +0 -43
- package/dist/migrations/oldMigrations/2019/20190829210612-AddGeneralStore.js +0 -36
- package/dist/migrations/oldMigrations/2019/20192811210612-AddAcClientActivities.js +0 -41
- package/dist/migrations/oldMigrations/2020/20190527020612-WorkOnIndexes.js +0 -88
- package/dist/migrations/oldMigrations/2020/20200409020612-AddBackgroundJob.js +0 -33
- package/dist/migrations/oldMigrations/2020/20200716210612-AddDataToCollections.js +0 -38
- package/dist/migrations/oldMigrations/2022/20220215100612-AddDataToEndorsements.js +0 -19
- package/dist/migrations/oldMigrations/2022/20220220100612-AddDataForFraudDetection.js +0 -19
- package/dist/migrations/oldMigrations/2022/20220903100612-AddPromotionFeatures.js +0 -127
- package/dist/migrations/oldMigrations/2022/onHold/20200527020612-AddCampaigns.js +0 -68
- package/dist/migrations/oldMigrations/2024/20241304175112-AddMediaSupportForHtmlGroups.cjs +0 -63
- package/dist/migrations/oldMigrations/older/20160511172514-AddNotificationFeatures.js +0 -14
- package/dist/migrations/oldMigrations/older/20161030020612-AddBulkStatusUpdate.js +0 -71
- package/dist/migrations/oldMigrations/older/20170514035258-add-metadata-to-invites.js +0 -12
- package/dist/migrations/oldMigrations/older/20180216020612-AddTranslationCaches.js +0 -46
- package/dist/migrations/oldMigrations/older/20180218210612-AddTranslationAndLanguages.js +0 -46
- package/dist/migrations/privateAccessStore.cjs +0 -55
- package/dist/migrations/zzz_associations.cjs +0 -154
- package/dist/migrations/zzzz_createUsersAndAdminsForClasses.cjs +0 -100
- package/dist/migrations/zzzzz_create_agent_runs.cjs +0 -606
- package/dist/migrations/zzzzzz_create_agent_runs_fix.cjs +0 -11
- package/dist/migrations/zzzzzzz_create_trees.cjs +0 -81
- package/dist/models/audio.cjs +0 -430
- package/dist/models/bulk_status_update.cjs +0 -58
- package/dist/models/campaign.cjs +0 -78
- package/dist/models/category.cjs +0 -94
- package/dist/models/community.cjs +0 -337
- package/dist/models/domain.cjs +0 -486
- package/dist/models/endorsement.cjs +0 -39
- package/dist/models/general_data_store.cjs +0 -20
- package/dist/models/group.cjs +0 -728
- package/dist/models/image.cjs +0 -579
- package/dist/models/index.cjs +0 -186
- package/dist/models/invite.cjs +0 -48
- package/dist/models/iso_country.cjs +0 -16
- package/dist/models/organization.cjs +0 -122
- package/dist/models/page.cjs +0 -273
- package/dist/models/point.cjs +0 -622
- package/dist/models/point_quality.cjs +0 -39
- package/dist/models/point_revision.cjs +0 -47
- package/dist/models/post.cjs +0 -680
- package/dist/models/post_revision.cjs +0 -38
- package/dist/models/post_status_change.cjs +0 -35
- package/dist/models/promotion.cjs +0 -34
- package/dist/models/rating.cjs +0 -51
- package/dist/models/relationship.cjs +0 -19
- package/dist/models/request_to_join.cjs +0 -20
- package/dist/models/user.cjs +0 -604
- package/dist/models/user_legacy_password.cjs +0 -13
- package/dist/models/video.cjs +0 -1137
- package/dist/publish.js +0 -40
- package/dist/repack.js +0 -53
- package/dist/scripts/addRatingUsersToGroup.js +0 -51
- package/dist/scripts/addUserToOrganization.js +0 -71
- package/dist/scripts/analyseRatingsForCommunity.js +0 -150
- package/dist/scripts/analyzeAndFixBrokenPointUsers.js +0 -28
- package/dist/scripts/analyzeEndorsementsByCountry.js +0 -70
- package/dist/scripts/analyzePostsForCommunity.js +0 -185
- package/dist/scripts/bulkStatusUpdates/listUpdates.js +0 -14
- package/dist/scripts/bulkStatusUpdates/mergeLatestPostsToUpdate.js +0 -110
- package/dist/scripts/bulkStatusUpdates/performUpdate.js +0 -116
- package/dist/scripts/bulkStatusUpdates/performUpdateForGroup.cjs +0 -124
- package/dist/scripts/bulkStatusUpdates/performUpdateForStatus.js +0 -141
- package/dist/scripts/change/changeVideoAspectTo.js +0 -34
- package/dist/scripts/change/setUseNewVersion.cjs +0 -22
- package/dist/scripts/changeCommunityGroupcount.js +0 -30
- package/dist/scripts/changeCommunityPostCount.js +0 -30
- package/dist/scripts/changeGroupPostCount.js +0 -30
- package/dist/scripts/changeLanguage.js +0 -50
- package/dist/scripts/changeOfficalStatus.js +0 -30
- package/dist/scripts/cleanups/deleteAnonNotifications.cjs +0 -91
- package/dist/scripts/cleanups/deleteLinkGroupsWithDeletedCommunities.js +0 -62
- package/dist/scripts/cleanups/deleteYearOldNotifications.cjs +0 -72
- package/dist/scripts/cleanups/removeAllUsersFromHiddenPublicGroup.js +0 -43
- package/dist/scripts/clearAllEndorsementInGroup.js +0 -50
- package/dist/scripts/cloning/clearUsersForCommunitiesFromUrl.js +0 -129
- package/dist/scripts/cloning/cloneFromUrlScript.js +0 -65
- package/dist/scripts/cloning/cloneWBFromUrlScriptAndCreateLinks.js +0 -140
- package/dist/scripts/cloning/cloneWBFromUrlScriptNoUsersOrPoints.js +0 -140
- package/dist/scripts/cloning/cloneWBSerbianFromUrlScriptAndCreateLinks.js +0 -131
- package/dist/scripts/cloning/copyCommunityConfigAndTranslationsFromURL.js +0 -173
- package/dist/scripts/cloning/copyCommunityOneGroupToDomainNoUsersNoEndorsements.js +0 -18
- package/dist/scripts/cloning/copyCommunityToDomainNoUsersNoEndorsements.js +0 -17
- package/dist/scripts/cloning/copyCommunityToDomainWithEverything.js +0 -17
- package/dist/scripts/cloning/copyCommunityToDomainWithOnlyGroups.js +0 -26
- package/dist/scripts/cloning/copyGroupConfigAndTranslationsFromURL.js +0 -205
- package/dist/scripts/cloning/copyPostToGroupOld.js +0 -397
- package/dist/scripts/cloning/copyPostVideosFromURL.js +0 -236
- package/dist/scripts/cloning/copyPostWithOutAnyVotingOrActivities.js +0 -17
- package/dist/scripts/cloning/deepCloneSerbianWBFromUrlScriptAndCreateLinks.js +0 -131
- package/dist/scripts/cloning/deepCloneWBFromUrlScriptAndCreateLinks.js +0 -139
- package/dist/scripts/cloning/setAdminsFromURL.js +0 -161
- package/dist/scripts/cloning/setExternalIdsFromURL.js +0 -129
- package/dist/scripts/countCommunity.js +0 -291
- package/dist/scripts/countCommunityUsers.js +0 -152
- package/dist/scripts/countDelayedNotifications.js +0 -18
- package/dist/scripts/countGroup.js +0 -246
- package/dist/scripts/countStuff.js +0 -67
- package/dist/scripts/countUniqueVotersInAGroup.js +0 -48
- package/dist/scripts/createInvitesAndShow.js +0 -75
- package/dist/scripts/database/sync_database.js +0 -14
- package/dist/scripts/database/sync_dev_database.js +0 -17
- package/dist/scripts/debugNotifications.js +0 -58
- package/dist/scripts/deleteAllNewsFeeds.js +0 -10
- package/dist/scripts/deleteCategory.js +0 -13
- package/dist/scripts/deleteOldAppActivities.js +0 -40
- package/dist/scripts/deletePostContactDataForCommunity.js +0 -53
- package/dist/scripts/destroy/destroy_all_but_one_domain.js +0 -1026
- package/dist/scripts/displayAuthorForPost.js +0 -16
- package/dist/scripts/endorsementFraudDetection/analyseEndorsementsForCommunity.js +0 -183
- package/dist/scripts/endorsementFraudDetection/bulkDeleteDuplicateEndorsmentsFromUrl.js +0 -208
- package/dist/scripts/exportAllStatusChanges.js +0 -36
- package/dist/scripts/exportClientAcitivity.js +0 -36
- package/dist/scripts/exportEndorsementsForCommunity.js +0 -79
- package/dist/scripts/exportPointQualitiesForCommunity.js +0 -84
- package/dist/scripts/exportPostsAndPointsForCommunity.js +0 -147
- package/dist/scripts/exportPostsDataSetForDomain.js +0 -244
- package/dist/scripts/exportPostsForGroup.js +0 -173
- package/dist/scripts/exportRatingsForPost.js +0 -15
- package/dist/scripts/exportUserEndorsementsWithUserAnalysis.js +0 -123
- package/dist/scripts/exportUsersForCommunity.js +0 -24
- package/dist/scripts/exportUsersForDomain.js +0 -24
- package/dist/scripts/exportUsersForGroup.js +0 -24
- package/dist/scripts/exports/ratingDistribution.js +0 -71
- package/dist/scripts/exports/whoEndorsedWhatByCommunity.js +0 -56
- package/dist/scripts/findUnusedClientImports.js +0 -56
- package/dist/scripts/fixAllPostPointCounts.js +0 -22
- package/dist/scripts/fixAnonNotificationsSettings.js +0 -48
- package/dist/scripts/fixCountKopavogur.js +0 -9
- package/dist/scripts/fixEndorsementsAfterCopyPostToGroup.js +0 -190
- package/dist/scripts/fixExternalUserId.js +0 -24
- package/dist/scripts/fixGroupAccess.js +0 -16
- package/dist/scripts/fixGroupIdeasAndPointsCount.js +0 -49
- package/dist/scripts/fixNotificationSettings.js +0 -39
- package/dist/scripts/fixSurveyRadioBakedInSubCodes.js +0 -64
- package/dist/scripts/fixWrongUserIdForStatusUpdates.js +0 -49
- package/dist/scripts/gallery/exportGalleryData.js +0 -40
- package/dist/scripts/gallery/importGalleryForCommunity.js +0 -168
- package/dist/scripts/gallery/readJsonAndDownloadImagesVersion2.js +0 -55
- package/dist/scripts/gallery/refreshAcApiPostIdsForCommunity.js +0 -58
- package/dist/scripts/genderAnalysis.js +0 -63
- package/dist/scripts/genderAnalysisByStatus.js +0 -62
- package/dist/scripts/importAllLocalesFromLocalFolders.js +0 -55
- package/dist/scripts/importDomain.js +0 -1652
- package/dist/scripts/keys/addOidcToDomain.cjs +0 -61
- package/dist/scripts/landUseGame/export3Ddata.js +0 -162
- package/dist/scripts/listLanguagesForGroup.js +0 -54
- package/dist/scripts/loadTestCreateDummyContentForGroup.js +0 -27
- package/dist/scripts/makeRecursiveMapData.js +0 -103
- package/dist/scripts/mapping/community_map_csv.js +0 -145
- package/dist/scripts/moveCommunityToDomain.js +0 -22
- package/dist/scripts/moveGroupToCommunity.js +0 -23
- package/dist/scripts/movePostToGroup.js +0 -101
- package/dist/scripts/movePostsToGroupsRecountGroupFromUrl.js +0 -297
- package/dist/scripts/oldMovePostToGroup.js +0 -153
- package/dist/scripts/processCsvForPdfUrls.js +0 -37
- package/dist/scripts/processCsvForTranslationAndToxicity.js +0 -125
- package/dist/scripts/recount/recount_recursive_communities.js +0 -125
- package/dist/scripts/recountALLCommunityGroupCounts.js +0 -37
- package/dist/scripts/recountAll.js +0 -97
- package/dist/scripts/recountCommunitesFromUrl.js +0 -58
- package/dist/scripts/recountCommunity.js +0 -19
- package/dist/scripts/recountGroup.js +0 -218
- package/dist/scripts/recountGroupNoUserChange.js +0 -219
- package/dist/scripts/resetAllEndorsementsForGroup.js +0 -57
- package/dist/scripts/resetEnTranslationForGroup.js +0 -45
- package/dist/scripts/setAdminOnAll.cjs +0 -107
- package/dist/scripts/setDomainAdmin.cjs +0 -43
- package/dist/scripts/setDomainLocales.js +0 -33
- package/dist/scripts/setEarlQuestionIdOnGroup.cjs +0 -29
- package/dist/scripts/setLanguageOnGroupCommunitesFromUrl.js +0 -86
- package/dist/scripts/setMemberOfAll.js +0 -101
- package/dist/scripts/setNewUserForContentOfCommunity.js +0 -189
- package/dist/scripts/setOfficialStatusOnAllPostsForCommunity.js +0 -35
- package/dist/scripts/setUserOnAll.js +0 -101
- package/dist/scripts/showCategoryForGroup.js +0 -18
- package/dist/scripts/showOldActivityTypes.js +0 -14
- package/dist/scripts/showPostsMissingCategoryForGroup.js +0 -17
- package/dist/scripts/showStatuses.js +0 -17
- package/dist/scripts/showUniqueVotersInCommunity.js +0 -61
- package/dist/scripts/showUserAgentsAndIpsForEmails.js +0 -66
- package/dist/scripts/simpleExportForGroupsForCommunity.js +0 -46
- package/dist/scripts/simpleExportForPointsForCommunity.js +0 -82
- package/dist/scripts/simpleExportForPostsForCommunity.js +0 -61
- package/dist/scripts/testForEndorsments.js +0 -21
- package/dist/scripts/undeleteGroupAndAllContent.js +0 -151
- package/dist/scripts/undeletePost.js +0 -135
- package/dist/scripts/unlinkSsn.js +0 -23
- package/dist/scripts/updateFromAlthingi.js +0 -303
- package/dist/server.js +0 -3
- package/dist/utils/airbrake.cjs +0 -17
- package/dist/utils/cjsCodeReview.js +0 -99
- package/dist/utils/community_mapping_tools.cjs +0 -124
- package/dist/utils/copy_utils.cjs +0 -1399
- package/dist/utils/docx_utils.cjs +0 -464
- package/dist/utils/export_utils.cjs +0 -491
- package/dist/utils/i18n.cjs +0 -17
- package/dist/utils/is_valid_db_id.cjs +0 -28
- package/dist/utils/logger.cjs +0 -25
- package/dist/utils/loggerTs.js +0 -26
- package/dist/utils/manifest_generator.cjs +0 -104
- package/dist/utils/parse_domain.cjs +0 -16
- package/dist/utils/recount_utils.cjs +0 -415
- package/dist/utils/sharing_parameters.cjs +0 -111
- package/dist/utils/sitemap_generator.cjs +0 -286
- package/dist/utils/to_json.cjs +0 -14
- package/dist/utils/ypLanguages.js +0 -747
- package/dist/webSockets.js +0 -77
|
@@ -1,29 +0,0 @@
|
|
|
1
|
-
'use strict';
|
|
2
|
-
module.exports = {
|
|
3
|
-
up: async (queryInterface, Sequelize) => {
|
|
4
|
-
return [
|
|
5
|
-
await queryInterface.removeIndex('ac_activities', 'activity_active_by_type_and_user_id'),
|
|
6
|
-
await queryInterface.removeIndex('ac_activities', 'ac_activities_type_user_id_created_at_id'),
|
|
7
|
-
await queryInterface.removeIndex('ac_activities', 'ac_activities_type_user_id'),
|
|
8
|
-
await queryInterface.removeIndex('ac_activities', 'ac_activities_post_id_user_id'),
|
|
9
|
-
await queryInterface.removeIndex('ac_activities', 'ac_activities_group_id_user_id_created_at_id'),
|
|
10
|
-
await queryInterface.removeIndex('ac_activities', 'ac_activities_group_id_user_id'),
|
|
11
|
-
await queryInterface.removeIndex('ac_activities', 'ac_activities_domain_id_user_id_created_at_id'),
|
|
12
|
-
await queryInterface.removeIndex('ac_activities', 'ac_activities_domain_id_user_id_created_at'),
|
|
13
|
-
await queryInterface.removeIndex('ac_activities', 'ac_activities_domain_id_user_id'),
|
|
14
|
-
await queryInterface.removeIndex('ac_activities', 'ac_activities_community_id_user_id_created_at_id'),
|
|
15
|
-
await queryInterface.removeIndex('ac_activities', 'ac_activities_community_id_user_id'),
|
|
16
|
-
await queryInterface.removeIndex('ac_activities', 'ac_activities_type_user_id_created_at_id')
|
|
17
|
-
];
|
|
18
|
-
},
|
|
19
|
-
down: function (queryInterface, Sequelize) {
|
|
20
|
-
/*
|
|
21
|
-
Add reverting commands here.
|
|
22
|
-
Return a promise to correctly handle asynchronicity.
|
|
23
|
-
|
|
24
|
-
Example:
|
|
25
|
-
return queryInterface.dropTable('users');
|
|
26
|
-
*/
|
|
27
|
-
}
|
|
28
|
-
};
|
|
29
|
-
export {};
|
|
@@ -1,22 +0,0 @@
|
|
|
1
|
-
'use strict';
|
|
2
|
-
module.exports = {
|
|
3
|
-
up: async (queryInterface, Sequelize) => {
|
|
4
|
-
return [
|
|
5
|
-
await queryInterface.removeIndex('ac_activities', 'ac_activities_context'),
|
|
6
|
-
await queryInterface.removeIndex('ac_activities', 'ac_activities_object'),
|
|
7
|
-
await queryInterface.removeIndex('ac_activities', 'ac_activities_target'),
|
|
8
|
-
await queryInterface.removeIndex('ac_activities', 'ac_activities_actor'),
|
|
9
|
-
await queryInterface.removeIndex('ac_activities', 'ac_activities_user_interaction_profile'),
|
|
10
|
-
];
|
|
11
|
-
},
|
|
12
|
-
down: function (queryInterface, Sequelize) {
|
|
13
|
-
/*
|
|
14
|
-
Add reverting commands here.
|
|
15
|
-
Return a promise to correctly handle asynchronicity.
|
|
16
|
-
|
|
17
|
-
Example:
|
|
18
|
-
return queryInterface.dropTable('users');
|
|
19
|
-
*/
|
|
20
|
-
}
|
|
21
|
-
};
|
|
22
|
-
export {};
|
|
@@ -1,23 +0,0 @@
|
|
|
1
|
-
'use strict';
|
|
2
|
-
module.exports = {
|
|
3
|
-
up: async (queryInterface, Sequelize) => {
|
|
4
|
-
return [
|
|
5
|
-
await queryInterface.removeIndex('ac_activities', 'activity_active_by_domain_id'),
|
|
6
|
-
await queryInterface.removeIndex('ac_activities', 'activity_active_by_user_id'),
|
|
7
|
-
await queryInterface.removeIndex('ac_activities', 'ac_activities_type_user_id_created_at'),
|
|
8
|
-
await queryInterface.removeIndex('ac_activities', 'ac_activities_post_id_user_id_created_at_id'),
|
|
9
|
-
await queryInterface.removeIndex('ac_activities', 'ac_activities_group_id_user_id_created_at'),
|
|
10
|
-
await queryInterface.removeIndex('ac_activities', 'ac_activities_community_id_user_id_created_at')
|
|
11
|
-
];
|
|
12
|
-
},
|
|
13
|
-
down: function (queryInterface, Sequelize) {
|
|
14
|
-
/*
|
|
15
|
-
Add reverting commands here.
|
|
16
|
-
Return a promise to correctly handle asynchronicity.
|
|
17
|
-
|
|
18
|
-
Example:
|
|
19
|
-
return queryInterface.dropTable('users');
|
|
20
|
-
*/
|
|
21
|
-
}
|
|
22
|
-
};
|
|
23
|
-
export {};
|
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
'use strict';
|
|
2
|
-
module.exports = {
|
|
3
|
-
up: async (queryInterface, Sequelize) => {
|
|
4
|
-
return [
|
|
5
|
-
await queryInterface.addColumn('users', 'private_profile_data', { type: Sequelize.JSONB, allowNull: true }),
|
|
6
|
-
];
|
|
7
|
-
},
|
|
8
|
-
down: function (queryInterface, Sequelize) {
|
|
9
|
-
/*
|
|
10
|
-
Add reverting commands here.
|
|
11
|
-
Return a promise to correctly handle asynchronicity.
|
|
12
|
-
|
|
13
|
-
Example:
|
|
14
|
-
return queryInterface.dropTable('users');
|
|
15
|
-
*/
|
|
16
|
-
}
|
|
17
|
-
};
|
|
18
|
-
export {};
|
|
@@ -1,43 +0,0 @@
|
|
|
1
|
-
'use strict';
|
|
2
|
-
module.exports = {
|
|
3
|
-
up: async (queryInterface, Sequelize) => {
|
|
4
|
-
return [
|
|
5
|
-
await queryInterface.createTable('ratings', {
|
|
6
|
-
id: {
|
|
7
|
-
type: Sequelize.INTEGER,
|
|
8
|
-
primaryKey: true,
|
|
9
|
-
autoIncrement: true
|
|
10
|
-
},
|
|
11
|
-
created_at: {
|
|
12
|
-
type: Sequelize.DATE
|
|
13
|
-
},
|
|
14
|
-
updated_at: {
|
|
15
|
-
type: Sequelize.DATE
|
|
16
|
-
},
|
|
17
|
-
value: { type: Sequelize.INTEGER, allowNull: false },
|
|
18
|
-
post_id: { type: Sequelize.INTEGER, allowNull: true },
|
|
19
|
-
point_id: { type: Sequelize.INTEGER, allowNull: true },
|
|
20
|
-
user_id: { type: Sequelize.INTEGER, allowNull: true },
|
|
21
|
-
type_index: { type: Sequelize.INTEGER, allowNull: false },
|
|
22
|
-
ip_address: { type: Sequelize.STRING, allowNull: false },
|
|
23
|
-
user_agent: { type: Sequelize.TEXT, allowNull: false },
|
|
24
|
-
deleted: { type: Sequelize.BOOLEAN, allowNull: false, defaultValue: false }
|
|
25
|
-
}),
|
|
26
|
-
await queryInterface.addIndex('ratings', ['post_id', 'deleted']),
|
|
27
|
-
await queryInterface.addIndex('ratings', ['post_id', 'user_id', 'deleted']),
|
|
28
|
-
await queryInterface.addIndex('ratings', ['point_id', 'deleted']),
|
|
29
|
-
await queryInterface.addIndex('ratings', ['point_id', 'user_id', 'deleted']),
|
|
30
|
-
await queryInterface.addIndex('ratings', ['user_id', 'deleted'])
|
|
31
|
-
];
|
|
32
|
-
},
|
|
33
|
-
down: function (queryInterface, Sequelize) {
|
|
34
|
-
/*
|
|
35
|
-
Add reverting commands here.
|
|
36
|
-
Return a promise to correctly handle asynchronicity.
|
|
37
|
-
|
|
38
|
-
Example:
|
|
39
|
-
return queryInterface.dropTable('users');
|
|
40
|
-
*/
|
|
41
|
-
}
|
|
42
|
-
};
|
|
43
|
-
export {};
|
|
@@ -1,36 +0,0 @@
|
|
|
1
|
-
'use strict';
|
|
2
|
-
module.exports = {
|
|
3
|
-
up: async (queryInterface, Sequelize) => {
|
|
4
|
-
return [
|
|
5
|
-
await queryInterface.createTable('general_data_store', {
|
|
6
|
-
id: {
|
|
7
|
-
type: Sequelize.INTEGER,
|
|
8
|
-
primaryKey: true,
|
|
9
|
-
autoIncrement: true
|
|
10
|
-
},
|
|
11
|
-
created_at: {
|
|
12
|
-
type: Sequelize.DATE
|
|
13
|
-
},
|
|
14
|
-
updated_at: {
|
|
15
|
-
type: Sequelize.DATE
|
|
16
|
-
},
|
|
17
|
-
data: { type: Sequelize.JSONB, allowNull: false }
|
|
18
|
-
}),
|
|
19
|
-
await queryInterface.addIndex('general_data_store', {
|
|
20
|
-
fields: ['data'],
|
|
21
|
-
using: 'gin',
|
|
22
|
-
operator: 'jsonb_path_ops'
|
|
23
|
-
})
|
|
24
|
-
];
|
|
25
|
-
},
|
|
26
|
-
down: function (queryInterface, Sequelize) {
|
|
27
|
-
/*
|
|
28
|
-
Add reverting commands here.
|
|
29
|
-
Return a promise to correctly handle asynchronicity.
|
|
30
|
-
|
|
31
|
-
Example:
|
|
32
|
-
return queryInterface.dropTable('users');
|
|
33
|
-
*/
|
|
34
|
-
}
|
|
35
|
-
};
|
|
36
|
-
export {};
|
|
@@ -1,41 +0,0 @@
|
|
|
1
|
-
'use strict';
|
|
2
|
-
module.exports = {
|
|
3
|
-
up: async (queryInterface, Sequelize) => {
|
|
4
|
-
return [
|
|
5
|
-
await queryInterface.createTable('ac_client_activities', {
|
|
6
|
-
id: {
|
|
7
|
-
type: Sequelize.INTEGER,
|
|
8
|
-
primaryKey: true,
|
|
9
|
-
autoIncrement: true
|
|
10
|
-
},
|
|
11
|
-
created_at: {
|
|
12
|
-
type: Sequelize.DATE
|
|
13
|
-
},
|
|
14
|
-
updated_at: {
|
|
15
|
-
type: Sequelize.DATE
|
|
16
|
-
},
|
|
17
|
-
type: { type: Sequelize.STRING, allowNull: false },
|
|
18
|
-
sub_type: { type: Sequelize.STRING, allowNull: true },
|
|
19
|
-
domain_id: { type: Sequelize.INTEGER, allowNull: true },
|
|
20
|
-
community_id: { type: Sequelize.INTEGER, allowNull: true },
|
|
21
|
-
group_id: { type: Sequelize.INTEGER, allowNull: true },
|
|
22
|
-
user_id: { type: Sequelize.INTEGER, allowNull: true },
|
|
23
|
-
post_id: { type: Sequelize.INTEGER, allowNull: true },
|
|
24
|
-
object: Sequelize.JSONB,
|
|
25
|
-
actor: Sequelize.JSONB,
|
|
26
|
-
target: Sequelize.JSONB,
|
|
27
|
-
context: Sequelize.JSONB
|
|
28
|
-
})
|
|
29
|
-
];
|
|
30
|
-
},
|
|
31
|
-
down: function (queryInterface, Sequelize) {
|
|
32
|
-
/*
|
|
33
|
-
Add reverting commands here.
|
|
34
|
-
Return a promise to correctly handle asynchronicity.
|
|
35
|
-
|
|
36
|
-
Example:
|
|
37
|
-
return queryInterface.dropTable('users');
|
|
38
|
-
*/
|
|
39
|
-
}
|
|
40
|
-
};
|
|
41
|
-
export {};
|
|
@@ -1,88 +0,0 @@
|
|
|
1
|
-
'use strict';
|
|
2
|
-
module.exports = {
|
|
3
|
-
up: async (queryInterface, Sequelize) => {
|
|
4
|
-
return [
|
|
5
|
-
await queryInterface.sequelize.query(`
|
|
6
|
-
DROP INDEX notification_active_by_type_and_user_id;
|
|
7
|
-
DROP INDEX notification_all_by_type;
|
|
8
|
-
DROP INDEX notification_public_and_active_by_type;
|
|
9
|
-
DROP INDEX notification_active_by_type;
|
|
10
|
-
DROP INDEX notification_active_by_user_id;
|
|
11
|
-
DROP INDEX activity_public_and_active_by_type;
|
|
12
|
-
DROP INDEX activity_public_and_active_by_post_id;
|
|
13
|
-
DROP INDEX activity_public_and_active_by_group_id;
|
|
14
|
-
DROP INDEX activity_public_and_active_by_domain_id;
|
|
15
|
-
DROP INDEX activity_public_and_active_by_community_id;
|
|
16
|
-
|
|
17
|
-
CREATE INDEX ac_activities_idx_post_id_user_id_type_delete_status ON ac_activities (post_id,user_id,type,deleted,status);
|
|
18
|
-
CREATE INDEX ac_notifications_idx_user_id_type_deleted_created_at ON ac_notifications (user_id,type,deleted,created_at);
|
|
19
|
-
CREATE INDEX ac_activities_idx_deleted_status ON ac_activities (deleted,status);
|
|
20
|
-
CREATE INDEX ac_notifications_idx_deleted_id ON ac_notifications (deleted,id);
|
|
21
|
-
|
|
22
|
-
CREATE INDEX audios_idx_deleted ON audios (deleted);
|
|
23
|
-
CREATE INDEX categories_idx_deleted_group_id ON categories (deleted,group_id);
|
|
24
|
-
CREATE INDEX categories_idx_deleted ON categories (deleted);
|
|
25
|
-
CREATE INDEX groups_idx_counter_users ON groups (counter_users);
|
|
26
|
-
CREATE INDEX images_idx_deleted ON images (deleted);
|
|
27
|
-
CREATE INDEX organizations_idx_deleted ON organizations (deleted);
|
|
28
|
-
CREATE INDEX point_qualities_idx_deleted ON point_qualities (deleted);
|
|
29
|
-
CREATE INDEX point_revisions_idx_deleted ON point_revisions (deleted);
|
|
30
|
-
CREATE INDEX point_revisions_idx_deleted_point_id ON point_revisions (deleted,point_id);
|
|
31
|
-
CREATE INDEX post_revisions_idx_deleted ON post_revisions (deleted);
|
|
32
|
-
CREATE INDEX posts_idx_deleted_status_id ON posts (deleted,status,id);
|
|
33
|
-
CREATE INDEX posts_idx_deleted_status ON posts (deleted,status);
|
|
34
|
-
CREATE INDEX users_idx_deleted_status ON users (deleted,status);
|
|
35
|
-
CREATE INDEX videos_idx_deleted ON videos (deleted);
|
|
36
|
-
|
|
37
|
-
CREATE INDEX categoryiconimage_idx_category_id ON "CategoryIconImage" (category_id);
|
|
38
|
-
CREATE INDEX communityheaderimage_idx_community_id ON "CommunityHeaderImage" (community_id);
|
|
39
|
-
CREATE INDEX notification_activit_idx_ac_id ON notification_activities (ac_notification_id);
|
|
40
|
-
CREATE INDEX communitylogoimage_idx_community_id ON "CommunityLogoImage" (community_id);
|
|
41
|
-
CREATE INDEX communitylogovideo_idx_community_id ON "CommunityLogoVideo" (community_id);
|
|
42
|
-
CREATE INDEX groupheaderimage_idx_group_id ON "GroupHeaderImage" (group_id);
|
|
43
|
-
CREATE INDEX grouplogoimage_idx_group_id ON "GroupLogoImage" (group_id);
|
|
44
|
-
CREATE INDEX grouplogovideo_idx_group_id ON "GroupLogoVideo" (group_id);
|
|
45
|
-
CREATE INDEX organizationlogoimag_idx_organization_id ON "OrganizationLogoImage" (organization_id);
|
|
46
|
-
CREATE INDEX organizationuser_idx_user_id ON "OrganizationUser" (user_id);
|
|
47
|
-
CREATE INDEX pointaudio_idx_point_id ON "PointAudio" (point_id);
|
|
48
|
-
CREATE INDEX pointvideo_idx_point_id ON "PointVideo" (point_id);
|
|
49
|
-
CREATE INDEX postaudio_idx_post_id ON "PostAudio" (post_id);
|
|
50
|
-
CREATE INDEX postvideo_idx_post_id ON "PostVideo" (post_id);
|
|
51
|
-
CREATE INDEX userprofileimage_idx_user_id ON "UserProfileImage" (user_id);
|
|
52
|
-
CREATE INDEX postheaderimage_idx_post_id ON "PostHeaderImage" (post_id);
|
|
53
|
-
CREATE INDEX videoimage_idx_video_id ON "VideoImage" (video_id);
|
|
54
|
-
|
|
55
|
-
CREATE INDEX domains_idx_deleted_domain_name ON domains (deleted,domain_name);
|
|
56
|
-
CREATE INDEX communities_idx_deleted_hostname ON communities (deleted,hostname);
|
|
57
|
-
|
|
58
|
-
CREATE INDEX groups_idx_counter_users_community_id_access_deleted ON groups (counter_users,community_id,access,deleted);
|
|
59
|
-
|
|
60
|
-
CREATE INDEX pages_idx_domain_id_published_deleted ON pages (domain_id,published,deleted);
|
|
61
|
-
CREATE INDEX pages_idx_community_id_published_deleted ON pages (community_id,published,deleted);
|
|
62
|
-
CREATE INDEX pages_idx_group_id_published_deleted ON pages (group_id,published,deleted);
|
|
63
|
-
|
|
64
|
-
CREATE INDEX points_idx_counter_sum_post_id_status_value_deleted ON points ((counter_quality_up-counter_quality_down),post_id,value,status,deleted);
|
|
65
|
-
CREATE INDEX points_idx_created_at_post_id_status_deleted ON points (created_at,post_id,status,deleted);
|
|
66
|
-
CREATE INDEX points_idx_deleted_status_id ON points (deleted,status,id);
|
|
67
|
-
CREATE INDEX points_idx_deleted_status ON points (deleted,status);
|
|
68
|
-
|
|
69
|
-
CREATE INDEX posts_idx_counter_sum_group_id_deleted ON posts ((counter_endorsements_up-counter_endorsements_down),group_id,deleted);
|
|
70
|
-
CREATE INDEX posts_idx_counter_sum_group_id_category_id_deleted ON posts ((counter_endorsements_up-counter_endorsements_down),group_id,category_id,deleted);
|
|
71
|
-
CREATE INDEX posts_idx_counter_points_group_id_deleted ON posts (counter_points,group_id,deleted);
|
|
72
|
-
CREATE INDEX posts_idx_created_at_group_id_deleted ON posts (created_at,group_id,deleted);
|
|
73
|
-
|
|
74
|
-
CREATE INDEX communities_idx_domain_id_in_id_deleted_access ON communities (domain_id,in_community_folder_id,deleted,access);
|
|
75
|
-
`),
|
|
76
|
-
];
|
|
77
|
-
},
|
|
78
|
-
down: function (queryInterface, Sequelize) {
|
|
79
|
-
/*
|
|
80
|
-
Add reverting commands here.
|
|
81
|
-
Return a promise to correctly handle asynchronicity.
|
|
82
|
-
|
|
83
|
-
Example:
|
|
84
|
-
return queryInterface.dropTable('users');
|
|
85
|
-
*/
|
|
86
|
-
}
|
|
87
|
-
};
|
|
88
|
-
export {};
|
|
@@ -1,33 +0,0 @@
|
|
|
1
|
-
'use strict';
|
|
2
|
-
module.exports = {
|
|
3
|
-
up: async (queryInterface, Sequelize) => {
|
|
4
|
-
return [
|
|
5
|
-
await queryInterface.createTable('ac_background_jobs', {
|
|
6
|
-
id: {
|
|
7
|
-
type: Sequelize.INTEGER,
|
|
8
|
-
primaryKey: true,
|
|
9
|
-
autoIncrement: true
|
|
10
|
-
},
|
|
11
|
-
created_at: {
|
|
12
|
-
type: Sequelize.DATE
|
|
13
|
-
},
|
|
14
|
-
updated_at: {
|
|
15
|
-
type: Sequelize.DATE
|
|
16
|
-
},
|
|
17
|
-
progress: { type: Sequelize.INTEGER, allowNull: true },
|
|
18
|
-
error: { type: Sequelize.TEXT, allowNull: true },
|
|
19
|
-
data: Sequelize.JSONB
|
|
20
|
-
})
|
|
21
|
-
];
|
|
22
|
-
},
|
|
23
|
-
down: function (queryInterface, Sequelize) {
|
|
24
|
-
/*
|
|
25
|
-
Add reverting commands here.
|
|
26
|
-
Return a promise to correctly handle asynchronicity.
|
|
27
|
-
|
|
28
|
-
Example:
|
|
29
|
-
return queryInterface.dropTable('users');
|
|
30
|
-
*/
|
|
31
|
-
}
|
|
32
|
-
};
|
|
33
|
-
export {};
|
|
@@ -1,38 +0,0 @@
|
|
|
1
|
-
'use strict';
|
|
2
|
-
module.exports = {
|
|
3
|
-
up: async (queryInterface, Sequelize) => {
|
|
4
|
-
return [
|
|
5
|
-
await queryInterface.addColumn('domains', 'data', { type: Sequelize.JSONB, allowNull: true }),
|
|
6
|
-
await queryInterface.addColumn('domains', 'counter_flags', { type: Sequelize.INTEGER, defaultValue: 0 }),
|
|
7
|
-
await queryInterface.addIndex('domains', {
|
|
8
|
-
fields: ['data'],
|
|
9
|
-
using: 'gin',
|
|
10
|
-
operator: 'jsonb_path_ops'
|
|
11
|
-
}),
|
|
12
|
-
await queryInterface.addColumn('communities', 'data', { type: Sequelize.JSONB, allowNull: true }),
|
|
13
|
-
await queryInterface.addColumn('communities', 'counter_flags', { type: Sequelize.INTEGER, defaultValue: 0 }),
|
|
14
|
-
await queryInterface.addIndex('communities', {
|
|
15
|
-
fields: ['data'],
|
|
16
|
-
using: 'gin',
|
|
17
|
-
operator: 'jsonb_path_ops'
|
|
18
|
-
}),
|
|
19
|
-
await queryInterface.addColumn('groups', 'data', { type: Sequelize.JSONB, allowNull: true }),
|
|
20
|
-
await queryInterface.addColumn('groups', 'counter_flags', { type: Sequelize.INTEGER, defaultValue: 0 }),
|
|
21
|
-
await queryInterface.addIndex('groups', {
|
|
22
|
-
fields: ['data'],
|
|
23
|
-
using: 'gin',
|
|
24
|
-
operator: 'jsonb_path_ops'
|
|
25
|
-
}),
|
|
26
|
-
];
|
|
27
|
-
},
|
|
28
|
-
down: function (queryInterface, Sequelize) {
|
|
29
|
-
/*
|
|
30
|
-
Add reverting commands here.
|
|
31
|
-
Return a promise to correctly handle asynchronicity.
|
|
32
|
-
|
|
33
|
-
Example:
|
|
34
|
-
return queryInterface.dropTable('users');
|
|
35
|
-
*/
|
|
36
|
-
}
|
|
37
|
-
};
|
|
38
|
-
export {};
|
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
'use strict';
|
|
2
|
-
module.exports = {
|
|
3
|
-
up: async (queryInterface, Sequelize) => {
|
|
4
|
-
return [
|
|
5
|
-
await queryInterface.addColumn('endorsements', 'data', { type: Sequelize.JSONB, allowNull: true }),
|
|
6
|
-
await queryInterface.addColumn('point_qualities', 'data', { type: Sequelize.JSONB, allowNull: true })
|
|
7
|
-
];
|
|
8
|
-
},
|
|
9
|
-
down: function (queryInterface, Sequelize) {
|
|
10
|
-
/*
|
|
11
|
-
Add reverting commands here.
|
|
12
|
-
Return a promise to correctly handle asynchronicity.
|
|
13
|
-
|
|
14
|
-
Example:
|
|
15
|
-
return queryInterface.dropTable('users');
|
|
16
|
-
*/
|
|
17
|
-
}
|
|
18
|
-
};
|
|
19
|
-
export {};
|
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
'use strict';
|
|
2
|
-
module.exports = {
|
|
3
|
-
up: async (queryInterface, Sequelize) => {
|
|
4
|
-
return [
|
|
5
|
-
await queryInterface.addColumn('ac_background_jobs', 'internal_data', { type: Sequelize.JSONB, allowNull: true }),
|
|
6
|
-
await queryInterface.addColumn('ratings', 'data', { type: Sequelize.JSONB, allowNull: true })
|
|
7
|
-
];
|
|
8
|
-
},
|
|
9
|
-
down: function (queryInterface, Sequelize) {
|
|
10
|
-
/*
|
|
11
|
-
Add reverting commands here.
|
|
12
|
-
Return a promise to correctly handle asynchronicity.
|
|
13
|
-
|
|
14
|
-
Example:
|
|
15
|
-
return queryInterface.dropTable('users');
|
|
16
|
-
*/
|
|
17
|
-
}
|
|
18
|
-
};
|
|
19
|
-
export {};
|
|
@@ -1,127 +0,0 @@
|
|
|
1
|
-
'use strict';
|
|
2
|
-
module.exports = {
|
|
3
|
-
up: async (queryInterface, Sequelize) => {
|
|
4
|
-
return [
|
|
5
|
-
await queryInterface.createTable('campaigns', {
|
|
6
|
-
id: {
|
|
7
|
-
type: Sequelize.INTEGER,
|
|
8
|
-
primaryKey: true,
|
|
9
|
-
autoIncrement: true
|
|
10
|
-
},
|
|
11
|
-
created_at: {
|
|
12
|
-
type: Sequelize.DATE
|
|
13
|
-
},
|
|
14
|
-
updated_at: {
|
|
15
|
-
type: Sequelize.DATE
|
|
16
|
-
},
|
|
17
|
-
configuration: Sequelize.JSONB,
|
|
18
|
-
deleted: { type: Sequelize.BOOLEAN, allowNull: false, defaultValue: false },
|
|
19
|
-
active: { type: Sequelize.BOOLEAN, allowNull: false, defaultValue: true },
|
|
20
|
-
user_id: { type: Sequelize.INTEGER, allowNull: false },
|
|
21
|
-
group_id: { type: Sequelize.INTEGER, allowNull: true },
|
|
22
|
-
community_id: { type: Sequelize.INTEGER, allowNull: true },
|
|
23
|
-
domain_id: { type: Sequelize.INTEGER, allowNull: true },
|
|
24
|
-
post_id: { type: Sequelize.INTEGER, allowNull: true }
|
|
25
|
-
}),
|
|
26
|
-
await queryInterface.addIndex('campaigns', {
|
|
27
|
-
fields: ['configuration'],
|
|
28
|
-
using: 'gin',
|
|
29
|
-
operator: 'jsonb_path_ops'
|
|
30
|
-
}),
|
|
31
|
-
await queryInterface.addIndex('campaigns', {
|
|
32
|
-
fields: ['id', 'user_id', 'deleted'],
|
|
33
|
-
}),
|
|
34
|
-
await queryInterface.addIndex('campaigns', {
|
|
35
|
-
fields: ['id', 'post_id', 'deleted'],
|
|
36
|
-
}),
|
|
37
|
-
await queryInterface.addIndex('campaigns', {
|
|
38
|
-
fields: ['id', 'group_id', 'deleted'],
|
|
39
|
-
}),
|
|
40
|
-
await queryInterface.addIndex('campaigns', {
|
|
41
|
-
fields: ['id', 'community_id', 'deleted'],
|
|
42
|
-
}),
|
|
43
|
-
await queryInterface.addIndex('campaigns', {
|
|
44
|
-
fields: ['id', 'domain_id', 'deleted'],
|
|
45
|
-
}),
|
|
46
|
-
await queryInterface.addIndex('campaigns', {
|
|
47
|
-
fields: ['id', 'user_id', 'deleted', 'active'],
|
|
48
|
-
}),
|
|
49
|
-
await queryInterface.addIndex('campaigns', {
|
|
50
|
-
fields: ['id', 'post_id', 'deleted', 'active'],
|
|
51
|
-
}),
|
|
52
|
-
await queryInterface.addIndex('campaigns', {
|
|
53
|
-
fields: ['id', 'group_id', 'deleted', 'active'],
|
|
54
|
-
}),
|
|
55
|
-
await queryInterface.addIndex('campaigns', {
|
|
56
|
-
fields: ['id', 'community_id', 'deleted', 'active'],
|
|
57
|
-
}),
|
|
58
|
-
await queryInterface.addIndex('campaigns', {
|
|
59
|
-
fields: ['id', 'domain_id', 'deleted', 'active'],
|
|
60
|
-
}),
|
|
61
|
-
await queryInterface.createTable('CommunityPromoter', {
|
|
62
|
-
id: {
|
|
63
|
-
type: Sequelize.INTEGER,
|
|
64
|
-
primaryKey: true,
|
|
65
|
-
autoIncrement: true
|
|
66
|
-
},
|
|
67
|
-
created_at: {
|
|
68
|
-
type: Sequelize.DATE
|
|
69
|
-
},
|
|
70
|
-
updated_at: {
|
|
71
|
-
type: Sequelize.DATE
|
|
72
|
-
},
|
|
73
|
-
user_id: {
|
|
74
|
-
type: Sequelize.INTEGER,
|
|
75
|
-
references: {
|
|
76
|
-
model: 'users',
|
|
77
|
-
key: 'id'
|
|
78
|
-
},
|
|
79
|
-
},
|
|
80
|
-
community_id: {
|
|
81
|
-
type: Sequelize.INTEGER,
|
|
82
|
-
references: {
|
|
83
|
-
model: 'communities',
|
|
84
|
-
key: 'id'
|
|
85
|
-
},
|
|
86
|
-
},
|
|
87
|
-
}),
|
|
88
|
-
await queryInterface.createTable('GroupPromoter', {
|
|
89
|
-
id: {
|
|
90
|
-
type: Sequelize.INTEGER,
|
|
91
|
-
primaryKey: true,
|
|
92
|
-
autoIncrement: true
|
|
93
|
-
},
|
|
94
|
-
created_at: {
|
|
95
|
-
type: Sequelize.DATE
|
|
96
|
-
},
|
|
97
|
-
updated_at: {
|
|
98
|
-
type: Sequelize.DATE
|
|
99
|
-
},
|
|
100
|
-
user_id: {
|
|
101
|
-
type: Sequelize.INTEGER,
|
|
102
|
-
references: {
|
|
103
|
-
model: 'users',
|
|
104
|
-
key: 'id'
|
|
105
|
-
},
|
|
106
|
-
},
|
|
107
|
-
group_id: {
|
|
108
|
-
type: Sequelize.INTEGER,
|
|
109
|
-
references: {
|
|
110
|
-
model: 'groups',
|
|
111
|
-
key: 'id'
|
|
112
|
-
},
|
|
113
|
-
},
|
|
114
|
-
}),
|
|
115
|
-
];
|
|
116
|
-
},
|
|
117
|
-
down: function (queryInterface, Sequelize) {
|
|
118
|
-
/*
|
|
119
|
-
Add reverting commands here.
|
|
120
|
-
Return a promise to correctly handle asynchronicity.
|
|
121
|
-
|
|
122
|
-
Example:
|
|
123
|
-
return queryInterface.dropTable('users');
|
|
124
|
-
*/
|
|
125
|
-
}
|
|
126
|
-
};
|
|
127
|
-
export {};
|
|
@@ -1,68 +0,0 @@
|
|
|
1
|
-
'use strict';
|
|
2
|
-
//TODO: Add indexes
|
|
3
|
-
module.exports = {
|
|
4
|
-
up: async (queryInterface, Sequelize) => {
|
|
5
|
-
return [
|
|
6
|
-
await queryInterface.createTable('ac_lists', {
|
|
7
|
-
id: {
|
|
8
|
-
type: Sequelize.INTEGER,
|
|
9
|
-
primaryKey: true,
|
|
10
|
-
autoIncrement: true
|
|
11
|
-
},
|
|
12
|
-
created_at: {
|
|
13
|
-
type: Sequelize.DATE
|
|
14
|
-
},
|
|
15
|
-
updated_at: {
|
|
16
|
-
type: Sequelize.DATE
|
|
17
|
-
},
|
|
18
|
-
data: Sequelize.JSONB,
|
|
19
|
-
user_id: { type: Sequelize.INTEGER, allowNull: false },
|
|
20
|
-
group_id: { type: Sequelize.INTEGER, allowNull: true },
|
|
21
|
-
community_id: { type: Sequelize.INTEGER, allowNull: true },
|
|
22
|
-
post_id: { type: Sequelize.INTEGER, allowNull: true }
|
|
23
|
-
}),
|
|
24
|
-
await queryInterface.createTable('ac_campaigns', {
|
|
25
|
-
id: {
|
|
26
|
-
type: Sequelize.INTEGER,
|
|
27
|
-
primaryKey: true,
|
|
28
|
-
autoIncrement: true
|
|
29
|
-
},
|
|
30
|
-
created_at: {
|
|
31
|
-
type: Sequelize.DATE
|
|
32
|
-
},
|
|
33
|
-
updated_at: {
|
|
34
|
-
type: Sequelize.DATE
|
|
35
|
-
},
|
|
36
|
-
data: Sequelize.JSONB,
|
|
37
|
-
user_id: { type: Sequelize.INTEGER, allowNull: false },
|
|
38
|
-
ac_list_id: { type: Sequelize.INTEGER, allowNull: false }
|
|
39
|
-
}),
|
|
40
|
-
await queryInterface.createTable('ac_list_users', {
|
|
41
|
-
id: {
|
|
42
|
-
type: Sequelize.INTEGER,
|
|
43
|
-
primaryKey: true,
|
|
44
|
-
autoIncrement: true
|
|
45
|
-
},
|
|
46
|
-
created_at: {
|
|
47
|
-
type: Sequelize.DATE
|
|
48
|
-
},
|
|
49
|
-
updated_at: {
|
|
50
|
-
type: Sequelize.DATE
|
|
51
|
-
},
|
|
52
|
-
data: Sequelize.JSONB,
|
|
53
|
-
user_id: { type: Sequelize.INTEGER, allowNull: true },
|
|
54
|
-
ac_list_id: { type: Sequelize.INTEGER, allowNull: false }
|
|
55
|
-
})
|
|
56
|
-
];
|
|
57
|
-
},
|
|
58
|
-
down: function (queryInterface, Sequelize) {
|
|
59
|
-
/*
|
|
60
|
-
Add reverting commands here.
|
|
61
|
-
Return a promise to correctly handle asynchronicity.
|
|
62
|
-
|
|
63
|
-
Example:
|
|
64
|
-
return queryInterface.dropTable('users');
|
|
65
|
-
*/
|
|
66
|
-
}
|
|
67
|
-
};
|
|
68
|
-
export {};
|