@kite-sa/sdk 0.9.7 → 0.9.9

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
@@ -2,6 +2,17 @@
2
2
 
3
3
  Formerly `@darak-app/sdk`, which is deprecated. Versions before 0.5.0 were published under that name.
4
4
 
5
+ ## 0.9.9
6
+
7
+ - `projects.absorption(id)` carries `sell_through`: units sold to date from the latest stock reading (units in the project, available, sold or reserved, taken off sale, the share sold) and, where a launch date is known, the average units sold a month since launch, with the launch date's basis and a reliability. `market.absorption()` groups carry it pooled.
8
+ - `projects.models(id)`: each model and `totals` carry `left_market` (units that left Sakani's list as booked in the last `left_within_days` days, default 90, and the medians of their last list prices: a booked-price proxy, not a contract price).
9
+
10
+ ## 0.9.8
11
+
12
+ - `town` on the market, registered-deal and project calls (`market.summary`, `market.commercialRents`, `market.transactions`, `market.landPrices`, `transactions.search`, `projects.search`, `projects.unitsSearch`, `projects.developers`, `market.absorption` and the other market statistics): one town of Eastern Province, Qassim or Al Ahsa, such as `{ city: "eastern_province", town: "khobar" }`.
13
+ - `reference.towns(city)` lists a city's towns (`GET /cities/{city}/towns`).
14
+ - Neighborhood `town` labels carry `slug`; `filters` echo `town`.
15
+
5
16
  ## 0.9.7
6
17
 
7
18
  - `projects.search` leaves rental compounds out by default; `kind` (`development`, `compound`, `all`) asks for them. Each project carries `kind`, and `projects.developers` no longer counts compounds.
@@ -426,6 +426,7 @@ export declare function createEndpoints(request: Request): {
426
426
  data: {
427
427
  filters: {
428
428
  city: string | null;
429
+ town: string | null;
429
430
  neighborhood_ids: unknown;
430
431
  developer: string | null;
431
432
  property_type: string | null;
@@ -474,6 +475,17 @@ export declare function createEndpoints(request: Request): {
474
475
  no_observations: number;
475
476
  };
476
477
  }[];
478
+ sell_through: {
479
+ projects_with_stock: number;
480
+ projects_with_launch: number;
481
+ units_total: unknown;
482
+ units_available: unknown;
483
+ units_gone: unknown;
484
+ sell_through_rate: number | null;
485
+ median_project_sell_through_rate: number | null;
486
+ units_gone_per_month_since_launch: number | null;
487
+ median_months_since_launch: number | null;
488
+ };
477
489
  }[];
478
490
  };
479
491
  }>;
@@ -524,6 +536,7 @@ export declare function createEndpoints(request: Request): {
524
536
  listing_type: string;
525
537
  listing_category: unknown;
526
538
  property_type: string | null;
539
+ town: string | null;
527
540
  neighborhood_ids: unknown;
528
541
  beds: unknown;
529
542
  };
