Skip to content

Commit ac1797c

Browse files
author
scrapebadger-bot
committed
chore: regenerate SDK from OpenAPI spec
1 parent 0c6fecb commit ac1797c

69 files changed

Lines changed: 975 additions & 721 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

package-lock.json

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/account/client.ts

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
/**
2+
* Account API client. // --- generated by sdk/codegen/facade — do not edit ---
3+
*/
4+
5+
import type { BaseClient } from "../internal/client.js";
6+
7+
/** Client for all Account API operations. (Generated from the OpenAPI spec.) */
8+
export class AccountClient {
9+
private readonly client: BaseClient;
10+
11+
constructor(client: BaseClient) {
12+
this.client = client;
13+
}
14+
15+
/** Get account info. Generated from the OpenAPI spec; returns the raw response object. */
16+
async getAccountInfo(
17+
params: Record<string, string | number | boolean | undefined> = {}
18+
): Promise<Record<string, unknown>> {
19+
return this.client.request("/v1/account/me", { params });
20+
}
21+
}

src/amazon/listings.ts

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -41,9 +41,7 @@ export class ListingsClient {
4141
* @param options - Optional parameters (domain, category, page).
4242
* @returns Bestsellers response with ranked products and pagination.
4343
*/
44-
async bestsellers(
45-
options: AmazonListingsParams = {}
46-
): Promise<BestsellersResponse> {
44+
async bestsellers(options: AmazonListingsParams = {}): Promise<BestsellersResponse> {
4745
return this.client.request<BestsellersResponse>("/v1/amazon/bestsellers", {
4846
params: {
4947
domain: options.domain,
@@ -59,9 +57,7 @@ export class ListingsClient {
5957
* @param options - Optional parameters (domain, category, page).
6058
* @returns New-releases response with ranked products and pagination.
6159
*/
62-
async newReleases(
63-
options: AmazonListingsParams = {}
64-
): Promise<NewReleasesResponse> {
60+
async newReleases(options: AmazonListingsParams = {}): Promise<NewReleasesResponse> {
6561
return this.client.request<NewReleasesResponse>("/v1/amazon/new-releases", {
6662
params: {
6763
domain: options.domain,

src/amazon/products.ts

Lines changed: 23 additions & 39 deletions
Original file line numberDiff line numberDiff line change
@@ -45,20 +45,14 @@ export class ProductsClient {
4545
* @returns Product detail including variants, badges, buybox, and related products.
4646
* @throws NotFoundError - If the product doesn't exist.
4747
*/
48-
async get(
49-
asin: string,
50-
options: AmazonProductParams = {}
51-
): Promise<ProductDetailResponse> {
52-
return this.client.request<ProductDetailResponse>(
53-
`/v1/amazon/products/${asin}`,
54-
{
55-
params: {
56-
domain: options.domain,
57-
zip: options.zip,
58-
language: options.language,
59-
},
60-
}
61-
);
48+
async get(asin: string, options: AmazonProductParams = {}): Promise<ProductDetailResponse> {
49+
return this.client.request<ProductDetailResponse>(`/v1/amazon/products/${asin}`, {
50+
params: {
51+
domain: options.domain,
52+
zip: options.zip,
53+
language: options.language,
54+
},
55+
});
6256
}
6357

6458
/**
@@ -68,14 +62,10 @@ export class ProductsClient {
6862
* @param options - Optional parameters (domain, zip).
6963
* @returns Offers response with the buybox winner and full offer list.
7064
*/
71-
async offers(
72-
asin: string,
73-
options: AmazonOffersParams = {}
74-
): Promise<OffersResponse> {
75-
return this.client.request<OffersResponse>(
76-
`/v1/amazon/products/${asin}/offers`,
77-
{ params: { domain: options.domain, zip: options.zip } }
78-
);
65+
async offers(asin: string, options: AmazonOffersParams = {}): Promise<OffersResponse> {
66+
return this.client.request<OffersResponse>(`/v1/amazon/products/${asin}/offers`, {
67+
params: { domain: options.domain, zip: options.zip },
68+
});
7969
}
8070

8171
/**
@@ -85,22 +75,16 @@ export class ProductsClient {
8575
* @param options - Optional parameters (domain, page, sort_by, star, verified_only, media_only).
8676
* @returns Reviews response with reviews, aggregate rating, and breakdown.
8777
*/
88-
async reviews(
89-
asin: string,
90-
options: AmazonReviewsParams = {}
91-
): Promise<ReviewsResponse> {
92-
return this.client.request<ReviewsResponse>(
93-
`/v1/amazon/products/${asin}/reviews`,
94-
{
95-
params: {
96-
domain: options.domain,
97-
page: options.page,
98-
sort_by: options.sort_by,
99-
star: options.star,
100-
verified_only: options.verified_only,
101-
media_only: options.media_only,
102-
},
103-
}
104-
);
78+
async reviews(asin: string, options: AmazonReviewsParams = {}): Promise<ReviewsResponse> {
79+
return this.client.request<ReviewsResponse>(`/v1/amazon/products/${asin}/reviews`, {
80+
params: {
81+
domain: options.domain,
82+
page: options.page,
83+
sort_by: options.sort_by,
84+
star: options.star,
85+
verified_only: options.verified_only,
86+
media_only: options.media_only,
87+
},
88+
});
10589
}
10690
}

src/amazon/sellers.ts

Lines changed: 10 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -41,14 +41,10 @@ export class SellersClient {
4141
* @returns Seller profile response.
4242
* @throws NotFoundError - If the seller doesn't exist.
4343
*/
44-
async get(
45-
sellerId: string,
46-
options: AmazonSellerParams = {}
47-
): Promise<SellerProfileResponse> {
48-
return this.client.request<SellerProfileResponse>(
49-
`/v1/amazon/sellers/${sellerId}`,
50-
{ params: { domain: options.domain } }
51-
);
44+
async get(sellerId: string, options: AmazonSellerParams = {}): Promise<SellerProfileResponse> {
45+
return this.client.request<SellerProfileResponse>(`/v1/amazon/sellers/${sellerId}`, {
46+
params: { domain: options.domain },
47+
});
5248
}
5349

5450
/**
@@ -62,10 +58,9 @@ export class SellersClient {
6258
sellerId: string,
6359
options: AmazonSellerListParams = {}
6460
): Promise<SellerProductsResponse> {
65-
return this.client.request<SellerProductsResponse>(
66-
`/v1/amazon/sellers/${sellerId}/products`,
67-
{ params: { domain: options.domain, page: options.page } }
68-
);
61+
return this.client.request<SellerProductsResponse>(`/v1/amazon/sellers/${sellerId}/products`, {
62+
params: { domain: options.domain, page: options.page },
63+
});
6964
}
7065

7166
/**
@@ -79,9 +74,8 @@ export class SellersClient {
7974
sellerId: string,
8075
options: AmazonSellerListParams = {}
8176
): Promise<SellerFeedbackResponse> {
82-
return this.client.request<SellerFeedbackResponse>(
83-
`/v1/amazon/sellers/${sellerId}/feedback`,
84-
{ params: { domain: options.domain, page: options.page } }
85-
);
77+
return this.client.request<SellerFeedbackResponse>(`/v1/amazon/sellers/${sellerId}/feedback`, {
78+
params: { domain: options.domain, page: options.page },
79+
});
8680
}
8781
}

src/apartments/client.ts

Lines changed: 13 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -67,18 +67,26 @@ export class ApartmentsClient {
6767
* latter is the site's raw `data-maxrent`, roughly double the advertised
6868
* rent.
6969
*/
70-
async getProperty(
71-
url?: string,
72-
params: ApartmentsPropertyParams = {},
73-
): Promise<Property> {
70+
async getProperty(url?: string, params: ApartmentsPropertyParams = {}): Promise<Property> {
7471
if (url) {
7572
return this.client.request<Property>("/v1/apartments/property", { params: { url } });
7673
}
7774
if (params.slug && params.propertyId) {
7875
return this.client.request<Property>(
79-
`/v1/apartments/properties/${params.slug}/${params.propertyId}`,
76+
`/v1/apartments/properties/${params.slug}/${params.propertyId}`
8077
);
8178
}
8279
throw new Error("Provide either url, or both slug and propertyId");
8380
}
81+
82+
// --- generated by sdk/codegen/facade — do not edit ---
83+
84+
/** Get property detail by slug + id. Generated from the OpenAPI spec; returns the raw response object. */
85+
async getPropertyDetailBySlugId(
86+
slug: string,
87+
propertyId: string,
88+
params: Record<string, string | number | boolean | undefined> = {}
89+
): Promise<Record<string, unknown>> {
90+
return this.client.request(`/v1/apartments/properties/${slug}/${propertyId}`, { params });
91+
}
8492
}

src/apartments/types.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,6 @@ export interface FloorPlan {
5858
units_available: number;
5959
}
6060

61-
6261
/** A school from the property's Schools section (GreatSchools data). */
6362
export interface School {
6463
name: string | null;

src/bing/media.ts

Lines changed: 2 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -38,10 +38,7 @@ export class MediaClient {
3838
* @returns Full-size image URLs, thumbnails, pixel dimensions and the
3939
* source page each image came from.
4040
*/
41-
async images(
42-
query: string,
43-
params: BingImagesParams = {},
44-
): Promise<BingImagesResponse> {
41+
async images(query: string, params: BingImagesParams = {}): Promise<BingImagesResponse> {
4542
return this.client.request<BingImagesResponse>("/v1/bing/images", {
4643
params: {
4744
query,
@@ -59,10 +56,7 @@ export class MediaClient {
5956
* @param params - Optional market, count and safe-search filter.
6057
* @returns Video URLs, thumbnails, duration, publisher and view counts.
6158
*/
62-
async videos(
63-
query: string,
64-
params: BingVideosParams = {},
65-
): Promise<BingVideosResponse> {
59+
async videos(query: string, params: BingVideosParams = {}): Promise<BingVideosResponse> {
6660
return this.client.request<BingVideosResponse>("/v1/bing/videos", {
6761
params: {
6862
query,

src/bing/news.ts

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -30,10 +30,7 @@ export class NewsClient {
3030
* @param params - Optional market and freshness (`"day"`, `"week"`, `"month"`).
3131
* @returns Articles carrying publisher, publish dates and real URLs.
3232
*/
33-
async news(
34-
query: string,
35-
params: BingNewsParams = {},
36-
): Promise<BingNewsResponse> {
33+
async news(query: string, params: BingNewsParams = {}): Promise<BingNewsResponse> {
3734
return this.client.request<BingNewsResponse>("/v1/bing/news", {
3835
params: {
3936
query,

src/bing/search.ts

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -37,10 +37,7 @@ export class SearchClient {
3737
* @param params - Optional market, count, offset and safe-search filter.
3838
* @returns A page of organic results, ads and related searches.
3939
*/
40-
async search(
41-
query: string,
42-
params: BingSearchParams = {},
43-
): Promise<BingSearchResponse> {
40+
async search(query: string, params: BingSearchParams = {}): Promise<BingSearchResponse> {
4441
return this.client.request<BingSearchResponse>("/v1/bing/search", {
4542
params: {
4643
query,
@@ -60,7 +57,7 @@ export class SearchClient {
6057
*/
6158
async autocomplete(
6259
query: string,
63-
params: BingAutocompleteParams = {},
60+
params: BingAutocompleteParams = {}
6461
): Promise<BingAutocompleteResponse> {
6562
return this.client.request<BingAutocompleteResponse>("/v1/bing/autocomplete", {
6663
params: {

0 commit comments

Comments
 (0)