From 3542e4d6cecf89aa7d508a33af0fb6118607f05f Mon Sep 17 00:00:00 2001 From: RAORelewise Date: Wed, 8 May 2024 11:48:18 +0200 Subject: [PATCH] feat: Add support for new 'Descendants' CategorySelectionStrategy This is only available for the CategoryHierarchyFacet --- .../src/builders/search/facetBuilder.ts | 4 +- packages/client/src/models/data-contracts.ts | 1018 +++++++++-------- 2 files changed, 522 insertions(+), 500 deletions(-) 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/models/data-contracts.ts b/packages/client/src/models/data-contracts.ts index cd92051..91dc9b5 100644 --- a/packages/client/src/models/data-contracts.ts +++ b/packages/client/src/models/data-contracts.ts @@ -9,8 +9,6 @@ * --------------------------------------------------------------- */ -type UtilRequiredKeys = Omit & Required>; - export type AbandonedCartTriggerConfiguration = AbandonedCartTriggerResultTriggerConfiguration & { cartName?: string | null; }; @@ -18,18 +16,22 @@ export type AbandonedCartTriggerConfiguration = AbandonedCartTriggerResultTrigge export interface AbandonedCartTriggerResultTriggerConfiguration { $type: string; custom?: Record; + /** @format uuid */ id: string; name?: string | null; description?: string | null; group?: string | null; enabled: boolean; + /** @format date-time */ created: string; createdBy?: string | null; + /** @format date-time */ modified: string; modifiedBy?: string | null; + /** @format int32 */ withinTimeSpanMinutes: number; settings?: Record; @@ -40,25 +42,28 @@ export type AbandonedSearchTriggerConfiguration = AbandonedSearchTriggerResultTr searchTypesInPrioritizedOrder: ("Product" | "ProductCategory" | "Content")[]; searchTermCondition?: SearchTermCondition | null; suppressOnEntityFromSearchResultViewed: boolean; - /** @format int32 */ considerAbandonedAfterMinutes: number; }; export interface AbandonedSearchTriggerResultTriggerConfiguration { $type: string; custom?: Record; + /** @format uuid */ id: string; name?: string | null; description?: string | null; group?: string | null; enabled: boolean; + /** @format date-time */ created: string; createdBy?: string | null; + /** @format date-time */ modified: string; modifiedBy?: string | null; + /** @format int32 */ withinTimeSpanMinutes: number; settings?: Record; @@ -72,42 +77,49 @@ export interface AnalyzerRequest { custom?: Record; } -export type AndCondition = UserCondition & { - conditions?: UserConditionCollection | null; -}; +export type AndCondition = UserCondition & { conditions?: UserConditionCollection | null }; export type AndFilter = Filter & { filters: ( | AndFilter | BrandAssortmentFilter | BrandDataFilter + | BrandDisabledFilter | BrandIdFilter | CartDataFilter | CompanyDataFilter + | CompanyDisabledFilter | CompanyIdFilter | ContentAssortmentFilter | ContentCategoryAssortmentFilter | ContentCategoryDataFilter + | ContentCategoryDisabledFilter | ContentCategoryHasAncestorFilter | ContentCategoryHasChildFilter | ContentCategoryHasContentsFilter | ContentCategoryHasParentFilter | ContentCategoryIdFilter | ContentCategoryLevelFilter + | ContentCategoryRecentlyViewedByUserFilter | ContentDataFilter + | ContentDisabledFilter | ContentIdFilter + | ContentRecentlyViewedByUserFilter | OrFilter | ProductAndVariantIdFilter | ProductAssortmentFilter | ProductCategoryAssortmentFilter | ProductCategoryDataFilter + | ProductCategoryDisabledFilter | ProductCategoryHasAncestorFilter | ProductCategoryHasChildFilter | ProductCategoryHasParentFilter | ProductCategoryHasProductsFilter | ProductCategoryIdFilter | ProductCategoryLevelFilter + | ProductCategoryRecentlyViewedByUserFilter | ProductDataFilter + | ProductDisabledFilter | ProductDisplayNameFilter | ProductHasVariantsFilter | ProductIdFilter @@ -115,12 +127,15 @@ export type AndFilter = Filter & { | ProductRecentlyPurchasedByCompanyFilter | ProductRecentlyPurchasedByUserCompanyFilter | ProductRecentlyPurchasedByUserFilter + | ProductRecentlyPurchasedByUserParentCompanyFilter | ProductRecentlyViewedByCompanyFilter | ProductRecentlyViewedByUserCompanyFilter | ProductRecentlyViewedByUserFilter + | ProductRecentlyViewedByUserParentCompanyFilter | ProductSalesPriceFilter | VariantAssortmentFilter | VariantDataFilter + | VariantDisabledFilter | VariantIdFilter | VariantListPriceFilter | VariantSalesPriceFilter @@ -136,9 +151,7 @@ export interface ApplicableLanguages { languages?: Language[] | null; } -export type ApplyFilterSettings = FilterScopeSettings & { - apply: boolean; -}; +export type ApplyFilterSettings = FilterScopeSettings & { apply: boolean }; export interface AssortmentFacet { $type: string; @@ -186,6 +199,7 @@ export type BatchedTrackingRequest = TrackingRequest & { export interface BooleanAvailableFacetValue { value: boolean; + /** @format int32 */ hits: number; selected: boolean; @@ -283,31 +297,26 @@ export type BrandAdministrativeAction = Trackable & { currency?: Currency | null; }; -export type BrandAssortmentFilter = Filter & { - assortments: number[]; -}; +export type BrandAssortmentFilter = Filter & { assortments: number[] }; export type BrandDataFilter = DataFilter; export type BrandDetailsCollectionResponse = TimedResponse & { brands?: BrandResultDetails[] | null; - /** @format int32 */ totalNumberOfResults?: number | null; }; +export type BrandDisabledFilter = Filter; + export type BrandFacet = StringValueFacet; export type BrandFacetResult = StringBrandNameAndIdResultValueFacetResult; -export type BrandIdFilter = Filter & { - brandIds: string[]; -}; +export type BrandIdFilter = Filter & { brandIds: string[] }; export type BrandIdRelevanceModifier = RelevanceModifier & { brandId?: string | null; - /** @format double */ ifProductIsBrandMultiplyWeightBy: number; - /** @format double */ ifProductIsNotBrandMultiplyWeightBy: number; }; @@ -323,6 +332,7 @@ export interface BrandNameAndIdResult { export interface BrandNameAndIdResultAvailableFacetValue { value?: BrandNameAndIdResult | null; + /** @format int32 */ hits: number; selected: boolean; @@ -330,11 +340,9 @@ export interface BrandNameAndIdResultAvailableFacetValue { export type BrandQuery = LicensedRequest & { filters: FilterCollection; - /** @format int32 */ numberOfResults: number; language?: Language | null; currency?: Currency | null; - /** @format int32 */ skipNumberOfResults: number; returnTotalNumberOfResults: boolean; includeDisabledBrands: boolean; @@ -349,7 +357,6 @@ export interface BrandRecommendationRequest { filters: FilterCollection; displayedAtLocationType: string; currency?: Currency | null; - /** @deprecated */ channel?: Channel | null; custom?: Record; } @@ -362,19 +369,20 @@ export interface BrandRecommendationRequestSettings { prioritizeDiversityBetweenRequests: boolean; selectedBrandProperties?: SelectedBrandPropertiesSettings | null; custom?: Record; + /** @format int32 */ prioritizeResultsNotRecommendedWithinSeconds?: number | null; } -export type BrandRecommendationResponse = RecommendationResponse & { - recommendations?: BrandResult[] | null; -}; +export type BrandRecommendationResponse = RecommendationResponse & { recommendations?: BrandResult[] | null }; export interface BrandRecommendationWeights { /** @format double */ brandViews: number; + /** @format double */ productViews: number; + /** @format double */ productPurchases: number; } @@ -382,6 +390,7 @@ export interface BrandRecommendationWeights { export interface BrandResult { id?: string | null; displayName?: string | null; + /** @format int32 */ rank: number; viewedByUser?: ViewedByUserInfo | null; @@ -396,16 +405,21 @@ export interface BrandResultDetails { assortments?: number[] | null; data?: Record; viewedByUser?: ViewedByUserInfo | null; + /** @format date-time */ createdUtc: string; + /** @format date-time */ lastViewedUtc?: string | null; + /** @format int64 */ viewedTotalNumberOfTimes: number; + /** @format int32 */ viewedByDifferentNumberOfUsers: number; disabled: boolean; custom?: Record; + /** @format int32 */ purchasedFromByDifferentNumberOfUsers: number; purchasedByUser?: PurchasedByUserInfo | null; @@ -416,12 +430,7 @@ export type BrandUpdate = Trackable & { kind: "None" | "UpdateAndAppend" | "ReplaceProvidedProperties" | "ClearAndReplace"; }; -export type BrandView = Trackable & { - user?: User | null; - brand: Brand; - /** @deprecated */ - channel?: Channel | null; -}; +export type BrandView = Trackable & { user?: User | null; brand: Brand; channel?: Channel | null }; export type Cart = Trackable & { user?: User | null; @@ -429,7 +438,6 @@ export type Cart = Trackable & { subtotal?: Money | null; lineItems?: LineItem[] | null; data?: Record; - /** @deprecated */ channel?: Channel | null; }; @@ -444,6 +452,7 @@ export type CartDataFilter = Filter & { export interface CartDetails { name?: string | null; + /** @format date-time */ modifiedUtc: string; lineItems?: LineItem[] | null; @@ -471,15 +480,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 @@ -487,12 +496,13 @@ export type CategoryHierarchyFacet = CategoryPathValueFacet & { }; export type CategoryHierarchyFacetResult = FacetResult & { - categorySelectionStrategy: "ImmediateParent" | "Ancestors"; + categorySelectionStrategy: "ImmediateParent" | "Ancestors" | "Descendants"; nodes: CategoryHierarchyFacetResultCategoryNode[]; }; export interface CategoryHierarchyFacetResultCategoryNode { category: ContentCategoryResult | ProductCategoryResult; + /** @format int32 */ hits: number; parentId?: string | null; @@ -540,6 +550,7 @@ export interface CategoryNameAndIdResult { export interface CategoryNameAndIdResultAvailableFacetValue { value?: CategoryNameAndIdResult | null; + /** @format int32 */ hits: number; selected: boolean; @@ -551,6 +562,7 @@ export interface CategoryPath { export interface CategoryPathResult { pathFromRoot?: CategoryNameAndIdResult[] | null; + /** @format int32 */ rank: number; } @@ -570,6 +582,7 @@ export interface CategoryResult { $type: string; categoryId?: string | null; displayName?: string | null; + /** @format int32 */ rank: number; viewedByUser?: ViewedByUserInfo | null; @@ -607,9 +620,9 @@ export type CompanyAdministrativeAction = Trackable & { export type CompanyDataFilter = DataFilter; -export type CompanyIdFilter = Filter & { - companyIds: string[]; -}; +export type CompanyDisabledFilter = Filter; + +export type CompanyIdFilter = Filter & { companyIds: string[] }; export type CompanyUpdate = Trackable & { company: Company; @@ -651,9 +664,7 @@ export type ContentAssortmentFacet = AssortmentFacet; export type ContentAssortmentFacetResult = AssortmentFacetResult; -export type ContentAssortmentFilter = Filter & { - assortments: number[]; -}; +export type ContentAssortmentFilter = Filter & { assortments: number[] }; export type ContentAttributeSorting = ContentSorting & { attribute: "Id" | "DisplayName"; @@ -664,18 +675,19 @@ export type ContentCategory = Category; export type ContentCategoryAdministrativeAction = CategoryAdministrativeAction; -export type ContentCategoryAssortmentFilter = Filter & { - assortments: number[]; -}; +export type ContentCategoryAssortmentFilter = Filter & { assortments: number[] }; export type ContentCategoryDataFilter = DataFilter; +export type ContentCategoryDataRelevanceModifier = DataRelevanceModifier; + export type ContentCategoryDetailsCollectionResponse = TimedResponse & { categories?: ContentCategoryResultDetails[] | null; - /** @format int32 */ totalNumberOfResults?: number | null; }; +export type ContentCategoryDisabledFilter = Filter; + export type ContentCategoryHasAncestorFilter = HasAncestorCategoryFilter; export type ContentCategoryHasChildFilter = HasChildCategoryFilter; @@ -689,16 +701,20 @@ export type ContentCategoryIdFilter = CategoryIdFilter; export interface ContentCategoryIdFilterCategoryQuery { $type: string; filters: FilterCollection; + /** @format int32 */ numberOfResults: number; language?: Language | null; currency?: Currency | null; + /** @format int32 */ skipNumberOfResults: number; returnTotalNumberOfResults: boolean; includeDisabledCategories: boolean; + /** @format int32 */ includeChildCategoriesToDepth: number; + /** @format int32 */ includeParentCategoriesToDepth: number; custom?: Record; @@ -713,18 +729,22 @@ export type ContentCategoryInterestTriggerConfiguration = ContentCategoryInteres export interface ContentCategoryInterestTriggerResultTriggerConfiguration { $type: string; custom?: Record; + /** @format uuid */ id: string; name?: string | null; description?: string | null; group?: string | null; enabled: boolean; + /** @format date-time */ created: string; createdBy?: string | null; + /** @format date-time */ modified: string; modifiedBy?: string | null; + /** @format int32 */ withinTimeSpanMinutes: number; settings?: Record; @@ -735,6 +755,13 @@ export type ContentCategoryLevelFilter = CategoryLevelFilter; export type ContentCategoryQuery = ContentCategoryIdFilterCategoryQuery; +export type ContentCategoryRecentlyViewedByUserFilter = Filter & { + sinceUtc?: string | null; + sinceMinutesAgo?: number | null; +}; + +export type ContentCategoryRecentlyViewedByUserRelevanceModifier = RecentlyViewedByUserRelevanceModifier; + export interface ContentCategoryRecommendationRequest { $type: string; settings: ContentCategoryRecommendationRequestSettings; @@ -744,7 +771,6 @@ export interface ContentCategoryRecommendationRequest { filters: FilterCollection; displayedAtLocationType: string; currency?: Currency | null; - /** @deprecated */ channel?: Channel | null; custom?: Record; } @@ -762,6 +788,7 @@ export interface ContentCategoryRecommendationRequestSettings { prioritizeDiversityBetweenRequests: boolean; selectedContentCategoryProperties?: SelectedContentCategoryPropertiesSettings | null; custom?: Record; + /** @format int32 */ prioritizeResultsNotRecommendedWithinSeconds?: number | null; } @@ -777,6 +804,7 @@ export type ContentCategoryRecommendationResponseCollection = TimedResponse & { export interface ContentCategoryRecommendationWeights { /** @format double */ categoryViews: number; + /** @format double */ contentViews: number; } @@ -792,12 +820,16 @@ export interface ContentCategoryResultDetailsCategoryResultDetails { assortments?: number[] | null; data?: Record; viewedByUser?: ViewedByUserInfo | null; + /** @format date-time */ createdUtc: string; + /** @format date-time */ lastViewedUtc?: string | null; + /** @format int64 */ viewedTotalNumberOfTimes: number; + /** @format int32 */ viewedByDifferentNumberOfUsers: number; disabled: boolean; @@ -814,21 +846,13 @@ export type ContentCategorySearchRequest = PaginatedSearchRequest & { export type ContentCategorySearchResponse = PaginatedSearchResponse; export type ContentCategorySearchSettings = SearchSettings & { - /** @format int32 */ numberOfRecommendations?: number | null; onlyIncludeRecommendationsForEmptyResults?: boolean | null; }; -export type ContentCategoryUpdate = CategoryUpdate & { - category?: ContentCategory | null; -}; +export type ContentCategoryUpdate = CategoryUpdate & { category?: ContentCategory | null }; -export type ContentCategoryView = Trackable & { - user?: User | null; - idPath: string[]; - /** @deprecated */ - channel?: Channel | null; -}; +export type ContentCategoryView = Trackable & { user?: User | null; idPath: string[]; channel?: Channel | null }; export type ContentDataBooleanValueFacet = BooleanContentDataValueFacet; @@ -856,10 +880,9 @@ export type ContentDataObjectFacet = DataObjectFacet; export type ContentDataObjectFacetResult = DataObjectFacetResult; -export type ContentDataSorting = ContentSorting & { - key?: string | null; - mode: "Auto" | "Alphabetical" | "Numerical"; -}; +export type ContentDataRelevanceModifier = DataRelevanceModifier; + +export type ContentDataSorting = ContentSorting & { key?: string | null; mode: "Auto" | "Alphabetical" | "Numerical" }; export type ContentDataStringValueFacet = StringContentDataValueFacet; @@ -867,10 +890,11 @@ export type ContentDataStringValueFacetResult = StringContentDataValueFacetResul export type ContentDetailsCollectionResponse = TimedResponse & { contents?: ContentResultDetails[] | null; - /** @format int32 */ totalNumberOfResults?: number | null; }; +export type ContentDisabledFilter = Filter; + export type ContentFacetQuery = FacetQuery & { items: ( | ContentAssortmentFacet @@ -953,9 +977,7 @@ export interface ContentFacetResult { | null; } -export type ContentIdFilter = Filter & { - contentIds: string[]; -}; +export type ContentIdFilter = Filter & { contentIds: string[] }; export interface ContentIndexConfiguration { id?: FieldIndexConfiguration | null; @@ -968,16 +990,18 @@ export type ContentPopularitySorting = ContentSorting; export type ContentQuery = LicensedRequest & { filters: FilterCollection; - /** @format int32 */ numberOfResults: number; language?: Language | null; currency?: Currency | null; - /** @format int32 */ skipNumberOfResults: number; returnTotalNumberOfResults: boolean; includeDisabledContents: boolean; }; +export type ContentRecentlyViewedByUserFilter = Filter & { sinceUtc?: string | null; sinceMinutesAgo?: number | null }; + +export type ContentRecentlyViewedByUserRelevanceModifier = RecentlyViewedByUserRelevanceModifier; + export interface ContentRecommendationRequest { $type: string; settings: ContentRecommendationRequestSettings; @@ -987,7 +1011,6 @@ export interface ContentRecommendationRequest { filters: FilterCollection; displayedAtLocationType: string; currency?: Currency | null; - /** @deprecated */ channel?: Channel | null; custom?: Record; } @@ -1014,13 +1037,12 @@ export interface ContentRecommendationRequestSettings { selectedContentProperties?: SelectedContentPropertiesSettings | null; custom?: Record; prioritizeDiversityBetweenRequests: boolean; + /** @format int32 */ prioritizeResultsNotRecommendedWithinSeconds?: number | null; } -export type ContentRecommendationResponse = RecommendationResponse & { - recommendations?: ContentResult[] | null; -}; +export type ContentRecommendationResponse = RecommendationResponse & { recommendations?: ContentResult[] | null }; export type ContentRecommendationResponseCollection = TimedResponse & { responses?: ContentRecommendationResponse[] | null; @@ -1031,6 +1053,7 @@ export type ContentRelevanceSorting = ContentSorting; export interface ContentResult { contentId?: string | null; displayName?: string | null; + /** @format int32 */ rank: number; assortments?: number[] | null; @@ -1047,12 +1070,16 @@ export interface ContentResultDetails { data?: Record; categoryPaths?: CategoryPathResultDetails[] | null; viewedByUser?: ViewedByUserInfo | null; + /** @format date-time */ createdUtc: string; + /** @format date-time */ lastViewedUtc?: string | null; + /** @format int64 */ viewedTotalNumberOfTimes: number; + /** @format int32 */ viewedByDifferentNumberOfUsers: number; disabled: boolean; @@ -1093,20 +1120,11 @@ export type ContentUpdate = Trackable & { kind: "UpdateAndAppend" | "ReplaceProvidedProperties" | "ClearAndReplace"; }; -export type ContentView = Trackable & { - user?: User | null; - content: Content; - /** @deprecated */ - channel?: Channel | null; -}; +export type ContentView = Trackable & { user?: User | null; content: Content; channel?: Channel | null }; -export type ContentsViewedAfterViewingContentRequest = ContentRecommendationRequest & { - contentId: string; -}; +export type ContentsViewedAfterViewingContentRequest = ContentRecommendationRequest & { contentId: string }; -export type ContentsViewedAfterViewingMultipleContentsRequest = ContentRecommendationRequest & { - contentIds: string[]; -}; +export type ContentsViewedAfterViewingMultipleContentsRequest = ContentRecommendationRequest & { contentIds: string[] }; export type ContentsViewedAfterViewingMultipleProductsRequest = ContentRecommendationRequest & { productAndVariantIds: ProductAndVariantId[]; @@ -1129,9 +1147,7 @@ export type CustomProductRecommendationRequest = ProductRecommendationRequest & parameters?: Record; }; -export type DataDoubleSelector = ValueSelector & { - key?: string | null; -}; +export type DataDoubleSelector = ValueSelector & { key?: string | null }; export interface DataFilter { $type: string; @@ -1172,7 +1188,7 @@ export type DataObjectDoubleValueFacet = DoubleDataObjectValueFacet; export type DataObjectDoubleValueFacetResult = DoubleDataObjectValueFacetResult; -export type DataObjectFacet = UtilRequiredKeys & { +export type DataObjectFacet = Facet & { $type: string; key: string; items: ( @@ -1215,7 +1231,7 @@ export type DataObjectFacet = UtilRequiredKeys & { filter: DataObjectFilter; }; -export type DataObjectFacetResult = UtilRequiredKeys & { +export type DataObjectFacetResult = FacetResult & { $type: string; key?: string | null; items?: @@ -1273,8 +1289,10 @@ export interface DataObjectFilter { | ObjectValueRelativeDateTimeCondition )[] | null; + /** @format int32 */ skip?: number | null; + /** @format int32 */ take?: number | null; } @@ -1290,6 +1308,29 @@ export interface DataObjectValueSelector { fallbackSelector?: DataObjectValueSelector | null; } +export interface DataRelevanceModifier { + $type: string; + key?: string | null; + considerAsMatchIfKeyIsNotFound: boolean; + + /** @format double */ + multiplyWeightBy: number; + mustMatchAllConditions: boolean; + conditions?: + | ( + | ContainsCondition + | DistinctCondition + | EqualsCondition + | GreaterThanCondition + | LessThanCondition + | RelativeDateTimeCondition + )[] + | null; + multiplierSelector?: DataDoubleSelector | FixedDoubleValueSelector | null; + filters?: FilterCollection | null; + custom?: Record; +} + export interface DataValue { type: | "String" @@ -1311,12 +1352,14 @@ export interface DataValue { export interface DecimalNullableChainableRange { /** @format double */ lowerBoundInclusive?: number | null; + /** @format double */ upperBoundExclusive?: number | null; } export interface DecimalNullableChainableRangeAvailableFacetValue { value?: DecimalNullableChainableRange | null; + /** @format int32 */ hits: number; selected: boolean; @@ -1325,6 +1368,7 @@ export interface DecimalNullableChainableRangeAvailableFacetValue { export interface DecimalNullableRange { /** @format double */ lowerBoundInclusive?: number | null; + /** @format double */ upperBoundInclusive?: number | null; } @@ -1332,22 +1376,20 @@ export interface DecimalNullableRange { export interface DecimalRange { /** @format double */ lowerBoundInclusive: number; + /** @format double */ upperBoundInclusive: number; } export interface DecimalRangeAvailableFacetValue { value?: DecimalRange | null; + /** @format int32 */ hits: number; selected: boolean; } -export type DecompoundRule = SearchRule & { - word: string; - head?: string | null; - modifiers?: string[] | null; -}; +export type DecompoundRule = SearchRule & { word: string; head?: string | null; modifiers?: string[] | null }; export interface DecompoundRuleSaveSearchRulesRequest { $type: string; @@ -1365,6 +1407,7 @@ export interface DecompoundRuleSaveSearchRulesResponse { export interface DecompoundRuleSearchRulesResponse { $type: string; rules?: DecompoundRule[] | null; + /** @format int32 */ hits: number; statistics?: Statistics | null; @@ -1376,8 +1419,10 @@ export interface DecompoundRulesRequestSortBySearchRulesRequest { $type: string; filters: SearchRuleFilters; sorting: DecompoundRulesRequestSortBySorting; + /** @format int32 */ skip: number; + /** @format int32 */ take: number; custom?: Record; @@ -1392,19 +1437,13 @@ export type DecompoundRulesResponse = DecompoundRuleSearchRulesResponse; export type DeleteDecompoundRulesRequest = DeleteSearchRulesRequest; -export type DeleteMerchandisingRuleRequest = LicensedRequest & { - /** @format uuid */ - id: string; -}; +export type DeleteMerchandisingRuleRequest = LicensedRequest & { id: string }; export type DeletePredictionRulesRequest = DeleteSearchRulesRequest; export type DeleteRedirectRulesRequest = DeleteSearchRulesRequest; -export type DeleteSearchIndexRequest = LicensedRequest & { - id?: string | null; - deletedBy?: string | null; -}; +export type DeleteSearchIndexRequest = LicensedRequest & { id?: string | null; deletedBy?: string | null }; export type DeleteSearchResultModifierRulesRequest = DeleteSearchRulesRequest; @@ -1421,26 +1460,18 @@ export type DeleteSearchTermModifierRulesRequest = DeleteSearchRulesRequest; export type DeleteStemmingRulesRequest = DeleteSearchRulesRequest; -export type DeleteSynonymsRequest = LicensedRequest & { - ids?: string[] | null; - deletedBy?: string | null; -}; +export type DeleteSynonymsRequest = LicensedRequest & { ids?: string[] | null; deletedBy?: string | null }; export type DeleteSynonymsResponse = TimedResponse; -export type DeleteTriggerConfigurationRequest = LicensedRequest & { - /** @format uuid */ - id: string; -}; +export type DeleteTriggerConfigurationRequest = LicensedRequest & { id: string }; -export type DistinctCondition = ValueCondition & { - /** @format int32 */ - numberOfOccurrencesAllowedWithTheSameValue: number; -}; +export type DistinctCondition = ValueCondition & { numberOfOccurrencesAllowedWithTheSameValue: number }; export interface DoubleAvailableFacetValue { /** @format double */ value: number; + /** @format int32 */ hits: number; selected: boolean; @@ -1485,12 +1516,14 @@ export interface DoubleDataObjectValueFacetResult { export interface DoubleNullableChainableRange { /** @format double */ lowerBoundInclusive?: number | null; + /** @format double */ upperBoundExclusive?: number | null; } export interface DoubleNullableChainableRangeAvailableFacetValue { value?: DoubleNullableChainableRange | null; + /** @format int32 */ hits: number; selected: boolean; @@ -1515,6 +1548,7 @@ export interface DoubleNullableContentDataRangeFacetResult { export interface DoubleNullableContentDataRangesFacet { $type: string; predefinedRanges?: DoubleNullableChainableRange[] | null; + /** @format double */ expandedRangeSize?: number | null; selected?: DoubleNullableChainableRange[] | null; @@ -1526,6 +1560,7 @@ export interface DoubleNullableContentDataRangesFacet { export interface DoubleNullableContentDataRangesFacetResult { $type: string; key?: string | null; + /** @format double */ expandedRangeSize?: number | null; selected?: DoubleNullableChainableRange[] | null; @@ -1552,6 +1587,7 @@ export interface DoubleNullableDataObjectRangeFacetResult { export interface DoubleNullableDataObjectRangesFacet { $type: string; predefinedRanges?: DoubleNullableChainableRange[] | null; + /** @format double */ expandedRangeSize?: number | null; selected?: DoubleNullableChainableRange[] | null; @@ -1563,6 +1599,7 @@ export interface DoubleNullableDataObjectRangesFacet { export interface DoubleNullableDataObjectRangesFacetResult { $type: string; key?: string | null; + /** @format double */ expandedRangeSize?: number | null; selected?: DoubleNullableChainableRange[] | null; @@ -1589,6 +1626,7 @@ export interface DoubleNullableProductCategoryDataRangeFacetResult { export interface DoubleNullableProductCategoryDataRangesFacet { $type: string; predefinedRanges?: DoubleNullableChainableRange[] | null; + /** @format double */ expandedRangeSize?: number | null; selected?: DoubleNullableChainableRange[] | null; @@ -1600,6 +1638,7 @@ export interface DoubleNullableProductCategoryDataRangesFacet { export interface DoubleNullableProductCategoryDataRangesFacetResult { $type: string; key?: string | null; + /** @format double */ expandedRangeSize?: number | null; selected?: DoubleNullableChainableRange[] | null; @@ -1629,6 +1668,7 @@ export interface DoubleNullableProductDataRangesFacet { $type: string; dataSelectionStrategy: "Product" | "Variant" | "VariantWithFallbackToProduct" | "ProductWithFallbackToVariant"; predefinedRanges?: DoubleNullableChainableRange[] | null; + /** @format double */ expandedRangeSize?: number | null; selected?: DoubleNullableChainableRange[] | null; @@ -1641,6 +1681,7 @@ export interface DoubleNullableProductDataRangesFacetResult { $type: string; key?: string | null; dataSelectionStrategy: "Product" | "Variant" | "VariantWithFallbackToProduct" | "ProductWithFallbackToVariant"; + /** @format double */ expandedRangeSize?: number | null; selected?: DoubleNullableChainableRange[] | null; @@ -1651,12 +1692,14 @@ export interface DoubleNullableProductDataRangesFacetResult { export interface DoubleNullableRange { /** @format double */ lowerBoundInclusive?: number | null; + /** @format double */ upperBoundInclusive?: number | null; } export interface DoubleNullableRangeAvailableFacetValue { value?: DoubleNullableRange | null; + /** @format int32 */ hits: number; selected: boolean; @@ -1703,13 +1746,12 @@ export interface DoubleProductDataValueFacetResult { export interface DoubleRange { /** @format double */ lowerBoundInclusive: number; + /** @format double */ upperBoundInclusive: number; } -export type EqualsCondition = ValueCondition & { - value?: DataValue | null; -}; +export type EqualsCondition = ValueCondition & { value?: DataValue | null }; export interface ExpectedSearchTermResult { /** @format int32 */ @@ -1739,6 +1781,7 @@ export interface FacetSettings { export interface FieldIndexConfiguration { included: boolean; + /** @format int32 */ weight: number; predictionSourceType: "Disabled" | "IndividualWords" | "PartialWordSequences" | "CompleteWordSequence"; @@ -1759,33 +1802,42 @@ export interface FilterCollection { | AndFilter | BrandAssortmentFilter | BrandDataFilter + | BrandDisabledFilter | BrandIdFilter | CartDataFilter | CompanyDataFilter + | CompanyDisabledFilter | CompanyIdFilter | ContentAssortmentFilter | ContentCategoryAssortmentFilter | ContentCategoryDataFilter + | ContentCategoryDisabledFilter | ContentCategoryHasAncestorFilter | ContentCategoryHasChildFilter | ContentCategoryHasContentsFilter | ContentCategoryHasParentFilter | ContentCategoryIdFilter | ContentCategoryLevelFilter + | ContentCategoryRecentlyViewedByUserFilter | ContentDataFilter + | ContentDisabledFilter | ContentIdFilter + | ContentRecentlyViewedByUserFilter | OrFilter | ProductAndVariantIdFilter | ProductAssortmentFilter | ProductCategoryAssortmentFilter | ProductCategoryDataFilter + | ProductCategoryDisabledFilter | ProductCategoryHasAncestorFilter | ProductCategoryHasChildFilter | ProductCategoryHasParentFilter | ProductCategoryHasProductsFilter | ProductCategoryIdFilter | ProductCategoryLevelFilter + | ProductCategoryRecentlyViewedByUserFilter | ProductDataFilter + | ProductDisabledFilter | ProductDisplayNameFilter | ProductHasVariantsFilter | ProductIdFilter @@ -1793,12 +1845,15 @@ export interface FilterCollection { | ProductRecentlyPurchasedByCompanyFilter | ProductRecentlyPurchasedByUserCompanyFilter | ProductRecentlyPurchasedByUserFilter + | ProductRecentlyPurchasedByUserParentCompanyFilter | ProductRecentlyViewedByCompanyFilter | ProductRecentlyViewedByUserCompanyFilter | ProductRecentlyViewedByUserFilter + | ProductRecentlyViewedByUserParentCompanyFilter | ProductSalesPriceFilter | VariantAssortmentFilter | VariantDataFilter + | VariantDisabledFilter | VariantIdFilter | VariantListPriceFilter | VariantSalesPriceFilter @@ -1822,25 +1877,27 @@ export interface FilterSettings { scopes?: FilterScopes | null; } -export type FixedDoubleValueSelector = ValueSelector & { - /** @format double */ - value: number; -}; +export interface FilteredVariantsSettings { + filters?: FilterCollection | null; + inheritFiltersFromRequest?: boolean | null; +} -export type FixedPositionRule = MerchandisingRule & { - /** @format int32 */ - position: number; -}; +export type FixedDoubleValueSelector = ValueSelector & { value: number }; + +export type FixedPositionRule = MerchandisingRule & { position: number }; export interface GlobalTriggerConfiguration { /** @format date-time */ modified: string; modifiedBy?: string | null; enabled: boolean; + /** @format int32 */ minimumCooldownAnyTrigger?: number | null; + /** @format int32 */ minimumCooldownSameTrigger?: number | null; + /** @format int32 */ minimumCooldownSameGroup?: number | null; settings?: Record; @@ -1848,21 +1905,11 @@ export interface GlobalTriggerConfiguration { export type GlobalTriggerConfigurationRequest = LicensedRequest; -export type GlobalTriggerConfigurationResponse = TimedResponse & { - configuration?: GlobalTriggerConfiguration | null; -}; +export type GlobalTriggerConfigurationResponse = TimedResponse & { configuration?: GlobalTriggerConfiguration | null }; -export type GreaterThanCondition = ValueCondition & { - /** @format double */ - value: number; -}; +export type GreaterThanCondition = ValueCondition & { value: number }; -export type HasActivityCondition = UserCondition & { - /** @format int32 */ - withinMinutes: number; - /** @format int32 */ - forAtLeastSeconds: number; -}; +export type HasActivityCondition = UserCondition & { withinMinutes: number; forAtLeastSeconds: number }; export interface HasAncestorCategoryFilter { $type: string; @@ -1882,16 +1929,11 @@ export interface HasChildCategoryFilter { settings?: FilterSettings | null; } -export type HasClassificationCondition = UserCondition & { - key?: string | null; - value?: string | null; -}; +export type HasClassificationCondition = UserCondition & { key?: string | null; value?: string | null }; export type HasEmailCondition = UserCondition; -export type HasIdentifierCondition = UserCondition & { - key?: string | null; -}; +export type HasIdentifierCondition = UserCondition & { key?: string | null }; export type HasLineItemsInCartCondition = UserCondition & { numberOfItems?: Int32NullableRange | null; @@ -1899,11 +1941,7 @@ export type HasLineItemsInCartCondition = UserCondition & { filters?: FilterCollection | null; }; -export type HasModifiedCartCondition = UserCondition & { - /** @format int32 */ - withinMinutes: number; - cartName?: string | null; -}; +export type HasModifiedCartCondition = UserCondition & { withinMinutes: number; cartName?: string | null }; export interface HasParentCategoryFilter { $type: string; @@ -1913,23 +1951,14 @@ export interface HasParentCategoryFilter { settings?: FilterSettings | null; } -export type HasPlacedOrderCondition = UserCondition & { - /** @format int32 */ - withinMinutes: number; -}; +export type HasPlacedOrderCondition = UserCondition & { withinMinutes: number }; -export type HasRecentlyReceivedSameTriggerCondition = UserCondition & { - /** @format int32 */ - withinMinutes: number; -}; +export type HasRecentlyReceivedSameTriggerCondition = UserCondition & { withinMinutes: number }; export type HasRecentlyReceivedTriggerCondition = UserCondition & { - /** @format int32 */ withinMinutes: number; - /** @format uuid */ id?: string | null; group?: string | null; - /** @format int32 */ type?: number | null; }; @@ -1956,6 +1985,7 @@ export type InputModifierRule = MerchandisingRule; export interface Int32AvailableFacetValue { /** @format int32 */ value: number; + /** @format int32 */ hits: number; selected: boolean; @@ -1982,6 +2012,7 @@ export interface Int32ContentDataValueFacetResult { export interface Int32NullableRange { /** @format int32 */ lowerBoundInclusive?: number | null; + /** @format int32 */ upperBoundInclusive?: number | null; } @@ -2008,6 +2039,7 @@ export interface Int32ProductDataValueFacetResult { export interface KeyMultiplier { key?: string | null; + /** @format double */ multiplier: number; } @@ -2026,10 +2058,7 @@ export interface LanguageIndexConfigurationEntry { isO639_1?: string | null; } -export type LessThanCondition = ValueCondition & { - /** @format double */ - value: number; -}; +export type LessThanCondition = ValueCondition & { value: number }; export interface LicensedRequest { $type: string; @@ -2040,8 +2069,10 @@ export interface LineItem { product: Product; variant?: ProductVariant | null; custom?: Record; + /** @format float */ quantity: number; + /** @format double */ lineTotal: number; data?: Record; @@ -2058,20 +2089,24 @@ export interface MatchTypeSettings { export interface MerchandisingRule { $type: string; custom?: Record; + /** @format uuid */ id: string; name?: string | null; description?: string | null; group?: string | null; enabled: boolean; + /** @format date-time */ created: string; createdBy?: string | null; + /** @format date-time */ modified: string; modifiedBy?: string | null; conditions?: ConditionConfiguration | null; request?: RequestConfiguration | null; + /** @format double */ priority: number; settings?: Record; @@ -2081,21 +2116,13 @@ export type MerchandisingRuleCollectionResponse = TimedResponse & { rules?: (BoostAndBuryRule | FilterRule | FixedPositionRule | InputModifierRule)[] | null; }; -export type MerchandisingRuleRequest = LicensedRequest & { - /** @format uuid */ - id: string; - /** @format int32 */ - type?: number | null; -}; +export type MerchandisingRuleRequest = LicensedRequest & { id: string; type?: number | null }; export type MerchandisingRuleResponse = TimedResponse & { rule?: BoostAndBuryRule | FilterRule | FixedPositionRule | InputModifierRule | null; }; -export type MerchandisingRulesRequest = LicensedRequest & { - /** @format int32 */ - type?: number | null; -}; +export type MerchandisingRulesRequest = LicensedRequest & { type?: number | null }; export type MixedRecommendationResponseCollection = TimedResponse & { responses?: @@ -2145,28 +2172,15 @@ export interface ObjectValueCondition { objectPath?: string[] | null; } -export type ObjectValueContainsCondition = ObjectValueCondition & { - value?: DataValue | null; - mode: "All" | "Any"; -}; +export type ObjectValueContainsCondition = ObjectValueCondition & { value?: DataValue | null; mode: "All" | "Any" }; -export type ObjectValueEqualsCondition = ObjectValueCondition & { - value?: DataValue | null; -}; +export type ObjectValueEqualsCondition = ObjectValueCondition & { value?: DataValue | null }; -export type ObjectValueGreaterThanCondition = ObjectValueCondition & { - /** @format double */ - value: number; -}; +export type ObjectValueGreaterThanCondition = ObjectValueCondition & { value: number }; -export type ObjectValueInRangeCondition = ObjectValueCondition & { - range?: DoubleRange | null; -}; +export type ObjectValueInRangeCondition = ObjectValueCondition & { range?: DoubleRange | null }; -export type ObjectValueLessThanCondition = ObjectValueCondition & { - /** @format double */ - value: number; -}; +export type ObjectValueLessThanCondition = ObjectValueCondition & { value: number }; export type ObjectValueMaxByCondition = ObjectValueCondition; @@ -2175,62 +2189,64 @@ export type ObjectValueMinByCondition = ObjectValueCondition; export type ObjectValueRelativeDateTimeCondition = ObjectValueCondition & { comparison: "Before" | "After"; unit: "UnixMilliseconds" | "UnixSeconds" | "UnixMinutes"; - /** @format int64 */ currentTimeOffset: number; }; -export type ObservableProductAttributeSelector = ProductPropertySelector & { - attribute: "ListPrice" | "SalesPrice"; -}; +export type ObservableProductAttributeSelector = ProductPropertySelector & { attribute: "ListPrice" | "SalesPrice" }; export type ObservableProductDataValueSelector = ProductPropertySelector & { dataObjectValueSelector?: DataObjectValueSelector | null; }; -export type ObservableVariantAttributeSelector = VariantPropertySelector & { - attribute: "ListPrice" | "SalesPrice"; -}; +export type ObservableVariantAttributeSelector = VariantPropertySelector & { attribute: "ListPrice" | "SalesPrice" }; export type ObservableVariantDataValueSelector = VariantPropertySelector & { dataObjectValueSelector?: DataObjectValueSelector | null; }; -export type OrCondition = UserCondition & { - conditions?: UserConditionCollection | null; -}; +export type OrCondition = UserCondition & { conditions?: UserConditionCollection | null }; export type OrFilter = Filter & { filters: ( | AndFilter | BrandAssortmentFilter | BrandDataFilter + | BrandDisabledFilter | BrandIdFilter | CartDataFilter | CompanyDataFilter + | CompanyDisabledFilter | CompanyIdFilter | ContentAssortmentFilter | ContentCategoryAssortmentFilter | ContentCategoryDataFilter + | ContentCategoryDisabledFilter | ContentCategoryHasAncestorFilter | ContentCategoryHasChildFilter | ContentCategoryHasContentsFilter | ContentCategoryHasParentFilter | ContentCategoryIdFilter | ContentCategoryLevelFilter + | ContentCategoryRecentlyViewedByUserFilter | ContentDataFilter + | ContentDisabledFilter | ContentIdFilter + | ContentRecentlyViewedByUserFilter | OrFilter | ProductAndVariantIdFilter | ProductAssortmentFilter | ProductCategoryAssortmentFilter | ProductCategoryDataFilter + | ProductCategoryDisabledFilter | ProductCategoryHasAncestorFilter | ProductCategoryHasChildFilter | ProductCategoryHasParentFilter | ProductCategoryHasProductsFilter | ProductCategoryIdFilter | ProductCategoryLevelFilter + | ProductCategoryRecentlyViewedByUserFilter | ProductDataFilter + | ProductDisabledFilter | ProductDisplayNameFilter | ProductHasVariantsFilter | ProductIdFilter @@ -2238,12 +2254,15 @@ export type OrFilter = Filter & { | ProductRecentlyPurchasedByCompanyFilter | ProductRecentlyPurchasedByUserCompanyFilter | ProductRecentlyPurchasedByUserFilter + | ProductRecentlyPurchasedByUserParentCompanyFilter | ProductRecentlyViewedByCompanyFilter | ProductRecentlyViewedByUserCompanyFilter | ProductRecentlyViewedByUserFilter + | ProductRecentlyViewedByUserParentCompanyFilter | ProductSalesPriceFilter | VariantAssortmentFilter | VariantDataFilter + | VariantDisabledFilter | VariantIdFilter | VariantListPriceFilter | VariantSalesPriceFilter @@ -2257,12 +2276,9 @@ export type Order = Trackable & { lineItems: LineItem[]; orderNumber: string; cartName: string; - /** @deprecated */ channel?: Channel | null; - /** @deprecated */ subChannel?: string | null; data?: Record; - /** @deprecated */ trackingNumber?: string | null; }; @@ -2274,6 +2290,7 @@ export interface OverriddenContentRecommendationRequestSettings { selectedContentProperties?: OverriddenSelectedContentPropertiesSettings | null; custom?: Record; prioritizeDiversityBetweenRequests?: boolean | null; + /** @format int32 */ prioritizeResultsNotRecommendedWithinSeconds?: number | null; } @@ -2290,6 +2307,7 @@ export interface OverriddenProductRecommendationRequestSettings { prioritizeDiversityBetweenRequests?: boolean | null; allowProductsCurrentlyInCart?: boolean | null; selectedBrandProperties?: OverriddenSelectedBrandPropertiesSettings | null; + /** @format int32 */ prioritizeResultsNotRecommendedWithinSeconds?: number | null; } @@ -2336,8 +2354,10 @@ export interface OverriddenSelectedVariantPropertiesSettings { export interface PaginatedSearchRequest { $type: string; + /** @format int32 */ skip: number; + /** @format int32 */ take: number; language?: Language | null; @@ -2348,7 +2368,6 @@ export interface PaginatedSearchRequest { filters?: FilterCollection | null; indexSelector?: SearchIndexSelector | null; postFilters?: FilterCollection | null; - /** @deprecated */ channel?: Channel | null; custom?: Record; } @@ -2365,13 +2384,11 @@ export interface Parser { } export type PersonalBrandRecommendationRequest = BrandRecommendationRequest & { - /** @format int32 */ sinceMinutesAgo: number; weights: BrandRecommendationWeights; }; export type PersonalContentCategoryRecommendationRequest = ContentCategoryRecommendationRequest & { - /** @format int32 */ sinceMinutesAgo: number; weights: ContentCategoryRecommendationWeights; }; @@ -2379,7 +2396,6 @@ export type PersonalContentCategoryRecommendationRequest = ContentCategoryRecomm export type PersonalContentRecommendationRequest = ContentRecommendationRequest; export type PersonalProductCategoryRecommendationRequest = ProductCategoryRecommendationRequest & { - /** @format int32 */ sinceMinutesAgo: number; weights: ProductCategoryRecommendationWeights; }; @@ -2387,31 +2403,24 @@ export type PersonalProductCategoryRecommendationRequest = ProductCategoryRecomm export type PersonalProductRecommendationRequest = ProductRecommendationRequest; export type PopularBrandsRecommendationRequest = BrandRecommendationRequest & { - /** @format int32 */ sinceMinutesAgo: number; weights: BrandRecommendationWeights; }; export type PopularContentCategoriesRecommendationRequest = ContentCategoryRecommendationRequest & { - /** @format int32 */ sinceMinutesAgo: number; weights: ContentCategoryRecommendationWeights; }; -export type PopularContentsRequest = ContentRecommendationRequest & { - /** @format int32 */ - sinceMinutesAgo: number; -}; +export type PopularContentsRequest = ContentRecommendationRequest & { sinceMinutesAgo: number }; export type PopularProductCategoriesRecommendationRequest = ProductCategoryRecommendationRequest & { - /** @format int32 */ sinceMinutesAgo: number; weights: ProductCategoryRecommendationWeights; }; export type PopularProductsRequest = ProductRecommendationRequest & { basedOn: "MostPurchased" | "MostViewed"; - /** @format int32 */ sinceMinutesAgo: number; }; @@ -2447,6 +2456,7 @@ export interface PredictionRuleSaveSearchRulesResponse { export interface PredictionRuleSearchRulesResponse { $type: string; rules?: PredictionRule[] | null; + /** @format int32 */ hits: number; statistics?: Statistics | null; @@ -2463,8 +2473,10 @@ export interface PredictionRulesRequestSortBySearchRulesRequest { $type: string; filters: SearchRuleFilters; sorting: PredictionRulesRequestSortBySorting; + /** @format int32 */ skip: number; + /** @format int32 */ take: number; custom?: Record; @@ -2490,14 +2502,12 @@ export type PriceRangeFacetResult = FacetResult & { export type PriceRangesFacet = Facet & { predefinedRanges?: DecimalNullableChainableRange[] | null; - /** @format double */ expandedRangeSize?: number | null; selected?: DecimalNullableChainableRange[] | null; priceSelectionStrategy: "Product" | "Variant" | "VariantWithFallbackToProduct" | "ProductWithFallbackToVariant"; }; export type PriceRangesFacetResult = FacetResult & { - /** @format double */ expandedRangeSize?: number | null; selected?: DecimalNullableChainableRange[] | null; available?: DecimalNullableChainableRangeAvailableFacetValue[] | null; @@ -2543,9 +2553,7 @@ export interface ProductAndVariantId { variantId?: string | null; } -export type ProductAndVariantIdFilter = Filter & { - productAndVariantIds: ProductAndVariantId[]; -}; +export type ProductAndVariantIdFilter = Filter & { productAndVariantIds: ProductAndVariantId[] }; export type ProductAssortmentFacet = AssortmentFacet & { assortmentSelectionStrategy: "Product" | "Variant" | "VariantWithFallbackToProduct" | "ProductWithFallbackToVariant"; @@ -2555,13 +2563,10 @@ export type ProductAssortmentFacetResult = AssortmentFacetResult & { assortmentSelectionStrategy: "Product" | "Variant" | "VariantWithFallbackToProduct" | "ProductWithFallbackToVariant"; }; -export type ProductAssortmentFilter = Filter & { - assortments: number[]; -}; +export type ProductAssortmentFilter = Filter & { assortments: number[] }; export type ProductAssortmentRelevanceModifier = RelevanceModifier & { assortments?: number[] | null; - /** @format double */ multiplyWeightBy: number; }; @@ -2578,9 +2583,7 @@ export type ProductCategoryAssortmentFacet = AssortmentFacet; export type ProductCategoryAssortmentFacetResult = AssortmentFacetResult; -export type ProductCategoryAssortmentFilter = Filter & { - assortments: number[]; -}; +export type ProductCategoryAssortmentFilter = Filter & { assortments: number[] }; export type ProductCategoryAttributeSorting = ProductCategorySorting & { attribute: "Id" | "DisplayName"; @@ -2609,6 +2612,8 @@ export type ProductCategoryDataObjectFacet = DataObjectFacet; export type ProductCategoryDataObjectFacetResult = DataObjectFacetResult; +export type ProductCategoryDataRelevanceModifier = DataRelevanceModifier; + export type ProductCategoryDataSorting = ProductCategorySorting & { key?: string | null; mode: "Auto" | "Alphabetical" | "Numerical"; @@ -2620,10 +2625,11 @@ export type ProductCategoryDataStringValueFacetResult = StringProductCategoryDat export type ProductCategoryDetailsCollectionResponse = TimedResponse & { categories?: ProductCategoryResultDetails[] | null; - /** @format int32 */ totalNumberOfResults?: number | null; }; +export type ProductCategoryDisabledFilter = Filter; + export type ProductCategoryFacetQuery = FacetQuery & { items: ( | ContentAssortmentFacet @@ -2719,16 +2725,20 @@ export type ProductCategoryIdFilter = CategoryIdFilter; export interface ProductCategoryIdFilterCategoryQuery { $type: string; filters: FilterCollection; + /** @format int32 */ numberOfResults: number; language?: Language | null; currency?: Currency | null; + /** @format int32 */ skipNumberOfResults: number; returnTotalNumberOfResults: boolean; includeDisabledCategories: boolean; + /** @format int32 */ includeChildCategoriesToDepth: number; + /** @format int32 */ includeParentCategoriesToDepth: number; custom?: Record; @@ -2737,7 +2747,6 @@ export interface ProductCategoryIdFilterCategoryQuery { export type ProductCategoryIdRelevanceModifier = RelevanceModifier & { categoryId?: string | null; evaluationScope: "ImmediateParent" | "ImmediateParentOrItsParent" | "Ancestor"; - /** @format double */ multiplyWeightBy: number; negated: boolean; }; @@ -2753,18 +2762,22 @@ export type ProductCategoryInterestTriggerConfiguration = ProductCategoryInteres export interface ProductCategoryInterestTriggerResultTriggerConfiguration { $type: string; custom?: Record; + /** @format uuid */ id: string; name?: string | null; description?: string | null; group?: string | null; enabled: boolean; + /** @format date-time */ created: string; createdBy?: string | null; + /** @format date-time */ modified: string; modifiedBy?: string | null; + /** @format int32 */ withinTimeSpanMinutes: number; settings?: Record; @@ -2777,6 +2790,13 @@ export type ProductCategoryPopularitySorting = ProductCategorySorting; export type ProductCategoryQuery = ProductCategoryIdFilterCategoryQuery; +export type ProductCategoryRecentlyViewedByUserFilter = Filter & { + sinceUtc?: string | null; + sinceMinutesAgo?: number | null; +}; + +export type ProductCategoryRecentlyViewedByUserRelevanceModifier = RecentlyViewedByUserRelevanceModifier; + export interface ProductCategoryRecommendationRequest { $type: string; settings: ProductCategoryRecommendationRequestSettings; @@ -2786,7 +2806,6 @@ export interface ProductCategoryRecommendationRequest { filters: FilterCollection; displayedAtLocationType: string; currency?: Currency | null; - /** @deprecated */ channel?: Channel | null; custom?: Record; } @@ -2804,6 +2823,7 @@ export interface ProductCategoryRecommendationRequestSettings { prioritizeDiversityBetweenRequests: boolean; selectedProductCategoryProperties?: SelectedProductCategoryPropertiesSettings | null; custom?: Record; + /** @format int32 */ prioritizeResultsNotRecommendedWithinSeconds?: number | null; } @@ -2819,8 +2839,10 @@ export type ProductCategoryRecommendationResponseCollection = TimedResponse & { export interface ProductCategoryRecommendationWeights { /** @format double */ categoryViews: number; + /** @format double */ productViews: number; + /** @format double */ productPurchases: number; } @@ -2830,7 +2852,6 @@ export type ProductCategoryRelevanceSorting = ProductCategorySorting; export type ProductCategoryResult = CategoryResult; export type ProductCategoryResultDetails = ProductCategoryResultDetailsCategoryResultDetails & { - /** @format int32 */ purchasedFromByDifferentNumberOfUsers: number; purchasedByUser?: PurchasedByUserInfo | null; }; @@ -2842,12 +2863,16 @@ export interface ProductCategoryResultDetailsCategoryResultDetails { assortments?: number[] | null; data?: Record; viewedByUser?: ViewedByUserInfo | null; + /** @format date-time */ createdUtc: string; + /** @format date-time */ lastViewedUtc?: string | null; + /** @format int64 */ viewedTotalNumberOfTimes: number; + /** @format int32 */ viewedByDifferentNumberOfUsers: number; disabled: boolean; @@ -2894,16 +2919,9 @@ export interface ProductCategorySorting { | null; } -export type ProductCategoryUpdate = CategoryUpdate & { - category?: ProductCategory | null; -}; +export type ProductCategoryUpdate = CategoryUpdate & { category?: ProductCategory | null }; -export type ProductCategoryView = Trackable & { - user?: User | null; - idPath: string[]; - /** @deprecated */ - channel?: Channel | null; -}; +export type ProductCategoryView = Trackable & { user?: User | null; idPath: string[]; channel?: Channel | null }; export type ProductChangeTriggerConfiguration = ProductChangeTriggerResultProductChangeTriggerResultSettingsProductPropertySelectorEntityChangeTriggerConfiguration; @@ -2916,18 +2934,22 @@ export interface ProductChangeTriggerResultProductChangeTriggerResultSettingsPro change: IChange; resultSettings: ProductChangeTriggerResultSettings; custom?: Record; + /** @format uuid */ id: string; name?: string | null; description?: string | null; group?: string | null; enabled: boolean; + /** @format date-time */ created: string; createdBy?: string | null; + /** @format date-time */ modified: string; modifiedBy?: string | null; + /** @format int32 */ withinTimeSpanMinutes: number; settings?: Record; @@ -2975,27 +2997,7 @@ export type ProductDataObjectSorting = ProductSorting & { valueSelector: DataObjectValueSelector; }; -export type ProductDataRelevanceModifier = RelevanceModifier & { - key?: string | null; - considerAsMatchIfKeyIsNotFound: boolean; - /** - * @deprecated - * @format double - */ - multiplyWeightBy: number; - mustMatchAllConditions: boolean; - conditions?: - | ( - | ContainsCondition - | DistinctCondition - | EqualsCondition - | GreaterThanCondition - | LessThanCondition - | RelativeDateTimeCondition - )[] - | null; - multiplierSelector?: DataDoubleSelector | FixedDoubleValueSelector | null; -}; +export type ProductDataRelevanceModifier = DataRelevanceModifier; export type ProductDataSorting = ProductSorting & { key?: string | null; @@ -3009,10 +3011,12 @@ export type ProductDataStringValueFacetResult = StringProductDataValueFacetResul export type ProductDetailsCollectionResponse = TimedResponse & { products?: ProductResultDetails[] | null; - /** @format int32 */ totalNumberOfResults?: number | null; + nextPageToken?: string | null; }; +export type ProductDisabledFilter = Filter; + export type ProductDisplayNameFilter = Filter & { language?: Language | null; conditions?: ValueConditionCollection | null; @@ -3101,17 +3105,12 @@ export interface ProductFacetResult { | null; } -export type ProductHasVariantsFilter = Filter & { - numberOfVariants: Int32NullableRange; -}; +export type ProductHasVariantsFilter = Filter & { numberOfVariants: Int32NullableRange }; -export type ProductIdFilter = Filter & { - productIds: string[]; -}; +export type ProductIdFilter = Filter & { productIds: string[] }; export type ProductIdRelevanceModifier = RelevanceModifier & { productIds?: string[] | null; - /** @format double */ multiplyWeightBy: number; negated: boolean; }; @@ -3139,46 +3138,42 @@ export interface ProductInterestTriggerResultResultSettings { export interface ProductInterestTriggerResultTriggerConfiguration { $type: string; custom?: Record; + /** @format uuid */ id: string; name?: string | null; description?: string | null; group?: string | null; enabled: boolean; + /** @format date-time */ created: string; createdBy?: string | null; + /** @format date-time */ modified: string; modifiedBy?: string | null; + /** @format int32 */ withinTimeSpanMinutes: number; settings?: Record; userConditions?: UserConditionCollection | null; } -export type ProductListPriceFilter = Filter & { - range: DecimalNullableRange; - currency?: Currency | null; -}; +export type ProductListPriceFilter = Filter & { range: DecimalNullableRange; currency?: Currency | null }; export type ProductListPriceRelevanceModifier = RelevanceModifier & { range: DecimalNullableRange; currency?: Currency | null; - /** @format double */ multiplyWeightBy: number; negated: boolean; }; export type ProductPerformanceRequest = AnalyzerRequest & { - /** @format int64 */ fromUnixTimeSeconds: number; - /** @format int64 */ toUnixTimeSeconds: number; filters?: FilterCollection | null; - /** @format int32 */ numberOfResults: number; - /** @format int32 */ skipNumberOfResults: number; byVariant: boolean; selectedProductProperties?: SelectedProductPropertiesSettings | null; @@ -3191,9 +3186,7 @@ export type ProductPerformanceRequest = AnalyzerRequest & { export type ProductPerformanceResponse = TimedResponse & { results?: ProductPerformanceResult[] | null; - /** @format int32 */ totalNumberOfResults: number; - /** @format int32 */ remainingNumberOfResults: number; }; @@ -3229,12 +3222,16 @@ export interface ProductPerformanceResultRankMetrics { export interface ProductPerformanceResultSalesByCurrency { currency?: Currency | null; + /** @format int32 */ orders: number; + /** @format double */ averageSubtotal: number; + /** @format double */ units: number; + /** @format double */ revenue: number; } @@ -3242,6 +3239,7 @@ export interface ProductPerformanceResultSalesByCurrency { export interface ProductPerformanceResultSalesMetrics { /** @format int32 */ orders: number; + /** @format double */ averageNoOfLineItems: number; currencies?: ProductPerformanceResultSalesByCurrency[] | null; @@ -3251,8 +3249,10 @@ export interface ProductPerformanceResultSalesMetrics { export interface ProductPerformanceResultSalesWithKnownCartOpenerMetrics { /** @format int32 */ orders: number; + /** @format int32 */ opened: number; + /** @format double */ openedPercent: number; } @@ -3260,6 +3260,7 @@ export interface ProductPerformanceResultSalesWithKnownCartOpenerMetrics { export interface ProductPerformanceResultViewsAndSalesMetrics { /** @format double */ byViews: number; + /** @format double */ bySales: number; } @@ -3277,68 +3278,98 @@ export interface ProductPropertySelector { export type ProductQuery = LicensedRequest & { filters: FilterCollection; - /** @format int32 */ numberOfResults: number; language?: Language | null; currency?: Currency | null; - /** @format int32 */ skipNumberOfResults: number; returnTotalNumberOfResults: boolean; includeDisabledProducts: boolean; includeDisabledVariants: boolean; excludeProductsWithNoVariants: boolean; + nextPageToken?: string | null; + pageSize?: number | null; }; export type ProductRecentlyPurchasedByCompanyFilter = Filter & { - /** @format date-time */ - sinceUtc: string; + sinceUtc?: string | null; companyIds: string[]; + sinceMinutesAgo?: number | null; +}; + +export type ProductRecentlyPurchasedByCompanyRelevanceModifier = RelevanceModifier & { + sinceUtc?: string | null; + companyIds?: string[] | null; + ifPurchasedByCompanyMultiplyWeightBy: number; + elseIfNotPurchasedByCompanyMultiplyWeightBy: number; + sinceMinutesAgo?: number | null; }; export type ProductRecentlyPurchasedByUserCompanyFilter = Filter & { - /** @format date-time */ - sinceUtc: string; + sinceUtc?: string | null; + sinceMinutesAgo?: number | null; +}; + +export type ProductRecentlyPurchasedByUserCompanyRelevanceModifier = RelevanceModifier & { + sinceUtc?: string | null; + ifPurchasedByCompanyMultiplyWeightBy: number; + elseIfPurchasedByParentCompanyMultiplyWeightBy: number; + elseIfNotPurchasedByEitherCompanyMultiplyWeightBy: number; + sinceMinutesAgo?: number | null; }; export type ProductRecentlyPurchasedByUserFilter = Filter & { - /** @format date-time */ - sinceUtc: string; + sinceUtc?: string | null; + sinceMinutesAgo?: number | null; +}; + +export type ProductRecentlyPurchasedByUserParentCompanyFilter = Filter & { + sinceUtc?: string | null; + sinceMinutesAgo?: number | null; }; export type ProductRecentlyPurchasedByUserRelevanceModifier = RelevanceModifier & { - /** @format date-time */ - sinceUtc: string; - /** @format double */ + sinceUtc?: string | null; ifPreviouslyPurchasedByUserMultiplyWeightBy: number; - /** @format double */ ifNotPreviouslyPurchasedByUserMultiplyWeightBy: number; + sinceMinutesAgo?: number | null; }; export type ProductRecentlyViewedByCompanyFilter = Filter & { - /** @format date-time */ - sinceUtc: string; + sinceUtc?: string | null; companyIds: string[]; + sinceMinutesAgo?: number | null; +}; + +export type ProductRecentlyViewedByCompanyRelevanceModifier = RelevanceModifier & { + sinceUtc?: string | null; + companyIds?: string[] | null; + ifViewedByCompanyMultiplyWeightBy: number; + elseIfNotViewedByCompanyMultiplyWeightBy: number; + sinceMinutesAgo?: number | null; }; export type ProductRecentlyViewedByUserCompanyFilter = Filter & { - /** @format date-time */ - sinceUtc: string; + sinceUtc?: string | null; + sinceMinutesAgo?: number | null; }; -export type ProductRecentlyViewedByUserFilter = Filter & { - /** @format date-time */ - sinceUtc: string; +export type ProductRecentlyViewedByUserCompanyRelevanceModifier = RelevanceModifier & { + sinceUtc?: string | null; + ifViewedByUserCompanyMultiplyWeightBy: number; + elseIfViewedByUserParentCompanyMultiplyWeightBy: number; + elseIfNotViewedByEitherCompanyMultiplyWeightBy: number; + sinceMinutesAgo?: number | null; }; -export type ProductRecentlyViewedByUserRelevanceModifier = RelevanceModifier & { - /** @format date-time */ - sinceUtc: string; - /** @format double */ - ifPreviouslyViewedByUserMultiplyWeightBy: number; - /** @format double */ - ifNotPreviouslyViewedByUserMultiplyWeightBy: number; +export type ProductRecentlyViewedByUserFilter = Filter & { sinceUtc?: string | null; sinceMinutesAgo?: number | null }; + +export type ProductRecentlyViewedByUserParentCompanyFilter = Filter & { + sinceUtc?: string | null; + sinceMinutesAgo?: number | null; }; +export type ProductRecentlyViewedByUserRelevanceModifier = RecentlyViewedByUserRelevanceModifier; + export interface ProductRecommendationRequest { $type: string; settings: ProductRecommendationRequestSettings; @@ -3348,7 +3379,6 @@ export interface ProductRecommendationRequest { filters: FilterCollection; displayedAtLocationType: string; currency?: Currency | null; - /** @deprecated */ channel?: Channel | null; custom?: Record; } @@ -3386,13 +3416,12 @@ export interface ProductRecommendationRequestSettings { prioritizeDiversityBetweenRequests: boolean; allowProductsCurrentlyInCart?: boolean | null; selectedBrandProperties?: SelectedBrandPropertiesSettings | null; + /** @format int32 */ prioritizeResultsNotRecommendedWithinSeconds?: number | null; } -export type ProductRecommendationResponse = RecommendationResponse & { - recommendations?: ProductResult[] | null; -}; +export type ProductRecommendationResponse = RecommendationResponse & { recommendations?: ProductResult[] | null }; export type ProductRecommendationResponseCollection = TimedResponse & { responses?: ProductRecommendationResponse[] | null; @@ -3404,6 +3433,7 @@ export interface ProductResult { productId?: string | null; displayName?: string | null; variant?: VariantResult | null; + /** @format int32 */ rank: number; assortments?: number[] | null; @@ -3412,12 +3442,17 @@ export interface ProductResult { purchasedByUser?: PurchasedByUserInfo | null; viewedByUser?: ViewedByUserInfo | null; custom?: Record; + /** @format double */ listPrice?: number | null; + /** @format double */ salesPrice?: number | null; brand?: BrandResult | null; allVariants?: VariantResult[] | null; + purchasedByUserCompany?: PurchasedByUserCompanyInfo | null; + viewedByUserCompany?: ViewedByUserCompanyInfo | null; + filteredVariants?: VariantResult[] | null; position?: string | null; } @@ -3432,18 +3467,25 @@ export interface ProductResultDetails { viewedByUser?: ViewedByUserInfo | null; custom?: Record; allVariants?: VariantResultDetails[] | null; + /** @format date-time */ createdUtc: string; + /** @format date-time */ lastPurchasedUtc?: string | null; + /** @format date-time */ lastViewedUtc?: string | null; + /** @format int64 */ containedInTotalNumberOfOrders: number; + /** @format int64 */ viewedTotalNumberOfTimes: number; + /** @format int32 */ purchasedByDifferentNumberOfUsers: number; + /** @format int32 */ viewedByDifferentNumberOfUsers: number; disabled: boolean; @@ -3451,17 +3493,14 @@ export interface ProductResultDetails { listPrice?: MultiCurrency | null; salesPrice?: MultiCurrency | null; brand?: BrandResultDetails | null; + filteredVariants?: VariantResultDetails[] | null; } -export type ProductSalesPriceFilter = Filter & { - range: DecimalNullableRange; - currency?: Currency | null; -}; +export type ProductSalesPriceFilter = Filter & { range: DecimalNullableRange; currency?: Currency | null }; export type ProductSalesPriceRelevanceModifier = RelevanceModifier & { range: DecimalNullableRange; currency?: Currency | null; - /** @format double */ multiplyWeightBy: number; negated: boolean; }; @@ -3481,15 +3520,18 @@ export type ProductSearchResponse = PaginatedSearchResponse & { redirects?: RedirectResult[] | null; }; +export interface ProductSearchResultConstraint { + $type: string; +} + export type ProductSearchSettings = SearchSettings & { selectedProductProperties?: SelectedProductPropertiesSettings | null; selectedVariantProperties?: SelectedVariantPropertiesSettings | null; - /** @format int32 */ explodedVariants?: number | null; - /** @deprecated */ recommendations: RecommendationSettings; selectedBrandProperties?: SelectedBrandPropertiesSettings | null; variantSettings?: VariantSearchSettings | null; + resultConstraint?: ResultMustHaveVariantConstraint | null; }; export interface ProductSortBySpecification { @@ -3552,21 +3594,28 @@ export type ProductView = Trackable & { user?: User | null; product: Product; variant?: ProductVariant | null; - /** @deprecated */ channel?: Channel | null; }; -export type ProductsViewedAfterViewingContentRequest = ProductRecommendationRequest & { - contentId: string; -}; +export type ProductsViewedAfterViewingContentRequest = ProductRecommendationRequest & { contentId: string }; export type ProductsViewedAfterViewingProductRequest = ProductRecommendationRequest & { productAndVariantId: ProductAndVariantId; }; +export interface PurchasedByUserCompanyInfo { + /** @format date-time */ + mostRecentPurchasedUtc: string; + + /** @format int64 */ + totalNumberOfTimesPurchased: number; + purchasedByParentCompany?: PurchasedByUserCompanyInfo | null; +} + export interface PurchasedByUserInfo { /** @format date-time */ mostRecentPurchasedUtc: string; + /** @format int64 */ totalNumberOfTimesPurchased: number; } @@ -3577,14 +3626,31 @@ export type PurchasedWithMultipleProductsRequest = ProductRecommendationRequest productAndVariantIds: ProductAndVariantId[]; }; -export type PurchasedWithProductRequest = ProductRecommendationRequest & { - productAndVariantId: ProductAndVariantId; -}; +export type PurchasedWithProductRequest = ProductRecommendationRequest & { productAndVariantId: ProductAndVariantId }; + +export interface RecentlyViewedByUserRelevanceModifier { + $type: string; + + /** @format date-time */ + sinceUtc?: string | null; + + /** @format double */ + ifPreviouslyViewedByUserMultiplyWeightBy: number; + + /** @format double */ + ifNotPreviouslyViewedByUserMultiplyWeightBy: number; + + /** @format int32 */ + sinceMinutesAgo?: number | null; + filters?: FilterCollection | null; + custom?: Record; +} export type RecentlyViewedProductsRequest = ProductRecommendationRequest; export interface RecommendPopularSearchTermSettings { targetEntityTypes?: ("Product" | "Variant" | "ProductCategory" | "Brand" | "Content" | "ContentCategory")[] | null; + /** @format int32 */ numberOfRecommendations: number; } @@ -3597,7 +3663,6 @@ export interface RecommendationRequest { filters: FilterCollection; displayedAtLocationType: string; currency?: Currency | null; - /** @deprecated */ channel?: Channel | null; custom?: Record; } @@ -3610,6 +3675,7 @@ export interface RecommendationResponse { export interface RecommendationSettings { /** @format int32 */ take?: number | null; + /** @format int32 */ onlyIncludeRecommendationsWhenLessResultsThan?: number | null; } @@ -3648,6 +3714,7 @@ export interface RedirectRuleSaveSearchRulesResponse { export interface RedirectRuleSearchRulesResponse { $type: string; rules?: RedirectRule[] | null; + /** @format int32 */ hits: number; statistics?: Statistics | null; @@ -3659,8 +3726,10 @@ export interface RedirectRulesRequestSortBySearchRulesRequest { $type: string; filters: SearchRuleFilters; sorting: RedirectRulesRequestSortBySorting; + /** @format int32 */ skip: number; + /** @format int32 */ take: number; custom?: Record; @@ -3676,7 +3745,6 @@ export type RedirectRulesResponse = RedirectRuleSearchRulesResponse; export type RelativeDateTimeCondition = ValueCondition & { comparison: "Before" | "After"; unit: "UnixMilliseconds" | "UnixSeconds" | "UnixMinutes"; - /** @format int64 */ currentTimeOffset: number; }; @@ -3690,12 +3758,22 @@ export interface RelevanceModifierCollection { items?: | ( | BrandIdRelevanceModifier + | ContentCategoryDataRelevanceModifier + | ContentCategoryRecentlyViewedByUserRelevanceModifier + | ContentDataRelevanceModifier + | ContentRecentlyViewedByUserRelevanceModifier | ProductAssortmentRelevanceModifier + | ProductCategoryDataRelevanceModifier | ProductCategoryIdRelevanceModifier + | ProductCategoryRecentlyViewedByUserRelevanceModifier | ProductDataRelevanceModifier | ProductIdRelevanceModifier | ProductListPriceRelevanceModifier + | ProductRecentlyPurchasedByCompanyRelevanceModifier + | ProductRecentlyPurchasedByUserCompanyRelevanceModifier | ProductRecentlyPurchasedByUserRelevanceModifier + | ProductRecentlyViewedByCompanyRelevanceModifier + | ProductRecentlyViewedByUserCompanyRelevanceModifier | ProductRecentlyViewedByUserRelevanceModifier | ProductSalesPriceRelevanceModifier | UserFavoriteProductRelevanceModifier @@ -3732,6 +3810,10 @@ export interface RequestFilterCriteria { count?: Int32NullableRange | null; } +export type ResultMustHaveVariantConstraint = ProductSearchResultConstraint & { + exceptWhenProductHasNoVariants: boolean; +}; + export type SaveDecompoundRulesRequest = DecompoundRuleSaveSearchRulesRequest; export type SaveDecompoundRulesResponse = DecompoundRuleSaveSearchRulesResponse; @@ -3754,10 +3836,7 @@ export type SaveRedirectRulesRequest = RedirectRuleSaveSearchRulesRequest; export type SaveRedirectRulesResponse = RedirectRuleSaveSearchRulesResponse; -export type SaveSearchIndexRequest = LicensedRequest & { - index?: SearchIndex | null; - modifiedBy?: string | null; -}; +export type SaveSearchIndexRequest = LicensedRequest & { index?: SearchIndex | null; modifiedBy?: string | null }; export type SaveSearchResultModifierRulesRequest = SearchResultModifierRuleSaveSearchRulesRequest; @@ -3771,14 +3850,9 @@ export type SaveStemmingRulesRequest = StemmingRuleSaveSearchRulesRequest; export type SaveStemmingRulesResponse = StemmingRuleSaveSearchRulesResponse; -export type SaveSynonymsRequest = LicensedRequest & { - synonyms?: Synonym[] | null; - modifiedBy?: string | null; -}; +export type SaveSynonymsRequest = LicensedRequest & { synonyms?: Synonym[] | null; modifiedBy?: string | null }; -export type SaveSynonymsResponse = TimedResponse & { - values?: Synonym[] | null; -}; +export type SaveSynonymsResponse = TimedResponse & { values?: Synonym[] | null }; export type SaveTriggerConfigurationRequest = LicensedRequest & { configuration?: @@ -3799,9 +3873,11 @@ export interface SearchIndex { description?: string | null; enabled: boolean; isDefault: boolean; + /** @format date-time */ created: string; createdBy?: string | null; + /** @format date-time */ modified: string; modifiedBy?: string | null; @@ -3809,17 +3885,11 @@ export interface SearchIndex { configuration?: IndexConfiguration | null; } -export type SearchIndexCollectionResponse = TimedResponse & { - indexes?: SearchIndex[] | null; -}; +export type SearchIndexCollectionResponse = TimedResponse & { indexes?: SearchIndex[] | null }; -export type SearchIndexRequest = LicensedRequest & { - id?: string | null; -}; +export type SearchIndexRequest = LicensedRequest & { id?: string | null }; -export type SearchIndexResponse = TimedResponse & { - index?: SearchIndex | null; -}; +export type SearchIndexResponse = TimedResponse & { index?: SearchIndex | null }; export interface SearchIndexSelector { id: string; @@ -3837,7 +3907,6 @@ export interface SearchRequest { filters?: FilterCollection | null; indexSelector?: SearchIndexSelector | null; postFilters?: FilterCollection | null; - /** @deprecated */ channel?: Channel | null; custom?: Record; } @@ -3905,6 +3974,7 @@ export interface SearchResultModifierRuleSaveSearchRulesResponse { export interface SearchResultModifierRuleSearchRulesResponse { $type: string; rules?: SearchResultModifierRule[] | null; + /** @format int32 */ hits: number; statistics?: Statistics | null; @@ -3916,8 +3986,10 @@ export interface SearchResultModifierRulesRequestSortBySearchRulesRequest { $type: string; filters: SearchRuleFilters; sorting: SearchResultModifierRulesRequestSortBySorting; + /** @format int32 */ skip: number; + /** @format int32 */ take: number; custom?: Record; @@ -3932,16 +4004,20 @@ export type SearchResultModifierRulesResponse = SearchResultModifierRuleSearchRu export interface SearchRule { $type: string; + /** @format uuid */ id: string; indexes?: ApplicableIndexes | null; languages?: ApplicableLanguages | null; + /** @format date-time */ created: string; createdBy: string; + /** @format date-time */ modified: string; modifiedBy: string; + /** @format date-time */ approved?: string | null; approvedBy: string; @@ -3951,6 +4027,7 @@ export interface SearchRule { export interface SearchRuleFilters { term?: string | null; approved?: boolean | null; + /** @format uuid */ id?: string | null; } @@ -3963,19 +4040,17 @@ export type SearchTerm = Trackable & { language?: Language | null; user?: User | null; term?: string | null; - /** @deprecated */ channel?: Channel | null; }; -export type SearchTermBasedProductRecommendationRequest = ProductRecommendationRequest & { - term: string; -}; +export type SearchTermBasedProductRecommendationRequest = ProductRecommendationRequest & { term: string }; export interface SearchTermCondition { kind?: "Equals" | "StartsWith" | "EndsWith" | "Contains" | null; value?: string | null; andConditions?: SearchTermCondition[] | null; orConditions?: SearchTermCondition[] | null; + /** @format int32 */ minimumLength?: number | null; } @@ -3990,13 +4065,9 @@ export type SearchTermModifierRule = SearchRule & { )[]; }; -export type SearchTermModifierRuleAppendToTermAction = SearchTermModifierRuleRuleAction & { - words: string; -}; +export type SearchTermModifierRuleAppendToTermAction = SearchTermModifierRuleRuleAction & { words: string }; -export type SearchTermModifierRuleRemoveFromTermAction = SearchTermModifierRuleRuleAction & { - words: string; -}; +export type SearchTermModifierRuleRemoveFromTermAction = SearchTermModifierRuleRuleAction & { words: string }; export type SearchTermModifierRuleReplaceTermAction = SearchTermModifierRuleRuleAction & { replacement?: string | null; @@ -4027,6 +4098,7 @@ export interface SearchTermModifierRuleSaveSearchRulesResponse { export interface SearchTermModifierRuleSearchRulesResponse { $type: string; rules?: SearchTermModifierRule[] | null; + /** @format int32 */ hits: number; statistics?: Statistics | null; @@ -4038,8 +4110,10 @@ export interface SearchTermModifierRulesRequestSortBySearchRulesRequest { $type: string; filters: SearchRuleFilters; sorting: SearchTermModifierRulesRequestSortBySorting; + /** @format int32 */ skip: number; + /** @format int32 */ take: number; custom?: Record; @@ -4054,17 +4128,15 @@ export type SearchTermModifierRulesResponse = SearchTermModifierRuleSearchRulesR export type SearchTermPredictionRequest = SearchRequest & { term: string; - /** @format int32 */ take: number; settings?: SearchTermPredictionSettings | null; }; -export type SearchTermPredictionResponse = SearchResponse & { - predictions?: SearchTermPredictionResult[] | null; -}; +export type SearchTermPredictionResponse = SearchResponse & { predictions?: SearchTermPredictionResult[] | null }; export interface SearchTermPredictionResult { term?: string | null; + /** @format int32 */ rank: number; expectedResultTypes?: ExpectedSearchTermResult[] | null; @@ -4076,12 +4148,11 @@ export type SearchTermPredictionSettings = SearchSettings & { targetEntityTypes?: ("Product" | "Variant" | "ProductCategory" | "Brand" | "Content" | "ContentCategory")[] | null; }; -export type SearchTermRecommendationResponse = RecommendationResponse & { - recommendations?: SearchTermResult[] | null; -}; +export type SearchTermRecommendationResponse = RecommendationResponse & { recommendations?: SearchTermResult[] | null }; export interface SearchTermResult { term?: string | null; + /** @format int32 */ rank: number; expectedResultTypes?: ExpectedSearchTermResult[] | null; @@ -4133,6 +4204,9 @@ export interface SelectedProductPropertiesSettings { brand: boolean; allVariants: boolean; dataKeys?: string[] | null; + viewedByUserCompanyInfo: boolean; + purchasedByUserCompanyInfo: boolean; + filteredVariants?: FilteredVariantsSettings | null; } export interface SelectedVariantPropertiesSettings { @@ -4148,6 +4222,7 @@ export interface SelectedVariantPropertiesSettings { export interface SignificantDataValue { key: string; comparer: "Equals" | "NumericPercentDifference" | "StringSimilarity" | "KeyExists"; + /** @format double */ significance: number; transformer?: TrimStringTransformer | null; @@ -4157,21 +4232,29 @@ export interface SimilarProductsEvaluationSettings { /** @format double */ significanceOfSimilaritiesInDisplayName: number; productDisplayNameTransformer?: TrimStringTransformer | null; + /** @format double */ significanceOfSimilarListPrice: number; + /** @format double */ significanceOfCommonImmediateParentCategories: number; + /** @format double */ significanceOfCommonParentsParentCategories: number; + /** @format double */ significanceOfCommonAncestorCategories: number; + /** @format double */ significanceOfCommonProductDataKeys: number; + /** @format double */ significanceOfIdenticalProductDataValues: number; significantProductDataFields?: SignificantDataValue[] | null; + /** @format double */ significanceOfSimilarSalesPrice: number; + /** @format double */ significanceOfSimilarBrand: number; variantEvaluationSettings?: SimilarVariantEvaluationSettings | null; @@ -4182,31 +4265,30 @@ export type SimilarProductsRequest = ProductRecommendationRequest & { productData?: Product | null; considerAlreadyKnownInformationAboutProduct: boolean; evaluationSettings?: SimilarProductsEvaluationSettings | null; - /** @format int32 */ explodedVariants?: number | null; }; export interface SimilarVariantEvaluationSettings { /** @format double */ significanceOfSimilaritiesInDisplayName?: number | null; + /** @format double */ significanceOfSimilarListPrice?: number | null; + /** @format double */ significanceOfSimilarSalesPrice?: number | null; + /** @format double */ significanceOfCommonDataKeys?: number | null; + /** @format double */ significanceOfIdenticalDataValues?: number | null; significantDataFields?: SignificantDataValue[] | null; } -export type SortProductsRequest = ProductRecommendationRequest & { - productIds: string[]; -}; +export type SortProductsRequest = ProductRecommendationRequest & { productIds: string[] }; -export type SortVariantsRequest = ProductRecommendationRequest & { - productId: string; -}; +export type SortVariantsRequest = ProductRecommendationRequest & { productId: string }; export interface SpecificationsIndexConfiguration { keys?: Record; @@ -4218,10 +4300,7 @@ export interface Statistics { serverTimeInMs: number; } -export type StemmingRule = SearchRule & { - words: string[]; - stem?: string | null; -}; +export type StemmingRule = SearchRule & { words: string[]; stem?: string | null }; export interface StemmingRuleSaveSearchRulesRequest { $type: string; @@ -4239,6 +4318,7 @@ export interface StemmingRuleSaveSearchRulesResponse { export interface StemmingRuleSearchRulesResponse { $type: string; rules?: StemmingRule[] | null; + /** @format int32 */ hits: number; statistics?: Statistics | null; @@ -4250,8 +4330,10 @@ export interface StemmingRulesRequestSortBySearchRulesRequest { $type: string; filters: SearchRuleFilters; sorting: StemmingRulesRequestSortBySorting; + /** @format int32 */ skip: number; + /** @format int32 */ take: number; custom?: Record; @@ -4266,6 +4348,7 @@ export type StemmingRulesResponse = StemmingRuleSearchRulesResponse; export interface StringAvailableFacetValue { value?: string | null; + /** @format int32 */ hits: number; selected: boolean; @@ -4384,17 +4467,21 @@ export interface Synonym { type: "OneWay" | "Multidirectional"; indexes?: string[] | null; languages?: Language[] | null; + /** @format date-time */ created: string; createdBy?: string | null; + /** @format date-time */ modified: string; modifiedBy?: string | null; from?: string[] | null; words?: string[] | null; + /** @format date-time */ approved?: string | null; approvedBy?: string | null; + /** @format int64 */ usages: number; isApproved: boolean; @@ -4403,9 +4490,7 @@ export interface Synonym { export type SynonymsRequest = LicensedRequest & { sorting?: SynonymsRequestSynonymSortingSorting | null; - /** @format int32 */ take: number; - /** @format int32 */ skip: number; term?: string | null; isApproved?: boolean | null; @@ -4425,11 +4510,7 @@ export interface SynonymsRequestSynonymSortingSorting { sortOrder: "Ascending" | "Descending"; } -export type SynonymsResponse = TimedResponse & { - values?: Synonym[] | null; - /** @format int32 */ - hits: number; -}; +export type SynonymsResponse = TimedResponse & { values?: Synonym[] | null; hits: number }; export interface TargetConditionConfiguration { filters?: FilterCollection | null; @@ -4443,25 +4524,17 @@ export type TrackBrandAdministrativeActionRequest = TrackingRequest & { administrativeAction?: BrandAdministrativeAction | null; }; -export type TrackBrandUpdateRequest = TrackingRequest & { - brandUpdate?: BrandUpdate | null; -}; +export type TrackBrandUpdateRequest = TrackingRequest & { brandUpdate?: BrandUpdate | null }; -export type TrackBrandViewRequest = TrackingRequest & { - brandView: BrandView; -}; +export type TrackBrandViewRequest = TrackingRequest & { brandView: BrandView }; -export type TrackCartRequest = TrackingRequest & { - cart: Cart; -}; +export type TrackCartRequest = TrackingRequest & { cart: Cart }; export type TrackCompanyAdministrativeActionRequest = TrackingRequest & { administrativeAction?: CompanyAdministrativeAction | null; }; -export type TrackCompanyUpdateRequest = TrackingRequest & { - companyUpdate?: CompanyUpdate | null; -}; +export type TrackCompanyUpdateRequest = TrackingRequest & { companyUpdate?: CompanyUpdate | null }; export type TrackContentAdministrativeActionRequest = TrackingRequest & { administrativeAction?: ContentAdministrativeAction | null; @@ -4475,21 +4548,13 @@ export type TrackContentCategoryUpdateRequest = TrackingRequest & { contentCategoryUpdate?: ContentCategoryUpdate | null; }; -export type TrackContentCategoryViewRequest = TrackingRequest & { - contentCategoryView: ContentCategoryView; -}; +export type TrackContentCategoryViewRequest = TrackingRequest & { contentCategoryView: ContentCategoryView }; -export type TrackContentUpdateRequest = TrackingRequest & { - contentUpdate?: ContentUpdate | null; -}; +export type TrackContentUpdateRequest = TrackingRequest & { contentUpdate?: ContentUpdate | null }; -export type TrackContentViewRequest = TrackingRequest & { - contentView: ContentView; -}; +export type TrackContentViewRequest = TrackingRequest & { contentView: ContentView }; -export type TrackOrderRequest = TrackingRequest & { - order: Order; -}; +export type TrackOrderRequest = TrackingRequest & { order: Order }; export type TrackProductAdministrativeActionRequest = TrackingRequest & { administrativeAction?: ProductAdministrativeAction | null; @@ -4503,25 +4568,15 @@ export type TrackProductCategoryUpdateRequest = TrackingRequest & { productCategoryUpdate?: ProductCategoryUpdate | null; }; -export type TrackProductCategoryViewRequest = TrackingRequest & { - productCategoryView: ProductCategoryView; -}; +export type TrackProductCategoryViewRequest = TrackingRequest & { productCategoryView: ProductCategoryView }; -export type TrackProductUpdateRequest = TrackingRequest & { - productUpdate?: ProductUpdate | null; -}; +export type TrackProductUpdateRequest = TrackingRequest & { productUpdate?: ProductUpdate | null }; -export type TrackProductViewRequest = TrackingRequest & { - productView: ProductView; -}; +export type TrackProductViewRequest = TrackingRequest & { productView: ProductView }; -export type TrackSearchTermRequest = TrackingRequest & { - searchTerm?: SearchTerm | null; -}; +export type TrackSearchTermRequest = TrackingRequest & { searchTerm?: SearchTerm | null }; -export type TrackUserUpdateRequest = TrackingRequest & { - userUpdate?: UserUpdate | null; -}; +export type TrackUserUpdateRequest = TrackingRequest & { userUpdate?: UserUpdate | null }; export interface Trackable { $type: string; @@ -4548,12 +4603,7 @@ export type TriggerConfigurationCollectionResponse = TimedResponse & { | null; }; -export type TriggerConfigurationRequest = LicensedRequest & { - /** @format uuid */ - id: string; - /** @format int32 */ - type?: number | null; -}; +export type TriggerConfigurationRequest = LicensedRequest & { id: string; type?: number | null }; export type TriggerConfigurationResponse = TimedResponse & { configuration?: @@ -4568,19 +4618,11 @@ export type TriggerConfigurationResponse = TimedResponse & { | null; }; -export type TriggerConfigurationsRequest = LicensedRequest & { - /** @format int32 */ - type?: number | null; -}; +export type TriggerConfigurationsRequest = LicensedRequest & { type?: number | null }; -export type TriggerResultRequest = LicensedRequest & { - /** @format uuid */ - configurationId: string; -}; +export type TriggerResultRequest = LicensedRequest & { configurationId: string }; -export type TriggerResultResponse = TimedResponse & { - result?: ITriggerResult | null; -}; +export type TriggerResultResponse = TimedResponse & { result?: ITriggerResult | null }; export interface TrimStringTransformer { valuesToTrim: string[]; @@ -4604,18 +4646,22 @@ export type UserActivityTriggerConfiguration = UserActivityTriggerResultTriggerC export interface UserActivityTriggerResultTriggerConfiguration { $type: string; custom?: Record; + /** @format uuid */ id: string; name?: string | null; description?: string | null; group?: string | null; enabled: boolean; + /** @format date-time */ created: string; createdBy?: string | null; + /** @format date-time */ modified: string; modifiedBy?: string | null; + /** @format int32 */ withinTimeSpanMinutes: number; settings?: Record; @@ -4626,8 +4672,10 @@ export interface UserAssociatedCompanyResultDetails { id: string; parent?: UserAssociatedCompanyResultDetails | null; data?: Record; + /** @format date-time */ createdUtc: string; + /** @format date-time */ lastAccessedUtc: string; } @@ -4661,18 +4709,12 @@ export interface UserConditionConfiguration { conditions?: UserConditionCollection | null; } -export type UserDetailsCollectionResponse = TimedResponse & { - results?: UserResultDetails[][] | null; -}; +export type UserDetailsCollectionResponse = TimedResponse & { results?: UserResultDetails[][] | null }; export type UserFavoriteProductRelevanceModifier = RelevanceModifier & { - /** @format int32 */ sinceMinutesAgo: number; - /** @format double */ numberOfPurchasesWeight: number; - /** @format double */ mostRecentPurchaseWeight: number; - /** @format double */ ifNotPurchasedBaseWeight: number; }; @@ -4696,17 +4738,22 @@ export interface UserResultDetails { temporaryId?: string | null; email?: string | null; classifications?: Record; + /** @format date-time */ lastCartUpdateUtc?: string | null; + /** @format date-time */ lastActivityUtc: string; + /** @format date-time */ lastOrderUtc?: string | null; carts?: Record; lastActiveCartName?: string | null; + /** @format int32 */ totalNumberOfOrders: number; identifiers?: Record; + /** @format int32 */ key: number; data?: Record; @@ -4742,13 +4789,10 @@ export interface ValueSelector { $type: string; } -export type VariantAssortmentFilter = Filter & { - assortments: number[]; -}; +export type VariantAssortmentFilter = Filter & { assortments: number[] }; export type VariantAssortmentRelevanceModifier = RelevanceModifier & { assortments?: number[] | null; - /** @format double */ multiplyWeightBy: number; }; @@ -4768,18 +4812,22 @@ export interface VariantChangeTriggerResultVariantChangeTriggerResultSettingsVar change: IChange; resultSettings: VariantChangeTriggerResultSettings; custom?: Record; + /** @format uuid */ id: string; name?: string | null; description?: string | null; group?: string | null; enabled: boolean; + /** @format date-time */ created: string; createdBy?: string | null; + /** @format date-time */ modified: string; modifiedBy?: string | null; + /** @format int32 */ withinTimeSpanMinutes: number; settings?: Record; @@ -4788,35 +4836,14 @@ export interface VariantChangeTriggerResultVariantChangeTriggerResultSettingsVar export type VariantDataFilter = DataFilter; -export type VariantDataRelevanceModifier = RelevanceModifier & { - key?: string | null; - considerAsMatchIfKeyIsNotFound: boolean; - /** - * @deprecated - * @format double - */ - multiplyWeightBy: number; - mustMatchAllConditions: boolean; - conditions?: - | ( - | ContainsCondition - | DistinctCondition - | EqualsCondition - | GreaterThanCondition - | LessThanCondition - | RelativeDateTimeCondition - )[] - | null; - multiplierSelector?: DataDoubleSelector | FixedDoubleValueSelector | null; -}; +export type VariantDataRelevanceModifier = DataRelevanceModifier; -export type VariantIdFilter = Filter & { - variantIds: string[]; -}; +export type VariantDisabledFilter = Filter; + +export type VariantIdFilter = Filter & { variantIds: string[] }; export type VariantIdRelevanceModifier = RelevanceModifier & { variantIds?: string[] | null; - /** @format double */ multiplyWeightBy: number; negated: boolean; }; @@ -4828,15 +4855,11 @@ export interface VariantIndexConfiguration { data?: DataIndexConfiguration | null; } -export type VariantListPriceFilter = Filter & { - range: DecimalNullableRange; - currency?: Currency | null; -}; +export type VariantListPriceFilter = Filter & { range: DecimalNullableRange; currency?: Currency | null }; export type VariantListPriceRelevanceModifier = RelevanceModifier & { range: DecimalNullableRange; currency?: Currency | null; - /** @format double */ multiplyWeightBy: number; negated: boolean; }; @@ -4851,11 +4874,14 @@ export interface VariantResult { specification?: Record; assortments?: number[] | null; data?: Record; + /** @format int32 */ rank: number; custom?: Record; + /** @format double */ listPrice?: number | null; + /** @format double */ salesPrice?: number | null; } @@ -4872,15 +4898,11 @@ export interface VariantResultDetails { disabled: boolean; } -export type VariantSalesPriceFilter = Filter & { - range: DecimalNullableRange; - currency?: Currency | null; -}; +export type VariantSalesPriceFilter = Filter & { range: DecimalNullableRange; currency?: Currency | null }; export type VariantSalesPriceRelevanceModifier = RelevanceModifier & { range: DecimalNullableRange; currency?: Currency | null; - /** @format double */ multiplyWeightBy: number; negated: boolean; }; @@ -4889,26 +4911,16 @@ export interface VariantSearchSettings { excludeResultsWithoutVariant: boolean; } -export type VariantSpecificationFacet = StringValueFacet & { - key: string; -}; +export type VariantSpecificationFacet = StringValueFacet & { key: string }; -export type VariantSpecificationFacetResult = StringValueFacetResult & { - key?: string | null; -}; +export type VariantSpecificationFacetResult = StringValueFacetResult & { key?: string | null }; -export type VariantSpecificationFilter = Filter & { - key: string; - filterOutIfKeyIsNotFound: boolean; - equalTo: string; -}; +export type VariantSpecificationFilter = Filter & { key: string; filterOutIfKeyIsNotFound: boolean; equalTo: string }; export type VariantSpecificationValueRelevanceModifier = RelevanceModifier & { key?: string | null; value?: string | null; - /** @format double */ ifIdenticalMultiplyWeightBy: number; - /** @format double */ ifNotIdenticalMultiplyWeightBy: number; ifSpecificationKeyNotFoundApplyNotEqualMultiplier: boolean; }; @@ -4917,9 +4929,19 @@ export type VariantSpecificationsInCommonRelevanceModifier = RelevanceModifier & specificationKeysAndMultipliers?: KeyMultiplier[] | null; }; +export interface ViewedByUserCompanyInfo { + /** @format date-time */ + mostRecentlyViewedUtc: string; + + /** @format int64 */ + totalNumberOfTimesViewed: number; + viewedByParentCompany?: ViewedByUserCompanyInfo | null; +} + export interface ViewedByUserInfo { /** @format date-time */ mostRecentlyViewedUtc: string; + /** @format int32 */ totalNumberOfTimesViewed: number; }