diff --git a/src/resources/Catalogs/ProductListing.ts b/src/resources/Catalogs/ProductListing.ts index f80c1007a..f6a38e326 100644 --- a/src/resources/Catalogs/ProductListing.ts +++ b/src/resources/Catalogs/ProductListing.ts @@ -8,10 +8,16 @@ import { CatalogProductListingsGroupModel, } from './ProductListingInterfaces.js'; +/** + * @deprecated + */ export default class ProductListing extends Resource { static baseCatalogsUrl = `/rest/organizations/${API.orgPlaceholder}/catalogs`; static baseProductListingsUrl = `/rest/organizations/${API.orgPlaceholder}/productlistings`; + /** + * @deprecated + */ list(catalogId: string, options?: ProductListingsListOptions) { const normalizedOptions = normalizePaginatedOptions(options); return this.api.get>( @@ -19,6 +25,9 @@ export default class ProductListing extends Resource { ); } + /** + * @deprecated + */ create(catalogId: string, model: New) { return this.api.post( `${ProductListing.baseCatalogsUrl}/${catalogId}/productlistings`, @@ -26,16 +35,25 @@ export default class ProductListing extends Resource { ); } + /** + * @deprecated + */ delete(catalogId: string, productListingId: string) { return this.api.delete(`${ProductListing.baseCatalogsUrl}/${catalogId}/productlistings/${productListingId}`); } + /** + * @deprecated + */ get(catalogId: string, productListingId: string) { return this.api.get( `${ProductListing.baseCatalogsUrl}/${catalogId}/productlistings/${productListingId}`, ); } + /** + * @deprecated + */ update(catalogId: string, model: ProductListingModel) { return this.api.put( `${ProductListing.baseCatalogsUrl}/${catalogId}/productlistings/${model.id}`, @@ -43,12 +61,18 @@ export default class ProductListing extends Resource { ); } + /** + * @deprecated + */ getByCatalog() { return this.api.get>( `${ProductListing.baseProductListingsUrl}/catalogs`, ); } + /** + * @deprecated + */ getUrls() { return this.api.get(`${ProductListing.baseProductListingsUrl}/urls`); } diff --git a/src/resources/Catalogs/ProductListingConfiguration.ts b/src/resources/Catalogs/ProductListingConfiguration.ts index 30bce962a..a7845b666 100644 --- a/src/resources/Catalogs/ProductListingConfiguration.ts +++ b/src/resources/Catalogs/ProductListingConfiguration.ts @@ -7,9 +7,15 @@ import { ProductListingConfigurationOptions, } from './ProductListingConfigurationInterfaces.js'; +/** + * @deprecated + */ export default class ProductListingConfiguration extends Resource { static baseUrl = `/rest/organizations/${API.orgPlaceholder}/catalogs`; + /** + * @deprecated + */ list(catalogId: string, productListingId: string, options?: ProductListingConfigurationOptions) { const normalizedOptions = normalizePaginatedOptions(options); return this.api.get>( @@ -19,6 +25,10 @@ export default class ProductListingConfiguration extends Resource { ), ); } + + /** + * @deprecated + */ create(catalogId: string, productListingId: string, rankingConfiguration: New) { return this.api.post( `${ProductListingConfiguration.baseUrl}/${catalogId}/productlistings/${productListingId}/configurations`, @@ -26,18 +36,27 @@ export default class ProductListingConfiguration extends Resource { ); } + /** + * @deprecated + */ delete(catalogId: string, productListingId: string, productListingConfigurationId: string) { return this.api.delete( `${ProductListingConfiguration.baseUrl}/${catalogId}/productlistings/${productListingId}/configurations/${productListingConfigurationId}`, ); } + /** + * @deprecated + */ get(catalogId: string, productListingId: string, productListingConfigurationId: string) { return this.api.get( `${ProductListingConfiguration.baseUrl}/${catalogId}/productlistings/${productListingId}/configurations/${productListingConfigurationId}`, ); } + /** + * @deprecated + */ update( catalogId: string, productListingId: string, diff --git a/src/resources/Catalogs/ProductListingConfigurationInterfaces.ts b/src/resources/Catalogs/ProductListingConfigurationInterfaces.ts index 9d193bbd0..225e985b4 100644 --- a/src/resources/Catalogs/ProductListingConfigurationInterfaces.ts +++ b/src/resources/Catalogs/ProductListingConfigurationInterfaces.ts @@ -2,8 +2,14 @@ import {Paginated} from '../BaseInterfaces.js'; import {DeprecatedPaginated} from '../InternalBaseInterface.js'; import {QueryFilterModel} from './ProductListingInterfaces.js'; +/** + * @deprecated + */ export type ProductListingConfigurationOptions = Paginated | DeprecatedPaginated; +/** + * @deprecated + */ export interface ProductListingConfigurationModel { /** * The id of the ProductListingConfiguration. @@ -15,6 +21,9 @@ export interface ProductListingConfigurationModel { rankingConfigurations: RankingConfiguration[]; } +/** + * @deprecated + */ export interface RankingConfiguration { /** * The name of the RankingConfiguration. @@ -38,6 +47,9 @@ export interface RankingConfiguration { value: number; } +/** + * @deprecated + */ export enum RankingTypeEnum { BOOST = 'BOOST', BURY = 'BURY', diff --git a/src/resources/Catalogs/ProductListingInterfaces.ts b/src/resources/Catalogs/ProductListingInterfaces.ts index 461aeae4b..ba8537d46 100644 --- a/src/resources/Catalogs/ProductListingInterfaces.ts +++ b/src/resources/Catalogs/ProductListingInterfaces.ts @@ -2,6 +2,9 @@ import {Paginated} from '../BaseInterfaces.js'; import {FieldOperatorType, FieldValueType} from '../Enums.js'; import {DeprecatedPaginated} from '../InternalBaseInterface.js'; +/** + * @deprecated + */ export type ProductListingsListOptions = Paginated | DeprecatedPaginated; interface FieldValueModelGeneric { @@ -30,6 +33,9 @@ type FieldValueModel = | FieldValueModelGeneric | FieldValueModelGeneric; +/** + * @deprecated + */ export interface QueryFilterModel { /** * The field name. @@ -45,11 +51,17 @@ export interface QueryFilterModel { value: FieldValueModel; } +/** + * @deprecated + */ export interface ProductListingMetricsModel { lastNumberOfProducts?: number; lastQueried: string; } +/** + * @deprecated + */ export interface ProductListingModel { /** * The list of exclusion filters. @@ -77,6 +89,9 @@ export interface ProductListingModel { metrics?: ProductListingMetricsModel; } +/** + * @deprecated + */ export interface CatalogProductListingsGroupModel { /** * The unique identifier of the catalog. diff --git a/src/resources/Products/Product.ts b/src/resources/Products/Product.ts index d0968e9fb..1adb4fbeb 100644 --- a/src/resources/Products/Product.ts +++ b/src/resources/Products/Product.ts @@ -6,6 +6,9 @@ import {ProductsRequestModel, ProductsResultModel} from './ProductInterfaces.js' export default class Products extends Resource { static baseUrl = `/rest/organizations/${API.orgPlaceholder}/commerce/v1/products`; + /** + * @deprecated + */ get(productsRequest: New, refreshCache = false) { return this.api.post( this.buildPath(`${Products.baseUrl}/listing`, {refreshCache: refreshCache}), diff --git a/src/resources/Products/ProductInterfaces.ts b/src/resources/Products/ProductInterfaces.ts index 76520f9f5..e36a0e1b5 100644 --- a/src/resources/Products/ProductInterfaces.ts +++ b/src/resources/Products/ProductInterfaces.ts @@ -1,9 +1,15 @@ import {ProductsFacetRequestSortType, ProductsSortByType, SortingOrder} from '../Enums.js'; +/** + * @deprecated + */ export interface AdvancedFiltersModel { queryFilter: string; } +/** + * @deprecated + */ export interface AdvancedParametersModel { /** * Used to retrieve debug information. Will have an impact on query performance. @@ -15,6 +21,9 @@ export interface AdvancedParametersModel { viewAllContent?: boolean; } +/** + * @deprecated + */ export interface FacetRequestOptions { /** * Whether to take into account the scores generated by the index when reordering facets. @@ -26,6 +35,9 @@ export interface FacetRequestOptions { freezeFacetOrder?: boolean; } +/** + * @deprecated + */ export interface FacetRequestItem { /** * The values displayed by the facet in the search interface at the moment of the request. @@ -61,6 +73,9 @@ export interface FacetRequestItem { sortCriteria?: ProductsFacetRequestSortType; } +/** + * @deprecated + */ export interface FacetsRequestModel { /** * The facet options to add to the request. @@ -72,6 +87,9 @@ export interface FacetsRequestModel { requests: FacetRequestItem[]; } +/** + * @deprecated + */ export interface PaginatedModel { /** * The number of elements to list per page. @@ -83,6 +101,9 @@ export interface PaginatedModel { page?: number; } +/** + * @deprecated + */ export interface SortByFields { /** * The name of the field. @@ -94,6 +115,9 @@ export interface SortByFields { direction: SortingOrder; } +/** + * @deprecated + */ export interface SortModel { /** * The name of the field to sort by. @@ -105,6 +129,10 @@ export interface SortModel { fields?: SortByFields[]; } +/** + * @deprecated + */ + export interface ProductsRequestModel { /** * Additional fields allow you to collect additional information, besides the standard data. @@ -140,6 +168,9 @@ export interface ProductsRequestModel { url: string; } +/** + * @deprecated + */ export interface FacetResultModel { facetId: string; field: string; @@ -150,6 +181,9 @@ export interface FacetResultModel { values: any[]; } +/** + * @deprecated + */ export interface FacetResponseModel { /** * A list of facet results. @@ -157,6 +191,9 @@ export interface FacetResponseModel { results: FacetResultModel[]; } +/** + * @deprecated + */ export interface PaginationResultModel { /** * The number of elements. @@ -164,6 +201,9 @@ export interface PaginationResultModel { totalCount: number; } +/** + * @deprecated + */ export interface ProductListingIdentityModel { /** * Associated catalog id. @@ -175,6 +215,9 @@ export interface ProductListingIdentityModel { id: string; } +/** + * @deprecated + */ export interface ProductModel { additionalFields: Map; childResults: ProductModel[]; @@ -196,6 +239,9 @@ export interface ProductModel { totalNumberOfChildResults: number; } +/** + * @deprecated + */ export interface ProductsResultModel { /** * The execution report.