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

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 (33) hide show
  1. package/README.md +86 -52
  2. package/dist/types/index.d.ts +3 -0
  3. package/dist/{index.js → types/index.js} +3 -10
  4. package/dist/types/one-portal-api/index.d.ts +2 -0
  5. package/dist/types/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/types/one-portal-api/public.d.ts +105 -0
  8. package/dist/types/{agency.d.ts → owner-api/agency.d.ts} +65 -1
  9. package/dist/types/{attachment.d.ts → owner-api/attachment.d.ts} +22 -0
  10. package/dist/types/owner-api/beneficiaries.d.ts +85 -0
  11. package/dist/types/owner-api/csv.d.ts +96 -0
  12. package/dist/types/owner-api/index.d.ts +10 -0
  13. package/dist/types/owner-api/index.js +26 -0
  14. package/dist/types/{ownership.d.ts → owner-api/ownerships.d.ts} +45 -0
  15. package/dist/types/{payment.d.ts → owner-api/payment.d.ts} +224 -0
  16. package/dist/types/owner-api/properties.d.ts +100 -0
  17. package/dist/types/owner-api/shared.js +2 -0
  18. package/dist/types/{tenant.d.ts → owner-api/tenant.d.ts} +136 -0
  19. package/dist/types/owner-api/tenant.js +2 -0
  20. package/package.json +3 -4
  21. package/dist/index.d.ts +0 -10
  22. package/dist/types/beneficiaries.d.ts +0 -32
  23. package/dist/types/properties.d.ts +0 -35
  24. /package/dist/types/{agency.js → one-portal-api/private.js} +0 -0
  25. /package/dist/types/{attachment.js → one-portal-api/public.js} +0 -0
  26. /package/dist/types/{beneficiaries.js → owner-api/agency.js} +0 -0
  27. /package/dist/types/{ownership.js → owner-api/attachment.js} +0 -0
  28. /package/dist/types/{payment.js → owner-api/beneficiaries.js} +0 -0
  29. /package/dist/types/{properties.js → owner-api/csv.js} +0 -0
  30. /package/dist/types/{shared.js → owner-api/ownerships.js} +0 -0
  31. /package/dist/types/{tenant.js → owner-api/payment.js} +0 -0
  32. /package/dist/types/{user.js → owner-api/properties.js} +0 -0
  33. /package/dist/types/{shared.d.ts → owner-api/shared.d.ts} +0 -0
@@ -1,4 +1,47 @@
1
1
  import type { AgencyBasicModel, AmountBase, DateString, DateStringNullable, ExternalID, PaginationModel, PropertyBasicModel, TenantBasicModel } from "./shared";
2
+ /**
3
+ * Query parameters for `GET /tenants`.
4
+ */
5
+ export interface TenantsQueryParams {
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
+ * Return tenants with active tenancies only.
20
+ * By default, or when set to `false`, returns tenants with both active and inactive tenancies.
21
+ * @example true
22
+ */
23
+ active_tenancies?: boolean;
24
+ /**
25
+ * Filter by one or more tenant IDs.
26
+ * @example ['zJBv2E5aJQ', 'aZfv225aJX']
27
+ */
28
+ tenant_id?: ExternalID[];
29
+ /**
30
+ * Filter by one or more beneficiary IDs.
31
+ * @example ['zJBv2E5aJQ', 'aZfv225aJX']
32
+ */
33
+ beneficiary_id?: ExternalID[];
34
+ /**
35
+ * Filter by one or more property IDs.
36
+ * @example ['zJBv2E5aJQ', 'aZfv225aJX']
37
+ */
38
+ property_id?: ExternalID[];
39
+ /**
40
+ * Filter by one or more agency IDs.
41
+ * @example ['zJBv2E5aJQ', 'aZfv225aJX']
42
+ */
43
+ agency_id?: ExternalID[];
44
+ }
2
45
  /**
3
46
  * Full tenant entity with all tenant details.
4
47
  */
@@ -32,6 +75,56 @@ export interface TenantsPagedResult {
32
75
  /** Pagination metadata. */
33
76
  pagination: PaginationModel;
34
77
  }
