import type { PromotionAbtestGroupAssignment } from './PromotionAbtestGroupAssignment'; import type { Schedule } from './Schedule'; import type { PromotionCampaignAssignment } from './PromotionCampaignAssignment'; /** * @type PromotionAssignmentInformation: * * @property abtestId: If there is only one assignment, and that assignment is an A/B test segment, the ID of the A/B test the segment belongs to. Otherwise, empty. * * @property abtestSegmentId: If there is only one assignment, and that assignment is an A/B test segment, the ID of the A/B test segment. Otherwise, empty. * * @property active: True if the individual assignment or the multiple assignments are currently active. * * @property activeAbtestAssignments: A list of currently active A/B tests this is assigned to. * * @property activeCampaignAssignments: A list of currently active campaigns this is assigned to. * * @property campaignId: If there is only one assignment, and that assignment is a campaign, the ID of the campaign. Otherwise, empty. * * @property enabled: * * @property endDate: The end date of the container of the assignment (a Campaign or ABTest). If scheduleType is scheduleType : \"multiple\" or scheduleType : \"none\", then then result is null. Also, a null date returns null. * * @property schedule: The schedule of the assignment (a Campaign or ABTest). If scheduleType is scheduleType : \"multiple\" or scheduleType : \"none\", then then result is null. * * @property scheduleType: If there is only one active assignment, or no active assignments and one upcoming assignment, this is that type of assignment (scheduleType : \"campaign\" or scheduleType : \"abtest\"). If there are no assignments, it is scheduleType : \"none\", otherwise, scheduleType : \"multiple\". * * @property startDate: The start date of the container of the assignment (a Campaign or ABTest). If scheduleType is scheduleType : \"multiple\" or scheduleType : \"none\", then then result is null. Also, a null date returns null. * * @property upcomingAbtestAssignments: A list of upcoming A/B tests this is assigned to. * * @property upcomingCampaignAssignments: A list of upcoming campaigns this is assigned to. * */ export type PromotionAssignmentInformation = { abtestId: string; abtestSegmentId: string; active: boolean; activeAbtestAssignments: Array; activeCampaignAssignments: Array; campaignId: string; enabled: boolean; endDate: string; schedule: Schedule; scheduleType: PromotionAssignmentInformationScheduleTypeEnum; startDate: string; upcomingAbtestAssignments: Array; upcomingCampaignAssignments: Array; } & { [key: string]: any; }; export type PromotionAssignmentInformationScheduleTypeEnum = 'none' | 'campaign' | 'abtest' | 'multiple';