@@ -614,6 +627,7 @@ export declare function createEndpoints(request: Request): {
614
627
  listing_type: string;
615
628
  listing_category: string;
616
629
  property_types: string[];
630
+ town: string | null;
617
631
  neighborhood_ids: unknown;
618
632
  area_min: unknown;
619
633
  area_max: unknown;
@@ -681,6 +695,7 @@ export declare function createEndpoints(request: Request): {
681
695
  data: {
682
696
  filters: {
683
697
  city: string;
698
+ town: string | null;
684
699
  neighborhood_ids: unknown;
685
700
  group_by: string;
686
701
  land_use: string;
@@ -763,6 +778,7 @@ export declare function createEndpoints(request: Request): {
763
778
  listing_type: string;
764
779
  listing_category: unknown;
765
780
  property_type: string | null;
781
+ town: string | null;
766
782
  neighborhood_ids: unknown;
767
783
  beds: unknown;
768
784
  };
@@ -798,6 +814,7 @@ export declare function createEndpoints(request: Request): {
798
814
  listing_type: string;
799
815
  listing_category: unknown;
800
816
  property_type: string | null;
817
+ town: string | null;
801
818
  neighborhood_ids: unknown;
802
819
  beds: unknown;
803
820
  };
@@ -847,6 +864,7 @@ export declare function createEndpoints(request: Request): {
847
864
  listing_type: string;
848
865
  listing_category: unknown;
849
866
  property_type: string | null;
867
+ town: string | null;
850
868
  neighborhood_ids: unknown;
851
869
  beds: unknown;
852
870
  };
@@ -897,6 +915,7 @@ export declare function createEndpoints(request: Request): {
897
915
  listing_type: string;
898
916
  listing_category: unknown;
899
917
  property_type: string | null;
918
+ town: string | null;
900
919
  neighborhood_ids: unknown;
901
920
  beds: unknown;
902
921
  };
@@ -928,6 +947,7 @@ export declare function createEndpoints(request: Request): {
928
947
  data: {
929
948
  filters: {
930
949
  city: string;
950
+ town: string | null;
931
951
  neighborhood_ids: unknown;
932
952
  group_by: string;
933
953
  land_use: unknown;
@@ -976,6 +996,7 @@ export declare function createEndpoints(request: Request): {
976
996
  listing_type: string;
977
997
  listing_category: unknown;
978
998
  property_type: string | null;
999
+ town: string | null;
979
1000
  neighborhood_ids: unknown;
980
1001
  beds: unknown;
981
1002
  };
@@ -1438,6 +1459,23 @@ export declare function createEndpoints(request: Request): {
1438
1459
  usable: boolean;
1439
1460
  flags: string[];
1440
1461
  }[];
1462
+ sell_through: {
1463
+ basis: unknown;
1464
+ basis_source: string | null;
1465
+ as_of: string | null;
1466
+ units_total: unknown;
1467
+ units_available: unknown;
1468
+ units_sold_or_reserved: unknown;
1469
+ units_withdrawn: unknown;
1470
+ units_gone: unknown;
1471
+ units_in_project: unknown;
1472
+ sell_through_rate: number | null;
1473
+ launch_date: string | null;
1474
+ launch_basis: unknown;
1475
+ months_since_launch: number | null;
1476
+ units_gone_per_month_since_launch: number | null;
1477
+ reliability: string;
1478
+ };
1441
1479
  };
1442
1480
  }>;
1443
1481
  /**
@@ -1630,6 +1668,18 @@ export declare function createEndpoints(request: Request): {
1630
1668
  source: string | null;
1631
1669
  as_of: string | null;
1632
1670
  };
1671
+ left_market: {
1672
+ units_booked: number;
1673
+ units_unconfirmed: number;
1674
+ median_last_price_sar: unknown;
1675
+ median_last_beneficiary_price_sar: unknown;
1676
+ median_last_price_per_sqm_sar: unknown;
1677
+ size_basis: unknown;
1678
+ units_price_cut: number;
1679
+ first_left_at: unknown;
1680
+ last_left_at: unknown;
1681
+ };
1682
+ left_within_days: number;
1633
1683
  };
1634
1684
  brochure: unknown;
1635
1685
  models: {
@@ -1662,6 +1712,17 @@ export declare function createEndpoints(request: Request): {
1662
1712
  available: unknown;
1663
1713
  };
1664
1714
  on_offer: boolean;
1715
+ left_market: {
1716
+ units_booked: number;
1717
+ units_unconfirmed: number;
1718
+ median_last_price_sar: unknown;
1719
+ median_last_beneficiary_price_sar: unknown;
1720
+ median_last_price_per_sqm_sar: unknown;
1721
+ size_basis: unknown;
1722
+ units_price_cut: number;
1723
+ first_left_at: unknown;
1724
+ last_left_at: unknown;
1725
+ };
1665
1726
  developer_model: unknown;
1666
1727
  brochure_model: unknown;
1667
1728
  first_seen_at: unknown;
@@ -1923,6 +1984,15 @@ export declare function createEndpoints(request: Request): {
1923
1984
  center: unknown;
1924
1985
  }[];
1925
1986
  }>;
1987
+ /** List towns. The towns a city is made of, for the `town` filter. */
1988
+ readonly towns: (city: string | number) => Promise<{
1989
+ data: {
1990
+ slug: string;
1991
+ name_en: string;
1992
+ name_ar: string;
1993
+ neighborhood_ids: number[];
1994
+ }[];
1995
+ }>;
1926
1996
  };
1927
1997
  readonly transactions: {
1928
1998
  /**
package/dist/generated.js CHANGED
@@ -415,6 +415,8 @@ export function createEndpoints(request) {
415
415
  limits: () => request("GET", "/limits"),
416
416
  /** List neighborhoods. Active neighborhoods in a city. */
417
417
  neighborhoods: (city) => request("GET", `/cities/${encodeURIComponent(String(city))}/neighborhoods`),
418
+ /** List towns. The towns a city is made of, for the `town` filter. */
419
+ towns: (city) => request("GET", `/cities/${encodeURIComponent(String(city))}/towns`),
418
420
  },
419
421
  transactions: {
420
422
  /**
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.9.7";
52
+ export declare const VERSION = "0.9.9";
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.9.7";
27
+ export const VERSION = "0.9.9";
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;
@@ -54,6 +54,22 @@ export declare function referenceDirections(city: string, config?: Partial<Clien
54
54
  neighborhood_ids: number[];
55
55
  }[];
56
56
  }>;
57
+ /**
58
+ * @throws {ApiError<400, Error>}
59
+ * @throws {ApiError<401, Error>}
60
+ * @throws {ApiError<403, Error>}
61
+ * @throws {ApiError<404, Error>}
62
+ * @throws {ApiError<429, Error>}
63
+ * @throws {ApiError<500, Error>}
64
+ */
65
+ export declare function referenceTowns(city: string, config?: Partial<ClientConfig>): Promise<{
66
+ data: {
67
+ slug: string;
68
+ name_en: string;
69
+ name_ar: string;
70
+ neighborhood_ids: number[];
71
+ }[];
72
+ }>;
57
73
  /**
58
74
  * @throws {ApiError<400, Error>}
59
75
  * @throws {ApiError<401, Error>}
@@ -321,6 +337,7 @@ export declare function marketSummary(params: {
321
337
  listingCategory?: "residential" | "commercial";
322
338
  propertyType?: "apartment" | "villa" | "floor" | "duplex" | "office" | "shop" | "warehouse" | "land" | "building";
323
339
  beds?: number;
340
+ town?: string;
324
341
  neighborhoodId?: number[];
325
342
  }, config?: Partial<ClientConfig>): Promise<{
326
343
  data: {
@@ -329,6 +346,7 @@ export declare function marketSummary(params: {
329
346
  listing_type: string;
330
347
  listing_category: unknown;
331
348
  property_type: string | null;
349
+ town: string | null;
332
350
  neighborhood_ids: unknown;
333
351
  beds: unknown;
334
352
  };
@@ -380,6 +398,7 @@ export declare function marketPriceDistribution(params: {
380
398
  listingCategory?: "residential" | "commercial";
381
399
  propertyType?: "apartment" | "villa" | "floor" | "duplex" | "office" | "shop" | "warehouse" | "land" | "building";
382
400
  beds?: number;
401
+ town?: string;
383
402
  neighborhoodId?: number[];
384
403
  bucketCount?: number;
385
404
  }, config?: Partial<ClientConfig>): Promise<{
@@ -389,6 +408,7 @@ export declare function marketPriceDistribution(params: {
389
408
  listing_type: string;
390
409
  listing_category: unknown;
391
410
  property_type: string | null;
411
+ town: string | null;
392
412
  neighborhood_ids: unknown;
393
413
  beds: unknown;
394
414
  };
@@ -434,6 +454,7 @@ export declare function marketAreaDistribution(params: {
434
454
  listingCategory?: "residential" | "commercial";
435
455
  propertyType?: "apartment" | "villa" | "floor" | "duplex" | "office" | "shop" | "warehouse" | "land" | "building";
436
456
  beds?: number;
457
+ town?: string;
437
458
  neighborhoodId?: number[];
438
459
  bucketCount?: number;
439
460
  }, config?: Partial<ClientConfig>): Promise<{
@@ -443,6 +464,7 @@ export declare function marketAreaDistribution(params: {
443
464
  listing_type: string;
444
465
  listing_category: unknown;
445
466
  property_type: string | null;
467
+ town: string | null;
446
468
  neighborhood_ids: unknown;
447
469
  beds: unknown;
448
470
  };
@@ -486,6 +508,7 @@ export declare function marketSupply(params: {
486
508
  listingCategory?: "residential" | "commercial";
487
509
  propertyType?: "apartment" | "villa" | "floor" | "duplex" | "office" | "shop" | "warehouse" | "land" | "building";
488
510
  beds?: number;
511
+ town?: string;
489
512
  neighborhoodId?: number[];
490
513
  }, config?: Partial<ClientConfig>): Promise<{
491
514
  data: {
@@ -494,6 +517,7 @@ export declare function marketSupply(params: {
494
517
  listing_type: string;
495
518
  listing_category: unknown;
496
519
  property_type: string | null;
520
+ town: string | null;
497
521
  neighborhood_ids: unknown;
498
522
  beds: unknown;
499
523
  };
@@ -528,6 +552,7 @@ export declare function marketVacancy(params: {
528
552
  listingCategory?: "residential" | "commercial";
529
553
  propertyType?: "apartment" | "villa" | "floor" | "duplex" | "office" | "shop" | "warehouse" | "land" | "building";
530
554
  beds?: number;
555
+ town?: string;
531
556
  neighborhoodId?: number[];
532
557
  }, config?: Partial<ClientConfig>): Promise<{
533
558
  data: {
@@ -536,6 +561,7 @@ export declare function marketVacancy(params: {
536
561
  listing_type: string;
537
562
  listing_category: unknown;
538
563
  property_type: string | null;
564
+ town: string | null;
539
565
  neighborhood_ids: unknown;
540
566
  beds: unknown;
541
567
  };
@@ -573,6 +599,7 @@ export declare function marketNeighborhoods(params: {
573
599
  listingCategory?: "residential" | "commercial";
574
600
  propertyType?: "apartment" | "villa" | "floor" | "duplex" | "office" | "shop" | "warehouse" | "land" | "building";
575
601
  beds?: number;
602
+ town?: string;
576
603
  minSampleSize?: number;
577
604
  }, config?: Partial<ClientConfig>): Promise<{
578
605
  data: {
@@ -581,6 +608,7 @@ export declare function marketNeighborhoods(params: {
581
608
  listing_type: string;
582
609
  listing_category: unknown;
583
610
  property_type: string | null;
611
+ town: string | null;
584
612
  neighborhood_ids: unknown;
585
613
  beds: unknown;
586
614
  };
@@ -619,6 +647,7 @@ export declare function marketCommercialRents(params: {
619
647
  city: string;
620
648
  propertyType?: string[];
621
649
  neighborhoodId?: number[];
650
+ town?: string;
622
651
  areaMin?: number;
623
652
  areaMax?: number;
624
653
  minSampleSize?: number;
@@ -629,6 +658,7 @@ export declare function marketCommercialRents(params: {
629
658
  listing_type: string;
630
659
  listing_category: string;
631
660
  property_types: string[];
661
+ town: string | null;
632
662
  neighborhood_ids: unknown;
633
663
  area_min: unknown;
634
664
  area_max: unknown;
@@ -1437,6 +1467,7 @@ export declare function valuationsAskingRange(params: {
1437
1467
  export declare function transactionsSearch(params: {
1438
1468
  city: string;
1439
1469
  neighborhoodId?: number[];
1470
+ town?: string;
1440
1471
  landUse?: string[];
1441
1472
  source?: string[];
1442
1473
  propertyType?: string[];
@@ -1470,6 +1501,7 @@ export declare function transactionsSearch(params: {
1470
1501
  export declare function marketTransactions(params: {
1471
1502
  city: string;
1472
1503
  neighborhoodId?: number[];
1504
+ town?: string;
1473
1505
  groupBy?: "city" | "neighborhood";
1474
1506
  landUse?: string[];
1475
1507
  propertyType?: string[];
@@ -1481,6 +1513,7 @@ export declare function marketTransactions(params: {
1481
1513
  data: {
1482
1514
  filters: {
1483
1515
  city: string;
1516
+ town: string | null;
1484
1517
  neighborhood_ids: unknown;
1485
1518
  group_by: string;
1486
1519
  land_use: unknown;
@@ -1528,6 +1561,7 @@ export declare function marketTransactions(params: {
1528
1561
  export declare function marketLandPrices(params: {
1529
1562
  city: string;
1530
1563
  neighborhoodId?: number[];
1564
+ town?: string;
1531
1565
  groupBy?: "city" | "neighborhood";
1532
1566
  landUse?: "residential" | "commercial";
1533
1567
  quarterFrom?: string;
@@ -1538,6 +1572,7 @@ export declare function marketLandPrices(params: {
1538
1572
  data: {
1539
1573
  filters: {
1540
1574
  city: string;
1575
+ town: string | null;
1541
1576
  neighborhood_ids: unknown;
1542
1577
  group_by: string;
1543
1578
  land_use: string;
@@ -1583,6 +1618,7 @@ export declare function marketLandPrices(params: {
1583
1618
  export declare function projectsSearch(params?: {
1584
1619
  city?: string;
1585
1620
  neighborhoodId?: number[];
1621
+ town?: string;
1586
1622
  developer?: string;
1587
1623
  status?: string[];
1588
1624
  projectType?: "off_plan" | "ready";
@@ -1895,6 +1931,7 @@ export declare function projectsAvailability(id: number, params?: {
1895
1931
  export declare function projectsUnitsSearch(params?: {
1896
1932
  city?: string;
1897
1933
  neighborhoodId?: number[];
1934
+ town?: string;
1898
1935
  developer?: string;
1899
1936
  status?: string[];
1900
1937
  projectType?: "off_plan" | "ready";
@@ -1967,6 +2004,7 @@ export declare function projectsUnitsSearch(params?: {
1967
2004
  */
1968
2005
  export declare function projectsDevelopers(params?: {
1969
2006
  city?: string;
2007
+ town?: string;
1970
2008
  limit?: number;
1971
2009
  cursor?: string;
1972
2010
  }, config?: Partial<ClientConfig>): Promise<{
@@ -2026,6 +2064,23 @@ export declare function projectsAbsorption(id: number, params?: {
2026
2064
  usable: boolean;
2027
2065
  flags: string[];
2028
2066
  }[];
2067
+ sell_through: {
2068
+ basis: unknown;
2069
+ basis_source: string | null;
2070
+ as_of: string | null;
2071
+ units_total: unknown;
2072
+ units_available: unknown;
2073
+ units_sold_or_reserved: unknown;
2074
+ units_withdrawn: unknown;
2075
+ units_gone: unknown;
2076
+ units_in_project: unknown;
2077
+ sell_through_rate: number | null;
2078
+ launch_date: string | null;
2079
+ launch_basis: unknown;
2080
+ months_since_launch: number | null;
2081
+ units_gone_per_month_since_launch: number | null;
2082
+ reliability: string;
2083
+ };
2029
2084
  };
2030
2085
  }>;
2031
2086
  /**
@@ -2038,6 +2093,7 @@ export declare function projectsAbsorption(id: number, params?: {
2038
2093
  export declare function marketAbsorption(params?: {
2039
2094
  city?: string;
2040
2095
  neighborhoodId?: number[];
2096
+ town?: string;
2041
2097
  developer?: string;
2042
2098
  propertyType?: "apartment" | "villa" | "floor" | "duplex" | "land" | "building" | "office" | "shop";
2043
2099
  projectType?: "off_plan" | "ready";
@@ -2050,6 +2106,7 @@ export declare function marketAbsorption(params?: {
2050
2106
  data: {
2051
2107
  filters: {
2052
2108
  city: string | null;
2109
+ town: string | null;
2053
2110
  neighborhood_ids: unknown;
2054
2111
  developer: string | null;
2055
2112
  property_type: string | null;
@@ -2098,6 +2155,17 @@ export declare function marketAbsorption(params?: {
2098
2155
  no_observations: number;
2099
2156
  };
2100
2157
  }[];
2158
+ sell_through: {
2159
+ projects_with_stock: number;
2160
+ projects_with_launch: number;
2161
+ units_total: unknown;
2162
+ units_available: unknown;
2163
+ units_gone: unknown;
2164
+ sell_through_rate: number | null;
2165
+ median_project_sell_through_rate: number | null;
2166
+ units_gone_per_month_since_launch: number | null;
2167
+ median_months_since_launch: number | null;
2168
+ };
2101
2169
  }[];
2102
2170
  };
2103
2171
  }>;
@@ -2112,6 +2180,7 @@ export declare function marketAbsorption(params?: {
2112
2180
  export declare function projectsModels(id: number, params?: {
2113
2181
  unitType?: "apartment" | "villa" | "townhouse";
2114
2182
  onOffer?: "true" | "false";
2183
+ leftWithinDays?: number;
2115
2184
  }, config?: Partial<ClientConfig>): Promise<{
2116
2185
  data: {
2117
2186
  project_id: number;
@@ -2129,6 +2198,18 @@ export declare function projectsModels(id: number, params?: {
2129
2198
  source: string | null;
2130
2199
  as_of: string | null;
2131
2200
  };
2201
+ left_market: {
2202
+ units_booked: number;
2203
+ units_unconfirmed: number;
2204
+ median_last_price_sar: unknown;
2205
+ median_last_beneficiary_price_sar: unknown;
2206
+ median_last_price_per_sqm_sar: unknown;
2207
+ size_basis: unknown;
2208
+ units_price_cut: number;
2209
+ first_left_at: unknown;
2210
+ last_left_at: unknown;
2211
+ };
2212
+ left_within_days: number;
2132
2213
  };
2133
2214
  brochure: unknown;
2134
2215
  models: {
@@ -2161,6 +2242,17 @@ export declare function projectsModels(id: number, params?: {
2161
2242
  available: unknown;
2162
2243
  };
2163
2244
  on_offer: boolean;
2245
+ left_market: {
2246
+ units_booked: number;
2247
+ units_unconfirmed: number;
2248
+ median_last_price_sar: unknown;
2249
+ median_last_beneficiary_price_sar: unknown;
2250
+ median_last_price_per_sqm_sar: unknown;
2251
+ size_basis: unknown;
2252
+ units_price_cut: number;
2253
+ first_left_at: unknown;
2254
+ last_left_at: unknown;
2255
+ };
2164
2256
  developer_model: unknown;
2165
2257
  brochure_model: unknown;
2166
2258
  first_seen_at: unknown;
@@ -102,6 +102,18 @@ export async function referenceDirections(city, config) {
102
102
  const res = await _request("GET", `/cities/${encodeURIComponent(city)}/directions`, {}, config);
103
103
  return res.json();
104
104
  }
105
+ /**
106
+ * @throws {ApiError<400, Error>}
107
+ * @throws {ApiError<401, Error>}
108
+ * @throws {ApiError<403, Error>}
109
+ * @throws {ApiError<404, Error>}
110
+ * @throws {ApiError<429, Error>}
111
+ * @throws {ApiError<500, Error>}
112
+ */
113
+ export async function referenceTowns(city, config) {
114
+ const res = await _request("GET", `/cities/${encodeURIComponent(city)}/towns`, {}, config);
115
+ return res.json();
116
+ }
105
117
  /**
106
118
  * @throws {ApiError<400, Error>}
107
119
  * @throws {ApiError<401, Error>}
@@ -445,6 +457,8 @@ export async function marketSummary(params, config) {
445
457
  searchParams.set("property_type", String(params.propertyType));
446
458
  if (params?.beds != null)
447
459
  searchParams.set("beds", String(params.beds));
460
+ if (params?.town != null)
461
+ searchParams.set("town", String(params.town));
448
462
  if (params?.neighborhoodId != null) {
449
463
  for (const v of params.neighborhoodId)
450
464
  searchParams.append("neighborhood_id", String(v));
@@ -471,6 +485,8 @@ export async function marketPriceDistribution(params, config) {
471
485
  searchParams.set("property_type", String(params.propertyType));
472
486
  if (params?.beds != null)
473
487
  searchParams.set("beds", String(params.beds));
488
+ if (params?.town != null)
489
+ searchParams.set("town", String(params.town));
474
490
  if (params?.neighborhoodId != null) {
475
491
  for (const v of params.neighborhoodId)
476
492
  searchParams.append("neighborhood_id", String(v));
@@ -499,6 +515,8 @@ export async function marketAreaDistribution(params, config) {
499
515
  searchParams.set("property_type", String(params.propertyType));
500
516
  if (params?.beds != null)
501
517
  searchParams.set("beds", String(params.beds));
518
+ if (params?.town != null)
519
+ searchParams.set("town", String(params.town));
502
520
  if (params?.neighborhoodId != null) {
503
521
  for (const v of params.neighborhoodId)
504
522
  searchParams.append("neighborhood_id", String(v));
@@ -527,6 +545,8 @@ export async function marketSupply(params, config) {
527
545
  searchParams.set("property_type", String(params.propertyType));
528
546
  if (params?.beds != null)
529
547
  searchParams.set("beds", String(params.beds));
548
+ if (params?.town != null)
549
+ searchParams.set("town", String(params.town));
530
550
  if (params?.neighborhoodId != null) {
531
551
  for (const v of params.neighborhoodId)
532
552
  searchParams.append("neighborhood_id", String(v));
@@ -553,6 +573,8 @@ export async function marketVacancy(params, config) {
553
573
  searchParams.set("property_type", String(params.propertyType));
554
574
  if (params?.beds != null)
555
575
  searchParams.set("beds", String(params.beds));
576
+ if (params?.town != null)
577
+ searchParams.set("town", String(params.town));
556
578
  if (params?.neighborhoodId != null) {
557
579
  for (const v of params.neighborhoodId)
558
580
  searchParams.append("neighborhood_id", String(v));
@@ -579,6 +601,8 @@ export async function marketNeighborhoods(params, config) {
579
601
  searchParams.set("property_type", String(params.propertyType));
580
602
  if (params?.beds != null)
581
603
  searchParams.set("beds", String(params.beds));
604
+ if (params?.town != null)
605
+ searchParams.set("town", String(params.town));
582
606
  if (params?.minSampleSize != null)
583
607
  searchParams.set("min_sample_size", String(params.minSampleSize));
584
608
  const res = await _request("GET", "/market/neighborhoods", { searchParams }, config);
@@ -603,6 +627,8 @@ export async function marketCommercialRents(params, config) {
603
627
  for (const v of params.neighborhoodId)
604
628
  searchParams.append("neighborhood_id", String(v));
605
629
  }
630
+ if (params?.town != null)
631
+ searchParams.set("town", String(params.town));
606
632
  if (params?.areaMin != null)
607
633
  searchParams.set("area_min", String(params.areaMin));
608
634
  if (params?.areaMax != null)
@@ -1087,6 +1113,8 @@ export async function transactionsSearch(params, config) {
1087
1113
  for (const v of params.neighborhoodId)
1088
1114
  searchParams.append("neighborhood_id", String(v));
1089
1115
  }
1116
+ if (params?.town != null)
1117
+ searchParams.set("town", String(params.town));
1090
1118
  if (params?.landUse != null) {
1091
1119
  for (const v of params.landUse)
1092
1120
  searchParams.append("land_use", String(v));
@@ -1141,6 +1169,8 @@ export async function marketTransactions(params, config) {
1141
1169
  for (const v of params.neighborhoodId)
1142
1170
  searchParams.append("neighborhood_id", String(v));
1143
1171
  }
1172
+ if (params?.town != null)
1173
+ searchParams.set("town", String(params.town));
1144
1174
  if (params?.groupBy != null)
1145
1175
  searchParams.set("group_by", String(params.groupBy));
1146
1176
  if (params?.landUse != null) {
@@ -1177,6 +1207,8 @@ export async function marketLandPrices(params, config) {
1177
1207
  for (const v of params.neighborhoodId)
1178
1208
  searchParams.append("neighborhood_id", String(v));
1179
1209
  }
1210
+ if (params?.town != null)
1211
+ searchParams.set("town", String(params.town));
1180
1212
  if (params?.groupBy != null)
1181
1213
  searchParams.set("group_by", String(params.groupBy));
1182
1214
  if (params?.landUse != null)
@@ -1207,6 +1239,8 @@ export async function projectsSearch(params, config) {
1207
1239
  for (const v of params.neighborhoodId)
1208
1240
  searchParams.append("neighborhood_id", String(v));
1209
1241
  }
1242
+ if (params?.town != null)
1243
+ searchParams.set("town", String(params.town));
1210
1244
  if (params?.developer != null)
1211
1245
  searchParams.set("developer", String(params.developer));
1212
1246
  if (params?.status != null) {
@@ -1345,6 +1379,8 @@ export async function projectsUnitsSearch(params, config) {
1345
1379
  for (const v of params.neighborhoodId)
1346
1380
  searchParams.append("neighborhood_id", String(v));
1347
1381
  }
1382
+ if (params?.town != null)
1383
+ searchParams.set("town", String(params.town));
1348
1384
  if (params?.developer != null)
1349
1385
  searchParams.set("developer", String(params.developer));
1350
1386
  if (params?.status != null) {
@@ -1409,6 +1445,8 @@ export async function projectsDevelopers(params, config) {
1409
1445
  const searchParams = new URLSearchParams();
1410
1446
  if (params?.city != null)
1411
1447
  searchParams.set("city", String(params.city));
1448
+ if (params?.town != null)
1449
+ searchParams.set("town", String(params.town));
1412
1450
  if (params?.limit != null)
1413
1451
  searchParams.set("limit", String(params.limit));
1414
1452
  if (params?.cursor != null)
@@ -1450,6 +1488,8 @@ export async function marketAbsorption(params, config) {
1450
1488
  for (const v of params.neighborhoodId)
1451
1489
  searchParams.append("neighborhood_id", String(v));
1452
1490
  }
1491
+ if (params?.town != null)
1492
+ searchParams.set("town", String(params.town));
1453
1493
  if (params?.developer != null)
1454
1494
  searchParams.set("developer", String(params.developer));
1455
1495
  if (params?.propertyType != null)
@@ -1483,6 +1523,8 @@ export async function projectsModels(id, params, config) {
1483
1523
  searchParams.set("unit_type", String(params.unitType));
1484
1524
  if (params?.onOffer != null)
1485
1525
  searchParams.set("on_offer", String(params.onOffer));
1526
+ if (params?.leftWithinDays != null)
1527
+ searchParams.set("left_within_days", String(params.leftWithinDays));
1486
1528
  const res = await _request("GET", `/projects/${encodeURIComponent(id)}/models`, { searchParams }, config);
1487
1529
  return res.json();
1488
1530
  }
@@ -234,6 +234,7 @@ export interface ListingPlot {
234
234
  };
235
235
  }
236
236
  export type NeighborhoodTown = {
237
+ slug: string;
237
238
  name_en: string;
238
239
  name_ar: string;
239
240
  } | null;
package/dist/openapi.d.ts CHANGED
@@ -36,6 +36,16 @@ export interface operations {
36
36
  };
37
37
  };
38
38
  };
39
+ "reference.towns": {
40
+ parameters: Record<never, never>;
41
+ responses: {
42
+ 200: {
43
+ content: {
44
+ "application/json": Awaited<ReturnType<typeof import("./openapi-zod/client.js").referenceTowns>>;
45
+ };
46
+ };
47
+ };
48
+ };
39
49
  "reference.enums": {
40
50
  parameters: Record<never, never>;
41
51
  responses: {
@@ -136,7 +146,7 @@ export interface operations {
136
146
  };
137
147
  "market.summary": {
138
148
  parameters: {
139
- query?: Pick<SnakeKeys<NonNullable<Parameters<typeof import("./openapi-zod/client.js").marketSummary>[0]>>, "city" | "listing_type" | "listing_category" | "property_type" | "beds" | "neighborhood_id">;
149
+ query?: Pick<SnakeKeys<NonNullable<Parameters<typeof import("./openapi-zod/client.js").marketSummary>[0]>>, "city" | "listing_type" | "listing_category" | "property_type" | "beds" | "town" | "neighborhood_id">;
140
150
  };
141
151
  responses: {
142
152
  200: {
@@ -148,7 +158,7 @@ export interface operations {
148
158
  };
149
159
  "market.price_distribution": {
150
160
  parameters: {
151
- query?: Pick<SnakeKeys<NonNullable<Parameters<typeof import("./openapi-zod/client.js").marketPriceDistribution>[0]>>, "city" | "listing_type" | "listing_category" | "property_type" | "beds" | "neighborhood_id" | "bucket_count">;
161
+ query?: Pick<SnakeKeys<NonNullable<Parameters<typeof import("./openapi-zod/client.js").marketPriceDistribution>[0]>>, "city" | "listing_type" | "listing_category" | "property_type" | "beds" | "town" | "neighborhood_id" | "bucket_count">;
152
162
  };
153
163
  responses: {
154
164
  200: {
@@ -160,7 +170,7 @@ export interface operations {
160
170
  };
161
171
  "market.area_distribution": {
162
172
  parameters: {
163
- query?: Pick<SnakeKeys<NonNullable<Parameters<typeof import("./openapi-zod/client.js").marketAreaDistribution>[0]>>, "city" | "listing_type" | "listing_category" | "property_type" | "beds" | "neighborhood_id" | "bucket_count">;
173
+ query?: Pick<SnakeKeys<NonNullable<Parameters<typeof import("./openapi-zod/client.js").marketAreaDistribution>[0]>>, "city" | "listing_type" | "listing_category" | "property_type" | "beds" | "town" | "neighborhood_id" | "bucket_count">;
164
174
  };
165
175
  responses: {
166
176
  200: {
@@ -172,7 +182,7 @@ export interface operations {
172
182
  };
173
183
  "market.supply": {
174
184
  parameters: {
175
- query?: Pick<SnakeKeys<NonNullable<Parameters<typeof import("./openapi-zod/client.js").marketSupply>[0]>>, "city" | "listing_type" | "listing_category" | "property_type" | "beds" | "neighborhood_id">;
185
+ query?: Pick<SnakeKeys<NonNullable<Parameters<typeof import("./openapi-zod/client.js").marketSupply>[0]>>, "city" | "listing_type" | "listing_category" | "property_type" | "beds" | "town" | "neighborhood_id">;
176
186
  };
177
187
  responses: {
178
188
  200: {
@@ -184,7 +194,7 @@ export interface operations {
184
194
  };
185
195
  "market.vacancy": {
186
196
  parameters: {
187
- query?: Pick<SnakeKeys<NonNullable<Parameters<typeof import("./openapi-zod/client.js").marketVacancy>[0]>>, "city" | "listing_type" | "listing_category" | "property_type" | "beds" | "neighborhood_id">;
197
+ query?: Pick<SnakeKeys<NonNullable<Parameters<typeof import("./openapi-zod/client.js").marketVacancy>[0]>>, "city" | "listing_type" | "listing_category" | "property_type" | "beds" | "town" | "neighborhood_id">;
188
198
  };
189
199
  responses: {
190
200
  200: {
@@ -196,7 +206,7 @@ export interface operations {
196
206
  };
197
207
  "market.neighborhoods": {
198
208
  parameters: {
199
- query?: Pick<SnakeKeys<NonNullable<Parameters<typeof import("./openapi-zod/client.js").marketNeighborhoods>[0]>>, "city" | "listing_type" | "listing_category" | "property_type" | "beds" | "min_sample_size">;
209
+ query?: Pick<SnakeKeys<NonNullable<Parameters<typeof import("./openapi-zod/client.js").marketNeighborhoods>[0]>>, "city" | "listing_type" | "listing_category" | "property_type" | "beds" | "town" | "min_sample_size">;
200
210
  };
201
211
  responses: {
202
212
  200: {
@@ -208,7 +218,7 @@ export interface operations {
208
218
  };
209
219
  "market.commercial_rents": {
210
220
  parameters: {
211
- query?: Pick<SnakeKeys<NonNullable<Parameters<typeof import("./openapi-zod/client.js").marketCommercialRents>[0]>>, "city" | "property_type" | "neighborhood_id" | "area_min" | "area_max" | "min_sample_size">;
221
+ query?: Pick<SnakeKeys<NonNullable<Parameters<typeof import("./openapi-zod/client.js").marketCommercialRents>[0]>>, "city" | "property_type" | "neighborhood_id" | "town" | "area_min" | "area_max" | "min_sample_size">;
212
222
  };
213
223
  responses: {
214
224
  200: {
@@ -396,7 +406,7 @@ export interface operations {
396
406
  };
397
407
  "transactions.search": {
398
408
  parameters: {
399
- query?: Pick<SnakeKeys<NonNullable<Parameters<typeof import("./openapi-zod/client.js").transactionsSearch>[0]>>, "city" | "neighborhood_id" | "land_use" | "source" | "property_type" | "market_sales_only" | "month_from" | "month_to" | "price_min" | "price_max" | "area_min" | "area_max" | "price_per_sqm_min" | "price_per_sqm_max" | "sort" | "limit" | "cursor">;
409
+ query?: Pick<SnakeKeys<NonNullable<Parameters<typeof import("./openapi-zod/client.js").transactionsSearch>[0]>>, "city" | "neighborhood_id" | "town" | "land_use" | "source" | "property_type" | "market_sales_only" | "month_from" | "month_to" | "price_min" | "price_max" | "area_min" | "area_max" | "price_per_sqm_min" | "price_per_sqm_max" | "sort" | "limit" | "cursor">;
400
410
  };
401
411
  responses: {
402
412
  200: {
@@ -408,7 +418,7 @@ export interface operations {
408
418
  };
409
419
  "market.transactions": {
410
420
  parameters: {
411
- query?: Pick<SnakeKeys<NonNullable<Parameters<typeof import("./openapi-zod/client.js").marketTransactions>[0]>>, "city" | "neighborhood_id" | "group_by" | "land_use" | "property_type" | "quarter_from" | "quarter_to" | "min_sample_size" | "include_token_prices">;
421
+ query?: Pick<SnakeKeys<NonNullable<Parameters<typeof import("./openapi-zod/client.js").marketTransactions>[0]>>, "city" | "neighborhood_id" | "town" | "group_by" | "land_use" | "property_type" | "quarter_from" | "quarter_to" | "min_sample_size" | "include_token_prices">;
412
422
  };
413
423
  responses: {
414
424
  200: {
@@ -420,7 +430,7 @@ export interface operations {
420
430
  };
421
431
  "market.land_prices": {
422
432
  parameters: {
423
- query?: Pick<SnakeKeys<NonNullable<Parameters<typeof import("./openapi-zod/client.js").marketLandPrices>[0]>>, "city" | "neighborhood_id" | "group_by" | "land_use" | "quarter_from" | "quarter_to" | "min_sample_size" | "include_token_prices">;
433
+ query?: Pick<SnakeKeys<NonNullable<Parameters<typeof import("./openapi-zod/client.js").marketLandPrices>[0]>>, "city" | "neighborhood_id" | "town" | "group_by" | "land_use" | "quarter_from" | "quarter_to" | "min_sample_size" | "include_token_prices">;
424
434
  };
425
435
  responses: {
426
436
  200: {
@@ -432,7 +442,7 @@ export interface operations {
432
442
  };
433
443
  "projects.search": {
434
444
  parameters: {
435
- query?: Pick<SnakeKeys<NonNullable<Parameters<typeof import("./openapi-zod/client.js").projectsSearch>[0]>>, "city" | "neighborhood_id" | "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" | "sort" | "limit" | "cursor">;
436
446
  };
437
447
  responses: {
438
448
  200: {
@@ -478,7 +488,7 @@ export interface operations {
478
488
  };
479
489
  "projects.units_search": {
480
490
  parameters: {
481
- query?: Pick<SnakeKeys<NonNullable<Parameters<typeof import("./openapi-zod/client.js").projectsUnitsSearch>[0]>>, "city" | "neighborhood_id" | "developer" | "status" | "project_type" | "listing_category" | "features" | "banks" | "kind" | "listing_type" | "property_type" | "bedrooms" | "bedrooms_min" | "bedrooms_max" | "bathrooms" | "bathrooms_min" | "price_min" | "price_max" | "area_min" | "area_max" | "sort" | "limit" | "cursor">;
491
+ query?: Pick<SnakeKeys<NonNullable<Parameters<typeof import("./openapi-zod/client.js").projectsUnitsSearch>[0]>>, "city" | "neighborhood_id" | "town" | "developer" | "status" | "project_type" | "listing_category" | "features" | "banks" | "kind" | "listing_type" | "property_type" | "bedrooms" | "bedrooms_min" | "bedrooms_max" | "bathrooms" | "bathrooms_min" | "price_min" | "price_max" | "area_min" | "area_max" | "sort" | "limit" | "cursor">;
482
492
  };
483
493
  responses: {
484
494
  200: {
@@ -490,7 +500,7 @@ export interface operations {
490
500
  };
491
501
  "projects.developers": {
492
502
  parameters: {
493
- query?: Pick<SnakeKeys<NonNullable<Parameters<typeof import("./openapi-zod/client.js").projectsDevelopers>[0]>>, "city" | "limit" | "cursor">;
503
+ query?: Pick<SnakeKeys<NonNullable<Parameters<typeof import("./openapi-zod/client.js").projectsDevelopers>[0]>>, "city" | "town" | "limit" | "cursor">;
494
504
  };
495
505
  responses: {
496
506
  200: {
@@ -514,7 +524,7 @@ export interface operations {
514
524
  };
515
525
  "market.absorption": {
516
526
  parameters: {
517
- query?: Pick<SnakeKeys<NonNullable<Parameters<typeof import("./openapi-zod/client.js").marketAbsorption>[0]>>, "city" | "neighborhood_id" | "developer" | "property_type" | "project_type" | "listing_type" | "group_by" | "from" | "to" | "min_sample_size">;
527
+ query?: Pick<SnakeKeys<NonNullable<Parameters<typeof import("./openapi-zod/client.js").marketAbsorption>[0]>>, "city" | "neighborhood_id" | "town" | "developer" | "property_type" | "project_type" | "listing_type" | "group_by" | "from" | "to" | "min_sample_size">;
518
528
  };
519
529
  responses: {
520
530
  200: {
@@ -526,7 +536,7 @@ export interface operations {
526
536
  };
527
537
  "projects.models": {
528
538
  parameters: {
529
- query?: Pick<SnakeKeys<NonNullable<Parameters<typeof import("./openapi-zod/client.js").projectsModels>[1]>>, "unit_type" | "on_offer">;
539
+ query?: Pick<SnakeKeys<NonNullable<Parameters<typeof import("./openapi-zod/client.js").projectsModels>[1]>>, "unit_type" | "on_offer" | "left_within_days">;
530
540
  };
531
541
  responses: {
532
542
  200: {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@kite-sa/sdk",
3
- "version": "0.9.7",
3
+ "version": "0.9.9",
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",