Skip to content

Commit

Permalink
feat: productlistquery
Browse files Browse the repository at this point in the history
  • Loading branch information
Razz21 committed Jan 23, 2024
1 parent 4e727be commit bb739f6
Show file tree
Hide file tree
Showing 2 changed files with 36 additions and 9 deletions.
28 changes: 28 additions & 0 deletions packages/api-client/src/api/products/productsList.ts
Original file line number Diff line number Diff line change
Expand Up @@ -80,6 +80,34 @@ export default `
}
}
}
... on ConfigurableProduct {
variants {
product {
uid
sku
name
only_x_left_in_stock
price_range {
minimum_price {
final_price {
currency
value
}
regular_price {
currency
value
}
}
}
thumbnail {
url
position
disabled
label
}
}
}
}
}
page_info {
current_page
Expand Down
17 changes: 8 additions & 9 deletions packages/api-types/src/Schema.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8133,20 +8133,19 @@ export type ProductsListQueryVariables = Exact<{

export type ProductsListQuery = {
products?: {
total_count?: number | null | undefined, aggregations?: Array<{ attribute_code: string, label?: string | null | undefined, options?: Array<{ label?: string | null | undefined, value: string, count?: number | null | undefined } | null | undefined> | null | undefined } | null | undefined> | null | undefined, items?: Array<{
uid: string, sku?: string | null | undefined, name?: string | null | undefined, stock_status?: ProductStockStatus | null | undefined, only_x_left_in_stock?: number | null | undefined, rating_summary: number, url_key?: string | null | undefined, review_count: number, thumbnail?: { url?: string | null | undefined, position?: number | null | undefined, disabled?: boolean | null | undefined, label?: string | null | undefined } | null | undefined, url_rewrites?: Array<{ url?: string | null | undefined } | null | undefined> | null | undefined, price_range: { maximum_price?: { final_price: { currency?: CurrencyEnum | null | undefined, value?: number | null | undefined }, regular_price: { currency?: CurrencyEnum | null | undefined, value?: number | null | undefined } } | null | undefined, minimum_price: { final_price: { currency?: CurrencyEnum | null | undefined, value?: number | null | undefined }, regular_price: { currency?: CurrencyEnum | null | undefined, value?: number | null | undefined } } }, categories?: Array<{ uid: string, name?: string | null | undefined, url_suffix?: string | null | undefined, url_path?: string | null | undefined, breadcrumbs?: Array<{ category_name?: string | null | undefined, category_url_path?: string | null | undefined } | null | undefined> | null | undefined } | null | undefined> | null | undefined, reviews: { items: Array<{ average_rating: number, ratings_breakdown: Array<{ name: string, value: string } | null | undefined> } | null | undefined> }
total_count?: number | null, aggregations?: Array<{ attribute_code: string, label?: string | null, options?: Array<{ label?: string | null, value: string, count?: number | null } | null> | null } | null> | null, items?: Array<{
__typename: 'BundleProduct', uid: string, sku?: string | null, name?: string | null, stock_status?: ProductStockStatus | null, only_x_left_in_stock?: number | null, rating_summary: number, url_key?: string | null, review_count: number, thumbnail?: { url?: string | null, position?: number | null, disabled?: boolean | null, label?: string | null } | null, url_rewrites?: Array<{ url?: string | null } | null> | null, price_range: { maximum_price?: { final_price: { currency?: CurrencyEnum | null, value?: number | null }, regular_price: { currency?: CurrencyEnum | null, value?: number | null } } | null, minimum_price: { final_price: { currency?: CurrencyEnum | null, value?: number | null }, regular_price: { currency?: CurrencyEnum | null, value?: number | null } } }, categories?: Array<{ uid: string, name?: string | null, url_suffix?: string | null, url_path?: string | null, breadcrumbs?: Array<{ category_name?: string | null, category_url_path?: string | null } | null> | null } | null> | null, reviews: { items: Array<{ average_rating: number, ratings_breakdown: Array<{ name: string, value: string } | null> } | null> }
} | {
uid: string, sku?: string | null | undefined, name?: string | null | undefined, stock_status?: ProductStockStatus | null | undefined, only_x_left_in_stock?: number | null | undefined, rating_summary: number, url_key?: string | null | undefined, review_count: number, thumbnail?: { url?: string | null | undefined, position?: number | null | undefined, disabled?: boolean | null | undefined, label?: string | null | undefined } | null | undefined, url_rewrites?: Array<{ url?: string | null | undefined } | null | undefined> | null | undefined, price_range: { maximum_price?: { final_price: { currency?: CurrencyEnum | null | undefined, value?: number | null | undefined }, regular_price: { currency?: CurrencyEnum | null | undefined, value?: number | null | undefined } } | null | undefined, minimum_price: { final_price: { currency?: CurrencyEnum | null | undefined, value?: number | null | undefined }, regular_price: { currency?: CurrencyEnum | null | undefined, value?: number | null | undefined } } }, categories?: Array<{ uid: string, name?: string | null | undefined, url_suffix?: string | null | undefined, url_path?: string | null | undefined, breadcrumbs?: Array<{ category_name?: string | null | undefined, category_url_path?: string | null | undefined } | null | undefined> | null | undefined } | null | undefined> | null | undefined, reviews: { items: Array<{ average_rating: number, ratings_breakdown: Array<{ name: string, value: string } | null | undefined> } | null | undefined> }
__typename: 'ConfigurableProduct', uid: string, sku?: string | null, name?: string | null, stock_status?: ProductStockStatus | null, only_x_left_in_stock?: number | null, rating_summary: number, url_key?: string | null, review_count: number, variants?: Array<{ product?: { name?: string | null, only_x_left_in_stock?: number | null, uid: string, sku?: string | null, price_range: { minimum_price: { final_price: { currency?: CurrencyEnum | null, value?: number | null }, regular_price: { currency?: CurrencyEnum | null, value?: number | null } } }, thumbnail?: { url?: string | null, position?: number | null, disabled?: boolean | null, label?: string | null } | null } | null } | null> | null, thumbnail?: { url?: string | null, position?: number | null, disabled?: boolean | null, label?: string | null } | null, url_rewrites?: Array<{ url?: string | null } | null> | null, price_range: { maximum_price?: { final_price: { currency?: CurrencyEnum | null, value?: number | null }, regular_price: { currency?: CurrencyEnum | null, value?: number | null } } | null, minimum_price: { final_price: { currency?: CurrencyEnum | null, value?: number | null }, regular_price: { currency?: CurrencyEnum | null, value?: number | null } } }, categories?: Array<{ uid: string, name?: string | null, url_suffix?: string | null, url_path?: string | null, breadcrumbs?: Array<{ category_name?: string | null, category_url_path?: string | null } | null> | null } | null> | null, reviews: { items: Array<{ average_rating: number, ratings_breakdown: Array<{ name: string, value: string } | null> } | null> }
} | {
uid: string, sku?: string | null | undefined, name?: string | null | undefined, stock_status?: ProductStockStatus | null | undefined, only_x_left_in_stock?: number | null | undefined, rating_summary: number, url_key?: string | null | undefined, review_count: number, thumbnail?: { url?: string | null | undefined, position?: number | null | undefined, disabled?: boolean | null | undefined, label?: string | null | undefined } | null | undefined, url_rewrites?: Array<{ url?: string | null | undefined } | null | undefined> | null | undefined, price_range: { maximum_price?: { final_price: { currency?: CurrencyEnum | null | undefined, value?: number | null | undefined }, regular_price: { currency?: CurrencyEnum | null | undefined, value?: number | null | undefined } } | null | undefined, minimum_price: { final_price: { currency?: CurrencyEnum | null | undefined, value?: number | null | undefined }, regular_price: { currency?: CurrencyEnum | null | undefined, value?: number | null | undefined } } }, categories?: Array<{ uid: string, name?: string | null | undefined, url_suffix?: string | null | undefined, url_path?: string | null | undefined, breadcrumbs?: Array<{ category_name?: string | null | undefined, category_url_path?: string | null | undefined } | null | undefined> | null | undefined } | null | undefined> | null | undefined, reviews: { items: Array<{ average_rating: number, ratings_breakdown: Array<{ name: string, value: string } | null | undefined> } | null | undefined> }
__typename: 'DownloadableProduct', uid: string, sku?: string | null, name?: string | null, stock_status?: ProductStockStatus | null, only_x_left_in_stock?: number | null, rating_summary: number, url_key?: string | null, review_count: number, thumbnail?: { url?: string | null, position?: number | null, disabled?: boolean | null, label?: string | null } | null, url_rewrites?: Array<{ url?: string | null } | null> | null, price_range: { maximum_price?: { final_price: { currency?: CurrencyEnum | null, value?: number | null }, regular_price: { currency?: CurrencyEnum | null, value?: number | null } } | null, minimum_price: { final_price: { currency?: CurrencyEnum | null, value?: number | null }, regular_price: { currency?: CurrencyEnum | null, value?: number | null } } }, categories?: Array<{ uid: string, name?: string | null, url_suffix?: string | null, url_path?: string | null, breadcrumbs?: Array<{ category_name?: string | null, category_url_path?: string | null } | null> | null } | null> | null, reviews: { items: Array<{ average_rating: number, ratings_breakdown: Array<{ name: string, value: string } | null> } | null> }
} | {
uid: string, sku?: string | null | undefined, name?: string | null | undefined, stock_status?: ProductStockStatus | null | undefined, only_x_left_in_stock?: number | null | undefined, rating_summary: number, url_key?: string | null | undefined, review_count: number, thumbnail?: { url?: string | null | undefined, position?: number | null | undefined, disabled?: boolean | null | undefined, label?: string | null | undefined } | null | undefined, url_rewrites?: Array<{ url?: string | null | undefined } | null | undefined> | null | undefined, price_range: { maximum_price?: { final_price: { currency?: CurrencyEnum | null | undefined, value?: number | null | undefined }, regular_price: { currency?: CurrencyEnum | null | undefined, value?: number | null | undefined } } | null | undefined, minimum_price: { final_price: { currency?: CurrencyEnum | null | undefined, value?: number | null | undefined }, regular_price: { currency?: CurrencyEnum | null | undefined, value?: number | null | undefined } } }, categories?: Array<{ uid: string, name?: string | null | undefined, url_suffix?: string | null | undefined, url_path?: string | null | undefined, breadcrumbs?: Array<{ category_name?: string | null | undefined, category_url_path?: string | null | undefined } | null | undefined> | null | undefined } | null | undefined> | null | undefined, reviews: { items: Array<{ average_rating: number, ratings_breakdown: Array<{ name: string, value: string } | null | undefined> } | null | undefined> }
__typename: 'GroupedProduct', uid: string, sku?: string | null, name?: string | null, stock_status?: ProductStockStatus | null, only_x_left_in_stock?: number | null, rating_summary: number, url_key?: string | null, review_count: number, items?: Array<{ product?: { sku?: string | null } | { sku?: string | null } | { sku?: string | null } | { sku?: string | null } | { sku?: string | null } | { sku?: string | null } | null } | null> | null, thumbnail?: { url?: string | null, position?: number | null, disabled?: boolean | null, label?: string | null } | null, url_rewrites?: Array<{ url?: string | null } | null> | null, price_range: { maximum_price?: { final_price: { currency?: CurrencyEnum | null, value?: number | null }, regular_price: { currency?: CurrencyEnum | null, value?: number | null } } | null, minimum_price: { final_price: { currency?: CurrencyEnum | null, value?: number | null }, regular_price: { currency?: CurrencyEnum | null, value?: number | null } } }, categories?: Array<{ uid: string, name?: string | null, url_suffix?: string | null, url_path?: string | null, breadcrumbs?: Array<{ category_name?: string | null, category_url_path?: string | null } | null> | null } | null> | null, reviews: { items: Array<{ average_rating: number, ratings_breakdown: Array<{ name: string, value: string } | null> } | null> }
} | {
uid: string, sku?: string | null | undefined, name?: string | null | undefined, stock_status?: ProductStockStatus | null | undefined, only_x_left_in_stock?: number | null | undefined, rating_summary: number, url_key?: string | null | undefined, review_count: number, thumbnail?: { url?: string | null | undefined, position?: number | null | undefined, disabled?: boolean | null | undefined, label?: string | null | undefined } | null | undefined, url_rewrites?: Array<{ url?: string | null | undefined } | null | undefined> | null | undefined, price_range: { maximum_price?: { final_price: { currency?: CurrencyEnum | null | undefined, value?: number | null | undefined }, regular_price: { currency?: CurrencyEnum | null | undefined, value?: number | null | undefined } } | null | undefined, minimum_price: { final_price: { currency?: CurrencyEnum | null | undefined, value?: number | null | undefined }, regular_price: { currency?: CurrencyEnum | null | undefined, value?: number | null | undefined } } }, categories?: Array<{ uid: string, name?: string | null | undefined, url_suffix?: string | null | undefined, url_path?: string | null | undefined, breadcrumbs?: Array<{ category_name?: string | null | undefined, category_url_path?: string | null | undefined } | null | undefined> | null | undefined } | null | undefined> | null | undefined, reviews: { items: Array<{ average_rating: number, ratings_breakdown: Array<{ name: string, value: string } | null | undefined> } | null | undefined> }
__typename: 'SimpleProduct', uid: string, sku?: string | null, name?: string | null, stock_status?: ProductStockStatus | null, only_x_left_in_stock?: number | null, rating_summary: number, url_key?: string | null, review_count: number, thumbnail?: { url?: string | null, position?: number | null, disabled?: boolean | null, label?: string | null } | null, url_rewrites?: Array<{ url?: string | null } | null> | null, price_range: { maximum_price?: { final_price: { currency?: CurrencyEnum | null, value?: number | null }, regular_price: { currency?: CurrencyEnum | null, value?: number | null } } | null, minimum_price: { final_price: { currency?: CurrencyEnum | null, value?: number | null }, regular_price: { currency?: CurrencyEnum | null, value?: number | null } } }, categories?: Array<{ uid: string, name?: string | null, url_suffix?: string | null, url_path?: string | null, breadcrumbs?: Array<{ category_name?: string | null, category_url_path?: string | null } | null> | null } | null> | null, reviews: { items: Array<{ average_rating: number, ratings_breakdown: Array<{ name: string, value: string } | null> } | null> }
} | {
uid: string, sku?: string | null | undefined, name?: string | null | undefined, stock_status?: ProductStockStatus | null | undefined, only_x_left_in_stock?: number | null | undefined, rating_summary: number, url_key?: string | null | undefined, review_count: number, thumbnail?: { url?: string | null | undefined, position?: number | null | undefined, disabled?: boolean | null | undefined, label?: string | null | undefined } | null | undefined, url_rewrites?: Array<{ url?: string | null | undefined } | null | undefined> | null | undefined, price_range: { maximum_price?: { final_price: { currency?: CurrencyEnum | null | undefined, value?: number | null | undefined }, regular_price: { currency?: CurrencyEnum | null | undefined, value?: number | null | undefined } } | null | undefined, minimum_price: { final_price: { currency?: CurrencyEnum | null | undefined, value?: number | null | undefined }, regular_price: { currency?: CurrencyEnum | null | undefined, value?: number | null | undefined } } }, categories?: Array<{ uid: string, name?: string | null | undefined, url_suffix?: string | null | undefined, url_path?: string | null | undefined, breadcrumbs?: Array<{ category_name?: string | null | undefined, category_url_path?: string | null | undefined } | null | undefined> | null | undefined } | null | undefined> | null | undefined, reviews: { items: Array<{ average_rating: number, ratings_breakdown: Array<{ name: string, value: string } | null | undefined> } | null | undefined> }
} | null | undefined> | null | undefined, page_info?: { current_page?: number | null | undefined, page_size?: number | null | undefined, total_pages?: number | null | undefined } | null | undefined
} | null | undefined
__typename: 'VirtualProduct', uid: string, sku?: string | null, name?: string | null, stock_status?: ProductStockStatus | null, only_x_left_in_stock?: number | null, rating_summary: number, url_key?: string | null, review_count: number, thumbnail?: { url?: string | null, position?: number | null, disabled?: boolean | null, label?: string | null } | null, url_rewrites?: Array<{ url?: string | null } | null> | null, price_range: { maximum_price?: { final_price: { currency?: CurrencyEnum | null, value?: number | null }, regular_price: { currency?: CurrencyEnum | null, value?: number | null } } | null, minimum_price: { final_price: { currency?: CurrencyEnum | null, value?: number | null }, regular_price: { currency?: CurrencyEnum | null, value?: number | null } } }, categories?: Array<{ uid: string, name?: string | null, url_suffix?: string | null, url_path?: string | null, breadcrumbs?: Array<{ category_name?: string | null, category_url_path?: string | null } | null> | null } | null> | null, reviews: { items: Array<{ average_rating: number, ratings_breakdown: Array<{ name: string, value: string } | null> } | null> } } | null> | null, page_info?: { current_page?: number | null, page_size?: number | null, total_pages?: number | null } | null
} | null
};

export type RelatedProductsQueryVariables = Exact<{
Expand Down

0 comments on commit bb739f6

Please sign in to comment.