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

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.
Files changed (34) hide show
  1. package/README.md +86 -52
  2. package/dist/index.d.ts +3 -10
  3. package/dist/index.js +3 -10
  4. package/dist/one-portal-api/index.d.ts +2 -0
  5. package/dist/one-portal-api/index.js +18 -0
  6. package/dist/{types/user.d.ts → one-portal-api/private.d.ts} +44 -94
  7. package/dist/one-portal-api/public.d.ts +105 -0
  8. package/dist/{types → owner-api}/agency.d.ts +65 -1
  9. package/dist/{types → owner-api}/attachment.d.ts +22 -0
  10. package/dist/owner-api/beneficiaries.d.ts +85 -0
  11. package/dist/owner-api/csv.d.ts +96 -0
  12. package/dist/owner-api/index.d.ts +10 -0
  13. package/dist/owner-api/index.js +26 -0
  14. package/dist/{types/ownership.d.ts → owner-api/ownerships.d.ts} +45 -0
  15. package/dist/{types → owner-api}/payment.d.ts +224 -0
  16. package/dist/owner-api/properties.d.ts +100 -0
  17. package/dist/owner-api/shared.js +2 -0
  18. package/dist/{types → owner-api}/tenant.d.ts +136 -0
  19. package/dist/owner-api/tenant.js +2 -0
  20. package/package.json +3 -4
  21. package/dist/types/beneficiaries.d.ts +0 -32
  22. package/dist/types/properties.d.ts +0 -35
  23. /package/dist/{types/error.d.ts → error.d.ts} +0 -0
  24. /package/dist/{types/error.js → error.js} +0 -0
  25. /package/dist/{types/agency.js → one-portal-api/private.js} +0 -0
  26. /package/dist/{types/attachment.js → one-portal-api/public.js} +0 -0
  27. /package/dist/{types/beneficiaries.js → owner-api/agency.js} +0 -0
  28. /package/dist/{types/ownership.js → owner-api/attachment.js} +0 -0
  29. /package/dist/{types/payment.js → owner-api/beneficiaries.js} +0 -0
  30. /package/dist/{types/properties.js → owner-api/csv.js} +0 -0
  31. /package/dist/{types/shared.js → owner-api/ownerships.js} +0 -0
  32. /package/dist/{types/tenant.js → owner-api/payment.js} +0 -0
  33. /package/dist/{types/user.js → owner-api/properties.js} +0 -0
  34. /package/dist/{types → owner-api}/shared.d.ts +0 -0
package/README.md CHANGED
@@ -22,60 +22,94 @@ All types are exported from the package root. Hover over any property in your ed
22
22
  ## API Reference
23
23
 
24
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/)
25
+ - **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/)
26
26
 
27
27
  ## Available Types
28
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 |
29
+ ### Owner API
62
30
 
