Create definitions for CampaignGift and CampaignGiftOptions

This commit is contained in:
Eric Schultz 2021-02-08 15:22:35 -06:00 committed by Eric Schultz
parent 8ee309c1f2
commit 34627681a2
3 changed files with 56 additions and 0 deletions

View file

@ -0,0 +1,31 @@
// License: LGPL-3.0-or-later
import type { HouID, HoudiniObject, HoudiniEvent, Amount, IdType} from '../../common';
import type Nonprofit from '..';
import type Campaign from '.';
import type { CampaignGiftPurchase, CampaignGiftOption } from '.';
import type Supporter from '../Supporter';
export interface TransactionAddress {
address: string;
city: string;
country: string;
state_code: string;
zip_code: string;
}
export interface CampaignGift extends HoudiniObject<HouID> {
address?: TransactionAddress;
amount: Amount;
campaign: IdType | Campaign;
campaign_gift_option: IdType | CampaignGiftOption;
campaign_gift_purchase: IdType | CampaignGiftPurchase;
deleted: boolean;
event: IdType | Event;
nonprofit: IdType | Nonprofit;
object: 'campaign_gift';
supporter: IdType | Supporter;
}
export type CampaignGiftCreated = HoudiniEvent<'campaign_gift.created', CampaignGift>;
export type CampaignGiftUpdated = HoudiniEvent<'campaign_gift.updated', CampaignGift>;
export type CampaignGiftDeleted = HoudiniEvent<'campaign_gift.deleted', CampaignGift>;

View file

@ -0,0 +1,23 @@
// License: LGPL-3.0-or-later
import type { HouID, HoudiniObject, HoudiniEvent, Amount, IdType} from '../../common';
import type Nonprofit from '..';
import type Campaign from '.';
import type { CampaignGift } from '.';
import Supporter from '../Supporter';
import { Transaction } from '../Supporter';
export interface CampaignGiftPurchase extends HoudiniObject<HouID> {
amount: Amount;
campaign: IdType | Campaign;
campaign_gifts: HouID[] | CampaignGift[];
nonprofit: IdType | Nonprofit;
object: 'campaign_gift_purchase';
supporter: IdType | Supporter;
transaction: HouID | Transaction;
}
export type TicketPurchaseCreated = HoudiniEvent<'ticket_purchase.created', TicketPurchase>;
export type TicketPurchaseUpdated = HoudiniEvent<'ticket_purchase.updated', TicketPurchase>;
export type TicketPurchaseDeleted = HoudiniEvent<'ticket_purchase.deleted', TicketPurchase>;

View file

@ -9,3 +9,5 @@ export default interface Campaign extends HoudiniObject {
} }
export * from './CampaignGiftOption'; export * from './CampaignGiftOption';
export * from './CampaignGiftPurchase';
export * from './CampaignGift';