@kite-sa/sdk 0.11.2 → 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 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.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
+
11
+ ## 0.12.0
12
+
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`.
14
+
7
15
  ## 0.11.2
8
16
 
9
17
  - Docs: the `max_age` filter on the listing, listing-count and advertiser calls is checked against building permits in every city, not only Riyadh; an age of 11 means more than 10 years.
@@ -49,6 +49,7 @@ export declare function createEndpoints(request: Request): {
49
49
  max_price_sar: number;
50
50
  top_neighborhoods: {
51
51
  neighborhood_id: number;
52
+ official_district_id: import("./openapi-zod/models.js").OfficialDistrictId;
52
53
  name_ar: string;
53
54
  name_en: string;
54
55
  listings: number;
@@ -209,6 +210,7 @@ export declare function createEndpoints(request: Request): {
209
210
  price_source: string;
210
211
  neighborhoods: {
211
212
  neighborhood_id: number;
213
+ official_district_id: import("./openapi-zod/models.js").OfficialDistrictId;
212
214
  name_en: string;
213
215
  name_ar: string;
214
216
  town: import("./openapi-zod/models.js").NeighborhoodTown;
@@ -276,6 +278,7 @@ export declare function createEndpoints(request: Request): {
276
278
  rent_sample_size: number;
277
279
  sale_sample_size: number;
278
280
  neighborhood_id: number;
281
+ official_district_id: import("./openapi-zod/models.js").OfficialDistrictId;
279
282
  name_en: string | null;
280
283
  name_ar: string | null;
281
284
  town: import("./openapi-zod/models.js").NeighborhoodTown;
@@ -309,6 +312,7 @@ export declare function createEndpoints(request: Request): {
309
312
  basis: string;
310
313
  series: {
311
314
  neighborhood_id: unknown;
315
+ official_district_id: import("./openapi-zod/models.js").OfficialDistrictId;
312
316
  name_en: string | null;
313
317
  name_ar: string | null;
314
318
  town: import("./openapi-zod/models.js").NeighborhoodTown;
@@ -441,6 +445,7 @@ export declare function createEndpoints(request: Request): {
441
445
  groups: {
442
446
  city: string | null;
443
447
  neighborhood_id: unknown;
448
+ official_district_id: import("./openapi-zod/models.js").OfficialDistrictId;
444
449
  neighborhood_name_ar: string | null;
445
450
  neighborhood_name_en: string | null;
446
451
  developer: string | null;
@@ -662,6 +667,7 @@ export declare function createEndpoints(request: Request): {
662
667
  }[];
663
668
  neighborhoods: {
664
669
  neighborhood_id: number;
670
+ official_district_id: import("./openapi-zod/models.js").OfficialDistrictId;
665
671
  name_ar: string;
666
672
  name_en: string;
667
673
  town: import("./openapi-zod/models.js").NeighborhoodTown;
@@ -789,6 +795,7 @@ export declare function createEndpoints(request: Request): {
789
795
  min_sample_size: number;
790
796
  neighborhoods: {
791
797
  neighborhood_id: number;
798
+ official_district_id: import("./openapi-zod/models.js").OfficialDistrictId;
792
799
  name_ar: string;
793
800
  name_en: string;
794
801
  town: import("./openapi-zod/models.js").NeighborhoodTown;
@@ -890,6 +897,7 @@ export declare function createEndpoints(request: Request): {
890
897
  }[];
891
898
  top_neighborhoods: {
892
899
  neighborhood_id: number;
900
+ official_district_id: import("./openapi-zod/models.js").OfficialDistrictId;
893
901
  name_ar: string;
894
902
  name_en: string;
895
903
  town: import("./openapi-zod/models.js").NeighborhoodTown;
@@ -942,6 +950,170 @@ export declare function createEndpoints(request: Request): {
942
950
  };
943
951
  };
944
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
+ }>;
945
1117
  /**
946
1118
  * Registered deal statistics. Deal counts and median, 25th and 75th percentile
947
1119
  * price per m² and total price, per quarter and land-use class, for a city, a
@@ -1106,6 +1278,7 @@ export declare function createEndpoints(request: Request): {
1106
1278
  min_sample_size: number;
1107
1279
  cells: {
1108
1280
  neighborhood_id: unknown;
1281
+ official_district_id: import("./openapi-zod/models.js").OfficialDistrictId;
1109
1282
  neighborhood_name_ar: string;
1110
1283
  neighborhood_name_en: string | null;
1111
1284
  town_ar: string;
@@ -1593,6 +1766,7 @@ export declare function createEndpoints(request: Request): {
1593
1766
  city: string | null;
1594
1767
  city_name_en: string | null;
1595
1768
  neighborhood_id: unknown;
1769
+ official_district_id: import("./openapi-zod/models.js").OfficialDistrictId;
1596
1770
  neighborhood_name_ar: string | null;
1597
1771
  neighborhood_name_en: string | null;
1598
1772
  lat: number | null;
@@ -1828,6 +2002,7 @@ export declare function createEndpoints(request: Request): {
1828
2002
  city: string | null;
1829
2003
  city_name_en: string | null;
1830
2004
  neighborhood_id: unknown;
2005
+ official_district_id: import("./openapi-zod/models.js").OfficialDistrictId;
1831
2006
  neighborhood_name_ar: string | null;
1832
2007
  neighborhood_name_en: string | null;
1833
2008
  lat: number | null;
@@ -1901,6 +2076,7 @@ export declare function createEndpoints(request: Request): {
1901
2076
  city: string | null;
1902
2077
  city_name_en: string | null;
1903
2078
  neighborhood_id: unknown;
2079
+ official_district_id: import("./openapi-zod/models.js").OfficialDistrictId;
1904
2080
  neighborhood_name_ar: string | null;
1905
2081
  neighborhood_name_en: string | null;
1906
2082
  lat: number | null;
@@ -1948,6 +2124,7 @@ export declare function createEndpoints(request: Request): {
1948
2124
  city: string | null;
1949
2125
  city_name_en: string | null;
1950
2126
  neighborhood_id: unknown;
2127
+ official_district_id: import("./openapi-zod/models.js").OfficialDistrictId;
1951
2128
  neighborhood_name_ar: string | null;
1952
2129
  neighborhood_name_en: string | null;
1953
2130
  lat: number | null;
@@ -2094,7 +2271,11 @@ export declare function createEndpoints(request: Request): {
2094
2271
  max_result_depth: number;
2095
2272
  };
2096
2273
  }>;
2097
- /** List neighborhoods. Active neighborhoods in a city. */
2274
+ /**
2275
+ * List neighborhoods. Active neighborhoods in a city, with the official MOMAH
2276
+ * district(s) each maps to (`official_districts`), for joining Kite data to data
2277
+ * keyed by official districts.
2278
+ */
2098
2279
  readonly neighborhoods: (city: string | number) => Promise<{
2099
2280
  data: {
2100
2281
  id: number;
@@ -2104,6 +2285,8 @@ export declare function createEndpoints(request: Request): {
2104
2285
  direction_id: unknown;
2105
2286
  town: import("./openapi-zod/models.js").NeighborhoodTown;
2106
2287
  center: unknown;
2288
+ official_district_id: import("./openapi-zod/models.js").OfficialDistrictId;
2289
+ official_districts: import("./openapi-zod/models.js").OfficialDistrict[];
2107
2290
  }[];
2108
2291
  }>;
2109
2292
  /** List towns. The towns a city is made of, for the `town` filter. */
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
@@ -415,7 +423,11 @@ export function createEndpoints(request) {
415
423
  * reach.
416
424
  */
417
425
  limits: () => request("GET", "/limits"),
418
- /** List neighborhoods. Active neighborhoods in a city. */
426
+ /**
427
+ * List neighborhoods. Active neighborhoods in a city, with the official MOMAH
428
+ * district(s) each maps to (`official_districts`), for joining Kite data to data
429
+ * keyed by official districts.
430
+ */
419
431
  neighborhoods: (city) => request("GET", `/cities/${encodeURIComponent(String(city))}/neighborhoods`),
420
432
  /** List towns. The towns a city is made of, for the `town` filter. */
421
433
  towns: (city) => request("GET", `/cities/${encodeURIComponent(String(city))}/towns`),
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.11.2";
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.11.2";
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;
@@ -1,4 +1,4 @@
1
- import type { CoverageFlag, Export, ExportRequest, Listing, NeighborhoodTown, Pagination, Transaction, TransactionAttribution, TransactionCoverage, TransactionCoverageFlag } from "./models.js";
1
+ import type { CoverageFlag, Export, ExportRequest, Listing, NeighborhoodTown, OfficialDistrict, OfficialDistrictId, Pagination, Transaction, TransactionAttribution, TransactionCoverage, TransactionCoverageFlag } from "./models.js";
2
2
  import { type ClientConfig } from "./client-config.js";
3
3
  export declare class ApiError<Status extends number = number, Body = unknown> extends Error {
4
4
  readonly status: Status;
@@ -36,6 +36,8 @@ export declare function referenceNeighborhoods(city: string, config?: Partial<Cl
36
36
  direction_id: unknown;
37
37
  town: NeighborhoodTown;
38
38
  center: unknown;
39
+ official_district_id: OfficialDistrictId;
40
+ official_districts: OfficialDistrict[];
39
41
  }[];
40
42
  }>;
41
43
  /**
@@ -410,6 +412,7 @@ export declare function marketSummary(params: {
410
412
  }[];
411
413
  top_neighborhoods: {
412
414
  neighborhood_id: number;
415
+ official_district_id: OfficialDistrictId;
413
416
  name_ar: string;
414
417
  name_en: string;
415
418
  town: NeighborhoodTown;
@@ -669,6 +672,7 @@ export declare function marketNeighborhoods(params: {
669
672
  min_sample_size: number;
670
673
  neighborhoods: {
671
674
  neighborhood_id: number;
675
+ official_district_id: OfficialDistrictId;
672
676
  name_ar: string;
673
677
  name_en: string;
674
678
  town: NeighborhoodTown;
@@ -744,6 +748,7 @@ export declare function marketCommercialRents(params: {
744
748
  }[];
745
749
  neighborhoods: {
746
750
  neighborhood_id: number;
751
+ official_district_id: OfficialDistrictId;
747
752
  name_ar: string;
748
753
  name_en: string;
749
754
  town: NeighborhoodTown;
@@ -944,6 +949,7 @@ export declare function officialRegisteredRents(params: {
944
949
  min_sample_size: number;
945
950
  cells: {
946
951
  neighborhood_id: unknown;
952
+ official_district_id: OfficialDistrictId;
947
953
  neighborhood_name_ar: string;
948
954
  neighborhood_name_en: string | null;
949
955
  town_ar: string;
@@ -1242,6 +1248,7 @@ export declare function analyticsRentalYield(params: {
1242
1248
  rent_sample_size: number;
1243
1249
  sale_sample_size: number;
1244
1250
  neighborhood_id: number;
1251
+ official_district_id: OfficialDistrictId;
1245
1252
  name_en: string | null;
1246
1253
  name_ar: string | null;
1247
1254
  town: NeighborhoodTown;
@@ -1285,6 +1292,7 @@ export declare function analyticsTrends(params: {
1285
1292
  basis: string;
1286
1293
  series: {
1287
1294
  neighborhood_id: unknown;
1295
+ official_district_id: OfficialDistrictId;
1288
1296
  name_en: string | null;
1289
1297
  name_ar: string | null;
1290
1298
  town: NeighborhoodTown;
@@ -1339,6 +1347,7 @@ export declare function analyticsNeighborhoodsCompare(params: {
1339
1347
  price_source: string;
1340
1348
  neighborhoods: {
1341
1349
  neighborhood_id: number;
1350
+ official_district_id: OfficialDistrictId;
1342
1351
  name_en: string;
1343
1352
  name_ar: string;
1344
1353
  town: NeighborhoodTown;
@@ -1451,6 +1460,7 @@ export declare function analyticsAdvertisers(params: {
1451
1460
  max_price_sar: number;
1452
1461
  top_neighborhoods: {
1453
1462
  neighborhood_id: number;
1463
+ official_district_id: OfficialDistrictId;
1454
1464
  name_ar: string;
1455
1465
  name_en: string;
1456
1466
  listings: number;
@@ -1705,6 +1715,7 @@ export declare function projectsSearch(params?: {
1705
1715
  city: string | null;
1706
1716
  city_name_en: string | null;
1707
1717
  neighborhood_id: unknown;
1718
+ official_district_id: OfficialDistrictId;
1708
1719
  neighborhood_name_ar: string | null;
1709
1720
  neighborhood_name_en: string | null;
1710
1721
  lat: number | null;
@@ -1771,6 +1782,7 @@ export declare function projectsGet(id: number, config?: Partial<ClientConfig>):
1771
1782
  city: string | null;
1772
1783
  city_name_en: string | null;
1773
1784
  neighborhood_id: unknown;
1785
+ official_district_id: OfficialDistrictId;
1774
1786
  neighborhood_name_ar: string | null;
1775
1787
  neighborhood_name_en: string | null;
1776
1788
  lat: number | null;
@@ -1920,6 +1932,7 @@ export declare function projectsUnits(id: number, params?: {
1920
1932
  city: string | null;
1921
1933
  city_name_en: string | null;
1922
1934
  neighborhood_id: unknown;
1935
+ official_district_id: OfficialDistrictId;
1923
1936
  neighborhood_name_ar: string | null;
1924
1937
  neighborhood_name_en: string | null;
1925
1938
  lat: number | null;
@@ -2048,6 +2061,7 @@ export declare function projectsUnitsSearch(params?: {
2048
2061
  city: string | null;
2049
2062
  city_name_en: string | null;
2050
2063
  neighborhood_id: unknown;
2064
+ official_district_id: OfficialDistrictId;
2051
2065
  neighborhood_name_ar: string | null;
2052
2066
  neighborhood_name_en: string | null;
2053
2067
  lat: number | null;
@@ -2221,6 +2235,7 @@ export declare function marketAbsorption(params?: {
2221
2235
  groups: {
2222
2236
  city: string | null;
2223
2237
  neighborhood_id: unknown;
2238
+ official_district_id: OfficialDistrictId;
2224
2239
  neighborhood_name_ar: string | null;
2225
2240
  neighborhood_name_en: string | null;
2226
2241
  developer: string | null;
@@ -2269,6 +2284,179 @@ export declare function marketAbsorption(params?: {
2269
2284
  }[];
2270
2285
  };
2271
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
+ }>;
2272
2460
  /**
2273
2461
  * @throws {ApiError<400, Error>}
2274
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>}
@@ -137,6 +137,7 @@ export interface Listing {
137
137
  city: string | null;
138
138
  city_name_en: string | null;
139
139
  neighborhood_id: number | null;
140
+ official_district_id: OfficialDistrictId;
140
141
  neighborhood_name_ar: string | null;
141
142
  neighborhood_name_en: string | null;
142
143
  lat: number | null;
@@ -253,6 +254,17 @@ export type NeighborhoodTown = {
253
254
  name_en: string;
254
255
  name_ar: string;
255
256
  } | null;
257
+ export interface OfficialDistrict {
258
+ id: string;
259
+ relation: "match" | "within";
260
+ name_ar: string | null;
261
+ name_en: string | null;
262
+ municipality_id: string | null;
263
+ municipality_name_ar: string | null;
264
+ municipality_name_en: string | null;
265
+ amana_id: string | null;
266
+ }
267
+ export type OfficialDistrictId = string | null;
256
268
  export interface Pagination {
257
269
  limit: number;
258
270
  next_cursor: string | null;
@@ -358,6 +370,7 @@ export interface TransactionExportFilters {
358
370
  }
359
371
  export interface TransactionNeighborhood {
360
372
  id: number;
373
+ official_district_id: OfficialDistrictId;
361
374
  name_ar: string;
362
375
  name_en: string;
363
376
  town: NeighborhoodTown;
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">;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@kite-sa/sdk",
3
- "version": "0.11.2",
3
+ "version": "0.13.0",
4
4
  "description": "Official JavaScript/TypeScript client for the Kite API: Saudi real-estate listings and market data.",
5
5
  "license": "MIT",
6
6
  "type": "module",