diff --git a/src/internal/client.ts b/src/internal/client.ts index bd8e8cd..e1a0643 100644 --- a/src/internal/client.ts +++ b/src/internal/client.ts @@ -131,8 +131,7 @@ function integerOrUndefined(value: unknown): number | undefined { /** Whether a `fetch` failure happened while connecting, before the request was sent. */ function failedBeforeSend(error: unknown): boolean { const cause = (error as { cause?: unknown } | null)?.cause as - | { code?: unknown; errors?: unknown } - | undefined; + { code?: unknown; errors?: unknown } | undefined; if (!cause) return false; if (typeof cause.code === "string") return NOT_SENT_CODES.has(cause.code); // Happy-eyeballs connects fail with an AggregateError of one error per address. diff --git a/src/internal/exceptions.ts b/src/internal/exceptions.ts index cee4411..07dce3d 100644 --- a/src/internal/exceptions.ts +++ b/src/internal/exceptions.ts @@ -140,14 +140,7 @@ export class ValidationError extends ScrapeBadgerError { /** Why the Web Scraping API reported a target as blocked (SCR-306). */ export type BlockKind = - | "antibot" - | "captcha" - | "rate_limit" - | "ip_ban" - | "geo_block" - | "auth_wall" - | "empty" - | "other"; + "antibot" | "captcha" | "rate_limit" | "ip_ban" | "geo_block" | "auth_wall" | "empty" | "other"; /** The CAPTCHA gating a blocked page. */ export interface BlockingCaptcha { diff --git a/src/naver/client.ts b/src/naver/client.ts index c05c385..0e83061 100644 --- a/src/naver/client.ts +++ b/src/naver/client.ts @@ -101,6 +101,34 @@ export class NaverClient { return this._gen.request("/v1/naver/blog", { params }); } + /** Cafe search. Generated from the OpenAPI spec; returns the raw response object. */ + async cafeSearch( + params: Record = {} + ): Promise> { + return this._gen.request("/v1/naver/cafe", { params }); + } + + /** Clip search. Generated from the OpenAPI spec; returns the raw response object. */ + async clipSearch( + params: Record = {} + ): Promise> { + return this._gen.request("/v1/naver/clip", { params }); + } + + /** Image search. Generated from the OpenAPI spec; returns the raw response object. */ + async imageSearch( + params: Record = {} + ): Promise> { + return this._gen.request("/v1/naver/image", { params }); + } + + /** Knowledge iN search. Generated from the OpenAPI spec; returns the raw response object. */ + async knowledgeInSearch( + params: Record = {} + ): Promise> { + return this._gen.request("/v1/naver/kin", { params }); + } + /** Naver Place/Local search. Generated from the OpenAPI spec; returns the raw response object. */ async naverPlaceLocalSearch( params: Record = {} @@ -123,6 +151,14 @@ export class NaverClient { return this._gen.request(`/v1/naver/place/${placeId}`, { params }); } + /** Get place photos. Generated from the OpenAPI spec; returns the raw response object. */ + async getPlacePhotos( + placeId: string, + params: Record = {} + ): Promise> { + return this._gen.request(`/v1/naver/place/${placeId}/photos`, { params }); + } + /** Naver place visitor reviews. Generated from the OpenAPI spec; returns the raw response object. */ async naverPlaceVisitorReviews( placeId: string, @@ -131,6 +167,79 @@ export class NaverClient { return this._gen.request(`/v1/naver/place/${placeId}/reviews`, { params }); } + /** Get group review summary. Generated from the OpenAPI spec; returns the raw response object. */ + async getGroupReviewSummary( + groupProductNo: string, + params: Record = {} + ): Promise> { + return this._gen.request(`/v1/naver/product-groups/${groupProductNo}/review-summary`, { + params, + }); + } + + /** Get product group. Generated from the OpenAPI spec; returns the raw response object. */ + async getProductGroup( + originProductNo: string, + params: Record = {} + ): Promise> { + return this._gen.request(`/v1/naver/products/${originProductNo}/group`, { params }); + } + + /** List product Q&A. Generated from the OpenAPI spec; returns the raw response object. */ + async listProductQA( + originProductNo: string, + params: Record = {} + ): Promise> { + return this._gen.request(`/v1/naver/products/${originProductNo}/qnas`, { params }); + } + + /** Get product review summary. Generated from the OpenAPI spec; returns the raw response object. */ + async getProductReviewSummary( + originProductNo: string, + params: Record = {} + ): Promise> { + return this._gen.request(`/v1/naver/products/${originProductNo}/review-summary`, { params }); + } + + /** List product reviews. Generated from the OpenAPI spec; returns the raw response object. */ + async listProductReviews( + originProductNo: string, + params: Record = {} + ): Promise> { + return this._gen.request(`/v1/naver/products/${originProductNo}/reviews`, { params }); + } + + /** Get product detail. Generated from the OpenAPI spec; returns the raw response object. */ + async getProductDetail( + productNo: string, + params: Record = {} + ): Promise> { + return this._gen.request(`/v1/naver/products/${productNo}`, { params }); + } + + /** Get review video key. Generated from the OpenAPI spec; returns the raw response object. */ + async getReviewVideoKey( + params: Record = {} + ): Promise> { + return this._gen.request("/v1/naver/reviews/video-inkey", { params }); + } + + /** Get review detail. Generated from the OpenAPI spec; returns the raw response object. */ + async getReviewDetail( + reviewId: string, + params: Record = {} + ): Promise> { + return this._gen.request(`/v1/naver/reviews/${reviewId}`, { params }); + } + + /** Get review page data. Generated from the OpenAPI spec; returns the raw response object. */ + async getReviewPageData( + reviewId: string, + params: Record = {} + ): Promise> { + return this._gen.request(`/v1/naver/reviews/${reviewId}/ssr-queries`, { params }); + } + /** Naver web search. Generated from the OpenAPI spec; returns the raw response object. */ async naverWebSearch( params: Record = {} @@ -138,6 +247,13 @@ export class NaverClient { return this._gen.request("/v1/naver/search", { params }); } + /** Web vertical search. Generated from the OpenAPI spec; returns the raw response object. */ + async webVerticalSearch( + params: Record = {} + ): Promise> { + return this._gen.request("/v1/naver/search/web", { params }); + } + /** Naver Shopping bestseller rankings. Generated from the OpenAPI spec; returns the raw response object. */ async naverShoppingBestsellerRankings( params: Record = {} @@ -145,6 +261,20 @@ export class NaverClient { return this._gen.request("/v1/naver/shopping/bestsellers", { params }); } + /** Shopping brand categories. Generated from the OpenAPI spec; returns the raw response object. */ + async shoppingBrandCategories( + params: Record = {} + ): Promise> { + return this._gen.request("/v1/naver/shopping/brand-categories", { params }); + } + + /** Shopping brand rankings. Generated from the OpenAPI spec; returns the raw response object. */ + async shoppingBrandRankings( + params: Record = {} + ): Promise> { + return this._gen.request("/v1/naver/shopping/brand-rank", { params }); + } + /** Naver Shopping category reference. Generated from the OpenAPI spec; returns the raw response object. */ async naverShoppingCategoryReference( params: Record = {} @@ -152,6 +282,20 @@ export class NaverClient { return this._gen.request("/v1/naver/shopping/categories", { params }); } + /** Shopping category tree. Generated from the OpenAPI spec; returns the raw response object. */ + async shoppingCategoryTree( + params: Record = {} + ): Promise> { + return this._gen.request("/v1/naver/shopping/category-tree", { params }); + } + + /** Shopping deals. Generated from the OpenAPI spec; returns the raw response object. */ + async shoppingDeals( + params: Record = {} + ): Promise> { + return this._gen.request("/v1/naver/shopping/deals", { params }); + } + /** Naver DataLab shopping keyword insight. Generated from the OpenAPI spec; returns the raw response object. */ async naverDatalabShoppingKeywordInsight( params: Record = {} @@ -159,11 +303,217 @@ export class NaverClient { return this._gen.request("/v1/naver/shopping/insight", { params }); } + /** Shopping IT items. Generated from the OpenAPI spec; returns the raw response object. */ + async shoppingItItems( + params: Record = {} + ): Promise> { + return this._gen.request("/v1/naver/shopping/it-items", { params }); + } + + /** Shopping keyword periods. Generated from the OpenAPI spec; returns the raw response object. */ + async shoppingKeywordPeriods( + params: Record = {} + ): Promise> { + return this._gen.request("/v1/naver/shopping/keyword-periods", { params }); + } + /** Naver Shopping trending keyword rankings. Generated from the OpenAPI spec; returns the raw response object. */ async naverShoppingTrendingKeywordRankings( params: Record = {} ): Promise> { return this._gen.request("/v1/naver/shopping/keywords", { params }); } + + /** Get live broadcast. Generated from the OpenAPI spec; returns the raw response object. */ + async getLiveBroadcast( + broadcastId: string, + params: Record = {} + ): Promise> { + return this._gen.request(`/v1/naver/shopping/live/broadcasts/${broadcastId}`, { params }); + } + + /** Get live broadcast counts. Generated from the OpenAPI spec; returns the raw response object. */ + async getLiveBroadcastCounts( + broadcastId: string, + params: Record = {} + ): Promise> { + return this._gen.request(`/v1/naver/shopping/live/broadcasts/${broadcastId}/counts`, { + params, + }); + } + + /** List live broadcast product categories. Generated from the OpenAPI spec; returns the raw response object. */ + async listLiveBroadcastProductCategories( + broadcastId: string, + params: Record = {} + ): Promise> { + return this._gen.request( + `/v1/naver/shopping/live/broadcasts/${broadcastId}/product-categories`, + { params } + ); + } + + /** List live broadcast products. Generated from the OpenAPI spec; returns the raw response object. */ + async listLiveBroadcastProducts( + broadcastId: string, + params: Record = {} + ): Promise> { + return this._gen.request(`/v1/naver/shopping/live/broadcasts/${broadcastId}/products`, { + params, + }); + } + + /** List live replay products. Generated from the OpenAPI spec; returns the raw response object. */ + async listLiveReplayProducts( + broadcastId: string, + params: Record = {} + ): Promise> { + return this._gen.request(`/v1/naver/shopping/live/broadcasts/${broadcastId}/replay-products`, { + params, + }); + } + + /** Get live channel. Generated from the OpenAPI spec; returns the raw response object. */ + async getLiveChannel( + channelId: string, + params: Record = {} + ): Promise> { + return this._gen.request(`/v1/naver/shopping/live/channels/${channelId}`, { params }); + } + + /** List live channel broadcasts. Generated from the OpenAPI spec; returns the raw response object. */ + async listLiveChannelBroadcasts( + channelId: string, + params: Record = {} + ): Promise> { + return this._gen.request(`/v1/naver/shopping/live/channels/${channelId}/broadcasts`, { + params, + }); + } + + /** List live channel products. Generated from the OpenAPI spec; returns the raw response object. */ + async listLiveChannelProducts( + channelId: string, + params: Record = {} + ): Promise> { + return this._gen.request(`/v1/naver/shopping/live/channels/${channelId}/products`, { params }); + } + + /** List live channel shortclips. Generated from the OpenAPI spec; returns the raw response object. */ + async listLiveChannelShortclips( + channelId: string, + params: Record = {} + ): Promise> { + return this._gen.request(`/v1/naver/shopping/live/channels/${channelId}/shortclips`, { + params, + }); + } + + /** Shopping Live keyword rankings. Generated from the OpenAPI spec; returns the raw response object. */ + async shoppingLiveKeywordRankings( + params: Record = {} + ): Promise> { + return this._gen.request("/v1/naver/shopping/live/search/keywords", { params }); + } + + /** Get live shortclip. Generated from the OpenAPI spec; returns the raw response object. */ + async getLiveShortclip( + shortclipId: string, + params: Record = {} + ): Promise> { + return this._gen.request(`/v1/naver/shopping/live/shortclips/${shortclipId}`, { params }); + } + + /** List live shortclip products. Generated from the OpenAPI spec; returns the raw response object. */ + async listLiveShortclipProducts( + shortclipId: string, + params: Record = {} + ): Promise> { + return this._gen.request(`/v1/naver/shopping/live/shortclips/${shortclipId}/products`, { + params, + }); + } + + /** Shopping price compare. Generated from the OpenAPI spec; returns the raw response object. */ + async shoppingPriceCompare( + params: Record = {} + ): Promise> { + return this._gen.request("/v1/naver/shopping/price-compare", { params }); + } + + /** Shopping catalog search. Generated from the OpenAPI spec; returns the raw response object. */ + async shoppingCatalogSearch( + params: Record = {} + ): Promise> { + return this._gen.request("/v1/naver/shopping/search-catalog", { params }); + } + + /** Shopping filtered search. Generated from the OpenAPI spec; returns the raw response object. */ + async shoppingFilteredSearch( + params: Record = {} + ): Promise> { + return this._gen.request("/v1/naver/shopping/search-filtered", { params }); + } + + /** Shopping search filters. Generated from the OpenAPI spec; returns the raw response object. */ + async shoppingSearchFilters( + params: Record = {} + ): Promise> { + return this._gen.request("/v1/naver/shopping/search-filters", { params }); + } + + /** Shopping product search. Generated from the OpenAPI spec; returns the raw response object. */ + async shoppingProductSearch( + params: Record = {} + ): Promise> { + return this._gen.request("/v1/naver/shopping/search-products", { params }); + } + + /** Shopping vertical. Generated from the OpenAPI spec; returns the raw response object. */ + async shoppingVertical( + vertical: string, + params: Record = {} + ): Promise> { + return this._gen.request(`/v1/naver/shopping/verticals/${vertical}`, { params }); + } + + /** Get store profile. Generated from the OpenAPI spec; returns the raw response object. */ + async getStoreProfile( + storeUrl: string, + params: Record = {} + ): Promise> { + return this._gen.request(`/v1/naver/stores/${storeUrl}`, { params }); + } + + /** Get store bestsellers. Generated from the OpenAPI spec; returns the raw response object. */ + async getStoreBestsellers( + storeUrl: string, + params: Record = {} + ): Promise> { + return this._gen.request(`/v1/naver/stores/${storeUrl}/bestsellers`, { params }); + } + + /** Get store categories. Generated from the OpenAPI spec; returns the raw response object. */ + async getStoreCategories( + storeUrl: string, + params: Record = {} + ): Promise> { + return this._gen.request(`/v1/naver/stores/${storeUrl}/categories`, { params }); + } + + /** Get store products. Generated from the OpenAPI spec; returns the raw response object. */ + async getStoreProducts( + storeUrl: string, + params: Record = {} + ): Promise> { + return this._gen.request(`/v1/naver/stores/${storeUrl}/products`, { params }); + } + + /** Video search. Generated from the OpenAPI spec; returns the raw response object. */ + async videoSearch( + params: Record = {} + ): Promise> { + return this._gen.request("/v1/naver/video", { params }); + } // --- END generated by sdk/codegen/facade --- } diff --git a/src/wallapop/types.ts b/src/wallapop/types.ts index c691966..fe03fbf 100644 --- a/src/wallapop/types.ts +++ b/src/wallapop/types.ts @@ -545,11 +545,7 @@ export interface WallapopMarketsResponse { /** Sort order for /search. */ export type WallapopOrderBy = - | "most_relevance" - | "newest" - | "closest" - | "price_low_to_high" - | "price_high_to_low"; + "most_relevance" | "newest" | "closest" | "price_low_to_high" | "price_high_to_low"; /** Listing-age window for /search. */ export type WallapopTimeFilter = "today" | "lastWeek" | "lastMonth";