@kite-sa/sdk 0.9.5 → 0.9.7
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 +11 -0
- package/dist/generated.d.ts +13 -0
- package/dist/index.d.ts +1 -1
- package/dist/index.js +1 -1
- package/dist/openapi-zod/client.d.ts +16 -0
- package/dist/openapi-zod/client.js +8 -0
- package/dist/openapi.d.ts +2 -2
- package/package.json +1 -1
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.7
|
|
6
|
+
|
|
7
|
+
- `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.
|
|
8
|
+
- A project's `price` carries `basis` (`source`, `duplicate`, `linked_listings`) and `listing_count`. Where no copy of a project publishes a price, the price is read from its linked active sale listings (`basis` `linked_listings`); a compound has no price. `projects.search` takes `price_basis`, and its price filters and sort read the served price whatever its basis.
|
|
9
|
+
- `projects.unitsSearch` takes `kind` (default `all`).
|
|
10
|
+
|
|
11
|
+
## 0.9.6
|
|
12
|
+
|
|
13
|
+
- `projects.models(id)` totals carry `phase`: the whole phase's units, units available and the source's own booked count on its latest stock reading, with the reading's source and day. `totals.units` stays the sum over the models listed, which is not the phase's size once a model has sold out.
|
|
14
|
+
- `status` and `price` descriptions say a `sold_out` phase usually has no asking price; no shape change.
|
|
15
|
+
|
|
5
16
|
## 0.9.5
|
|
6
17
|
|
|
7
18
|
- `projects.models(id)` returns brochure specs: each model's `brochure_model` (plot and built-up area, floor areas, rooms and parking as the developer's sales brochure prints them, where the pairing was reviewed) and the project's `brochure` (finishes and warranties).
|
package/dist/generated.d.ts
CHANGED
|
@@ -1511,6 +1511,7 @@ export declare function createEndpoints(request: Request): {
|
|
|
1511
1511
|
status: unknown;
|
|
1512
1512
|
project_type: unknown;
|
|
1513
1513
|
listing_category: string;
|
|
1514
|
+
kind: string;
|
|
1514
1515
|
location: {
|
|
1515
1516
|
city: string | null;
|
|
1516
1517
|
city_name_en: string | null;
|
|
@@ -1526,6 +1527,8 @@ export declare function createEndpoints(request: Request): {
|
|
|
1526
1527
|
from_sar: unknown;
|
|
1527
1528
|
to_sar: unknown;
|
|
1528
1529
|
source: string | null;
|
|
1530
|
+
basis: unknown;
|
|
1531
|
+
listing_count: unknown;
|
|
1529
1532
|
};
|
|
1530
1533
|
area_sqm: {
|
|
1531
1534
|
min: number | null;
|
|
@@ -1620,6 +1623,13 @@ export declare function createEndpoints(request: Request): {
|
|
|
1620
1623
|
models_on_offer: number;
|
|
1621
1624
|
units: unknown;
|
|
1622
1625
|
units_available: unknown;
|
|
1626
|
+
phase: {
|
|
1627
|
+
units: unknown;
|
|
1628
|
+
units_available: unknown;
|
|
1629
|
+
units_booked: unknown;
|
|
1630
|
+
source: string | null;
|
|
1631
|
+
as_of: string | null;
|
|
1632
|
+
};
|
|
1623
1633
|
};
|
|
1624
1634
|
brochure: unknown;
|
|
1625
1635
|
models: {
|
|
@@ -1674,6 +1684,7 @@ export declare function createEndpoints(request: Request): {
|
|
|
1674
1684
|
status: unknown;
|
|
1675
1685
|
project_type: unknown;
|
|
1676
1686
|
listing_category: string;
|
|
1687
|
+
kind: string;
|
|
1677
1688
|
location: {
|
|
1678
1689
|
city: string | null;
|
|
1679
1690
|
city_name_en: string | null;
|
|
@@ -1689,6 +1700,8 @@ export declare function createEndpoints(request: Request): {
|
|
|
1689
1700
|
from_sar: unknown;
|
|
1690
1701
|
to_sar: unknown;
|
|
1691
1702
|
source: string | null;
|
|
1703
|
+
basis: unknown;
|
|
1704
|
+
listing_count: unknown;
|
|
1692
1705
|
};
|
|
1693
1706
|
area_sqm: {
|
|
1694
1707
|
min: number | null;
|
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.
|
|
52
|
+
export declare const VERSION = "0.9.7";
|
|
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.
|
|
27
|
+
export const VERSION = "0.9.7";
|
|
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;
|
|
@@ -1589,6 +1589,8 @@ export declare function projectsSearch(params?: {
|
|
|
1589
1589
|
listingCategory?: "residential" | "commercial";
|
|
1590
1590
|
features?: string[];
|
|
1591
1591
|
banks?: string[];
|
|
1592
|
+
kind?: "development" | "compound" | "all";
|
|
1593
|
+
priceBasis?: string[];
|
|
1592
1594
|
q?: string;
|
|
1593
1595
|
priceMin?: number;
|
|
1594
1596
|
priceMax?: number;
|
|
@@ -1608,6 +1610,7 @@ export declare function projectsSearch(params?: {
|
|
|
1608
1610
|
status: unknown;
|
|
1609
1611
|
project_type: unknown;
|
|
1610
1612
|
listing_category: string;
|
|
1613
|
+
kind: string;
|
|
1611
1614
|
location: {
|
|
1612
1615
|
city: string | null;
|
|
1613
1616
|
city_name_en: string | null;
|
|
@@ -1623,6 +1626,8 @@ export declare function projectsSearch(params?: {
|
|
|
1623
1626
|
from_sar: unknown;
|
|
1624
1627
|
to_sar: unknown;
|
|
1625
1628
|
source: string | null;
|
|
1629
|
+
basis: unknown;
|
|
1630
|
+
listing_count: unknown;
|
|
1626
1631
|
};
|
|
1627
1632
|
area_sqm: {
|
|
1628
1633
|
min: number | null;
|
|
@@ -1666,6 +1671,7 @@ export declare function projectsGet(id: number, config?: Partial<ClientConfig>):
|
|
|
1666
1671
|
status: unknown;
|
|
1667
1672
|
project_type: unknown;
|
|
1668
1673
|
listing_category: string;
|
|
1674
|
+
kind: string;
|
|
1669
1675
|
location: {
|
|
1670
1676
|
city: string | null;
|
|
1671
1677
|
city_name_en: string | null;
|
|
@@ -1681,6 +1687,8 @@ export declare function projectsGet(id: number, config?: Partial<ClientConfig>):
|
|
|
1681
1687
|
from_sar: unknown;
|
|
1682
1688
|
to_sar: unknown;
|
|
1683
1689
|
source: string | null;
|
|
1690
|
+
basis: unknown;
|
|
1691
|
+
listing_count: unknown;
|
|
1684
1692
|
};
|
|
1685
1693
|
area_sqm: {
|
|
1686
1694
|
min: number | null;
|
|
@@ -1893,6 +1901,7 @@ export declare function projectsUnitsSearch(params?: {
|
|
|
1893
1901
|
listingCategory?: "residential" | "commercial";
|
|
1894
1902
|
features?: string[];
|
|
1895
1903
|
banks?: string[];
|
|
1904
|
+
kind?: "development" | "compound" | "all";
|
|
1896
1905
|
listingType?: "sale" | "rent";
|
|
1897
1906
|
propertyType?: string[];
|
|
1898
1907
|
bedrooms?: number;
|
|
@@ -2113,6 +2122,13 @@ export declare function projectsModels(id: number, params?: {
|
|
|
2113
2122
|
models_on_offer: number;
|
|
2114
2123
|
units: unknown;
|
|
2115
2124
|
units_available: unknown;
|
|
2125
|
+
phase: {
|
|
2126
|
+
units: unknown;
|
|
2127
|
+
units_available: unknown;
|
|
2128
|
+
units_booked: unknown;
|
|
2129
|
+
source: string | null;
|
|
2130
|
+
as_of: string | null;
|
|
2131
|
+
};
|
|
2116
2132
|
};
|
|
2117
2133
|
brochure: unknown;
|
|
2118
2134
|
models: {
|
|
@@ -1225,6 +1225,12 @@ export async function projectsSearch(params, config) {
|
|
|
1225
1225
|
for (const v of params.banks)
|
|
1226
1226
|
searchParams.append("banks", String(v));
|
|
1227
1227
|
}
|
|
1228
|
+
if (params?.kind != null)
|
|
1229
|
+
searchParams.set("kind", String(params.kind));
|
|
1230
|
+
if (params?.priceBasis != null) {
|
|
1231
|
+
for (const v of params.priceBasis)
|
|
1232
|
+
searchParams.append("price_basis", String(v));
|
|
1233
|
+
}
|
|
1228
1234
|
if (params?.q != null)
|
|
1229
1235
|
searchParams.set("q", String(params.q));
|
|
1230
1236
|
if (params?.priceMin != null)
|
|
@@ -1357,6 +1363,8 @@ export async function projectsUnitsSearch(params, config) {
|
|
|
1357
1363
|
for (const v of params.banks)
|
|
1358
1364
|
searchParams.append("banks", String(v));
|
|
1359
1365
|
}
|
|
1366
|
+
if (params?.kind != null)
|
|
1367
|
+
searchParams.set("kind", String(params.kind));
|
|
1360
1368
|
if (params?.listingType != null)
|
|
1361
1369
|
searchParams.set("listing_type", String(params.listingType));
|
|
1362
1370
|
if (params?.propertyType != null) {
|
package/dist/openapi.d.ts
CHANGED
|
@@ -432,7 +432,7 @@ export interface operations {
|
|
|
432
432
|
};
|
|
433
433
|
"projects.search": {
|
|
434
434
|
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" | "q" | "price_min" | "price_max" | "handover_from" | "handover_to" | "licensed" | "sort" | "limit" | "cursor">;
|
|
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">;
|
|
436
436
|
};
|
|
437
437
|
responses: {
|
|
438
438
|
200: {
|
|
@@ -478,7 +478,7 @@ export interface operations {
|
|
|
478
478
|
};
|
|
479
479
|
"projects.units_search": {
|
|
480
480
|
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" | "listing_type" | "property_type" | "bedrooms" | "bedrooms_min" | "bedrooms_max" | "bathrooms" | "bathrooms_min" | "price_min" | "price_max" | "area_min" | "area_max" | "sort" | "limit" | "cursor">;
|
|
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">;
|
|
482
482
|
};
|
|
483
483
|
responses: {
|
|
484
484
|
200: {
|