78
+ /**
79
+ * Query parameters for `GET /tenants/balances`.
80
+ */
81
+ export interface TenantsBalancesQueryParams {
82
+ /**
83
+ * Number of rows to return.
84
+ * Must be between 1 and 25.
85
+ * @example 12
86
+ */
87
+ rows?: number;
88
+ /**
89
+ * Page number to return.
90
+ * Must be >= 1.
91
+ * @example 3
92
+ */
93
+ page?: number;
94
+ /**
95
+ * Return closing balance on the given date.
96
+ * This value represents the sum of all transactions up to and including the given date.
97
+ * @example '2025-10-21'
98
+ */
99
+ closing_balance_date: DateString;
100
+ /**
101
+ * Return opening balance on the given date.
102
+ * This value represents the sum of all transactions before the given date.
103
+ * If not provided, falls back to `closing_balance_date`.
104
+ * @example '2025-10-21'
105
+ */
106
+ opening_balance_date?: DateString;
107
+ /**
108
+ * Return only tenants where there is an arrears balance.
109
+ * @example true
110
+ */
111
+ in_arrears?: boolean;
112
+ /**
113
+ * Filter by one or more tenant IDs.
114
+ * @example ['zJBv2E5aJQ', 'aZfv225aJX']
115
+ */
116
+ tenant_id?: ExternalID[];
117
+ /**
118
+ * Filter by one or more property IDs.
119
+ * @example ['zJBv2E5aJQ', 'aZfv225aJX']
120
+ */
121
+ property_id?: ExternalID[];
122
+ /**
123
+ * Filter by one or more agency IDs.
124
+ * @example ['zJBv2E5aJQ', 'aZfv225aJX']
125
+ */
126
+ agency_id?: ExternalID[];
127
+ }
35
128
  /**
36
129
  * Tenant balance item showing opening and closing balances for a given date range.
37
130
  */
@@ -69,6 +162,49 @@ export interface TenantsBalancesPagedResult {
69
162
  /** Pagination metadata. */
70
163
  pagination: PaginationModel;
71
164
  }
165
+ /**
166
+ * Query parameters for `GET /tenants/tenancies`.
167
+ */
168
+ export interface TenantsTenanciesQueryParams {
169
+ /**
170
+ * Number of rows to return.
171
+ * Must be between 1 and 25.
172
+ * @example 12
173
+ */
174
+ rows?: number;
175
+ /**
176
+ * Page number to return.
177
+ * Must be >= 1.
178
+ * @example 3
179
+ */
180
+ page?: number;
181
+ /**
182
+ * Return only active tenancies when set to `true`.
183
+ * By default, or when set to `false`, returns both active and inactive tenancies.
184
+ * @example true
185
+ */
186
+ active_tenancies?: boolean;
187
+ /**
188
+ * Filter by one or more tenant IDs.
189
+ * @example ['zJBv2E5aJQ', 'aZfv225aJX']
190
+ */
191
+ tenant_id?: ExternalID[];
192
+ /**
193
+ * Filter by one or more property IDs.
194
+ * @example ['zJBv2E5aJQ', 'aZfv225aJX']
195
+ */
196
+ property_id?: ExternalID[];
197
+ /**
198
+ * Filter by one or more agency IDs.
199
+ * @example ['zJBv2E5aJQ', 'aZfv225aJX']
200
+ */
201
+ agency_id?: ExternalID[];
202
+ /**
203
+ * Filter by one or more beneficiary IDs.
204
+ * @example ['zJBv2E5aJQ', 'aZfv225aJX']
205
+ */
206
+ beneficiary_id?: ExternalID[];
207
+ }
72
208
  /**
73
209
  * A tenancy record representing a tenant's occupancy period on a property.
74
210
  *
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@reapit/gbl-pp-owner-api-ts-definitions",
3
- "version": "1.0.0",
3
+ "version": "1.0.3",
4
4
  "description": "TypeScript type definitions for the PayProp Owner API",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",
@@ -16,7 +16,6 @@
16
16
  "@types/jest": "^30.0.0",
17
17
  "@types/node": "^25.5.2",
18
18
  "@types/react": "^19.2.14",
19
- "typescript": "^5.6.2"
20
- },
21
- "packageManager": "yarn@4.13.0+sha512.5c20ba010c99815433e5c8453112165e673f1c7948d8d2b267f4b5e52097538658388ebc9f9580656d9b75c5cc996f990f611f99304a2197d4c56d21eea370e7"
19
+ "typescript": "^6.0.2"
20
+ }
22
21
  }
package/dist/index.d.ts DELETED
@@ -1,10 +0,0 @@
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,32 +0,0 @@
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
- }
@@ -1,35 +0,0 @@
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
- }
File without changes
File without changes
File without changes