@kite-sa/sdk 0.9.15 → 0.9.16

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,12 @@
2
2
 
3
3
  Formerly `@darak-app/sdk`, which is deprecated. Versions before 0.5.0 were published under that name.
4
4
 
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
+
7
+ ## 0.9.16
8
+
9
+ - `projects.absorption` returns `average_since_launch` (Sakani's booked units per unit type ÷ months since sales began, an average over the whole life of the sales, never an observed month, with `launch_basis`, the observed change in the booked count and `flags`) and `neighborhood_deeds` (home sale deeds registered in the project's neighbourhood by month over the last 24 full months). `projects.models` returns `totals.average_since_launch`. `sell_through.launch_basis` can be `"sales_start_date"`.
10
+
5
11
  ## 0.9.15
6
12
 
7
13
  - Webhook project events `project.withdrawn_from_sale` (a project's units taken off sale with few of them booked: not a sell-out) and `project.returned_to_sale` (a withdrawn project with units on sale again), typed (`WebhookProjectWithdrawnFromSaleEvent`, `WebhookProjectReturnedToSaleEvent`) and accepted by `parseWebhookEvent`.
@@ -1447,6 +1447,36 @@ export declare function createEndpoints(request: Request): {
1447
1447
  usable_months: number;
1448
1448
  units_gone_per_month: number | null;
1449
1449
  months_of_stock: number | null;
1450
+ average_since_launch: {
1451
+ source: string | null;
1452
+ as_of: string | null;
1453
+ launch_date: string | null;
1454
+ launch_basis: unknown;
1455
+ months_since_launch: number | null;
1456
+ first_unit_listed: string | null;
1457
+ units_booked: unknown;
1458
+ units_available: unknown;
1459
+ units_released: unknown;
1460
+ units_in_project: unknown;
1461
+ units_booked_per_month: number | null;
1462
+ units_booked_per_month_since_first_unit: number | null;
1463
+ by_unit_type: {
1464
+ unit_type: string;
1465
+ units_booked: number;
1466
+ units_available: number;
1467
+ units_booked_per_month: number | null;
1468
+ observed_units_booked_change: unknown;
1469
+ }[];
1470
+ observed: {
1471
+ from: string | null;
1472
+ to: string | null;
1473
+ days: unknown;
1474
+ units_booked_change: unknown;
1475
+ units_booked_per_month: number | null;
1476
+ };
1477
+ reliability: string;
1478
+ flags: string[];
1479
+ };
1450
1480
  months: {
1451
1481
  month: string;
1452
1482
  window_start: string | null;
@@ -1483,6 +1513,7 @@ export declare function createEndpoints(request: Request): {
1483
1513
  units_gone_per_month_since_launch: number | null;
1484
1514
  reliability: string;
1485
1515
  };
1516
+ neighborhood_deeds: unknown;
1486
1517
  };
1487
1518
  }>;
1488
1519
  /**
@@ -1675,6 +1706,36 @@ export declare function createEndpoints(request: Request): {
1675
1706
  source: string | null;
1676
1707
  as_of: string | null;
1677
1708
  };
1709
+ average_since_launch: {
1710
+ source: string | null;
1711
+ as_of: string | null;
1712
+ launch_date: string | null;
1713
+ launch_basis: unknown;
1714
+ months_since_launch: number | null;
1715
+ first_unit_listed: string | null;
1716
+ units_booked: unknown;
1717
+ units_available: unknown;
1718
+ units_released: unknown;
1719
+ units_in_project: unknown;
1720
+ units_booked_per_month: number | null;
1721
+ units_booked_per_month_since_first_unit: number | null;
1722
+ by_unit_type: {
1723
+ unit_type: string;
1724
+ units_booked: number;
1725
+ units_available: number;
1726
+ units_booked_per_month: number | null;
1727
+ observed_units_booked_change: unknown;
1728
+ }[];
1729
+ observed: {
1730
+ from: string | null;
1731
+ to: string | null;
1732
+ days: unknown;
1733
+ units_booked_change: unknown;
1734
+ units_booked_per_month: number | null;
1735
+ };
1736
+ reliability: string;
1737
+ flags: string[];
1738
+ };
1678
1739
  left_market: {
1679
1740
  units_booked: number;
1680
1741
  units_unconfirmed: number;
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.15";
52
+ export declare const VERSION = "0.9.16";
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.15";
27
+ export const VERSION = "0.9.16";
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;
@@ -2060,6 +2060,36 @@ export declare function projectsAbsorption(id: number, params?: {
2060
2060
  usable_months: number;
2061
2061
  units_gone_per_month: number | null;
2062
2062
  months_of_stock: number | null;
2063
+ average_since_launch: {
2064
+ source: string | null;
2065
+ as_of: string | null;
2066
+ launch_date: string | null;
2067
+ launch_basis: unknown;
2068
+ months_since_launch: number | null;
2069
+ first_unit_listed: string | null;
2070
+ units_booked: unknown;
2071
+ units_available: unknown;
2072
+ units_released: unknown;
2073
+ units_in_project: unknown;
2074
+ units_booked_per_month: number | null;
2075
+ units_booked_per_month_since_first_unit: number | null;
2076
+ by_unit_type: {
2077
+ unit_type: string;
2078
+ units_booked: number;
2079
+ units_available: number;
2080
+ units_booked_per_month: number | null;
2081
+ observed_units_booked_change: unknown;
2082
+ }[];
2083
+ observed: {
2084
+ from: string | null;
2085
+ to: string | null;
2086
+ days: unknown;
2087
+ units_booked_change: unknown;
2088
+ units_booked_per_month: number | null;
2089
+ };
2090
+ reliability: string;
2091
+ flags: string[];
2092
+ };
2063
2093
  months: {
2064
2094
  month: string;
2065
2095
  window_start: string | null;
@@ -2096,6 +2126,7 @@ export declare function projectsAbsorption(id: number, params?: {
2096
2126
  units_gone_per_month_since_launch: number | null;
2097
2127
  reliability: string;
2098
2128
  };
2129
+ neighborhood_deeds: unknown;
2099
2130
  };
2100
2131
  }>;
2101
2132
  /**
@@ -2213,6 +2244,36 @@ export declare function projectsModels(id: number, params?: {
2213
2244
  source: string | null;
2214
2245
  as_of: string | null;
2215
2246
  };
2247
+ average_since_launch: {
2248
+ source: string | null;
2249
+ as_of: string | null;
2250
+ launch_date: string | null;
2251
+ launch_basis: unknown;
2252
+ months_since_launch: number | null;
2253
+ first_unit_listed: string | null;
2254
+ units_booked: unknown;
2255
+ units_available: unknown;
2256
+ units_released: unknown;
2257
+ units_in_project: unknown;
2258
+ units_booked_per_month: number | null;
2259
+ units_booked_per_month_since_first_unit: number | null;
2260
+ by_unit_type: {
2261
+ unit_type: string;
2262
+ units_booked: number;
2263
+ units_available: number;
2264
+ units_booked_per_month: number | null;
2265
+ observed_units_booked_change: unknown;
2266
+ }[];
2267
+ observed: {
2268
+ from: string | null;
2269
+ to: string | null;
2270
+ days: unknown;
2271
+ units_booked_change: unknown;
2272
+ units_booked_per_month: number | null;
2273
+ };
2274
+ reliability: string;
2275
+ flags: string[];
2276
+ };
2216
2277
  left_market: {
2217
2278
  units_booked: number;
2218
2279
  units_unconfirmed: number;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@kite-sa/sdk",
3
- "version": "0.9.15",
3
+ "version": "0.9.16",
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",