import { StringOrInputColumnData } from "@annalib/anna-core"; import { REVISIONSTATUSES } from "@annalib/anna-feature-shared-lib"; import { DisplaySpotTypeFromBE, ESTIMATEPRIORITIES, SpotaApprovalIRadioButton, SpotTypeCategoryFromBE } from "./anna-revisions-enums.model"; export interface IANNARevisionBEResponse { OrderInfo: IANNARevisionOrderInfo; RevisionSummary: IANNARevisionOrderSummary; HighlightingPercentageLimitForColumns: IANNARevisionOrderInfo; OfferedMGsAndADUs: ISpotInformationResponse[]; OutstandingSpots: ISpotInformationResponse[]; BadlyBehavedInfo: IBadlyBehavedSpotAdditionalInfo[]; BizRulesFromDb: IBizRulesFromDB; GuideLinesAdditionalSpots: IGuideLines; EnableRevenueClassEdit: boolean; OfferCreationDropDown: []; BroadcastTime: string; } export interface IANNARevisionOrderInfo { Status: [ { IsCurrent: boolean; Status: REVISIONSTATUSES; Action: string; ShowNeedsAttentionIcon: boolean; OffersRequiringActionCount: number; } ]; SellerActionForOfferedMgAduTakenBy: string; SellerActionForOsPeTakenBy: string; SellerApprovalTimeForOsPe: string; SellerApprovalTime: string; SellerApprovalTimeout: string; AgencyName: string; SellerReviewTime: string; SellerReviewTimeout: string; SmTimeout: string; BuyerApprovalTime: string; BuyerApprovalTimeout: string; BuyerActionTakenBy: string; AdvertiserId: 66; ReasonForNoRevision: null | string; SpDayparts: string[]; OrderDiscrepancyExists: boolean; FlightStartDate: string; FlightEndDate: string; EstimateNumber: string; LastEditedBy: string; LastEditedAt: string; IntermediateOrderStatus: { Message: string; ShowMessageAfterStatus: string; }; AEEmailId: string; SalesSupportEmailId: string; DisableOffersReportDownloadIcon: boolean; DisableAduListingInDropDown: boolean; AnyActionsAllowed: boolean; IsSellerReconfirmationNeeded: boolean; HiatusPeriod: { StartDate: string; EndDate: string; }[]; PlacedWeeks: string[]; FirstBookedSpotDate: string; LastBookedSpotDate: string; Durations: { DisplayDuration: string; Duration: number; SpotTypeId: number; }[]; ShowOverDeliveryWarning: boolean; OverDeliveryValue: number; Station: string; OrderId: string; RevisionNumber: number; RevisedOn: string; TimeZone: string; OrderType: string; IsRepOrder: boolean; AEName: string; OrderStatus: string; IsReadMode: boolean; IsAutomated: boolean; IsPayForPerformanceOrder: boolean; Metric: "CPM" | "CPP"; ShowSubmitButton: boolean; ShowEditButton: boolean; EnableSubmitForMGADUFilter: boolean; EnableSubmitForOSPEFilter: boolean; ShowBizRuleApprovalWarning: boolean; OrderBizRuleStatus: string; IsInheritedLevelBizRulePending: boolean; InheritedLevel: string; ApprovedByBuyerName: null; BusinessRuleApprovedDate: string; BusinessRuleApprovedTime: string; IsOrderLevelBusinessRuleSet: boolean; RevisionType: string; AlternateOrderId: string; IsOngoingTemporaryRevisionAfterTransition: boolean; UniverseSize: number; IsDeletedAtTraffic: boolean; BusinessHistoryId: number; AdvertiserName: string; EstimatePriority: ESTIMATEPRIORITIES[]; ShowUnmappedBuyerLineWarning: boolean; } export interface IANNARevisionOrderSummary { OfferedMakegoods: ICostRatingsImpresssions; OfferedADUs: ICostRatingsImpresssions; ANNACredited: ICostRatingsImpresssions; UD: number; UDProjection: ICostRatingsImpresssions; OutstandingSpots: ICostRatingsImpresssions; Equivalisation: boolean; TgName: string; TgId: number; Advertiser: string; Agency: string; IsDeletedAtTraffic: boolean; Booked: ICPPCPMCostRatingsImpresssions; } export interface IBizRulesFromDB { MaxSpotsPerPremption: number; MinimumGrp: number; MaxSpotsPerPremptionRelaxed: number; MinimumGrpRelaxed: number; MaxSpotsRule: { MinProgramDuration: number; MaxSpotsAllowedInOto: number; MaxSpotsAllowedInOtoRelaxed: number; MaxSpotsAllowedInStripDaily: number; MaxSpotsAllowedInStripDailyRelaxed: number; MaxSpotsAllowedInStripWeekly: number; MaxSpotsAllowedInStripWeeklyRelaxed: number; }[]; } export interface IGuidelinesAdditionalData { TwoHoursToThreeHours: number; ThreeHoursPlus: number; PerHalfHour: number; HalfHourToOneHour: number; OneHourToTwoHours: number; } export interface IGuideLines { IsProjectionUsed: boolean; MinimumThreshold: number; Alternative: string; MaxSpotsAllowedInOTO: IGuidelinesAdditionalData; MaxSpotsAllowedInStripDaily: IGuidelinesAdditionalData; MaxSpotsAllowedInStripWeekly: IGuidelinesAdditionalData; } export interface ISpotInformationResponse { ProgramId: string; ProgramScheduleId: string; SpotTypeId: number; UniqueId: string; NewGroupId: string; GroupableId: string; SellerLine: number; NewSpotId: string; NewOfferGuId: string; SolvedType: string; SpotId: number; DisplaySpotType: DisplaySpotTypeFromBE; ImpressionUsedToSolve: number; RatingUsedToSolve: number; ExcludeFromFutureOffers: boolean; BuyerProgramName: string; BuyerProgramNameColumn: StringOrInputColumnData; BusinessRules: "Standard" | "Relaxed" | "-" | "Diluted"; HighlightRate: boolean; HighlightRatingOrImpressions: boolean; ProjectedRatings: number; ProjectedImpressions: number; IsRatingImpressionBumped: boolean; LineNumber: number; SpotNumber: number; SpotCount: number; WeekStartDate: string; Length: string; InventoryCode: string; Rate: number; GroupId: number; SpotType: SpotTypeCategoryFromBE; Remarks: string; PreemptMessages: string; ActionType?: string; Action?: "resubmit" | "approve" | "credit" | "noAction"; IsApprovalRequired?: boolean; iconClass?: string; Daypart: string; RadioButtonConfig?: SpotaApprovalIRadioButton[]; gtClass?: string; DisplayRate: string; AllowedActions: any; EnableAllowedActions: boolean; ActualRatings: number; ActualImpressions: number; ActualRate: number; IsMappedWithRep?: boolean; WeeklyAUR: number; WeeklyAURatings: number; WeeklyAUImpressions: number; DisplayWeeklyAUR: string; SellerOfferComments: string[]; MarkForCreditComment: string[]; ExcludedFromFutureOffersTooltipMessage: string; MakeGoodsOfferNumber: string; WeekDay: string; Time: string; RevenueClass: string; Date: string; Days: string; AdBreakId: number; Duration: number; InventoryCodeId: number; DaypartId: number; PriorityCodeId: number; BookedImpression: number; BookedRating: number; RollingEstimateImpression: number; RollingEstimateRating: number; StationEstimateImpression: number; StationEstimateRating: number; StartTime: string; EndTime: string; RestrictedEndTime: string; RestrictedStartTime: string; IsGroupModified: boolean; GroupModifiedBy: null | string; IsAddedInGroup: boolean; IsRemovedFromGroup: boolean; GroupTableId: number | null; NewOfferId: number; BizRules: IBizRulesForSpotsApproval | null; GuideLinesAdditionalSpots: IGuideLinesAdditionalSpots | null; BuyerLine: number; LastEditedAt: string; LastEditedBy: string; Ratings: number; Impressions: number; BizRulesFromDb: any; IsFreeFlowGroup: boolean; AllowRecall: boolean; AllowCancel: boolean; RecalledBy: string; CancelledBy: string; AllowActionInRejectionPopup: boolean; ShowActionInRejectionPopup: boolean; RejectionHeader: string; ShowNoReOfferToolTip: boolean; ActualInvetoryTime: string; AllowTimeEdit: boolean; IsTimeEdited: boolean; ForceTimeEdit: boolean; } export interface IBizRulesForSpotsApproval { MaxSpotsPerPremption: number | null; MinimumGrp: number | null; MaxSpotsAllowedInOTO: { PerHalfHour: number | null; HalfHourToOneHour: number | null; OneHourToTwoHours: number | null; TwoHoursToThreeHours: number | null; ThreeHoursPlus: number | null; }; MaxSpotsAllowedInStripDaily: { PerHalfHour: number | null; HalfHourToOneHour: number | null; OneHourToTwoHours: number | null; TwoHoursPlus: number | null; }; MaxSpotsAllowedInStripWeekly: { PerHalfHour: number | null; HalfHourToOneHour: number | null; OneHourToTwoHours: number | null; TwoHoursPlus: number | null; }; } export interface IGuideLinesAdditionalSpots { IsProjectionUsed: boolean; MinimumThreshold: number; Alternative: string; MaxSpotsAllowedInOTO: { TwoHoursToThreeHours: number; ThreeHoursPlus: number; PerHalfHour: number; HalfHourToOneHour: number; OneHourToTwoHours: number; }; MaxSpotsAllowedInStripDaily: { TwoHoursPlus: number; PerHalfHour: number; HalfHourToOneHour: number; OneHourToTwoHours: number; }; MaxSpotsAllowedInStripWeekly: { TwoHoursPlus: number; PerHalfHour: number; HalfHourToOneHour: number; OneHourToTwoHours: number; }; } export interface ICostRatingsImpresssions { Cost: string; Ratings: string; Impressions: string; } export interface ICPPCPMCostRatingsImpresssions extends ICostRatingsImpresssions { CPP: string; CPM: string; } export interface IBadlyBehavedSpotAdditionalInfo { SpotId: string; GroupId: string; SpotTypeToolTipMessage: string; RateImpactToolTipMessage: string; BbsOrderId: string; }