@kite-sa/sdk 0.10.0 → 0.11.1
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/CHANGELOG.md +8 -0
- package/dist/generated.d.ts +54 -3
- package/dist/generated.js +4 -3
- package/dist/index.d.ts +1 -1
- package/dist/index.js +1 -1
- package/dist/openapi-zod/client.d.ts +51 -0
- package/dist/openapi-zod/client.js +2 -0
- package/dist/openapi.d.ts +1 -1
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -4,6 +4,14 @@ Formerly `@darak-app/sdk`, which is deprecated. Versions before 0.5.0 were publi
|
|
|
4
4
|
|
|
5
5
|
Releases after 0.9.15 are written as change notes and added to this file when the package is published; in the source repository they can still be notes under `changes/`.
|
|
6
6
|
|
|
7
|
+
## 0.11.1
|
|
8
|
+
|
|
9
|
+
- `projects.search` takes `parent_project_id` (only the phases of that project) and returns `phase` (`parent_project_id` and `key`, the phase letter) on each project; `projects.get` returns `phase` and `phases` (a parent's phases, `project_id` and `key`, by letter).
|
|
10
|
+
|
|
11
|
+
## 0.11.0
|
|
12
|
+
|
|
13
|
+
- `reference.coverage` returns `listing_summary`, `projects`, `registered_deals_from_registers`, and new fields in `registered_deals` (`first_quarter`, `deals`, `notary_only_from`, `open_data_ends`) and `registered_rents` (`first_quarter`, `neighborhoods`, `contracts`).
|
|
14
|
+
|
|
7
15
|
## 0.10.0
|
|
8
16
|
|
|
9
17
|
- Project timelines carry `handover_basis` (`wafi_registry_end`, `developer` or `portal`): what kind of date `handover_date` is.
|
package/dist/generated.d.ts
CHANGED
|
@@ -1612,6 +1612,10 @@ export declare function createEndpoints(request: Request): {
|
|
|
1612
1612
|
max: number | null;
|
|
1613
1613
|
};
|
|
1614
1614
|
advertised_unit_count: unknown;
|
|
1615
|
+
phase: {
|
|
1616
|
+
parent_project_id: unknown;
|
|
1617
|
+
key: string | null;
|
|
1618
|
+
};
|
|
1615
1619
|
last_seen_at: unknown;
|
|
1616
1620
|
description: string | null;
|
|
1617
1621
|
description_en: string | null;
|
|
@@ -1670,6 +1674,10 @@ export declare function createEndpoints(request: Request): {
|
|
|
1670
1674
|
name: string;
|
|
1671
1675
|
url: string | null;
|
|
1672
1676
|
};
|
|
1677
|
+
phases: {
|
|
1678
|
+
project_id: number;
|
|
1679
|
+
key: string | null;
|
|
1680
|
+
}[];
|
|
1673
1681
|
linked_units: {
|
|
1674
1682
|
count: number;
|
|
1675
1683
|
for_sale: number;
|
|
@@ -1839,6 +1847,10 @@ export declare function createEndpoints(request: Request): {
|
|
|
1839
1847
|
max: number | null;
|
|
1840
1848
|
};
|
|
1841
1849
|
advertised_unit_count: unknown;
|
|
1850
|
+
phase: {
|
|
1851
|
+
parent_project_id: unknown;
|
|
1852
|
+
key: string | null;
|
|
1853
|
+
};
|
|
1842
1854
|
linked_units: {
|
|
1843
1855
|
count: number;
|
|
1844
1856
|
bedrooms_min: unknown;
|
|
@@ -1965,9 +1977,10 @@ export declare function createEndpoints(request: Request): {
|
|
|
1965
1977
|
/**
|
|
1966
1978
|
* What the API covers. What the API can answer, per city: active listings by
|
|
1967
1979
|
* listing type and kind of property, how many neighborhoods have at least 10 of
|
|
1968
|
-
* them, the share with a published nearby price band, the
|
|
1969
|
-
*
|
|
1970
|
-
*
|
|
1980
|
+
* them, the share with a published nearby price band, the listing sources, the
|
|
1981
|
+
* projects and how many carry prices, handover dates, payment plans and
|
|
1982
|
+
* model-level stock, the registered-deal history (open data, where it stops, and
|
|
1983
|
+
* the deals from the registers), and the registered rent index.
|
|
1971
1984
|
*/
|
|
1972
1985
|
readonly coverage: (params?: QueryOf<"reference.coverage">) => Promise<{
|
|
1973
1986
|
data: {
|
|
@@ -1984,14 +1997,52 @@ export declare function createEndpoints(request: Request): {
|
|
|
1984
1997
|
neighborhoods_with_10_listings: number;
|
|
1985
1998
|
price_band_ready_pct: number | null;
|
|
1986
1999
|
}[];
|
|
2000
|
+
listing_summary: {
|
|
2001
|
+
sources: number;
|
|
2002
|
+
rent: {
|
|
2003
|
+
active_listings: number;
|
|
2004
|
+
neighborhoods_with_10_listings: number;
|
|
2005
|
+
};
|
|
2006
|
+
sale: {
|
|
2007
|
+
active_listings: number;
|
|
2008
|
+
neighborhoods_with_10_listings: number;
|
|
2009
|
+
};
|
|
2010
|
+
};
|
|
2011
|
+
projects: {
|
|
2012
|
+
active: number;
|
|
2013
|
+
with_price_pct: number | null;
|
|
2014
|
+
with_handover_date_pct: number | null;
|
|
2015
|
+
with_payment_plan_pct: number | null;
|
|
2016
|
+
with_model_stock_pct: number | null;
|
|
2017
|
+
refreshed_48h_pct: number | null;
|
|
2018
|
+
};
|
|
1987
2019
|
registered_deals: {
|
|
2020
|
+
first_quarter: string | null;
|
|
2021
|
+
deals: number;
|
|
2022
|
+
notary_only_from: string | null;
|
|
2023
|
+
open_data_ends: string | null;
|
|
1988
2024
|
latest_quarter: string | null;
|
|
1989
2025
|
neighborhood_mapped_pct: number | null;
|
|
1990
2026
|
mappable_deals: number;
|
|
1991
2027
|
};
|
|
2028
|
+
registered_deals_from_registers: {
|
|
2029
|
+
real_estate_registry: {
|
|
2030
|
+
deals: number;
|
|
2031
|
+
first_month: string | null;
|
|
2032
|
+
last_month: string | null;
|
|
2033
|
+
};
|
|
2034
|
+
moj_notary: {
|
|
2035
|
+
deals: number;
|
|
2036
|
+
first_month: string | null;
|
|
2037
|
+
last_month: string | null;
|
|
2038
|
+
};
|
|
2039
|
+
};
|
|
1992
2040
|
registered_rents: {
|
|
1993
2041
|
available: boolean;
|
|
2042
|
+
first_quarter: string | null;
|
|
1994
2043
|
latest_quarter: string | null;
|
|
2044
|
+
neighborhoods: number;
|
|
2045
|
+
contracts: number;
|
|
1995
2046
|
};
|
|
1996
2047
|
}[];
|
|
1997
2048
|
};
|
package/dist/generated.js
CHANGED
|
@@ -394,9 +394,10 @@ export function createEndpoints(request) {
|
|
|
394
394
|
/**
|
|
395
395
|
* What the API covers. What the API can answer, per city: active listings by
|
|
396
396
|
* listing type and kind of property, how many neighborhoods have at least 10 of
|
|
397
|
-
* them, the share with a published nearby price band, the
|
|
398
|
-
*
|
|
399
|
-
*
|
|
397
|
+
* them, the share with a published nearby price band, the listing sources, the
|
|
398
|
+
* projects and how many carry prices, handover dates, payment plans and
|
|
399
|
+
* model-level stock, the registered-deal history (open data, where it stops, and
|
|
400
|
+
* the deals from the registers), and the registered rent index.
|
|
400
401
|
*/
|
|
401
402
|
coverage: (params) => request("GET", "/coverage", {
|
|
402
403
|
query: (params ?? {}),
|
package/dist/index.d.ts
CHANGED
|
@@ -49,7 +49,7 @@ export interface KiteOptions {
|
|
|
49
49
|
}
|
|
50
50
|
type Query = Record<string, string | number | boolean | readonly (string | number)[] | undefined>;
|
|
51
51
|
/** Kept in step with package.json by src/index.test.ts. */
|
|
52
|
-
export declare const VERSION = "0.
|
|
52
|
+
export declare const VERSION = "0.11.1";
|
|
53
53
|
/** Arrays go comma-separated, as the API expects; unset values are dropped. */
|
|
54
54
|
export declare function toSearchParams(query?: Query): string;
|
|
55
55
|
/**
|
package/dist/index.js
CHANGED
|
@@ -24,7 +24,7 @@ export class KiteError extends Error {
|
|
|
24
24
|
}
|
|
25
25
|
}
|
|
26
26
|
/** Kept in step with package.json by src/index.test.ts. */
|
|
27
|
-
export const VERSION = "0.
|
|
27
|
+
export const VERSION = "0.11.1";
|
|
28
28
|
const USER_AGENT = `kite-sa-js/${VERSION}`;
|
|
29
29
|
/** Longest Retry-After worth waiting for; anything longer (a monthly quota) throws. */
|
|
30
30
|
const MAX_RETRY_WAIT_S = 60;
|
|
@@ -137,14 +137,52 @@ export declare function referenceCoverage(params?: {
|
|
|
137
137
|
neighborhoods_with_10_listings: number;
|
|
138
138
|
price_band_ready_pct: number | null;
|
|
139
139
|
}[];
|
|
140
|
+
listing_summary: {
|
|
141
|
+
sources: number;
|
|
142
|
+
rent: {
|
|
143
|
+
active_listings: number;
|
|
144
|
+
neighborhoods_with_10_listings: number;
|
|
145
|
+
};
|
|
146
|
+
sale: {
|
|
147
|
+
active_listings: number;
|
|
148
|
+
neighborhoods_with_10_listings: number;
|
|
149
|
+
};
|
|
150
|
+
};
|
|
151
|
+
projects: {
|
|
152
|
+
active: number;
|
|
153
|
+
with_price_pct: number | null;
|
|
154
|
+
with_handover_date_pct: number | null;
|
|
155
|
+
with_payment_plan_pct: number | null;
|
|
156
|
+
with_model_stock_pct: number | null;
|
|
157
|
+
refreshed_48h_pct: number | null;
|
|
158
|
+
};
|
|
140
159
|
registered_deals: {
|
|
160
|
+
first_quarter: string | null;
|
|
161
|
+
deals: number;
|
|
162
|
+
notary_only_from: string | null;
|
|
163
|
+
open_data_ends: string | null;
|
|
141
164
|
latest_quarter: string | null;
|
|
142
165
|
neighborhood_mapped_pct: number | null;
|
|
143
166
|
mappable_deals: number;
|
|
144
167
|
};
|
|
168
|
+
registered_deals_from_registers: {
|
|
169
|
+
real_estate_registry: {
|
|
170
|
+
deals: number;
|
|
171
|
+
first_month: string | null;
|
|
172
|
+
last_month: string | null;
|
|
173
|
+
};
|
|
174
|
+
moj_notary: {
|
|
175
|
+
deals: number;
|
|
176
|
+
first_month: string | null;
|
|
177
|
+
last_month: string | null;
|
|
178
|
+
};
|
|
179
|
+
};
|
|
145
180
|
registered_rents: {
|
|
146
181
|
available: boolean;
|
|
182
|
+
first_quarter: string | null;
|
|
147
183
|
latest_quarter: string | null;
|
|
184
|
+
neighborhoods: number;
|
|
185
|
+
contracts: number;
|
|
148
186
|
};
|
|
149
187
|
}[];
|
|
150
188
|
};
|
|
@@ -1648,6 +1686,7 @@ export declare function projectsSearch(params?: {
|
|
|
1648
1686
|
handoverFrom?: string;
|
|
1649
1687
|
handoverTo?: string;
|
|
1650
1688
|
licensed?: "true" | "false";
|
|
1689
|
+
parentProjectId?: number;
|
|
1651
1690
|
sort?: "updated_desc" | "price_asc" | "price_desc";
|
|
1652
1691
|
limit?: number;
|
|
1653
1692
|
cursor?: string;
|
|
@@ -1685,6 +1724,10 @@ export declare function projectsSearch(params?: {
|
|
|
1685
1724
|
max: number | null;
|
|
1686
1725
|
};
|
|
1687
1726
|
advertised_unit_count: unknown;
|
|
1727
|
+
phase: {
|
|
1728
|
+
parent_project_id: unknown;
|
|
1729
|
+
key: string | null;
|
|
1730
|
+
};
|
|
1688
1731
|
linked_units: {
|
|
1689
1732
|
count: number;
|
|
1690
1733
|
bedrooms_min: unknown;
|
|
@@ -1747,6 +1790,10 @@ export declare function projectsGet(id: number, config?: Partial<ClientConfig>):
|
|
|
1747
1790
|
max: number | null;
|
|
1748
1791
|
};
|
|
1749
1792
|
advertised_unit_count: unknown;
|
|
1793
|
+
phase: {
|
|
1794
|
+
parent_project_id: unknown;
|
|
1795
|
+
key: string | null;
|
|
1796
|
+
};
|
|
1750
1797
|
last_seen_at: unknown;
|
|
1751
1798
|
description: string | null;
|
|
1752
1799
|
description_en: string | null;
|
|
@@ -1805,6 +1852,10 @@ export declare function projectsGet(id: number, config?: Partial<ClientConfig>):
|
|
|
1805
1852
|
name: string;
|
|
1806
1853
|
url: string | null;
|
|
1807
1854
|
};
|
|
1855
|
+
phases: {
|
|
1856
|
+
project_id: number;
|
|
1857
|
+
key: string | null;
|
|
1858
|
+
}[];
|
|
1808
1859
|
linked_units: {
|
|
1809
1860
|
count: number;
|
|
1810
1861
|
for_sale: number;
|
|
@@ -1295,6 +1295,8 @@ export async function projectsSearch(params, config) {
|
|
|
1295
1295
|
searchParams.set("handover_to", String(params.handoverTo));
|
|
1296
1296
|
if (params?.licensed != null)
|
|
1297
1297
|
searchParams.set("licensed", String(params.licensed));
|
|
1298
|
+
if (params?.parentProjectId != null)
|
|
1299
|
+
searchParams.set("parent_project_id", String(params.parentProjectId));
|
|
1298
1300
|
if (params?.sort != null)
|
|
1299
1301
|
searchParams.set("sort", String(params.sort));
|
|
1300
1302
|
if (params?.limit != null)
|
package/dist/openapi.d.ts
CHANGED
|
@@ -442,7 +442,7 @@ export interface operations {
|
|
|
442
442
|
};
|
|
443
443
|
"projects.search": {
|
|
444
444
|
parameters: {
|
|
445
|
-
query?: Pick<SnakeKeys<NonNullable<Parameters<typeof import("./openapi-zod/client.js").projectsSearch>[0]>>, "city" | "neighborhood_id" | "town" | "developer" | "status" | "project_type" | "listing_category" | "features" | "banks" | "kind" | "price_basis" | "q" | "price_min" | "price_max" | "handover_from" | "handover_to" | "licensed" | "sort" | "limit" | "cursor">;
|
|
445
|
+
query?: Pick<SnakeKeys<NonNullable<Parameters<typeof import("./openapi-zod/client.js").projectsSearch>[0]>>, "city" | "neighborhood_id" | "town" | "developer" | "status" | "project_type" | "listing_category" | "features" | "banks" | "kind" | "price_basis" | "q" | "price_min" | "price_max" | "handover_from" | "handover_to" | "licensed" | "parent_project_id" | "sort" | "limit" | "cursor">;
|
|
446
446
|
};
|
|
447
447
|
responses: {
|
|
448
448
|
200: {
|