@kite-sa/sdk 0.9.8 → 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,11 @@
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
+
5
10
  ## 0.9.8
6
11
 
7
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" }`.
@@ -475,6 +475,17 @@ export declare function createEndpoints(request: Request): {
475
475
  no_observations: number;
476
476
  };
477
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
+ };
478
489
  }[];
479
490
  };
480
491
  }>;
@@ -1448,6 +1459,23 @@ export declare function createEndpoints(request: Request): {
1448
1459
  usable: boolean;
1449
1460
  flags: string[];
1450
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
+ };
1451
1479
  };
1452
1480
  }>;
1453
1481
  /**
@@ -1640,6 +1668,18 @@ export declare function createEndpoints(request: Request): {
1640
1668
  source: string | null;
1641
1669
  as_of: string | null;
1642
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;
1643
1683
  };
1644
1684
  brochure: unknown;
1645
1685
  models: {
@@ -1672,6 +1712,17 @@ export declare function createEndpoints(request: Request): {
1672
1712
  available: unknown;
1673
1713
  };
1674
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
+ };
1675
1726
  developer_model: unknown;
1676
1727
  brochure_model: unknown;
1677
1728
  first_seen_at: unknown;
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.8";
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.8";
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;
@@ -2064,6 +2064,23 @@ export declare function projectsAbsorption(id: number, params?: {
2064
2064
  usable: boolean;
2065
2065
  flags: string[];
2066
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
+ };
2067
2084
  };
2068
2085
  }>;
2069
2086
  /**
@@ -2138,6 +2155,17 @@ export declare function marketAbsorption(params?: {
2138
2155
  no_observations: number;
2139
2156
  };
2140
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
+ };
2141
2169
  }[];
2142
2170
  };
2143
2171
  }>;
@@ -2152,6 +2180,7 @@ export declare function marketAbsorption(params?: {
2152
2180
  export declare function projectsModels(id: number, params?: {
2153
2181
  unitType?: "apartment" | "villa" | "townhouse";
2154
2182
  onOffer?: "true" | "false";
2183
+ leftWithinDays?: number;
2155
2184
  }, config?: Partial<ClientConfig>): Promise<{
2156
2185
  data: {
2157
2186
  project_id: number;
@@ -2169,6 +2198,18 @@ export declare function projectsModels(id: number, params?: {
2169
2198
  source: string | null;
2170
2199
  as_of: string | null;
2171
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;
2172
2213
  };
2173
2214
  brochure: unknown;
2174
2215
  models: {
@@ -2201,6 +2242,17 @@ export declare function projectsModels(id: number, params?: {
2201
2242
  available: unknown;
2202
2243
  };
2203
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
+ };
2204
2256
  developer_model: unknown;
2205
2257
  brochure_model: unknown;
2206
2258
  first_seen_at: unknown;
@@ -1523,6 +1523,8 @@ export async function projectsModels(id, params, config) {
1523
1523
  searchParams.set("unit_type", String(params.unitType));
1524
1524
  if (params?.onOffer != null)
1525
1525
  searchParams.set("on_offer", String(params.onOffer));
1526
+ if (params?.leftWithinDays != null)
1527
+ searchParams.set("left_within_days", String(params.leftWithinDays));
1526
1528
  const res = await _request("GET", `/projects/${encodeURIComponent(id)}/models`, { searchParams }, config);
1527
1529
  return res.json();
1528
1530
  }
package/dist/openapi.d.ts CHANGED
@@ -536,7 +536,7 @@ export interface operations {
536
536
  };
537
537
  "projects.models": {
538
538
  parameters: {
539
- 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">;
540
540
  };
541
541
  responses: {
542
542
  200: {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@kite-sa/sdk",
3
- "version": "0.9.8",
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",