diff --git a/docs/event_definitions/Nonprofit/Transaction.ts b/docs/event_definitions/Nonprofit/Transaction.ts deleted file mode 100644 index d4a1331d..00000000 --- a/docs/event_definitions/Nonprofit/Transaction.ts +++ /dev/null @@ -1,10 +0,0 @@ -// License: LGPL-3.0-or-later -import type { Amount, HoudiniObject, IdType, HouID } from "../common"; -import type Nonprofit from './'; - - -export interface Transaction extends HoudiniObject { - amount: Amount; - nonprofit: IdType | Nonprofit; - object: 'transaction'; -} diff --git a/docs/event_definitions/Nonprofit/Transaction/Payment.ts b/docs/event_definitions/Nonprofit/Transaction/Payment.ts new file mode 100644 index 00000000..49489c96 --- /dev/null +++ b/docs/event_definitions/Nonprofit/Transaction/Payment.ts @@ -0,0 +1,16 @@ +// License: LGPL-3.0-or-later +import type { Amount, HoudiniObject, IdType, HouID } from "../../common"; +import type Nonprofit from '../'; +import type Supporter from "../Supporter"; +import type Transaction from './'; + + +export interface Payment extends HoudiniObject { + amount: Amount; + nonprofit: IdType | Nonprofit; + object: 'payment'; + supporter: IdType | Supporter; + transaction: HouID | Transaction; + +} + diff --git a/docs/event_definitions/Nonprofit/Transaction/index.ts b/docs/event_definitions/Nonprofit/Transaction/index.ts new file mode 100644 index 00000000..824e449d --- /dev/null +++ b/docs/event_definitions/Nonprofit/Transaction/index.ts @@ -0,0 +1,20 @@ +// License: LGPL-3.0-or-later +import type { Amount, HoudiniObject, IdType, HouID } from "../../common"; +import type Nonprofit from '../'; +import type Supporter from "../Supporter"; +import type { Payment } from "./Payment"; + +export default interface Transaction extends HoudiniObject { + amount: Amount; + nonprofit: IdType | Nonprofit; + object: 'transaction'; + payments: IdType[] | Payment[]; + status: "not-submitted"|"created" | "waiting-on-supporter" | "failed" | "completed"; + supporter: IdType | Supporter; + /** + * We don't specify more for now + */ + transaction_assignments: { id: HouID,object: string }[]; +} + +export * from './Payment';