npm package: @reapit/gbl-pp-owner-api-ts-definitions
Description: TypeScript type definitions for the PayProp Owner API
Latest version: 1.0.4

# gbl-pp-owner-api-ts-definitions

TypeScript type definitions for the PayProp Owner API.

## Installation

```sh
yarn add @reapit/gbl-pp-owner-api-ts-definitions
```

## Usage

```ts
import type {
  AgencyModel,
  AgenciesPagedResult,
} from "@reapit/gbl-pp-owner-api-ts-definitions";
```

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.

## API Reference

- **Owner API docs:** [https://ukapi.staging.payprop.com/api/docs/owner](https://ukapi.staging.payprop.com/api/docs/owner)
- **One Portal API 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/)

## Available Types

### Owner API

| Type                                      | Description                                                 |
| ----------------------------------------- | ----------------------------------------------------------- |
| `AgencyModel`                             | Full agency entity                                          |
| `AgenciesPagedResult`                     | Paginated response from `GET /agencies`                     |
| `AgenciesQueryParams`                     | Query parameters for `GET /agencies`                        |
| `AgenciesInvoicesModel`                   | Agency invoice item                                         |
| `AgenciesInvoicesPagedResult`             | Paginated response from `GET /agencies/invoices`            |
| `AgenciesInvoicesQueryParams`             | Query parameters for `GET /agencies/invoices`               |
| `AgencyBasicModel`                        | Minimal agency summary used in related resources            |
| `AttachmentModel`                         | File attachment                                             |
| `AttachmentsPagedResult`                  | Paginated response from `GET /attachments/{source}`         |
| `AttachmentsQueryParams`                  | Query parameters for `GET /attachments/{source}`            |
| `BeneficiaryModel`                        | Full beneficiary entity                                     |
| `BeneficiariesPagedResult`                | Paginated response from `GET /beneficiaries`                |
| `BeneficiariesQueryParams`                | Query parameters for `GET /beneficiaries`                   |
| `BeneficiaryBasicModel`                   | Minimal beneficiary summary used in related resources       |
| `PropertyModel`                           | Full property entity                                        |
| `PropertiesPagedResult`                   | Paginated response from `GET /properties`                   |
| `PropertiesQueryParams`                   | Query parameters for `GET /properties`                      |
| `PropertyBasicModel`                      | Minimal property summary used in related resources          |
| `PaymentsIncomingModel`                   | Incoming payment item                                       |
| `PaymentsIncomingPagedResult`             | Paginated response from `GET /payments/incoming`            |
| `PaymentsIncomingQueryParams`             | Query parameters for `GET /payments/incoming`               |
| `PaymentsOutgoingModel`                   | Outgoing payment item                                       |
| `PaymentsOutgoingPagedResult`             | Paginated response from `GET /payments/outgoing`            |
| `PaymentsOutgoingQueryParams`             | Query parameters for `GET /payments/outgoing`               |
| `PaymentsCombinedModel`                   | Combined incoming/outgoing payment item                     |
| `PaymentsCombinedPagedResult`             | Paginated response from `GET /payments/combined`            |
| `PaymentsCombinedQueryParams`             | Query parameters for `GET /payments/combined`               |
| `PaymentsSummaryModel`                    | Payment summary response from `GET /payments/summary`       |
| `PaymentsSummaryQueryParams`              | Query parameters for `GET /payments/summary`                |
| `PaymentBatchModel`                       | Outgoing batch payment information                          |
| `PaymentsOutgoingOriginModel`             | Individual payment origin entry                             |
| `OwnershipModel`                          | Ownership record                                            |
| `OwnershipsPagedResult`                   | Paginated response from `GET /ownerships`                   |
| `OwnershipsQueryParams`                   | Query parameters for `GET /ownerships`                      |
| `TenantModel`                             | Full tenant entity                                          |
| `TenantsPagedResult`                      | Paginated response from `GET /tenants`                      |
| `TenantsQueryParams`                      | Query parameters for `GET /tenants`                         |
| `TenantsBalancesModel`                    | Tenant balance item                                         |
| `TenantsBalancesPagedResult`              | Paginated response from `GET /tenants/balances`             |
| `TenantsBalancesQueryParams`              | Query parameters for `GET /tenants/balances`                |
| `TenantsTenanciesModel`                   | Tenancy record                                              |
| `TenantsTenanciesPagedResult`             | Paginated response from `GET /tenants/tenancies`            |
| `TenantsTenanciesQueryParams`             | Query parameters for `GET /tenants/tenancies`               |
| `TenantBasicModel`                        | Minimal tenant summary used in related resources            |
| `PaginationModel`                         | Pagination metadata                                         |
| `AddressModel`                            | Address entity                                              |
| `ExternalID`                              | PayProp external ID (alphanumeric string)                   |
| `AmountBase`                              | Decimal monetary amount                                     |
| `AmountNullable`                          | Nullable decimal monetary amount                            |
| `DateString`                              | ISO date string (`YYYY-MM-DD`)                              |
| `DateStringNullable`                      | Nullable ISO date string (`YYYY-MM-DD`)                     |
| `ErrorResponseModel`                      | Standard API error response                                 |
| `ErrorItemModel`                          | Individual error item                                       |
| `DocumentsCsvPaymentsIncomingQueryParams` | Query parameters for `GET /documents/csv/payments/incoming` |
| `DocumentsCsvPaymentsOutgoingQueryParams` | Query parameters for `GET /documents/csv/payments/outgoing` |
| `DocumentsCsvPaymentsCombinedQueryParams` | Query parameters for `GET /documents/csv/payments/combined` |

