houdini/docs/event_definitions/Nonprofit/Event/EventDiscount.ts

23 lines
831 B
TypeScript
Raw Normal View History

2021-01-11 22:34:48 +00:00
// License: LGPL-3.0-or-later
import type { IdType, HoudiniObject, Amount, HoudiniEvent } from '../../common';
2021-01-11 22:34:48 +00:00
import type Nonprofit from '..';
import type Event from '.';
import type { TicketLevel } from './TicketLevel';
type DiscountType = { percent: number } | { amount: Amount };
2021-01-11 22:34:48 +00:00
/**
* Describes an EventDiscount (shell)
*/
export interface EventDiscount extends HoudiniObject {
code: string;
discount: DiscountType;
2021-01-11 22:34:48 +00:00
event: IdType | Event;
nonprofit: IdType | Nonprofit;
object: "event_discount";
ticket_levels: IdType[] | TicketLevel[];
}
export type EventDiscountCreated = HoudiniEvent<'event_discount.created', EventDiscount>;
export type EventDiscountlUpdated = HoudiniEvent<'event_discount.updated', EventDiscount>;
export type EventDiscountDeleted = HoudiniEvent<'event_discount.deleted', EventDiscount>;