diff --git a/packages/client/package-lock.json b/packages/client/package-lock.json index ddddf5e..7b7bad5 100644 --- a/packages/client/package-lock.json +++ b/packages/client/package-lock.json @@ -1,15 +1,15 @@ { "name": "@relewise/client", - "version": "1.6.0", + "version": "1.27.0", "lockfileVersion": 2, "requires": true, "packages": { "": { "name": "@relewise/client", - "version": "1.6.0", + "version": "1.27.0", "license": "ISC", "dependencies": { - "cross-fetch": "^3.1.5" + "cross-fetch": "^4.0.0" }, "devDependencies": { "@microsoft/api-extractor": "^7.28.6", @@ -2202,11 +2202,11 @@ "dev": true }, "node_modules/cross-fetch": { - "version": "3.1.5", - "resolved": "https://registry.npmjs.org/cross-fetch/-/cross-fetch-3.1.5.tgz", - "integrity": "sha512-lvb1SBsI0Z7GDwmuid+mU3kWVBwTVUbe7S0H52yaaAdQOXq2YktTCZdlAcNKFzE6QtRz0snpw9bNiPeOIkkQvw==", + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/cross-fetch/-/cross-fetch-4.0.0.tgz", + "integrity": "sha512-e4a5N8lVvuLgAWgnCrLr2PP0YyDOTHa9H/Rj54dirp61qXnNq46m82bRhNqIA5VccJtWBvPTFRV3TtvHUKPB1g==", "dependencies": { - "node-fetch": "2.6.7" + "node-fetch": "^2.6.12" } }, "node_modules/cross-spawn": { @@ -4144,9 +4144,9 @@ } }, "node_modules/node-fetch": { - "version": "2.6.7", - "resolved": "https://registry.npmjs.org/node-fetch/-/node-fetch-2.6.7.tgz", - "integrity": "sha512-ZjMPFEfVx5j+y2yF35Kzx5sF7kDzxuDj6ziH4FFbOp87zKDZNx8yExJIb05OGF4Nlt9IHFIMBkRl41VdvcNdbQ==", + "version": "2.7.0", + "resolved": "https://registry.npmjs.org/node-fetch/-/node-fetch-2.7.0.tgz", + "integrity": "sha512-c4FRfUm/dbcWZ7U+1Wq0AwCyFL+3nt2bEw05wfxSz+DWpWsitgmSgYmy2dQdWyKC1694ELPqMs/YzUSNozLt8A==", "dependencies": { "whatwg-url": "^5.0.0" }, @@ -7390,11 +7390,11 @@ "dev": true }, "cross-fetch": { - "version": "3.1.5", - "resolved": "https://registry.npmjs.org/cross-fetch/-/cross-fetch-3.1.5.tgz", - "integrity": "sha512-lvb1SBsI0Z7GDwmuid+mU3kWVBwTVUbe7S0H52yaaAdQOXq2YktTCZdlAcNKFzE6QtRz0snpw9bNiPeOIkkQvw==", + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/cross-fetch/-/cross-fetch-4.0.0.tgz", + "integrity": "sha512-e4a5N8lVvuLgAWgnCrLr2PP0YyDOTHa9H/Rj54dirp61qXnNq46m82bRhNqIA5VccJtWBvPTFRV3TtvHUKPB1g==", "requires": { - "node-fetch": "2.6.7" + "node-fetch": "^2.6.12" } }, "cross-spawn": { @@ -8867,9 +8867,9 @@ } }, "node-fetch": { - "version": "2.6.7", - "resolved": "https://registry.npmjs.org/node-fetch/-/node-fetch-2.6.7.tgz", - "integrity": "sha512-ZjMPFEfVx5j+y2yF35Kzx5sF7kDzxuDj6ziH4FFbOp87zKDZNx8yExJIb05OGF4Nlt9IHFIMBkRl41VdvcNdbQ==", + "version": "2.7.0", + "resolved": "https://registry.npmjs.org/node-fetch/-/node-fetch-2.7.0.tgz", + "integrity": "sha512-c4FRfUm/dbcWZ7U+1Wq0AwCyFL+3nt2bEw05wfxSz+DWpWsitgmSgYmy2dQdWyKC1694ELPqMs/YzUSNozLt8A==", "requires": { "whatwg-url": "^5.0.0" } diff --git a/packages/client/package.json b/packages/client/package.json index f8e9c0d..d2b4174 100644 --- a/packages/client/package.json +++ b/packages/client/package.json @@ -1,6 +1,6 @@ { "name": "@relewise/client", - "version": "1.25.0", + "version": "1.28.0", "description": "Relewise is a next generation personalization SaaS-platform, which offers functionality within product- and content recommendations and personalized search. This official SDK helps you interact with our API.", "repository": { "type": "git", @@ -33,9 +33,8 @@ "build:types": "tsc -p ./tsconfig.json --outDir build --declaration true && api-extractor run", "clean": "rimraf ./build ./dist ./docs", "gen-api": "swagger-typescript-api -p https://api.relewise.com/public/swagger.json -o src/models --modular --no-client --enum-names-as-values", - "gen-api-retail-media": "swagger-typescript-api -p [RETAIL_MEDIA_DATASET] -o src/models --modular --no-client --enum-names-as-values", "gen-api-dev": "swagger-typescript-api -p swagger.json -o src/models --modular --no-client --enum-names-as-values", - "publish": "npm run gen-api-dev && npm run build && npm run build:types" + "publish": "npm run gen-api && npm run build && npm run build:types" }, "devDependencies": { "@microsoft/api-extractor": "^7.28.6", @@ -60,6 +59,6 @@ "@typescript-eslint/parser": "^5.34.0" }, "dependencies": { - "cross-fetch": "^3.1.5" + "cross-fetch": "^4.0.0" } } \ No newline at end of file diff --git a/packages/client/src/builders/recommendation/brands/brandSettingsRecommendationBuilder.ts b/packages/client/src/builders/recommendation/brands/brandSettingsRecommendationBuilder.ts index 8297c75..fa3b672 100644 --- a/packages/client/src/builders/recommendation/brands/brandSettingsRecommendationBuilder.ts +++ b/packages/client/src/builders/recommendation/brands/brandSettingsRecommendationBuilder.ts @@ -15,8 +15,12 @@ export class BrandSettingsRecommendationBuilder extends RecommendationRequestBui super(settings); } - public setSelectedBrandProperties(brandProperties: Partial): this { - this.recommendationSettings.selectedBrandProperties = brandProperties as SelectedBrandPropertiesSettings; + /** + * Select the properties of the brand to be returned, by default only the brand id is returned. + * @param brandProperties + */ + public setSelectedBrandProperties(brandProperties: Partial | null): this { + this.recommendationSettings.selectedBrandProperties = brandProperties as SelectedBrandPropertiesSettings | null; return this; } diff --git a/packages/client/src/builders/recommendation/content-categories/contentCategorySettingsRecommendationBuilder.ts b/packages/client/src/builders/recommendation/content-categories/contentCategorySettingsRecommendationBuilder.ts index b25bca2..0713ee3 100644 --- a/packages/client/src/builders/recommendation/content-categories/contentCategorySettingsRecommendationBuilder.ts +++ b/packages/client/src/builders/recommendation/content-categories/contentCategorySettingsRecommendationBuilder.ts @@ -15,12 +15,16 @@ export class ContentCategorySettingsRecommendationBuilder extends Recommendation super(settings); } - public setSelectedContentCategoryProperties(ContentCategoryProperties: Partial): this { - this.recommendationSettings.selectedContentCategoryProperties = ContentCategoryProperties as SelectedContentCategoryPropertiesSettings; + /** + * Select the properties of the content category to be returned, by default only the content category id is returned. + * @param contentCategoryProperties + */ + public setSelectedContentCategoryProperties(contentCategoryProperties: Partial | null): this { + this.recommendationSettings.selectedContentCategoryProperties = contentCategoryProperties as SelectedContentCategoryPropertiesSettings | null; return this; } - + public setNumberOfRecommendations(count: number): this { this.recommendationSettings.numberOfRecommendations = count; diff --git a/packages/client/src/builders/recommendation/contents/contentSettingsRecommendationBuilder.ts b/packages/client/src/builders/recommendation/contents/contentSettingsRecommendationBuilder.ts index 4ee366d..47c1810 100644 --- a/packages/client/src/builders/recommendation/contents/contentSettingsRecommendationBuilder.ts +++ b/packages/client/src/builders/recommendation/contents/contentSettingsRecommendationBuilder.ts @@ -15,8 +15,12 @@ export class ContentSettingsRecommendationBuilder extends RecommendationRequestB super(settings); } - public setSelectedContentProperties(contentProperties: Partial): this { - this.recommendationSettings.selectedContentProperties = contentProperties as SelectedContentPropertiesSettings; + /** + * Select the properties of the content to be returned, by default only the content id is returned. + * @param contentProperties + */ + public setSelectedContentProperties(contentProperties: Partial | null): this { + this.recommendationSettings.selectedContentProperties = contentProperties as SelectedContentPropertiesSettings | null; return this; } diff --git a/packages/client/src/builders/recommendation/products/productSettingsRecommendationBuilder.ts b/packages/client/src/builders/recommendation/products/productSettingsRecommendationBuilder.ts index df8041f..2a34464 100644 --- a/packages/client/src/builders/recommendation/products/productSettingsRecommendationBuilder.ts +++ b/packages/client/src/builders/recommendation/products/productSettingsRecommendationBuilder.ts @@ -16,20 +16,32 @@ export class ProductSettingsRecommendationBuilder extends RecommendationRequestB super(settings); } - public setSelectedProductProperties(productProperties: Partial): this { - this.recommendationSettings.selectedProductProperties = productProperties as SelectedProductPropertiesSettings; + /** + * Select the properties of the product to be returned, by default only the product id is returned. + * @param productProperties + */ + public setSelectedProductProperties(productProperties: Partial | null): this { + this.recommendationSettings.selectedProductProperties = productProperties as SelectedProductPropertiesSettings | null; return this; } - public setSelectedVariantProperties(variantProperties: Partial): this { - this.recommendationSettings.selectedVariantProperties = variantProperties as SelectedVariantPropertiesSettings; + /** + * Select the properties of the variant to be returned, by default only the variant id is returned. + * @param variantProperties + */ + public setSelectedVariantProperties(variantProperties: Partial | null): this { + this.recommendationSettings.selectedVariantProperties = variantProperties as SelectedVariantPropertiesSettings | null; return this; } - public setSelectedBrandProperties(brandProperties: Partial): this { - this.recommendationSettings.selectedBrandProperties = brandProperties as SelectedBrandPropertiesSettings; + /** + * Select the properties of the brand to be returned, by default only the brand id is returned. + * @param brandProperties + */ + public setSelectedBrandProperties(brandProperties: Partial | null): this { + this.recommendationSettings.selectedBrandProperties = brandProperties as SelectedBrandPropertiesSettings | null; return this; } diff --git a/packages/client/src/builders/search/facetBuilder.ts b/packages/client/src/builders/search/facetBuilder.ts index c57d8f4..1d20a1a 100644 --- a/packages/client/src/builders/search/facetBuilder.ts +++ b/packages/client/src/builders/search/facetBuilder.ts @@ -45,7 +45,7 @@ export class FacetBuilder { return this; } - public addProductCategoryHierarchyFacet(categorySelectionStrategy: 'ImmediateParent' | 'Ancestors', selectedValues: CategoryPath[] | null = null, selectedPropertiesSettings?: Partial, facetSettings?: FacetSettings): this { + public addProductCategoryHierarchyFacet(categorySelectionStrategy: 'ImmediateParent' | 'Ancestors' | 'Descendants', selectedValues: CategoryPath[] | null = null, selectedPropertiesSettings?: Partial, facetSettings?: FacetSettings): this { const facet: CategoryHierarchyFacet = { $type: 'Relewise.Client.DataTypes.Search.Facets.Queries.CategoryHierarchyFacet, Relewise.Client', categorySelectionStrategy: categorySelectionStrategy, @@ -62,7 +62,7 @@ export class FacetBuilder { return this; } - public addContentCategoryHierarchyFacet(categorySelectionStrategy: 'ImmediateParent' | 'Ancestors', selectedValues: CategoryPath[] | null = null, selectedPropertiesSettings?: Partial, facetSettings?: FacetSettings): this { + public addContentCategoryHierarchyFacet(categorySelectionStrategy: 'ImmediateParent' | 'Ancestors' | 'Descendants', selectedValues: CategoryPath[] | null = null, selectedPropertiesSettings?: Partial, facetSettings?: FacetSettings): this { const facet: CategoryHierarchyFacet = { $type: 'Relewise.Client.DataTypes.Search.Facets.Queries.CategoryHierarchyFacet, Relewise.Client', categorySelectionStrategy: categorySelectionStrategy, diff --git a/packages/client/src/builders/search/productCategorySearchBuilder.ts b/packages/client/src/builders/search/productCategorySearchBuilder.ts index 69ecfc0..9125a90 100644 --- a/packages/client/src/builders/search/productCategorySearchBuilder.ts +++ b/packages/client/src/builders/search/productCategorySearchBuilder.ts @@ -21,8 +21,12 @@ export class ProductCategorySearchBuilder extends SearchRequestBuilder implement super(settings) } - public setSelectedCategoryProperties(productCategoryProperties: Partial): this { - this.searchSettings.selectedCategoryProperties = productCategoryProperties as SelectedProductCategoryPropertiesSettings; + /** + * Select the properties of the product category to be returned, by default only the product category id is returned. + * @param productCategoryProperties + */ + public setSelectedCategoryProperties(productCategoryProperties: Partial | null): this { + this.searchSettings.selectedCategoryProperties = productCategoryProperties as SelectedProductCategoryPropertiesSettings | null; return this; } diff --git a/packages/client/src/builders/search/productSearchBuilder.ts b/packages/client/src/builders/search/productSearchBuilder.ts index 785356b..05865e1 100644 --- a/packages/client/src/builders/search/productSearchBuilder.ts +++ b/packages/client/src/builders/search/productSearchBuilder.ts @@ -22,20 +22,32 @@ export class ProductSearchBuilder extends SearchRequestBuilder implements Search super(settings) } - public setSelectedProductProperties(productProperties: Partial): this { - this.searchSettings.selectedProductProperties = productProperties as SelectedProductPropertiesSettings; + /** + * Select the properties of the product to be returned, by default only the product id is returned. + * @param productProperties + */ + public setSelectedProductProperties(productProperties: Partial | null): this { + this.searchSettings.selectedProductProperties = productProperties as SelectedProductPropertiesSettings | null; return this; } - public setSelectedVariantProperties(variantProperties: Partial): this { - this.searchSettings.selectedVariantProperties = variantProperties as SelectedVariantPropertiesSettings; + /** + * Select the properties of the variant to be returned, by default only the variant id is returned. + * @param variantProperties + */ + public setSelectedVariantProperties(variantProperties: Partial | null): this { + this.searchSettings.selectedVariantProperties = variantProperties as SelectedVariantPropertiesSettings | null; return this; } - public setSelectedBrandProperties(brandProperties: Partial): this { - this.searchSettings.selectedBrandProperties = brandProperties as SelectedBrandPropertiesSettings; + /** + * Select the properties of the brand to be returned, by default only the brand id is returned. + * @param brandProperties + */ + public setSelectedBrandProperties(brandProperties: Partial | null): this { + this.searchSettings.selectedBrandProperties = brandProperties as SelectedBrandPropertiesSettings | null; return this; } diff --git a/packages/client/src/models/data-contracts.ts b/packages/client/src/models/data-contracts.ts index 5a5d7e7..77d45ed 100644 --- a/packages/client/src/models/data-contracts.ts +++ b/packages/client/src/models/data-contracts.ts @@ -65,7 +65,7 @@ export interface AbandonedSearchTriggerResultTriggerConfiguration { userConditions?: UserConditionCollection | null; } -export type Advertiser = AdvertiserEntityStateAdvertiserMetadataCollectionRetailMediaEntity & { +export type Advertiser = AdvertiserEntityStateAdvertiserMetadataValuesRetailMediaEntity & { name: string; allowedPromotions?: PromotionSpecificationCollection | null; allowedLocations?: PromotionLocationCollection | null; @@ -87,7 +87,7 @@ export interface AdvertiserAdvertiserEntityStateEntityResponse { statistics?: Statistics | null; } -export interface AdvertiserEntityStateAdvertiserMetadataCollectionAdvertisersRequestSortByAdvertisersRequestEntityFiltersEntitiesRequest { +export interface AdvertiserEntityStateAdvertiserMetadataValuesAdvertisersRequestSortByAdvertisersRequestEntityFiltersEntitiesRequest { $type: string; filters?: AdvertisersRequestEntityFilters | null; sorting?: AdvertisersRequestSortBySorting | null; @@ -98,15 +98,15 @@ export interface AdvertiserEntityStateAdvertiserMetadataCollectionAdvertisersReq custom?: Record; } -export interface AdvertiserEntityStateAdvertiserMetadataCollectionRetailMediaEntity { +export interface AdvertiserEntityStateAdvertiserMetadataValuesRetailMediaEntity { $type: string; state: "Active" | "Inactive" | "Archived"; - metadata: AdvertiserMetadataCollection; + metadata: AdvertiserMetadataValues; /** @format uuid */ id?: string | null; } -export type AdvertiserMetadataCollection = MetadataCollection & { +export type AdvertiserMetadataValues = MetadataValues & { /** @format date-time */ inactivated?: string | null; inactivatedBy?: string | null; @@ -132,10 +132,10 @@ export interface AdvertiserSaveEntitiesResponse { } export type AdvertisersRequest = - AdvertiserEntityStateAdvertiserMetadataCollectionAdvertisersRequestSortByAdvertisersRequestEntityFiltersEntitiesRequest; + AdvertiserEntityStateAdvertiserMetadataValuesAdvertisersRequestSortByAdvertisersRequestEntityFiltersEntitiesRequest; export type AdvertisersRequestEntityFilters = - RetailMediaEntity2AdvertiserEntityStateAdvertiserMetadataCollectionRetailMediaEntity2EntityFilters & { + RetailMediaEntity2AdvertiserEntityStateAdvertiserMetadataValuesRetailMediaEntity2EntityFilters & { ids?: string[] | null; }; @@ -162,13 +162,19 @@ export type AndFilter = Filter & { | AndFilter | BrandAssortmentFilter | BrandDataFilter + | BrandDataHasKeyFilter + | BrandDisabledFilter | BrandIdFilter | CartDataFilter | CompanyDataFilter + | CompanyDataHasKeyFilter + | CompanyDisabledFilter | CompanyIdFilter | ContentAssortmentFilter | ContentCategoryAssortmentFilter | ContentCategoryDataFilter + | ContentCategoryDataHasKeyFilter + | ContentCategoryDisabledFilter | ContentCategoryHasAncestorFilter | ContentCategoryHasChildFilter | ContentCategoryHasContentsFilter @@ -177,6 +183,9 @@ export type AndFilter = Filter & { | ContentCategoryLevelFilter | ContentCategoryRecentlyViewedByUserFilter | ContentDataFilter + | ContentDataHasKeyFilter + | ContentDisabledFilter + | ContentHasCategoriesFilter | ContentIdFilter | ContentRecentlyViewedByUserFilter | OrFilter @@ -184,6 +193,8 @@ export type AndFilter = Filter & { | ProductAssortmentFilter | ProductCategoryAssortmentFilter | ProductCategoryDataFilter + | ProductCategoryDataHasKeyFilter + | ProductCategoryDisabledFilter | ProductCategoryHasAncestorFilter | ProductCategoryHasChildFilter | ProductCategoryHasParentFilter @@ -192,7 +203,10 @@ export type AndFilter = Filter & { | ProductCategoryLevelFilter | ProductCategoryRecentlyViewedByUserFilter | ProductDataFilter + | ProductDataHasKeyFilter + | ProductDisabledFilter | ProductDisplayNameFilter + | ProductHasCategoriesFilter | ProductHasVariantsFilter | ProductIdFilter | ProductListPriceFilter @@ -207,6 +221,8 @@ export type AndFilter = Filter & { | ProductSalesPriceFilter | VariantAssortmentFilter | VariantDataFilter + | VariantDataHasKeyFilter + | VariantDisabledFilter | VariantIdFilter | VariantListPriceFilter | VariantSalesPriceFilter @@ -375,12 +391,18 @@ export type BrandAssortmentFilter = Filter & { export type BrandDataFilter = DataFilter; +export type BrandDataHasKeyFilter = Filter & { + key: string; +}; + export type BrandDetailsCollectionResponse = TimedResponse & { brands?: BrandResultDetails[] | null; /** @format int32 */ totalNumberOfResults?: number | null; }; +export type BrandDisabledFilter = Filter; + export type BrandFacet = StringValueFacet; export type BrandFacetResult = StringBrandNameAndIdResultValueFacetResult; @@ -513,6 +535,8 @@ export interface Budget { $type: string; /** @format double */ maxTotalCost?: number | null; + /** @format double */ + totalCost: number; } export type CPMBudget = Budget & { @@ -520,13 +544,58 @@ export type CPMBudget = Budget & { costPerMille: number; }; -export type Campaign = CampaignEntityStateCampaignMetadataCollectionRetailMediaEntity & { +export type Campaign = CampaignEntityStateCampaignMetadataValuesRetailMediaEntity & { name: string; schedule?: ISchedule | null; promotions: PromotionCollection; /** @format uuid */ advertiserId: string; budget: CPMBudget; + status: CampaignStatusWithHistory; +}; + +export interface CampaignAnalytics { + products?: CampaignAnalyticsProductAnalytics | null; +} + +export interface CampaignAnalyticsProductAnalytics { + timeSeries?: CampaignAnalyticsProductAnalyticsPeriodMetrics[] | null; + /** @format int32 */ + promotions: number; + promotedProducts?: CampaignAnalyticsProductAnalyticsPromotedProductMetrics[] | null; +} + +export interface CampaignAnalyticsProductAnalyticsPeriodMetrics { + /** @format date-time */ + periodFromUtc: string; + /** @format int32 */ + views: number; + /** @format int32 */ + salesQuantity: number; + currencies?: CampaignAnalyticsProductAnalyticsPeriodMetricsCurrencyMetrics[] | null; +} + +export interface CampaignAnalyticsProductAnalyticsPeriodMetricsCurrencyMetrics { + currency?: string | null; + /** @format double */ + revenue: number; +} + +export interface CampaignAnalyticsProductAnalyticsPromotedProductMetrics { + productId?: string | null; + /** @format int32 */ + promotions: number; +} + +export type CampaignAnalyticsRequest = LicensedRequest & { + /** @format uuid */ + id: string; + periodUtc: DateTimeRange; + filters?: FilterCollection | null; +}; + +export type CampaignAnalyticsResponse = TimedResponse & { + analytics?: CampaignAnalytics | null; }; export interface CampaignCampaignEntityStateEntityResponse { @@ -545,7 +614,7 @@ export interface CampaignCampaignEntityStateEntityResponse { statistics?: Statistics | null; } -export interface CampaignEntityStateCampaignMetadataCollectionCampaignsRequestSortByCampaignsRequestEntityFiltersEntitiesRequest { +export interface CampaignEntityStateCampaignMetadataValuesCampaignsRequestSortByCampaignsRequestEntityFiltersEntitiesRequest { $type: string; filters?: CampaignsRequestEntityFilters | null; sorting?: CampaignsRequestSortBySorting | null; @@ -556,15 +625,15 @@ export interface CampaignEntityStateCampaignMetadataCollectionCampaignsRequestSo custom?: Record; } -export interface CampaignEntityStateCampaignMetadataCollectionRetailMediaEntity { +export interface CampaignEntityStateCampaignMetadataValuesRetailMediaEntity { $type: string; state: "Proposed" | "Approved" | "Archived"; - metadata: CampaignMetadataCollection; + metadata: CampaignMetadataValues; /** @format uuid */ id?: string | null; } -export type CampaignMetadataCollection = MetadataCollection & { +export type CampaignMetadataValues = MetadataValues & { /** @format date-time */ proposed?: string | null; proposedBy?: string | null; @@ -589,11 +658,22 @@ export interface CampaignSaveEntitiesResponse { statistics?: Statistics | null; } +export interface CampaignStatusWithHistory { + current: "Active" | "Inactive" | "ScheduleCompleted" | "BudgetReached"; + history: CampaignStatusWithHistoryChange[]; +} + +export interface CampaignStatusWithHistoryChange { + /** @format date-time */ + utcTime: string; + status: "Active" | "Inactive" | "ScheduleCompleted" | "BudgetReached"; +} + export type CampaignsRequest = - CampaignEntityStateCampaignMetadataCollectionCampaignsRequestSortByCampaignsRequestEntityFiltersEntitiesRequest; + CampaignEntityStateCampaignMetadataValuesCampaignsRequestSortByCampaignsRequestEntityFiltersEntitiesRequest; export type CampaignsRequestEntityFilters = - RetailMediaEntity2CampaignEntityStateCampaignMetadataCollectionRetailMediaEntity2EntityFilters & { + RetailMediaEntity2CampaignEntityStateCampaignMetadataValuesRetailMediaEntity2EntityFilters & { ids?: string[] | null; advertiserIds?: string[] | null; }; @@ -653,15 +733,15 @@ export interface CategoryAdministrativeAction { } export type CategoryFacet = StringValueFacet & { - categorySelectionStrategy: "ImmediateParent" | "Ancestors"; + categorySelectionStrategy: "ImmediateParent" | "Ancestors" | "Descendants"; }; export type CategoryFacetResult = StringCategoryNameAndIdResultValueFacetResult & { - categorySelectionStrategy: "ImmediateParent" | "Ancestors"; + categorySelectionStrategy: "ImmediateParent" | "Ancestors" | "Descendants"; }; export type CategoryHierarchyFacet = CategoryPathValueFacet & { - categorySelectionStrategy: "ImmediateParent" | "Ancestors"; + categorySelectionStrategy: "ImmediateParent" | "Ancestors" | "Descendants"; selectedPropertiesSettings?: | SelectedContentCategoryPropertiesSettings | SelectedProductCategoryPropertiesSettings @@ -669,7 +749,7 @@ export type CategoryHierarchyFacet = CategoryPathValueFacet & { }; export type CategoryHierarchyFacetResult = FacetResult & { - categorySelectionStrategy: "ImmediateParent" | "Ancestors"; + categorySelectionStrategy: "ImmediateParent" | "Ancestors" | "Descendants"; nodes: CategoryHierarchyFacetResultCategoryNode[]; }; @@ -789,6 +869,12 @@ export type CompanyAdministrativeAction = Trackable & { export type CompanyDataFilter = DataFilter; +export type CompanyDataHasKeyFilter = Filter & { + key: string; +}; + +export type CompanyDisabledFilter = Filter; + export type CompanyIdFilter = Filter & { companyIds: string[]; }; @@ -852,6 +938,10 @@ export type ContentCategoryAssortmentFilter = Filter & { export type ContentCategoryDataFilter = DataFilter; +export type ContentCategoryDataHasKeyFilter = Filter & { + key: string; +}; + export type ContentCategoryDataRelevanceModifier = DataRelevanceModifier; export type ContentCategoryDetailsCollectionResponse = TimedResponse & { @@ -860,6 +950,8 @@ export type ContentCategoryDetailsCollectionResponse = TimedResponse & { totalNumberOfResults?: number | null; }; +export type ContentCategoryDisabledFilter = Filter; + export type ContentCategoryHasAncestorFilter = HasAncestorCategoryFilter; export type ContentCategoryHasChildFilter = HasChildCategoryFilter; @@ -1041,6 +1133,10 @@ export type ContentDataDoubleValueFacetResult = DoubleContentDataValueFacetResul export type ContentDataFilter = DataFilter; +export type ContentDataHasKeyFilter = Filter & { + key: string; +}; + export type ContentDataIntegerValueFacet = Int32ContentDataValueFacet; export type ContentDataIntegerValueFacetResult = Int32ContentDataValueFacetResult; @@ -1066,6 +1162,8 @@ export type ContentDetailsCollectionResponse = TimedResponse & { totalNumberOfResults?: number | null; }; +export type ContentDisabledFilter = Filter; + export type ContentFacetQuery = FacetQuery & { items: ( | ContentAssortmentFacet @@ -1148,6 +1246,8 @@ export interface ContentFacetResult { | null; } +export type ContentHasCategoriesFilter = Filter; + export type ContentIdFilter = Filter & { contentIds: string[]; }; @@ -1356,6 +1456,10 @@ export interface DataIndexConfiguration { unspecified?: FieldIndexConfiguration | null; } +export type DataKeyPopularityMultiplierSelector = PopularityMultiplierSelector & { + key?: string | null; +}; + export interface DataObject { data: Record; } @@ -1510,6 +1614,7 @@ export interface DataRelevanceModifier { | DistinctCondition | EqualsCondition | GreaterThanCondition + | HasValueCondition | LessThanCondition | RelativeDateTimeCondition )[] @@ -1537,6 +1642,13 @@ export interface DataValue { isCollection: boolean; } +export interface DateTimeRange { + /** @format date-time */ + lowerBoundInclusive: string; + /** @format date-time */ + upperBoundInclusive: string; +} + export interface DecimalNullableChainableRange { /** @format double */ lowerBoundInclusive?: number | null; @@ -1988,13 +2100,19 @@ export interface FilterCollection { | AndFilter | BrandAssortmentFilter | BrandDataFilter + | BrandDataHasKeyFilter + | BrandDisabledFilter | BrandIdFilter | CartDataFilter | CompanyDataFilter + | CompanyDataHasKeyFilter + | CompanyDisabledFilter | CompanyIdFilter | ContentAssortmentFilter | ContentCategoryAssortmentFilter | ContentCategoryDataFilter + | ContentCategoryDataHasKeyFilter + | ContentCategoryDisabledFilter | ContentCategoryHasAncestorFilter | ContentCategoryHasChildFilter | ContentCategoryHasContentsFilter @@ -2003,6 +2121,9 @@ export interface FilterCollection { | ContentCategoryLevelFilter | ContentCategoryRecentlyViewedByUserFilter | ContentDataFilter + | ContentDataHasKeyFilter + | ContentDisabledFilter + | ContentHasCategoriesFilter | ContentIdFilter | ContentRecentlyViewedByUserFilter | OrFilter @@ -2010,6 +2131,8 @@ export interface FilterCollection { | ProductAssortmentFilter | ProductCategoryAssortmentFilter | ProductCategoryDataFilter + | ProductCategoryDataHasKeyFilter + | ProductCategoryDisabledFilter | ProductCategoryHasAncestorFilter | ProductCategoryHasChildFilter | ProductCategoryHasParentFilter @@ -2018,7 +2141,10 @@ export interface FilterCollection { | ProductCategoryLevelFilter | ProductCategoryRecentlyViewedByUserFilter | ProductDataFilter + | ProductDataHasKeyFilter + | ProductDisabledFilter | ProductDisplayNameFilter + | ProductHasCategoriesFilter | ProductHasVariantsFilter | ProductIdFilter | ProductListPriceFilter @@ -2033,6 +2159,8 @@ export interface FilterCollection { | ProductSalesPriceFilter | VariantAssortmentFilter | VariantDataFilter + | VariantDataHasKeyFilter + | VariantDisabledFilter | VariantIdFilter | VariantListPriceFilter | VariantSalesPriceFilter @@ -2172,6 +2300,8 @@ export type HasRecentlyReceivedTriggerCondition = UserCondition & { type?: number | null; }; +export type HasValueCondition = ValueCondition; + export type HtmlParser = Parser; export type IChange = object; @@ -2288,13 +2418,14 @@ export interface LineItem { data?: Record; } -export type Location = LocationEntityStateLocationMetadataCollectionRetailMediaEntity & { +export type Location = LocationEntityStateLocationMetadataValuesRetailMediaEntity & { name: string; key?: string | null; placements?: LocationPlacementCollection | null; + supportedPromotions?: PromotionSpecificationCollection | null; }; -export interface LocationEntityStateLocationMetadataCollectionLocationsRequestSortByLocationsRequestEntityFiltersEntitiesRequest { +export interface LocationEntityStateLocationMetadataValuesLocationsRequestSortByLocationsRequestEntityFiltersEntitiesRequest { $type: string; filters?: LocationsRequestEntityFilters | null; sorting?: LocationsRequestSortBySorting | null; @@ -2305,10 +2436,10 @@ export interface LocationEntityStateLocationMetadataCollectionLocationsRequestSo custom?: Record; } -export interface LocationEntityStateLocationMetadataCollectionRetailMediaEntity { +export interface LocationEntityStateLocationMetadataValuesRetailMediaEntity { $type: string; state: "Active" | "Inactive" | "Archived"; - metadata: LocationMetadataCollection; + metadata: LocationMetadataValues; /** @format uuid */ id?: string | null; } @@ -2329,7 +2460,7 @@ export interface LocationLocationEntityStateEntityResponse { statistics?: Statistics | null; } -export type LocationMetadataCollection = MetadataCollection & { +export type LocationMetadataValues = MetadataValues & { /** @format date-time */ inactivated?: string | null; inactivatedBy?: string | null; @@ -2354,7 +2485,7 @@ export interface LocationPlacementCollection { export interface LocationPlacementVariation { name: string; key?: string | null; - supportedPromotions?: PromotionSpecificationCollection | null; + supportedPromotions?: PromotionSpecificationVariationCollection | null; } export interface LocationPlacementVariationCollection { @@ -2375,10 +2506,10 @@ export interface LocationSaveEntitiesResponse { } export type LocationsRequest = - LocationEntityStateLocationMetadataCollectionLocationsRequestSortByLocationsRequestEntityFiltersEntitiesRequest; + LocationEntityStateLocationMetadataValuesLocationsRequestSortByLocationsRequestEntityFiltersEntitiesRequest; export type LocationsRequestEntityFilters = - RetailMediaEntity2LocationEntityStateLocationMetadataCollectionRetailMediaEntity2EntityFilters & { + RetailMediaEntity2LocationEntityStateLocationMetadataValuesRetailMediaEntity2EntityFilters & { ids?: string[] | null; keys?: string[] | null; }; @@ -2440,7 +2571,7 @@ export type MerchandisingRulesRequest = LicensedRequest & { type?: number | null; }; -export interface MetadataCollection { +export interface MetadataValues { $type: string; /** @format date-time */ created: string; @@ -2557,13 +2688,19 @@ export type OrFilter = Filter & { | AndFilter | BrandAssortmentFilter | BrandDataFilter + | BrandDataHasKeyFilter + | BrandDisabledFilter | BrandIdFilter | CartDataFilter | CompanyDataFilter + | CompanyDataHasKeyFilter + | CompanyDisabledFilter | CompanyIdFilter | ContentAssortmentFilter | ContentCategoryAssortmentFilter | ContentCategoryDataFilter + | ContentCategoryDataHasKeyFilter + | ContentCategoryDisabledFilter | ContentCategoryHasAncestorFilter | ContentCategoryHasChildFilter | ContentCategoryHasContentsFilter @@ -2572,6 +2709,9 @@ export type OrFilter = Filter & { | ContentCategoryLevelFilter | ContentCategoryRecentlyViewedByUserFilter | ContentDataFilter + | ContentDataHasKeyFilter + | ContentDisabledFilter + | ContentHasCategoriesFilter | ContentIdFilter | ContentRecentlyViewedByUserFilter | OrFilter @@ -2579,6 +2719,8 @@ export type OrFilter = Filter & { | ProductAssortmentFilter | ProductCategoryAssortmentFilter | ProductCategoryDataFilter + | ProductCategoryDataHasKeyFilter + | ProductCategoryDisabledFilter | ProductCategoryHasAncestorFilter | ProductCategoryHasChildFilter | ProductCategoryHasParentFilter @@ -2587,7 +2729,10 @@ export type OrFilter = Filter & { | ProductCategoryLevelFilter | ProductCategoryRecentlyViewedByUserFilter | ProductDataFilter + | ProductDataHasKeyFilter + | ProductDisabledFilter | ProductDisplayNameFilter + | ProductHasCategoriesFilter | ProductHasVariantsFilter | ProductIdFilter | ProductListPriceFilter @@ -2602,6 +2747,8 @@ export type OrFilter = Filter & { | ProductSalesPriceFilter | VariantAssortmentFilter | VariantDataFilter + | VariantDataHasKeyFilter + | VariantDisabledFilter | VariantIdFilter | VariantListPriceFilter | VariantSalesPriceFilter @@ -2768,9 +2915,10 @@ export type PopularProductCategoriesRecommendationRequest = ProductCategoryRecom }; export type PopularProductsRequest = ProductRecommendationRequest & { - basedOn: "MostPurchased" | "MostViewed"; + basedOn: "MostPurchased" | "MostViewed" | "LineRevenue"; /** @format int32 */ sinceMinutesAgo: number; + popularityMultiplier?: DataKeyPopularityMultiplierSelector | null; }; export type PopularSearchTermsRecommendationRequest = RecommendationRequest & { @@ -2778,6 +2926,10 @@ export type PopularSearchTermsRecommendationRequest = RecommendationRequest & { settings?: RecommendPopularSearchTermSettings | null; }; +export interface PopularityMultiplierSelector { + $type: string; +} + export type PredictionRule = SearchRule & { condition: SearchTermCondition; promote: PredictionRulePromotion; @@ -2963,6 +3115,10 @@ export type ProductCategoryDataDoubleValueFacetResult = DoubleProductCategoryDat export type ProductCategoryDataFilter = DataFilter; +export type ProductCategoryDataHasKeyFilter = Filter & { + key: string; +}; + export type ProductCategoryDataObjectFacet = DataObjectFacet; export type ProductCategoryDataObjectFacetResult = DataObjectFacetResult; @@ -2984,6 +3140,8 @@ export type ProductCategoryDetailsCollectionResponse = TimedResponse & { totalNumberOfResults?: number | null; }; +export type ProductCategoryDisabledFilter = Filter; + export type ProductCategoryFacetQuery = FacetQuery & { items: ( | ContentAssortmentFacet @@ -3326,6 +3484,10 @@ export type ProductDataDoubleValueFacetResult = DoubleProductDataValueFacetResul export type ProductDataFilter = DataFilter; +export type ProductDataHasKeyFilter = Filter & { + key: string; +}; + export type ProductDataIntegerValueFacet = Int32ProductDataValueFacet; export type ProductDataIntegerValueFacetResult = Int32ProductDataValueFacetResult; @@ -3364,6 +3526,8 @@ export type ProductDetailsCollectionResponse = TimedResponse & { nextPageToken?: string | null; }; +export type ProductDisabledFilter = Filter; + export type ProductDisplayNameFilter = Filter & { language?: Language | null; conditions?: ValueConditionCollection | null; @@ -3452,6 +3616,8 @@ export interface ProductFacetResult { | null; } +export type ProductHasCategoriesFilter = Filter; + export type ProductHasVariantsFilter = Filter & { numberOfVariants: Int32NullableRange; }; @@ -3627,17 +3793,20 @@ export type ProductPromotion = Promotion & { }; export type ProductPromotionSpecification = PromotionSpecification & { - /** @format int32 */ - maxCount?: number | null; promotableProducts?: FilterCollection | null; }; +export type ProductPromotionSpecificationVariation = PromotionSpecificationVariation & { + /** @format int32 */ + maxCount: number; +}; + export interface ProductPropertySelector { $type: string; } export type ProductQuery = LicensedRequest & { - filters: FilterCollection; + filters?: FilterCollection | null; /** * @deprecated * @format int32 @@ -3927,6 +4096,10 @@ export type ProductSearchResponse = PaginatedSearchResponse & { retailMedia?: RetailMediaResult | null; }; +export interface ProductSearchResultConstraint { + $type: string; +} + export type ProductSearchSettings = SearchSettings & { selectedProductProperties?: SelectedProductPropertiesSettings | null; selectedVariantProperties?: SelectedVariantPropertiesSettings | null; @@ -3936,6 +4109,7 @@ export type ProductSearchSettings = SearchSettings & { recommendations: RecommendationSettings; selectedBrandProperties?: SelectedBrandPropertiesSettings | null; variantSettings?: VariantSearchSettings | null; + resultConstraint?: ResultMustHaveVariantConstraint | null; }; export interface ProductSortBySpecification { @@ -4031,27 +4205,26 @@ export interface PromotionLocationCollection { export interface PromotionLocationPlacement { key?: string | null; - variations?: PromotionLocationPlacementVariationCollection | null; } export interface PromotionLocationPlacementCollection { items?: PromotionLocationPlacement[] | null; } -export interface PromotionLocationPlacementVariation { - key?: string | null; +export interface PromotionSpecification { + $type: string; } -export interface PromotionLocationPlacementVariationCollection { - items?: PromotionLocationPlacementVariation[] | null; +export interface PromotionSpecificationCollection { + productPromotion?: ProductPromotionSpecification | null; } -export interface PromotionSpecification { +export interface PromotionSpecificationVariation { $type: string; } -export interface PromotionSpecificationCollection { - productPromotion?: ProductPromotionSpecification | null; +export interface PromotionSpecificationVariationCollection { + productPromotion?: ProductPromotionSpecificationVariation | null; } export interface PurchasedByUserCompanyInfo { @@ -4254,19 +4427,23 @@ export interface RequestFilterCriteria { count?: Int32NullableRange | null; } -export interface RetailMediaEntity2AdvertiserEntityStateAdvertiserMetadataCollectionRetailMediaEntity2EntityFilters { +export type ResultMustHaveVariantConstraint = ProductSearchResultConstraint & { + exceptWhenProductHasNoVariants: boolean; +}; + +export interface RetailMediaEntity2AdvertiserEntityStateAdvertiserMetadataValuesRetailMediaEntity2EntityFilters { $type: string; term?: string | null; states?: ("Active" | "Inactive" | "Archived")[] | null; } -export interface RetailMediaEntity2CampaignEntityStateCampaignMetadataCollectionRetailMediaEntity2EntityFilters { +export interface RetailMediaEntity2CampaignEntityStateCampaignMetadataValuesRetailMediaEntity2EntityFilters { $type: string; term?: string | null; states?: ("Proposed" | "Approved" | "Archived")[] | null; } -export interface RetailMediaEntity2LocationEntityStateLocationMetadataCollectionRetailMediaEntity2EntityFilters { +export interface RetailMediaEntity2LocationEntityStateLocationMetadataValuesRetailMediaEntity2EntityFilters { $type: string; term?: string | null; states?: ("Active" | "Inactive" | "Archived")[] | null; @@ -4294,12 +4471,16 @@ export interface RetailMediaResult { placements?: Record; } -export interface RetailMediaResultEntity { - product?: ProductResult | null; +export interface RetailMediaResultPlacement { + results?: RetailMediaResultPlacementResultEntity[] | null; } -export interface RetailMediaResultPlacement { - results?: RetailMediaResultEntity[] | null; +export interface RetailMediaResultPlacementResultEntity { + promotedProduct?: RetailMediaResultPlacementResultEntityProduct | null; +} + +export interface RetailMediaResultPlacementResultEntityProduct { + result: ProductResult; } export type SaveAdvertisersRequest = AdvertiserSaveEntitiesRequest; @@ -5317,6 +5498,7 @@ export interface ValueConditionCollection { | DistinctCondition | EqualsCondition | GreaterThanCondition + | HasValueCondition | LessThanCondition | RelativeDateTimeCondition )[] @@ -5373,8 +5555,14 @@ export interface VariantChangeTriggerResultVariantChangeTriggerResultSettingsVar export type VariantDataFilter = DataFilter; +export type VariantDataHasKeyFilter = Filter & { + key: string; +}; + export type VariantDataRelevanceModifier = DataRelevanceModifier; +export type VariantDisabledFilter = Filter; + export type VariantIdFilter = Filter & { variantIds: string[]; }; @@ -5451,6 +5639,7 @@ export type VariantSalesPriceRelevanceModifier = RelevanceModifier & { }; export interface VariantSearchSettings { + /** @deprecated */ excludeResultsWithoutVariant: boolean; }