adserver-dashboard 1.0.0
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/.ci/staging.yml +191 -0
- package/.dockerignore +117 -0
- package/.env +40 -0
- package/.env.staging +38 -0
- package/.gitlab-ci.yml +16 -0
- package/DEMO_STATUS.md +579 -0
- package/Dockerfile +61 -0
- package/Influence-MW-AdServer-12-02-2026/client/index.html +17 -0
- package/Influence-MW-AdServer-12-02-2026/client/public/favicon.png +0 -0
- package/Influence-MW-AdServer-12-02-2026/client/src/App.tsx +91 -0
- package/Influence-MW-AdServer-12-02-2026/client/src/components/advanced-map-drawer.tsx +1131 -0
- package/Influence-MW-AdServer-12-02-2026/client/src/components/ai-recommendation-panel.tsx +379 -0
- package/Influence-MW-AdServer-12-02-2026/client/src/components/app-sidebar.tsx +183 -0
- package/Influence-MW-AdServer-12-02-2026/client/src/components/auto-optimize-button.tsx +184 -0
- package/Influence-MW-AdServer-12-02-2026/client/src/components/availability-drawer.tsx +385 -0
- package/Influence-MW-AdServer-12-02-2026/client/src/components/brand-insights-panel.tsx +87 -0
- package/Influence-MW-AdServer-12-02-2026/client/src/components/create-agency-drawer.tsx +198 -0
- package/Influence-MW-AdServer-12-02-2026/client/src/components/create-brand-drawer.tsx +275 -0
- package/Influence-MW-AdServer-12-02-2026/client/src/components/creative-assignment.tsx +526 -0
- package/Influence-MW-AdServer-12-02-2026/client/src/components/data-table-toolbar.tsx +148 -0
- package/Influence-MW-AdServer-12-02-2026/client/src/components/data-table.tsx +158 -0
- package/Influence-MW-AdServer-12-02-2026/client/src/components/filter-drawer.tsx +356 -0
- package/Influence-MW-AdServer-12-02-2026/client/src/components/form-insights-panel.tsx +82 -0
- package/Influence-MW-AdServer-12-02-2026/client/src/components/geography-selector.tsx +699 -0
- package/Influence-MW-AdServer-12-02-2026/client/src/components/header-user-menu.tsx +178 -0
- package/Influence-MW-AdServer-12-02-2026/client/src/components/history-drawer.tsx +313 -0
- package/Influence-MW-AdServer-12-02-2026/client/src/components/inventory-availability-section.tsx +176 -0
- package/Influence-MW-AdServer-12-02-2026/client/src/components/inventory-format-drawer.tsx +173 -0
- package/Influence-MW-AdServer-12-02-2026/client/src/components/inventory-selector.tsx +401 -0
- package/Influence-MW-AdServer-12-02-2026/client/src/components/manual-inventory-drawer.tsx +368 -0
- package/Influence-MW-AdServer-12-02-2026/client/src/components/mapbox-map.tsx +368 -0
- package/Influence-MW-AdServer-12-02-2026/client/src/components/market-insights-panel.tsx +202 -0
- package/Influence-MW-AdServer-12-02-2026/client/src/components/media-owner-drawer.tsx +217 -0
- package/Influence-MW-AdServer-12-02-2026/client/src/components/metric-card.tsx +58 -0
- package/Influence-MW-AdServer-12-02-2026/client/src/components/page-header.tsx +27 -0
- package/Influence-MW-AdServer-12-02-2026/client/src/components/player-status-indicator.tsx +137 -0
- package/Influence-MW-AdServer-12-02-2026/client/src/components/poi-targeting-drawer.tsx +298 -0
- package/Influence-MW-AdServer-12-02-2026/client/src/components/recommendation-score-badge.tsx +102 -0
- package/Influence-MW-AdServer-12-02-2026/client/src/components/recommended-inventories-panel.tsx +248 -0
- package/Influence-MW-AdServer-12-02-2026/client/src/components/searchable-combobox.tsx +134 -0
- package/Influence-MW-AdServer-12-02-2026/client/src/components/signal-visualizations.tsx +407 -0
- package/Influence-MW-AdServer-12-02-2026/client/src/components/status-badge.tsx +35 -0
- package/Influence-MW-AdServer-12-02-2026/client/src/components/theme-provider.tsx +73 -0
- package/Influence-MW-AdServer-12-02-2026/client/src/components/theme-toggle.tsx +37 -0
- package/Influence-MW-AdServer-12-02-2026/client/src/components/traffic-slider.tsx +75 -0
- package/Influence-MW-AdServer-12-02-2026/client/src/components/ui/accordion.tsx +56 -0
- package/Influence-MW-AdServer-12-02-2026/client/src/components/ui/alert-dialog.tsx +139 -0
- package/Influence-MW-AdServer-12-02-2026/client/src/components/ui/alert.tsx +59 -0
- package/Influence-MW-AdServer-12-02-2026/client/src/components/ui/aspect-ratio.tsx +5 -0
- package/Influence-MW-AdServer-12-02-2026/client/src/components/ui/avatar.tsx +51 -0
- package/Influence-MW-AdServer-12-02-2026/client/src/components/ui/badge.tsx +38 -0
- package/Influence-MW-AdServer-12-02-2026/client/src/components/ui/breadcrumb.tsx +115 -0
- package/Influence-MW-AdServer-12-02-2026/client/src/components/ui/button.tsx +62 -0
- package/Influence-MW-AdServer-12-02-2026/client/src/components/ui/calendar.tsx +68 -0
- package/Influence-MW-AdServer-12-02-2026/client/src/components/ui/card.tsx +85 -0
- package/Influence-MW-AdServer-12-02-2026/client/src/components/ui/carousel.tsx +260 -0
- package/Influence-MW-AdServer-12-02-2026/client/src/components/ui/chart.tsx +365 -0
- package/Influence-MW-AdServer-12-02-2026/client/src/components/ui/checkbox.tsx +28 -0
- package/Influence-MW-AdServer-12-02-2026/client/src/components/ui/collapsible.tsx +11 -0
- package/Influence-MW-AdServer-12-02-2026/client/src/components/ui/command.tsx +151 -0
- package/Influence-MW-AdServer-12-02-2026/client/src/components/ui/context-menu.tsx +198 -0
- package/Influence-MW-AdServer-12-02-2026/client/src/components/ui/dialog.tsx +122 -0
- package/Influence-MW-AdServer-12-02-2026/client/src/components/ui/drawer.tsx +118 -0
- package/Influence-MW-AdServer-12-02-2026/client/src/components/ui/dropdown-menu.tsx +198 -0
- package/Influence-MW-AdServer-12-02-2026/client/src/components/ui/form.tsx +178 -0
- package/Influence-MW-AdServer-12-02-2026/client/src/components/ui/hover-card.tsx +29 -0
- package/Influence-MW-AdServer-12-02-2026/client/src/components/ui/input-otp.tsx +69 -0
- package/Influence-MW-AdServer-12-02-2026/client/src/components/ui/input.tsx +23 -0
- package/Influence-MW-AdServer-12-02-2026/client/src/components/ui/label.tsx +24 -0
- package/Influence-MW-AdServer-12-02-2026/client/src/components/ui/menubar.tsx +256 -0
- package/Influence-MW-AdServer-12-02-2026/client/src/components/ui/navigation-menu.tsx +128 -0
- package/Influence-MW-AdServer-12-02-2026/client/src/components/ui/pagination.tsx +117 -0
- package/Influence-MW-AdServer-12-02-2026/client/src/components/ui/popover.tsx +29 -0
- package/Influence-MW-AdServer-12-02-2026/client/src/components/ui/progress.tsx +28 -0
- package/Influence-MW-AdServer-12-02-2026/client/src/components/ui/radio-group.tsx +42 -0
- package/Influence-MW-AdServer-12-02-2026/client/src/components/ui/resizable.tsx +45 -0
- package/Influence-MW-AdServer-12-02-2026/client/src/components/ui/scroll-area.tsx +46 -0
- package/Influence-MW-AdServer-12-02-2026/client/src/components/ui/select.tsx +160 -0
- package/Influence-MW-AdServer-12-02-2026/client/src/components/ui/separator.tsx +29 -0
- package/Influence-MW-AdServer-12-02-2026/client/src/components/ui/sheet.tsx +140 -0
- package/Influence-MW-AdServer-12-02-2026/client/src/components/ui/sidebar.tsx +727 -0
- package/Influence-MW-AdServer-12-02-2026/client/src/components/ui/skeleton.tsx +15 -0
- package/Influence-MW-AdServer-12-02-2026/client/src/components/ui/slider.tsx +26 -0
- package/Influence-MW-AdServer-12-02-2026/client/src/components/ui/switch.tsx +27 -0
- package/Influence-MW-AdServer-12-02-2026/client/src/components/ui/table.tsx +117 -0
- package/Influence-MW-AdServer-12-02-2026/client/src/components/ui/tabs.tsx +53 -0
- package/Influence-MW-AdServer-12-02-2026/client/src/components/ui/textarea.tsx +22 -0
- package/Influence-MW-AdServer-12-02-2026/client/src/components/ui/toast.tsx +127 -0
- package/Influence-MW-AdServer-12-02-2026/client/src/components/ui/toaster.tsx +33 -0
- package/Influence-MW-AdServer-12-02-2026/client/src/components/ui/toggle-group.tsx +61 -0
- package/Influence-MW-AdServer-12-02-2026/client/src/components/ui/toggle.tsx +43 -0
- package/Influence-MW-AdServer-12-02-2026/client/src/components/ui/tooltip.tsx +30 -0
- package/Influence-MW-AdServer-12-02-2026/client/src/components/vendor-stores-modal.tsx +336 -0
- package/Influence-MW-AdServer-12-02-2026/client/src/components/venue-type-drawer.tsx +359 -0
- package/Influence-MW-AdServer-12-02-2026/client/src/components/venue-type-selector.tsx +436 -0
- package/Influence-MW-AdServer-12-02-2026/client/src/hooks/use-mobile.tsx +19 -0
- package/Influence-MW-AdServer-12-02-2026/client/src/hooks/use-toast.ts +191 -0
- package/Influence-MW-AdServer-12-02-2026/client/src/index.css +244 -0
- package/Influence-MW-AdServer-12-02-2026/client/src/lib/queryClient.ts +57 -0
- package/Influence-MW-AdServer-12-02-2026/client/src/lib/utils.ts +39 -0
- package/Influence-MW-AdServer-12-02-2026/client/src/lib/venue-taxonomy.ts +532 -0
- package/Influence-MW-AdServer-12-02-2026/client/src/main.tsx +5 -0
- package/Influence-MW-AdServer-12-02-2026/client/src/pages/assign-creative.tsx +781 -0
- package/Influence-MW-AdServer-12-02-2026/client/src/pages/content-hub.tsx +995 -0
- package/Influence-MW-AdServer-12-02-2026/client/src/pages/custom-pois.tsx +431 -0
- package/Influence-MW-AdServer-12-02-2026/client/src/pages/dashboard.tsx +620 -0
- package/Influence-MW-AdServer-12-02-2026/client/src/pages/deal-detail.tsx +1062 -0
- package/Influence-MW-AdServer-12-02-2026/client/src/pages/deal-form.tsx +1570 -0
- package/Influence-MW-AdServer-12-02-2026/client/src/pages/deals.tsx +716 -0
- package/Influence-MW-AdServer-12-02-2026/client/src/pages/edit-creative-assignment.tsx +1051 -0
- package/Influence-MW-AdServer-12-02-2026/client/src/pages/geotargeting.tsx +675 -0
- package/Influence-MW-AdServer-12-02-2026/client/src/pages/integrations.tsx +425 -0
- package/Influence-MW-AdServer-12-02-2026/client/src/pages/line-item-creatives.tsx +622 -0
- package/Influence-MW-AdServer-12-02-2026/client/src/pages/line-item-form.tsx +3132 -0
- package/Influence-MW-AdServer-12-02-2026/client/src/pages/line-items.tsx +530 -0
- package/Influence-MW-AdServer-12-02-2026/client/src/pages/not-found.tsx +21 -0
- package/Influence-MW-AdServer-12-02-2026/client/src/pages/proof-of-play-upload.tsx +479 -0
- package/Influence-MW-AdServer-12-02-2026/client/src/pages/proof-of-play.tsx +880 -0
- package/Influence-MW-AdServer-12-02-2026/client/src/pages/reports.tsx +235 -0
- package/Influence-MW-AdServer-12-02-2026/client/src/pages/settings.tsx +652 -0
- package/Influence-MW-AdServer-12-02-2026/client/src/pages/signal-form.tsx +1117 -0
- package/Influence-MW-AdServer-12-02-2026/client/src/pages/signals.tsx +366 -0
- package/Influence-MW-AdServer-12-02-2026/client/src/pages/tags.tsx +332 -0
- package/Influence-MW-AdServer-12-02-2026/client/src/pages/venues.tsx +381 -0
- package/Influence-MW-AdServer-12-02-2026/client/src/types/mapbox-gl-draw.d.ts +37 -0
- package/Influence-MW-AdServer-12-02-2026/client/src/types/react-simple-maps.d.ts +57 -0
- package/Influence-MW-AdServer-12-02-2026/components.json +20 -0
- package/Influence-MW-AdServer-12-02-2026/docs/PRD.md +3373 -0
- package/Influence-MW-AdServer-12-02-2026/docs/influence-feature-mapping.csv +498 -0
- package/Influence-MW-AdServer-12-02-2026/drizzle.config.ts +14 -0
- package/Influence-MW-AdServer-12-02-2026/package-lock.json +9672 -0
- package/Influence-MW-AdServer-12-02-2026/package.json +118 -0
- package/Influence-MW-AdServer-12-02-2026/postcss.config.js +6 -0
- package/Influence-MW-AdServer-12-02-2026/replit.md +91 -0
- package/Influence-MW-AdServer-12-02-2026/script/build.ts +67 -0
- package/Influence-MW-AdServer-12-02-2026/scripts/create-miro-diagrams.cjs +318 -0
- package/Influence-MW-AdServer-12-02-2026/scripts/create-remaining-diagrams.cjs +270 -0
- package/Influence-MW-AdServer-12-02-2026/server/index.ts +103 -0
- package/Influence-MW-AdServer-12-02-2026/server/recommendation-service.ts +319 -0
- package/Influence-MW-AdServer-12-02-2026/server/routes.ts +1890 -0
- package/Influence-MW-AdServer-12-02-2026/server/static.ts +19 -0
- package/Influence-MW-AdServer-12-02-2026/server/storage.ts +2058 -0
- package/Influence-MW-AdServer-12-02-2026/server/vite.ts +58 -0
- package/Influence-MW-AdServer-12-02-2026/shared/schema.ts +1595 -0
- package/Influence-MW-AdServer-12-02-2026/tailwind.config.ts +107 -0
- package/Influence-MW-AdServer-12-02-2026/tsconfig.json +23 -0
- package/Influence-MW-AdServer-12-02-2026/vite.config.ts +40 -0
- package/LINE_ITEM_BUDGET_FIELD_MAPPING.md +178 -0
- package/PCM/.env.example +92 -0
- package/PCM/README.md +558 -0
- package/PCM/docs/TEST_CASES.md +422 -0
- package/PCM/index.js +106 -0
- package/PCM/package-lock.json +3282 -0
- package/PCM/package.json +32 -0
- package/PCM/replit.md +64 -0
- package/PCM/schema.sql +495 -0
- package/PCM/scripts/export-schema.js +183 -0
- package/PCM/scripts/seed-comprehensive.js +631 -0
- package/PCM/scripts/seed-production.js +477 -0
- package/PCM/src/config/db.js +56 -0
- package/PCM/src/config/swagger.js +5975 -0
- package/PCM/src/dto/EmailRequestDTO.js +166 -0
- package/PCM/src/middleware/errorHandler.js +52 -0
- package/PCM/src/middleware/logger.js +26 -0
- package/PCM/src/migrations/001_add_campaign_mode_fields.sql +36 -0
- package/PCM/src/migrations/002_create_deal_id_counters.sql +22 -0
- package/PCM/src/migrations/003_update_publishers_column.sql +15 -0
- package/PCM/src/migrations/004_add_direct_dealtype_and_advertiser.sql +5 -0
- package/PCM/src/migrations/005_add_programmatic_fields_and_update_enums.sql +31 -0
- package/PCM/src/migrations/006_add_line_item_programmatic_fields.sql +12 -0
- package/PCM/src/migrations/007_add_line_item_direct_fields.sql +15 -0
- package/PCM/src/migrations/008_add_inventory_fields.sql +45 -0
- package/PCM/src/migrations/009_move_inventory_fields_to_metadata.sql +32 -0
- package/PCM/src/migrations/010_add_draft_status_and_line_items_count.sql +23 -0
- package/PCM/src/migrations/011_add_planning_field.sql +21 -0
- package/PCM/src/migrations/012_fix_inventory_composite_pk.sql +17 -0
- package/PCM/src/migrations/013_make_external_id_optional.sql +3 -0
- package/PCM/src/migrations/014_create_change_history.sql +38 -0
- package/PCM/src/migrations/016_create_publisher_insertion_orders.sql +33 -0
- package/PCM/src/migrations/017_fix_line_item_id_fk_reference.sql +86 -0
- package/PCM/src/migrations/018_create_approval_tables.sql +44 -0
- package/PCM/src/migrations/019_add_encrypted_token_column.sql +2 -0
- package/PCM/src/migrations/020_add_rejection_reason_to_deals.sql +10 -0
- package/PCM/src/migrations/021_add_publisher_external_id_to_inventories.sql +12 -0
- package/PCM/src/migrations/022_add_line_item_extended_fields.sql +24 -0
- package/PCM/src/migrations/023_add_base_price_fields.sql +8 -0
- package/PCM/src/migrations/run-migrations.js +46 -0
- package/PCM/src/models/ApprovalOTP.js +51 -0
- package/PCM/src/models/ApprovalToken.js +79 -0
- package/PCM/src/models/ChangeHistory.js +107 -0
- package/PCM/src/models/Deal.js +186 -0
- package/PCM/src/models/DealIdCounter.js +28 -0
- package/PCM/src/models/LineItem.js +227 -0
- package/PCM/src/models/LineItemCreative.js +89 -0
- package/PCM/src/models/LineItemInventory.js +115 -0
- package/PCM/src/models/PublisherInsertionOrder.js +93 -0
- package/PCM/src/models/TransactionHistory.js +34 -0
- package/PCM/src/models/associations.js +81 -0
- package/PCM/src/routes/approval.js +321 -0
- package/PCM/src/routes/creatives.js +437 -0
- package/PCM/src/routes/deals.js +1638 -0
- package/PCM/src/routes/digitalSignage.js +242 -0
- package/PCM/src/routes/insertionOrders.js +380 -0
- package/PCM/src/routes/lineItems.js +926 -0
- package/PCM/src/routes/system.js +384 -0
- package/PCM/src/services/ApprovalService.js +885 -0
- package/PCM/src/services/CampaignImportConverter.js +631 -0
- package/PCM/src/services/CampaignModeService.js +273 -0
- package/PCM/src/services/CampaignStatusService.js +395 -0
- package/PCM/src/services/ChangeHistoryService.js +316 -0
- package/PCM/src/services/DealIdService.js +94 -0
- package/PCM/src/services/DealResponseFormatter.js +90 -0
- package/PCM/src/services/EmailNotificationService.js +315 -0
- package/PCM/src/services/LineItemResponseFormatter.js +122 -0
- package/PCM/src/services/LineItemStatusService.js +380 -0
- package/PCM/src/tests/comprehensiveTestRunner.js +360 -0
- package/PCM/src/tests/comprehensiveTests.js +1277 -0
- package/PCM/src/tests/dealTypeUnitTests.js +1058 -0
- package/PCM/src/tests/testRunner.js +248 -0
- package/PCM/src/utils/caseConverter.js +92 -0
- package/PCM/src/utils/dealCalculations.js +206 -0
- package/PCM/src/utils/lineItemPayloadNormalizer.js +41 -0
- package/PCM/src/utils/payloadNormalizer.js +34 -0
- package/PCM/src/utils/sourceNormalizer.js +56 -0
- package/PCM/src/validators/creativeValidator.js +27 -0
- package/PCM/src/validators/dealValidator.js +203 -0
- package/PCM/src/validators/lineItemValidator.js +489 -0
- package/PCM/tests/approval-flows.test.js +238 -0
- package/PCM/tests/approval-workflow.test.js +291 -0
- package/PCM/tests/campaign-import-converter.test.js +543 -0
- package/PCM/tests/campaign-import-e2e.test.js +520 -0
- package/PCM/tests/campaign-status.test.js +539 -0
- package/PCM/tests/direct-publisher-split-reimport.test.js +460 -0
- package/PCM/tests/e2e/digital-signage.test.js +145 -0
- package/PCM/tests/e2e/search-filter-pagination.test.js +399 -0
- package/PCM/tests/e2e-comprehensive.test.js +3446 -0
- package/PCM/tests/edge-cases.test.js +340 -0
- package/PCM/tests/line-item-status.test.js +340 -0
- package/PCM/tests/seller-account-external-ids.test.js +877 -0
- package/PCM/tests/source-validation.test.js +324 -0
- package/PRD.md +3373 -0
- package/README.md +186 -0
- package/client/index.html +35 -0
- package/client/public/DEMO_STATUS.md +579 -0
- package/client/public/img/MW-logo-trans_1754045676555.png +0 -0
- package/client/public/locales/ar/approval.json +144 -0
- package/client/public/locales/ar/buyer.json +61 -0
- package/client/public/locales/ar/campaigns.json +1 -0
- package/client/public/locales/ar/common.json +218 -0
- package/client/public/locales/ar/contentHub.json +266 -0
- package/client/public/locales/ar/creatives.json +79 -0
- package/client/public/locales/ar/dashboard.json +57 -0
- package/client/public/locales/ar/deals.json +886 -0
- package/client/public/locales/ar/dsp.json +131 -0
- package/client/public/locales/ar/inventory.json +201 -0
- package/client/public/locales/ar/lineItems.json +553 -0
- package/client/public/locales/ar/navigation.json +48 -0
- package/client/public/locales/ar/wizard.json +1 -0
- package/client/public/locales/en/approval.json +144 -0
- package/client/public/locales/en/buyer.json +65 -0
- package/client/public/locales/en/campaigns.json +1 -0
- package/client/public/locales/en/common.json +218 -0
- package/client/public/locales/en/contentHub.json +266 -0
- package/client/public/locales/en/creatives.json +79 -0
- package/client/public/locales/en/dashboard.json +57 -0
- package/client/public/locales/en/deals.json +886 -0
- package/client/public/locales/en/dsp.json +131 -0
- package/client/public/locales/en/inventory.json +201 -0
- package/client/public/locales/en/lineItems.json +659 -0
- package/client/public/locales/en/navigation.json +48 -0
- package/client/public/locales/en/wizard.json +1 -0
- package/client/public/locales/ja/approval.json +144 -0
- package/client/public/locales/ja/buyer.json +61 -0
- package/client/public/locales/ja/campaigns.json +1 -0
- package/client/public/locales/ja/common.json +218 -0
- package/client/public/locales/ja/contentHub.json +266 -0
- package/client/public/locales/ja/creatives.json +79 -0
- package/client/public/locales/ja/dashboard.json +57 -0
- package/client/public/locales/ja/deals.json +886 -0
- package/client/public/locales/ja/dsp.json +131 -0
- package/client/public/locales/ja/inventory.json +201 -0
- package/client/public/locales/ja/lineItems.json +553 -0
- package/client/public/locales/ja/navigation.json +48 -0
- package/client/public/locales/ja/wizard.json +1 -0
- package/client/public/locales/zh/approval.json +144 -0
- package/client/public/locales/zh/buyer.json +61 -0
- package/client/public/locales/zh/campaigns.json +1 -0
- package/client/public/locales/zh/common.json +218 -0
- package/client/public/locales/zh/contentHub.json +266 -0
- package/client/public/locales/zh/creatives.json +79 -0
- package/client/public/locales/zh/dashboard.json +57 -0
- package/client/public/locales/zh/deals.json +886 -0
- package/client/public/locales/zh/dsp.json +131 -0
- package/client/public/locales/zh/inventory.json +201 -0
- package/client/public/locales/zh/lineItems.json +553 -0
- package/client/public/locales/zh/navigation.json +48 -0
- package/client/public/locales/zh/wizard.json +1 -0
- package/client/public/manifest.json +36 -0
- package/client/src/App.tsx +464 -0
- package/client/src/components/app-sidebar.tsx +312 -0
- package/client/src/components/approval/approval-decision-form.test.tsx +294 -0
- package/client/src/components/approval/approval-decision-form.tsx +326 -0
- package/client/src/components/approval/approval-sheet.tsx +631 -0
- package/client/src/components/approval/line-item-details-sheet.tsx +371 -0
- package/client/src/components/approval/otp-verification.test.tsx +337 -0
- package/client/src/components/approval/otp-verification.tsx +180 -0
- package/client/src/components/content-hub/bulk-transcode-dialog.tsx +379 -0
- package/client/src/components/content-hub/content-hub-manager-v2.tsx +574 -0
- package/client/src/components/content-hub/content-hub-manager.tsx +330 -0
- package/client/src/components/content-hub/creative-card.tsx +456 -0
- package/client/src/components/content-hub/creative-detail-sheet.tsx +685 -0
- package/client/src/components/content-hub/creative-filters.tsx +457 -0
- package/client/src/components/content-hub/creative-grid.tsx +329 -0
- package/client/src/components/content-hub/creative-selector.tsx +415 -0
- package/client/src/components/content-hub/creative-upload.tsx +547 -0
- package/client/src/components/content-hub/folder-dialogs.tsx +445 -0
- package/client/src/components/content-hub/folder-list.tsx +280 -0
- package/client/src/components/content-hub/review-dialogs.tsx +268 -0
- package/client/src/components/content-hub/transcode-dialog.tsx +226 -0
- package/client/src/components/creative-library/creative-details-view.tsx +446 -0
- package/client/src/components/creative-library/creative-filters-panel.tsx +203 -0
- package/client/src/components/creative-library/creative-list.tsx +360 -0
- package/client/src/components/creative-library/creative-status-badge.tsx +71 -0
- package/client/src/components/creative-library/folder-card.tsx +78 -0
- package/client/src/components/creative-library/index.ts +27 -0
- package/client/src/components/creative-library/new-creative-card.tsx +211 -0
- package/client/src/components/creative-library/upload-creative-dialog.tsx +261 -0
- package/client/src/components/dashboard-overview.tsx +109 -0
- package/client/src/components/deals/approval-history-panel.test.tsx +240 -0
- package/client/src/components/deals/approval-history-panel.tsx +156 -0
- package/client/src/components/deals/deal-status-badge.tsx +92 -0
- package/client/src/components/deals/import-from-planner-dialog.tsx +399 -0
- package/client/src/components/deals/market-insights-panel.tsx +237 -0
- package/client/src/components/deals/reopen-deal-sheet.tsx +191 -0
- package/client/src/components/deals/request-approval-sheet.test.tsx +323 -0
- package/client/src/components/deals/request-approval-sheet.tsx +136 -0
- package/client/src/components/deals/resend-approval-sheet.tsx +201 -0
- package/client/src/components/direct-campaigns/campaign-card.tsx +283 -0
- package/client/src/components/direct-campaigns/deal-filter-panel.tsx +325 -0
- package/client/src/components/inventory/advanced-filters-panel.tsx +273 -0
- package/client/src/components/inventory/csv-upload-modal.tsx +639 -0
- package/client/src/components/inventory/inventory-availability-view.tsx +486 -0
- package/client/src/components/inventory/inventory-details-sheet.tsx +376 -0
- package/client/src/components/inventory/inventory-map-view.tsx +596 -0
- package/client/src/components/inventory/inventory-settings-menu.tsx +52 -0
- package/client/src/components/language-switcher.tsx +53 -0
- package/client/src/components/line-items/campaign-forecast-panel.tsx +138 -0
- package/client/src/components/line-items/form-insights.tsx +89 -0
- package/client/src/components/line-items/geofencing/LocationCsvUploadDrawer.tsx +100 -0
- package/client/src/components/line-items/geofencing/POIDropdown.tsx +379 -0
- package/client/src/components/line-items/geofencing/SelectedLocationsSidebar.tsx +436 -0
- package/client/src/components/line-items/geofencing/ViewFileLocationDrawer.tsx +199 -0
- package/client/src/components/line-items/geofencing/components/ExistingFilesTab.tsx +268 -0
- package/client/src/components/line-items/geofencing/components/TemplateDownloadSection.tsx +59 -0
- package/client/src/components/line-items/geofencing/components/UploadTab.tsx +215 -0
- package/client/src/components/line-items/geofencing-map.tsx +1270 -0
- package/client/src/components/line-items/inventory-availability-section.tsx +178 -0
- package/client/src/components/line-items/line-item-schedule-manager.tsx +313 -0
- package/client/src/components/line-items/manual-inventory-drawer.tsx +346 -0
- package/client/src/components/line-items/planner-inventory-card.tsx +495 -0
- package/client/src/components/line-items/planner-schedule-grid.tsx +495 -0
- package/client/src/components/line-items/schedule-rule-editor.tsx +649 -0
- package/client/src/components/line-items/schedule-rule-types.ts +122 -0
- package/client/src/components/line-items/steps/creatives-step.tsx +681 -0
- package/client/src/components/line-items/steps/inventory-schedule-step.tsx +1596 -0
- package/client/src/components/line-items/steps/inventory-step.tsx +1533 -0
- package/client/src/components/line-items/steps/line-item-details-step.tsx +916 -0
- package/client/src/components/line-items/steps/schedule-step.tsx +273 -0
- package/client/src/components/line-items/steps/summary-step.tsx +680 -0
- package/client/src/components/line-items/steps/targeting-step.tsx +1708 -0
- package/client/src/components/product-switcher.tsx +105 -0
- package/client/src/components/protected-route.tsx +49 -0
- package/client/src/components/skip-link.tsx +22 -0
- package/client/src/components/stat-card.tsx +53 -0
- package/client/src/components/status-badge.tsx +96 -0
- package/client/src/components/ui/hierarchical-venue-selector.tsx +389 -0
- package/client/src/components/ui/toaster.tsx +111 -0
- package/client/src/contexts/auth-context.tsx +181 -0
- package/client/src/contexts/sidebar-state.tsx +50 -0
- package/client/src/contexts/theme-context.tsx +66 -0
- package/client/src/data/campaign-data.json +107 -0
- package/client/src/data/countries.json +22 -0
- package/client/src/hooks/use-approval.ts +366 -0
- package/client/src/hooks/use-keyboard-shortcuts.ts +74 -0
- package/client/src/hooks/use-media-query.ts +46 -0
- package/client/src/hooks/use-mobile.tsx +19 -0
- package/client/src/hooks/use-page-title.ts +21 -0
- package/client/src/hooks/use-toast.ts +195 -0
- package/client/src/index.css +694 -0
- package/client/src/lib/__tests__/accessibility.test.ts +104 -0
- package/client/src/lib/__tests__/date-utils.test.ts +199 -0
- package/client/src/lib/__tests__/dsp-buyer-api.test.ts +127 -0
- package/client/src/lib/__tests__/dsp-buyer-integration.test.ts +247 -0
- package/client/src/lib/__tests__/storage-utils.test.ts +167 -0
- package/client/src/lib/__tests__/utils.test.ts +57 -0
- package/client/src/lib/accessibility.ts +141 -0
- package/client/src/lib/api-config.ts +9 -0
- package/client/src/lib/auth-service.ts +209 -0
- package/client/src/lib/campaign-creative-api.ts +82 -0
- package/client/src/lib/company-api.ts +61 -0
- package/client/src/lib/content-hub-api.ts +407 -0
- package/client/src/lib/creative-mapper.ts +61 -0
- package/client/src/lib/date-utils.ts +119 -0
- package/client/src/lib/deal-helpers.ts +220 -0
- package/client/src/lib/dsp-buyer-api.ts +196 -0
- package/client/src/lib/geo-import-api.ts +151 -0
- package/client/src/lib/google-poi-api.ts +305 -0
- package/client/src/lib/i18n/__tests__/formatting.test.ts +202 -0
- package/client/src/lib/i18n/formatting.ts +130 -0
- package/client/src/lib/i18n/index.ts +8 -0
- package/client/src/lib/i18n-compat.ts +76 -0
- package/client/src/lib/influence-deals-api.ts +896 -0
- package/client/src/lib/inventory-api.ts +399 -0
- package/client/src/lib/oauth-service.ts +678 -0
- package/client/src/lib/poi-types.ts +75 -0
- package/client/src/lib/queryClient.ts +144 -0
- package/client/src/lib/recommendation-api.ts +380 -0
- package/client/src/lib/storage-utils.ts +104 -0
- package/client/src/lib/tolgee.ts +85 -0
- package/client/src/lib/utils.ts +0 -0
- package/client/src/main.tsx +67 -0
- package/client/src/mapbox-draw-modes.d.ts +32 -0
- package/client/src/pages/all-folders.tsx +203 -0
- package/client/src/pages/auth-callback.tsx +115 -0
- package/client/src/pages/buyer-form.tsx +339 -0
- package/client/src/pages/buyer-list.tsx +622 -0
- package/client/src/pages/content-hub.tsx +1358 -0
- package/client/src/pages/create-deal.tsx +2093 -0
- package/client/src/pages/creative-assignment-page.tsx +548 -0
- package/client/src/pages/creatives.tsx +5 -0
- package/client/src/pages/custom-pois.tsx +425 -0
- package/client/src/pages/dashboard.tsx +615 -0
- package/client/src/pages/deal-history.tsx +434 -0
- package/client/src/pages/deal-line-items.tsx +1703 -0
- package/client/src/pages/demo-status.tsx +113 -0
- package/client/src/pages/direct-campaign-details.tsx +361 -0
- package/client/src/pages/direct-campaigns-new.tsx +824 -0
- package/client/src/pages/dsp-form.tsx +803 -0
- package/client/src/pages/dsp-list.tsx +239 -0
- package/client/src/pages/folder-content.tsx +336 -0
- package/client/src/pages/integrations.tsx +429 -0
- package/client/src/pages/line-item-creatives.tsx +789 -0
- package/client/src/pages/line-item-detail-page.tsx +684 -0
- package/client/src/pages/line-item-form-page.tsx +3261 -0
- package/client/src/pages/line-item-wizard.tsx +1207 -0
- package/client/src/pages/login.tsx +154 -0
- package/client/src/pages/not-found.tsx +23 -0
- package/client/src/pages/proof-of-play.tsx +397 -0
- package/client/src/pages/public-approval.tsx +551 -0
- package/client/src/pages/reports.tsx +231 -0
- package/client/src/pages/settings.tsx +760 -0
- package/client/src/pages/signals.tsx +389 -0
- package/client/src/pages/tags.tsx +318 -0
- package/client/src/pages/test-results.tsx +328 -0
- package/client/src/store/hooks.ts +5 -0
- package/client/src/store/index.ts +15 -0
- package/client/src/store/mapMarkerLocationsSlice.ts +241 -0
- package/client/src/styles/design-tokens.css +324 -0
- package/client/src/test/setup.ts +261 -0
- package/client/src/test/test-utils.tsx +40 -0
- package/client/src/types/approval.ts +221 -0
- package/client/src/types/content-hub.ts +209 -0
- package/client/src/types/geofencing.ts +67 -0
- package/client/src/types/transcoding.ts +140 -0
- package/client/src/vite-env.d.ts +18 -0
- package/components.json +20 -0
- package/creative-api.json +1 -0
- package/docs/AI_REFERENCE.md +459 -0
- package/docs/MWDesign-Prompt.md +132 -0
- package/docs/MWDesign-System.md +344 -0
- package/docs/test-plan.md +277 -0
- package/e2e/AUTONOMOUS-TESTING.md +406 -0
- package/e2e/README.md +219 -0
- package/e2e/autonomous-flow.spec.ts +308 -0
- package/e2e/debug-sso.spec.ts +163 -0
- package/e2e/direct-campaigns.spec.ts +219 -0
- package/e2e/explore-sso.spec.ts +149 -0
- package/e2e/fixtures/auth.ts +26 -0
- package/e2e/fixtures/enhanced-test.ts +331 -0
- package/e2e/pagination.spec.ts +280 -0
- package/e2e/view-toggle.spec.ts +312 -0
- package/generated-icon.png +0 -0
- package/i18next-scanner.config.cjs +46 -0
- package/package.json +141 -0
- package/playwright.config.ts +93 -0
- package/postcss.config.js +6 -0
- package/replit.md +196 -0
- package/screenshot-after-login.png +0 -0
- package/screenshot-contenthub-grid.png +0 -0
- package/screenshot-contenthub-list-fixed.png +0 -0
- package/screenshot-contenthub-list.png +0 -0
- package/screenshot-create-deal.png +0 -0
- package/screenshot-dashboard.png +0 -0
- package/screenshot-deals.png +0 -0
- package/screenshot-login-filled.png +0 -0
- package/screenshot-login.png +0 -0
- package/screenshot.mjs +24 -0
- package/scripts/deploy-stg.sh +185 -0
- package/shared/direct-io-schema.ts +383 -0
- package/shared/schema.ts +439 -0
- package/shared/screen-types.ts +149 -0
- package/springdocDefault.json +1 -0
- package/swagger-ui-bundle.js +2 -0
- package/swagger-ui-init.js +10316 -0
- package/tailwind.config.ts +282 -0
- package/terraform/README.md +306 -0
- package/terraform/cloudfront.tf +289 -0
- package/terraform/ecs.tf +727 -0
- package/terraform/environments/dev.tfvars +59 -0
- package/terraform/environments/production.tfvars +60 -0
- package/terraform/main.tf +47 -0
- package/terraform/outputs.tf +145 -0
- package/terraform/s3.tf +192 -0
- package/terraform/variables.tf +226 -0
- package/terraform/waf.tf +165 -0
- package/terraform-frontend/.terraform.lock.hcl +25 -0
- package/terraform-frontend/README.md +85 -0
- package/terraform-frontend/cloudfront.tf +125 -0
- package/terraform-frontend/main.tf +31 -0
- package/terraform-frontend/outputs.tf +24 -0
- package/terraform-frontend/terraform.tfvars +12 -0
- package/terraform-frontend/variables.tf +53 -0
- package/tsconfig.json +23 -0
- package/vite.config.ts +226 -0
- package/vitest.config.ts +56 -0
package/shared/schema.ts
ADDED
|
@@ -0,0 +1,439 @@
|
|
|
1
|
+
import { z } from "zod";
|
|
2
|
+
|
|
3
|
+
// ============================================================================
|
|
4
|
+
// CAMPAIGN API SCHEMAS
|
|
5
|
+
// ============================================================================
|
|
6
|
+
|
|
7
|
+
// Deal Mode
|
|
8
|
+
export const dealModeEnum = z.enum([
|
|
9
|
+
"DIRECT",
|
|
10
|
+
"PROGRAMMATIC"
|
|
11
|
+
]);
|
|
12
|
+
|
|
13
|
+
// Deal Types
|
|
14
|
+
export const dealTypeEnum = z.enum([
|
|
15
|
+
"GUARANTEED",
|
|
16
|
+
"PREFERRED_DEAL",
|
|
17
|
+
"PRIVATE_AUCTION",
|
|
18
|
+
"EVERGREEN_PMP",
|
|
19
|
+
"DIRECT"
|
|
20
|
+
]);
|
|
21
|
+
|
|
22
|
+
// Auction Type
|
|
23
|
+
export const auctionTypeEnum = z.union([
|
|
24
|
+
z.literal(1),
|
|
25
|
+
z.literal(2),
|
|
26
|
+
z.literal(3)
|
|
27
|
+
]);
|
|
28
|
+
export type AuctionType = 1 | 2 | 3;
|
|
29
|
+
|
|
30
|
+
// Transaction Type
|
|
31
|
+
export const transactionTypeEnum = z.enum([
|
|
32
|
+
"SPOT",
|
|
33
|
+
"AUDIENCE"
|
|
34
|
+
]);
|
|
35
|
+
|
|
36
|
+
// Cost Type
|
|
37
|
+
export const costTypeEnum = z.enum([
|
|
38
|
+
"CPD",
|
|
39
|
+
"CPM",
|
|
40
|
+
"CPS"
|
|
41
|
+
]);
|
|
42
|
+
|
|
43
|
+
export const dealStatusEnum = z.enum([
|
|
44
|
+
"DRAFT",
|
|
45
|
+
"ACTIVE",
|
|
46
|
+
"PAUSED",
|
|
47
|
+
"COMPLETED",
|
|
48
|
+
"CANCELLED"
|
|
49
|
+
]);
|
|
50
|
+
|
|
51
|
+
export const dealSchema = z.object({
|
|
52
|
+
id: z.string(),
|
|
53
|
+
name: z.string(),
|
|
54
|
+
type: dealTypeEnum,
|
|
55
|
+
status: dealStatusEnum,
|
|
56
|
+
advertiser: z.string(),
|
|
57
|
+
buyer: z.string(),
|
|
58
|
+
startDate: z.string(),
|
|
59
|
+
endDate: z.string(),
|
|
60
|
+
totalBudget: z.number(),
|
|
61
|
+
spentBudget: z.number(),
|
|
62
|
+
impressionsGoal: z.number().optional(),
|
|
63
|
+
impressionsDelivered: z.number().optional(),
|
|
64
|
+
createdAt: z.string(),
|
|
65
|
+
updatedAt: z.string(),
|
|
66
|
+
});
|
|
67
|
+
|
|
68
|
+
export const insertDealSchema = dealSchema.omit({
|
|
69
|
+
id: true,
|
|
70
|
+
createdAt: true,
|
|
71
|
+
updatedAt: true,
|
|
72
|
+
spentBudget: true,
|
|
73
|
+
impressionsDelivered: true
|
|
74
|
+
}).extend({
|
|
75
|
+
spentBudget: z.number().default(0),
|
|
76
|
+
impressionsDelivered: z.number().default(0),
|
|
77
|
+
});
|
|
78
|
+
|
|
79
|
+
export type Deal = z.infer<typeof dealSchema>;
|
|
80
|
+
export type InsertDeal = z.infer<typeof insertDealSchema>;
|
|
81
|
+
|
|
82
|
+
// LineItem Types
|
|
83
|
+
export const lineItemStatusEnum = z.enum([
|
|
84
|
+
"DRAFT",
|
|
85
|
+
"READY",
|
|
86
|
+
"ACTIVE",
|
|
87
|
+
"PAUSED",
|
|
88
|
+
"COMPLETED"
|
|
89
|
+
]);
|
|
90
|
+
|
|
91
|
+
export const pricingModelEnum = z.enum([
|
|
92
|
+
"CPM",
|
|
93
|
+
"CPD",
|
|
94
|
+
"CPS",
|
|
95
|
+
"FIXED"
|
|
96
|
+
]);
|
|
97
|
+
|
|
98
|
+
export const lineItemSchema = z.object({
|
|
99
|
+
id: z.string(),
|
|
100
|
+
dealId: z.string(),
|
|
101
|
+
name: z.string(),
|
|
102
|
+
status: lineItemStatusEnum,
|
|
103
|
+
startDate: z.string(),
|
|
104
|
+
endDate: z.string(),
|
|
105
|
+
pricingModel: pricingModelEnum,
|
|
106
|
+
rate: z.number(),
|
|
107
|
+
budget: z.number(),
|
|
108
|
+
spentBudget: z.number(),
|
|
109
|
+
impressionsGoal: z.number().optional(),
|
|
110
|
+
impressionsDelivered: z.number().optional(),
|
|
111
|
+
targetLocations: z.array(z.string()).optional(),
|
|
112
|
+
targetBillboards: z.array(z.string()).optional(),
|
|
113
|
+
createdAt: z.string(),
|
|
114
|
+
updatedAt: z.string(),
|
|
115
|
+
});
|
|
116
|
+
|
|
117
|
+
export const insertLineItemSchema = lineItemSchema.omit({
|
|
118
|
+
id: true,
|
|
119
|
+
createdAt: true,
|
|
120
|
+
updatedAt: true,
|
|
121
|
+
spentBudget: true,
|
|
122
|
+
impressionsDelivered: true
|
|
123
|
+
}).extend({
|
|
124
|
+
spentBudget: z.number().default(0),
|
|
125
|
+
impressionsDelivered: z.number().default(0),
|
|
126
|
+
});
|
|
127
|
+
|
|
128
|
+
export type LineItem = z.infer<typeof lineItemSchema>;
|
|
129
|
+
export type InsertLineItem = z.infer<typeof insertLineItemSchema>;
|
|
130
|
+
|
|
131
|
+
// Creative Types
|
|
132
|
+
export const creativeTypeEnum = z.enum([
|
|
133
|
+
"DISPLAY",
|
|
134
|
+
"VIDEO",
|
|
135
|
+
"AUDIO"
|
|
136
|
+
]);
|
|
137
|
+
|
|
138
|
+
export const creativeStatusEnum = z.enum([
|
|
139
|
+
"DRAFT",
|
|
140
|
+
"PENDING_REVIEW",
|
|
141
|
+
"APPROVED",
|
|
142
|
+
"REJECTED",
|
|
143
|
+
"ACTIVE"
|
|
144
|
+
]);
|
|
145
|
+
|
|
146
|
+
export const creativeSchema = z.object({
|
|
147
|
+
id: z.string(),
|
|
148
|
+
lineItemId: z.string(),
|
|
149
|
+
name: z.string(),
|
|
150
|
+
type: creativeTypeEnum,
|
|
151
|
+
status: creativeStatusEnum,
|
|
152
|
+
assetUrl: z.string(),
|
|
153
|
+
thumbnailUrl: z.string().optional(),
|
|
154
|
+
duration: z.number().optional(),
|
|
155
|
+
format: z.string(),
|
|
156
|
+
resolution: z.string().optional(),
|
|
157
|
+
fileSize: z.number().optional(),
|
|
158
|
+
createdAt: z.string(),
|
|
159
|
+
updatedAt: z.string(),
|
|
160
|
+
});
|
|
161
|
+
|
|
162
|
+
export const insertCreativeSchema = creativeSchema.omit({
|
|
163
|
+
id: true,
|
|
164
|
+
createdAt: true,
|
|
165
|
+
updatedAt: true
|
|
166
|
+
});
|
|
167
|
+
|
|
168
|
+
export type Creative = z.infer<typeof creativeSchema>;
|
|
169
|
+
export type InsertCreative = z.infer<typeof insertCreativeSchema>;
|
|
170
|
+
|
|
171
|
+
// ============================================================================
|
|
172
|
+
// SCREEN API SCHEMAS
|
|
173
|
+
// ============================================================================
|
|
174
|
+
|
|
175
|
+
// Billboard Types
|
|
176
|
+
export const billboardTypeEnum = z.enum([
|
|
177
|
+
"DIGITAL",
|
|
178
|
+
"CLASSIC",
|
|
179
|
+
"DIGITAL_TRANSIT",
|
|
180
|
+
"CLASSIC_TRANSIT"
|
|
181
|
+
]);
|
|
182
|
+
|
|
183
|
+
export const billboardEnvironmentEnum = z.enum([
|
|
184
|
+
"OUTDOOR",
|
|
185
|
+
"INDOOR"
|
|
186
|
+
]);
|
|
187
|
+
|
|
188
|
+
export const billboardOrientationEnum = z.enum([
|
|
189
|
+
"LANDSCAPE",
|
|
190
|
+
"PORTRAIT",
|
|
191
|
+
"SQUARE"
|
|
192
|
+
]);
|
|
193
|
+
|
|
194
|
+
export const billboardSchema = z.object({
|
|
195
|
+
id: z.string(),
|
|
196
|
+
name: z.string(),
|
|
197
|
+
type: billboardTypeEnum,
|
|
198
|
+
mediaOwnerId: z.string(),
|
|
199
|
+
mediaOwnerName: z.string(),
|
|
200
|
+
|
|
201
|
+
// Location
|
|
202
|
+
geom: z.string(), // POINT(longitude latitude)
|
|
203
|
+
timeZone: z.string(),
|
|
204
|
+
adminLevel0Id: z.string(),
|
|
205
|
+
adminLevel0Name: z.string(),
|
|
206
|
+
adminLevel1Id: z.string().optional(),
|
|
207
|
+
adminLevel1Name: z.string().optional(),
|
|
208
|
+
adminLevel2Id: z.string().optional(),
|
|
209
|
+
adminLevel2Name: z.string().optional(),
|
|
210
|
+
adminLevel3Id: z.string().optional(),
|
|
211
|
+
adminLevel3Name: z.string().optional(),
|
|
212
|
+
adminLevel4Id: z.string().optional(),
|
|
213
|
+
adminLevel4Name: z.string().optional(),
|
|
214
|
+
|
|
215
|
+
// Details
|
|
216
|
+
address: z.string().optional(),
|
|
217
|
+
environment: billboardEnvironmentEnum.optional(),
|
|
218
|
+
orientation: billboardOrientationEnum.optional(),
|
|
219
|
+
mediaFormat: z.string().optional(),
|
|
220
|
+
languagePreferences: z.array(z.string()).optional(),
|
|
221
|
+
|
|
222
|
+
// Metadata
|
|
223
|
+
archived: z.boolean(),
|
|
224
|
+
requiresContentApproval: z.boolean(),
|
|
225
|
+
leadDays: z.number(),
|
|
226
|
+
url: z.string(),
|
|
227
|
+
thumbnailUrl: z.string(),
|
|
228
|
+
|
|
229
|
+
// Digital Billboard specific (optional)
|
|
230
|
+
playerSoftwareId: z.string().optional(),
|
|
231
|
+
playerSoftwareName: z.string().optional(),
|
|
232
|
+
playerCount: z.number().optional(),
|
|
233
|
+
screenStartTime: z.string().optional(),
|
|
234
|
+
screenEndTime: z.string().optional(),
|
|
235
|
+
spotDuration: z.number().optional(),
|
|
236
|
+
spotsPerLoop: z.number().optional(),
|
|
237
|
+
creativeSpecificationUrl: z.string().optional(),
|
|
238
|
+
|
|
239
|
+
createdAt: z.string(),
|
|
240
|
+
updatedAt: z.string(),
|
|
241
|
+
});
|
|
242
|
+
|
|
243
|
+
export const insertBillboardSchema = billboardSchema.omit({
|
|
244
|
+
id: true,
|
|
245
|
+
createdAt: true,
|
|
246
|
+
updatedAt: true
|
|
247
|
+
}).extend({
|
|
248
|
+
archived: z.boolean().default(false),
|
|
249
|
+
requiresContentApproval: z.boolean().default(false),
|
|
250
|
+
leadDays: z.number().default(0),
|
|
251
|
+
url: z.string().default('https://cdn.movingwalls.com/billboard.jpg'),
|
|
252
|
+
thumbnailUrl: z.string().default('https://cdn.movingwalls.com/thumbnail.jpg'),
|
|
253
|
+
});
|
|
254
|
+
|
|
255
|
+
export type Billboard = z.infer<typeof billboardSchema>;
|
|
256
|
+
export type InsertBillboard = z.infer<typeof insertBillboardSchema>;
|
|
257
|
+
|
|
258
|
+
// Billboard Panel
|
|
259
|
+
export const billboardPanelSchema = z.object({
|
|
260
|
+
id: z.string(),
|
|
261
|
+
billboardId: z.string(),
|
|
262
|
+
pixelWidth: z.number().optional(),
|
|
263
|
+
pixelHeight: z.number().optional(),
|
|
264
|
+
physicalWidth: z.number(),
|
|
265
|
+
physicalHeight: z.number(),
|
|
266
|
+
panelCount: z.number(),
|
|
267
|
+
});
|
|
268
|
+
|
|
269
|
+
export const insertBillboardPanelSchema = billboardPanelSchema.omit({ id: true });
|
|
270
|
+
|
|
271
|
+
export type BillboardPanel = z.infer<typeof billboardPanelSchema>;
|
|
272
|
+
export type InsertBillboardPanel = z.infer<typeof insertBillboardPanelSchema>;
|
|
273
|
+
|
|
274
|
+
// Billboard Exposure
|
|
275
|
+
export const billboardExposureSchema = z.object({
|
|
276
|
+
id: z.string(),
|
|
277
|
+
billboardId: z.string(),
|
|
278
|
+
dspId: z.string(),
|
|
279
|
+
dspName: z.string(),
|
|
280
|
+
});
|
|
281
|
+
|
|
282
|
+
export const insertBillboardExposureSchema = billboardExposureSchema.omit({ id: true });
|
|
283
|
+
|
|
284
|
+
export type BillboardExposure = z.infer<typeof billboardExposureSchema>;
|
|
285
|
+
export type InsertBillboardExposure = z.infer<typeof insertBillboardExposureSchema>;
|
|
286
|
+
|
|
287
|
+
// Billboard External ID
|
|
288
|
+
export const billboardExternalIdSchema = z.object({
|
|
289
|
+
id: z.string(),
|
|
290
|
+
billboardId: z.string(),
|
|
291
|
+
platform: z.string(),
|
|
292
|
+
externalId: z.string(),
|
|
293
|
+
});
|
|
294
|
+
|
|
295
|
+
export const insertBillboardExternalIdSchema = billboardExternalIdSchema.omit({ id: true });
|
|
296
|
+
|
|
297
|
+
export type BillboardExternalId = z.infer<typeof billboardExternalIdSchema>;
|
|
298
|
+
export type InsertBillboardExternalId = z.infer<typeof insertBillboardExternalIdSchema>;
|
|
299
|
+
|
|
300
|
+
// ============================================================================
|
|
301
|
+
// SUPPORTING SCHEMAS
|
|
302
|
+
// ============================================================================
|
|
303
|
+
|
|
304
|
+
// Media Owner
|
|
305
|
+
export const mediaOwnerSchema = z.object({
|
|
306
|
+
id: z.string(),
|
|
307
|
+
name: z.string(),
|
|
308
|
+
createdAt: z.string(),
|
|
309
|
+
});
|
|
310
|
+
|
|
311
|
+
export const insertMediaOwnerSchema = mediaOwnerSchema.omit({
|
|
312
|
+
id: true,
|
|
313
|
+
createdAt: true
|
|
314
|
+
});
|
|
315
|
+
|
|
316
|
+
export type MediaOwner = z.infer<typeof mediaOwnerSchema>;
|
|
317
|
+
export type InsertMediaOwner = z.infer<typeof insertMediaOwnerSchema>;
|
|
318
|
+
|
|
319
|
+
// DSP (Demand Side Platform)
|
|
320
|
+
export const dspSchema = z.object({
|
|
321
|
+
id: z.string(),
|
|
322
|
+
name: z.string(),
|
|
323
|
+
dspType: z.string().optional(),
|
|
324
|
+
transactionType: z.string().optional(),
|
|
325
|
+
ipAddress: z.string().optional(),
|
|
326
|
+
country: z.string().optional(),
|
|
327
|
+
email: z.string().optional(),
|
|
328
|
+
url: z.string().optional(),
|
|
329
|
+
inventoryAccess: z.string().optional(),
|
|
330
|
+
currencyAccess: z.string().optional(),
|
|
331
|
+
mediaType: z.string().optional(),
|
|
332
|
+
accessTokenKey: z.string().optional(),
|
|
333
|
+
accessTokenSecret: z.string().optional(),
|
|
334
|
+
creativeOfflineApproval: z.boolean().default(false),
|
|
335
|
+
dealAutoApproval: z.boolean().default(false),
|
|
336
|
+
dealReopen: z.boolean().default(false),
|
|
337
|
+
enableAspectRatio: z.boolean().default(false),
|
|
338
|
+
displayAspectRatio: z.string().optional(),
|
|
339
|
+
disclaimer: z.string().optional(),
|
|
340
|
+
billingName: z.string().optional(),
|
|
341
|
+
billingAddress: z.string().optional(),
|
|
342
|
+
billingEmail: z.string().optional(),
|
|
343
|
+
reportingType: z.string().optional(),
|
|
344
|
+
reportingTimeZone: z.string().optional(),
|
|
345
|
+
reportingEmailId: z.string().optional(),
|
|
346
|
+
reportingFields: z.array(z.string()).optional(),
|
|
347
|
+
reportingTime: z.string().optional(),
|
|
348
|
+
reportingActivate: z.boolean().default(false),
|
|
349
|
+
createdBy: z.string().optional(),
|
|
350
|
+
createdAt: z.string(),
|
|
351
|
+
updatedAt: z.string().optional(),
|
|
352
|
+
});
|
|
353
|
+
|
|
354
|
+
export const insertDspSchema = dspSchema.omit({
|
|
355
|
+
id: true,
|
|
356
|
+
createdAt: true,
|
|
357
|
+
updatedAt: true
|
|
358
|
+
});
|
|
359
|
+
|
|
360
|
+
export type DSP = z.infer<typeof dspSchema>;
|
|
361
|
+
export type InsertDSP = z.infer<typeof insertDspSchema>;
|
|
362
|
+
|
|
363
|
+
// Buyer (DSP Seat/Buyer)
|
|
364
|
+
export const buyerSchema = z.object({
|
|
365
|
+
id: z.string(),
|
|
366
|
+
dspId: z.string(),
|
|
367
|
+
dspName: z.string().optional(),
|
|
368
|
+
seatId: z.string(),
|
|
369
|
+
seatName: z.string(),
|
|
370
|
+
buyerAccountId: z.string(),
|
|
371
|
+
email: z.string(),
|
|
372
|
+
createdAt: z.string(),
|
|
373
|
+
updatedAt: z.string().optional(),
|
|
374
|
+
});
|
|
375
|
+
|
|
376
|
+
export const insertBuyerSchema = buyerSchema.omit({
|
|
377
|
+
id: true,
|
|
378
|
+
createdAt: true,
|
|
379
|
+
updatedAt: true
|
|
380
|
+
});
|
|
381
|
+
|
|
382
|
+
export type Buyer = z.infer<typeof buyerSchema>;
|
|
383
|
+
export type InsertBuyer = z.infer<typeof insertBuyerSchema>;
|
|
384
|
+
|
|
385
|
+
// SSP
|
|
386
|
+
export const sspSchema = z.object({
|
|
387
|
+
id: z.string(),
|
|
388
|
+
name: z.string(),
|
|
389
|
+
createdAt: z.string(),
|
|
390
|
+
});
|
|
391
|
+
|
|
392
|
+
export const insertSspSchema = sspSchema.omit({
|
|
393
|
+
id: true,
|
|
394
|
+
createdAt: true
|
|
395
|
+
});
|
|
396
|
+
|
|
397
|
+
export type SSP = z.infer<typeof sspSchema>;
|
|
398
|
+
export type InsertSSP = z.infer<typeof insertSspSchema>;
|
|
399
|
+
|
|
400
|
+
// User (extended for OAuth)
|
|
401
|
+
export const userSchema = z.object({
|
|
402
|
+
id: z.string(),
|
|
403
|
+
username: z.string().optional(),
|
|
404
|
+
password: z.string().optional(),
|
|
405
|
+
|
|
406
|
+
// OAuth fields
|
|
407
|
+
provider: z.string().optional(),
|
|
408
|
+
providerId: z.string().optional(),
|
|
409
|
+
accessToken: z.string().optional(),
|
|
410
|
+
refreshToken: z.string().optional(),
|
|
411
|
+
tokenExpiry: z.string().optional(),
|
|
412
|
+
|
|
413
|
+
// Profile fields from IAM
|
|
414
|
+
email: z.string().optional(),
|
|
415
|
+
name: z.string().optional(),
|
|
416
|
+
avatarUrl: z.string().optional(),
|
|
417
|
+
|
|
418
|
+
createdAt: z.string(),
|
|
419
|
+
updatedAt: z.string(),
|
|
420
|
+
});
|
|
421
|
+
|
|
422
|
+
export const insertUserSchema = userSchema.omit({ id: true, createdAt: true, updatedAt: true });
|
|
423
|
+
|
|
424
|
+
export type User = z.infer<typeof userSchema>;
|
|
425
|
+
export type InsertUser = z.infer<typeof insertUserSchema>;
|
|
426
|
+
|
|
427
|
+
// ============================================================================
|
|
428
|
+
// BULK SYNC SCHEMAS (Campaign API)
|
|
429
|
+
// ============================================================================
|
|
430
|
+
|
|
431
|
+
export const bulkSyncRequestSchema = z.object({
|
|
432
|
+
deals: z.array(insertDealSchema.extend({
|
|
433
|
+
lineItems: z.array(insertLineItemSchema.extend({
|
|
434
|
+
creatives: z.array(insertCreativeSchema).optional()
|
|
435
|
+
})).optional()
|
|
436
|
+
}))
|
|
437
|
+
});
|
|
438
|
+
|
|
439
|
+
export type BulkSyncRequest = z.infer<typeof bulkSyncRequestSchema>;
|
|
@@ -0,0 +1,149 @@
|
|
|
1
|
+
// Screen/Billboard API Types
|
|
2
|
+
// Aligned with Screen API Swagger specification
|
|
3
|
+
|
|
4
|
+
export type BillboardType = 'DIGITAL' | 'CLASSIC' | 'DIGITAL_TRANSIT' | 'CLASSIC_TRANSIT';
|
|
5
|
+
|
|
6
|
+
export type BillboardEnvironment = 'OUTDOOR' | 'INDOOR';
|
|
7
|
+
|
|
8
|
+
export type BillboardOrientation = 'LANDSCAPE' | 'PORTRAIT' | 'SQUARE';
|
|
9
|
+
|
|
10
|
+
export interface Billboard {
|
|
11
|
+
id: string;
|
|
12
|
+
created_at: string;
|
|
13
|
+
created_by: string;
|
|
14
|
+
updated_at: string;
|
|
15
|
+
updated_by: string;
|
|
16
|
+
|
|
17
|
+
// Media Owner
|
|
18
|
+
media_owner_id: string;
|
|
19
|
+
media_owner_name: string;
|
|
20
|
+
|
|
21
|
+
// Location
|
|
22
|
+
geom: string; // POINT(longitude latitude)
|
|
23
|
+
time_zone: string;
|
|
24
|
+
admin_level0_id: string;
|
|
25
|
+
admin_level0_name: string; // Country
|
|
26
|
+
admin_level1_id?: string;
|
|
27
|
+
admin_level1_name?: string; // State/Region
|
|
28
|
+
admin_level2_id?: string;
|
|
29
|
+
admin_level2_name?: string; // District/County
|
|
30
|
+
admin_level3_id?: string;
|
|
31
|
+
admin_level3_name?: string; // Area/Neighborhood
|
|
32
|
+
admin_level4_id?: string;
|
|
33
|
+
admin_level4_name?: string; // Specific Location
|
|
34
|
+
|
|
35
|
+
// Billboard Details
|
|
36
|
+
name: string;
|
|
37
|
+
type: BillboardType;
|
|
38
|
+
archived: boolean;
|
|
39
|
+
requires_content_approval: boolean;
|
|
40
|
+
lead_days: number;
|
|
41
|
+
url: string;
|
|
42
|
+
thumbnail_url: string;
|
|
43
|
+
|
|
44
|
+
// Optional Details
|
|
45
|
+
address?: string;
|
|
46
|
+
environment?: BillboardEnvironment;
|
|
47
|
+
orientation?: BillboardOrientation;
|
|
48
|
+
media_format?: string; // e.g., "1920x1080"
|
|
49
|
+
language_preferences?: string[]; // ISO 639-1 codes
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
export interface DigitalBillboard extends Billboard {
|
|
53
|
+
player_software_id: string;
|
|
54
|
+
player_software_name: string;
|
|
55
|
+
player_count: number;
|
|
56
|
+
screen_start_time?: string; // "HH:MM:SS"
|
|
57
|
+
screen_end_time?: string; // "HH:MM:SS"
|
|
58
|
+
spot_duration?: number; // seconds
|
|
59
|
+
spots_per_loop?: number;
|
|
60
|
+
creative_specification_url?: string;
|
|
61
|
+
}
|
|
62
|
+
|
|
63
|
+
export interface BillboardPanel {
|
|
64
|
+
id: string;
|
|
65
|
+
billboard_id: string;
|
|
66
|
+
pixel_width?: number;
|
|
67
|
+
pixel_height?: number;
|
|
68
|
+
physical_width: number; // meters
|
|
69
|
+
physical_height: number; // meters
|
|
70
|
+
panel_count: number;
|
|
71
|
+
}
|
|
72
|
+
|
|
73
|
+
export interface BillboardExposure {
|
|
74
|
+
billboard_id: string;
|
|
75
|
+
dsp_id: string;
|
|
76
|
+
dsp_name?: string;
|
|
77
|
+
}
|
|
78
|
+
|
|
79
|
+
export interface BillboardExternalId {
|
|
80
|
+
billboard_id: string;
|
|
81
|
+
platform: string; // LMX, ViOOH, Hivestack, etc.
|
|
82
|
+
external_id: string;
|
|
83
|
+
}
|
|
84
|
+
|
|
85
|
+
export interface BillboardContentExclusion {
|
|
86
|
+
billboard_id: string;
|
|
87
|
+
taxonomy_id: string;
|
|
88
|
+
version: string;
|
|
89
|
+
}
|
|
90
|
+
|
|
91
|
+
export interface BillboardVenue {
|
|
92
|
+
billboard_id: string;
|
|
93
|
+
taxonomy_id: string;
|
|
94
|
+
version: string;
|
|
95
|
+
}
|
|
96
|
+
|
|
97
|
+
export interface BillboardPrice {
|
|
98
|
+
id: string;
|
|
99
|
+
billboard_id: string;
|
|
100
|
+
cost_type: 'CPD' | 'CPM' | 'CPS';
|
|
101
|
+
amount: number;
|
|
102
|
+
currency: string;
|
|
103
|
+
start_date?: string;
|
|
104
|
+
end_date?: string;
|
|
105
|
+
}
|
|
106
|
+
|
|
107
|
+
export interface TransitRoute {
|
|
108
|
+
id: string;
|
|
109
|
+
name: string;
|
|
110
|
+
description?: string;
|
|
111
|
+
created_at: string;
|
|
112
|
+
updated_at: string;
|
|
113
|
+
}
|
|
114
|
+
|
|
115
|
+
export interface TransitRoutePoint {
|
|
116
|
+
id: string;
|
|
117
|
+
transit_route_id: string;
|
|
118
|
+
ordinal: number;
|
|
119
|
+
geom: string; // POINT(longitude latitude)
|
|
120
|
+
}
|
|
121
|
+
|
|
122
|
+
export interface BillboardWithRelations extends Billboard {
|
|
123
|
+
panels?: BillboardPanel[];
|
|
124
|
+
exposures?: BillboardExposure[];
|
|
125
|
+
external_ids?: BillboardExternalId[];
|
|
126
|
+
content_exclusions?: BillboardContentExclusion[];
|
|
127
|
+
venues?: BillboardVenue[];
|
|
128
|
+
prices?: BillboardPrice[];
|
|
129
|
+
}
|
|
130
|
+
|
|
131
|
+
// API Request/Response Types
|
|
132
|
+
export interface BillboardListResponse {
|
|
133
|
+
data: BillboardWithRelations[];
|
|
134
|
+
pagination: {
|
|
135
|
+
page: number;
|
|
136
|
+
pageSize: number;
|
|
137
|
+
total: number;
|
|
138
|
+
totalPages: number;
|
|
139
|
+
};
|
|
140
|
+
}
|
|
141
|
+
|
|
142
|
+
export interface BulkImportBillboardRequest {
|
|
143
|
+
billboard: Partial<Billboard>;
|
|
144
|
+
panels?: Partial<BillboardPanel>[];
|
|
145
|
+
exposures?: { dsp_id: string }[];
|
|
146
|
+
external_ids?: { platform: string; external_id: string }[];
|
|
147
|
+
content_exclusions?: { taxonomy_id: string; version: string }[];
|
|
148
|
+
venues?: { taxonomy_id: string; version: string }[];
|
|
149
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"openapi":"3.1.0","info":{"title":"MovingWalls Creative Management","description":"Backend APIs for Creative Management","version":"1.0.0"},"servers":[{"url":"/"}],"tags":[{"name":"Inventory Recommendation","description":"APIs to generate recommendations based on user inputs"},{"name":"Schedule Recommendations","description":"APIs for generating schedule recommendations"}],"paths":{"/api/v1/recommendation/schedules":{"post":{"tags":["Schedule Recommendations"],"summary":"Generate schedule recommendations","description":"Generate recommended schedules for the provided inventory IDs based on availability","operationId":"generateSchedules","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ScheduleRecommendationRequestDTO"}}},"required":true},"responses":{"200":{"description":"OK","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ApiResponseScheduleRecommendationResponseDTO"}}}}}}},"/api/v1/recommendation/runs/{runId}/selected-inventories":{"post":{"tags":["Inventory Recommendation"],"summary":"Mark selected inventories","description":"Mark selected inventories for a recommendation run. If selected inventoryIds are not in existing results (e.g., excluded by geoTargeting), generate recommendations for them and re-sort all results by finalScore. The isSelected field will be returned in recommendation result responses.","operationId":"markSelectedInventories","parameters":[{"name":"runId","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SelectedInventoriesDTO"}}},"required":true},"responses":{"200":{"description":"OK","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ApiResponseVoid"}}}}},"security":[{"basicAuth":[]}]}},"/api/v1/recommendation/runs/{runId}/results":{"post":{"tags":["Inventory Recommendation"],"summary":"Get recommendation results with filtering","description":"Get paginated recommendation results for a runId with filtering and sorting support. Returns error if runId is IN_PROGRESS or not found. Default sort: finalScore,desc. Valid sort fields: finalScore, inventoryId, referenceId, name, createdAt, estimatedImpressions, estimatedReach, estimatedFrequency, estimatedCost, measureFit, geoFit, availability, budgetFit, audienceFit, brandFit, qualityFit, timeFit. Filters can be applied on inventory properties, scores, forecasts, and costs.","operationId":"getRecommendationResults","parameters":[{"name":"runId","in":"path","required":true,"schema":{"type":"string"}},{"name":"page","in":"query","description":"Page number (0-based)","required":false,"schema":{"type":"integer","format":"int32","default":0}},{"name":"size","in":"query","description":"Page size","required":false,"schema":{"type":"integer","format":"int32","default":20}},{"name":"sort","in":"query","description":"Sort parameters (format: field,direction). Multiple sorts can be specified. Example: sort=finalScore,desc&sort=inventoryId,asc","required":false,"schema":{"type":"array","items":{"type":"string"}}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RecommendationResultFilterDTO"}}}},"responses":{"200":{"description":"OK","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ApiResponsePaginatedRecommendationResponseDTO"}}}}},"security":[{"basicAuth":[]}]}},"/api/v1/recommendation/campaigns/{campaignId}/recommendations":{"post":{"tags":["Inventory Recommendation"],"summary":"Submit recommendation request","description":"Submit a recommendation request. Returns runId and status. If same payload already exists, returns existing runId.","operationId":"submitRecommendation","parameters":[{"name":"campaignId","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RecommendationRequestDTO"}}},"required":true},"responses":{"200":{"description":"OK","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ApiResponseRecommendationStatusResponseDTO"}}}}},"security":[{"basicAuth":[]}]}}},"components":{"schemas":{"ScheduleRecommendationRequestDTO":{"type":"object","properties":{"inventoryIds":{"type":"array","items":{"type":"string"},"minItems":1},"startDate":{"type":"string","format":"date"},"endDate":{"type":"string","format":"date"},"creativeDuration":{"type":"integer","format":"int32"},"bookingType":{"type":"string"}},"required":["endDate","inventoryIds","startDate"]},"ApiResponseScheduleRecommendationResponseDTO":{"type":"object","properties":{"success":{"type":"boolean"},"data":{"$ref":"#/components/schemas/ScheduleRecommendationResponseDTO"},"message":{"type":"string"},"error":{"$ref":"#/components/schemas/ErrorResponse"},"timestamp":{"type":"string","format":"date-time"}}},"AvailabilitySlotDetails":{"type":"object","properties":{"inventoryId":{"type":"string"},"startTime":{"type":"string","format":"date-time"},"endTime":{"type":"string","format":"date-time"},"isAvailable":{"type":"boolean"},"requestedSeconds":{"type":"integer","format":"int64"},"availableSeconds":{"type":"integer","format":"int64"},"allocatedSeconds":{"type":"integer","format":"int64"},"bookingMode":{"type":"string"},"loopDuration":{"type":"integer","format":"int32"},"slotCapacity":{"type":"array","items":{"$ref":"#/components/schemas/SlotCapacity"}},"issues":{"type":"array","items":{"type":"string"}},"conflictingBookings":{"type":"array","items":{"type":"string"}}}},"AvailabilitySummary":{"type":"object","properties":{"availableDays":{"type":"integer","format":"int32"},"totalDays":{"type":"integer","format":"int32"},"availabilityPercentage":{"type":"number","format":"double"},"summary":{"type":"string"},"allAvailable":{"type":"boolean"}}},"ErrorResponse":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"string"},"timestamp":{"type":"string","format":"date-time"}}},"InventorySchedule":{"type":"object","properties":{"inventoryId":{"type":"string"},"referenceId":{"type":"string"},"inventoryName":{"type":"string"},"recommendedSchedules":{"type":"array","items":{"$ref":"#/components/schemas/RecommendedSchedule"}},"availability":{"$ref":"#/components/schemas/AvailabilitySummary"}}},"RecommendedSchedule":{"type":"object","properties":{"scheduleId":{"type":"string"},"name":{"type":"string"},"scheduleStartDate":{"type":"string","format":"date"},"scheduleEndDate":{"type":"string","format":"date"},"scheduleDays":{"type":"array","items":{"type":"string","enum":["MONDAY","TUESDAY","WEDNESDAY","THURSDAY","FRIDAY","SATURDAY","SUNDAY"]}},"type":{"type":"string","enum":["LOOP","DAYPART"]},"bookingMatrix":{"type":"object","additionalProperties":{"type":"array","items":{"type":"integer","format":"int32"}}},"duration":{"type":"integer","format":"int64"},"spotsPerLoop":{"type":"integer","format":"int64"},"spotsPerHour":{"type":"integer","format":"int64"},"adPlays":{"type":"integer","format":"int64"},"plannedSot":{"type":"number","format":"double"},"totalSot":{"type":"number","format":"double"},"slotDetails":{"$ref":"#/components/schemas/AvailabilitySlotDetails"}}},"ScheduleRecommendationResponseDTO":{"type":"object","properties":{"requestId":{"type":"string"},"generatedAt":{"type":"string","format":"date-time"},"schedules":{"type":"array","items":{"$ref":"#/components/schemas/InventorySchedule"}}}},"SlotCapacity":{"type":"object","properties":{"slotPosition":{"type":"integer","format":"int32"},"spotDuration":{"type":"integer","format":"int32"},"requestedSeconds":{"type":"integer","format":"int64"},"availableSeconds":{"type":"integer","format":"int64"},"allocatedSeconds":{"type":"integer","format":"int64"},"isSlotAvailable":{"type":"boolean"}}},"SelectedInventoriesDTO":{"type":"object","properties":{"inventoryIds":{"type":"array","items":{"type":"string"}}}},"ApiResponseVoid":{"type":"object","properties":{"success":{"type":"boolean"},"data":{},"message":{"type":"string"},"error":{"$ref":"#/components/schemas/ErrorResponse"},"timestamp":{"type":"string","format":"date-time"}}},"RecommendationResultFilterDTO":{"type":"object","description":"Filter criteria (optional)","properties":{"inventoryIds":{"type":"array","items":{"type":"string"}},"referenceIds":{"type":"array","items":{"type":"string"}},"types":{"type":"array","items":{"type":"string"}},"formats":{"type":"array","items":{"type":"string"}},"environments":{"type":"array","items":{"type":"string"}},"venueTypes":{"type":"array","items":{"type":"string"}},"orientations":{"type":"array","items":{"type":"string"}},"sizes":{"type":"array","items":{"type":"string"}},"mediaOwnerIds":{"type":"array","items":{"type":"string"}},"mediaOwnerNames":{"type":"array","items":{"type":"string"}},"countryIds":{"type":"array","items":{"type":"string"}},"countryNames":{"type":"array","items":{"type":"string"}},"stateIds":{"type":"array","items":{"type":"string"}},"stateNames":{"type":"array","items":{"type":"string"}},"cityIds":{"type":"array","items":{"type":"string"}},"cityNames":{"type":"array","items":{"type":"string"}},"minFinalScore":{"type":"number","format":"double"},"maxFinalScore":{"type":"number","format":"double"},"minMeasureFit":{"type":"number","format":"double"},"maxMeasureFit":{"type":"number","format":"double"},"minGeoFit":{"type":"number","format":"double"},"maxGeoFit":{"type":"number","format":"double"},"minAvailability":{"type":"number","format":"double"},"maxAvailability":{"type":"number","format":"double"},"minBudgetFit":{"type":"number","format":"double"},"maxBudgetFit":{"type":"number","format":"double"},"minAudienceFit":{"type":"number","format":"double"},"maxAudienceFit":{"type":"number","format":"double"},"minBrandFit":{"type":"number","format":"double"},"maxBrandFit":{"type":"number","format":"double"},"minQualityFit":{"type":"number","format":"double"},"maxQualityFit":{"type":"number","format":"double"},"minTimeFit":{"type":"number","format":"double"},"maxTimeFit":{"type":"number","format":"double"},"minEstimatedImpressions":{"type":"integer","format":"int64"},"maxEstimatedImpressions":{"type":"integer","format":"int64"},"minEstimatedReach":{"type":"integer","format":"int64"},"maxEstimatedReach":{"type":"integer","format":"int64"},"minEstimatedFrequency":{"type":"number","format":"double"},"maxEstimatedFrequency":{"type":"number","format":"double"},"minEstimatedCost":{"type":"number"},"maxEstimatedCost":{"type":"number"},"currencies":{"type":"array","items":{"type":"string"}},"minAvailabilityPercentage":{"type":"number","format":"double"},"maxAvailabilityPercentage":{"type":"number","format":"double"},"allAvailable":{"type":"boolean"}}},"ApiResponsePaginatedRecommendationResponseDTO":{"type":"object","properties":{"success":{"type":"boolean"},"data":{"$ref":"#/components/schemas/PaginatedRecommendationResponseDTO"},"message":{"type":"string"},"error":{"$ref":"#/components/schemas/ErrorResponse"},"timestamp":{"type":"string","format":"date-time"}}},"ComponentScores":{"type":"object","properties":{"measureFit":{"type":"number","format":"double"},"geoFit":{"type":"number","format":"double"},"availability":{"type":"number","format":"double"},"budgetFit":{"type":"number","format":"double"},"audienceFit":{"type":"number","format":"double"},"brandFit":{"type":"number","format":"double"},"qualityFit":{"type":"number","format":"double"},"timeFit":{"type":"number","format":"double"}}},"CostEstimate":{"type":"object","properties":{"estimatedCost":{"type":"number"},"currency":{"type":"string"},"costPerImpression":{"type":"number","format":"double"}}},"ForecastedMetrics":{"type":"object","properties":{"estimatedImpressions":{"type":"integer","format":"int64"},"estimatedReach":{"type":"integer","format":"int64"},"estimatedSov":{"type":"number","format":"double"},"estimatedFrequency":{"type":"number","format":"double"}}},"InventoryDetails":{"type":"object","properties":{"classification":{"type":"string"},"type":{"type":"string"},"format":{"type":"string"},"environment":{"type":"string"},"venueTypes":{"type":"array","items":{"type":"string"}},"orientation":{"type":"string"},"sizes":{"type":"array","items":{"type":"string"}},"mediaOwnerId":{"type":"string"},"mediaOwnerName":{"type":"string"},"address":{"type":"string"},"location":{"$ref":"#/components/schemas/InventoryLocation"}}},"InventoryLocation":{"type":"object","properties":{"countryId":{"type":"string"},"countryName":{"type":"string"},"stateId":{"type":"string"},"stateName":{"type":"string"},"cityId":{"type":"string"},"cityName":{"type":"string"},"locationCoordinates":{}}},"PaginatedRecommendationResponseDTO":{"type":"object","properties":{"runId":{"type":"string"},"campaignId":{"type":"string"},"productId":{"type":"string"},"companyId":{"type":"string"},"recommendations":{"type":"array","items":{"$ref":"#/components/schemas/RecommendedInventory"}},"pagination":{"$ref":"#/components/schemas/PaginationInfo"}}},"PaginationInfo":{"type":"object","properties":{"page":{"type":"integer","format":"int32"},"size":{"type":"integer","format":"int32"},"totalElements":{"type":"integer","format":"int64"},"totalPages":{"type":"integer","format":"int32"},"hasNext":{"type":"boolean"},"hasPrevious":{"type":"boolean"}}},"RecommendedInventory":{"type":"object","properties":{"inventoryId":{"type":"string"},"referenceId":{"type":"string"},"name":{"type":"string"},"finalScore":{"type":"number","format":"double"},"componentScores":{"$ref":"#/components/schemas/ComponentScores"},"why":{"type":"string"},"availability":{"$ref":"#/components/schemas/AvailabilitySummary"},"forecast":{"$ref":"#/components/schemas/ForecastedMetrics"},"cost":{"$ref":"#/components/schemas/CostEstimate"},"inventoryDetails":{"$ref":"#/components/schemas/InventoryDetails"},"isSelected":{"type":"boolean"},"isExcluded":{"type":"boolean"}}},"AudienceTargeting":{"type":"object","properties":{"audienceSegments":{"type":"array","items":{"type":"string"}},"demographics":{"type":"object","additionalProperties":{"type":"array","items":{"type":"string"}}}}},"Geofence":{"type":"object","properties":{"type":{"type":"string"},"coordinates":{"type":"array","items":{"type":"array","items":{"type":"number","format":"double"}}},"centerLng":{"type":"number","format":"double"},"centerLat":{"type":"number","format":"double"}}},"GeographyTargeting":{"type":"object","properties":{"cities":{"type":"array","items":{"type":"string"}},"states":{"type":"array","items":{"type":"string"}},"geofences":{"type":"array","items":{"$ref":"#/components/schemas/Geofence"}}}},"RecommendationRequestDTO":{"type":"object","properties":{"country":{"type":"string","minLength":1},"startDate":{"type":"string","format":"date"},"endDate":{"type":"string","format":"date"},"productId":{"type":"string"},"companyId":{"type":"string"},"geographyTargeting":{"$ref":"#/components/schemas/GeographyTargeting"},"audienceTargeting":{"$ref":"#/components/schemas/AudienceTargeting"},"brandId":{"type":"string"},"budget":{"type":"number"},"goal":{"type":"string","enum":["IMPRESSIONS","REACH","SOV"]},"goalValue":{"type":"integer","format":"int64"},"excludedInventoryIds":{"type":"array","items":{"type":"string"}},"excludedIabCategories":{"type":"array","items":{"type":"string"}},"topN":{"type":"integer","format":"int32"}},"required":["country","endDate","startDate"]},"ApiResponseRecommendationStatusResponseDTO":{"type":"object","properties":{"success":{"type":"boolean"},"data":{"$ref":"#/components/schemas/RecommendationStatusResponseDTO"},"message":{"type":"string"},"error":{"$ref":"#/components/schemas/ErrorResponse"},"timestamp":{"type":"string","format":"date-time"}}},"RecommendationMetadata":{"type":"object","properties":{"totalInventoriesEvaluated":{"type":"integer","format":"int32"},"totalInventoriesRecommended":{"type":"integer","format":"int32"},"totalInventoriesExcluded":{"type":"integer","format":"int32"},"exclusionReasons":{"type":"object","additionalProperties":{"type":"integer","format":"int32"}},"averageScore":{"type":"number","format":"double"},"seed":{"type":"string"}}},"RecommendationStatusResponseDTO":{"type":"object","properties":{"runId":{"type":"string"},"status":{"type":"string","enum":["IN_PROGRESS","COMPLETED"]},"completionPercentage":{"type":"integer","format":"int32"},"campaignId":{"type":"string"},"productId":{"type":"string"},"companyId":{"type":"string"},"generatedAt":{"type":"string","format":"date-time"},"metadata":{"$ref":"#/components/schemas/RecommendationMetadata"},"warnings":{"type":"array","items":{"type":"string"}}}}},"securitySchemes":{"basicAuth":{"type":"http","scheme":"basic"}}}}
|