diff --git a/docs/event_definitions/Nonprofit/Campaign/CampaignGift.ts b/docs/event_definitions/Nonprofit/Campaign/CampaignGift.ts new file mode 100644 index 00000000..ad600192 --- /dev/null +++ b/docs/event_definitions/Nonprofit/Campaign/CampaignGift.ts @@ -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 { + 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>; \ No newline at end of file diff --git a/docs/event_definitions/Nonprofit/Campaign/CampaignGiftPurchase.ts b/docs/event_definitions/Nonprofit/Campaign/CampaignGiftPurchase.ts new file mode 100644 index 00000000..39a9ac38 --- /dev/null +++ b/docs/event_definitions/Nonprofit/Campaign/CampaignGiftPurchase.ts @@ -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 { + 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>; \ No newline at end of file diff --git a/docs/event_definitions/Nonprofit/Campaign/index.ts b/docs/event_definitions/Nonprofit/Campaign/index.ts index 0a902e29..e167e542 100644 --- a/docs/event_definitions/Nonprofit/Campaign/index.ts +++ b/docs/event_definitions/Nonprofit/Campaign/index.ts @@ -9,3 +9,5 @@ export default interface Campaign extends HoudiniObject { } export * from './CampaignGiftOption'; +export * from './CampaignGiftPurchase'; +export * from './CampaignGift';