@reapit/gbl-pp-owner-api-ts-definitions 1.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md ADDED
@@ -0,0 +1,81 @@
1
+ # gbl-pp-owner-api-ts-definitions
2
+
3
+ TypeScript type definitions for the PayProp Owner API.
4
+
5
+ ## Installation
6
+
7
+ ```sh
8
+ yarn add @reapit/gbl-pp-owner-api-ts-definitions
9
+ ```
10
+
11
+ ## Usage
12
+
13
+ ```ts
14
+ import type {
15
+ AgencyModel,
16
+ AgenciesPagedResult,
17
+ } from "@reapit/gbl-pp-owner-api-ts-definitions";
18
+ ```
19
+
20
+ All types are exported from the package root. Hover over any property in your editor to see its JSDoc description sourced directly from the API schema.
21
+
22
+ ## API Reference
23
+
24
+ - **Owner API docs:** [https://ukapi.staging.payprop.com/api/docs/owner](https://ukapi.staging.payprop.com/api/docs/owner)
25
+ - **Owner API user docs:** [http://one-portal-schema-ppza-128675916895.s3-website.eu-west-1.amazonaws.com/](http://one-portal-schema-ppza-128675916895.s3-website.eu-west-1.amazonaws.com/)
26
+
27
+ ## Available Types
28
+
29
+ | Type | Description |
30
+ | ----------------------------- | ----------------------------------------------------- |
31
+ | `AgencyModel` | Full agency entity |
32
+ | `AgenciesPagedResult` | Paginated response from `GET /agencies` |
33
+ | `AgenciesInvoicesModel` | Agency invoice item |
34
+ | `AgenciesInvoicesPagedResult` | Paginated response from `GET /agencies/invoices` |
35
+ | `AttachmentModel` | File attachment |
36
+ | `AttachmentsPagedResult` | Paginated response from `GET /attachments/{source}` |
37
+ | `BeneficiaryModel` | Full beneficiary entity |
38
+ | `BeneficiariesPagedResult` | Paginated response from `GET /beneficiaries` |
39
+ | `PropertyModel` | Full property entity |
40
+ | `PropertiesPagedResult` | Paginated response from `GET /properties` |
41
+ | `PaymentsIncomingModel` | Incoming payment item |
42
+ | `PaymentsIncomingPagedResult` | Paginated response from `GET /payments/incoming` |
43
+ | `PaymentsOutgoingModel` | Outgoing payment item |
44
+ | `PaymentsOutgoingPagedResult` | Paginated response from `GET /payments/outgoing` |
45
+ | `PaymentsCombinedModel` | Combined incoming/outgoing payment item |
46
+ | `PaymentsCombinedPagedResult` | Paginated response from `GET /payments/combined` |
47
+ | `PaymentsSummaryModel` | Payment summary response from `GET /payments/summary` |
48
+ | `PaymentBatchModel` | Outgoing batch payment information |
49
+ | `PaymentsOutgoingOriginModel` | Individual payment origin entry |
50
+ | `OwnershipModel` | Ownership record |
51
+ | `OwnershipsPagedResult` | Paginated response from `GET /ownerships` |
52
+ | `TenantModel` | Full tenant entity |
53
+ | `TenantsPagedResult` | Paginated response from `GET /tenants` |
54
+ | `TenantsBalancesModel` | Tenant balance item |
55
+ | `TenantsBalancesPagedResult` | Paginated response from `GET /tenants/balances` |
56
+ | `TenantsTenanciesModel` | Tenancy record |
57
+ | `TenantsTenanciesPagedResult` | Paginated response from `GET /tenants/tenancies` |
58
+ | `PaginationModel` | Pagination metadata |
59
+ | `AddressModel` | Address entity |
60
+ | `ErrorResponseModel` | Standard API error response |
61
+ | `ErrorItemModel` | Individual error item |
62
+
63
+ ### User API
64
+
65
+ | Type | Description |
66
+ | --------------------------------- | -------------------------------------------------------------------------- |
67
+ | `UserModel` | Full user response (Cognito user + metadata) |
68
+ | `UserCognitoModel` | Cognito user object from `AdminCreateUserCommand` |
69
+ | `UserCognitoAttributeModel` | Individual Cognito user attribute (name/value pair) |
70
+ | `UserRoleModel` | User role enum (`owner` \| `tenant`) |
71
+ | `PublicMetadataModel` | Metadata payload for `GET`/`PUT /public/metadata` (owner, tenant, or both) |
72
+ | `OwnerMetadataModel` | Owner-specific metadata |
73
+ | `TenantMetadataModel` | Tenant-specific metadata |
74
+ | `UserAddressModel` | Address associated with a user |
75
+ | `UserUpdateRequestModel` | Request body for `PUT /private/users` |
76
+ | `UserCreateRequestModel` | Request body for `POST /private/users` (owner or tenant union) |
77
+ | `UserCreateOwnerRequestModel` | Request body for `POST /private/users` when creating an owner |
78
+ | `UserCreateTenantRequestModel` | Request body for `POST /private/users` when creating a tenant |
79
+ | `SendOwnerInvitationRequestModel` | Request body for `POST /private/send-owner-invitation` |
80
+ | `SendOwnerInvitationItemModel` | Single invitation entry (requires `id` or `email`) |
81
+ | `SendOwnerInvitationModel` | Response from `POST /private/send-owner-invitation` |
@@ -0,0 +1,10 @@
1
+ export * from "./types/shared";
2
+ export * from "./types/agency";
3
+ export * from "./types/attachment";
4
+ export * from "./types/beneficiaries";
5
+ export * from "./types/properties";
6
+ export * from "./types/payment";
7
+ export * from "./types/ownership";
8
+ export * from "./types/tenant";
9
+ export * from "./types/user";
10
+ export * from "./types/error";
package/dist/index.js ADDED
@@ -0,0 +1,26 @@
1
+ "use strict";
2
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
+ if (k2 === undefined) k2 = k;
4
+ var desc = Object.getOwnPropertyDescriptor(m, k);
5
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
+ desc = { enumerable: true, get: function() { return m[k]; } };
7
+ }
8
+ Object.defineProperty(o, k2, desc);
9
+ }) : (function(o, m, k, k2) {
10
+ if (k2 === undefined) k2 = k;
11
+ o[k2] = m[k];
12
+ }));
13
+ var __exportStar = (this && this.__exportStar) || function(m, exports) {
14
+ for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
15
+ };
16
+ Object.defineProperty(exports, "__esModule", { value: true });
17
+ __exportStar(require("./types/shared"), exports);
18
+ __exportStar(require("./types/agency"), exports);
19
+ __exportStar(require("./types/attachment"), exports);
20
+ __exportStar(require("./types/beneficiaries"), exports);
21
+ __exportStar(require("./types/properties"), exports);
22
+ __exportStar(require("./types/payment"), exports);
23
+ __exportStar(require("./types/ownership"), exports);
24
+ __exportStar(require("./types/tenant"), exports);
25
+ __exportStar(require("./types/user"), exports);
26
+ __exportStar(require("./types/error"), exports);
@@ -0,0 +1,91 @@
1
+ import type { AddressModel, AgencyBasicModel, AmountBase, DateStringNullable, ExternalID, PaginationModel, PropertyBasicModel } from "./shared";
2
+ /**
3
+ * Full agency entity. Contains all agency details including contact information.
4
+ */
5
+ export interface AgencyModel {
6
+ /** Agency contact details. */
7
+ contact_details: {
8
+ /** Address associated with the agency. */
9
+ address: AddressModel;
10
+ /** Email address. */
11
+ email: string;
12
+ /** Fax number. */
13
+ fax: string;
14
+ /** Phone number. */
15
+ phone: string;
16
+ };
17
+ /** PayProp external ID. */
18
+ id: ExternalID;
19
+ /** Indicates if the agency is active on PayProp. */
20
+ is_active: boolean;
21
+ /** URL of the agency logo image. */
22
+ logo: string;
23
+ /** Agency name. */
24
+ name: string;
25
+ /** Number of unique properties related to beneficiaries under the current agency. */
26
+ number_of_properties: number;
27
+ /** Agency registration number. */
28
+ registration_number: string;
29
+ /**
30
+ * Agency termination date.
31
+ * Relevant only when `is_active` field value is `false`.
32
+ */
33
+ termination_date: DateStringNullable;
34
+ /** Agency VAT number. */
35
+ vat_number: string;
36
+ /** Agency website address. */
37
+ website: string;
38
+ }
39
+ /**
40
+ * Paginated response from `GET /agencies`.
41
+ */
42
+ export interface AgenciesPagedResult {
43
+ /** List of agency entities. */
44
+ items: AgencyModel[];
45
+ /** Pagination metadata. */
46
+ pagination: PaginationModel;
47
+ }
48
+ /**
49
+ * Agency invoice item. Represents an outgoing payment made by the agency
50
+ * and the associated property and payment record.
51
+ */
52
+ export interface AgenciesInvoicesModel {
53
+ /** Minimal information about the agency this invoice belongs to. */
54
+ agency: AgencyBasicModel;
55
+ /** PayProp external ID of the invoice. */
56
+ id: ExternalID;
57
+ /** Invoice number on the statement. */
58
+ invoice_number: number;
59
+ /**
60
+ * Outgoing payment instruction associated with this invoice.
61
+ * In cases where the outgoing payment originated from the system this field will be `null`.
62
+ */
63
+ payment_instruction: {
64
+ /** Description of the payment instruction. */
65
+ description: string;
66
+ /** PayProp external ID of the payment instruction. */
67
+ id: ExternalID;
68
+ } | null;
69
+ /** Outgoing payment record associated with the agency invoice number. */
70
+ payment_record: {
71
+ /** Payment record amount. */
72
+ amount: AmountBase;
73
+ /** PayProp external ID of the payment record. */
74
+ id: ExternalID;
75
+ /** Date the payment was released, or null if not yet released. */
76
+ release_date: DateStringNullable;
77
+ /** Tax amount on the payment record. */
78
+ tax_amount: AmountBase;
79
+ };
80
+ /** Minimal information about the property associated with this invoice. */
81
+ property: PropertyBasicModel;
82
+ }
83
+ /**
84
+ * Paginated response from `GET /agencies/invoices`.
85
+ */
86
+ export interface AgenciesInvoicesPagedResult {
87
+ /** List of agency invoice items. */
88
+ items: AgenciesInvoicesModel[];
89
+ /** Pagination metadata. */
90
+ pagination: PaginationModel;
91
+ }
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -0,0 +1,29 @@
1
+ import type { ExternalID, PaginationModel } from "./shared";
2
+ /**
3
+ * A file attachment linked to a payment or other resource.
4
+ */
5
+ export interface AttachmentModel {
6
+ /** PayProp external ID of the attachment. */
7
+ id: ExternalID;
8
+ /** File name. */
9
+ name: string;
10
+ /** File size in bytes. */
11
+ size: number;
12
+ /**
13
+ * Timestamp when the file was uploaded.
14
+ * Format: `YYYY-MM-DD HH:mm:ss`
15
+ * @example '2022-07-25 11:44:36'
16
+ */
17
+ timestamp: string;
18
+ /** File type / extension. */
19
+ type: string;
20
+ }
21
+ /**
22
+ * Paginated response from `GET /attachments/{source}`.
23
+ */
24
+ export interface AttachmentsPagedResult {
25
+ /** List of attachment items. */
26
+ items: AttachmentModel[];
27
+ /** Pagination metadata. */
28
+ pagination: PaginationModel;
29
+ }
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -0,0 +1,32 @@
1
+ import type { AddressModel, AgencyBasicModel, ExternalID, PaginationModel } from "./shared";
2
+ /**
3
+ * Full beneficiary entity. Contains all beneficiary details including
4
+ * address and ownership information.
5
+ */
6
+ export interface BeneficiaryModel {
7
+ /** Address associated with the beneficiary. */
8
+ address: AddressModel;
9
+ /** Minimal information about the agency associated with this beneficiary. */
10
+ agency: AgencyBasicModel;
11
+ /** Business name. */
12
+ business_name: string;
13
+ /** Formatted beneficiary display name used on the platform. */
14
+ display_name: string;
15
+ /** Beneficiary first name. */
16
+ first_name: string;
17
+ /** PayProp external ID. */
18
+ id: ExternalID;
19
+ /** Beneficiary last name. */
20
+ last_name: string;
21
+ /** Number of unique properties the beneficiary has an ownership. */
22
+ number_of_properties: number;
23
+ }
24
+ /**
25
+ * Paginated response from `GET /beneficiaries`.
26
+ */
27
+ export interface BeneficiariesPagedResult {
28
+ /** List of beneficiary entities. */
29
+ items: BeneficiaryModel[];
30
+ /** Pagination metadata. */
31
+ pagination: PaginationModel;
32
+ }
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -0,0 +1,18 @@
1
+ /**
2
+ * An individual error item returned in API error responses.
3
+ */
4
+ export interface ErrorItemModel {
5
+ /** Descriptive error message. */
6
+ message: string;
7
+ /** Optional field path that caused the error. */
8
+ path: string | null;
9
+ }
10
+ /**
11
+ * Standard error response returned by the API on non-2xx responses.
12
+ */
13
+ export interface ErrorResponseModel {
14
+ /** List of error details. */
15
+ errors: ErrorItemModel[];
16
+ /** HTTP response status code. */
17
+ status: number;
18
+ }
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -0,0 +1,34 @@
1
+ import type { AgencyBasicModel, AmountBase, BeneficiaryBasicModel, DateString, DateStringNullable, ExternalID, PaginationModel, PropertyBasicModel } from "./shared";
2
+ /**
3
+ * Ownership record linking a beneficiary to a property for a specific date range.
4
+ *
5
+ * Note: multiple ownership records may exist for the same property and beneficiary
6
+ * combination due to different start and end date periods.
7
+ */
8
+ export interface OwnershipModel {
9
+ /** Minimal information about the agency managing the property. */
10
+ agency: AgencyBasicModel;
11
+ /** Minimal information about the beneficiary who holds this ownership. */
12
+ beneficiary: BeneficiaryBasicModel;
13
+ /** Ownership end date. `null` if the ownership is open-ended (no end date). */
14
+ end_date: DateStringNullable;
15
+ /** PayProp external ID of this ownership record. */
16
+ id: ExternalID;
17
+ /** Whether the ownership is currently active based on its start and end dates. */
18
+ is_active: boolean;
19
+ /** The beneficiary's ownership percentage of the property. */
20
+ percentage: AmountBase;
21
+ /** Minimal information about the property this ownership is associated with. */
22
+ property: PropertyBasicModel;
23
+ /** Ownership start date. */
24
+ start_date: DateString;
25
+ }
26
+ /**
27
+ * Paginated response from `GET /ownerships`.
28
+ */
29
+ export interface OwnershipsPagedResult {
30
+ /** List of ownership records. */
31
+ items: OwnershipModel[];
32
+ /** Pagination metadata. */
33
+ pagination: PaginationModel;
34
+ }
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -0,0 +1,383 @@
1
+ import type { AgencyBasicModel, AmountBase, DateString, ExternalID, PaginationModel, PropertyBasicModel, TenantBasicModel } from "./shared";
2
+ /**
3
+ * Outgoing batch payment information.
4
+ * Every outgoing payment belongs to a batch. If the batch amount equals the payment
5
+ * amount, there is only a single payment in the batch for that property.
6
+ */
7
+ export interface PaymentBatchModel {
8
+ /**
9
+ * Outgoing payment batch amount.
10
+ *
11
+ * This batch amount can represent a larger total paid to the target beneficiary if there
12
+ * are multiple payments for the same date and property. If the batch amount equals the
13
+ * payment amount, there is only a single payment in the batch for this property.
14
+ */
15
+ amount: AmountBase;
16
+ }
17
+ /**
18
+ * An individual origin entry that contributed funds to a grouped outgoing payment.
19
+ */
20
+ export interface PaymentsOutgoingOriginModel {
21
+ /**
22
+ * The channel through which the incoming funds were received.
23
+ *
24
+ * - `apa` - APA
25
+ * - `ozow` - Ozow
26
+ * - `pay_at` - Pay@
27
+ * - `lockbox` - Lockbox
28
+ * - `truelayer` - TrueLayer
29
+ * - `gocardless` - GoCardless
30
+ * - `tenant_portal` - Tenant Portal
31
+ * - `direct_deposit` - Direct deposit
32
+ * - `bank_debit_order` - Bank debit order
33
+ * - `transfer_from_damage_deposit` - Transfer from damage deposit
34
+ * - `transfer_from_property_account` - Transfer from property account
35
+ * - `unknown` - Unmapped account type
36
+ */
37
+ account_type: "apa" | "ozow" | "pay_at" | "lockbox" | "truelayer" | "gocardless" | "tenant_portal" | "direct_deposit" | "bank_debit_order" | "transfer_from_damage_deposit" | "transfer_from_property_account" | "unknown";
38
+ /** Amount contributed by this payment origin. */
39
+ amount: AmountBase;
40
+ /** PayProp external ID of the payment origin. */
41
+ id: ExternalID;
42
+ /**
43
+ * Minimal info about the tenant associated with this origin.
44
+ *
45
+ * Will be `null` when the incoming funds originated from system sources
46
+ * (e.g. property account) rather than a specific tenant.
47
+ */
48
+ tenant: TenantBasicModel | null;
49
+ /**
50
+ * Transaction type based on the incoming payment origin.
51
+ *
52
+ * - `payment` - Standard incoming payment
53
+ * - `debit_note` - Debit note
54
+ * - `posted_payment` - Posted payment
55
+ * - `payment_prop_acc` - Payment from property account
56
+ * - `deposit_repayment` - Release from deposit account
57
+ * - `unknown` - Unmapped transaction type
58
+ */
59
+ transaction_type: "payment" | "debit_note" | "posted_payment" | "payment_prop_acc" | "deposit_repayment" | "unknown";
60
+ }
61
+ /**
62
+ * Individual incoming payment from the "Money in" section.
63
+ */
64
+ export interface PaymentsIncomingModel {
65
+ /** Minimal information about the agency associated with this payment. */
66
+ agency: AgencyBasicModel;
67
+ /** Incoming payment amount. */
68
+ amount: AmountBase;
69
+ /**
70
+ * Incoming payment category.
71
+ * Only relevant where `transaction_type` is `"invoice"`.
72
+ */
73
+ category: {
74
+ /** PayProp external ID of the category. */
75
+ id?: ExternalID;
76
+ /** Category name. */
77
+ name?: string;
78
+ } | null;
79
+ /**
80
+ * Incoming payment description.
81
+ * Only relevant where `transaction_type` is `"invoice"`.
82
+ */
83
+ description: string | null;
84
+ /**
85
+ * Indicates if the invoice has tax enabled.
86
+ * Only relevant where `transaction_type` is `"invoice"`.
87
+ */
88
+ has_tax: boolean;
89
+ /** PayProp external ID of this incoming payment. */
90
+ id: ExternalID;
91
+ /** Minimal information about the property this payment is associated with. */
92
+ property: PropertyBasicModel;
93
+ /** Date the incoming payment was reconciled against the property. */
94
+ reconciliation_date: DateString;
95
+ /**
96
+ * Incoming payment tax amount.
97
+ * Only relevant where `transaction_type` is `"invoice"`.
98
+ */
99
+ tax_amount: AmountBase;
100
+ /**
101
+ * Minimal info about the tenant associated with this payment.
102
+ *
103
+ * Will be `null` when the incoming transaction did not originate from a tenant directly,
104
+ * such as a payment from property account (`payment_prop_acc`).
105
+ */
106
+ tenant: TenantBasicModel | null;
107
+ /**
108
+ * Incoming payment transaction type.
109
+ *
110
+ * - `invoice` – Platform invoice raised against a tenant and property. These entries **do not** represent an incoming transaction.
111
+ * - `payment` – Standard incoming transaction.
112
+ * - `payment_prop_acc` – Transaction released from property account.
113
+ * - `deposit_repayment` – Transaction released from deposit account.
114
+ * - `unknown` – Unmapped payment type.
115
+ */
116
+ transaction_type: "invoice" | "payment" | "payment_prop_acc" | "deposit_repayment" | "unknown";
117
+ }
118
+ /**
119
+ * Paginated response from `GET /payments/incoming`.
120
+ */
121
+ export interface PaymentsIncomingPagedResult {
122
+ /** List of incoming payment items. */
123
+ items: PaymentsIncomingModel[];
124
+ /** Pagination metadata. */
125
+ pagination: PaginationModel;
126
+ }
127
+ /**
128
+ * Outgoing payment item from the "Money out" section.
129
+ *
130
+ * Outgoing payments are grouped by transaction date, category, payment target and property.
131
+ * Payments originating from damage deposit releases or property accounts are always individual items.
132
+ */
133
+ export interface PaymentsOutgoingModel {
134
+ /** Minimal information about the agency associated with this payment. */
135
+ agency: AgencyBasicModel;
136
+ /** Total outgoing payment amount for this grouped entry. */
137
+ amount: AmountBase;
138
+ /** Information about file attachments and the relevant payment rule IDs. */
139
+ attachments: {
140
+ /** Indicates if the outgoing payment has any attachments assigned to original payment split rules. */
141
+ has_attachments: boolean;
142
+ /** List of payment rule IDs that compose the outgoing payment and have one or more attachments. */
143
+ payment_ids: ExternalID[];
144
+ };
145
+ /** Outgoing payment category. */
146
+ category: {
147
+ /** PayProp external ID of the category. */
148
+ id: ExternalID;
149
+ /** Outgoing payment category name. */
150
+ name: string;
151
+ };
152
+ /** Outgoing payment instruction description. */
153
+ description: string;
154
+ /**
155
+ * Indicates if at least one of the grouped outgoing payments has tax enabled.
156
+ *
157
+ * Note: a payment can have a tax amount of `0.00` and still have this flag set to `true`.
158
+ */
159
+ has_tax: boolean;
160
+ /**
161
+ * List of grouped outgoing payment record IDs that compose this entry.
162
+ *
163
+ * **This list may be incomplete** if a certain threshold of payment items is reached.
164
+ * Compare the length of this array against `number_of_payments` to verify completeness.
165
+ */
166
+ ids: ExternalID[];
167
+ /** Number of individual payment origins this grouped outgoing payment consists of. */
168
+ number_of_payment_origins: number;
169
+ /** Number of individual payment records this grouped outgoing payment consists of. */
170
+ number_of_payments: number;
171
+ /** Outgoing batch payment information. */
172
+ payment_batch: PaymentBatchModel;
173
+ /**
174
+ * List of payment origins that contributed funds to this grouped outgoing payment.
175
+ *
176
+ * **This list may be incomplete** if a certain threshold is reached.
177
+ * Compare the length of this array against `number_of_payment_origins` to verify completeness.
178
+ */
179
+ payment_origins: PaymentsOutgoingOriginModel[];
180
+ /** Outgoing payment beneficiary (recipient). */
181
+ payment_target: {
182
+ /** PayProp external ID of the beneficiary. */
183
+ id: ExternalID;
184
+ /** Outgoing payment beneficiary name. */
185
+ name: string;
186
+ /** Outgoing payment beneficiary type. */
187
+ type: "agency" | "beneficiary" | "global_beneficiary";
188
+ };
189
+ /** Minimal information about the property this payment is associated with. */
190
+ property: PropertyBasicModel;
191
+ /** Outgoing payment tax amount. */
192
+ tax_amount: AmountBase;
193
+ /** Date the outgoing payment transaction was processed. */
194
+ transaction_date: DateString;
195
+ }
196
+ /**
197
+ * Paginated response from `GET /payments/outgoing`.
198
+ */
199
+ export interface PaymentsOutgoingPagedResult {
200
+ /** List of outgoing payment items. */
201
+ items: PaymentsOutgoingModel[];
202
+ /** Pagination metadata. */
203
+ pagination: PaginationModel;
204
+ }
205
+ /**
206
+ * A single entry in the combined payments view, which may represent an incoming
207
+ * payment, an outgoing payment, or an invoice.
208
+ */
209
+ export interface PaymentsCombinedModel {
210
+ /** Incoming or outgoing payment amount. */
211
+ amount: AmountBase;
212
+ /**
213
+ * Information about file attachments and the relevant payment instruction IDs.
214
+ *
215
+ * Only relevant when `payment_type` is `"out"`. Will always be `null` for other types.
216
+ */
217
+ attachments: {
218
+ /** Indicates if the outgoing payment has any attachments assigned to original payment split rules. */
219
+ has_attachments: boolean;
220
+ /** List of payment rule IDs that have one or more attachments. */
221
+ payment_ids: ExternalID[];
222
+ } | null;
223
+ /**
224
+ * Category of the payment entry.
225
+ *
226
+ * - For **incoming** payments: ID is always `null`, name is always `"Transfer"`.
227
+ * - For **outgoing** payments: represents the payment instruction category.
228
+ * - For **invoices**: represents the invoice category.
229
+ */
230
+ category: {
231
+ /**
232
+ * PayProp external ID of the category.
233
+ * For incoming payments this will always be `null`.
234
+ */
235
+ id: ExternalID;
236
+ /**
237
+ * Category name.
238
+ * For incoming payments this will always be `"Transfer"`.
239
+ */
240
+ name: string;
241
+ };
242
+ /**
243
+ * Date relevant to the payment type.
244
+ *
245
+ * - **Incoming** payments: reconciliation date.
246
+ * - **Outgoing** payments: transaction date.
247
+ * - **Invoices**: invoice creation date.
248
+ */
249
+ date: DateString;
250
+ /**
251
+ * Payment description.
252
+ *
253
+ * - **Outgoing** payments: the payment instruction description.
254
+ * - **Invoices**: the invoice description.
255
+ * - **Incoming** payments: usually `null`. Non-null only when an incoming payment was partially
256
+ * split and a description was provided for the split.
257
+ */
258
+ description: string | null;
259
+ /**
260
+ * Indicates if the invoice or outgoing payment has tax enabled.
261
+ * Only relevant when `payment_type` is `"out"` or `"invoice"`.
262
+ */
263
+ has_tax: boolean;
264
+ /**
265
+ * IDs associated with this payment entry.
266
+ *
267
+ * - For **invoices** and **incoming** payments: always a single-item list with the reconciled payment ID.
268
+ * - For **outgoing** payments: the list of grouped outgoing payment record IDs.
269
+ */
270
+ ids: ExternalID[];
271
+ /**
272
+ * Outgoing batch payment information.
273
+ * Only relevant when `payment_type` is `"out"`. Will always be `null` for other types.
274
+ */
275
+ payment_batch: PaymentBatchModel | null;
276
+ /**
277
+ * List of payment origins for this grouped outgoing payment.
278
+ * Only relevant when `payment_type` is `"out"`. Will always be `null` for other types.
279
+ */
280
+ payment_origins: PaymentsOutgoingOriginModel[] | null;
281
+ /**
282
+ * The beneficiary who received this outgoing payment.
283
+ * For invoices and incoming payments this field will always be `null`.
284
+ */
285
+ payment_target: {
286
+ /** PayProp external ID of the beneficiary. */
287
+ id: ExternalID;
288
+ /** Outgoing payment beneficiary name. */
289
+ name: string;
290
+ /** Outgoing payment beneficiary type. */
291
+ type: "agency" | "beneficiary" | "global_beneficiary";
292
+ } | null;
293
+ /**
294
+ * Represents the money flow direction of this payment entry.
295
+ *
296
+ * - `in` – Incoming monies paid by a tenant or released from other sources (e.g. property account).
297
+ * - `out` – Outgoing monies paid to a target beneficiary.
298
+ * - `invoice` – Outgoing ad-hoc invoice instruction.
299
+ */
300
+ payment_type: "in" | "out" | "invoice";
301
+ /** Minimal information about the property this payment is associated with. */
302
+ property: PropertyBasicModel;
303
+ /**
304
+ * Tax amount for the invoice or outgoing payment.
305
+ * Only relevant when `payment_type` is `"out"` or `"invoice"`.
306
+ */
307
+ tax_amount: AmountBase;
308
+ /**
309
+ * The tenant associated with this payment.
310
+ *
311
+ * - **Incoming** payments: the tenant whose deposit ID was used to reconcile payments.
312
+ * - **Outgoing** payments: always `null` (funds can come from multiple sources).
313
+ * - **Invoices**: the tenant for whom the invoice was raised.
314
+ */
315
+ tenant: TenantBasicModel | null;
316
+ /**
317
+ * Incoming payment transaction type.
318
+ *
319
+ * Only relevant when `payment_type` is `"in"` or `"invoice"`.
320
+ * Will always be `null` for outgoing payments.
321
+ *
322
+ * - `invoice` – Invoice entry
323
+ * - `payment` – Standard incoming payment
324
+ * - `payment_prop_acc` – Transfer from property account
325
+ * - `deposit_repayment` – Release from deposit account
326
+ * - `unknown` – Unmapped transaction type
327
+ */
328
+ transaction_type: "invoice" | "payment" | "payment_prop_acc" | "deposit_repayment" | "unknown" | null;
329
+ }
330
+ /**
331
+ * Paginated response from `GET /payments/combined`.
332
+ */
333
+ export interface PaymentsCombinedPagedResult {
334
+ /** List of combined payment items (incoming, outgoing, and invoices). */
335
+ items: PaymentsCombinedModel[];
336
+ /** Pagination metadata. */
337
+ pagination: PaginationModel;
338
+ }
339
+ /**
340
+ * Summary of money flow for a given date range.
341
+ * Returned from `GET /payments/summary`.
342
+ */
343
+ export interface PaymentsSummaryModel {
344
+ /**
345
+ * Total ad-hoc and recurring invoice amounts for the given date range.
346
+ * Includes both outstanding and paid invoice amounts.
347
+ */
348
+ invoiced: AmountBase | null;
349
+ /** Total money received from tenants. */
350
+ money_in: AmountBase | null;
351
+ /** Total money paid out to beneficiaries. */
352
+ money_out: AmountBase | null;
353
+ /** Total payments made to the current owner entity. */
354
+ paid_to_owner: AmountBase | null;
355
+ /** Information about property balances. */
356
+ properties: {
357
+ /** Property opening and closing balances for the given date range. */
358
+ balances: {
359
+ /**
360
+ * Closing balance: sum of all transactions up to and including `to_date`
361
+ * where outgoing payments have not yet been paid out.
362
+ */
363
+ closing: AmountBase;
364
+ /**
365
+ * Opening balance: sum of all transactions before `from_date`
366
+ * where outgoing payments have not yet been paid out.
367
+ */
368
+ opening: AmountBase;
369
+ };
370
+ };
371
+ /** Information about property account funds. */
372
+ property_accounts: {
373
+ /** Property account opening and closing balances for the given date range. */
374
+ balances: {
375
+ /** Sum of all incoming and outgoing property account payments up to `to_date` inclusive. */
376
+ closing: AmountBase;
377
+ /** Sum of all incoming and outgoing property account payments before the report `from_date`. */
378
+ opening: AmountBase;
379
+ };
380
+ };
381
+ /** Total outstanding arrears amount across all tenants. */
382
+ tenants_in_arrears: AmountBase | null;
383
+ }
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -0,0 +1,35 @@
1
+ import type { AddressModel, AgencyBasicModel, BeneficiaryBasicModel, ExternalID, PaginationModel } from "./shared";
2
+ /**
3
+ * Full property entity. Contains all property details including address,
4
+ * agency association, and optional beneficiary list.
5
+ */
6
+ export interface PropertyModel {
7
+ /** Address of the property. */
8
+ address?: AddressModel;
9
+ /** Minimal information about the agency managing this property. */
10
+ agency?: AgencyBasicModel;
11
+ /**
12
+ * List of beneficiaries that have an ownership of the property for the specified ownership range.
13
+ * Only present when the `with_beneficiaries` query parameter is set to `true`.
14
+ */
15
+ beneficiaries?: BeneficiaryBasicModel[] | null;
16
+ /** PayProp external ID. */
17
+ id: ExternalID;
18
+ /** URL of the property image, or null if no image has been set. */
19
+ image?: string | null;
20
+ /** Indicates if the property is active on PayProp. */
21
+ is_active: boolean;
22
+ /** Property name. */
23
+ name: string;
24
+ /** Number of unique tenants that have an active tenancy on the property. */
25
+ number_of_tenants?: number;
26
+ }
27
+ /**
28
+ * Paginated response from `GET /properties`.
29
+ */
30
+ export interface PropertiesPagedResult {
31
+ /** List of property entities. */
32
+ items: PropertyModel[];
33
+ /** Pagination metadata. */
34
+ pagination: PaginationModel;
35
+ }
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -0,0 +1,115 @@
1
+ /**
2
+ * PayProp external ID.
3
+ * Alphanumeric string between 10 and 32 characters.
4
+ * @example 'zJBv2E5aJQ'
5
+ */
6
+ export type ExternalID = string;
7
+ /**
8
+ * Monetary amount. Decimal number with up to 2 decimal places.
9
+ * @example 9650.12
10
+ */
11
+ export type AmountBase = number;
12
+ /**
13
+ * Nullable monetary amount. Decimal number with up to 2 decimal places, or null.
14
+ * @example 9650.12
15
+ */
16
+ export type AmountNullable = number | null;
17
+ /**
18
+ * ISO date string in the format YYYY-MM-DD.
19
+ * @example '2025-10-21'
20
+ */
21
+ export type DateString = string;
22
+ /**
23
+ * Nullable ISO date string in the format YYYY-MM-DD, or null.
24
+ * @example '2025-10-21'
25
+ */
26
+ export type DateStringNullable = string | null;
27
+ /**
28
+ * Pagination metadata returned on all paginated endpoints.
29
+ */
30
+ export interface PaginationModel {
31
+ /** Current page number. */
32
+ page: number;
33
+ /** Total number of items on the current page. */
34
+ rows: number;
35
+ /** Total number of pages. */
36
+ total_pages: number;
37
+ /** Total number of items found across all pages. */
38
+ total_rows: number;
39
+ }
40
+ /**
41
+ * Entity address information.
42
+ *
43
+ * In rare cases the address field can be `null` for historical entities
44
+ * where the information was not collected on the system.
45
+ */
46
+ export type AddressModel = {
47
+ /** City. */
48
+ city: string;
49
+ /** PayProp external ID. */
50
+ id: ExternalID;
51
+ /** Address line 1. */
52
+ line_1: string;
53
+ /** Address line 2. */
54
+ line_2: string;
55
+ /** Address line 3. */
56
+ line_3: string;
57
+ /** Postal code. */
58
+ postal_code: string;
59
+ /** State. */
60
+ state: string;
61
+ } | null;
62
+ /**
63
+ * Minimal info about the agency.
64
+ * For full agency data call `/agencies`.
65
+ */
66
+ export interface AgencyBasicModel {
67
+ /** PayProp external ID. */
68
+ id: ExternalID;
69
+ /** Indicates if the agency is active on PayProp. */
70
+ is_active: boolean;
71
+ /** Agency name. */
72
+ name: string;
73
+ }
74
+ /**
75
+ * Minimal info about the beneficiary.
76
+ * For full beneficiary data call `/beneficiaries`.
77
+ */
78
+ export interface BeneficiaryBasicModel {
79
+ /** Business name. */
80
+ business_name: string;
81
+ /** Formatted beneficiary display name used on platform. */
82
+ display_name: string;
83
+ /** Beneficiary first name. */
84
+ first_name: string;
85
+ /** PayProp external ID. */
86
+ id: ExternalID;
87
+ /** Beneficiary last name. */
88
+ last_name: string;
89
+ }
90
+ /**
91
+ * Minimal info about the property.
92
+ * For full property data call `/properties`.
93
+ */
94
+ export interface PropertyBasicModel {
95
+ /** PayProp external ID. */
96
+ id: ExternalID;
97
+ /** Property name. */
98
+ name: string;
99
+ }
100
+ /**
101
+ * Minimal info about the tenant.
102
+ * For full tenant data call `/tenants`.
103
+ */
104
+ export interface TenantBasicModel {
105
+ /** Business name. */
106
+ business_name: string;
107
+ /** Formatted tenant display name used on platform. */
108
+ display_name: string;
109
+ /** Tenant first name. */
110
+ first_name: string;
111
+ /** PayProp external ID. */
112
+ id: ExternalID;
113
+ /** Tenant last name. */
114
+ last_name: string;
115
+ }
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -0,0 +1,132 @@
1
+ import type { AgencyBasicModel, AmountBase, DateString, DateStringNullable, ExternalID, PaginationModel, PropertyBasicModel, TenantBasicModel } from "./shared";
2
+ /**
3
+ * Full tenant entity with all tenant details.
4
+ */
5
+ export interface TenantModel {
6
+ /** Minimal information about the agency associated with this tenant. */
7
+ agency: AgencyBasicModel;
8
+ /** Business name. */
9
+ business_name: string;
10
+ /** Formatted tenant display name used on the platform. */
11
+ display_name: string;
12
+ /** Tenant first name. */
13
+ first_name: string;
14
+ /**
15
+ * Indicates if the current tenant has one or more active tenancies
16
+ * across all properties, or filtered by `property_id` if provided.
17
+ */
18
+ has_active_tenancy: boolean;
19
+ /** PayProp external ID. */
20
+ id: ExternalID;
21
+ /** Indicates if the tenant is active on PayProp. */
22
+ is_active: boolean;
23
+ /** Tenant last name. */
24
+ last_name: string;
25
+ }
26
+ /**
27
+ * Paginated response from `GET /tenants`.
28
+ */
29
+ export interface TenantsPagedResult {
30
+ /** List of tenant entities. */
31
+ items: TenantModel[];
32
+ /** Pagination metadata. */
33
+ pagination: PaginationModel;
34
+ }
35
+ /**
36
+ * Tenant balance item showing opening and closing balances for a given date range.
37
+ */
38
+ export interface TenantsBalancesModel {
39
+ /** Minimal information about the agency associated with this tenant. */
40
+ agency: AgencyBasicModel;
41
+ /** Opening and closing balances for the requested date range. */
42
+ balance: {
43
+ /**
44
+ * Closing balance: sum of all transactions up to and including `closing_balance_date`.
45
+ *
46
+ * A negative value means the tenant is in arrears.
47
+ * A positive value means the tenant is in credit.
48
+ */
49
+ closing: AmountBase;
50
+ /**
51
+ * Opening balance: sum of all transactions before `opening_balance_date`.
52
+ *
53
+ * A negative value means the tenant is in arrears.
54
+ * A positive value means the tenant is in credit.
55
+ */
56
+ opening: AmountBase;
57
+ };
58
+ /** Minimal information about the property associated with this tenant balance. */
59
+ property: PropertyBasicModel;
60
+ /** Minimal information about the tenant. */
61
+ tenant: TenantBasicModel;
62
+ }
63
+ /**
64
+ * Paginated response from `GET /tenants/balances`.
65
+ */
66
+ export interface TenantsBalancesPagedResult {
67
+ /** List of tenant balance items. */
68
+ items: TenantsBalancesModel[];
69
+ /** Pagination metadata. */
70
+ pagination: PaginationModel;
71
+ }
72
+ /**
73
+ * A tenancy record representing a tenant's occupancy period on a property.
74
+ *
75
+ * Multiple tenancy records may exist for the same tenant and property combination,
76
+ * calculated based on rental invoices with varying periods.
77
+ * Records are ordered by `start_date` descending (most recent first).
78
+ */
79
+ export interface TenantsTenanciesModel {
80
+ /** Minimal information about the agency managing the property. */
81
+ agency: AgencyBasicModel;
82
+ /**
83
+ * Tenancy end date.
84
+ * `null` if the tenancy has no defined end date (open-ended).
85
+ */
86
+ end_date: DateStringNullable;
87
+ /** PayProp external ID of this tenancy record. */
88
+ id: ExternalID;
89
+ /** Indicates if the current tenancy period is active. */
90
+ is_active: boolean;
91
+ /** Minimal information about the property associated with this tenancy. */
92
+ property: PropertyBasicModel;
93
+ /**
94
+ * Estimated rent information for this tenancy period.
95
+ *
96
+ * **Important:** This field may be inaccurate or absent. It is derived from recurring rent invoices
97
+ * matched to the tenancy period, which is not always possible to do accurately.
98
+ * Use this field as a general indication only and not as a source of truth.
99
+ */
100
+ rent: {
101
+ /** Rent invoice amount. */
102
+ amount: AmountBase;
103
+ /**
104
+ * Frequency at which the rent invoice is generated.
105
+ *
106
+ * - `A` – Annual
107
+ * - `Q` – Quarterly
108
+ * - `M` – Monthly
109
+ * - `W` – Weekly
110
+ * - `2M` – Every two months
111
+ * - `2W` – Every two weeks
112
+ * - `4W` – Every four weeks
113
+ * - `6M` – Every six months
114
+ */
115
+ frequency: "A" | "Q" | "M" | "W" | "2M" | "2W" | "4W" | "6M";
116
+ /** PayProp external ID of the associated rent invoice rule. */
117
+ id: ExternalID;
118
+ } | null;
119
+ /** Tenancy start date. */
120
+ start_date: DateString;
121
+ /** Minimal information about the tenant occupying the property. */
122
+ tenant: TenantBasicModel;
123
+ }
124
+ /**
125
+ * Paginated response from `GET /tenants/tenancies`.
126
+ */
127
+ export interface TenantsTenanciesPagedResult {
128
+ /** List of tenancy records. */
129
+ items: TenantsTenanciesModel[];
130
+ /** Pagination metadata. */
131
+ pagination: PaginationModel;
132
+ }
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -0,0 +1,202 @@
1
+ /**
2
+ * Address associated with a user.
3
+ */
4
+ export interface UserAddressModel {
5
+ /** Address line 1. */
6
+ line_1: string;
7
+ /** Address line 2. */
8
+ line_2: string;
9
+ /** Address line 3. */
10
+ line_3: string;
11
+ /** City. */
12
+ city: string;
13
+ /** Postal code. */
14
+ postal_code: string;
15
+ }
16
+ /**
17
+ * Tenant-specific metadata as returned in API responses.
18
+ */
19
+ export interface TenantMetadataModel {
20
+ /** Tenant first name. */
21
+ first_name?: string;
22
+ /** Tenant last name. */
23
+ last_name?: string;
24
+ }
25
+ /**
26
+ * Partial tenant metadata for write operations (`PUT /private/users`, `PUT /public/metadata`).
27
+ * All fields are optional — only the fields provided will be updated.
28
+ */
29
+ export type TenantMetadataPayloadModel = Partial<TenantMetadataModel>;
30
+ /**
31
+ * Owner-specific metadata as returned in API responses.
32
+ */
33
+ export interface OwnerMetadataModel {
34
+ /** Owner first name. */
35
+ first_name: string;
36
+ /** Owner last name. */
37
+ last_name: string;
38
+ /** Business name. */
39
+ business_name: string;
40
+ /** Tax code. */
41
+ tax_code: string;
42
+ /** Indicates whether the owner has reviewed their information. */
43
+ is_info_reviewed: boolean;
44
+ /** Owner address. */
45
+ address: UserAddressModel;
46
+ /** Annual statement generation schedule. */
47
+ annual_statement: {
48
+ /**
49
+ * Day of the month for the annual statement.
50
+ * Must be between 1 and 31.
51
+ */
52
+ day: number;
53
+ /**
54
+ * Month of the year for the annual statement.
55
+ * Must be between 1 and 12.
56
+ */
57
+ month: number;
58
+ };
59
+ }
60
+ /**
61
+ * Partial owner metadata for write operations (`PUT /private/users`, `PUT /public/metadata`).
62
+ * All fields are optional — only the fields provided will be updated.
63
+ */
64
+ export type OwnerMetadataPayloadModel = Partial<OwnerMetadataModel>;
65
+ /**
66
+ * Metadata as returned by `GET /public/metadata` and in user responses.
67
+ * Either `owner`, `tenant`, or both may be present depending on the user's role(s).
68
+ */
69
+ export interface PublicMetadataModel {
70
+ /** Owner metadata. Only present when the user has the `owner` role. */
71
+ owner: OwnerMetadataModel;
72
+ /** Tenant metadata. Only present when the user has the `tenant` role. */
73
+ tenant: TenantMetadataModel;
74
+ }
75
+ /**
76
+ * Partial metadata payload for write operations (`PUT /public/metadata`, `PUT /private/users`).
77
+ * Pass `owner`, `tenant`, or both — only the provided fields will be updated.
78
+ */
79
+ export interface PublicMetadataPayloadModel {
80
+ /** Partial owner metadata to update. */
81
+ owner?: OwnerMetadataPayloadModel;
82
+ /** Partial tenant metadata to update. */
83
+ tenant?: TenantMetadataPayloadModel;
84
+ }
85
+ /**
86
+ * User role.
87
+ *
88
+ * - `owner` – Property owner
89
+ * - `tenant` – Tenant
90
+ */
91
+ export type UserRoleModel = "owner" | "tenant";
92
+ /**
93
+ * An individual Cognito user attribute name/value pair.
94
+ */
95
+ export interface UserCognitoAttributeModel {
96
+ /** Attribute name (e.g. `email`, `sub`). */
97
+ Name: string;
98
+ /** Attribute value. */
99
+ Value: string;
100
+ }
101
+ /**
102
+ * Cognito user object as returned by `AdminCreateUserCommand`.
103
+ * See [AWS Cognito UserType docs](https://docs.aws.amazon.com/cognito-user-identity-pools/latest/APIReference/API_UserType.html) for details.
104
+ */
105
+ export interface UserCognitoModel {
106
+ /** Cognito username (usually the `sub`). */
107
+ Username: string;
108
+ /** Whether the user account is enabled. */
109
+ Enabled: boolean;
110
+ /** ISO date-time string of when the user was created. */
111
+ UserCreateDate: string;
112
+ /** ISO date-time string of when the user was last modified. */
113
+ UserLastModifiedDate: string;
114
+ /**
115
+ * Cognito account status.
116
+ *
117
+ * - `UNCONFIRMED` – User has been created but not confirmed
118
+ * - `CONFIRMED` – User has been confirmed
119
+ * - `ARCHIVED` – User is no longer active
120
+ * - `COMPROMISED` – User is disabled due to a potential security threat
121
+ * - `UNKNOWN` – Status cannot be determined
122
+ * - `RESET_REQUIRED` – User must reset their password at next sign-in
123
+ * - `FORCE_CHANGE_PASSWORD` – User must change their password at next sign-in
124
+ */
125
+ UserStatus: "UNCONFIRMED" | "CONFIRMED" | "ARCHIVED" | "COMPROMISED" | "UNKNOWN" | "RESET_REQUIRED" | "FORCE_CHANGE_PASSWORD";
126
+ /** List of user attributes as name/value pairs. */
127
+ Attributes: UserCognitoAttributeModel[];
128
+ }
129
+ /**
130
+ * Response returned from `GET /private/users`, `PUT /private/users`,
131
+ * `POST /private/users`, and `PUT /public/metadata`.
132
+ *
133
+ * Contains the Cognito user object and optional metadata.
134
+ */
135
+ export interface UserModel {
136
+ /** Cognito user object. */
137
+ User: UserCognitoModel;
138
+ /** User metadata payload containing owner and/or tenant metadata. */
139
+ metadata?: PublicMetadataModel;
140
+ }
141
+ /**
142
+ * Request body for `PUT /private/users`.
143
+ * Updates user metadata using the specified merge strategy.
144
+ */
145
+ export interface UserUpdateRequestModel {
146
+ /** Metadata to apply to the user. Pass `owner`, `tenant`, or both. */
147
+ metadata?: PublicMetadataModel;
148
+ }
149
+ /**
150
+ * A single entry in the owner invitation request.
151
+ * Must include either `id` or `email`.
152
+ */
153
+ export interface SendOwnerInvitationItemModel {
154
+ /** User ID (alternative to `email`). */
155
+ id: string;
156
+ /** User email address (alternative to `id`). */
157
+ email?: string;
158
+ }
159
+ /**
160
+ * Request body for `POST /private/send-owner-invitation`.
161
+ * Array of 1–50 owner invitation entries, each requiring either an `id` or `email`.
162
+ */
163
+ export type SendOwnerInvitationRequestModel = SendOwnerInvitationItemModel[];
164
+ /**
165
+ * Response from `POST /private/send-owner-invitation`.
166
+ */
167
+ export interface SendOwnerInvitationModel {
168
+ /** Invitation enqueue result. */
169
+ invitations: {
170
+ /** Number of invitations received. */
171
+ received?: number;
172
+ /** Number of invitations successfully enqueued. */
173
+ enqueued?: number;
174
+ };
175
+ }
176
+ /**
177
+ * Request body for `POST /private/users` when creating an owner.
178
+ */
179
+ export interface UserCreateOwnerRequestModel {
180
+ /** User email address. */
181
+ email: string;
182
+ /** Must be `"owner"`. */
183
+ role: "owner";
184
+ /** Owner metadata to set on creation. All fields are optional. */
185
+ metadata?: OwnerMetadataPayloadModel;
186
+ }
187
+ /**
188
+ * Request body for `POST /private/users` when creating a tenant.
189
+ */
190
+ export interface UserCreateTenantRequestModel {
191
+ /** User email address. */
192
+ email: string;
193
+ /** Must be `"tenant"`. */
194
+ role: "tenant";
195
+ /** Tenant metadata to set on creation. All fields are optional. */
196
+ metadata?: TenantMetadataPayloadModel;
197
+ }
198
+ /**
199
+ * Request body for `POST /private/users`.
200
+ * Use `UserCreateOwnerRequestModel` or `UserCreateTenantRequestModel` depending on the role.
201
+ */
202
+ export type UserCreateRequestModel = UserCreateOwnerRequestModel | UserCreateTenantRequestModel;
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
package/package.json ADDED
@@ -0,0 +1,22 @@
1
+ {
2
+ "name": "@reapit/gbl-pp-owner-api-ts-definitions",
3
+ "version": "1.0.0",
4
+ "description": "TypeScript type definitions for the PayProp Owner API",
5
+ "main": "dist/index.js",
6
+ "types": "dist/index.d.ts",
7
+ "files": [
8
+ "dist/*"
9
+ ],
10
+ "scripts": {
11
+ "build": "tsc --project tsconfig.json",
12
+ "prepublishOnly": "yarn build"
13
+ },
14
+ "license": "MIT",
15
+ "devDependencies": {
16
+ "@types/jest": "^30.0.0",
17
+ "@types/node": "^25.5.2",
18
+ "@types/react": "^19.2.14",
19
+ "typescript": "^5.6.2"
20
+ },
21
+ "packageManager": "yarn@4.13.0+sha512.5c20ba010c99815433e5c8453112165e673f1c7948d8d2b267f4b5e52097538658388ebc9f9580656d9b75c5cc996f990f611f99304a2197d4c56d21eea370e7"
22
+ }