@kite-sa/sdk 0.12.0 → 0.13.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/CHANGELOG.md +4 -0
- package/dist/generated.d.ts +164 -0
- package/dist/generated.js +8 -0
- package/dist/index.d.ts +1 -1
- package/dist/index.js +1 -1
- package/dist/openapi-zod/client.d.ts +173 -0
- package/dist/openapi-zod/client.js +26 -0
- package/dist/openapi.d.ts +12 -0
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -4,6 +4,10 @@ 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.13.0
|
|
8
|
+
|
|
9
|
+
- `market.supplyPipeline` (GET /market/supply-pipeline): homes expected to be delivered per year 2026-2030 and later for a city, neighbourhoods or a radius, one line per source with its confidence (stated handover, stated date passed, licence end, undated off-plan, permits under way, permits not started), totals, unit types, vacant-land capacity, `coverage` and `assumptions`. No permit figure is built from fewer than 5 permits.
|
|
10
|
+
|
|
7
11
|
## 0.12.0
|
|
8
12
|
|
|
9
13
|
- Neighborhoods (`reference.neighborhoods`) carry `official_district_id` and `official_districts`, the official MOMAH districts each maps to; listings, projects, project units, registered deals, registered rents and the neighborhood market rows carry `official_district_id` next to `neighborhood_id`.
|
package/dist/generated.d.ts
CHANGED
|
@@ -950,6 +950,170 @@ export declare function createEndpoints(request: Request): {
|
|
|
950
950
|
};
|
|
951
951
|
};
|
|
952
952
|
}>;
|
|
953
|
+
/**
|
|
954
|
+
* Homes still to come, by year and source. A forward supply forecast: the homes
|
|
955
|
+
* expected to be handed over in a city, neighbourhoods or a radius, per year
|
|
956
|
+
* (2026–2030, plus `later`), per source line, each with its own confidence.
|
|
957
|
+
*/
|
|
958
|
+
readonly supplyPipeline: (params?: QueryOf<"market.supply_pipeline">) => Promise<{
|
|
959
|
+
data: {
|
|
960
|
+
filters: {
|
|
961
|
+
city: string | null;
|
|
962
|
+
neighborhood_ids: unknown;
|
|
963
|
+
lat: number | null;
|
|
964
|
+
lng: number | null;
|
|
965
|
+
radius_km: number | null;
|
|
966
|
+
group_by: string;
|
|
967
|
+
};
|
|
968
|
+
years: number[];
|
|
969
|
+
min_permits: number;
|
|
970
|
+
permit_cells_suppressed: number;
|
|
971
|
+
neighborhoods: {
|
|
972
|
+
id: number;
|
|
973
|
+
city: string;
|
|
974
|
+
name_ar: string;
|
|
975
|
+
name_en: string | null;
|
|
976
|
+
official_district_id: import("./openapi-zod/models.js").OfficialDistrictId;
|
|
977
|
+
}[];
|
|
978
|
+
sources: {
|
|
979
|
+
source: string;
|
|
980
|
+
label: string;
|
|
981
|
+
confidence: string;
|
|
982
|
+
high_only: boolean;
|
|
983
|
+
by_year: {
|
|
984
|
+
low: number;
|
|
985
|
+
high: number;
|
|
986
|
+
year: number;
|
|
987
|
+
permits: unknown;
|
|
988
|
+
}[];
|
|
989
|
+
later: {
|
|
990
|
+
low: number;
|
|
991
|
+
high: number;
|
|
992
|
+
permits: unknown;
|
|
993
|
+
};
|
|
994
|
+
window: {
|
|
995
|
+
low: number;
|
|
996
|
+
high: number;
|
|
997
|
+
permits: unknown;
|
|
998
|
+
};
|
|
999
|
+
by_unit_type: {
|
|
1000
|
+
low: number;
|
|
1001
|
+
high: number;
|
|
1002
|
+
unit_type: string;
|
|
1003
|
+
}[];
|
|
1004
|
+
}[];
|
|
1005
|
+
totals: {
|
|
1006
|
+
by_year: {
|
|
1007
|
+
stated: {
|
|
1008
|
+
low: number;
|
|
1009
|
+
high: number;
|
|
1010
|
+
};
|
|
1011
|
+
projects: {
|
|
1012
|
+
low: number;
|
|
1013
|
+
high: number;
|
|
1014
|
+
};
|
|
1015
|
+
all: {
|
|
1016
|
+
low: number;
|
|
1017
|
+
high: number;
|
|
1018
|
+
};
|
|
1019
|
+
year: number;
|
|
1020
|
+
}[];
|
|
1021
|
+
later: {
|
|
1022
|
+
stated: {
|
|
1023
|
+
low: number;
|
|
1024
|
+
high: number;
|
|
1025
|
+
};
|
|
1026
|
+
projects: {
|
|
1027
|
+
low: number;
|
|
1028
|
+
high: number;
|
|
1029
|
+
};
|
|
1030
|
+
all: {
|
|
1031
|
+
low: number;
|
|
1032
|
+
high: number;
|
|
1033
|
+
};
|
|
1034
|
+
};
|
|
1035
|
+
window: {
|
|
1036
|
+
stated: {
|
|
1037
|
+
low: number;
|
|
1038
|
+
high: number;
|
|
1039
|
+
};
|
|
1040
|
+
projects: {
|
|
1041
|
+
low: number;
|
|
1042
|
+
high: number;
|
|
1043
|
+
};
|
|
1044
|
+
all: {
|
|
1045
|
+
low: number;
|
|
1046
|
+
high: number;
|
|
1047
|
+
};
|
|
1048
|
+
};
|
|
1049
|
+
};
|
|
1050
|
+
by_unit_type: {
|
|
1051
|
+
unit_type: string;
|
|
1052
|
+
by_year: {
|
|
1053
|
+
low: number;
|
|
1054
|
+
high: number;
|
|
1055
|
+
year: number;
|
|
1056
|
+
}[];
|
|
1057
|
+
later: {
|
|
1058
|
+
low: number;
|
|
1059
|
+
high: number;
|
|
1060
|
+
};
|
|
1061
|
+
window: {
|
|
1062
|
+
low: number;
|
|
1063
|
+
high: number;
|
|
1064
|
+
};
|
|
1065
|
+
}[];
|
|
1066
|
+
capacity: {
|
|
1067
|
+
by_unit_type: {
|
|
1068
|
+
low: number;
|
|
1069
|
+
high: number;
|
|
1070
|
+
unit_type: string;
|
|
1071
|
+
}[];
|
|
1072
|
+
total: {
|
|
1073
|
+
low: number;
|
|
1074
|
+
high: number;
|
|
1075
|
+
};
|
|
1076
|
+
plots: number;
|
|
1077
|
+
};
|
|
1078
|
+
groups: unknown;
|
|
1079
|
+
coverage: {
|
|
1080
|
+
city: string;
|
|
1081
|
+
as_of: string;
|
|
1082
|
+
permit_feed: unknown;
|
|
1083
|
+
vacancy_verdicts: boolean;
|
|
1084
|
+
project_groups: number;
|
|
1085
|
+
groups_with_stated_units: number;
|
|
1086
|
+
groups_with_units_from_land: number;
|
|
1087
|
+
groups_without_units: number;
|
|
1088
|
+
not_counted: {
|
|
1089
|
+
delivered: {
|
|
1090
|
+
groups: number;
|
|
1091
|
+
units: number;
|
|
1092
|
+
};
|
|
1093
|
+
readiness_unknown: {
|
|
1094
|
+
groups: number;
|
|
1095
|
+
units: number;
|
|
1096
|
+
};
|
|
1097
|
+
sold_out_undated: {
|
|
1098
|
+
groups: number;
|
|
1099
|
+
units: number;
|
|
1100
|
+
};
|
|
1101
|
+
licence_lapsed: {
|
|
1102
|
+
groups: number;
|
|
1103
|
+
units: number;
|
|
1104
|
+
};
|
|
1105
|
+
land_plots: {
|
|
1106
|
+
groups: number;
|
|
1107
|
+
units: number;
|
|
1108
|
+
};
|
|
1109
|
+
dated_without_units: {
|
|
1110
|
+
groups: number;
|
|
1111
|
+
};
|
|
1112
|
+
};
|
|
1113
|
+
}[];
|
|
1114
|
+
assumptions: unknown;
|
|
1115
|
+
};
|
|
1116
|
+
}>;
|
|
953
1117
|
/**
|
|
954
1118
|
* Registered deal statistics. Deal counts and median, 25th and 75th percentile
|
|
955
1119
|
* price per m² and total price, per quarter and land-use class, for a city, a
|
package/dist/generated.js
CHANGED
|
@@ -199,6 +199,14 @@ export function createEndpoints(request) {
|
|
|
199
199
|
* days before (rolling windows ending now).
|
|
200
200
|
*/
|
|
201
201
|
supply: (params) => request("GET", "/market/supply", { query: params }),
|
|
202
|
+
/**
|
|
203
|
+
* Homes still to come, by year and source. A forward supply forecast: the homes
|
|
204
|
+
* expected to be handed over in a city, neighbourhoods or a radius, per year
|
|
205
|
+
* (2026–2030, plus `later`), per source line, each with its own confidence.
|
|
206
|
+
*/
|
|
207
|
+
supplyPipeline: (params) => request("GET", "/market/supply-pipeline", {
|
|
208
|
+
query: (params ?? {}),
|
|
209
|
+
}),
|
|
202
210
|
/**
|
|
203
211
|
* Registered deal statistics. Deal counts and median, 25th and 75th percentile
|
|
204
212
|
* price per m² and total price, per quarter and land-use class, for a city, a
|
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.13.0";
|
|
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.13.0";
|
|
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;
|
|
@@ -2284,6 +2284,179 @@ export declare function marketAbsorption(params?: {
|
|
|
2284
2284
|
}[];
|
|
2285
2285
|
};
|
|
2286
2286
|
}>;
|
|
2287
|
+
/**
|
|
2288
|
+
* @throws {ApiError<400, Error>}
|
|
2289
|
+
* @throws {ApiError<401, Error>}
|
|
2290
|
+
* @throws {ApiError<403, Error>}
|
|
2291
|
+
* @throws {ApiError<429, Error>}
|
|
2292
|
+
* @throws {ApiError<500, Error>}
|
|
2293
|
+
*/
|
|
2294
|
+
export declare function marketSupplyPipeline(params?: {
|
|
2295
|
+
city?: string;
|
|
2296
|
+
neighborhoodId?: number[];
|
|
2297
|
+
lat?: number;
|
|
2298
|
+
lng?: number;
|
|
2299
|
+
radiusKm?: number;
|
|
2300
|
+
groupBy?: "area" | "neighborhood";
|
|
2301
|
+
}, config?: Partial<ClientConfig>): Promise<{
|
|
2302
|
+
data: {
|
|
2303
|
+
filters: {
|
|
2304
|
+
city: string | null;
|
|
2305
|
+
neighborhood_ids: unknown;
|
|
2306
|
+
lat: number | null;
|
|
2307
|
+
lng: number | null;
|
|
2308
|
+
radius_km: number | null;
|
|
2309
|
+
group_by: string;
|
|
2310
|
+
};
|
|
2311
|
+
years: number[];
|
|
2312
|
+
min_permits: number;
|
|
2313
|
+
permit_cells_suppressed: number;
|
|
2314
|
+
neighborhoods: {
|
|
2315
|
+
id: number;
|
|
2316
|
+
city: string;
|
|
2317
|
+
name_ar: string;
|
|
2318
|
+
name_en: string | null;
|
|
2319
|
+
official_district_id: OfficialDistrictId;
|
|
2320
|
+
}[];
|
|
2321
|
+
sources: {
|
|
2322
|
+
source: string;
|
|
2323
|
+
label: string;
|
|
2324
|
+
confidence: string;
|
|
2325
|
+
high_only: boolean;
|
|
2326
|
+
by_year: {
|
|
2327
|
+
low: number;
|
|
2328
|
+
high: number;
|
|
2329
|
+
year: number;
|
|
2330
|
+
permits: unknown;
|
|
2331
|
+
}[];
|
|
2332
|
+
later: {
|
|
2333
|
+
low: number;
|
|
2334
|
+
high: number;
|
|
2335
|
+
permits: unknown;
|
|
2336
|
+
};
|
|
2337
|
+
window: {
|
|
2338
|
+
low: number;
|
|
2339
|
+
high: number;
|
|
2340
|
+
permits: unknown;
|
|
2341
|
+
};
|
|
2342
|
+
by_unit_type: {
|
|
2343
|
+
low: number;
|
|
2344
|
+
high: number;
|
|
2345
|
+
unit_type: string;
|
|
2346
|
+
}[];
|
|
2347
|
+
}[];
|
|
2348
|
+
totals: {
|
|
2349
|
+
by_year: {
|
|
2350
|
+
stated: {
|
|
2351
|
+
low: number;
|
|
2352
|
+
high: number;
|
|
2353
|
+
};
|
|
2354
|
+
projects: {
|
|
2355
|
+
low: number;
|
|
2356
|
+
high: number;
|
|
2357
|
+
};
|
|
2358
|
+
all: {
|
|
2359
|
+
low: number;
|
|
2360
|
+
high: number;
|
|
2361
|
+
};
|
|
2362
|
+
year: number;
|
|
2363
|
+
}[];
|
|
2364
|
+
later: {
|
|
2365
|
+
stated: {
|
|
2366
|
+
low: number;
|
|
2367
|
+
high: number;
|
|
2368
|
+
};
|
|
2369
|
+
projects: {
|
|
2370
|
+
low: number;
|
|
2371
|
+
high: number;
|
|
2372
|
+
};
|
|
2373
|
+
all: {
|
|
2374
|
+
low: number;
|
|
2375
|
+
high: number;
|
|
2376
|
+
};
|
|
2377
|
+
};
|
|
2378
|
+
window: {
|
|
2379
|
+
stated: {
|
|
2380
|
+
low: number;
|
|
2381
|
+
high: number;
|
|
2382
|
+
};
|
|
2383
|
+
projects: {
|
|
2384
|
+
low: number;
|
|
2385
|
+
high: number;
|
|
2386
|
+
};
|
|
2387
|
+
all: {
|
|
2388
|
+
low: number;
|
|
2389
|
+
high: number;
|
|
2390
|
+
};
|
|
2391
|
+
};
|
|
2392
|
+
};
|
|
2393
|
+
by_unit_type: {
|
|
2394
|
+
unit_type: string;
|
|
2395
|
+
by_year: {
|
|
2396
|
+
low: number;
|
|
2397
|
+
high: number;
|
|
2398
|
+
year: number;
|
|
2399
|
+
}[];
|
|
2400
|
+
later: {
|
|
2401
|
+
low: number;
|
|
2402
|
+
high: number;
|
|
2403
|
+
};
|
|
2404
|
+
window: {
|
|
2405
|
+
low: number;
|
|
2406
|
+
high: number;
|
|
2407
|
+
};
|
|
2408
|
+
}[];
|
|
2409
|
+
capacity: {
|
|
2410
|
+
by_unit_type: {
|
|
2411
|
+
low: number;
|
|
2412
|
+
high: number;
|
|
2413
|
+
unit_type: string;
|
|
2414
|
+
}[];
|
|
2415
|
+
total: {
|
|
2416
|
+
low: number;
|
|
2417
|
+
high: number;
|
|
2418
|
+
};
|
|
2419
|
+
plots: number;
|
|
2420
|
+
};
|
|
2421
|
+
groups: unknown;
|
|
2422
|
+
coverage: {
|
|
2423
|
+
city: string;
|
|
2424
|
+
as_of: string;
|
|
2425
|
+
permit_feed: unknown;
|
|
2426
|
+
vacancy_verdicts: boolean;
|
|
2427
|
+
project_groups: number;
|
|
2428
|
+
groups_with_stated_units: number;
|
|
2429
|
+
groups_with_units_from_land: number;
|
|
2430
|
+
groups_without_units: number;
|
|
2431
|
+
not_counted: {
|
|
2432
|
+
delivered: {
|
|
2433
|
+
groups: number;
|
|
2434
|
+
units: number;
|
|
2435
|
+
};
|
|
2436
|
+
readiness_unknown: {
|
|
2437
|
+
groups: number;
|
|
2438
|
+
units: number;
|
|
2439
|
+
};
|
|
2440
|
+
sold_out_undated: {
|
|
2441
|
+
groups: number;
|
|
2442
|
+
units: number;
|
|
2443
|
+
};
|
|
2444
|
+
licence_lapsed: {
|
|
2445
|
+
groups: number;
|
|
2446
|
+
units: number;
|
|
2447
|
+
};
|
|
2448
|
+
land_plots: {
|
|
2449
|
+
groups: number;
|
|
2450
|
+
units: number;
|
|
2451
|
+
};
|
|
2452
|
+
dated_without_units: {
|
|
2453
|
+
groups: number;
|
|
2454
|
+
};
|
|
2455
|
+
};
|
|
2456
|
+
}[];
|
|
2457
|
+
assumptions: unknown;
|
|
2458
|
+
};
|
|
2459
|
+
}>;
|
|
2287
2460
|
/**
|
|
2288
2461
|
* @throws {ApiError<400, Error>}
|
|
2289
2462
|
* @throws {ApiError<401, Error>}
|
|
@@ -1529,6 +1529,32 @@ export async function marketAbsorption(params, config) {
|
|
|
1529
1529
|
const res = await _request("GET", "/market/absorption", { searchParams }, config);
|
|
1530
1530
|
return res.json();
|
|
1531
1531
|
}
|
|
1532
|
+
/**
|
|
1533
|
+
* @throws {ApiError<400, Error>}
|
|
1534
|
+
* @throws {ApiError<401, Error>}
|
|
1535
|
+
* @throws {ApiError<403, Error>}
|
|
1536
|
+
* @throws {ApiError<429, Error>}
|
|
1537
|
+
* @throws {ApiError<500, Error>}
|
|
1538
|
+
*/
|
|
1539
|
+
export async function marketSupplyPipeline(params, config) {
|
|
1540
|
+
const searchParams = new URLSearchParams();
|
|
1541
|
+
if (params?.city != null)
|
|
1542
|
+
searchParams.set("city", String(params.city));
|
|
1543
|
+
if (params?.neighborhoodId != null) {
|
|
1544
|
+
for (const v of params.neighborhoodId)
|
|
1545
|
+
searchParams.append("neighborhood_id", String(v));
|
|
1546
|
+
}
|
|
1547
|
+
if (params?.lat != null)
|
|
1548
|
+
searchParams.set("lat", String(params.lat));
|
|
1549
|
+
if (params?.lng != null)
|
|
1550
|
+
searchParams.set("lng", String(params.lng));
|
|
1551
|
+
if (params?.radiusKm != null)
|
|
1552
|
+
searchParams.set("radius_km", String(params.radiusKm));
|
|
1553
|
+
if (params?.groupBy != null)
|
|
1554
|
+
searchParams.set("group_by", String(params.groupBy));
|
|
1555
|
+
const res = await _request("GET", "/market/supply-pipeline", { searchParams }, config);
|
|
1556
|
+
return res.json();
|
|
1557
|
+
}
|
|
1532
1558
|
/**
|
|
1533
1559
|
* @throws {ApiError<400, Error>}
|
|
1534
1560
|
* @throws {ApiError<401, Error>}
|
package/dist/openapi.d.ts
CHANGED
|
@@ -534,6 +534,18 @@ export interface operations {
|
|
|
534
534
|
};
|
|
535
535
|
};
|
|
536
536
|
};
|
|
537
|
+
"market.supply_pipeline": {
|
|
538
|
+
parameters: {
|
|
539
|
+
query?: Pick<SnakeKeys<NonNullable<Parameters<typeof import("./openapi-zod/client.js").marketSupplyPipeline>[0]>>, "city" | "neighborhood_id" | "lat" | "lng" | "radius_km" | "group_by">;
|
|
540
|
+
};
|
|
541
|
+
responses: {
|
|
542
|
+
200: {
|
|
543
|
+
content: {
|
|
544
|
+
"application/json": Awaited<ReturnType<typeof import("./openapi-zod/client.js").marketSupplyPipeline>>;
|
|
545
|
+
};
|
|
546
|
+
};
|
|
547
|
+
};
|
|
548
|
+
};
|
|
537
549
|
"projects.models": {
|
|
538
550
|
parameters: {
|
|
539
551
|
query?: Pick<SnakeKeys<NonNullable<Parameters<typeof import("./openapi-zod/client.js").projectsModels>[1]>>, "unit_type" | "on_offer" | "left_within_days">;
|