### One Portal API

| Type                                     | Description                                                                  |
| ---------------------------------------- | ---------------------------------------------------------------------------- |
| `UserModel`                              | Full user response (Cognito user + metadata)                                 |
| `PrivateUsersQueryParams`                | Query parameters for `GET /private/users`                                    |
| `UserCognitoModel`                       | Cognito user object from `AdminCreateUserCommand`                            |
| `UserCognitoAttributeModel`              | Individual Cognito user attribute (name/value pair)                          |
| `UserRoleModel`                          | User role enum (`owner` \| `tenant`)                                         |
| `PublicMetadataModel`                    | Metadata returned by `GET /public/metadata` and in user responses            |
| `PublicMetadataQueryParams`              | Query parameters for `GET /public/metadata`                                  |
| `MetadataPayloadModel`                   | Partial metadata payload for `PUT /public/metadata` and `PUT /private/users` |
| `PublicMetadataUpdateQueryParams`        | Query parameters for `PUT /public/metadata`                                  |
| `OwnerMetadataModel`                     | Owner-specific metadata                                                      |
| `OwnerMetadataPayloadModel`              | Partial owner metadata for write operations (all fields optional)            |
| `TenantMetadataModel`                    | Tenant-specific metadata                                                     |
| `TenantMetadataPayloadModel`             | Partial tenant metadata for write operations (all fields optional)           |
| `UserAddressModel`                       | Address associated with a user                                               |
| `PrivateUserUpdateRequestModel`          | Request body for `PUT /private/users`                                        |
| `PrivateUsersUpdateQueryParams`          | Query parameters for `PUT /private/users`                                    |
| `PrivateUserCreateRequestModel`          | Request body for `POST /private/users` (owner or tenant union)               |
| `PrivateUserCreateOwnerRequestModel`     | Request body for `POST /private/users` when creating an owner                |
| `PrivateUserCreateTenantRequestModel`    | Request body for `POST /private/users` when creating a tenant                |
| `PrivateSendOwnerInvitationRequestModel` | Request body for `POST /private/send-owner-invitation`                       |
| `PrivateSendOwnerInvitationItemModel`    | Single invitation entry (requires `id` or `email`)                           |
| `PrivateSendOwnerInvitationModel`        | Response from `POST /private/send-owner-invitation`                          |