agrs-sequelize-sdk 1.4.37 → 1.4.39
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/models/ApiAuditLog.js +43 -0
- package/models/PublicApiIdempotencyCache.js +117 -0
- package/models/SnapchatPublicProfiles.js +17 -4
- package/package.json +1 -1
- package/.impeccable/hook.cache.json +0 -1
- package/.worktrees/ad-review-status/LICENSE +0 -21
- package/.worktrees/ad-review-status/README.md +0 -179
- package/.worktrees/ad-review-status/index.js +0 -169
- package/.worktrees/ad-review-status/jq.exe +0 -0
- package/.worktrees/ad-review-status/migrations/2026-05-17-PIXELS-FOLLOWUP.md +0 -85
- package/.worktrees/ad-review-status/migrations/2026-05-17-add-platform-to-ad.js +0 -19
- package/.worktrees/ad-review-status/migrations/2026-05-17-add-platform-to-adaccount.js +0 -19
- package/.worktrees/ad-review-status/migrations/2026-05-17-add-platform-to-adperformance.js +0 -19
- package/.worktrees/ad-review-status/migrations/2026-05-17-add-platform-to-adset.js +0 -19
- package/.worktrees/ad-review-status/migrations/2026-05-17-add-platform-to-adsetperformance.js +0 -19
- package/.worktrees/ad-review-status/migrations/2026-05-17-add-platform-to-aiarticleretryqueue.js +0 -19
- package/.worktrees/ad-review-status/migrations/2026-05-17-add-platform-to-aicampaignqueue.js +0 -19
- package/.worktrees/ad-review-status/migrations/2026-05-17-add-platform-to-article.js +0 -19
- package/.worktrees/ad-review-status/migrations/2026-05-17-add-platform-to-campaign.js +0 -19
- package/.worktrees/ad-review-status/migrations/2026-05-17-add-platform-to-codefuelcampaign.js +0 -19
- package/.worktrees/ad-review-status/migrations/2026-05-17-add-platform-to-dynamicfeed.js +0 -19
- package/.worktrees/ad-review-status/migrations/2026-05-17-add-platform-to-facebookretryqueue.js +0 -19
- package/.worktrees/ad-review-status/migrations/2026-05-17-add-platform-to-pages.js +0 -19
- package/.worktrees/ad-review-status/migrations/2026-05-17-add-platform-to-presets.js +0 -19
- package/.worktrees/ad-review-status/migrations/2026-05-18-add-review-status-to-ad.js +0 -36
- package/.worktrees/ad-review-status/migrations/RUN_ME_MANUALLY_2026-05-17.sql +0 -99
- package/.worktrees/ad-review-status/migrations/add-requested-from-dashboard-to-articles.js +0 -17
- package/.worktrees/ad-review-status/migrations/change-adset-name-to-text.js +0 -79
- package/.worktrees/ad-review-status/models/AICampaignQueue.js +0 -144
- package/.worktrees/ad-review-status/models/AIGenerationLog.js +0 -85
- package/.worktrees/ad-review-status/models/AIGenerationRequest.js +0 -212
- package/.worktrees/ad-review-status/models/ActivityHistory.js +0 -73
- package/.worktrees/ad-review-status/models/Ad.js +0 -312
- package/.worktrees/ad-review-status/models/AdAccount.js +0 -97
- package/.worktrees/ad-review-status/models/AdAccountValues.js +0 -26
- package/.worktrees/ad-review-status/models/AdHistory.js +0 -30
- package/.worktrees/ad-review-status/models/AdPerformance.js +0 -100
- package/.worktrees/ad-review-status/models/AdPerformanceHourly.js +0 -71
- package/.worktrees/ad-review-status/models/AdSet.js +0 -295
- package/.worktrees/ad-review-status/models/AdSetHistory.js +0 -30
- package/.worktrees/ad-review-status/models/AdsetPerformance.js +0 -132
- package/.worktrees/ad-review-status/models/AiArticleRetryQueue.js +0 -157
- package/.worktrees/ad-review-status/models/AiCreationRetryQueue.js +0 -127
- package/.worktrees/ad-review-status/models/Article.js +0 -212
- package/.worktrees/ad-review-status/models/AutomationRule.js +0 -173
- package/.worktrees/ad-review-status/models/BannerTemplate.js +0 -129
- package/.worktrees/ad-review-status/models/Buyers.js +0 -26
- package/.worktrees/ad-review-status/models/Campaign.js +0 -163
- package/.worktrees/ad-review-status/models/CampaignActionHistory.js +0 -86
- package/.worktrees/ad-review-status/models/CampaignCreationLog.js +0 -309
- package/.worktrees/ad-review-status/models/CampaignCreationLogV2.js +0 -314
- package/.worktrees/ad-review-status/models/CampaignHistory.js +0 -33
- package/.worktrees/ad-review-status/models/Channel.js +0 -55
- package/.worktrees/ad-review-status/models/CodefuelCampaign.js +0 -175
- package/.worktrees/ad-review-status/models/CodefuelCampaignKWHistory.js +0 -41
- package/.worktrees/ad-review-status/models/CodefuelKeywords.js +0 -35
- package/.worktrees/ad-review-status/models/CurrencyRate.js +0 -27
- package/.worktrees/ad-review-status/models/Domain.js +0 -40
- package/.worktrees/ad-review-status/models/DynamicFeed.js +0 -219
- package/.worktrees/ad-review-status/models/ExplorAdsChannel.js +0 -62
- package/.worktrees/ad-review-status/models/FacebookRetryQueue.js +0 -163
- package/.worktrees/ad-review-status/models/Feed.js +0 -34
- package/.worktrees/ad-review-status/models/FeedArticleConfiguration.js +0 -81
- package/.worktrees/ad-review-status/models/Files.js +0 -73
- package/.worktrees/ad-review-status/models/Folders.js +0 -133
- package/.worktrees/ad-review-status/models/FrontStoryChannel.js +0 -60
- package/.worktrees/ad-review-status/models/FrontStoryChannelV2.js +0 -60
- package/.worktrees/ad-review-status/models/GenericFlowRequest.js +0 -115
- package/.worktrees/ad-review-status/models/KeywordPerformance.js +0 -106
- package/.worktrees/ad-review-status/models/KeywordRotationState.js +0 -51
- package/.worktrees/ad-review-status/models/MidoWebChannel.js +0 -47
- package/.worktrees/ad-review-status/models/MineChannel.js +0 -43
- package/.worktrees/ad-review-status/models/Pages.js +0 -105
- package/.worktrees/ad-review-status/models/PipelineExecution.js +0 -59
- package/.worktrees/ad-review-status/models/PolicyDogsCreativeCache.js +0 -50
- package/.worktrees/ad-review-status/models/PolicyDogsImageCache.js +0 -30
- package/.worktrees/ad-review-status/models/Presets.js +0 -40
- package/.worktrees/ad-review-status/models/RSOCFeedCampaign.js +0 -375
- package/.worktrees/ad-review-status/models/RsocKeywordPerformance.js +0 -111
- package/.worktrees/ad-review-status/models/RuleAction.js +0 -90
- package/.worktrees/ad-review-status/models/RuleCondition.js +0 -137
- package/.worktrees/ad-review-status/models/RuleExecution.js +0 -107
- package/.worktrees/ad-review-status/models/RulesValues.js +0 -56
- package/.worktrees/ad-review-status/models/SupportedLocale.js +0 -24
- package/.worktrees/ad-review-status/models/SyncHistory.js +0 -250
- package/.worktrees/ad-review-status/models/TTQChannel.js +0 -42
- package/.worktrees/ad-review-status/models/TemplateMetadata.js +0 -260
- package/.worktrees/ad-review-status/models/Tier2_AdAccounts.js +0 -110
- package/.worktrees/ad-review-status/models/Tier2_Assets.js +0 -70
- package/.worktrees/ad-review-status/models/Tier2_BusinessManagers.js +0 -105
- package/.worktrees/ad-review-status/models/Tier2_CreditLines.js +0 -99
- package/.worktrees/ad-review-status/models/Tier2_Pages.js +0 -91
- package/.worktrees/ad-review-status/models/Tier2_Pixels.js +0 -82
- package/.worktrees/ad-review-status/models/Tier2_Tokens.js +0 -64
- package/.worktrees/ad-review-status/models/Tier2_UserAdAccounts.js +0 -83
- package/.worktrees/ad-review-status/models/TokenRotationState.js +0 -121
- package/.worktrees/ad-review-status/models/TonicCampaign.js +0 -97
- package/.worktrees/ad-review-status/models/TonicRSOCKeywordPerformance.js +0 -123
- package/.worktrees/ad-review-status/models/Users.js +0 -148
- package/.worktrees/ad-review-status/models/Vertical.js +0 -26
- package/.worktrees/ad-review-status/models/newFiles.js +0 -137
- package/.worktrees/ad-review-status/models/pixel.js +0 -47
- package/.worktrees/ad-review-status/package-lock.json +0 -405
- package/.worktrees/ad-review-status/package.json +0 -19
- package/.worktrees/ad-review-status/run.ps1 +0 -98
- package/.worktrees/ad-review-status/run.sh +0 -214
- package/.worktrees/ad-review-status/services/sequelizeService.js +0 -110
- package/.worktrees/add-platform-to-rule/LICENSE +0 -21
- package/.worktrees/add-platform-to-rule/README.md +0 -179
- package/.worktrees/add-platform-to-rule/index.js +0 -169
- package/.worktrees/add-platform-to-rule/jq.exe +0 -0
- package/.worktrees/add-platform-to-rule/migrations/2026-05-17-PIXELS-FOLLOWUP.md +0 -85
- package/.worktrees/add-platform-to-rule/migrations/2026-05-17-add-platform-to-ad.js +0 -19
- package/.worktrees/add-platform-to-rule/migrations/2026-05-17-add-platform-to-adaccount.js +0 -19
- package/.worktrees/add-platform-to-rule/migrations/2026-05-17-add-platform-to-adperformance.js +0 -19
- package/.worktrees/add-platform-to-rule/migrations/2026-05-17-add-platform-to-adset.js +0 -19
- package/.worktrees/add-platform-to-rule/migrations/2026-05-17-add-platform-to-adsetperformance.js +0 -19
- package/.worktrees/add-platform-to-rule/migrations/2026-05-17-add-platform-to-aiarticleretryqueue.js +0 -19
- package/.worktrees/add-platform-to-rule/migrations/2026-05-17-add-platform-to-aicampaignqueue.js +0 -19
- package/.worktrees/add-platform-to-rule/migrations/2026-05-17-add-platform-to-article.js +0 -19
- package/.worktrees/add-platform-to-rule/migrations/2026-05-17-add-platform-to-campaign.js +0 -19
- package/.worktrees/add-platform-to-rule/migrations/2026-05-17-add-platform-to-codefuelcampaign.js +0 -19
- package/.worktrees/add-platform-to-rule/migrations/2026-05-17-add-platform-to-dynamicfeed.js +0 -19
- package/.worktrees/add-platform-to-rule/migrations/2026-05-17-add-platform-to-facebookretryqueue.js +0 -19
- package/.worktrees/add-platform-to-rule/migrations/2026-05-17-add-platform-to-pages.js +0 -19
- package/.worktrees/add-platform-to-rule/migrations/2026-05-17-add-platform-to-presets.js +0 -19
- package/.worktrees/add-platform-to-rule/migrations/2026-05-17-add-platform-to-rule.js +0 -19
- package/.worktrees/add-platform-to-rule/migrations/RUN_ME_MANUALLY_2026-05-17.sql +0 -99
- package/.worktrees/add-platform-to-rule/migrations/add-requested-from-dashboard-to-articles.js +0 -17
- package/.worktrees/add-platform-to-rule/migrations/change-adset-name-to-text.js +0 -79
- package/.worktrees/add-platform-to-rule/models/AICampaignQueue.js +0 -144
- package/.worktrees/add-platform-to-rule/models/AIGenerationLog.js +0 -85
- package/.worktrees/add-platform-to-rule/models/AIGenerationRequest.js +0 -212
- package/.worktrees/add-platform-to-rule/models/ActivityHistory.js +0 -73
- package/.worktrees/add-platform-to-rule/models/Ad.js +0 -300
- package/.worktrees/add-platform-to-rule/models/AdAccount.js +0 -97
- package/.worktrees/add-platform-to-rule/models/AdAccountValues.js +0 -26
- package/.worktrees/add-platform-to-rule/models/AdHistory.js +0 -30
- package/.worktrees/add-platform-to-rule/models/AdPerformance.js +0 -100
- package/.worktrees/add-platform-to-rule/models/AdPerformanceHourly.js +0 -71
- package/.worktrees/add-platform-to-rule/models/AdSet.js +0 -295
- package/.worktrees/add-platform-to-rule/models/AdSetHistory.js +0 -30
- package/.worktrees/add-platform-to-rule/models/AdsetPerformance.js +0 -132
- package/.worktrees/add-platform-to-rule/models/AiArticleRetryQueue.js +0 -157
- package/.worktrees/add-platform-to-rule/models/AiCreationRetryQueue.js +0 -127
- package/.worktrees/add-platform-to-rule/models/Article.js +0 -212
- package/.worktrees/add-platform-to-rule/models/AutomationRule.js +0 -179
- package/.worktrees/add-platform-to-rule/models/BannerTemplate.js +0 -129
- package/.worktrees/add-platform-to-rule/models/Buyers.js +0 -26
- package/.worktrees/add-platform-to-rule/models/Campaign.js +0 -163
- package/.worktrees/add-platform-to-rule/models/CampaignActionHistory.js +0 -86
- package/.worktrees/add-platform-to-rule/models/CampaignCreationLog.js +0 -309
- package/.worktrees/add-platform-to-rule/models/CampaignCreationLogV2.js +0 -314
- package/.worktrees/add-platform-to-rule/models/CampaignHistory.js +0 -33
- package/.worktrees/add-platform-to-rule/models/Channel.js +0 -55
- package/.worktrees/add-platform-to-rule/models/CodefuelCampaign.js +0 -175
- package/.worktrees/add-platform-to-rule/models/CodefuelCampaignKWHistory.js +0 -41
- package/.worktrees/add-platform-to-rule/models/CodefuelKeywords.js +0 -35
- package/.worktrees/add-platform-to-rule/models/CurrencyRate.js +0 -27
- package/.worktrees/add-platform-to-rule/models/Domain.js +0 -40
- package/.worktrees/add-platform-to-rule/models/DynamicFeed.js +0 -219
- package/.worktrees/add-platform-to-rule/models/ExplorAdsChannel.js +0 -62
- package/.worktrees/add-platform-to-rule/models/FacebookRetryQueue.js +0 -163
- package/.worktrees/add-platform-to-rule/models/Feed.js +0 -34
- package/.worktrees/add-platform-to-rule/models/FeedArticleConfiguration.js +0 -81
- package/.worktrees/add-platform-to-rule/models/Files.js +0 -73
- package/.worktrees/add-platform-to-rule/models/Folders.js +0 -133
- package/.worktrees/add-platform-to-rule/models/FrontStoryChannel.js +0 -60
- package/.worktrees/add-platform-to-rule/models/FrontStoryChannelV2.js +0 -60
- package/.worktrees/add-platform-to-rule/models/GenericFlowRequest.js +0 -115
- package/.worktrees/add-platform-to-rule/models/KeywordPerformance.js +0 -106
- package/.worktrees/add-platform-to-rule/models/KeywordRotationState.js +0 -51
- package/.worktrees/add-platform-to-rule/models/MidoWebChannel.js +0 -47
- package/.worktrees/add-platform-to-rule/models/MineChannel.js +0 -43
- package/.worktrees/add-platform-to-rule/models/Pages.js +0 -105
- package/.worktrees/add-platform-to-rule/models/PipelineExecution.js +0 -59
- package/.worktrees/add-platform-to-rule/models/PolicyDogsCreativeCache.js +0 -50
- package/.worktrees/add-platform-to-rule/models/PolicyDogsImageCache.js +0 -30
- package/.worktrees/add-platform-to-rule/models/Presets.js +0 -40
- package/.worktrees/add-platform-to-rule/models/RSOCFeedCampaign.js +0 -375
- package/.worktrees/add-platform-to-rule/models/RsocKeywordPerformance.js +0 -111
- package/.worktrees/add-platform-to-rule/models/RuleAction.js +0 -90
- package/.worktrees/add-platform-to-rule/models/RuleCondition.js +0 -137
- package/.worktrees/add-platform-to-rule/models/RuleExecution.js +0 -107
- package/.worktrees/add-platform-to-rule/models/RulesValues.js +0 -56
- package/.worktrees/add-platform-to-rule/models/SupportedLocale.js +0 -24
- package/.worktrees/add-platform-to-rule/models/SyncHistory.js +0 -250
- package/.worktrees/add-platform-to-rule/models/TTQChannel.js +0 -42
- package/.worktrees/add-platform-to-rule/models/TemplateMetadata.js +0 -260
- package/.worktrees/add-platform-to-rule/models/Tier2_AdAccounts.js +0 -110
- package/.worktrees/add-platform-to-rule/models/Tier2_Assets.js +0 -70
- package/.worktrees/add-platform-to-rule/models/Tier2_BusinessManagers.js +0 -105
- package/.worktrees/add-platform-to-rule/models/Tier2_CreditLines.js +0 -99
- package/.worktrees/add-platform-to-rule/models/Tier2_Pages.js +0 -91
- package/.worktrees/add-platform-to-rule/models/Tier2_Pixels.js +0 -82
- package/.worktrees/add-platform-to-rule/models/Tier2_Tokens.js +0 -64
- package/.worktrees/add-platform-to-rule/models/Tier2_UserAdAccounts.js +0 -83
- package/.worktrees/add-platform-to-rule/models/TokenRotationState.js +0 -121
- package/.worktrees/add-platform-to-rule/models/TonicCampaign.js +0 -97
- package/.worktrees/add-platform-to-rule/models/TonicRSOCKeywordPerformance.js +0 -123
- package/.worktrees/add-platform-to-rule/models/Users.js +0 -148
- package/.worktrees/add-platform-to-rule/models/Vertical.js +0 -26
- package/.worktrees/add-platform-to-rule/models/newFiles.js +0 -137
- package/.worktrees/add-platform-to-rule/models/pixel.js +0 -47
- package/.worktrees/add-platform-to-rule/package-lock.json +0 -405
- package/.worktrees/add-platform-to-rule/package.json +0 -19
- package/.worktrees/add-platform-to-rule/run.ps1 +0 -98
- package/.worktrees/add-platform-to-rule/run.sh +0 -214
- package/.worktrees/add-platform-to-rule/services/sequelizeService.js +0 -110
- package/.worktrees/adperformance-platform/LICENSE +0 -21
- package/.worktrees/adperformance-platform/README.md +0 -179
- package/.worktrees/adperformance-platform/index.js +0 -169
- package/.worktrees/adperformance-platform/jq.exe +0 -0
- package/.worktrees/adperformance-platform/migrations/2026-05-17-PIXELS-FOLLOWUP.md +0 -85
- package/.worktrees/adperformance-platform/migrations/2026-05-17-add-platform-to-ad.js +0 -19
- package/.worktrees/adperformance-platform/migrations/2026-05-17-add-platform-to-adaccount.js +0 -19
- package/.worktrees/adperformance-platform/migrations/2026-05-17-add-platform-to-adperformance.js +0 -19
- package/.worktrees/adperformance-platform/migrations/2026-05-17-add-platform-to-adset.js +0 -19
- package/.worktrees/adperformance-platform/migrations/2026-05-17-add-platform-to-adsetperformance.js +0 -19
- package/.worktrees/adperformance-platform/migrations/2026-05-17-add-platform-to-aiarticleretryqueue.js +0 -19
- package/.worktrees/adperformance-platform/migrations/2026-05-17-add-platform-to-aicampaignqueue.js +0 -19
- package/.worktrees/adperformance-platform/migrations/2026-05-17-add-platform-to-article.js +0 -19
- package/.worktrees/adperformance-platform/migrations/2026-05-17-add-platform-to-campaign.js +0 -19
- package/.worktrees/adperformance-platform/migrations/2026-05-17-add-platform-to-codefuelcampaign.js +0 -19
- package/.worktrees/adperformance-platform/migrations/2026-05-17-add-platform-to-dynamicfeed.js +0 -19
- package/.worktrees/adperformance-platform/migrations/2026-05-17-add-platform-to-facebookretryqueue.js +0 -19
- package/.worktrees/adperformance-platform/migrations/2026-05-17-add-platform-to-pages.js +0 -19
- package/.worktrees/adperformance-platform/migrations/2026-05-17-add-platform-to-presets.js +0 -19
- package/.worktrees/adperformance-platform/migrations/2026-05-18-add-platform-date-index-to-adperformance.js +0 -16
- package/.worktrees/adperformance-platform/migrations/RUN_ME_MANUALLY_2026-05-17.sql +0 -99
- package/.worktrees/adperformance-platform/migrations/add-requested-from-dashboard-to-articles.js +0 -17
- package/.worktrees/adperformance-platform/migrations/change-adset-name-to-text.js +0 -79
- package/.worktrees/adperformance-platform/models/AICampaignQueue.js +0 -144
- package/.worktrees/adperformance-platform/models/AIGenerationLog.js +0 -85
- package/.worktrees/adperformance-platform/models/AIGenerationRequest.js +0 -212
- package/.worktrees/adperformance-platform/models/ActivityHistory.js +0 -73
- package/.worktrees/adperformance-platform/models/Ad.js +0 -300
- package/.worktrees/adperformance-platform/models/AdAccount.js +0 -97
- package/.worktrees/adperformance-platform/models/AdAccountValues.js +0 -26
- package/.worktrees/adperformance-platform/models/AdHistory.js +0 -30
- package/.worktrees/adperformance-platform/models/AdPerformance.js +0 -104
- package/.worktrees/adperformance-platform/models/AdPerformanceHourly.js +0 -71
- package/.worktrees/adperformance-platform/models/AdSet.js +0 -295
- package/.worktrees/adperformance-platform/models/AdSetHistory.js +0 -30
- package/.worktrees/adperformance-platform/models/AdsetPerformance.js +0 -132
- package/.worktrees/adperformance-platform/models/AiArticleRetryQueue.js +0 -157
- package/.worktrees/adperformance-platform/models/AiCreationRetryQueue.js +0 -127
- package/.worktrees/adperformance-platform/models/Article.js +0 -212
- package/.worktrees/adperformance-platform/models/AutomationRule.js +0 -173
- package/.worktrees/adperformance-platform/models/BannerTemplate.js +0 -129
- package/.worktrees/adperformance-platform/models/Buyers.js +0 -26
- package/.worktrees/adperformance-platform/models/Campaign.js +0 -163
- package/.worktrees/adperformance-platform/models/CampaignActionHistory.js +0 -86
- package/.worktrees/adperformance-platform/models/CampaignCreationLog.js +0 -309
- package/.worktrees/adperformance-platform/models/CampaignCreationLogV2.js +0 -314
- package/.worktrees/adperformance-platform/models/CampaignHistory.js +0 -33
- package/.worktrees/adperformance-platform/models/Channel.js +0 -55
- package/.worktrees/adperformance-platform/models/CodefuelCampaign.js +0 -175
- package/.worktrees/adperformance-platform/models/CodefuelCampaignKWHistory.js +0 -41
- package/.worktrees/adperformance-platform/models/CodefuelKeywords.js +0 -35
- package/.worktrees/adperformance-platform/models/CurrencyRate.js +0 -27
- package/.worktrees/adperformance-platform/models/Domain.js +0 -40
- package/.worktrees/adperformance-platform/models/DynamicFeed.js +0 -219
- package/.worktrees/adperformance-platform/models/ExplorAdsChannel.js +0 -62
- package/.worktrees/adperformance-platform/models/FacebookRetryQueue.js +0 -163
- package/.worktrees/adperformance-platform/models/Feed.js +0 -34
- package/.worktrees/adperformance-platform/models/FeedArticleConfiguration.js +0 -81
- package/.worktrees/adperformance-platform/models/Files.js +0 -73
- package/.worktrees/adperformance-platform/models/Folders.js +0 -133
- package/.worktrees/adperformance-platform/models/FrontStoryChannel.js +0 -60
- package/.worktrees/adperformance-platform/models/FrontStoryChannelV2.js +0 -60
- package/.worktrees/adperformance-platform/models/GenericFlowRequest.js +0 -115
- package/.worktrees/adperformance-platform/models/KeywordPerformance.js +0 -106
- package/.worktrees/adperformance-platform/models/KeywordRotationState.js +0 -51
- package/.worktrees/adperformance-platform/models/MidoWebChannel.js +0 -47
- package/.worktrees/adperformance-platform/models/MineChannel.js +0 -43
- package/.worktrees/adperformance-platform/models/Pages.js +0 -105
- package/.worktrees/adperformance-platform/models/PipelineExecution.js +0 -59
- package/.worktrees/adperformance-platform/models/PolicyDogsCreativeCache.js +0 -50
- package/.worktrees/adperformance-platform/models/PolicyDogsImageCache.js +0 -30
- package/.worktrees/adperformance-platform/models/Presets.js +0 -40
- package/.worktrees/adperformance-platform/models/RSOCFeedCampaign.js +0 -375
- package/.worktrees/adperformance-platform/models/RsocKeywordPerformance.js +0 -111
- package/.worktrees/adperformance-platform/models/RuleAction.js +0 -90
- package/.worktrees/adperformance-platform/models/RuleCondition.js +0 -137
- package/.worktrees/adperformance-platform/models/RuleExecution.js +0 -107
- package/.worktrees/adperformance-platform/models/RulesValues.js +0 -56
- package/.worktrees/adperformance-platform/models/SupportedLocale.js +0 -24
- package/.worktrees/adperformance-platform/models/SyncHistory.js +0 -250
- package/.worktrees/adperformance-platform/models/TTQChannel.js +0 -42
- package/.worktrees/adperformance-platform/models/TemplateMetadata.js +0 -260
- package/.worktrees/adperformance-platform/models/Tier2_AdAccounts.js +0 -110
- package/.worktrees/adperformance-platform/models/Tier2_Assets.js +0 -70
- package/.worktrees/adperformance-platform/models/Tier2_BusinessManagers.js +0 -105
- package/.worktrees/adperformance-platform/models/Tier2_CreditLines.js +0 -99
- package/.worktrees/adperformance-platform/models/Tier2_Pages.js +0 -91
- package/.worktrees/adperformance-platform/models/Tier2_Pixels.js +0 -82
- package/.worktrees/adperformance-platform/models/Tier2_Tokens.js +0 -64
- package/.worktrees/adperformance-platform/models/Tier2_UserAdAccounts.js +0 -83
- package/.worktrees/adperformance-platform/models/TokenRotationState.js +0 -121
- package/.worktrees/adperformance-platform/models/TonicCampaign.js +0 -97
- package/.worktrees/adperformance-platform/models/TonicRSOCKeywordPerformance.js +0 -123
- package/.worktrees/adperformance-platform/models/Users.js +0 -148
- package/.worktrees/adperformance-platform/models/Vertical.js +0 -26
- package/.worktrees/adperformance-platform/models/newFiles.js +0 -137
- package/.worktrees/adperformance-platform/models/pixel.js +0 -47
- package/.worktrees/adperformance-platform/package-lock.json +0 -405
- package/.worktrees/adperformance-platform/package.json +0 -19
- package/.worktrees/adperformance-platform/run.ps1 +0 -98
- package/.worktrees/adperformance-platform/run.sh +0 -214
- package/.worktrees/adperformance-platform/services/sequelizeService.js +0 -110
- package/.worktrees/adsetperformance-platform/LICENSE +0 -21
- package/.worktrees/adsetperformance-platform/README.md +0 -179
- package/.worktrees/adsetperformance-platform/index.js +0 -169
- package/.worktrees/adsetperformance-platform/jq.exe +0 -0
- package/.worktrees/adsetperformance-platform/migrations/2026-05-17-PIXELS-FOLLOWUP.md +0 -85
- package/.worktrees/adsetperformance-platform/migrations/2026-05-17-add-platform-to-ad.js +0 -19
- package/.worktrees/adsetperformance-platform/migrations/2026-05-17-add-platform-to-adaccount.js +0 -19
- package/.worktrees/adsetperformance-platform/migrations/2026-05-17-add-platform-to-adperformance.js +0 -19
- package/.worktrees/adsetperformance-platform/migrations/2026-05-17-add-platform-to-adset.js +0 -19
- package/.worktrees/adsetperformance-platform/migrations/2026-05-17-add-platform-to-adsetperformance.js +0 -19
- package/.worktrees/adsetperformance-platform/migrations/2026-05-17-add-platform-to-aiarticleretryqueue.js +0 -19
- package/.worktrees/adsetperformance-platform/migrations/2026-05-17-add-platform-to-aicampaignqueue.js +0 -19
- package/.worktrees/adsetperformance-platform/migrations/2026-05-17-add-platform-to-article.js +0 -19
- package/.worktrees/adsetperformance-platform/migrations/2026-05-17-add-platform-to-campaign.js +0 -19
- package/.worktrees/adsetperformance-platform/migrations/2026-05-17-add-platform-to-codefuelcampaign.js +0 -19
- package/.worktrees/adsetperformance-platform/migrations/2026-05-17-add-platform-to-dynamicfeed.js +0 -19
- package/.worktrees/adsetperformance-platform/migrations/2026-05-17-add-platform-to-facebookretryqueue.js +0 -19
- package/.worktrees/adsetperformance-platform/migrations/2026-05-17-add-platform-to-pages.js +0 -19
- package/.worktrees/adsetperformance-platform/migrations/2026-05-17-add-platform-to-presets.js +0 -19
- package/.worktrees/adsetperformance-platform/migrations/2026-05-18-add-platform-date-index-to-adsetperformance.js +0 -16
- package/.worktrees/adsetperformance-platform/migrations/RUN_ME_MANUALLY_2026-05-17.sql +0 -99
- package/.worktrees/adsetperformance-platform/migrations/add-requested-from-dashboard-to-articles.js +0 -17
- package/.worktrees/adsetperformance-platform/migrations/change-adset-name-to-text.js +0 -79
- package/.worktrees/adsetperformance-platform/models/AICampaignQueue.js +0 -144
- package/.worktrees/adsetperformance-platform/models/AIGenerationLog.js +0 -85
- package/.worktrees/adsetperformance-platform/models/AIGenerationRequest.js +0 -212
- package/.worktrees/adsetperformance-platform/models/ActivityHistory.js +0 -73
- package/.worktrees/adsetperformance-platform/models/Ad.js +0 -300
- package/.worktrees/adsetperformance-platform/models/AdAccount.js +0 -97
- package/.worktrees/adsetperformance-platform/models/AdAccountValues.js +0 -26
- package/.worktrees/adsetperformance-platform/models/AdHistory.js +0 -30
- package/.worktrees/adsetperformance-platform/models/AdPerformance.js +0 -100
- package/.worktrees/adsetperformance-platform/models/AdPerformanceHourly.js +0 -71
- package/.worktrees/adsetperformance-platform/models/AdSet.js +0 -295
- package/.worktrees/adsetperformance-platform/models/AdSetHistory.js +0 -30
- package/.worktrees/adsetperformance-platform/models/AdsetPerformance.js +0 -137
- package/.worktrees/adsetperformance-platform/models/AiArticleRetryQueue.js +0 -157
- package/.worktrees/adsetperformance-platform/models/AiCreationRetryQueue.js +0 -127
- package/.worktrees/adsetperformance-platform/models/ApiAuditLog.js +0 -84
- package/.worktrees/adsetperformance-platform/models/ApiToken.js +0 -67
- package/.worktrees/adsetperformance-platform/models/Article.js +0 -212
- package/.worktrees/adsetperformance-platform/models/AutomationRule.js +0 -173
- package/.worktrees/adsetperformance-platform/models/BannerTemplate.js +0 -129
- package/.worktrees/adsetperformance-platform/models/Buyers.js +0 -26
- package/.worktrees/adsetperformance-platform/models/Campaign.js +0 -163
- package/.worktrees/adsetperformance-platform/models/CampaignActionHistory.js +0 -86
- package/.worktrees/adsetperformance-platform/models/CampaignCreationLog.js +0 -309
- package/.worktrees/adsetperformance-platform/models/CampaignCreationLogV2.js +0 -314
- package/.worktrees/adsetperformance-platform/models/CampaignHistory.js +0 -33
- package/.worktrees/adsetperformance-platform/models/Channel.js +0 -55
- package/.worktrees/adsetperformance-platform/models/CodefuelCampaign.js +0 -175
- package/.worktrees/adsetperformance-platform/models/CodefuelCampaignKWHistory.js +0 -41
- package/.worktrees/adsetperformance-platform/models/CodefuelKeywords.js +0 -35
- package/.worktrees/adsetperformance-platform/models/CurrencyRate.js +0 -27
- package/.worktrees/adsetperformance-platform/models/Domain.js +0 -40
- package/.worktrees/adsetperformance-platform/models/DynamicFeed.js +0 -219
- package/.worktrees/adsetperformance-platform/models/ExplorAdsChannel.js +0 -62
- package/.worktrees/adsetperformance-platform/models/FacebookRetryQueue.js +0 -163
- package/.worktrees/adsetperformance-platform/models/Feed.js +0 -34
- package/.worktrees/adsetperformance-platform/models/FeedArticleConfiguration.js +0 -81
- package/.worktrees/adsetperformance-platform/models/Files.js +0 -73
- package/.worktrees/adsetperformance-platform/models/Folders.js +0 -133
- package/.worktrees/adsetperformance-platform/models/FrontStoryChannel.js +0 -60
- package/.worktrees/adsetperformance-platform/models/FrontStoryChannelV2.js +0 -60
- package/.worktrees/adsetperformance-platform/models/GenericFlowRequest.js +0 -115
- package/.worktrees/adsetperformance-platform/models/KeywordPerformance.js +0 -106
- package/.worktrees/adsetperformance-platform/models/KeywordRotationState.js +0 -51
- package/.worktrees/adsetperformance-platform/models/MidoWebChannel.js +0 -47
- package/.worktrees/adsetperformance-platform/models/MineChannel.js +0 -43
- package/.worktrees/adsetperformance-platform/models/Pages.js +0 -105
- package/.worktrees/adsetperformance-platform/models/PipelineExecution.js +0 -59
- package/.worktrees/adsetperformance-platform/models/PolicyDogsCreativeCache.js +0 -50
- package/.worktrees/adsetperformance-platform/models/PolicyDogsImageCache.js +0 -30
- package/.worktrees/adsetperformance-platform/models/Presets.js +0 -40
- package/.worktrees/adsetperformance-platform/models/RSOCFeedCampaign.js +0 -375
- package/.worktrees/adsetperformance-platform/models/RsocKeywordPerformance.js +0 -111
- package/.worktrees/adsetperformance-platform/models/RuleAction.js +0 -90
- package/.worktrees/adsetperformance-platform/models/RuleCondition.js +0 -137
- package/.worktrees/adsetperformance-platform/models/RuleExecution.js +0 -107
- package/.worktrees/adsetperformance-platform/models/RulesValues.js +0 -56
- package/.worktrees/adsetperformance-platform/models/SupportedLocale.js +0 -24
- package/.worktrees/adsetperformance-platform/models/SyncHistory.js +0 -250
- package/.worktrees/adsetperformance-platform/models/TTQChannel.js +0 -42
- package/.worktrees/adsetperformance-platform/models/TemplateMetadata.js +0 -260
- package/.worktrees/adsetperformance-platform/models/Tier2_AdAccounts.js +0 -110
- package/.worktrees/adsetperformance-platform/models/Tier2_Assets.js +0 -70
- package/.worktrees/adsetperformance-platform/models/Tier2_BusinessManagers.js +0 -105
- package/.worktrees/adsetperformance-platform/models/Tier2_CreditLines.js +0 -99
- package/.worktrees/adsetperformance-platform/models/Tier2_Pages.js +0 -91
- package/.worktrees/adsetperformance-platform/models/Tier2_Pixels.js +0 -82
- package/.worktrees/adsetperformance-platform/models/Tier2_Tokens.js +0 -64
- package/.worktrees/adsetperformance-platform/models/Tier2_UserAdAccounts.js +0 -83
- package/.worktrees/adsetperformance-platform/models/TokenRotationState.js +0 -121
- package/.worktrees/adsetperformance-platform/models/TonicCampaign.js +0 -97
- package/.worktrees/adsetperformance-platform/models/TonicRSOCKeywordPerformance.js +0 -123
- package/.worktrees/adsetperformance-platform/models/Users.js +0 -148
- package/.worktrees/adsetperformance-platform/models/Vertical.js +0 -26
- package/.worktrees/adsetperformance-platform/models/newFiles.js +0 -137
- package/.worktrees/adsetperformance-platform/models/pixel.js +0 -47
- package/.worktrees/adsetperformance-platform/package-lock.json +0 -406
- package/.worktrees/adsetperformance-platform/package.json +0 -19
- package/.worktrees/adsetperformance-platform/run.ps1 +0 -98
- package/.worktrees/adsetperformance-platform/run.sh +0 -214
- package/.worktrees/adsetperformance-platform/services/sequelizeService.js +0 -110
- package/.worktrees/aicampaign-queue-group-id/LICENSE +0 -21
- package/.worktrees/aicampaign-queue-group-id/README.md +0 -179
- package/.worktrees/aicampaign-queue-group-id/index.js +0 -169
- package/.worktrees/aicampaign-queue-group-id/jq.exe +0 -0
- package/.worktrees/aicampaign-queue-group-id/migrations/2026-05-17-PIXELS-FOLLOWUP.md +0 -85
- package/.worktrees/aicampaign-queue-group-id/migrations/2026-05-17-add-platform-to-ad.js +0 -19
- package/.worktrees/aicampaign-queue-group-id/migrations/2026-05-17-add-platform-to-adaccount.js +0 -19
- package/.worktrees/aicampaign-queue-group-id/migrations/2026-05-17-add-platform-to-adperformance.js +0 -19
- package/.worktrees/aicampaign-queue-group-id/migrations/2026-05-17-add-platform-to-adset.js +0 -19
- package/.worktrees/aicampaign-queue-group-id/migrations/2026-05-17-add-platform-to-adsetperformance.js +0 -19
- package/.worktrees/aicampaign-queue-group-id/migrations/2026-05-17-add-platform-to-aiarticleretryqueue.js +0 -19
- package/.worktrees/aicampaign-queue-group-id/migrations/2026-05-17-add-platform-to-aicampaignqueue.js +0 -19
- package/.worktrees/aicampaign-queue-group-id/migrations/2026-05-17-add-platform-to-article.js +0 -19
- package/.worktrees/aicampaign-queue-group-id/migrations/2026-05-17-add-platform-to-campaign.js +0 -19
- package/.worktrees/aicampaign-queue-group-id/migrations/2026-05-17-add-platform-to-codefuelcampaign.js +0 -19
- package/.worktrees/aicampaign-queue-group-id/migrations/2026-05-17-add-platform-to-dynamicfeed.js +0 -19
- package/.worktrees/aicampaign-queue-group-id/migrations/2026-05-17-add-platform-to-facebookretryqueue.js +0 -19
- package/.worktrees/aicampaign-queue-group-id/migrations/2026-05-17-add-platform-to-pages.js +0 -19
- package/.worktrees/aicampaign-queue-group-id/migrations/2026-05-17-add-platform-to-presets.js +0 -19
- package/.worktrees/aicampaign-queue-group-id/migrations/2026-05-18-add-group-id-to-ai-campaign-queue.js +0 -18
- package/.worktrees/aicampaign-queue-group-id/migrations/RUN_ME_MANUALLY_2026-05-17.sql +0 -99
- package/.worktrees/aicampaign-queue-group-id/migrations/add-requested-from-dashboard-to-articles.js +0 -17
- package/.worktrees/aicampaign-queue-group-id/migrations/change-adset-name-to-text.js +0 -79
- package/.worktrees/aicampaign-queue-group-id/models/AICampaignQueue.js +0 -153
- package/.worktrees/aicampaign-queue-group-id/models/AIGenerationLog.js +0 -85
- package/.worktrees/aicampaign-queue-group-id/models/AIGenerationRequest.js +0 -212
- package/.worktrees/aicampaign-queue-group-id/models/ActivityHistory.js +0 -73
- package/.worktrees/aicampaign-queue-group-id/models/Ad.js +0 -300
- package/.worktrees/aicampaign-queue-group-id/models/AdAccount.js +0 -97
- package/.worktrees/aicampaign-queue-group-id/models/AdAccountValues.js +0 -26
- package/.worktrees/aicampaign-queue-group-id/models/AdHistory.js +0 -30
- package/.worktrees/aicampaign-queue-group-id/models/AdPerformance.js +0 -100
- package/.worktrees/aicampaign-queue-group-id/models/AdPerformanceHourly.js +0 -71
- package/.worktrees/aicampaign-queue-group-id/models/AdSet.js +0 -295
- package/.worktrees/aicampaign-queue-group-id/models/AdSetHistory.js +0 -30
- package/.worktrees/aicampaign-queue-group-id/models/AdsetPerformance.js +0 -132
- package/.worktrees/aicampaign-queue-group-id/models/AiArticleRetryQueue.js +0 -157
- package/.worktrees/aicampaign-queue-group-id/models/AiCreationRetryQueue.js +0 -127
- package/.worktrees/aicampaign-queue-group-id/models/Article.js +0 -212
- package/.worktrees/aicampaign-queue-group-id/models/AutomationRule.js +0 -173
- package/.worktrees/aicampaign-queue-group-id/models/BannerTemplate.js +0 -129
- package/.worktrees/aicampaign-queue-group-id/models/Buyers.js +0 -26
- package/.worktrees/aicampaign-queue-group-id/models/Campaign.js +0 -163
- package/.worktrees/aicampaign-queue-group-id/models/CampaignActionHistory.js +0 -86
- package/.worktrees/aicampaign-queue-group-id/models/CampaignCreationLog.js +0 -309
- package/.worktrees/aicampaign-queue-group-id/models/CampaignCreationLogV2.js +0 -314
- package/.worktrees/aicampaign-queue-group-id/models/CampaignHistory.js +0 -33
- package/.worktrees/aicampaign-queue-group-id/models/Channel.js +0 -55
- package/.worktrees/aicampaign-queue-group-id/models/CodefuelCampaign.js +0 -175
- package/.worktrees/aicampaign-queue-group-id/models/CodefuelCampaignKWHistory.js +0 -41
- package/.worktrees/aicampaign-queue-group-id/models/CodefuelKeywords.js +0 -35
- package/.worktrees/aicampaign-queue-group-id/models/CurrencyRate.js +0 -27
- package/.worktrees/aicampaign-queue-group-id/models/Domain.js +0 -40
- package/.worktrees/aicampaign-queue-group-id/models/DynamicFeed.js +0 -219
- package/.worktrees/aicampaign-queue-group-id/models/ExplorAdsChannel.js +0 -62
- package/.worktrees/aicampaign-queue-group-id/models/FacebookRetryQueue.js +0 -163
- package/.worktrees/aicampaign-queue-group-id/models/Feed.js +0 -34
- package/.worktrees/aicampaign-queue-group-id/models/FeedArticleConfiguration.js +0 -81
- package/.worktrees/aicampaign-queue-group-id/models/Files.js +0 -73
- package/.worktrees/aicampaign-queue-group-id/models/Folders.js +0 -133
- package/.worktrees/aicampaign-queue-group-id/models/FrontStoryChannel.js +0 -60
- package/.worktrees/aicampaign-queue-group-id/models/FrontStoryChannelV2.js +0 -60
- package/.worktrees/aicampaign-queue-group-id/models/GenericFlowRequest.js +0 -115
- package/.worktrees/aicampaign-queue-group-id/models/KeywordPerformance.js +0 -106
- package/.worktrees/aicampaign-queue-group-id/models/KeywordRotationState.js +0 -51
- package/.worktrees/aicampaign-queue-group-id/models/MidoWebChannel.js +0 -47
- package/.worktrees/aicampaign-queue-group-id/models/MineChannel.js +0 -43
- package/.worktrees/aicampaign-queue-group-id/models/Pages.js +0 -105
- package/.worktrees/aicampaign-queue-group-id/models/PipelineExecution.js +0 -59
- package/.worktrees/aicampaign-queue-group-id/models/PolicyDogsCreativeCache.js +0 -50
- package/.worktrees/aicampaign-queue-group-id/models/PolicyDogsImageCache.js +0 -30
- package/.worktrees/aicampaign-queue-group-id/models/Presets.js +0 -40
- package/.worktrees/aicampaign-queue-group-id/models/RSOCFeedCampaign.js +0 -375
- package/.worktrees/aicampaign-queue-group-id/models/RsocKeywordPerformance.js +0 -111
- package/.worktrees/aicampaign-queue-group-id/models/RuleAction.js +0 -90
- package/.worktrees/aicampaign-queue-group-id/models/RuleCondition.js +0 -137
- package/.worktrees/aicampaign-queue-group-id/models/RuleExecution.js +0 -107
- package/.worktrees/aicampaign-queue-group-id/models/RulesValues.js +0 -56
- package/.worktrees/aicampaign-queue-group-id/models/SupportedLocale.js +0 -24
- package/.worktrees/aicampaign-queue-group-id/models/SyncHistory.js +0 -250
- package/.worktrees/aicampaign-queue-group-id/models/TTQChannel.js +0 -42
- package/.worktrees/aicampaign-queue-group-id/models/TemplateMetadata.js +0 -260
- package/.worktrees/aicampaign-queue-group-id/models/Tier2_AdAccounts.js +0 -110
- package/.worktrees/aicampaign-queue-group-id/models/Tier2_Assets.js +0 -70
- package/.worktrees/aicampaign-queue-group-id/models/Tier2_BusinessManagers.js +0 -105
- package/.worktrees/aicampaign-queue-group-id/models/Tier2_CreditLines.js +0 -99
- package/.worktrees/aicampaign-queue-group-id/models/Tier2_Pages.js +0 -91
- package/.worktrees/aicampaign-queue-group-id/models/Tier2_Pixels.js +0 -82
- package/.worktrees/aicampaign-queue-group-id/models/Tier2_Tokens.js +0 -64
- package/.worktrees/aicampaign-queue-group-id/models/Tier2_UserAdAccounts.js +0 -83
- package/.worktrees/aicampaign-queue-group-id/models/TokenRotationState.js +0 -121
- package/.worktrees/aicampaign-queue-group-id/models/TonicCampaign.js +0 -97
- package/.worktrees/aicampaign-queue-group-id/models/TonicRSOCKeywordPerformance.js +0 -123
- package/.worktrees/aicampaign-queue-group-id/models/Users.js +0 -148
- package/.worktrees/aicampaign-queue-group-id/models/Vertical.js +0 -26
- package/.worktrees/aicampaign-queue-group-id/models/newFiles.js +0 -137
- package/.worktrees/aicampaign-queue-group-id/models/pixel.js +0 -47
- package/.worktrees/aicampaign-queue-group-id/package-lock.json +0 -405
- package/.worktrees/aicampaign-queue-group-id/package.json +0 -19
- package/.worktrees/aicampaign-queue-group-id/run.ps1 +0 -98
- package/.worktrees/aicampaign-queue-group-id/run.sh +0 -214
- package/.worktrees/aicampaign-queue-group-id/services/sequelizeService.js +0 -110
- package/.worktrees/canonical-insights-model/LICENSE +0 -21
- package/.worktrees/canonical-insights-model/README.md +0 -179
- package/.worktrees/canonical-insights-model/index.js +0 -169
- package/.worktrees/canonical-insights-model/jq.exe +0 -0
- package/.worktrees/canonical-insights-model/migrations/2026-05-17-PIXELS-FOLLOWUP.md +0 -85
- package/.worktrees/canonical-insights-model/migrations/2026-05-17-add-platform-to-ad.js +0 -19
- package/.worktrees/canonical-insights-model/migrations/2026-05-17-add-platform-to-adaccount.js +0 -19
- package/.worktrees/canonical-insights-model/migrations/2026-05-17-add-platform-to-adperformance.js +0 -19
- package/.worktrees/canonical-insights-model/migrations/2026-05-17-add-platform-to-adset.js +0 -19
- package/.worktrees/canonical-insights-model/migrations/2026-05-17-add-platform-to-adsetperformance.js +0 -19
- package/.worktrees/canonical-insights-model/migrations/2026-05-17-add-platform-to-aiarticleretryqueue.js +0 -19
- package/.worktrees/canonical-insights-model/migrations/2026-05-17-add-platform-to-aicampaignqueue.js +0 -19
- package/.worktrees/canonical-insights-model/migrations/2026-05-17-add-platform-to-article.js +0 -19
- package/.worktrees/canonical-insights-model/migrations/2026-05-17-add-platform-to-campaign.js +0 -19
- package/.worktrees/canonical-insights-model/migrations/2026-05-17-add-platform-to-codefuelcampaign.js +0 -19
- package/.worktrees/canonical-insights-model/migrations/2026-05-17-add-platform-to-dynamicfeed.js +0 -19
- package/.worktrees/canonical-insights-model/migrations/2026-05-17-add-platform-to-facebookretryqueue.js +0 -19
- package/.worktrees/canonical-insights-model/migrations/2026-05-17-add-platform-to-pages.js +0 -19
- package/.worktrees/canonical-insights-model/migrations/2026-05-17-add-platform-to-presets.js +0 -19
- package/.worktrees/canonical-insights-model/migrations/2026-05-18-create-canonical-insights.js +0 -84
- package/.worktrees/canonical-insights-model/migrations/RUN_ME_MANUALLY_2026-05-17.sql +0 -99
- package/.worktrees/canonical-insights-model/migrations/add-requested-from-dashboard-to-articles.js +0 -17
- package/.worktrees/canonical-insights-model/migrations/change-adset-name-to-text.js +0 -79
- package/.worktrees/canonical-insights-model/models/AICampaignQueue.js +0 -144
- package/.worktrees/canonical-insights-model/models/AIGenerationLog.js +0 -85
- package/.worktrees/canonical-insights-model/models/AIGenerationRequest.js +0 -212
- package/.worktrees/canonical-insights-model/models/ActivityHistory.js +0 -73
- package/.worktrees/canonical-insights-model/models/Ad.js +0 -300
- package/.worktrees/canonical-insights-model/models/AdAccount.js +0 -97
- package/.worktrees/canonical-insights-model/models/AdAccountValues.js +0 -26
- package/.worktrees/canonical-insights-model/models/AdHistory.js +0 -30
- package/.worktrees/canonical-insights-model/models/AdPerformance.js +0 -100
- package/.worktrees/canonical-insights-model/models/AdPerformanceHourly.js +0 -71
- package/.worktrees/canonical-insights-model/models/AdSet.js +0 -295
- package/.worktrees/canonical-insights-model/models/AdSetHistory.js +0 -30
- package/.worktrees/canonical-insights-model/models/AdsetPerformance.js +0 -132
- package/.worktrees/canonical-insights-model/models/AiArticleRetryQueue.js +0 -157
- package/.worktrees/canonical-insights-model/models/AiCreationRetryQueue.js +0 -127
- package/.worktrees/canonical-insights-model/models/Article.js +0 -212
- package/.worktrees/canonical-insights-model/models/AutomationRule.js +0 -173
- package/.worktrees/canonical-insights-model/models/BannerTemplate.js +0 -129
- package/.worktrees/canonical-insights-model/models/Buyers.js +0 -26
- package/.worktrees/canonical-insights-model/models/Campaign.js +0 -163
- package/.worktrees/canonical-insights-model/models/CampaignActionHistory.js +0 -86
- package/.worktrees/canonical-insights-model/models/CampaignCreationLog.js +0 -309
- package/.worktrees/canonical-insights-model/models/CampaignCreationLogV2.js +0 -314
- package/.worktrees/canonical-insights-model/models/CampaignHistory.js +0 -33
- package/.worktrees/canonical-insights-model/models/CanonicalInsights.js +0 -68
- package/.worktrees/canonical-insights-model/models/Channel.js +0 -55
- package/.worktrees/canonical-insights-model/models/CodefuelCampaign.js +0 -175
- package/.worktrees/canonical-insights-model/models/CodefuelCampaignKWHistory.js +0 -41
- package/.worktrees/canonical-insights-model/models/CodefuelKeywords.js +0 -35
- package/.worktrees/canonical-insights-model/models/CurrencyRate.js +0 -27
- package/.worktrees/canonical-insights-model/models/Domain.js +0 -40
- package/.worktrees/canonical-insights-model/models/DynamicFeed.js +0 -219
- package/.worktrees/canonical-insights-model/models/ExplorAdsChannel.js +0 -62
- package/.worktrees/canonical-insights-model/models/FacebookRetryQueue.js +0 -163
- package/.worktrees/canonical-insights-model/models/Feed.js +0 -34
- package/.worktrees/canonical-insights-model/models/FeedArticleConfiguration.js +0 -81
- package/.worktrees/canonical-insights-model/models/Files.js +0 -73
- package/.worktrees/canonical-insights-model/models/Folders.js +0 -133
- package/.worktrees/canonical-insights-model/models/FrontStoryChannel.js +0 -60
- package/.worktrees/canonical-insights-model/models/FrontStoryChannelV2.js +0 -60
- package/.worktrees/canonical-insights-model/models/GenericFlowRequest.js +0 -115
- package/.worktrees/canonical-insights-model/models/KeywordPerformance.js +0 -106
- package/.worktrees/canonical-insights-model/models/KeywordRotationState.js +0 -51
- package/.worktrees/canonical-insights-model/models/MidoWebChannel.js +0 -47
- package/.worktrees/canonical-insights-model/models/MineChannel.js +0 -43
- package/.worktrees/canonical-insights-model/models/Pages.js +0 -105
- package/.worktrees/canonical-insights-model/models/PipelineExecution.js +0 -59
- package/.worktrees/canonical-insights-model/models/PolicyDogsCreativeCache.js +0 -50
- package/.worktrees/canonical-insights-model/models/PolicyDogsImageCache.js +0 -30
- package/.worktrees/canonical-insights-model/models/Presets.js +0 -40
- package/.worktrees/canonical-insights-model/models/RSOCFeedCampaign.js +0 -375
- package/.worktrees/canonical-insights-model/models/RsocKeywordPerformance.js +0 -111
- package/.worktrees/canonical-insights-model/models/RuleAction.js +0 -90
- package/.worktrees/canonical-insights-model/models/RuleCondition.js +0 -137
- package/.worktrees/canonical-insights-model/models/RuleExecution.js +0 -107
- package/.worktrees/canonical-insights-model/models/RulesValues.js +0 -56
- package/.worktrees/canonical-insights-model/models/SupportedLocale.js +0 -24
- package/.worktrees/canonical-insights-model/models/SyncHistory.js +0 -250
- package/.worktrees/canonical-insights-model/models/TTQChannel.js +0 -42
- package/.worktrees/canonical-insights-model/models/TemplateMetadata.js +0 -260
- package/.worktrees/canonical-insights-model/models/Tier2_AdAccounts.js +0 -110
- package/.worktrees/canonical-insights-model/models/Tier2_Assets.js +0 -70
- package/.worktrees/canonical-insights-model/models/Tier2_BusinessManagers.js +0 -105
- package/.worktrees/canonical-insights-model/models/Tier2_CreditLines.js +0 -99
- package/.worktrees/canonical-insights-model/models/Tier2_Pages.js +0 -91
- package/.worktrees/canonical-insights-model/models/Tier2_Pixels.js +0 -82
- package/.worktrees/canonical-insights-model/models/Tier2_Tokens.js +0 -64
- package/.worktrees/canonical-insights-model/models/Tier2_UserAdAccounts.js +0 -83
- package/.worktrees/canonical-insights-model/models/TokenRotationState.js +0 -121
- package/.worktrees/canonical-insights-model/models/TonicCampaign.js +0 -97
- package/.worktrees/canonical-insights-model/models/TonicRSOCKeywordPerformance.js +0 -123
- package/.worktrees/canonical-insights-model/models/Users.js +0 -148
- package/.worktrees/canonical-insights-model/models/Vertical.js +0 -26
- package/.worktrees/canonical-insights-model/models/newFiles.js +0 -137
- package/.worktrees/canonical-insights-model/models/pixel.js +0 -47
- package/.worktrees/canonical-insights-model/package-lock.json +0 -405
- package/.worktrees/canonical-insights-model/package.json +0 -19
- package/.worktrees/canonical-insights-model/run.ps1 +0 -98
- package/.worktrees/canonical-insights-model/run.sh +0 -214
- package/.worktrees/canonical-insights-model/services/sequelizeService.js +0 -110
- package/.worktrees/creation-logs-platform-code/LICENSE +0 -21
- package/.worktrees/creation-logs-platform-code/README.md +0 -179
- package/.worktrees/creation-logs-platform-code/index.js +0 -169
- package/.worktrees/creation-logs-platform-code/jq.exe +0 -0
- package/.worktrees/creation-logs-platform-code/migrations/2026-05-17-PIXELS-FOLLOWUP.md +0 -85
- package/.worktrees/creation-logs-platform-code/migrations/2026-05-17-add-platform-to-ad.js +0 -19
- package/.worktrees/creation-logs-platform-code/migrations/2026-05-17-add-platform-to-adaccount.js +0 -19
- package/.worktrees/creation-logs-platform-code/migrations/2026-05-17-add-platform-to-adperformance.js +0 -19
- package/.worktrees/creation-logs-platform-code/migrations/2026-05-17-add-platform-to-adset.js +0 -19
- package/.worktrees/creation-logs-platform-code/migrations/2026-05-17-add-platform-to-adsetperformance.js +0 -19
- package/.worktrees/creation-logs-platform-code/migrations/2026-05-17-add-platform-to-aiarticleretryqueue.js +0 -19
- package/.worktrees/creation-logs-platform-code/migrations/2026-05-17-add-platform-to-aicampaignqueue.js +0 -19
- package/.worktrees/creation-logs-platform-code/migrations/2026-05-17-add-platform-to-article.js +0 -19
- package/.worktrees/creation-logs-platform-code/migrations/2026-05-17-add-platform-to-campaign.js +0 -19
- package/.worktrees/creation-logs-platform-code/migrations/2026-05-17-add-platform-to-codefuelcampaign.js +0 -19
- package/.worktrees/creation-logs-platform-code/migrations/2026-05-17-add-platform-to-dynamicfeed.js +0 -19
- package/.worktrees/creation-logs-platform-code/migrations/2026-05-17-add-platform-to-facebookretryqueue.js +0 -19
- package/.worktrees/creation-logs-platform-code/migrations/2026-05-17-add-platform-to-pages.js +0 -19
- package/.worktrees/creation-logs-platform-code/migrations/2026-05-17-add-platform-to-presets.js +0 -19
- package/.worktrees/creation-logs-platform-code/migrations/2026-05-18-add-platform-code-to-creation-logs.js +0 -65
- package/.worktrees/creation-logs-platform-code/migrations/RUN_ME_MANUALLY_2026-05-17.sql +0 -99
- package/.worktrees/creation-logs-platform-code/migrations/add-requested-from-dashboard-to-articles.js +0 -17
- package/.worktrees/creation-logs-platform-code/migrations/change-adset-name-to-text.js +0 -79
- package/.worktrees/creation-logs-platform-code/models/AICampaignQueue.js +0 -144
- package/.worktrees/creation-logs-platform-code/models/AIGenerationLog.js +0 -85
- package/.worktrees/creation-logs-platform-code/models/AIGenerationRequest.js +0 -212
- package/.worktrees/creation-logs-platform-code/models/ActivityHistory.js +0 -73
- package/.worktrees/creation-logs-platform-code/models/Ad.js +0 -300
- package/.worktrees/creation-logs-platform-code/models/AdAccount.js +0 -97
- package/.worktrees/creation-logs-platform-code/models/AdAccountValues.js +0 -26
- package/.worktrees/creation-logs-platform-code/models/AdHistory.js +0 -30
- package/.worktrees/creation-logs-platform-code/models/AdPerformance.js +0 -100
- package/.worktrees/creation-logs-platform-code/models/AdPerformanceHourly.js +0 -71
- package/.worktrees/creation-logs-platform-code/models/AdSet.js +0 -295
- package/.worktrees/creation-logs-platform-code/models/AdSetHistory.js +0 -30
- package/.worktrees/creation-logs-platform-code/models/AdsetPerformance.js +0 -132
- package/.worktrees/creation-logs-platform-code/models/AiArticleRetryQueue.js +0 -157
- package/.worktrees/creation-logs-platform-code/models/AiCreationRetryQueue.js +0 -127
- package/.worktrees/creation-logs-platform-code/models/Article.js +0 -212
- package/.worktrees/creation-logs-platform-code/models/AutomationRule.js +0 -173
- package/.worktrees/creation-logs-platform-code/models/BannerTemplate.js +0 -129
- package/.worktrees/creation-logs-platform-code/models/Buyers.js +0 -26
- package/.worktrees/creation-logs-platform-code/models/Campaign.js +0 -163
- package/.worktrees/creation-logs-platform-code/models/CampaignActionHistory.js +0 -86
- package/.worktrees/creation-logs-platform-code/models/CampaignCreationLog.js +0 -321
- package/.worktrees/creation-logs-platform-code/models/CampaignCreationLogV2.js +0 -322
- package/.worktrees/creation-logs-platform-code/models/CampaignHistory.js +0 -33
- package/.worktrees/creation-logs-platform-code/models/Channel.js +0 -55
- package/.worktrees/creation-logs-platform-code/models/CodefuelCampaign.js +0 -175
- package/.worktrees/creation-logs-platform-code/models/CodefuelCampaignKWHistory.js +0 -41
- package/.worktrees/creation-logs-platform-code/models/CodefuelKeywords.js +0 -35
- package/.worktrees/creation-logs-platform-code/models/CurrencyRate.js +0 -27
- package/.worktrees/creation-logs-platform-code/models/Domain.js +0 -40
- package/.worktrees/creation-logs-platform-code/models/DynamicFeed.js +0 -219
- package/.worktrees/creation-logs-platform-code/models/ExplorAdsChannel.js +0 -62
- package/.worktrees/creation-logs-platform-code/models/FacebookRetryQueue.js +0 -163
- package/.worktrees/creation-logs-platform-code/models/Feed.js +0 -34
- package/.worktrees/creation-logs-platform-code/models/FeedArticleConfiguration.js +0 -81
- package/.worktrees/creation-logs-platform-code/models/Files.js +0 -73
- package/.worktrees/creation-logs-platform-code/models/Folders.js +0 -133
- package/.worktrees/creation-logs-platform-code/models/FrontStoryChannel.js +0 -60
- package/.worktrees/creation-logs-platform-code/models/FrontStoryChannelV2.js +0 -60
- package/.worktrees/creation-logs-platform-code/models/GenericFlowRequest.js +0 -115
- package/.worktrees/creation-logs-platform-code/models/KeywordPerformance.js +0 -106
- package/.worktrees/creation-logs-platform-code/models/KeywordRotationState.js +0 -51
- package/.worktrees/creation-logs-platform-code/models/MidoWebChannel.js +0 -47
- package/.worktrees/creation-logs-platform-code/models/MineChannel.js +0 -43
- package/.worktrees/creation-logs-platform-code/models/Pages.js +0 -105
- package/.worktrees/creation-logs-platform-code/models/PipelineExecution.js +0 -59
- package/.worktrees/creation-logs-platform-code/models/PolicyDogsCreativeCache.js +0 -50
- package/.worktrees/creation-logs-platform-code/models/PolicyDogsImageCache.js +0 -30
- package/.worktrees/creation-logs-platform-code/models/Presets.js +0 -40
- package/.worktrees/creation-logs-platform-code/models/RSOCFeedCampaign.js +0 -375
- package/.worktrees/creation-logs-platform-code/models/RsocKeywordPerformance.js +0 -111
- package/.worktrees/creation-logs-platform-code/models/RuleAction.js +0 -90
- package/.worktrees/creation-logs-platform-code/models/RuleCondition.js +0 -137
- package/.worktrees/creation-logs-platform-code/models/RuleExecution.js +0 -107
- package/.worktrees/creation-logs-platform-code/models/RulesValues.js +0 -56
- package/.worktrees/creation-logs-platform-code/models/SupportedLocale.js +0 -24
- package/.worktrees/creation-logs-platform-code/models/SyncHistory.js +0 -250
- package/.worktrees/creation-logs-platform-code/models/TTQChannel.js +0 -42
- package/.worktrees/creation-logs-platform-code/models/TemplateMetadata.js +0 -260
- package/.worktrees/creation-logs-platform-code/models/Tier2_AdAccounts.js +0 -110
- package/.worktrees/creation-logs-platform-code/models/Tier2_Assets.js +0 -70
- package/.worktrees/creation-logs-platform-code/models/Tier2_BusinessManagers.js +0 -105
- package/.worktrees/creation-logs-platform-code/models/Tier2_CreditLines.js +0 -99
- package/.worktrees/creation-logs-platform-code/models/Tier2_Pages.js +0 -91
- package/.worktrees/creation-logs-platform-code/models/Tier2_Pixels.js +0 -82
- package/.worktrees/creation-logs-platform-code/models/Tier2_Tokens.js +0 -64
- package/.worktrees/creation-logs-platform-code/models/Tier2_UserAdAccounts.js +0 -83
- package/.worktrees/creation-logs-platform-code/models/TokenRotationState.js +0 -121
- package/.worktrees/creation-logs-platform-code/models/TonicCampaign.js +0 -97
- package/.worktrees/creation-logs-platform-code/models/TonicRSOCKeywordPerformance.js +0 -123
- package/.worktrees/creation-logs-platform-code/models/Users.js +0 -148
- package/.worktrees/creation-logs-platform-code/models/Vertical.js +0 -26
- package/.worktrees/creation-logs-platform-code/models/newFiles.js +0 -137
- package/.worktrees/creation-logs-platform-code/models/pixel.js +0 -47
- package/.worktrees/creation-logs-platform-code/package-lock.json +0 -405
- package/.worktrees/creation-logs-platform-code/package.json +0 -19
- package/.worktrees/creation-logs-platform-code/run.ps1 +0 -98
- package/.worktrees/creation-logs-platform-code/run.sh +0 -214
- package/.worktrees/creation-logs-platform-code/services/sequelizeService.js +0 -110
- package/.worktrees/pixels-platform-code/LICENSE +0 -21
- package/.worktrees/pixels-platform-code/README.md +0 -179
- package/.worktrees/pixels-platform-code/index.js +0 -169
- package/.worktrees/pixels-platform-code/jq.exe +0 -0
- package/.worktrees/pixels-platform-code/migrations/2026-05-17-PIXELS-FOLLOWUP.md +0 -85
- package/.worktrees/pixels-platform-code/migrations/2026-05-17-add-platform-to-ad.js +0 -19
- package/.worktrees/pixels-platform-code/migrations/2026-05-17-add-platform-to-adaccount.js +0 -19
- package/.worktrees/pixels-platform-code/migrations/2026-05-17-add-platform-to-adperformance.js +0 -19
- package/.worktrees/pixels-platform-code/migrations/2026-05-17-add-platform-to-adset.js +0 -19
- package/.worktrees/pixels-platform-code/migrations/2026-05-17-add-platform-to-adsetperformance.js +0 -19
- package/.worktrees/pixels-platform-code/migrations/2026-05-17-add-platform-to-aiarticleretryqueue.js +0 -19
- package/.worktrees/pixels-platform-code/migrations/2026-05-17-add-platform-to-aicampaignqueue.js +0 -19
- package/.worktrees/pixels-platform-code/migrations/2026-05-17-add-platform-to-article.js +0 -19
- package/.worktrees/pixels-platform-code/migrations/2026-05-17-add-platform-to-campaign.js +0 -19
- package/.worktrees/pixels-platform-code/migrations/2026-05-17-add-platform-to-codefuelcampaign.js +0 -19
- package/.worktrees/pixels-platform-code/migrations/2026-05-17-add-platform-to-dynamicfeed.js +0 -19
- package/.worktrees/pixels-platform-code/migrations/2026-05-17-add-platform-to-facebookretryqueue.js +0 -19
- package/.worktrees/pixels-platform-code/migrations/2026-05-17-add-platform-to-pages.js +0 -19
- package/.worktrees/pixels-platform-code/migrations/2026-05-17-add-platform-to-presets.js +0 -19
- package/.worktrees/pixels-platform-code/migrations/2026-05-18-add-platform-code-to-pixels.js +0 -55
- package/.worktrees/pixels-platform-code/migrations/RUN_ME_MANUALLY_2026-05-17.sql +0 -99
- package/.worktrees/pixels-platform-code/migrations/add-requested-from-dashboard-to-articles.js +0 -17
- package/.worktrees/pixels-platform-code/migrations/change-adset-name-to-text.js +0 -79
- package/.worktrees/pixels-platform-code/models/AICampaignQueue.js +0 -144
- package/.worktrees/pixels-platform-code/models/AIGenerationLog.js +0 -85
- package/.worktrees/pixels-platform-code/models/AIGenerationRequest.js +0 -212
- package/.worktrees/pixels-platform-code/models/ActivityHistory.js +0 -73
- package/.worktrees/pixels-platform-code/models/Ad.js +0 -300
- package/.worktrees/pixels-platform-code/models/AdAccount.js +0 -97
- package/.worktrees/pixels-platform-code/models/AdAccountValues.js +0 -26
- package/.worktrees/pixels-platform-code/models/AdHistory.js +0 -30
- package/.worktrees/pixels-platform-code/models/AdPerformance.js +0 -100
- package/.worktrees/pixels-platform-code/models/AdPerformanceHourly.js +0 -71
- package/.worktrees/pixels-platform-code/models/AdSet.js +0 -295
- package/.worktrees/pixels-platform-code/models/AdSetHistory.js +0 -30
- package/.worktrees/pixels-platform-code/models/AdsetPerformance.js +0 -132
- package/.worktrees/pixels-platform-code/models/AiArticleRetryQueue.js +0 -157
- package/.worktrees/pixels-platform-code/models/AiCreationRetryQueue.js +0 -127
- package/.worktrees/pixels-platform-code/models/Article.js +0 -212
- package/.worktrees/pixels-platform-code/models/AutomationRule.js +0 -173
- package/.worktrees/pixels-platform-code/models/BannerTemplate.js +0 -129
- package/.worktrees/pixels-platform-code/models/Buyers.js +0 -26
- package/.worktrees/pixels-platform-code/models/Campaign.js +0 -163
- package/.worktrees/pixels-platform-code/models/CampaignActionHistory.js +0 -86
- package/.worktrees/pixels-platform-code/models/CampaignCreationLog.js +0 -309
- package/.worktrees/pixels-platform-code/models/CampaignCreationLogV2.js +0 -314
- package/.worktrees/pixels-platform-code/models/CampaignHistory.js +0 -33
- package/.worktrees/pixels-platform-code/models/Channel.js +0 -55
- package/.worktrees/pixels-platform-code/models/CodefuelCampaign.js +0 -175
- package/.worktrees/pixels-platform-code/models/CodefuelCampaignKWHistory.js +0 -41
- package/.worktrees/pixels-platform-code/models/CodefuelKeywords.js +0 -35
- package/.worktrees/pixels-platform-code/models/CurrencyRate.js +0 -27
- package/.worktrees/pixels-platform-code/models/Domain.js +0 -40
- package/.worktrees/pixels-platform-code/models/DynamicFeed.js +0 -219
- package/.worktrees/pixels-platform-code/models/ExplorAdsChannel.js +0 -62
- package/.worktrees/pixels-platform-code/models/FacebookRetryQueue.js +0 -163
- package/.worktrees/pixels-platform-code/models/Feed.js +0 -34
- package/.worktrees/pixels-platform-code/models/FeedArticleConfiguration.js +0 -81
- package/.worktrees/pixels-platform-code/models/Files.js +0 -73
- package/.worktrees/pixels-platform-code/models/Folders.js +0 -133
- package/.worktrees/pixels-platform-code/models/FrontStoryChannel.js +0 -60
- package/.worktrees/pixels-platform-code/models/FrontStoryChannelV2.js +0 -60
- package/.worktrees/pixels-platform-code/models/GenericFlowRequest.js +0 -115
- package/.worktrees/pixels-platform-code/models/KeywordPerformance.js +0 -106
- package/.worktrees/pixels-platform-code/models/KeywordRotationState.js +0 -51
- package/.worktrees/pixels-platform-code/models/MidoWebChannel.js +0 -47
- package/.worktrees/pixels-platform-code/models/MineChannel.js +0 -43
- package/.worktrees/pixels-platform-code/models/Pages.js +0 -105
- package/.worktrees/pixels-platform-code/models/PipelineExecution.js +0 -59
- package/.worktrees/pixels-platform-code/models/PolicyDogsCreativeCache.js +0 -50
- package/.worktrees/pixels-platform-code/models/PolicyDogsImageCache.js +0 -30
- package/.worktrees/pixels-platform-code/models/Presets.js +0 -40
- package/.worktrees/pixels-platform-code/models/RSOCFeedCampaign.js +0 -375
- package/.worktrees/pixels-platform-code/models/RsocKeywordPerformance.js +0 -111
- package/.worktrees/pixels-platform-code/models/RuleAction.js +0 -90
- package/.worktrees/pixels-platform-code/models/RuleCondition.js +0 -137
- package/.worktrees/pixels-platform-code/models/RuleExecution.js +0 -107
- package/.worktrees/pixels-platform-code/models/RulesValues.js +0 -56
- package/.worktrees/pixels-platform-code/models/SupportedLocale.js +0 -24
- package/.worktrees/pixels-platform-code/models/SyncHistory.js +0 -250
- package/.worktrees/pixels-platform-code/models/TTQChannel.js +0 -42
- package/.worktrees/pixels-platform-code/models/TemplateMetadata.js +0 -260
- package/.worktrees/pixels-platform-code/models/Tier2_AdAccounts.js +0 -110
- package/.worktrees/pixels-platform-code/models/Tier2_Assets.js +0 -70
- package/.worktrees/pixels-platform-code/models/Tier2_BusinessManagers.js +0 -105
- package/.worktrees/pixels-platform-code/models/Tier2_CreditLines.js +0 -99
- package/.worktrees/pixels-platform-code/models/Tier2_Pages.js +0 -91
- package/.worktrees/pixels-platform-code/models/Tier2_Pixels.js +0 -82
- package/.worktrees/pixels-platform-code/models/Tier2_Tokens.js +0 -64
- package/.worktrees/pixels-platform-code/models/Tier2_UserAdAccounts.js +0 -83
- package/.worktrees/pixels-platform-code/models/TokenRotationState.js +0 -121
- package/.worktrees/pixels-platform-code/models/TonicCampaign.js +0 -97
- package/.worktrees/pixels-platform-code/models/TonicRSOCKeywordPerformance.js +0 -123
- package/.worktrees/pixels-platform-code/models/Users.js +0 -148
- package/.worktrees/pixels-platform-code/models/Vertical.js +0 -26
- package/.worktrees/pixels-platform-code/models/newFiles.js +0 -137
- package/.worktrees/pixels-platform-code/models/pixel.js +0 -53
- package/.worktrees/pixels-platform-code/package-lock.json +0 -405
- package/.worktrees/pixels-platform-code/package.json +0 -19
- package/.worktrees/pixels-platform-code/run.ps1 +0 -98
- package/.worktrees/pixels-platform-code/run.sh +0 -214
- package/.worktrees/pixels-platform-code/services/sequelizeService.js +0 -110
- package/.worktrees/rsoc-feed-campaigns-platform-code/LICENSE +0 -21
- package/.worktrees/rsoc-feed-campaigns-platform-code/README.md +0 -179
- package/.worktrees/rsoc-feed-campaigns-platform-code/index.js +0 -169
- package/.worktrees/rsoc-feed-campaigns-platform-code/jq.exe +0 -0
- package/.worktrees/rsoc-feed-campaigns-platform-code/migrations/2026-05-17-PIXELS-FOLLOWUP.md +0 -85
- package/.worktrees/rsoc-feed-campaigns-platform-code/migrations/2026-05-17-add-platform-to-ad.js +0 -19
- package/.worktrees/rsoc-feed-campaigns-platform-code/migrations/2026-05-17-add-platform-to-adaccount.js +0 -19
- package/.worktrees/rsoc-feed-campaigns-platform-code/migrations/2026-05-17-add-platform-to-adperformance.js +0 -19
- package/.worktrees/rsoc-feed-campaigns-platform-code/migrations/2026-05-17-add-platform-to-adset.js +0 -19
- package/.worktrees/rsoc-feed-campaigns-platform-code/migrations/2026-05-17-add-platform-to-adsetperformance.js +0 -19
- package/.worktrees/rsoc-feed-campaigns-platform-code/migrations/2026-05-17-add-platform-to-aiarticleretryqueue.js +0 -19
- package/.worktrees/rsoc-feed-campaigns-platform-code/migrations/2026-05-17-add-platform-to-aicampaignqueue.js +0 -19
- package/.worktrees/rsoc-feed-campaigns-platform-code/migrations/2026-05-17-add-platform-to-article.js +0 -19
- package/.worktrees/rsoc-feed-campaigns-platform-code/migrations/2026-05-17-add-platform-to-campaign.js +0 -19
- package/.worktrees/rsoc-feed-campaigns-platform-code/migrations/2026-05-17-add-platform-to-codefuelcampaign.js +0 -19
- package/.worktrees/rsoc-feed-campaigns-platform-code/migrations/2026-05-17-add-platform-to-dynamicfeed.js +0 -19
- package/.worktrees/rsoc-feed-campaigns-platform-code/migrations/2026-05-17-add-platform-to-facebookretryqueue.js +0 -19
- package/.worktrees/rsoc-feed-campaigns-platform-code/migrations/2026-05-17-add-platform-to-pages.js +0 -19
- package/.worktrees/rsoc-feed-campaigns-platform-code/migrations/2026-05-17-add-platform-to-presets.js +0 -19
- package/.worktrees/rsoc-feed-campaigns-platform-code/migrations/2026-05-18-add-platform-code-to-rsoc-feed-campaigns.js +0 -55
- package/.worktrees/rsoc-feed-campaigns-platform-code/migrations/RUN_ME_MANUALLY_2026-05-17.sql +0 -99
- package/.worktrees/rsoc-feed-campaigns-platform-code/migrations/add-requested-from-dashboard-to-articles.js +0 -17
- package/.worktrees/rsoc-feed-campaigns-platform-code/migrations/change-adset-name-to-text.js +0 -79
- package/.worktrees/rsoc-feed-campaigns-platform-code/models/AICampaignQueue.js +0 -144
- package/.worktrees/rsoc-feed-campaigns-platform-code/models/AIGenerationLog.js +0 -85
- package/.worktrees/rsoc-feed-campaigns-platform-code/models/AIGenerationRequest.js +0 -212
- package/.worktrees/rsoc-feed-campaigns-platform-code/models/ActivityHistory.js +0 -73
- package/.worktrees/rsoc-feed-campaigns-platform-code/models/Ad.js +0 -300
- package/.worktrees/rsoc-feed-campaigns-platform-code/models/AdAccount.js +0 -97
- package/.worktrees/rsoc-feed-campaigns-platform-code/models/AdAccountValues.js +0 -26
- package/.worktrees/rsoc-feed-campaigns-platform-code/models/AdHistory.js +0 -30
- package/.worktrees/rsoc-feed-campaigns-platform-code/models/AdPerformance.js +0 -100
- package/.worktrees/rsoc-feed-campaigns-platform-code/models/AdPerformanceHourly.js +0 -71
- package/.worktrees/rsoc-feed-campaigns-platform-code/models/AdSet.js +0 -295
- package/.worktrees/rsoc-feed-campaigns-platform-code/models/AdSetHistory.js +0 -30
- package/.worktrees/rsoc-feed-campaigns-platform-code/models/AdsetPerformance.js +0 -132
- package/.worktrees/rsoc-feed-campaigns-platform-code/models/AiArticleRetryQueue.js +0 -157
- package/.worktrees/rsoc-feed-campaigns-platform-code/models/AiCreationRetryQueue.js +0 -127
- package/.worktrees/rsoc-feed-campaigns-platform-code/models/Article.js +0 -212
- package/.worktrees/rsoc-feed-campaigns-platform-code/models/AutomationRule.js +0 -173
- package/.worktrees/rsoc-feed-campaigns-platform-code/models/BannerTemplate.js +0 -129
- package/.worktrees/rsoc-feed-campaigns-platform-code/models/Buyers.js +0 -26
- package/.worktrees/rsoc-feed-campaigns-platform-code/models/Campaign.js +0 -163
- package/.worktrees/rsoc-feed-campaigns-platform-code/models/CampaignActionHistory.js +0 -86
- package/.worktrees/rsoc-feed-campaigns-platform-code/models/CampaignCreationLog.js +0 -309
- package/.worktrees/rsoc-feed-campaigns-platform-code/models/CampaignCreationLogV2.js +0 -314
- package/.worktrees/rsoc-feed-campaigns-platform-code/models/CampaignHistory.js +0 -33
- package/.worktrees/rsoc-feed-campaigns-platform-code/models/Channel.js +0 -55
- package/.worktrees/rsoc-feed-campaigns-platform-code/models/CodefuelCampaign.js +0 -175
- package/.worktrees/rsoc-feed-campaigns-platform-code/models/CodefuelCampaignKWHistory.js +0 -41
- package/.worktrees/rsoc-feed-campaigns-platform-code/models/CodefuelKeywords.js +0 -35
- package/.worktrees/rsoc-feed-campaigns-platform-code/models/CurrencyRate.js +0 -27
- package/.worktrees/rsoc-feed-campaigns-platform-code/models/Domain.js +0 -40
- package/.worktrees/rsoc-feed-campaigns-platform-code/models/DynamicFeed.js +0 -219
- package/.worktrees/rsoc-feed-campaigns-platform-code/models/ExplorAdsChannel.js +0 -62
- package/.worktrees/rsoc-feed-campaigns-platform-code/models/FacebookRetryQueue.js +0 -163
- package/.worktrees/rsoc-feed-campaigns-platform-code/models/Feed.js +0 -34
- package/.worktrees/rsoc-feed-campaigns-platform-code/models/FeedArticleConfiguration.js +0 -81
- package/.worktrees/rsoc-feed-campaigns-platform-code/models/Files.js +0 -73
- package/.worktrees/rsoc-feed-campaigns-platform-code/models/Folders.js +0 -133
- package/.worktrees/rsoc-feed-campaigns-platform-code/models/FrontStoryChannel.js +0 -60
- package/.worktrees/rsoc-feed-campaigns-platform-code/models/FrontStoryChannelV2.js +0 -60
- package/.worktrees/rsoc-feed-campaigns-platform-code/models/GenericFlowRequest.js +0 -115
- package/.worktrees/rsoc-feed-campaigns-platform-code/models/KeywordPerformance.js +0 -106
- package/.worktrees/rsoc-feed-campaigns-platform-code/models/KeywordRotationState.js +0 -51
- package/.worktrees/rsoc-feed-campaigns-platform-code/models/MidoWebChannel.js +0 -47
- package/.worktrees/rsoc-feed-campaigns-platform-code/models/MineChannel.js +0 -43
- package/.worktrees/rsoc-feed-campaigns-platform-code/models/Pages.js +0 -105
- package/.worktrees/rsoc-feed-campaigns-platform-code/models/PipelineExecution.js +0 -59
- package/.worktrees/rsoc-feed-campaigns-platform-code/models/PolicyDogsCreativeCache.js +0 -50
- package/.worktrees/rsoc-feed-campaigns-platform-code/models/PolicyDogsImageCache.js +0 -30
- package/.worktrees/rsoc-feed-campaigns-platform-code/models/Presets.js +0 -40
- package/.worktrees/rsoc-feed-campaigns-platform-code/models/RSOCFeedCampaign.js +0 -381
- package/.worktrees/rsoc-feed-campaigns-platform-code/models/RsocKeywordPerformance.js +0 -111
- package/.worktrees/rsoc-feed-campaigns-platform-code/models/RuleAction.js +0 -90
- package/.worktrees/rsoc-feed-campaigns-platform-code/models/RuleCondition.js +0 -137
- package/.worktrees/rsoc-feed-campaigns-platform-code/models/RuleExecution.js +0 -107
- package/.worktrees/rsoc-feed-campaigns-platform-code/models/RulesValues.js +0 -56
- package/.worktrees/rsoc-feed-campaigns-platform-code/models/SupportedLocale.js +0 -24
- package/.worktrees/rsoc-feed-campaigns-platform-code/models/SyncHistory.js +0 -250
- package/.worktrees/rsoc-feed-campaigns-platform-code/models/TTQChannel.js +0 -42
- package/.worktrees/rsoc-feed-campaigns-platform-code/models/TemplateMetadata.js +0 -260
- package/.worktrees/rsoc-feed-campaigns-platform-code/models/Tier2_AdAccounts.js +0 -110
- package/.worktrees/rsoc-feed-campaigns-platform-code/models/Tier2_Assets.js +0 -70
- package/.worktrees/rsoc-feed-campaigns-platform-code/models/Tier2_BusinessManagers.js +0 -105
- package/.worktrees/rsoc-feed-campaigns-platform-code/models/Tier2_CreditLines.js +0 -99
- package/.worktrees/rsoc-feed-campaigns-platform-code/models/Tier2_Pages.js +0 -91
- package/.worktrees/rsoc-feed-campaigns-platform-code/models/Tier2_Pixels.js +0 -82
- package/.worktrees/rsoc-feed-campaigns-platform-code/models/Tier2_Tokens.js +0 -64
- package/.worktrees/rsoc-feed-campaigns-platform-code/models/Tier2_UserAdAccounts.js +0 -83
- package/.worktrees/rsoc-feed-campaigns-platform-code/models/TokenRotationState.js +0 -121
- package/.worktrees/rsoc-feed-campaigns-platform-code/models/TonicCampaign.js +0 -97
- package/.worktrees/rsoc-feed-campaigns-platform-code/models/TonicRSOCKeywordPerformance.js +0 -123
- package/.worktrees/rsoc-feed-campaigns-platform-code/models/Users.js +0 -148
- package/.worktrees/rsoc-feed-campaigns-platform-code/models/Vertical.js +0 -26
- package/.worktrees/rsoc-feed-campaigns-platform-code/models/newFiles.js +0 -137
- package/.worktrees/rsoc-feed-campaigns-platform-code/models/pixel.js +0 -47
- package/.worktrees/rsoc-feed-campaigns-platform-code/package-lock.json +0 -405
- package/.worktrees/rsoc-feed-campaigns-platform-code/package.json +0 -19
- package/.worktrees/rsoc-feed-campaigns-platform-code/run.ps1 +0 -98
- package/.worktrees/rsoc-feed-campaigns-platform-code/run.sh +0 -214
- package/.worktrees/rsoc-feed-campaigns-platform-code/services/sequelizeService.js +0 -110
- package/.worktrees/tt-snp-adset-ad-tables/LICENSE +0 -21
- package/.worktrees/tt-snp-adset-ad-tables/README.md +0 -179
- package/.worktrees/tt-snp-adset-ad-tables/index.js +0 -169
- package/.worktrees/tt-snp-adset-ad-tables/jq.exe +0 -0
- package/.worktrees/tt-snp-adset-ad-tables/migrations/2026-05-17-PIXELS-FOLLOWUP.md +0 -85
- package/.worktrees/tt-snp-adset-ad-tables/migrations/2026-05-17-add-platform-to-ad.js +0 -19
- package/.worktrees/tt-snp-adset-ad-tables/migrations/2026-05-17-add-platform-to-adaccount.js +0 -19
- package/.worktrees/tt-snp-adset-ad-tables/migrations/2026-05-17-add-platform-to-adperformance.js +0 -19
- package/.worktrees/tt-snp-adset-ad-tables/migrations/2026-05-17-add-platform-to-adset.js +0 -19
- package/.worktrees/tt-snp-adset-ad-tables/migrations/2026-05-17-add-platform-to-adsetperformance.js +0 -19
- package/.worktrees/tt-snp-adset-ad-tables/migrations/2026-05-17-add-platform-to-aiarticleretryqueue.js +0 -19
- package/.worktrees/tt-snp-adset-ad-tables/migrations/2026-05-17-add-platform-to-aicampaignqueue.js +0 -19
- package/.worktrees/tt-snp-adset-ad-tables/migrations/2026-05-17-add-platform-to-article.js +0 -19
- package/.worktrees/tt-snp-adset-ad-tables/migrations/2026-05-17-add-platform-to-campaign.js +0 -19
- package/.worktrees/tt-snp-adset-ad-tables/migrations/2026-05-17-add-platform-to-codefuelcampaign.js +0 -19
- package/.worktrees/tt-snp-adset-ad-tables/migrations/2026-05-17-add-platform-to-dynamicfeed.js +0 -19
- package/.worktrees/tt-snp-adset-ad-tables/migrations/2026-05-17-add-platform-to-facebookretryqueue.js +0 -19
- package/.worktrees/tt-snp-adset-ad-tables/migrations/2026-05-17-add-platform-to-pages.js +0 -19
- package/.worktrees/tt-snp-adset-ad-tables/migrations/2026-05-17-add-platform-to-presets.js +0 -19
- package/.worktrees/tt-snp-adset-ad-tables/migrations/2026-05-18-create-tt-snp-adset-ad-tables.js +0 -309
- package/.worktrees/tt-snp-adset-ad-tables/migrations/RUN_ME_MANUALLY_2026-05-17.sql +0 -99
- package/.worktrees/tt-snp-adset-ad-tables/migrations/add-requested-from-dashboard-to-articles.js +0 -17
- package/.worktrees/tt-snp-adset-ad-tables/migrations/change-adset-name-to-text.js +0 -79
- package/.worktrees/tt-snp-adset-ad-tables/models/AICampaignQueue.js +0 -144
- package/.worktrees/tt-snp-adset-ad-tables/models/AIGenerationLog.js +0 -85
- package/.worktrees/tt-snp-adset-ad-tables/models/AIGenerationRequest.js +0 -212
- package/.worktrees/tt-snp-adset-ad-tables/models/ActivityHistory.js +0 -73
- package/.worktrees/tt-snp-adset-ad-tables/models/Ad.js +0 -300
- package/.worktrees/tt-snp-adset-ad-tables/models/AdAccount.js +0 -97
- package/.worktrees/tt-snp-adset-ad-tables/models/AdAccountValues.js +0 -26
- package/.worktrees/tt-snp-adset-ad-tables/models/AdHistory.js +0 -30
- package/.worktrees/tt-snp-adset-ad-tables/models/AdPerformance.js +0 -100
- package/.worktrees/tt-snp-adset-ad-tables/models/AdPerformanceHourly.js +0 -71
- package/.worktrees/tt-snp-adset-ad-tables/models/AdSet.js +0 -295
- package/.worktrees/tt-snp-adset-ad-tables/models/AdSetHistory.js +0 -30
- package/.worktrees/tt-snp-adset-ad-tables/models/AdsetPerformance.js +0 -132
- package/.worktrees/tt-snp-adset-ad-tables/models/AiArticleRetryQueue.js +0 -157
- package/.worktrees/tt-snp-adset-ad-tables/models/AiCreationRetryQueue.js +0 -127
- package/.worktrees/tt-snp-adset-ad-tables/models/Article.js +0 -212
- package/.worktrees/tt-snp-adset-ad-tables/models/AutomationRule.js +0 -173
- package/.worktrees/tt-snp-adset-ad-tables/models/BannerTemplate.js +0 -129
- package/.worktrees/tt-snp-adset-ad-tables/models/Buyers.js +0 -26
- package/.worktrees/tt-snp-adset-ad-tables/models/Campaign.js +0 -163
- package/.worktrees/tt-snp-adset-ad-tables/models/CampaignActionHistory.js +0 -86
- package/.worktrees/tt-snp-adset-ad-tables/models/CampaignCreationLog.js +0 -309
- package/.worktrees/tt-snp-adset-ad-tables/models/CampaignCreationLogV2.js +0 -314
- package/.worktrees/tt-snp-adset-ad-tables/models/CampaignHistory.js +0 -33
- package/.worktrees/tt-snp-adset-ad-tables/models/Channel.js +0 -55
- package/.worktrees/tt-snp-adset-ad-tables/models/CodefuelCampaign.js +0 -175
- package/.worktrees/tt-snp-adset-ad-tables/models/CodefuelCampaignKWHistory.js +0 -41
- package/.worktrees/tt-snp-adset-ad-tables/models/CodefuelKeywords.js +0 -35
- package/.worktrees/tt-snp-adset-ad-tables/models/CurrencyRate.js +0 -27
- package/.worktrees/tt-snp-adset-ad-tables/models/Domain.js +0 -40
- package/.worktrees/tt-snp-adset-ad-tables/models/DynamicFeed.js +0 -219
- package/.worktrees/tt-snp-adset-ad-tables/models/ExplorAdsChannel.js +0 -62
- package/.worktrees/tt-snp-adset-ad-tables/models/FacebookRetryQueue.js +0 -163
- package/.worktrees/tt-snp-adset-ad-tables/models/Feed.js +0 -34
- package/.worktrees/tt-snp-adset-ad-tables/models/FeedArticleConfiguration.js +0 -81
- package/.worktrees/tt-snp-adset-ad-tables/models/Files.js +0 -73
- package/.worktrees/tt-snp-adset-ad-tables/models/Folders.js +0 -133
- package/.worktrees/tt-snp-adset-ad-tables/models/FrontStoryChannel.js +0 -60
- package/.worktrees/tt-snp-adset-ad-tables/models/FrontStoryChannelV2.js +0 -60
- package/.worktrees/tt-snp-adset-ad-tables/models/GenericFlowRequest.js +0 -115
- package/.worktrees/tt-snp-adset-ad-tables/models/KeywordPerformance.js +0 -106
- package/.worktrees/tt-snp-adset-ad-tables/models/KeywordRotationState.js +0 -51
- package/.worktrees/tt-snp-adset-ad-tables/models/MidoWebChannel.js +0 -47
- package/.worktrees/tt-snp-adset-ad-tables/models/MineChannel.js +0 -43
- package/.worktrees/tt-snp-adset-ad-tables/models/Pages.js +0 -105
- package/.worktrees/tt-snp-adset-ad-tables/models/PipelineExecution.js +0 -59
- package/.worktrees/tt-snp-adset-ad-tables/models/PolicyDogsCreativeCache.js +0 -50
- package/.worktrees/tt-snp-adset-ad-tables/models/PolicyDogsImageCache.js +0 -30
- package/.worktrees/tt-snp-adset-ad-tables/models/Presets.js +0 -40
- package/.worktrees/tt-snp-adset-ad-tables/models/RSOCFeedCampaign.js +0 -375
- package/.worktrees/tt-snp-adset-ad-tables/models/RsocKeywordPerformance.js +0 -111
- package/.worktrees/tt-snp-adset-ad-tables/models/RuleAction.js +0 -90
- package/.worktrees/tt-snp-adset-ad-tables/models/RuleCondition.js +0 -137
- package/.worktrees/tt-snp-adset-ad-tables/models/RuleExecution.js +0 -107
- package/.worktrees/tt-snp-adset-ad-tables/models/RulesValues.js +0 -56
- package/.worktrees/tt-snp-adset-ad-tables/models/SnapchatAd.js +0 -69
- package/.worktrees/tt-snp-adset-ad-tables/models/SnapchatAdSquad.js +0 -92
- package/.worktrees/tt-snp-adset-ad-tables/models/SupportedLocale.js +0 -24
- package/.worktrees/tt-snp-adset-ad-tables/models/SyncHistory.js +0 -250
- package/.worktrees/tt-snp-adset-ad-tables/models/TTQChannel.js +0 -42
- package/.worktrees/tt-snp-adset-ad-tables/models/TemplateMetadata.js +0 -260
- package/.worktrees/tt-snp-adset-ad-tables/models/Tier2_AdAccounts.js +0 -110
- package/.worktrees/tt-snp-adset-ad-tables/models/Tier2_Assets.js +0 -70
- package/.worktrees/tt-snp-adset-ad-tables/models/Tier2_BusinessManagers.js +0 -105
- package/.worktrees/tt-snp-adset-ad-tables/models/Tier2_CreditLines.js +0 -99
- package/.worktrees/tt-snp-adset-ad-tables/models/Tier2_Pages.js +0 -91
- package/.worktrees/tt-snp-adset-ad-tables/models/Tier2_Pixels.js +0 -82
- package/.worktrees/tt-snp-adset-ad-tables/models/Tier2_Tokens.js +0 -64
- package/.worktrees/tt-snp-adset-ad-tables/models/Tier2_UserAdAccounts.js +0 -83
- package/.worktrees/tt-snp-adset-ad-tables/models/TikTokAd.js +0 -71
- package/.worktrees/tt-snp-adset-ad-tables/models/TikTokAdGroup.js +0 -82
- package/.worktrees/tt-snp-adset-ad-tables/models/TokenRotationState.js +0 -121
- package/.worktrees/tt-snp-adset-ad-tables/models/TonicCampaign.js +0 -97
- package/.worktrees/tt-snp-adset-ad-tables/models/TonicRSOCKeywordPerformance.js +0 -123
- package/.worktrees/tt-snp-adset-ad-tables/models/Users.js +0 -148
- package/.worktrees/tt-snp-adset-ad-tables/models/Vertical.js +0 -26
- package/.worktrees/tt-snp-adset-ad-tables/models/newFiles.js +0 -137
- package/.worktrees/tt-snp-adset-ad-tables/models/pixel.js +0 -47
- package/.worktrees/tt-snp-adset-ad-tables/package-lock.json +0 -405
- package/.worktrees/tt-snp-adset-ad-tables/package.json +0 -19
- package/.worktrees/tt-snp-adset-ad-tables/run.ps1 +0 -98
- package/.worktrees/tt-snp-adset-ad-tables/run.sh +0 -214
- package/.worktrees/tt-snp-adset-ad-tables/services/sequelizeService.js +0 -110
- package/.worktrees/tt-snp-asset-tables/LICENSE +0 -21
- package/.worktrees/tt-snp-asset-tables/README.md +0 -179
- package/.worktrees/tt-snp-asset-tables/index.js +0 -169
- package/.worktrees/tt-snp-asset-tables/jq.exe +0 -0
- package/.worktrees/tt-snp-asset-tables/migrations/2026-05-17-PIXELS-FOLLOWUP.md +0 -85
- package/.worktrees/tt-snp-asset-tables/migrations/2026-05-17-add-platform-to-ad.js +0 -19
- package/.worktrees/tt-snp-asset-tables/migrations/2026-05-17-add-platform-to-adaccount.js +0 -19
- package/.worktrees/tt-snp-asset-tables/migrations/2026-05-17-add-platform-to-adperformance.js +0 -19
- package/.worktrees/tt-snp-asset-tables/migrations/2026-05-17-add-platform-to-adset.js +0 -19
- package/.worktrees/tt-snp-asset-tables/migrations/2026-05-17-add-platform-to-adsetperformance.js +0 -19
- package/.worktrees/tt-snp-asset-tables/migrations/2026-05-17-add-platform-to-aiarticleretryqueue.js +0 -19
- package/.worktrees/tt-snp-asset-tables/migrations/2026-05-17-add-platform-to-aicampaignqueue.js +0 -19
- package/.worktrees/tt-snp-asset-tables/migrations/2026-05-17-add-platform-to-article.js +0 -19
- package/.worktrees/tt-snp-asset-tables/migrations/2026-05-17-add-platform-to-campaign.js +0 -19
- package/.worktrees/tt-snp-asset-tables/migrations/2026-05-17-add-platform-to-codefuelcampaign.js +0 -19
- package/.worktrees/tt-snp-asset-tables/migrations/2026-05-17-add-platform-to-dynamicfeed.js +0 -19
- package/.worktrees/tt-snp-asset-tables/migrations/2026-05-17-add-platform-to-facebookretryqueue.js +0 -19
- package/.worktrees/tt-snp-asset-tables/migrations/2026-05-17-add-platform-to-pages.js +0 -19
- package/.worktrees/tt-snp-asset-tables/migrations/2026-05-17-add-platform-to-presets.js +0 -19
- package/.worktrees/tt-snp-asset-tables/migrations/2026-05-18-create-snapchat-public-profiles.js +0 -68
- package/.worktrees/tt-snp-asset-tables/migrations/2026-05-18-create-tiktok-identities.js +0 -71
- package/.worktrees/tt-snp-asset-tables/migrations/RUN_ME_MANUALLY_2026-05-17.sql +0 -99
- package/.worktrees/tt-snp-asset-tables/migrations/add-requested-from-dashboard-to-articles.js +0 -17
- package/.worktrees/tt-snp-asset-tables/migrations/change-adset-name-to-text.js +0 -79
- package/.worktrees/tt-snp-asset-tables/models/AICampaignQueue.js +0 -144
- package/.worktrees/tt-snp-asset-tables/models/AIGenerationLog.js +0 -85
- package/.worktrees/tt-snp-asset-tables/models/AIGenerationRequest.js +0 -212
- package/.worktrees/tt-snp-asset-tables/models/ActivityHistory.js +0 -73
- package/.worktrees/tt-snp-asset-tables/models/Ad.js +0 -300
- package/.worktrees/tt-snp-asset-tables/models/AdAccount.js +0 -97
- package/.worktrees/tt-snp-asset-tables/models/AdAccountValues.js +0 -26
- package/.worktrees/tt-snp-asset-tables/models/AdHistory.js +0 -30
- package/.worktrees/tt-snp-asset-tables/models/AdPerformance.js +0 -100
- package/.worktrees/tt-snp-asset-tables/models/AdPerformanceHourly.js +0 -71
- package/.worktrees/tt-snp-asset-tables/models/AdSet.js +0 -295
- package/.worktrees/tt-snp-asset-tables/models/AdSetHistory.js +0 -30
- package/.worktrees/tt-snp-asset-tables/models/AdsetPerformance.js +0 -132
- package/.worktrees/tt-snp-asset-tables/models/AiArticleRetryQueue.js +0 -157
- package/.worktrees/tt-snp-asset-tables/models/AiCreationRetryQueue.js +0 -127
- package/.worktrees/tt-snp-asset-tables/models/Article.js +0 -212
- package/.worktrees/tt-snp-asset-tables/models/AutomationRule.js +0 -173
- package/.worktrees/tt-snp-asset-tables/models/BannerTemplate.js +0 -129
- package/.worktrees/tt-snp-asset-tables/models/Buyers.js +0 -26
- package/.worktrees/tt-snp-asset-tables/models/Campaign.js +0 -163
- package/.worktrees/tt-snp-asset-tables/models/CampaignActionHistory.js +0 -86
- package/.worktrees/tt-snp-asset-tables/models/CampaignCreationLog.js +0 -309
- package/.worktrees/tt-snp-asset-tables/models/CampaignCreationLogV2.js +0 -314
- package/.worktrees/tt-snp-asset-tables/models/CampaignHistory.js +0 -33
- package/.worktrees/tt-snp-asset-tables/models/Channel.js +0 -55
- package/.worktrees/tt-snp-asset-tables/models/CodefuelCampaign.js +0 -175
- package/.worktrees/tt-snp-asset-tables/models/CodefuelCampaignKWHistory.js +0 -41
- package/.worktrees/tt-snp-asset-tables/models/CodefuelKeywords.js +0 -35
- package/.worktrees/tt-snp-asset-tables/models/CurrencyRate.js +0 -27
- package/.worktrees/tt-snp-asset-tables/models/Domain.js +0 -40
- package/.worktrees/tt-snp-asset-tables/models/DynamicFeed.js +0 -219
- package/.worktrees/tt-snp-asset-tables/models/ExplorAdsChannel.js +0 -62
- package/.worktrees/tt-snp-asset-tables/models/FacebookRetryQueue.js +0 -163
- package/.worktrees/tt-snp-asset-tables/models/Feed.js +0 -34
- package/.worktrees/tt-snp-asset-tables/models/FeedArticleConfiguration.js +0 -81
- package/.worktrees/tt-snp-asset-tables/models/Files.js +0 -73
- package/.worktrees/tt-snp-asset-tables/models/Folders.js +0 -133
- package/.worktrees/tt-snp-asset-tables/models/FrontStoryChannel.js +0 -60
- package/.worktrees/tt-snp-asset-tables/models/FrontStoryChannelV2.js +0 -60
- package/.worktrees/tt-snp-asset-tables/models/GenericFlowRequest.js +0 -115
- package/.worktrees/tt-snp-asset-tables/models/KeywordPerformance.js +0 -106
- package/.worktrees/tt-snp-asset-tables/models/KeywordRotationState.js +0 -51
- package/.worktrees/tt-snp-asset-tables/models/MidoWebChannel.js +0 -47
- package/.worktrees/tt-snp-asset-tables/models/MineChannel.js +0 -43
- package/.worktrees/tt-snp-asset-tables/models/Pages.js +0 -105
- package/.worktrees/tt-snp-asset-tables/models/PipelineExecution.js +0 -59
- package/.worktrees/tt-snp-asset-tables/models/PolicyDogsCreativeCache.js +0 -50
- package/.worktrees/tt-snp-asset-tables/models/PolicyDogsImageCache.js +0 -30
- package/.worktrees/tt-snp-asset-tables/models/Presets.js +0 -40
- package/.worktrees/tt-snp-asset-tables/models/RSOCFeedCampaign.js +0 -375
- package/.worktrees/tt-snp-asset-tables/models/RsocKeywordPerformance.js +0 -111
- package/.worktrees/tt-snp-asset-tables/models/RuleAction.js +0 -90
- package/.worktrees/tt-snp-asset-tables/models/RuleCondition.js +0 -137
- package/.worktrees/tt-snp-asset-tables/models/RuleExecution.js +0 -107
- package/.worktrees/tt-snp-asset-tables/models/RulesValues.js +0 -56
- package/.worktrees/tt-snp-asset-tables/models/SnapchatPublicProfiles.js +0 -47
- package/.worktrees/tt-snp-asset-tables/models/SupportedLocale.js +0 -24
- package/.worktrees/tt-snp-asset-tables/models/SyncHistory.js +0 -250
- package/.worktrees/tt-snp-asset-tables/models/TTQChannel.js +0 -42
- package/.worktrees/tt-snp-asset-tables/models/TemplateMetadata.js +0 -260
- package/.worktrees/tt-snp-asset-tables/models/Tier2_AdAccounts.js +0 -110
- package/.worktrees/tt-snp-asset-tables/models/Tier2_Assets.js +0 -70
- package/.worktrees/tt-snp-asset-tables/models/Tier2_BusinessManagers.js +0 -105
- package/.worktrees/tt-snp-asset-tables/models/Tier2_CreditLines.js +0 -99
- package/.worktrees/tt-snp-asset-tables/models/Tier2_Pages.js +0 -91
- package/.worktrees/tt-snp-asset-tables/models/Tier2_Pixels.js +0 -82
- package/.worktrees/tt-snp-asset-tables/models/Tier2_Tokens.js +0 -64
- package/.worktrees/tt-snp-asset-tables/models/Tier2_UserAdAccounts.js +0 -83
- package/.worktrees/tt-snp-asset-tables/models/TiktokIdentities.js +0 -51
- package/.worktrees/tt-snp-asset-tables/models/TokenRotationState.js +0 -121
- package/.worktrees/tt-snp-asset-tables/models/TonicCampaign.js +0 -97
- package/.worktrees/tt-snp-asset-tables/models/TonicRSOCKeywordPerformance.js +0 -123
- package/.worktrees/tt-snp-asset-tables/models/Users.js +0 -148
- package/.worktrees/tt-snp-asset-tables/models/Vertical.js +0 -26
- package/.worktrees/tt-snp-asset-tables/models/newFiles.js +0 -137
- package/.worktrees/tt-snp-asset-tables/models/pixel.js +0 -47
- package/.worktrees/tt-snp-asset-tables/package-lock.json +0 -405
- package/.worktrees/tt-snp-asset-tables/package.json +0 -19
- package/.worktrees/tt-snp-asset-tables/run.ps1 +0 -98
- package/.worktrees/tt-snp-asset-tables/run.sh +0 -214
- package/.worktrees/tt-snp-asset-tables/services/sequelizeService.js +0 -110
- package/.worktrees/tt-snp-campaign-tables/LICENSE +0 -21
- package/.worktrees/tt-snp-campaign-tables/README.md +0 -179
- package/.worktrees/tt-snp-campaign-tables/index.js +0 -169
- package/.worktrees/tt-snp-campaign-tables/jq.exe +0 -0
- package/.worktrees/tt-snp-campaign-tables/migrations/2026-05-17-PIXELS-FOLLOWUP.md +0 -85
- package/.worktrees/tt-snp-campaign-tables/migrations/2026-05-17-add-platform-to-ad.js +0 -19
- package/.worktrees/tt-snp-campaign-tables/migrations/2026-05-17-add-platform-to-adaccount.js +0 -19
- package/.worktrees/tt-snp-campaign-tables/migrations/2026-05-17-add-platform-to-adperformance.js +0 -19
- package/.worktrees/tt-snp-campaign-tables/migrations/2026-05-17-add-platform-to-adset.js +0 -19
- package/.worktrees/tt-snp-campaign-tables/migrations/2026-05-17-add-platform-to-adsetperformance.js +0 -19
- package/.worktrees/tt-snp-campaign-tables/migrations/2026-05-17-add-platform-to-aiarticleretryqueue.js +0 -19
- package/.worktrees/tt-snp-campaign-tables/migrations/2026-05-17-add-platform-to-aicampaignqueue.js +0 -19
- package/.worktrees/tt-snp-campaign-tables/migrations/2026-05-17-add-platform-to-article.js +0 -19
- package/.worktrees/tt-snp-campaign-tables/migrations/2026-05-17-add-platform-to-campaign.js +0 -19
- package/.worktrees/tt-snp-campaign-tables/migrations/2026-05-17-add-platform-to-codefuelcampaign.js +0 -19
- package/.worktrees/tt-snp-campaign-tables/migrations/2026-05-17-add-platform-to-dynamicfeed.js +0 -19
- package/.worktrees/tt-snp-campaign-tables/migrations/2026-05-17-add-platform-to-facebookretryqueue.js +0 -19
- package/.worktrees/tt-snp-campaign-tables/migrations/2026-05-17-add-platform-to-pages.js +0 -19
- package/.worktrees/tt-snp-campaign-tables/migrations/2026-05-17-add-platform-to-presets.js +0 -19
- package/.worktrees/tt-snp-campaign-tables/migrations/2026-05-18-create-tiktok-snapchat-campaigns.js +0 -143
- package/.worktrees/tt-snp-campaign-tables/migrations/RUN_ME_MANUALLY_2026-05-17.sql +0 -99
- package/.worktrees/tt-snp-campaign-tables/migrations/add-requested-from-dashboard-to-articles.js +0 -17
- package/.worktrees/tt-snp-campaign-tables/migrations/change-adset-name-to-text.js +0 -79
- package/.worktrees/tt-snp-campaign-tables/models/AICampaignQueue.js +0 -144
- package/.worktrees/tt-snp-campaign-tables/models/AIGenerationLog.js +0 -85
- package/.worktrees/tt-snp-campaign-tables/models/AIGenerationRequest.js +0 -212
- package/.worktrees/tt-snp-campaign-tables/models/ActivityHistory.js +0 -73
- package/.worktrees/tt-snp-campaign-tables/models/Ad.js +0 -300
- package/.worktrees/tt-snp-campaign-tables/models/AdAccount.js +0 -97
- package/.worktrees/tt-snp-campaign-tables/models/AdAccountValues.js +0 -26
- package/.worktrees/tt-snp-campaign-tables/models/AdHistory.js +0 -30
- package/.worktrees/tt-snp-campaign-tables/models/AdPerformance.js +0 -100
- package/.worktrees/tt-snp-campaign-tables/models/AdPerformanceHourly.js +0 -71
- package/.worktrees/tt-snp-campaign-tables/models/AdSet.js +0 -295
- package/.worktrees/tt-snp-campaign-tables/models/AdSetHistory.js +0 -30
- package/.worktrees/tt-snp-campaign-tables/models/AdsetPerformance.js +0 -132
- package/.worktrees/tt-snp-campaign-tables/models/AiArticleRetryQueue.js +0 -157
- package/.worktrees/tt-snp-campaign-tables/models/AiCreationRetryQueue.js +0 -127
- package/.worktrees/tt-snp-campaign-tables/models/Article.js +0 -212
- package/.worktrees/tt-snp-campaign-tables/models/AutomationRule.js +0 -173
- package/.worktrees/tt-snp-campaign-tables/models/BannerTemplate.js +0 -129
- package/.worktrees/tt-snp-campaign-tables/models/Buyers.js +0 -26
- package/.worktrees/tt-snp-campaign-tables/models/Campaign.js +0 -163
- package/.worktrees/tt-snp-campaign-tables/models/CampaignActionHistory.js +0 -86
- package/.worktrees/tt-snp-campaign-tables/models/CampaignCreationLog.js +0 -309
- package/.worktrees/tt-snp-campaign-tables/models/CampaignCreationLogV2.js +0 -314
- package/.worktrees/tt-snp-campaign-tables/models/CampaignHistory.js +0 -33
- package/.worktrees/tt-snp-campaign-tables/models/Channel.js +0 -55
- package/.worktrees/tt-snp-campaign-tables/models/CodefuelCampaign.js +0 -175
- package/.worktrees/tt-snp-campaign-tables/models/CodefuelCampaignKWHistory.js +0 -41
- package/.worktrees/tt-snp-campaign-tables/models/CodefuelKeywords.js +0 -35
- package/.worktrees/tt-snp-campaign-tables/models/CurrencyRate.js +0 -27
- package/.worktrees/tt-snp-campaign-tables/models/Domain.js +0 -40
- package/.worktrees/tt-snp-campaign-tables/models/DynamicFeed.js +0 -219
- package/.worktrees/tt-snp-campaign-tables/models/ExplorAdsChannel.js +0 -62
- package/.worktrees/tt-snp-campaign-tables/models/FacebookRetryQueue.js +0 -163
- package/.worktrees/tt-snp-campaign-tables/models/Feed.js +0 -34
- package/.worktrees/tt-snp-campaign-tables/models/FeedArticleConfiguration.js +0 -81
- package/.worktrees/tt-snp-campaign-tables/models/Files.js +0 -73
- package/.worktrees/tt-snp-campaign-tables/models/Folders.js +0 -133
- package/.worktrees/tt-snp-campaign-tables/models/FrontStoryChannel.js +0 -60
- package/.worktrees/tt-snp-campaign-tables/models/FrontStoryChannelV2.js +0 -60
- package/.worktrees/tt-snp-campaign-tables/models/GenericFlowRequest.js +0 -115
- package/.worktrees/tt-snp-campaign-tables/models/KeywordPerformance.js +0 -106
- package/.worktrees/tt-snp-campaign-tables/models/KeywordRotationState.js +0 -51
- package/.worktrees/tt-snp-campaign-tables/models/MidoWebChannel.js +0 -47
- package/.worktrees/tt-snp-campaign-tables/models/MineChannel.js +0 -43
- package/.worktrees/tt-snp-campaign-tables/models/Pages.js +0 -105
- package/.worktrees/tt-snp-campaign-tables/models/PipelineExecution.js +0 -59
- package/.worktrees/tt-snp-campaign-tables/models/PolicyDogsCreativeCache.js +0 -50
- package/.worktrees/tt-snp-campaign-tables/models/PolicyDogsImageCache.js +0 -30
- package/.worktrees/tt-snp-campaign-tables/models/Presets.js +0 -40
- package/.worktrees/tt-snp-campaign-tables/models/RSOCFeedCampaign.js +0 -375
- package/.worktrees/tt-snp-campaign-tables/models/RsocKeywordPerformance.js +0 -111
- package/.worktrees/tt-snp-campaign-tables/models/RuleAction.js +0 -90
- package/.worktrees/tt-snp-campaign-tables/models/RuleCondition.js +0 -137
- package/.worktrees/tt-snp-campaign-tables/models/RuleExecution.js +0 -107
- package/.worktrees/tt-snp-campaign-tables/models/RulesValues.js +0 -56
- package/.worktrees/tt-snp-campaign-tables/models/SnapchatCampaign.js +0 -69
- package/.worktrees/tt-snp-campaign-tables/models/SupportedLocale.js +0 -24
- package/.worktrees/tt-snp-campaign-tables/models/SyncHistory.js +0 -250
- package/.worktrees/tt-snp-campaign-tables/models/TTQChannel.js +0 -42
- package/.worktrees/tt-snp-campaign-tables/models/TemplateMetadata.js +0 -260
- package/.worktrees/tt-snp-campaign-tables/models/Tier2_AdAccounts.js +0 -110
- package/.worktrees/tt-snp-campaign-tables/models/Tier2_Assets.js +0 -70
- package/.worktrees/tt-snp-campaign-tables/models/Tier2_BusinessManagers.js +0 -105
- package/.worktrees/tt-snp-campaign-tables/models/Tier2_CreditLines.js +0 -99
- package/.worktrees/tt-snp-campaign-tables/models/Tier2_Pages.js +0 -91
- package/.worktrees/tt-snp-campaign-tables/models/Tier2_Pixels.js +0 -82
- package/.worktrees/tt-snp-campaign-tables/models/Tier2_Tokens.js +0 -64
- package/.worktrees/tt-snp-campaign-tables/models/Tier2_UserAdAccounts.js +0 -83
- package/.worktrees/tt-snp-campaign-tables/models/TikTokCampaign.js +0 -71
- package/.worktrees/tt-snp-campaign-tables/models/TokenRotationState.js +0 -121
- package/.worktrees/tt-snp-campaign-tables/models/TonicCampaign.js +0 -97
- package/.worktrees/tt-snp-campaign-tables/models/TonicRSOCKeywordPerformance.js +0 -123
- package/.worktrees/tt-snp-campaign-tables/models/Users.js +0 -148
- package/.worktrees/tt-snp-campaign-tables/models/Vertical.js +0 -26
- package/.worktrees/tt-snp-campaign-tables/models/newFiles.js +0 -137
- package/.worktrees/tt-snp-campaign-tables/models/pixel.js +0 -47
- package/.worktrees/tt-snp-campaign-tables/package-lock.json +0 -405
- package/.worktrees/tt-snp-campaign-tables/package.json +0 -19
- package/.worktrees/tt-snp-campaign-tables/run.ps1 +0 -98
- package/.worktrees/tt-snp-campaign-tables/run.sh +0 -214
- package/.worktrees/tt-snp-campaign-tables/services/sequelizeService.js +0 -110
package/models/ApiAuditLog.js
CHANGED
|
@@ -61,6 +61,35 @@ module.exports = (sequelize, DataTypes) => {
|
|
|
61
61
|
allowNull: false,
|
|
62
62
|
defaultValue: false,
|
|
63
63
|
},
|
|
64
|
+
// Client-supplied or middleware-minted X-Request-Id. Enables 1:1
|
|
65
|
+
// joins to app logs, Cloud Run traces, CampaignCreationLogsV2, and
|
|
66
|
+
// most importantly ends body_hash+30s guessing when clustering
|
|
67
|
+
// retries (the exact gap that made the 7/9 triage so slow).
|
|
68
|
+
// Nullable so the ALTER stays metadata-only on the existing rows.
|
|
69
|
+
request_id: {
|
|
70
|
+
type: DataTypes.STRING(64),
|
|
71
|
+
allowNull: true,
|
|
72
|
+
},
|
|
73
|
+
// End-to-end request duration in milliseconds, computed as
|
|
74
|
+
// Date.now() - startedAt in the res.on('finish' | 'close')
|
|
75
|
+
// handler. Replaces the imprecise (createdAt - ts) subtraction we
|
|
76
|
+
// fell back to during the 7/9 investigation. Nullable because old
|
|
77
|
+
// rows have no measurement — filling those with (createdAt - ts)
|
|
78
|
+
// would reproduce the exact signal we're trying to leave behind.
|
|
79
|
+
duration_ms: {
|
|
80
|
+
type: DataTypes.INTEGER,
|
|
81
|
+
allowNull: true,
|
|
82
|
+
},
|
|
83
|
+
// Normalized endpoint identifier (e.g. "post_adsets_bulk_pause").
|
|
84
|
+
// Every dashboard query wants to GROUP BY endpoint class, but `path`
|
|
85
|
+
// has adset/campaign ids baked in — at 14M rows GROUP BY path is
|
|
86
|
+
// useless and `path LIKE '%bulk/pause%'` is fragile + slow. Computed
|
|
87
|
+
// from req.route?.path + req.method in the audit handler; falls back
|
|
88
|
+
// to a normalized req.originalUrl when the route didn't match.
|
|
89
|
+
endpoint_family: {
|
|
90
|
+
type: DataTypes.STRING(30),
|
|
91
|
+
allowNull: true,
|
|
92
|
+
},
|
|
64
93
|
},
|
|
65
94
|
{
|
|
66
95
|
tableName: "ApiAuditLog",
|
|
@@ -68,6 +97,20 @@ module.exports = (sequelize, DataTypes) => {
|
|
|
68
97
|
{ fields: [{ name: "user_id" }, { name: "ts", order: "DESC" }] },
|
|
69
98
|
{ fields: [{ name: "token_id" }, { name: "ts", order: "DESC" }] },
|
|
70
99
|
{ fields: ["resource_type", "resource_id"] },
|
|
100
|
+
// Primary incident-triage entry point — "give me every audit row
|
|
101
|
+
// for this X-Request-Id" is the first query in every ticket. Not
|
|
102
|
+
// unique because a retry that reuses the same id is exactly the
|
|
103
|
+
// signal we want to see.
|
|
104
|
+
{ fields: ["request_id"] },
|
|
105
|
+
// Primary dashboard GROUP BY axis — replaces regex-over-path
|
|
106
|
+
// patterns. `ts DESC` because every query is a recent-window
|
|
107
|
+
// scan ("last 1h/24h by endpoint_family").
|
|
108
|
+
{
|
|
109
|
+
fields: [
|
|
110
|
+
{ name: "endpoint_family" },
|
|
111
|
+
{ name: "ts", order: "DESC" },
|
|
112
|
+
],
|
|
113
|
+
},
|
|
71
114
|
],
|
|
72
115
|
}
|
|
73
116
|
);
|
|
@@ -0,0 +1,117 @@
|
|
|
1
|
+
module.exports = (sequelize, DataTypes) => {
|
|
2
|
+
const PublicApiIdempotencyCache = sequelize.define(
|
|
3
|
+
"PublicApiIdempotencyCache",
|
|
4
|
+
{
|
|
5
|
+
id: {
|
|
6
|
+
type: DataTypes.UUID,
|
|
7
|
+
defaultValue: DataTypes.UUIDV4,
|
|
8
|
+
primaryKey: true,
|
|
9
|
+
},
|
|
10
|
+
// Scope every cached response to the buyer's user. Two different
|
|
11
|
+
// buyers using the same Idempotency-Key value must NOT collide, so
|
|
12
|
+
// the uniqueness index below is (user_id, key), not (key) alone.
|
|
13
|
+
user_id: {
|
|
14
|
+
type: DataTypes.UUID,
|
|
15
|
+
allowNull: false,
|
|
16
|
+
references: {
|
|
17
|
+
model: "Users",
|
|
18
|
+
key: "id",
|
|
19
|
+
},
|
|
20
|
+
},
|
|
21
|
+
// Which specific token issued the original request. Useful for
|
|
22
|
+
// support/debug ("was it the same token retrying?") but not part
|
|
23
|
+
// of uniqueness — a buyer rotating tokens mid-retry should still
|
|
24
|
+
// hit the cached response.
|
|
25
|
+
token_id: {
|
|
26
|
+
type: DataTypes.UUID,
|
|
27
|
+
allowNull: true,
|
|
28
|
+
references: {
|
|
29
|
+
model: "ApiToken",
|
|
30
|
+
key: "id",
|
|
31
|
+
},
|
|
32
|
+
},
|
|
33
|
+
// Client-supplied Idempotency-Key header. Buyer controls the value;
|
|
34
|
+
// we just store it and dedupe on it.
|
|
35
|
+
key: {
|
|
36
|
+
type: DataTypes.STRING(255),
|
|
37
|
+
allowNull: false,
|
|
38
|
+
},
|
|
39
|
+
// SHA-256 hex of the canonicalized request body. Used to reject
|
|
40
|
+
// "same key + different body" (Stripe-style strict mode) with 422.
|
|
41
|
+
// Canonicalization = JSON.stringify with sorted keys, so field-order
|
|
42
|
+
// differences don't cause a false conflict.
|
|
43
|
+
request_hash: {
|
|
44
|
+
type: DataTypes.STRING(64),
|
|
45
|
+
allowNull: false,
|
|
46
|
+
},
|
|
47
|
+
// HTTP method + path recorded for debug + admin views. Not used for
|
|
48
|
+
// dedup logic — dedup is by (user_id, key). Different endpoints
|
|
49
|
+
// reusing the same key is a client bug we surface via debug, not
|
|
50
|
+
// silently accommodate.
|
|
51
|
+
method: {
|
|
52
|
+
type: DataTypes.STRING(10),
|
|
53
|
+
allowNull: false,
|
|
54
|
+
},
|
|
55
|
+
path: {
|
|
56
|
+
type: DataTypes.STRING,
|
|
57
|
+
allowNull: false,
|
|
58
|
+
},
|
|
59
|
+
// NULL while the original request is still in-flight. Set to the
|
|
60
|
+
// final HTTP status on completion. A row with status_code IS NULL
|
|
61
|
+
// that hasn't expired means "another instance is currently
|
|
62
|
+
// processing this key" → we return 409 idempotency_inflight to
|
|
63
|
+
// the second caller so they retry after a beat.
|
|
64
|
+
status_code: {
|
|
65
|
+
type: DataTypes.INTEGER,
|
|
66
|
+
allowNull: true,
|
|
67
|
+
},
|
|
68
|
+
// Cached response body — replayed verbatim on retry hit.
|
|
69
|
+
response_body: {
|
|
70
|
+
type: DataTypes.JSONB,
|
|
71
|
+
allowNull: true,
|
|
72
|
+
},
|
|
73
|
+
// Cached response headers we want to replay (e.g. X-Request-Id
|
|
74
|
+
// from the original, Location, etc). Optional — most replays are
|
|
75
|
+
// fine without.
|
|
76
|
+
response_headers: {
|
|
77
|
+
type: DataTypes.JSONB,
|
|
78
|
+
allowNull: true,
|
|
79
|
+
},
|
|
80
|
+
// Explicit expiry column so the TTL-sweep cron/pg_cron can
|
|
81
|
+
// `DELETE WHERE expires_at < NOW()` without computing from
|
|
82
|
+
// created_at. Defaults to created_at + 24h; controller sets this
|
|
83
|
+
// when inserting so we don't rely on a DB trigger.
|
|
84
|
+
expires_at: {
|
|
85
|
+
type: DataTypes.DATE,
|
|
86
|
+
allowNull: false,
|
|
87
|
+
},
|
|
88
|
+
},
|
|
89
|
+
{
|
|
90
|
+
tableName: "PublicApiIdempotencyCache",
|
|
91
|
+
indexes: [
|
|
92
|
+
// Primary lookup: (user_id, key). UNIQUE so INSERT ... ON CONFLICT
|
|
93
|
+
// DO NOTHING atomically claims the key for the first caller — the
|
|
94
|
+
// "9 concurrent retries" burst case where only ONE request should
|
|
95
|
+
// execute the underlying work.
|
|
96
|
+
{ unique: true, fields: ["user_id", "key"] },
|
|
97
|
+
// Sweep index — cron does `DELETE WHERE expires_at < NOW()`. Not
|
|
98
|
+
// partial (would need to update after every insert); regular
|
|
99
|
+
// btree is fine for the sweep pattern.
|
|
100
|
+
{ fields: ["expires_at"] },
|
|
101
|
+
],
|
|
102
|
+
}
|
|
103
|
+
);
|
|
104
|
+
|
|
105
|
+
PublicApiIdempotencyCache.associate = (models) => {
|
|
106
|
+
PublicApiIdempotencyCache.belongsTo(models.Users, {
|
|
107
|
+
foreignKey: "user_id",
|
|
108
|
+
as: "user",
|
|
109
|
+
});
|
|
110
|
+
PublicApiIdempotencyCache.belongsTo(models.ApiToken, {
|
|
111
|
+
foreignKey: "token_id",
|
|
112
|
+
as: "token",
|
|
113
|
+
});
|
|
114
|
+
};
|
|
115
|
+
|
|
116
|
+
return PublicApiIdempotencyCache;
|
|
117
|
+
};
|
|
@@ -18,10 +18,19 @@ module.exports = (sequelize, DataTypes) => {
|
|
|
18
18
|
type: DataTypes.STRING(255),
|
|
19
19
|
allowNull: true,
|
|
20
20
|
},
|
|
21
|
-
|
|
22
|
-
|
|
21
|
+
// 2026-07-12: widened from single STRING → ARRAY(STRING). Snap allows
|
|
22
|
+
// the SAME Public Profile to be linked to MANY ad accounts (per Snap
|
|
23
|
+
// Business Center — one profile can serve multiple advertiser
|
|
24
|
+
// accounts). Storing a single ad_account_id here forced our resolver
|
|
25
|
+
// into cross-account fallback (which Snap rejects with 403 E3002).
|
|
26
|
+
// Now: each row lists every ad account this profile is authorized on.
|
|
27
|
+
ad_account_ids: {
|
|
28
|
+
type: DataTypes.ARRAY(DataTypes.STRING),
|
|
23
29
|
allowNull: false,
|
|
24
|
-
|
|
30
|
+
defaultValue: [],
|
|
31
|
+
comment:
|
|
32
|
+
"Snapchat ad_account_ids this profile can serve. Query with " +
|
|
33
|
+
"'X = ANY(ad_account_ids)'. Empty means unrestricted.",
|
|
25
34
|
},
|
|
26
35
|
status: {
|
|
27
36
|
type: DataTypes.STRING(16),
|
|
@@ -46,7 +55,11 @@ module.exports = (sequelize, DataTypes) => {
|
|
|
46
55
|
},
|
|
47
56
|
{
|
|
48
57
|
tableName: "snapchat_public_profiles",
|
|
49
|
-
|
|
58
|
+
// No index on ad_account_ids directly — Postgres uses GIN on arrays
|
|
59
|
+
// and Sequelize's simple `fields` index syntax doesn't emit GIN. If
|
|
60
|
+
// query performance becomes a concern, add a raw GIN index migration:
|
|
61
|
+
// CREATE INDEX ... ON snapchat_public_profiles USING GIN (ad_account_ids);
|
|
62
|
+
indexes: [{ fields: ["status"] }],
|
|
50
63
|
}
|
|
51
64
|
);
|
|
52
65
|
|
package/package.json
CHANGED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":1,"sessions":{"194829a9-fb06-4c43-91c6-7f93260cdcc7":{"updatedAt":1782999300075,"files":{"/Users/yuvalbader/Developer/args-dashboard/agrs-sequelize/models/AdAccount.js":{"editCount":1,"findings":[]}}}}}
|
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
MIT License
|
|
2
|
-
|
|
3
|
-
Copyright (c) 2024 Agressive Scale LTD
|
|
4
|
-
|
|
5
|
-
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
-
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
-
in the Software without restriction, including without limitation the rights
|
|
8
|
-
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
-
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
-
furnished to do so, subject to the following conditions:
|
|
11
|
-
|
|
12
|
-
The above copyright notice and this permission notice shall be included in all
|
|
13
|
-
copies or substantial portions of the Software.
|
|
14
|
-
|
|
15
|
-
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
-
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
-
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
-
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
-
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
-
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
-
SOFTWARE.
|
|
@@ -1,179 +0,0 @@
|
|
|
1
|
-
# agrs-sequelize SDK
|
|
2
|
-
|
|
3
|
-
The `agrs-sequelize` SDK provides a structured way to manage your database models using Sequelize ORM. It allows you to easily add, update, and manage models, with support for publishing updates to NPM and pushing changes to GitHub.
|
|
4
|
-
|
|
5
|
-
## Table of Contents
|
|
6
|
-
|
|
7
|
-
- [Prerequisites](#prerequisites)
|
|
8
|
-
- [Installation](#installation)
|
|
9
|
-
- [Usage](#usage)
|
|
10
|
-
- [Adding or Modifying Models](#adding-or-modifying-models)
|
|
11
|
-
- [Model Loading](#model-loading)
|
|
12
|
-
- [Publishing Changes](#publishing-changes)
|
|
13
|
-
- [Using PowerShell (Windows)](#using-powershell-windows)
|
|
14
|
-
- [Using Bash (Linux/macOS)](#using-bash-linuxmacos)
|
|
15
|
-
- [Script Details](#script-details)
|
|
16
|
-
- [run.ps1 (PowerShell Script for Windows)](#runps1-powershell-script-for-windows)
|
|
17
|
-
- [run.sh (Bash Script for Linux/macOS)](#runsh-bash-script-for-linuxmacos)
|
|
18
|
-
- [Example Model File](#example-model-file)
|
|
19
|
-
- [Versioning](#versioning)
|
|
20
|
-
- [Troubleshooting](#troubleshooting)
|
|
21
|
-
- [License](#license)
|
|
22
|
-
|
|
23
|
-
## Prerequisites
|
|
24
|
-
|
|
25
|
-
Ensure the following dependencies are installed on your system:
|
|
26
|
-
|
|
27
|
-
- **Node.js**: [Download Node.js](https://nodejs.org/)
|
|
28
|
-
- **Sequelize**: Used for database interaction.
|
|
29
|
-
- **Git**: Required for version control and publishing changes to GitHub.
|
|
30
|
-
- **npm**: For managing and publishing packages.
|
|
31
|
-
- **PowerShell** (Windows) or **Bash** (Linux/macOS): For running automation scripts.
|
|
32
|
-
|
|
33
|
-
## Installation
|
|
34
|
-
|
|
35
|
-
1. **Clone the Repository:**
|
|
36
|
-
|
|
37
|
-
```bash
|
|
38
|
-
git clone https://github.com/your-repo/agrs-sequelize.git
|
|
39
|
-
cd agrs-sequelize
|
|
40
|
-
```
|
|
41
|
-
|
|
42
|
-
2. **Install Dependencies:**
|
|
43
|
-
|
|
44
|
-
```bash
|
|
45
|
-
npm install
|
|
46
|
-
```
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
# Usage
|
|
50
|
-
|
|
51
|
-
## Adding or Modifying Models
|
|
52
|
-
To add or modify models in the agrs-sequelize SDK:
|
|
53
|
-
|
|
54
|
-
1. **Create or Edit a Model:**
|
|
55
|
-
|
|
56
|
-
- Add a new model file inside the models directory or edit an existing one.
|
|
57
|
-
- Each model file should export a function that initializes the model with Sequelize.
|
|
58
|
-
|
|
59
|
-
```javascript
|
|
60
|
-
// models/YourModel.js
|
|
61
|
-
module.exports = (sequelize, DataTypes) => {
|
|
62
|
-
const YourModel = sequelize.define('YourModel', {
|
|
63
|
-
fieldName: {
|
|
64
|
-
type: DataTypes.STRING,
|
|
65
|
-
allowNull: false,
|
|
66
|
-
},
|
|
67
|
-
});
|
|
68
|
-
|
|
69
|
-
// Define associations (optional)
|
|
70
|
-
YourModel.associate = (models) => {
|
|
71
|
-
YourModel.hasMany(models.OtherModel);
|
|
72
|
-
};
|
|
73
|
-
|
|
74
|
-
return YourModel;
|
|
75
|
-
};
|
|
76
|
-
```
|
|
77
|
-
|
|
78
|
-
2. **Define Associations (if required):**
|
|
79
|
-
|
|
80
|
-
Use the associate method to define relationships with other models.
|
|
81
|
-
Associations like hasMany, belongsTo, etc., are supported.
|
|
82
|
-
### Model Loading
|
|
83
|
-
Models are automatically loaded when initializing Sequelize.
|
|
84
|
-
The index.js file ensures all models in the models directory are properly loaded and associated.
|
|
85
|
-
|
|
86
|
-
## Publishing Changes
|
|
87
|
-
After modifying or adding models, publish the changes to NPM and GitHub.
|
|
88
|
-
|
|
89
|
-
### Using PowerShell (Windows)
|
|
90
|
-
Open PowerShell as Administrator.
|
|
91
|
-
|
|
92
|
-
Run the Script:
|
|
93
|
-
|
|
94
|
-
```powershell
|
|
95
|
-
./run.ps1
|
|
96
|
-
```
|
|
97
|
-
The script will:
|
|
98
|
-
|
|
99
|
-
- Check for jq installation.
|
|
100
|
-
- Bump the version in package.json.
|
|
101
|
-
- Publish to NPM.
|
|
102
|
-
- Commit and push changes to GitHub.
|
|
103
|
-
|
|
104
|
-
### Using Bash (Linux/macOS)
|
|
105
|
-
Open a Bash Terminal.
|
|
106
|
-
|
|
107
|
-
Run the Script:
|
|
108
|
-
|
|
109
|
-
```bash
|
|
110
|
-
./run.sh
|
|
111
|
-
```
|
|
112
|
-
The script performs the same tasks as the PowerShell script, tailored for Bash environments.
|
|
113
|
-
|
|
114
|
-
## Script Details
|
|
115
|
-
### run.ps1 (PowerShell Script for Windows)
|
|
116
|
-
Automates the publishing process:
|
|
117
|
-
|
|
118
|
-
- Ensures jq is installed.
|
|
119
|
-
- Increments the version in package.json.
|
|
120
|
-
- Publishes the package to NPM.
|
|
121
|
-
- Commits and pushes changes to GitHub.
|
|
122
|
-
|
|
123
|
-
### run.sh (Bash Script for Linux/macOS)
|
|
124
|
-
Provides similar functionality:
|
|
125
|
-
|
|
126
|
-
- Checks for jq installation.
|
|
127
|
-
- Bumps the package version.
|
|
128
|
-
= Publishes to NPM.
|
|
129
|
-
= Commits and pushes to GitHub.
|
|
130
|
-
|
|
131
|
-
## Example Model File
|
|
132
|
-
```javascript
|
|
133
|
-
Copy code
|
|
134
|
-
// models/YourModel.js
|
|
135
|
-
module.exports = (sequelize, DataTypes) => {
|
|
136
|
-
const YourModel = sequelize.define('YourModel', {
|
|
137
|
-
name: {
|
|
138
|
-
type: DataTypes.STRING,
|
|
139
|
-
allowNull: false,
|
|
140
|
-
},
|
|
141
|
-
});
|
|
142
|
-
|
|
143
|
-
// Define associations (optional)
|
|
144
|
-
YourModel.associate = (models) => {
|
|
145
|
-
YourModel.hasMany(models.OtherModel);
|
|
146
|
-
};
|
|
147
|
-
|
|
148
|
-
return YourModel;
|
|
149
|
-
};
|
|
150
|
-
```
|
|
151
|
-
In this example:
|
|
152
|
-
|
|
153
|
-
YourModel has a name field.
|
|
154
|
-
It has a hasMany association with OtherModel.
|
|
155
|
-
## Versioning
|
|
156
|
-
Versioning is handled automatically:
|
|
157
|
-
|
|
158
|
-
- The scripts increment the version in package.json.
|
|
159
|
-
- Follows semantic versioning (major, minor, patch).
|
|
160
|
-
- Updated versions are published to NPM and committed to the repository.
|
|
161
|
-
|
|
162
|
-
## Troubleshooting
|
|
163
|
-
- ### Permission Issues:
|
|
164
|
-
|
|
165
|
-
- Linux/macOS: Ensure scripts have execute permissions (chmod +x run.sh).
|
|
166
|
-
- ### NPM Login Errors:
|
|
167
|
-
|
|
168
|
-
- The script will prompt for NPM login if not already logged in.
|
|
169
|
-
- Verify NPM account credentials.
|
|
170
|
-
|
|
171
|
-
- ### Missing Dependencies:
|
|
172
|
-
|
|
173
|
-
- The script checks for jq and installs it if missing.
|
|
174
|
-
## License
|
|
175
|
-
This project is licensed under the MIT License. See the LICENSE file for details.
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
@@ -1,169 +0,0 @@
|
|
|
1
|
-
const Sequelize = require("sequelize");
|
|
2
|
-
const path = require("path");
|
|
3
|
-
const fs = require("fs");
|
|
4
|
-
|
|
5
|
-
// const env = process.env.NODE_ENV || "development";
|
|
6
|
-
class DBModels {
|
|
7
|
-
constructor(config) {
|
|
8
|
-
this.config = config;
|
|
9
|
-
this.db = {};
|
|
10
|
-
|
|
11
|
-
// Initialize Sequelize
|
|
12
|
-
const sequelize = new Sequelize(
|
|
13
|
-
this.config.database,
|
|
14
|
-
this.config.username,
|
|
15
|
-
this.config.password,
|
|
16
|
-
{
|
|
17
|
-
host: this.config.host,
|
|
18
|
-
dialect: this.config.dialect,
|
|
19
|
-
port: this.config.port,
|
|
20
|
-
logging: false, // Enable logging to console
|
|
21
|
-
dialectOptions: {
|
|
22
|
-
ssl: {
|
|
23
|
-
require: true, // Require SSL
|
|
24
|
-
rejectUnauthorized: false, // For self-signed or unverified certificates
|
|
25
|
-
},
|
|
26
|
-
},
|
|
27
|
-
pool: {
|
|
28
|
-
max: 200, // Increase from 50, but stay under max_connections (200)
|
|
29
|
-
min: 5, // Increase minimum connections
|
|
30
|
-
acquire: 60000, // Double acquire timeout
|
|
31
|
-
idle: 30000, // Align with idle_in_transaction_session_timeout
|
|
32
|
-
},
|
|
33
|
-
|
|
34
|
-
retry: {
|
|
35
|
-
max: 5,
|
|
36
|
-
timeout: 60000,
|
|
37
|
-
match: [
|
|
38
|
-
/Connection terminated/,
|
|
39
|
-
/Connection timed out/,
|
|
40
|
-
/Operation timeout/,
|
|
41
|
-
/password authentication failed/,
|
|
42
|
-
/canceling authentication/,
|
|
43
|
-
],
|
|
44
|
-
},
|
|
45
|
-
}
|
|
46
|
-
);
|
|
47
|
-
|
|
48
|
-
// Load all models
|
|
49
|
-
fs.readdirSync(path.join(__dirname, "models"))
|
|
50
|
-
.filter((file) => {
|
|
51
|
-
return file.indexOf(".") !== 0 && file.slice(-3) === ".js";
|
|
52
|
-
})
|
|
53
|
-
.forEach((file) => {
|
|
54
|
-
const model = require(path.join(__dirname, "models", file))(
|
|
55
|
-
sequelize,
|
|
56
|
-
Sequelize.DataTypes
|
|
57
|
-
);
|
|
58
|
-
this.db[model.name] = model;
|
|
59
|
-
});
|
|
60
|
-
|
|
61
|
-
// Set up associations
|
|
62
|
-
Object.keys(this.db).forEach((modelName) => {
|
|
63
|
-
if (this.db[modelName].associate) {
|
|
64
|
-
this.db[modelName].associate(this.db);
|
|
65
|
-
}
|
|
66
|
-
});
|
|
67
|
-
|
|
68
|
-
// Export the db object with Sequelize and models
|
|
69
|
-
this.db.sequelize = sequelize;
|
|
70
|
-
this.db.Sequelize = Sequelize;
|
|
71
|
-
}
|
|
72
|
-
}
|
|
73
|
-
|
|
74
|
-
module.exports = DBModels;
|
|
75
|
-
|
|
76
|
-
// const Sequelize = require("sequelize");
|
|
77
|
-
// const path = require("path");
|
|
78
|
-
// const fs = require("fs");
|
|
79
|
-
|
|
80
|
-
// class DBModels {
|
|
81
|
-
// constructor(config) {
|
|
82
|
-
// this.config = config;
|
|
83
|
-
// this.db = {};
|
|
84
|
-
|
|
85
|
-
// const sequelize = new Sequelize(
|
|
86
|
-
// this.config.database,
|
|
87
|
-
// this.config.username,
|
|
88
|
-
// this.config.password,
|
|
89
|
-
// {
|
|
90
|
-
// host: this.config.host,
|
|
91
|
-
// dialect: this.config.dialect,
|
|
92
|
-
// port: this.config.port,
|
|
93
|
-
// logging: false,
|
|
94
|
-
// dialectOptions: {
|
|
95
|
-
// ssl: {
|
|
96
|
-
// require: true,
|
|
97
|
-
// rejectUnauthorized: false,
|
|
98
|
-
// },
|
|
99
|
-
// statement_timeout: 30000,
|
|
100
|
-
// idle_in_transaction_session_timeout: 30000,
|
|
101
|
-
// connectTimeout: 30000,
|
|
102
|
-
// },
|
|
103
|
-
// pool: {
|
|
104
|
-
// max: 50, // Quarter of max connections (200)
|
|
105
|
-
// min: 0, // Start from 0 and scale up as needed
|
|
106
|
-
// acquire: 30000, // Maximum time to wait for a connection
|
|
107
|
-
// idle: 10000, // How long a connection can remain idle
|
|
108
|
-
// },
|
|
109
|
-
// retry: {
|
|
110
|
-
// max: 3,
|
|
111
|
-
// timeout: 20000,
|
|
112
|
-
// match: [
|
|
113
|
-
// /Connection terminated/,
|
|
114
|
-
// /Connection timed out/,
|
|
115
|
-
// /Operation timeout/,
|
|
116
|
-
// /ECONNRESET/,
|
|
117
|
-
// /PROTOCOL_CONNECTION_LOST/,
|
|
118
|
-
// ],
|
|
119
|
-
// },
|
|
120
|
-
// }
|
|
121
|
-
// );
|
|
122
|
-
|
|
123
|
-
// // Add connection monitoring listeners
|
|
124
|
-
// sequelize.connectionManager.on("acquire", function (connection) {
|
|
125
|
-
// console.log("Connection %d acquired", connection.threadId);
|
|
126
|
-
// });
|
|
127
|
-
|
|
128
|
-
// sequelize.connectionManager.on("release", function (connection) {
|
|
129
|
-
// console.log("Connection %d released", connection.threadId);
|
|
130
|
-
// });
|
|
131
|
-
|
|
132
|
-
// // Load all models
|
|
133
|
-
// fs.readdirSync(path.join(__dirname, "models"))
|
|
134
|
-
// .filter((file) => {
|
|
135
|
-
// return file.indexOf(".") !== 0 && file.slice(-3) === ".js";
|
|
136
|
-
// })
|
|
137
|
-
// .forEach((file) => {
|
|
138
|
-
// const model = require(path.join(__dirname, "models", file))(
|
|
139
|
-
// sequelize,
|
|
140
|
-
// Sequelize.DataTypes
|
|
141
|
-
// );
|
|
142
|
-
// this.db[model.name] = model;
|
|
143
|
-
// });
|
|
144
|
-
|
|
145
|
-
// // Set up associations
|
|
146
|
-
// Object.keys(this.db).forEach((modelName) => {
|
|
147
|
-
// if (this.db[modelName].associate) {
|
|
148
|
-
// this.db[modelName].associate(this.db);
|
|
149
|
-
// }
|
|
150
|
-
// });
|
|
151
|
-
|
|
152
|
-
// // Export the db object with Sequelize and models
|
|
153
|
-
// this.db.sequelize = sequelize;
|
|
154
|
-
// this.db.Sequelize = Sequelize;
|
|
155
|
-
// }
|
|
156
|
-
|
|
157
|
-
// // Add method for pool monitoring
|
|
158
|
-
// async getConnectionPoolStats() {
|
|
159
|
-
// const pool = this.db.sequelize.connectionManager.pool;
|
|
160
|
-
// return {
|
|
161
|
-
// all: pool.size,
|
|
162
|
-
// available: pool.available,
|
|
163
|
-
// borrowed: pool.borrowed,
|
|
164
|
-
// pending: pool.pending,
|
|
165
|
-
// };
|
|
166
|
-
// }
|
|
167
|
-
// }
|
|
168
|
-
|
|
169
|
-
// module.exports = DBModels;
|
|
Binary file
|
|
@@ -1,85 +0,0 @@
|
|
|
1
|
-
# Platform column normalization — follow-on work
|
|
2
|
-
|
|
3
|
-
## Tables skipped from the 2026-05-17 platform rollout
|
|
4
|
-
|
|
5
|
-
The following 4 tables were intentionally OMITTED from the 2026-05-17 platform-column
|
|
6
|
-
rollout because each already has a `platform` column of type VARCHAR with
|
|
7
|
-
capitalized values (e.g. "Facebook"). Adding an ENUM column with the same name
|
|
8
|
-
would either fail outright or destructively override existing data.
|
|
9
|
-
|
|
10
|
-
| Table | Existing column type | Existing values seen |
|
|
11
|
-
|--------------------------------|----------------------|--------------------------------------------------------|
|
|
12
|
-
| `Pixels` | varchar | "Facebook", "Tiktok", "Taboola", "Outbrain", "Yahoo" |
|
|
13
|
-
| `CampaignCreationLogs` | varchar(50) | "Facebook", "fb", NULL |
|
|
14
|
-
| `CampaignCreationLogsV2` | varchar(50) | "Facebook", "fb", NULL |
|
|
15
|
-
| `rsoc_feed_campaigns` | varchar | "Facebook", "fb" |
|
|
16
|
-
|
|
17
|
-
The rest of the rollout uses lowercase short codes: `fb`, `tt`, `snp`.
|
|
18
|
-
|
|
19
|
-
## Why we did not "just add another column"
|
|
20
|
-
|
|
21
|
-
A naive `addColumn("platform")` collides with the existing column name. A naive
|
|
22
|
-
`UPDATE` to lowercase the values would touch production data and is destructive.
|
|
23
|
-
Both violate the safety constraint of this rollout (additive only).
|
|
24
|
-
|
|
25
|
-
## Recommended path (separate plan)
|
|
26
|
-
|
|
27
|
-
For each of the 4 tables:
|
|
28
|
-
|
|
29
|
-
1. Add a new column `platform_code` ENUM('fb','tt','snp','tab','out','yh') NOT NULL DEFAULT 'fb'
|
|
30
|
-
2. Backfill in a single transaction. Example for Pixels:
|
|
31
|
-
```sql
|
|
32
|
-
UPDATE "Pixels" SET platform_code = CASE platform
|
|
33
|
-
WHEN 'Facebook' THEN 'fb'
|
|
34
|
-
WHEN 'Tiktok' THEN 'tt'
|
|
35
|
-
WHEN 'Taboola' THEN 'tab'
|
|
36
|
-
WHEN 'Outbrain' THEN 'out'
|
|
37
|
-
WHEN 'Yahoo' THEN 'yh'
|
|
38
|
-
ELSE 'fb'
|
|
39
|
-
END;
|
|
40
|
-
```
|
|
41
|
-
For CampaignCreationLogs / CampaignCreationLogsV2 / rsoc_feed_campaigns the
|
|
42
|
-
backfill is simpler:
|
|
43
|
-
```sql
|
|
44
|
-
UPDATE "CampaignCreationLogs" SET platform_code = CASE LOWER(COALESCE(platform, 'fb'))
|
|
45
|
-
WHEN 'facebook' THEN 'fb'
|
|
46
|
-
WHEN 'fb' THEN 'fb'
|
|
47
|
-
WHEN 'tiktok' THEN 'tt'
|
|
48
|
-
WHEN 'tt' THEN 'tt'
|
|
49
|
-
ELSE 'fb'
|
|
50
|
-
END;
|
|
51
|
-
```
|
|
52
|
-
3. Update server code to read `platform_code` for new logic; leave the legacy
|
|
53
|
-
`platform` column untouched for backward compat.
|
|
54
|
-
4. Eventually deprecate the legacy `platform` column and rename `platform_code`
|
|
55
|
-
→ `platform` once all callers have migrated. That happens in a separate,
|
|
56
|
-
later cleanup plan.
|
|
57
|
-
|
|
58
|
-
## Until then
|
|
59
|
-
|
|
60
|
-
The dashboard's platform adapter (created in the Phase 0 backend plan) MUST
|
|
61
|
-
normalize legacy `platform` values when comparing to the canonical fb/tt/snp
|
|
62
|
-
codes. Example normalizer:
|
|
63
|
-
|
|
64
|
-
```javascript
|
|
65
|
-
function normalizeLegacyPlatform(legacy) {
|
|
66
|
-
if (!legacy) return "fb";
|
|
67
|
-
const map = {
|
|
68
|
-
Facebook: "fb",
|
|
69
|
-
facebook: "fb",
|
|
70
|
-
FB: "fb",
|
|
71
|
-
fb: "fb",
|
|
72
|
-
Tiktok: "tt",
|
|
73
|
-
TikTok: "tt",
|
|
74
|
-
tiktok: "tt",
|
|
75
|
-
tt: "tt",
|
|
76
|
-
Snapchat: "snp",
|
|
77
|
-
snapchat: "snp",
|
|
78
|
-
snp: "snp",
|
|
79
|
-
Taboola: "tab",
|
|
80
|
-
Outbrain: "out",
|
|
81
|
-
Yahoo: "yh",
|
|
82
|
-
};
|
|
83
|
-
return map[legacy] || "fb";
|
|
84
|
-
}
|
|
85
|
-
```
|