63
- ### User API
31
+ | Type | Description |
32
+ | ----------------------------------------- | ----------------------------------------------------------- |
33
+ | `AgencyModel` | Full agency entity |
34
+ | `AgenciesPagedResult` | Paginated response from `GET /agencies` |
35
+ | `AgenciesQueryParams` | Query parameters for `GET /agencies` |
36
+ | `AgenciesInvoicesModel` | Agency invoice item |
37
+ | `AgenciesInvoicesPagedResult` | Paginated response from `GET /agencies/invoices` |
38
+ | `AgenciesInvoicesQueryParams` | Query parameters for `GET /agencies/invoices` |
39
+ | `AgencyBasicModel` | Minimal agency summary used in related resources |
40
+ | `AttachmentModel` | File attachment |
41
+ | `AttachmentsPagedResult` | Paginated response from `GET /attachments/{source}` |
42
+ | `AttachmentsQueryParams` | Query parameters for `GET /attachments/{source}` |
43
+ | `BeneficiaryModel` | Full beneficiary entity |
44
+ | `BeneficiariesPagedResult` | Paginated response from `GET /beneficiaries` |
45
+ | `BeneficiariesQueryParams` | Query parameters for `GET /beneficiaries` |
46
+ | `BeneficiaryBasicModel` | Minimal beneficiary summary used in related resources |
47
+ | `PropertyModel` | Full property entity |
48
+ | `PropertiesPagedResult` | Paginated response from `GET /properties` |
49
+ | `PropertiesQueryParams` | Query parameters for `GET /properties` |
50
+ | `PropertyBasicModel` | Minimal property summary used in related resources |
51
+ | `PaymentsIncomingModel` | Incoming payment item |
52
+ | `PaymentsIncomingPagedResult` | Paginated response from `GET /payments/incoming` |
53
+ | `PaymentsIncomingQueryParams` | Query parameters for `GET /payments/incoming` |
54
+ | `PaymentsOutgoingModel` | Outgoing payment item |
55
+ | `PaymentsOutgoingPagedResult` | Paginated response from `GET /payments/outgoing` |
56
+ | `PaymentsOutgoingQueryParams` | Query parameters for `GET /payments/outgoing` |
57
+ | `PaymentsCombinedModel` | Combined incoming/outgoing payment item |
58
+ | `PaymentsCombinedPagedResult` | Paginated response from `GET /payments/combined` |
59
+ | `PaymentsCombinedQueryParams` | Query parameters for `GET /payments/combined` |
60
+ | `PaymentsSummaryModel` | Payment summary response from `GET /payments/summary` |
61
+ | `PaymentsSummaryQueryParams` | Query parameters for `GET /payments/summary` |
62
+ | `PaymentBatchModel` | Outgoing batch payment information |
63
+ | `PaymentsOutgoingOriginModel` | Individual payment origin entry |
64
+ | `OwnershipModel` | Ownership record |
65
+ | `OwnershipsPagedResult` | Paginated response from `GET /ownerships` |
66
+ | `OwnershipsQueryParams` | Query parameters for `GET /ownerships` |
67
+ | `TenantModel` | Full tenant entity |
68
+ | `TenantsPagedResult` | Paginated response from `GET /tenants` |
69
+ | `TenantsQueryParams` | Query parameters for `GET /tenants` |
70
+ | `TenantsBalancesModel` | Tenant balance item |
71
+ | `TenantsBalancesPagedResult` | Paginated response from `GET /tenants/balances` |
72
+ | `TenantsBalancesQueryParams` | Query parameters for `GET /tenants/balances` |
73
+ | `TenantsTenanciesModel` | Tenancy record |
74
+ | `TenantsTenanciesPagedResult` | Paginated response from `GET /tenants/tenancies` |
75
+ | `TenantsTenanciesQueryParams` | Query parameters for `GET /tenants/tenancies` |
76
+ | `TenantBasicModel` | Minimal tenant summary used in related resources |
77
+ | `PaginationModel` | Pagination metadata |
78
+ | `AddressModel` | Address entity |
79
+ | `ExternalID` | PayProp external ID (alphanumeric string) |
80
+ | `AmountBase` | Decimal monetary amount |
81
+ | `AmountNullable` | Nullable decimal monetary amount |
82
+ | `DateString` | ISO date string (`YYYY-MM-DD`) |
83
+ | `DateStringNullable` | Nullable ISO date string (`YYYY-MM-DD`) |
84
+ | `ErrorResponseModel` | Standard API error response |
85
+ | `ErrorItemModel` | Individual error item |
86
+ | `DocumentsCsvPaymentsIncomingQueryParams` | Query parameters for `GET /documents/csv/payments/incoming` |
87
+ | `DocumentsCsvPaymentsOutgoingQueryParams` | Query parameters for `GET /documents/csv/payments/outgoing` |
88
+ | `DocumentsCsvPaymentsCombinedQueryParams` | Query parameters for `GET /documents/csv/payments/combined` |
64
89
 
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` |
90
+ ### One Portal API
91
+
92
+ | Type | Description |
93
+ | ---------------------------------------- | ---------------------------------------------------------------------------- |
94
+ | `UserModel` | Full user response (Cognito user + metadata) |
95
+ | `PrivateUsersQueryParams` | Query parameters for `GET /private/users` |
96
+ | `UserCognitoModel` | Cognito user object from `AdminCreateUserCommand` |
97
+ | `UserCognitoAttributeModel` | Individual Cognito user attribute (name/value pair) |
98
+ | `UserRoleModel` | User role enum (`owner` \| `tenant`) |
99
+ | `PublicMetadataModel` | Metadata returned by `GET /public/metadata` and in user responses |
100
+ | `PublicMetadataQueryParams` | Query parameters for `GET /public/metadata` |
101
+ | `MetadataPayloadModel` | Partial metadata payload for `PUT /public/metadata` and `PUT /private/users` |
102
+ | `PublicMetadataUpdateQueryParams` | Query parameters for `PUT /public/metadata` |
103
+ | `OwnerMetadataModel` | Owner-specific metadata |
104
+ | `OwnerMetadataPayloadModel` | Partial owner metadata for write operations (all fields optional) |
105
+ | `TenantMetadataModel` | Tenant-specific metadata |
106
+ | `TenantMetadataPayloadModel` | Partial tenant metadata for write operations (all fields optional) |
107
+ | `UserAddressModel` | Address associated with a user |
108
+ | `PrivateUserUpdateRequestModel` | Request body for `PUT /private/users` |
109
+ | `PrivateUsersUpdateQueryParams` | Query parameters for `PUT /private/users` |
110
+ | `PrivateUserCreateRequestModel` | Request body for `POST /private/users` (owner or tenant union) |
111
+ | `PrivateUserCreateOwnerRequestModel` | Request body for `POST /private/users` when creating an owner |
112
+ | `PrivateUserCreateTenantRequestModel` | Request body for `POST /private/users` when creating a tenant |
113
+ | `PrivateSendOwnerInvitationRequestModel` | Request body for `POST /private/send-owner-invitation` |
114
+ | `PrivateSendOwnerInvitationItemModel` | Single invitation entry (requires `id` or `email`) |
115
+ | `PrivateSendOwnerInvitationModel` | Response from `POST /private/send-owner-invitation` |
package/dist/index.d.ts CHANGED
@@ -1,10 +1,3 @@
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";
1
+ export * from "./owner-api";
2
+ export * from "./one-portal-api";
3
+ export * from "./error";
package/dist/index.js CHANGED
@@ -14,13 +14,6 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
14
14
  for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
15
15
  };
16
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);
17
+ __exportStar(require("./owner-api"), exports);
18
+ __exportStar(require("./one-portal-api"), exports);
19
+ __exportStar(require("./error"), exports);
@@ -0,0 +1,2 @@
1
+ export * from "./private";
2
+ export * from "./public";
@@ -0,0 +1,18 @@
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("./private"), exports);
18
+ __exportStar(require("./public"), exports);
@@ -1,87 +1,4 @@
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
- }
1
+ import { OwnerMetadataPayloadModel, PublicMetadataModel, TenantMetadataPayloadModel } from "./public";
85
2
  /**
86
3
  * User role.
87
4
  *
@@ -89,6 +6,19 @@ export interface PublicMetadataPayloadModel {
89
6
  * - `tenant` – Tenant
90
7
  */
91
8
  export type UserRoleModel = "owner" | "tenant";
9
+ /**
10
+ * Query parameters for `GET /private/users`.
11
+ */
12
+ export interface PrivateUsersQueryParams {
13
+ /**
14
+ * User email address (alternative to `id`).
15
+ */
16
+ email?: string;
17
+ /**
18
+ * User ID (alternative to `email`).
19
+ */
20
+ id?: string;
21
+ }
92
22
  /**
93
23
  * An individual Cognito user attribute name/value pair.
94
24
  */
@@ -138,11 +68,31 @@ export interface UserModel {
138
68
  /** User metadata payload containing owner and/or tenant metadata. */
139
69
  metadata?: PublicMetadataModel;
140
70
  }
71
+ /**
72
+ * Query parameters for `PUT /private/users`.
73
+ */
74
+ export interface PrivateUsersUpdateQueryParams {
75
+ /**
76
+ * User email address (alternative to `id`).
77
+ */
78
+ email?: string;
79
+ /**
80
+ * User ID (alternative to `email`).
81
+ */
82
+ id?: string;
83
+ /**
84
+ * Specifies how to apply the metadata update.
85
+ * - `merge` – Combines the provided metadata with the existing metadata (default).
86
+ * - `overwrite` – Replaces the existing metadata with the provided metadata.
87
+ * @default 'merge'
88
+ */
89
+ strategy?: "merge" | "overwrite";
90
+ }
141
91
  /**
142
92
  * Request body for `PUT /private/users`.
143
93
  * Updates user metadata using the specified merge strategy.
144
94
  */
145
- export interface UserUpdateRequestModel {
95
+ export interface PrivateUserUpdateRequestModel {
146
96
  /** Metadata to apply to the user. Pass `owner`, `tenant`, or both. */
147
97
  metadata?: PublicMetadataModel;
148
98
  }
@@ -150,7 +100,7 @@ export interface UserUpdateRequestModel {
150
100
  * A single entry in the owner invitation request.
151
101
  * Must include either `id` or `email`.
152
102
  */
153
- export interface SendOwnerInvitationItemModel {
103
+ export interface PrivateSendOwnerInvitationItemModel {
154
104
  /** User ID (alternative to `email`). */
155
105
  id: string;
156
106
  /** User email address (alternative to `id`). */
@@ -160,23 +110,23 @@ export interface SendOwnerInvitationItemModel {
160
110
  * Request body for `POST /private/send-owner-invitation`.
161
111
  * Array of 1–50 owner invitation entries, each requiring either an `id` or `email`.
162
112
  */
163
- export type SendOwnerInvitationRequestModel = SendOwnerInvitationItemModel[];
113
+ export type PrivateSendOwnerInvitationRequestModel = PrivateSendOwnerInvitationItemModel[];
164
114
  /**
165
115
  * Response from `POST /private/send-owner-invitation`.
166
116
  */
167
- export interface SendOwnerInvitationModel {
117
+ export interface PrivateSendOwnerInvitationModel {
168
118
  /** Invitation enqueue result. */
169
119
  invitations: {
170
120
  /** Number of invitations received. */
171
- received?: number;
121
+ received: number;
172
122
  /** Number of invitations successfully enqueued. */
173
- enqueued?: number;
123
+ enqueued: number;
174
124
  };
175
125
  }
176
126
  /**
177
127
  * Request body for `POST /private/users` when creating an owner.
178
128
  */
179
- export interface UserCreateOwnerRequestModel {
129
+ export interface PrivateUserCreateOwnerRequestModel {
180
130
  /** User email address. */
181
131
  email: string;
182
132
  /** Must be `"owner"`. */
@@ -187,7 +137,7 @@ export interface UserCreateOwnerRequestModel {
187
137
  /**
188
138
  * Request body for `POST /private/users` when creating a tenant.
189
139
  */
190
- export interface UserCreateTenantRequestModel {
140
+ export interface PrivateUserCreateTenantRequestModel {
191
141
  /** User email address. */
192
142
  email: string;
193
143
  /** Must be `"tenant"`. */
@@ -197,6 +147,6 @@ export interface UserCreateTenantRequestModel {
197
147
  }
198
148
  /**
199
149
  * Request body for `POST /private/users`.
200
- * Use `UserCreateOwnerRequestModel` or `UserCreateTenantRequestModel` depending on the role.
150
+ * Use `PrivateUserCreateOwnerRequestModel` or `PrivateUserCreateTenantRequestModel` depending on the role.
201
151
  */
202
- export type UserCreateRequestModel = UserCreateOwnerRequestModel | UserCreateTenantRequestModel;
152
+ export type PrivateUserCreateRequestModel = PrivateUserCreateOwnerRequestModel | PrivateUserCreateTenantRequestModel;
@@ -0,0 +1,105 @@
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
+ * Query parameters for `GET /public/metadata`.
67
+ */
68
+ export interface PublicMetadataQueryParams {
69
+ /**
70
+ * Return metadata based on the given role.
71
+ */
72
+ role?: "tenant" | "owner";
73
+ }
74
+ /**
75
+ * Metadata as returned by `GET /public/metadata` and in user responses.
76
+ * Either `owner`, `tenant`, or both may be present depending on the user's role(s).
77
+ */
78
+ export interface PublicMetadataModel {
79
+ /** Owner metadata. Only present when the user has the `owner` role. */
80
+ owner: OwnerMetadataModel;
81
+ /** Tenant metadata. Only present when the user has the `tenant` role. */
82
+ tenant: TenantMetadataModel;
83
+ }
84
+ /**
85
+ * Query parameters for `PUT /public/metadata`.
86
+ */
87
+ export interface PublicMetadataUpdateQueryParams {
88
+ /**
89
+ * Specifies how to apply the metadata update.
90
+ * - `merge` – Combines the provided metadata with the existing metadata (default).
91
+ * - `overwrite` – Replaces the existing metadata with the provided metadata.
92
+ * @default 'merge'
93
+ */
94
+ strategy?: "merge" | "overwrite";
95
+ }
96
+ /**
97
+ * Partial metadata payload for write operations (`PUT /public/metadata`, `PUT /private/users`).
98
+ * Pass `owner`, `tenant`, or both — only the provided fields will be updated.
99
+ */
100
+ export interface MetadataPayloadModel {
101
+ /** Partial owner metadata to update. */
102
+ owner?: OwnerMetadataPayloadModel;
103
+ /** Partial tenant metadata to update. */
104
+ tenant?: TenantMetadataPayloadModel;
105
+ }
@@ -1,4 +1,26 @@
1
- import type { AddressModel, AgencyBasicModel, AmountBase, DateStringNullable, ExternalID, PaginationModel, PropertyBasicModel } from "./shared";
1
+ import type { AddressModel, AgencyBasicModel, AmountBase, DateString, DateStringNullable, ExternalID, PaginationModel, PropertyBasicModel } from "./shared";
2
+ /**
3
+ * Query parameters for `GET /agencies`.
4
+ */
5
+ export interface AgenciesQueryParams {
6
+ /**
7
+ * Number of rows to return.
8
+ * Must be between 1 and 25.
9
+ * @example 12
10
+ */
11
+ rows?: number;
12
+ /**
13
+ * Page number to return.
14
+ * Must be >= 1.
15
+ * @example 3
16
+ */
17
+ page?: number;
18
+ /**
19
+ * Filter by one or more agency IDs.
20
+ * @example ['zJBv2E5aJQ', 'aZfv225aJX']
21
+ */
22
+ agency_id?: ExternalID[];
23
+ }
2
24
  /**
3
25
  * Full agency entity. Contains all agency details including contact information.
4
26
  */
@@ -45,6 +67,48 @@ export interface AgenciesPagedResult {
45
67
  /** Pagination metadata. */
46
68
  pagination: PaginationModel;
47
69
  }
70
+ /**
71
+ * Query parameters for `GET /agencies/invoices`.
72
+ */
73
+ export interface AgenciesInvoicesQueryParams {
74
+ /**
75
+ * Number of rows to return.
76
+ * Must be between 1 and 25.
77
+ * @example 12
78
+ */
79
+ rows?: number;
80
+ /**
81
+ * Page number to return.
82
+ * Must be >= 1.
83
+ * @example 3
84
+ */
85
+ page?: number;
86
+ /**
87
+ * Filter report from date (inclusive).
88
+ * @example '2025-10-21'
89
+ */
90
+ from_date: DateString;
91
+ /**
92
+ * Filter report to date (inclusive).
93
+ * @example '2025-10-21'
94
+ */
95
+ to_date: DateString;
96
+ /**
97
+ * Filter by one or more agency IDs.
98
+ * @example ['zJBv2E5aJQ', 'aZfv225aJX']
99
+ */
100
+ agency_id?: ExternalID[];
101
+ /**
102
+ * Filter by one or more property IDs.
103
+ * @example ['zJBv2E5aJQ', 'aZfv225aJX']
104
+ */
105
+ property_id?: ExternalID[];
106
+ /**
107
+ * Filter by one or more beneficiary IDs.
108
+ * @example ['zJBv2E5aJQ', 'aZfv225aJX']
109
+ */
110
+ beneficiary_id?: ExternalID[];
111
+ }
48
112
  /**
49
113
  * Agency invoice item. Represents an outgoing payment made by the agency
50
114
  * and the associated property and payment record.
@@ -27,3 +27,25 @@ export interface AttachmentsPagedResult {
27
27
  /** Pagination metadata. */
28
28
  pagination: PaginationModel;
29
29
  }
30
+ /**
31
+ * Query parameters for `GET /attachments/{source}`.
32
+ */
33
+ export interface AttachmentsQueryParams {
34
+ /**
35
+ * Number of rows to return.
36
+ * Must be between 1 and 25.
37
+ * @example 12
38
+ */
39
+ rows?: number;
40
+ /**
41
+ * Page number to return.
42
+ * Must be >= 1.
43
+ * @example 3
44
+ */
45
+ page?: number;
46
+ /**
47
+ * One or more attachment source IDs to filter by.
48
+ * @example ['zJBv2E5aJQ', 'aZfv225aJX']
49
+ */
50
+ id: ExternalID[];
51
+ }