@ikas/storefront-api 4.12.0-beta.2 → 4.12.0-beta.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,7 +1,9 @@
1
1
  import { DeepReadonly } from "ts-essentials";
2
+ import { CartAcceptedOfferInputData } from "./CartAcceptedOfferInput";
2
3
  import { CartLineItemInputData } from "./CartLineItemInput";
3
4
  import { CartLineOptionInputData } from "./CartLineOptionInput";
4
5
  export declare class AddItemToCartInputData {
6
+ acceptedOffers: CartAcceptedOfferInputData[] | null;
5
7
  cartId: string | null;
6
8
  item: CartLineItemInputData;
7
9
  metadata: any | null;
@@ -8,6 +8,8 @@ export declare class CampaignOfferData extends BaseModelData {
8
8
  currencyCodes: string[] | null;
9
9
  endDate: any | null;
10
10
  followUpActionType: CampaignOfferFollowUpActionTypeEnum;
11
+ maxCount: number | null;
12
+ maximumRequiredCartAmount: number | null;
11
13
  minimumRequiredCartAmount: number | null;
12
14
  name: string;
13
15
  offers: CampaignOfferProductData[];
@@ -0,0 +1,13 @@
1
+ import { DeepReadonly } from "ts-essentials";
2
+ export declare class CartAcceptedOfferInputData {
3
+ campaignOfferId: string;
4
+ campaignOfferProductId: string;
5
+ productId: string;
6
+ quantity: number | null;
7
+ variantId: string;
8
+ constructor(data?: Partial<CartAcceptedOfferInputData>);
9
+ }
10
+ export declare class CartAcceptedOfferInput extends CartAcceptedOfferInputData {
11
+ }
12
+ export declare type PartialCartAcceptedOfferInput = Partial<CartAcceptedOfferInput>;
13
+ export declare type ReadOnlyCartAcceptedOfferInput = DeepReadonly<CartAcceptedOfferInput>;
@@ -3,6 +3,7 @@ import BaseModelData from "./_base";
3
3
  import { SearchProductAttributeValueData } from "./SearchProductAttributeValue";
4
4
  import { SearchProductProductBaseUnitData } from "./SearchProductProductBaseUnit";
5
5
  import { SearchProductBrandData } from "./SearchProductBrand";
6
+ import { SearchProductCampaignOfferData } from "./SearchProductCampaignOffer";
6
7
  import { SearchProductCampaignData } from "./SearchProductCampaign";
7
8
  import { SearchCategoryData } from "./SearchCategory";
8
9
  import { ProductSearchCustomerReviewSummariesData } from "./ProductSearchCustomerReviewSummaries";
@@ -17,6 +18,7 @@ export declare class SearchProductData extends BaseModelData {
17
18
  averageRating: number | null;
18
19
  baseUnit: SearchProductProductBaseUnitData | null;
19
20
  brand: SearchProductBrandData | null;
21
+ campaignOffers: SearchProductCampaignOfferData[] | null;
20
22
  campaigns: SearchProductCampaignData[] | null;
21
23
  categories: SearchCategoryData[] | null;
22
24
  customerReviewSummaries: ProductSearchCustomerReviewSummariesData | null;
@@ -0,0 +1,9 @@
1
+ import { DeepReadonly } from "ts-essentials";
2
+ export declare class SearchProductCampaignOfferData {
3
+ id: string;
4
+ constructor(data?: Partial<SearchProductCampaignOfferData>);
5
+ }
6
+ export declare class SearchProductCampaignOffer extends SearchProductCampaignOfferData {
7
+ }
8
+ export declare type PartialSearchProductCampaignOffer = Partial<SearchProductCampaignOffer>;
9
+ export declare type ReadOnlySearchProductCampaignOffer = DeepReadonly<SearchProductCampaignOffer>;
@@ -6,6 +6,7 @@ export declare class UpdateCartCampaignOfferInputData {
6
6
  cartId: string;
7
7
  metadata: any | null;
8
8
  productId: string;
9
+ quantity: number | null;
9
10
  variantId: string;
10
11
  constructor(data?: Partial<UpdateCartCampaignOfferInputData>);
11
12
  }
@@ -1,6 +1,6 @@
1
1
  import { ConfigType, APIResponse } from "@ikas/fe-api-client";
2
2
  import { StringFilterInput, CampaignOffer } from "../types";
3
- declare const listCampaignOffer: (variables: QueryParams, fields?: string[], config?: ConfigType) => Promise<APIResponse<undefined> | APIResponse<CampaignOffer[]>>;
3
+ declare const listCampaignOffer: (variables: QueryParams, fields?: string[], config?: ConfigType) => Promise<APIResponse<CampaignOffer[]> | APIResponse<undefined>>;
4
4
  export default listCampaignOffer;
5
5
  export declare type QueryParams = {
6
6
  id?: StringFilterInput | null;
@@ -13,6 +13,8 @@ export declare enum ResponseField {
13
13
  END_DATE = "endDate",
14
14
  FOLLOW_UP_ACTION_TYPE = "followUpActionType",
15
15
  ID = "id",
16
+ MAX_COUNT = "maxCount",
17
+ MAXIMUM_REQUIRED_CART_AMOUNT = "maximumRequiredCartAmount",
16
18
  MINIMUM_REQUIRED_CART_AMOUNT = "minimumRequiredCartAmount",
17
19
  NAME = "name",
18
20
  OFFERS__APPLICABLE_PRICE = "offers.applicablePrice",
@@ -0,0 +1 @@
1
+ import{__awaiter as t,__generator as e}from'./../../ext/tslib/tslib.es6.js';import{handleAPIError as r,APIResponse as i,fetchQuery as n}from"@ikas/fe-api-client";var a,s=function(a,s,o){return t(void 0,void 0,void 0,(function(){var t,E,T,d;return e(this,(function(e){switch(e.label){case 0:return e.trys.push([0,2,,3]),[4,n({operationName:"listCampaignOffer",config:o,variables:a,allReturnFields:_,fields:s,query:function(t){return"\n\t\t\t\tquery listCampaignOffer (\n\t\t\t\t\t$id: StringFilterInput,\n\t\t\t\t) {\n\t\t\t\t\tlistCampaignOffer (\n\t\t\t\t\t\tid: $id,\n\t\t\t\t\t) ".concat(t,"\n\t\t\t\t}\n\t\t\t")}})];case 1:return t=e.sent(),E=t.data,T=t.errors,[2,new i(null==E?void 0:E.listCampaignOffer,T)];case 2:return d=e.sent(),[2,r(d)];case 3:return[2]}}))}))},_="{availableSalesChannelIds createdAt currencyCodes deleted endDate followUpActionType id maxCount maximumRequiredCartAmount minimumRequiredCartAmount name offers {applicablePrice countdownMinutes description discountAmount discountType excludedVariantIdList id order productId showCriteria skipOfferIfProductExistsInCart title translations {description locale title } } startDate targetPageTypes triggerSettings {filterType valueList } type updatedAt }";!function(t){t.AVAILABLE_SALES_CHANNEL_IDS="availableSalesChannelIds",t.CREATED_AT="createdAt",t.CURRENCY_CODES="currencyCodes",t.DELETED="deleted",t.END_DATE="endDate",t.FOLLOW_UP_ACTION_TYPE="followUpActionType",t.ID="id",t.MAX_COUNT="maxCount",t.MAXIMUM_REQUIRED_CART_AMOUNT="maximumRequiredCartAmount",t.MINIMUM_REQUIRED_CART_AMOUNT="minimumRequiredCartAmount",t.NAME="name",t.OFFERS__APPLICABLE_PRICE="offers.applicablePrice",t.OFFERS__COUNTDOWN_MINUTES="offers.countdownMinutes",t.OFFERS__DESCRIPTION="offers.description",t.OFFERS__DISCOUNT_AMOUNT="offers.discountAmount",t.OFFERS__DISCOUNT_TYPE="offers.discountType",t.OFFERS__EXCLUDED_VARIANT_ID_LIST="offers.excludedVariantIdList",t.OFFERS__ID="offers.id",t.OFFERS__ORDER="offers.order",t.OFFERS__PRODUCT_ID="offers.productId",t.OFFERS__SHOW_CRITERIA="offers.showCriteria",t.OFFERS__SKIP_OFFER_IF_PRODUCT_EXISTS_IN_CART="offers.skipOfferIfProductExistsInCart",t.OFFERS__TITLE="offers.title",t.OFFERS__TRANSLATIONS__DESCRIPTION="offers.translations.description",t.OFFERS__TRANSLATIONS__LOCALE="offers.translations.locale",t.OFFERS__TRANSLATIONS__TITLE="offers.translations.title",t.START_DATE="startDate",t.TARGET_PAGE_TYPES="targetPageTypes",t.TRIGGER_SETTINGS__FILTER_TYPE="triggerSettings.filterType",t.TRIGGER_SETTINGS__VALUE_LIST="triggerSettings.valueList",t.TYPE="type",t.UPDATED_AT="updatedAt"}(a||(a={}));export{a as ResponseField,s as default};
@@ -44,6 +44,7 @@ export declare enum ResponseField {
44
44
  RESULTS__BRAND__TRANSLATIONS__DESCRIPTION = "results.brand.translations.description",
45
45
  RESULTS__BRAND__TRANSLATIONS__LOCALE = "results.brand.translations.locale",
46
46
  RESULTS__BRAND__TRANSLATIONS__NAME = "results.brand.translations.name",
47
+ RESULTS__CAMPAIGN_OFFERS__ID = "results.campaignOffers.id",
47
48
  RESULTS__CAMPAIGNS__BUY_X_THEN_GET_Y__BUY_X__AMOUNT = "results.campaigns.buyXThenGetY.buyX.amount",
48
49
  RESULTS__CAMPAIGNS__BUY_X_THEN_GET_Y__BUY_X__APPLY_BY_QUANTITY = "results.campaigns.buyXThenGetY.buyX.applyByQuantity",
49
50
  RESULTS__CAMPAIGNS__BUY_X_THEN_GET_Y__GET_Y__AMOUNT = "results.campaigns.buyXThenGetY.getY.amount",
@@ -1 +1 @@
1
- import{__awaiter as _,__generator as t}from'./../../ext/tslib/tslib.es6.js';import{handleAPIError as T,APIResponse as s,fetchQuery as e}from"@ikas/fe-api-client";var S,a=function(S,a,A){return _(void 0,void 0,void 0,(function(){var _,E,i,R;return t(this,(function(t){switch(t.label){case 0:return t.trys.push([0,2,,3]),[4,e({operationName:"searchProducts",config:A,variables:S,allReturnFields:r,fields:a,query:function(_){return"\n\t\t\t\tquery searchProducts (\n\t\t\t\t\t$input: SearchInput!,\n\t\t\t\t) {\n\t\t\t\t\tsearchProducts (\n\t\t\t\t\t\tinput: $input,\n\t\t\t\t\t) ".concat(_,"\n\t\t\t\t}\n\t\t\t")}})];case 1:return _=t.sent(),E=_.data,i=_.errors,[2,new s(null==E?void 0:E.searchProducts,i)];case 2:return R=t.sent(),[2,T(R)];case 3:return[2]}}))}))},r="{count data facets {id values {count id } } limit page results {attributes {imageIds productAttribute {id name tableTemplate {columns {id name } rows {id name } } translations {description locale name options {id name } } type } productAttributeOption {id name } value } averageRating baseUnit {baseAmount type unit {id name translations {description locale name } } } brand {id imageId name slug translations {description locale name } } campaigns {buyXThenGetY {buyX {amount applyByQuantity } getY {amount discountRatio } maxUsagePerOrder } currencyCodes dateRange {end start } fixedDiscount {amount } salesChannelIds title type } categories {id name path {id name slug translations {description locale name } } slug translations {description locale name } } createdAt customerReviewSummaries {averageRating reviewCount stars {count star } storefrontId } deleted description dynamicPriceListIds groupVariantsByVariantTypeId hiddenSalesChannelIds id metaData {canonicals description disableIndex metadataOverrides {description language pageTitle storefrontId storefrontRegionId } pageTitle redirectTo slug translations {description locale pageTitle slug } } name productOptionSetId productVariantTypes {order variantType {id name selectionType translations {locale name values {id name } } values {colorCode id name thumbnailImageId } } variantValueIds } productVolumeDiscountId reviewCount salesChannelIds shortDescription stars {count star } tags {id name translations {description locale name } } translations {description locale name } type updatedAt variants {attributes {imageIds productAttribute {id name tableTemplate {columns {id name } rows {id name } } translations {description locale name options {id name } } type } productAttributeOption {id name } value } barcodeList baseBundlePrices {buyPrice currency currencyCode currencySymbol discountPrice priceListId sellPrice unitPrice } bundleSettings {maxBundleQuantity minBundleQuantity products {addToBundleBasePrice discountRatio filteredVariantIds maxQuantity minQuantity order productId quantity } } deleted id images {fileName id isMain isVideo order } isActive prices {buyPrice currency currencyCode currencySymbol discountPrice priceListId sellPrice unitPrice } sellIfOutOfStock sku stocks {stockCount stockLocationId } unit {amount type } variantValues {variantTypeId variantValueId } weight } weight } totalCount }";!function(_){_.COUNT="count",_.DATA="data",_.FACETS__ID="facets.id",_.FACETS__VALUES__COUNT="facets.values.count",_.FACETS__VALUES__ID="facets.values.id",_.LIMIT="limit",_.PAGE="page",_.RESULTS__ATTRIBUTES__IMAGE_IDS="results.attributes.imageIds",_.RESULTS__ATTRIBUTES__PRODUCT_ATTRIBUTE__ID="results.attributes.productAttribute.id",_.RESULTS__ATTRIBUTES__PRODUCT_ATTRIBUTE__NAME="results.attributes.productAttribute.name",_.RESULTS__ATTRIBUTES__PRODUCT_ATTRIBUTE__TABLE_TEMPLATE__COLUMNS__ID="results.attributes.productAttribute.tableTemplate.columns.id",_.RESULTS__ATTRIBUTES__PRODUCT_ATTRIBUTE__TABLE_TEMPLATE__COLUMNS__NAME="results.attributes.productAttribute.tableTemplate.columns.name",_.RESULTS__ATTRIBUTES__PRODUCT_ATTRIBUTE__TABLE_TEMPLATE__ROWS__ID="results.attributes.productAttribute.tableTemplate.rows.id",_.RESULTS__ATTRIBUTES__PRODUCT_ATTRIBUTE__TABLE_TEMPLATE__ROWS__NAME="results.attributes.productAttribute.tableTemplate.rows.name",_.RESULTS__ATTRIBUTES__PRODUCT_ATTRIBUTE__TRANSLATIONS__DESCRIPTION="results.attributes.productAttribute.translations.description",_.RESULTS__ATTRIBUTES__PRODUCT_ATTRIBUTE__TRANSLATIONS__LOCALE="results.attributes.productAttribute.translations.locale",_.RESULTS__ATTRIBUTES__PRODUCT_ATTRIBUTE__TRANSLATIONS__NAME="results.attributes.productAttribute.translations.name",_.RESULTS__ATTRIBUTES__PRODUCT_ATTRIBUTE__TRANSLATIONS__OPTIONS__ID="results.attributes.productAttribute.translations.options.id",_.RESULTS__ATTRIBUTES__PRODUCT_ATTRIBUTE__TRANSLATIONS__OPTIONS__NAME="results.attributes.productAttribute.translations.options.name",_.RESULTS__ATTRIBUTES__PRODUCT_ATTRIBUTE__TYPE="results.attributes.productAttribute.type",_.RESULTS__ATTRIBUTES__PRODUCT_ATTRIBUTE_OPTION__ID="results.attributes.productAttributeOption.id",_.RESULTS__ATTRIBUTES__PRODUCT_ATTRIBUTE_OPTION__NAME="results.attributes.productAttributeOption.name",_.RESULTS__ATTRIBUTES__VALUE="results.attributes.value",_.RESULTS__AVERAGE_RATING="results.averageRating",_.RESULTS__BASE_UNIT__BASE_AMOUNT="results.baseUnit.baseAmount",_.RESULTS__BASE_UNIT__TYPE="results.baseUnit.type",_.RESULTS__BASE_UNIT__UNIT__ID="results.baseUnit.unit.id",_.RESULTS__BASE_UNIT__UNIT__NAME="results.baseUnit.unit.name",_.RESULTS__BASE_UNIT__UNIT__TRANSLATIONS__DESCRIPTION="results.baseUnit.unit.translations.description",_.RESULTS__BASE_UNIT__UNIT__TRANSLATIONS__LOCALE="results.baseUnit.unit.translations.locale",_.RESULTS__BASE_UNIT__UNIT__TRANSLATIONS__NAME="results.baseUnit.unit.translations.name",_.RESULTS__BRAND__ID="results.brand.id",_.RESULTS__BRAND__IMAGE_ID="results.brand.imageId",_.RESULTS__BRAND__NAME="results.brand.name",_.RESULTS__BRAND__SLUG="results.brand.slug",_.RESULTS__BRAND__TRANSLATIONS__DESCRIPTION="results.brand.translations.description",_.RESULTS__BRAND__TRANSLATIONS__LOCALE="results.brand.translations.locale",_.RESULTS__BRAND__TRANSLATIONS__NAME="results.brand.translations.name",_.RESULTS__CAMPAIGNS__BUY_X_THEN_GET_Y__BUY_X__AMOUNT="results.campaigns.buyXThenGetY.buyX.amount",_.RESULTS__CAMPAIGNS__BUY_X_THEN_GET_Y__BUY_X__APPLY_BY_QUANTITY="results.campaigns.buyXThenGetY.buyX.applyByQuantity",_.RESULTS__CAMPAIGNS__BUY_X_THEN_GET_Y__GET_Y__AMOUNT="results.campaigns.buyXThenGetY.getY.amount",_.RESULTS__CAMPAIGNS__BUY_X_THEN_GET_Y__GET_Y__DISCOUNT_RATIO="results.campaigns.buyXThenGetY.getY.discountRatio",_.RESULTS__CAMPAIGNS__BUY_X_THEN_GET_Y__MAX_USAGE_PER_ORDER="results.campaigns.buyXThenGetY.maxUsagePerOrder",_.RESULTS__CAMPAIGNS__CURRENCY_CODES="results.campaigns.currencyCodes",_.RESULTS__CAMPAIGNS__DATE_RANGE__END="results.campaigns.dateRange.end",_.RESULTS__CAMPAIGNS__DATE_RANGE__START="results.campaigns.dateRange.start",_.RESULTS__CAMPAIGNS__FIXED_DISCOUNT__AMOUNT="results.campaigns.fixedDiscount.amount",_.RESULTS__CAMPAIGNS__SALES_CHANNEL_IDS="results.campaigns.salesChannelIds",_.RESULTS__CAMPAIGNS__TITLE="results.campaigns.title",_.RESULTS__CAMPAIGNS__TYPE="results.campaigns.type",_.RESULTS__CATEGORIES__ID="results.categories.id",_.RESULTS__CATEGORIES__NAME="results.categories.name",_.RESULTS__CATEGORIES__PATH__ID="results.categories.path.id",_.RESULTS__CATEGORIES__PATH__NAME="results.categories.path.name",_.RESULTS__CATEGORIES__PATH__SLUG="results.categories.path.slug",_.RESULTS__CATEGORIES__PATH__TRANSLATIONS__DESCRIPTION="results.categories.path.translations.description",_.RESULTS__CATEGORIES__PATH__TRANSLATIONS__LOCALE="results.categories.path.translations.locale",_.RESULTS__CATEGORIES__PATH__TRANSLATIONS__NAME="results.categories.path.translations.name",_.RESULTS__CATEGORIES__SLUG="results.categories.slug",_.RESULTS__CATEGORIES__TRANSLATIONS__DESCRIPTION="results.categories.translations.description",_.RESULTS__CATEGORIES__TRANSLATIONS__LOCALE="results.categories.translations.locale",_.RESULTS__CATEGORIES__TRANSLATIONS__NAME="results.categories.translations.name",_.RESULTS__CREATED_AT="results.createdAt",_.RESULTS__CUSTOMER_REVIEW_SUMMARIES__AVERAGE_RATING="results.customerReviewSummaries.averageRating",_.RESULTS__CUSTOMER_REVIEW_SUMMARIES__REVIEW_COUNT="results.customerReviewSummaries.reviewCount",_.RESULTS__CUSTOMER_REVIEW_SUMMARIES__STARS__COUNT="results.customerReviewSummaries.stars.count",_.RESULTS__CUSTOMER_REVIEW_SUMMARIES__STARS__STAR="results.customerReviewSummaries.stars.star",_.RESULTS__CUSTOMER_REVIEW_SUMMARIES__STOREFRONT_ID="results.customerReviewSummaries.storefrontId",_.RESULTS__DELETED="results.deleted",_.RESULTS__DESCRIPTION="results.description",_.RESULTS__DYNAMIC_PRICE_LIST_IDS="results.dynamicPriceListIds",_.RESULTS__GROUP_VARIANTS_BY_VARIANT_TYPE_ID="results.groupVariantsByVariantTypeId",_.RESULTS__HIDDEN_SALES_CHANNEL_IDS="results.hiddenSalesChannelIds",_.RESULTS__ID="results.id",_.RESULTS__META_DATA__CANONICALS="results.metaData.canonicals",_.RESULTS__META_DATA__DESCRIPTION="results.metaData.description",_.RESULTS__META_DATA__DISABLE_INDEX="results.metaData.disableIndex",_.RESULTS__META_DATA__METADATA_OVERRIDES__DESCRIPTION="results.metaData.metadataOverrides.description",_.RESULTS__META_DATA__METADATA_OVERRIDES__LANGUAGE="results.metaData.metadataOverrides.language",_.RESULTS__META_DATA__METADATA_OVERRIDES__PAGE_TITLE="results.metaData.metadataOverrides.pageTitle",_.RESULTS__META_DATA__METADATA_OVERRIDES__STOREFRONT_ID="results.metaData.metadataOverrides.storefrontId",_.RESULTS__META_DATA__METADATA_OVERRIDES__STOREFRONT_REGION_ID="results.metaData.metadataOverrides.storefrontRegionId",_.RESULTS__META_DATA__PAGE_TITLE="results.metaData.pageTitle",_.RESULTS__META_DATA__REDIRECT_TO="results.metaData.redirectTo",_.RESULTS__META_DATA__SLUG="results.metaData.slug",_.RESULTS__META_DATA__TRANSLATIONS__DESCRIPTION="results.metaData.translations.description",_.RESULTS__META_DATA__TRANSLATIONS__LOCALE="results.metaData.translations.locale",_.RESULTS__META_DATA__TRANSLATIONS__PAGE_TITLE="results.metaData.translations.pageTitle",_.RESULTS__META_DATA__TRANSLATIONS__SLUG="results.metaData.translations.slug",_.RESULTS__NAME="results.name",_.RESULTS__PRODUCT_OPTION_SET_ID="results.productOptionSetId",_.RESULTS__PRODUCT_VARIANT_TYPES__ORDER="results.productVariantTypes.order",_.RESULTS__PRODUCT_VARIANT_TYPES__VARIANT_TYPE__ID="results.productVariantTypes.variantType.id",_.RESULTS__PRODUCT_VARIANT_TYPES__VARIANT_TYPE__NAME="results.productVariantTypes.variantType.name",_.RESULTS__PRODUCT_VARIANT_TYPES__VARIANT_TYPE__SELECTION_TYPE="results.productVariantTypes.variantType.selectionType",_.RESULTS__PRODUCT_VARIANT_TYPES__VARIANT_TYPE__TRANSLATIONS__LOCALE="results.productVariantTypes.variantType.translations.locale",_.RESULTS__PRODUCT_VARIANT_TYPES__VARIANT_TYPE__TRANSLATIONS__NAME="results.productVariantTypes.variantType.translations.name",_.RESULTS__PRODUCT_VARIANT_TYPES__VARIANT_TYPE__TRANSLATIONS__VALUES__ID="results.productVariantTypes.variantType.translations.values.id",_.RESULTS__PRODUCT_VARIANT_TYPES__VARIANT_TYPE__TRANSLATIONS__VALUES__NAME="results.productVariantTypes.variantType.translations.values.name",_.RESULTS__PRODUCT_VARIANT_TYPES__VARIANT_TYPE__VALUES__COLOR_CODE="results.productVariantTypes.variantType.values.colorCode",_.RESULTS__PRODUCT_VARIANT_TYPES__VARIANT_TYPE__VALUES__ID="results.productVariantTypes.variantType.values.id",_.RESULTS__PRODUCT_VARIANT_TYPES__VARIANT_TYPE__VALUES__NAME="results.productVariantTypes.variantType.values.name",_.RESULTS__PRODUCT_VARIANT_TYPES__VARIANT_TYPE__VALUES__THUMBNAIL_IMAGE_ID="results.productVariantTypes.variantType.values.thumbnailImageId",_.RESULTS__PRODUCT_VARIANT_TYPES__VARIANT_VALUE_IDS="results.productVariantTypes.variantValueIds",_.RESULTS__PRODUCT_VOLUME_DISCOUNT_ID="results.productVolumeDiscountId",_.RESULTS__REVIEW_COUNT="results.reviewCount",_.RESULTS__SALES_CHANNEL_IDS="results.salesChannelIds",_.RESULTS__SHORT_DESCRIPTION="results.shortDescription",_.RESULTS__STARS__COUNT="results.stars.count",_.RESULTS__STARS__STAR="results.stars.star",_.RESULTS__TAGS__ID="results.tags.id",_.RESULTS__TAGS__NAME="results.tags.name",_.RESULTS__TAGS__TRANSLATIONS__DESCRIPTION="results.tags.translations.description",_.RESULTS__TAGS__TRANSLATIONS__LOCALE="results.tags.translations.locale",_.RESULTS__TAGS__TRANSLATIONS__NAME="results.tags.translations.name",_.RESULTS__TRANSLATIONS__DESCRIPTION="results.translations.description",_.RESULTS__TRANSLATIONS__LOCALE="results.translations.locale",_.RESULTS__TRANSLATIONS__NAME="results.translations.name",_.RESULTS__TYPE="results.type",_.RESULTS__UPDATED_AT="results.updatedAt",_.RESULTS__VARIANTS__ATTRIBUTES__IMAGE_IDS="results.variants.attributes.imageIds",_.RESULTS__VARIANTS__ATTRIBUTES__PRODUCT_ATTRIBUTE__ID="results.variants.attributes.productAttribute.id",_.RESULTS__VARIANTS__ATTRIBUTES__PRODUCT_ATTRIBUTE__NAME="results.variants.attributes.productAttribute.name",_.RESULTS__VARIANTS__ATTRIBUTES__PRODUCT_ATTRIBUTE__TABLE_TEMPLATE__COLUMNS__ID="results.variants.attributes.productAttribute.tableTemplate.columns.id",_.RESULTS__VARIANTS__ATTRIBUTES__PRODUCT_ATTRIBUTE__TABLE_TEMPLATE__COLUMNS__NAME="results.variants.attributes.productAttribute.tableTemplate.columns.name",_.RESULTS__VARIANTS__ATTRIBUTES__PRODUCT_ATTRIBUTE__TABLE_TEMPLATE__ROWS__ID="results.variants.attributes.productAttribute.tableTemplate.rows.id",_.RESULTS__VARIANTS__ATTRIBUTES__PRODUCT_ATTRIBUTE__TABLE_TEMPLATE__ROWS__NAME="results.variants.attributes.productAttribute.tableTemplate.rows.name",_.RESULTS__VARIANTS__ATTRIBUTES__PRODUCT_ATTRIBUTE__TRANSLATIONS__DESCRIPTION="results.variants.attributes.productAttribute.translations.description",_.RESULTS__VARIANTS__ATTRIBUTES__PRODUCT_ATTRIBUTE__TRANSLATIONS__LOCALE="results.variants.attributes.productAttribute.translations.locale",_.RESULTS__VARIANTS__ATTRIBUTES__PRODUCT_ATTRIBUTE__TRANSLATIONS__NAME="results.variants.attributes.productAttribute.translations.name",_.RESULTS__VARIANTS__ATTRIBUTES__PRODUCT_ATTRIBUTE__TRANSLATIONS__OPTIONS__ID="results.variants.attributes.productAttribute.translations.options.id",_.RESULTS__VARIANTS__ATTRIBUTES__PRODUCT_ATTRIBUTE__TRANSLATIONS__OPTIONS__NAME="results.variants.attributes.productAttribute.translations.options.name",_.RESULTS__VARIANTS__ATTRIBUTES__PRODUCT_ATTRIBUTE__TYPE="results.variants.attributes.productAttribute.type",_.RESULTS__VARIANTS__ATTRIBUTES__PRODUCT_ATTRIBUTE_OPTION__ID="results.variants.attributes.productAttributeOption.id",_.RESULTS__VARIANTS__ATTRIBUTES__PRODUCT_ATTRIBUTE_OPTION__NAME="results.variants.attributes.productAttributeOption.name",_.RESULTS__VARIANTS__ATTRIBUTES__VALUE="results.variants.attributes.value",_.RESULTS__VARIANTS__BARCODE_LIST="results.variants.barcodeList",_.RESULTS__VARIANTS__BASE_BUNDLE_PRICES__BUY_PRICE="results.variants.baseBundlePrices.buyPrice",_.RESULTS__VARIANTS__BASE_BUNDLE_PRICES__CURRENCY="results.variants.baseBundlePrices.currency",_.RESULTS__VARIANTS__BASE_BUNDLE_PRICES__CURRENCY_CODE="results.variants.baseBundlePrices.currencyCode",_.RESULTS__VARIANTS__BASE_BUNDLE_PRICES__CURRENCY_SYMBOL="results.variants.baseBundlePrices.currencySymbol",_.RESULTS__VARIANTS__BASE_BUNDLE_PRICES__DISCOUNT_PRICE="results.variants.baseBundlePrices.discountPrice",_.RESULTS__VARIANTS__BASE_BUNDLE_PRICES__PRICE_LIST_ID="results.variants.baseBundlePrices.priceListId",_.RESULTS__VARIANTS__BASE_BUNDLE_PRICES__SELL_PRICE="results.variants.baseBundlePrices.sellPrice",_.RESULTS__VARIANTS__BASE_BUNDLE_PRICES__UNIT_PRICE="results.variants.baseBundlePrices.unitPrice",_.RESULTS__VARIANTS__BUNDLE_SETTINGS__MAX_BUNDLE_QUANTITY="results.variants.bundleSettings.maxBundleQuantity",_.RESULTS__VARIANTS__BUNDLE_SETTINGS__MIN_BUNDLE_QUANTITY="results.variants.bundleSettings.minBundleQuantity",_.RESULTS__VARIANTS__BUNDLE_SETTINGS__PRODUCTS__ADD_TO_BUNDLE_BASE_PRICE="results.variants.bundleSettings.products.addToBundleBasePrice",_.RESULTS__VARIANTS__BUNDLE_SETTINGS__PRODUCTS__DISCOUNT_RATIO="results.variants.bundleSettings.products.discountRatio",_.RESULTS__VARIANTS__BUNDLE_SETTINGS__PRODUCTS__FILTERED_VARIANT_IDS="results.variants.bundleSettings.products.filteredVariantIds",_.RESULTS__VARIANTS__BUNDLE_SETTINGS__PRODUCTS__MAX_QUANTITY="results.variants.bundleSettings.products.maxQuantity",_.RESULTS__VARIANTS__BUNDLE_SETTINGS__PRODUCTS__MIN_QUANTITY="results.variants.bundleSettings.products.minQuantity",_.RESULTS__VARIANTS__BUNDLE_SETTINGS__PRODUCTS__ORDER="results.variants.bundleSettings.products.order",_.RESULTS__VARIANTS__BUNDLE_SETTINGS__PRODUCTS__PRODUCT_ID="results.variants.bundleSettings.products.productId",_.RESULTS__VARIANTS__BUNDLE_SETTINGS__PRODUCTS__QUANTITY="results.variants.bundleSettings.products.quantity",_.RESULTS__VARIANTS__DELETED="results.variants.deleted",_.RESULTS__VARIANTS__ID="results.variants.id",_.RESULTS__VARIANTS__IMAGES__FILE_NAME="results.variants.images.fileName",_.RESULTS__VARIANTS__IMAGES__ID="results.variants.images.id",_.RESULTS__VARIANTS__IMAGES__IS_MAIN="results.variants.images.isMain",_.RESULTS__VARIANTS__IMAGES__IS_VIDEO="results.variants.images.isVideo",_.RESULTS__VARIANTS__IMAGES__ORDER="results.variants.images.order",_.RESULTS__VARIANTS__IS_ACTIVE="results.variants.isActive",_.RESULTS__VARIANTS__PRICES__BUY_PRICE="results.variants.prices.buyPrice",_.RESULTS__VARIANTS__PRICES__CURRENCY="results.variants.prices.currency",_.RESULTS__VARIANTS__PRICES__CURRENCY_CODE="results.variants.prices.currencyCode",_.RESULTS__VARIANTS__PRICES__CURRENCY_SYMBOL="results.variants.prices.currencySymbol",_.RESULTS__VARIANTS__PRICES__DISCOUNT_PRICE="results.variants.prices.discountPrice",_.RESULTS__VARIANTS__PRICES__PRICE_LIST_ID="results.variants.prices.priceListId",_.RESULTS__VARIANTS__PRICES__SELL_PRICE="results.variants.prices.sellPrice",_.RESULTS__VARIANTS__PRICES__UNIT_PRICE="results.variants.prices.unitPrice",_.RESULTS__VARIANTS__SELL_IF_OUT_OF_STOCK="results.variants.sellIfOutOfStock",_.RESULTS__VARIANTS__SKU="results.variants.sku",_.RESULTS__VARIANTS__STOCKS__STOCK_COUNT="results.variants.stocks.stockCount",_.RESULTS__VARIANTS__STOCKS__STOCK_LOCATION_ID="results.variants.stocks.stockLocationId",_.RESULTS__VARIANTS__UNIT__AMOUNT="results.variants.unit.amount",_.RESULTS__VARIANTS__UNIT__TYPE="results.variants.unit.type",_.RESULTS__VARIANTS__VARIANT_VALUES__VARIANT_TYPE_ID="results.variants.variantValues.variantTypeId",_.RESULTS__VARIANTS__VARIANT_VALUES__VARIANT_VALUE_ID="results.variants.variantValues.variantValueId",_.RESULTS__VARIANTS__WEIGHT="results.variants.weight",_.RESULTS__WEIGHT="results.weight",_.TOTAL_COUNT="totalCount"}(S||(S={}));export{S as ResponseField,a as default};
1
+ import{__awaiter as _,__generator as t}from'./../../ext/tslib/tslib.es6.js';import{handleAPIError as T,APIResponse as s,fetchQuery as e}from"@ikas/fe-api-client";var S,a=function(S,a,A){return _(void 0,void 0,void 0,(function(){var _,E,i,R;return t(this,(function(t){switch(t.label){case 0:return t.trys.push([0,2,,3]),[4,e({operationName:"searchProducts",config:A,variables:S,allReturnFields:r,fields:a,query:function(_){return"\n\t\t\t\tquery searchProducts (\n\t\t\t\t\t$input: SearchInput!,\n\t\t\t\t) {\n\t\t\t\t\tsearchProducts (\n\t\t\t\t\t\tinput: $input,\n\t\t\t\t\t) ".concat(_,"\n\t\t\t\t}\n\t\t\t")}})];case 1:return _=t.sent(),E=_.data,i=_.errors,[2,new s(null==E?void 0:E.searchProducts,i)];case 2:return R=t.sent(),[2,T(R)];case 3:return[2]}}))}))},r="{count data facets {id values {count id } } limit page results {attributes {imageIds productAttribute {id name tableTemplate {columns {id name } rows {id name } } translations {description locale name options {id name } } type } productAttributeOption {id name } value } averageRating baseUnit {baseAmount type unit {id name translations {description locale name } } } brand {id imageId name slug translations {description locale name } } campaignOffers {id } campaigns {buyXThenGetY {buyX {amount applyByQuantity } getY {amount discountRatio } maxUsagePerOrder } currencyCodes dateRange {end start } fixedDiscount {amount } salesChannelIds title type } categories {id name path {id name slug translations {description locale name } } slug translations {description locale name } } createdAt customerReviewSummaries {averageRating reviewCount stars {count star } storefrontId } deleted description dynamicPriceListIds groupVariantsByVariantTypeId hiddenSalesChannelIds id metaData {canonicals description disableIndex metadataOverrides {description language pageTitle storefrontId storefrontRegionId } pageTitle redirectTo slug translations {description locale pageTitle slug } } name productOptionSetId productVariantTypes {order variantType {id name selectionType translations {locale name values {id name } } values {colorCode id name thumbnailImageId } } variantValueIds } productVolumeDiscountId reviewCount salesChannelIds shortDescription stars {count star } tags {id name translations {description locale name } } translations {description locale name } type updatedAt variants {attributes {imageIds productAttribute {id name tableTemplate {columns {id name } rows {id name } } translations {description locale name options {id name } } type } productAttributeOption {id name } value } barcodeList baseBundlePrices {buyPrice currency currencyCode currencySymbol discountPrice priceListId sellPrice unitPrice } bundleSettings {maxBundleQuantity minBundleQuantity products {addToBundleBasePrice discountRatio filteredVariantIds maxQuantity minQuantity order productId quantity } } deleted id images {fileName id isMain isVideo order } isActive prices {buyPrice currency currencyCode currencySymbol discountPrice priceListId sellPrice unitPrice } sellIfOutOfStock sku stocks {stockCount stockLocationId } unit {amount type } variantValues {variantTypeId variantValueId } weight } weight } totalCount }";!function(_){_.COUNT="count",_.DATA="data",_.FACETS__ID="facets.id",_.FACETS__VALUES__COUNT="facets.values.count",_.FACETS__VALUES__ID="facets.values.id",_.LIMIT="limit",_.PAGE="page",_.RESULTS__ATTRIBUTES__IMAGE_IDS="results.attributes.imageIds",_.RESULTS__ATTRIBUTES__PRODUCT_ATTRIBUTE__ID="results.attributes.productAttribute.id",_.RESULTS__ATTRIBUTES__PRODUCT_ATTRIBUTE__NAME="results.attributes.productAttribute.name",_.RESULTS__ATTRIBUTES__PRODUCT_ATTRIBUTE__TABLE_TEMPLATE__COLUMNS__ID="results.attributes.productAttribute.tableTemplate.columns.id",_.RESULTS__ATTRIBUTES__PRODUCT_ATTRIBUTE__TABLE_TEMPLATE__COLUMNS__NAME="results.attributes.productAttribute.tableTemplate.columns.name",_.RESULTS__ATTRIBUTES__PRODUCT_ATTRIBUTE__TABLE_TEMPLATE__ROWS__ID="results.attributes.productAttribute.tableTemplate.rows.id",_.RESULTS__ATTRIBUTES__PRODUCT_ATTRIBUTE__TABLE_TEMPLATE__ROWS__NAME="results.attributes.productAttribute.tableTemplate.rows.name",_.RESULTS__ATTRIBUTES__PRODUCT_ATTRIBUTE__TRANSLATIONS__DESCRIPTION="results.attributes.productAttribute.translations.description",_.RESULTS__ATTRIBUTES__PRODUCT_ATTRIBUTE__TRANSLATIONS__LOCALE="results.attributes.productAttribute.translations.locale",_.RESULTS__ATTRIBUTES__PRODUCT_ATTRIBUTE__TRANSLATIONS__NAME="results.attributes.productAttribute.translations.name",_.RESULTS__ATTRIBUTES__PRODUCT_ATTRIBUTE__TRANSLATIONS__OPTIONS__ID="results.attributes.productAttribute.translations.options.id",_.RESULTS__ATTRIBUTES__PRODUCT_ATTRIBUTE__TRANSLATIONS__OPTIONS__NAME="results.attributes.productAttribute.translations.options.name",_.RESULTS__ATTRIBUTES__PRODUCT_ATTRIBUTE__TYPE="results.attributes.productAttribute.type",_.RESULTS__ATTRIBUTES__PRODUCT_ATTRIBUTE_OPTION__ID="results.attributes.productAttributeOption.id",_.RESULTS__ATTRIBUTES__PRODUCT_ATTRIBUTE_OPTION__NAME="results.attributes.productAttributeOption.name",_.RESULTS__ATTRIBUTES__VALUE="results.attributes.value",_.RESULTS__AVERAGE_RATING="results.averageRating",_.RESULTS__BASE_UNIT__BASE_AMOUNT="results.baseUnit.baseAmount",_.RESULTS__BASE_UNIT__TYPE="results.baseUnit.type",_.RESULTS__BASE_UNIT__UNIT__ID="results.baseUnit.unit.id",_.RESULTS__BASE_UNIT__UNIT__NAME="results.baseUnit.unit.name",_.RESULTS__BASE_UNIT__UNIT__TRANSLATIONS__DESCRIPTION="results.baseUnit.unit.translations.description",_.RESULTS__BASE_UNIT__UNIT__TRANSLATIONS__LOCALE="results.baseUnit.unit.translations.locale",_.RESULTS__BASE_UNIT__UNIT__TRANSLATIONS__NAME="results.baseUnit.unit.translations.name",_.RESULTS__BRAND__ID="results.brand.id",_.RESULTS__BRAND__IMAGE_ID="results.brand.imageId",_.RESULTS__BRAND__NAME="results.brand.name",_.RESULTS__BRAND__SLUG="results.brand.slug",_.RESULTS__BRAND__TRANSLATIONS__DESCRIPTION="results.brand.translations.description",_.RESULTS__BRAND__TRANSLATIONS__LOCALE="results.brand.translations.locale",_.RESULTS__BRAND__TRANSLATIONS__NAME="results.brand.translations.name",_.RESULTS__CAMPAIGN_OFFERS__ID="results.campaignOffers.id",_.RESULTS__CAMPAIGNS__BUY_X_THEN_GET_Y__BUY_X__AMOUNT="results.campaigns.buyXThenGetY.buyX.amount",_.RESULTS__CAMPAIGNS__BUY_X_THEN_GET_Y__BUY_X__APPLY_BY_QUANTITY="results.campaigns.buyXThenGetY.buyX.applyByQuantity",_.RESULTS__CAMPAIGNS__BUY_X_THEN_GET_Y__GET_Y__AMOUNT="results.campaigns.buyXThenGetY.getY.amount",_.RESULTS__CAMPAIGNS__BUY_X_THEN_GET_Y__GET_Y__DISCOUNT_RATIO="results.campaigns.buyXThenGetY.getY.discountRatio",_.RESULTS__CAMPAIGNS__BUY_X_THEN_GET_Y__MAX_USAGE_PER_ORDER="results.campaigns.buyXThenGetY.maxUsagePerOrder",_.RESULTS__CAMPAIGNS__CURRENCY_CODES="results.campaigns.currencyCodes",_.RESULTS__CAMPAIGNS__DATE_RANGE__END="results.campaigns.dateRange.end",_.RESULTS__CAMPAIGNS__DATE_RANGE__START="results.campaigns.dateRange.start",_.RESULTS__CAMPAIGNS__FIXED_DISCOUNT__AMOUNT="results.campaigns.fixedDiscount.amount",_.RESULTS__CAMPAIGNS__SALES_CHANNEL_IDS="results.campaigns.salesChannelIds",_.RESULTS__CAMPAIGNS__TITLE="results.campaigns.title",_.RESULTS__CAMPAIGNS__TYPE="results.campaigns.type",_.RESULTS__CATEGORIES__ID="results.categories.id",_.RESULTS__CATEGORIES__NAME="results.categories.name",_.RESULTS__CATEGORIES__PATH__ID="results.categories.path.id",_.RESULTS__CATEGORIES__PATH__NAME="results.categories.path.name",_.RESULTS__CATEGORIES__PATH__SLUG="results.categories.path.slug",_.RESULTS__CATEGORIES__PATH__TRANSLATIONS__DESCRIPTION="results.categories.path.translations.description",_.RESULTS__CATEGORIES__PATH__TRANSLATIONS__LOCALE="results.categories.path.translations.locale",_.RESULTS__CATEGORIES__PATH__TRANSLATIONS__NAME="results.categories.path.translations.name",_.RESULTS__CATEGORIES__SLUG="results.categories.slug",_.RESULTS__CATEGORIES__TRANSLATIONS__DESCRIPTION="results.categories.translations.description",_.RESULTS__CATEGORIES__TRANSLATIONS__LOCALE="results.categories.translations.locale",_.RESULTS__CATEGORIES__TRANSLATIONS__NAME="results.categories.translations.name",_.RESULTS__CREATED_AT="results.createdAt",_.RESULTS__CUSTOMER_REVIEW_SUMMARIES__AVERAGE_RATING="results.customerReviewSummaries.averageRating",_.RESULTS__CUSTOMER_REVIEW_SUMMARIES__REVIEW_COUNT="results.customerReviewSummaries.reviewCount",_.RESULTS__CUSTOMER_REVIEW_SUMMARIES__STARS__COUNT="results.customerReviewSummaries.stars.count",_.RESULTS__CUSTOMER_REVIEW_SUMMARIES__STARS__STAR="results.customerReviewSummaries.stars.star",_.RESULTS__CUSTOMER_REVIEW_SUMMARIES__STOREFRONT_ID="results.customerReviewSummaries.storefrontId",_.RESULTS__DELETED="results.deleted",_.RESULTS__DESCRIPTION="results.description",_.RESULTS__DYNAMIC_PRICE_LIST_IDS="results.dynamicPriceListIds",_.RESULTS__GROUP_VARIANTS_BY_VARIANT_TYPE_ID="results.groupVariantsByVariantTypeId",_.RESULTS__HIDDEN_SALES_CHANNEL_IDS="results.hiddenSalesChannelIds",_.RESULTS__ID="results.id",_.RESULTS__META_DATA__CANONICALS="results.metaData.canonicals",_.RESULTS__META_DATA__DESCRIPTION="results.metaData.description",_.RESULTS__META_DATA__DISABLE_INDEX="results.metaData.disableIndex",_.RESULTS__META_DATA__METADATA_OVERRIDES__DESCRIPTION="results.metaData.metadataOverrides.description",_.RESULTS__META_DATA__METADATA_OVERRIDES__LANGUAGE="results.metaData.metadataOverrides.language",_.RESULTS__META_DATA__METADATA_OVERRIDES__PAGE_TITLE="results.metaData.metadataOverrides.pageTitle",_.RESULTS__META_DATA__METADATA_OVERRIDES__STOREFRONT_ID="results.metaData.metadataOverrides.storefrontId",_.RESULTS__META_DATA__METADATA_OVERRIDES__STOREFRONT_REGION_ID="results.metaData.metadataOverrides.storefrontRegionId",_.RESULTS__META_DATA__PAGE_TITLE="results.metaData.pageTitle",_.RESULTS__META_DATA__REDIRECT_TO="results.metaData.redirectTo",_.RESULTS__META_DATA__SLUG="results.metaData.slug",_.RESULTS__META_DATA__TRANSLATIONS__DESCRIPTION="results.metaData.translations.description",_.RESULTS__META_DATA__TRANSLATIONS__LOCALE="results.metaData.translations.locale",_.RESULTS__META_DATA__TRANSLATIONS__PAGE_TITLE="results.metaData.translations.pageTitle",_.RESULTS__META_DATA__TRANSLATIONS__SLUG="results.metaData.translations.slug",_.RESULTS__NAME="results.name",_.RESULTS__PRODUCT_OPTION_SET_ID="results.productOptionSetId",_.RESULTS__PRODUCT_VARIANT_TYPES__ORDER="results.productVariantTypes.order",_.RESULTS__PRODUCT_VARIANT_TYPES__VARIANT_TYPE__ID="results.productVariantTypes.variantType.id",_.RESULTS__PRODUCT_VARIANT_TYPES__VARIANT_TYPE__NAME="results.productVariantTypes.variantType.name",_.RESULTS__PRODUCT_VARIANT_TYPES__VARIANT_TYPE__SELECTION_TYPE="results.productVariantTypes.variantType.selectionType",_.RESULTS__PRODUCT_VARIANT_TYPES__VARIANT_TYPE__TRANSLATIONS__LOCALE="results.productVariantTypes.variantType.translations.locale",_.RESULTS__PRODUCT_VARIANT_TYPES__VARIANT_TYPE__TRANSLATIONS__NAME="results.productVariantTypes.variantType.translations.name",_.RESULTS__PRODUCT_VARIANT_TYPES__VARIANT_TYPE__TRANSLATIONS__VALUES__ID="results.productVariantTypes.variantType.translations.values.id",_.RESULTS__PRODUCT_VARIANT_TYPES__VARIANT_TYPE__TRANSLATIONS__VALUES__NAME="results.productVariantTypes.variantType.translations.values.name",_.RESULTS__PRODUCT_VARIANT_TYPES__VARIANT_TYPE__VALUES__COLOR_CODE="results.productVariantTypes.variantType.values.colorCode",_.RESULTS__PRODUCT_VARIANT_TYPES__VARIANT_TYPE__VALUES__ID="results.productVariantTypes.variantType.values.id",_.RESULTS__PRODUCT_VARIANT_TYPES__VARIANT_TYPE__VALUES__NAME="results.productVariantTypes.variantType.values.name",_.RESULTS__PRODUCT_VARIANT_TYPES__VARIANT_TYPE__VALUES__THUMBNAIL_IMAGE_ID="results.productVariantTypes.variantType.values.thumbnailImageId",_.RESULTS__PRODUCT_VARIANT_TYPES__VARIANT_VALUE_IDS="results.productVariantTypes.variantValueIds",_.RESULTS__PRODUCT_VOLUME_DISCOUNT_ID="results.productVolumeDiscountId",_.RESULTS__REVIEW_COUNT="results.reviewCount",_.RESULTS__SALES_CHANNEL_IDS="results.salesChannelIds",_.RESULTS__SHORT_DESCRIPTION="results.shortDescription",_.RESULTS__STARS__COUNT="results.stars.count",_.RESULTS__STARS__STAR="results.stars.star",_.RESULTS__TAGS__ID="results.tags.id",_.RESULTS__TAGS__NAME="results.tags.name",_.RESULTS__TAGS__TRANSLATIONS__DESCRIPTION="results.tags.translations.description",_.RESULTS__TAGS__TRANSLATIONS__LOCALE="results.tags.translations.locale",_.RESULTS__TAGS__TRANSLATIONS__NAME="results.tags.translations.name",_.RESULTS__TRANSLATIONS__DESCRIPTION="results.translations.description",_.RESULTS__TRANSLATIONS__LOCALE="results.translations.locale",_.RESULTS__TRANSLATIONS__NAME="results.translations.name",_.RESULTS__TYPE="results.type",_.RESULTS__UPDATED_AT="results.updatedAt",_.RESULTS__VARIANTS__ATTRIBUTES__IMAGE_IDS="results.variants.attributes.imageIds",_.RESULTS__VARIANTS__ATTRIBUTES__PRODUCT_ATTRIBUTE__ID="results.variants.attributes.productAttribute.id",_.RESULTS__VARIANTS__ATTRIBUTES__PRODUCT_ATTRIBUTE__NAME="results.variants.attributes.productAttribute.name",_.RESULTS__VARIANTS__ATTRIBUTES__PRODUCT_ATTRIBUTE__TABLE_TEMPLATE__COLUMNS__ID="results.variants.attributes.productAttribute.tableTemplate.columns.id",_.RESULTS__VARIANTS__ATTRIBUTES__PRODUCT_ATTRIBUTE__TABLE_TEMPLATE__COLUMNS__NAME="results.variants.attributes.productAttribute.tableTemplate.columns.name",_.RESULTS__VARIANTS__ATTRIBUTES__PRODUCT_ATTRIBUTE__TABLE_TEMPLATE__ROWS__ID="results.variants.attributes.productAttribute.tableTemplate.rows.id",_.RESULTS__VARIANTS__ATTRIBUTES__PRODUCT_ATTRIBUTE__TABLE_TEMPLATE__ROWS__NAME="results.variants.attributes.productAttribute.tableTemplate.rows.name",_.RESULTS__VARIANTS__ATTRIBUTES__PRODUCT_ATTRIBUTE__TRANSLATIONS__DESCRIPTION="results.variants.attributes.productAttribute.translations.description",_.RESULTS__VARIANTS__ATTRIBUTES__PRODUCT_ATTRIBUTE__TRANSLATIONS__LOCALE="results.variants.attributes.productAttribute.translations.locale",_.RESULTS__VARIANTS__ATTRIBUTES__PRODUCT_ATTRIBUTE__TRANSLATIONS__NAME="results.variants.attributes.productAttribute.translations.name",_.RESULTS__VARIANTS__ATTRIBUTES__PRODUCT_ATTRIBUTE__TRANSLATIONS__OPTIONS__ID="results.variants.attributes.productAttribute.translations.options.id",_.RESULTS__VARIANTS__ATTRIBUTES__PRODUCT_ATTRIBUTE__TRANSLATIONS__OPTIONS__NAME="results.variants.attributes.productAttribute.translations.options.name",_.RESULTS__VARIANTS__ATTRIBUTES__PRODUCT_ATTRIBUTE__TYPE="results.variants.attributes.productAttribute.type",_.RESULTS__VARIANTS__ATTRIBUTES__PRODUCT_ATTRIBUTE_OPTION__ID="results.variants.attributes.productAttributeOption.id",_.RESULTS__VARIANTS__ATTRIBUTES__PRODUCT_ATTRIBUTE_OPTION__NAME="results.variants.attributes.productAttributeOption.name",_.RESULTS__VARIANTS__ATTRIBUTES__VALUE="results.variants.attributes.value",_.RESULTS__VARIANTS__BARCODE_LIST="results.variants.barcodeList",_.RESULTS__VARIANTS__BASE_BUNDLE_PRICES__BUY_PRICE="results.variants.baseBundlePrices.buyPrice",_.RESULTS__VARIANTS__BASE_BUNDLE_PRICES__CURRENCY="results.variants.baseBundlePrices.currency",_.RESULTS__VARIANTS__BASE_BUNDLE_PRICES__CURRENCY_CODE="results.variants.baseBundlePrices.currencyCode",_.RESULTS__VARIANTS__BASE_BUNDLE_PRICES__CURRENCY_SYMBOL="results.variants.baseBundlePrices.currencySymbol",_.RESULTS__VARIANTS__BASE_BUNDLE_PRICES__DISCOUNT_PRICE="results.variants.baseBundlePrices.discountPrice",_.RESULTS__VARIANTS__BASE_BUNDLE_PRICES__PRICE_LIST_ID="results.variants.baseBundlePrices.priceListId",_.RESULTS__VARIANTS__BASE_BUNDLE_PRICES__SELL_PRICE="results.variants.baseBundlePrices.sellPrice",_.RESULTS__VARIANTS__BASE_BUNDLE_PRICES__UNIT_PRICE="results.variants.baseBundlePrices.unitPrice",_.RESULTS__VARIANTS__BUNDLE_SETTINGS__MAX_BUNDLE_QUANTITY="results.variants.bundleSettings.maxBundleQuantity",_.RESULTS__VARIANTS__BUNDLE_SETTINGS__MIN_BUNDLE_QUANTITY="results.variants.bundleSettings.minBundleQuantity",_.RESULTS__VARIANTS__BUNDLE_SETTINGS__PRODUCTS__ADD_TO_BUNDLE_BASE_PRICE="results.variants.bundleSettings.products.addToBundleBasePrice",_.RESULTS__VARIANTS__BUNDLE_SETTINGS__PRODUCTS__DISCOUNT_RATIO="results.variants.bundleSettings.products.discountRatio",_.RESULTS__VARIANTS__BUNDLE_SETTINGS__PRODUCTS__FILTERED_VARIANT_IDS="results.variants.bundleSettings.products.filteredVariantIds",_.RESULTS__VARIANTS__BUNDLE_SETTINGS__PRODUCTS__MAX_QUANTITY="results.variants.bundleSettings.products.maxQuantity",_.RESULTS__VARIANTS__BUNDLE_SETTINGS__PRODUCTS__MIN_QUANTITY="results.variants.bundleSettings.products.minQuantity",_.RESULTS__VARIANTS__BUNDLE_SETTINGS__PRODUCTS__ORDER="results.variants.bundleSettings.products.order",_.RESULTS__VARIANTS__BUNDLE_SETTINGS__PRODUCTS__PRODUCT_ID="results.variants.bundleSettings.products.productId",_.RESULTS__VARIANTS__BUNDLE_SETTINGS__PRODUCTS__QUANTITY="results.variants.bundleSettings.products.quantity",_.RESULTS__VARIANTS__DELETED="results.variants.deleted",_.RESULTS__VARIANTS__ID="results.variants.id",_.RESULTS__VARIANTS__IMAGES__FILE_NAME="results.variants.images.fileName",_.RESULTS__VARIANTS__IMAGES__ID="results.variants.images.id",_.RESULTS__VARIANTS__IMAGES__IS_MAIN="results.variants.images.isMain",_.RESULTS__VARIANTS__IMAGES__IS_VIDEO="results.variants.images.isVideo",_.RESULTS__VARIANTS__IMAGES__ORDER="results.variants.images.order",_.RESULTS__VARIANTS__IS_ACTIVE="results.variants.isActive",_.RESULTS__VARIANTS__PRICES__BUY_PRICE="results.variants.prices.buyPrice",_.RESULTS__VARIANTS__PRICES__CURRENCY="results.variants.prices.currency",_.RESULTS__VARIANTS__PRICES__CURRENCY_CODE="results.variants.prices.currencyCode",_.RESULTS__VARIANTS__PRICES__CURRENCY_SYMBOL="results.variants.prices.currencySymbol",_.RESULTS__VARIANTS__PRICES__DISCOUNT_PRICE="results.variants.prices.discountPrice",_.RESULTS__VARIANTS__PRICES__PRICE_LIST_ID="results.variants.prices.priceListId",_.RESULTS__VARIANTS__PRICES__SELL_PRICE="results.variants.prices.sellPrice",_.RESULTS__VARIANTS__PRICES__UNIT_PRICE="results.variants.prices.unitPrice",_.RESULTS__VARIANTS__SELL_IF_OUT_OF_STOCK="results.variants.sellIfOutOfStock",_.RESULTS__VARIANTS__SKU="results.variants.sku",_.RESULTS__VARIANTS__STOCKS__STOCK_COUNT="results.variants.stocks.stockCount",_.RESULTS__VARIANTS__STOCKS__STOCK_LOCATION_ID="results.variants.stocks.stockLocationId",_.RESULTS__VARIANTS__UNIT__AMOUNT="results.variants.unit.amount",_.RESULTS__VARIANTS__UNIT__TYPE="results.variants.unit.type",_.RESULTS__VARIANTS__VARIANT_VALUES__VARIANT_TYPE_ID="results.variants.variantValues.variantTypeId",_.RESULTS__VARIANTS__VARIANT_VALUES__VARIANT_VALUE_ID="results.variants.variantValues.variantValueId",_.RESULTS__VARIANTS__WEIGHT="results.variants.weight",_.RESULTS__WEIGHT="results.weight",_.TOTAL_COUNT="totalCount"}(S||(S={}));export{S as ResponseField,a as default};
@@ -777,10 +777,12 @@ export interface CampaignOffer {
777
777
  availableSalesChannelIds: string[];
778
778
  createdAt: any | null;
779
779
  currencyCodes: string[] | null;
780
- deleted: boolean | null;
780
+ deleted: boolean;
781
781
  endDate: any | null;
782
782
  followUpActionType: CampaignOfferFollowUpActionTypeEnum;
783
783
  id: string;
784
+ maxCount: number | null;
785
+ maximumRequiredCartAmount: number | null;
784
786
  minimumRequiredCartAmount: number | null;
785
787
  name: string;
786
788
  offers: CampaignOfferProduct[];
@@ -2237,6 +2239,7 @@ export interface SearchProduct {
2237
2239
  averageRating: number | null;
2238
2240
  baseUnit: SearchProductProductBaseUnit | null;
2239
2241
  brand: SearchProductBrand | null;
2242
+ campaignOffers: SearchProductCampaignOffer[] | null;
2240
2243
  campaigns: SearchProductCampaign[] | null;
2241
2244
  categories: SearchCategory[] | null;
2242
2245
  createdAt: any | null;
@@ -2324,6 +2327,9 @@ export interface SearchProductCampaignGetY {
2324
2327
  amount: number;
2325
2328
  discountRatio: number;
2326
2329
  }
2330
+ export interface SearchProductCampaignOffer {
2331
+ id: string;
2332
+ }
2327
2333
  export interface SearchProductCustomerReviewStar {
2328
2334
  count: number;
2329
2335
  star: number;
@@ -2784,6 +2790,7 @@ export interface VariantValueTranslation {
2784
2790
  name: string | null;
2785
2791
  }
2786
2792
  export interface AddItemToCartInput {
2793
+ acceptedOffers?: CartAcceptedOfferInput[] | null;
2787
2794
  cartId?: string | null;
2788
2795
  item: CartLineItemInput;
2789
2796
  metadata?: any | null;
@@ -2810,6 +2817,13 @@ export interface BundleProductInput {
2810
2817
  quantity: number;
2811
2818
  variantId: string;
2812
2819
  }
2820
+ export interface CartAcceptedOfferInput {
2821
+ campaignOfferId: string;
2822
+ campaignOfferProductId: string;
2823
+ productId: string;
2824
+ quantity?: number | null;
2825
+ variantId: string;
2826
+ }
2813
2827
  export interface CartLineItemInput {
2814
2828
  id?: string | null;
2815
2829
  quantity: number;
@@ -3208,5 +3222,6 @@ export interface UpdateCartCampaignOfferInput {
3208
3222
  cartId: string;
3209
3223
  metadata?: any | null;
3210
3224
  productId: string;
3225
+ quantity?: number | null;
3211
3226
  variantId: string;
3212
3227
  }
@@ -60,7 +60,7 @@ export declare function getCustomer(): Promise<APIResponse<{
60
60
  createdAt: any;
61
61
  customerGroupIds: string[] | null;
62
62
  customerSequence: number | null;
63
- deleted: boolean | null;
63
+ deleted: boolean;
64
64
  email: string | null;
65
65
  emailVerifiedDate: any;
66
66
  firstName: string;
@@ -75,6 +75,8 @@ export declare function getCustomer(): Promise<APIResponse<{
75
75
  phone: string | null;
76
76
  phoneVerifiedDate: any;
77
77
  preferredLanguage: string | null;
78
+ priceListId: string | null;
79
+ priceListRules: import("../../__api/types").CustomerPriceListRule[] | null;
78
80
  registrationSource: import("../../__api/types").CustomerRegistrationSourceEnum | null;
79
81
  subscriptionStatus: import("../../__api/types").CustomerEmailSubscriptionStatusesEnum | null;
80
82
  subscriptionStatusUpdatedAt: any;
@@ -90,7 +92,7 @@ export declare function saveCustomer(params: SaveMyCustomerQueryParams): Promise
90
92
  createdAt: any;
91
93
  customerGroupIds: string[] | null;
92
94
  customerSequence: number | null;
93
- deleted: boolean | null;
95
+ deleted: boolean;
94
96
  email: string | null;
95
97
  emailVerifiedDate: any;
96
98
  firstName: string;
@@ -105,6 +107,8 @@ export declare function saveCustomer(params: SaveMyCustomerQueryParams): Promise
105
107
  phone: string | null;
106
108
  phoneVerifiedDate: any;
107
109
  preferredLanguage: string | null;
110
+ priceListId: string | null;
111
+ priceListRules: import("../../__api/types").CustomerPriceListRule[] | null;
108
112
  registrationSource: import("../../__api/types").CustomerRegistrationSourceEnum | null;
109
113
  subscriptionStatus: import("../../__api/types").CustomerEmailSubscriptionStatusesEnum | null;
110
114
  subscriptionStatusUpdatedAt: any;
@@ -11,10 +11,12 @@ import { QueryParams as GetOrderLineFileQueryParams } from "../../__api/mutation
11
11
  import { QueryParams as ListProductOptionSetQueryParams } from "../../__api/queries/listProductOptionSet";
12
12
  import { QueryParams as SaveProductBackInStockRemindQueryParams } from "../../__api/mutations/saveProductBackInStockRemind";
13
13
  import { QueryParams as GetVariantStockLocationsQueryParams } from "../../__api/queries/getVariantStockLocations";
14
+ import { QueryParams as ListCampaignOfferQueryParams } from "../../__api/queries/listCampaignOffer";
14
15
  import { IkasFilterCategory, IkasProduct, IkasProductAttribute, IkasProductCampaign, IkasProductFilter, IkasProductOptionSet, IkasProductStockLocations } from "@ikas/storefront-models";
15
16
  export type { ListProductBackInStockRemindQueryParams, SearchProductsQueryParams, GetProductFilterDataQueryParams, GetRelatedProductsQueryParams, GetSuggestedProductsQueryParams, ListProductAttributeQueryParams, GetProductCampaignsQueryParams, GetOrderLineFileQueryParams, ListProductOptionSetQueryParams, SaveProductBackInStockRemindQueryParams, GetVariantStockLocationsQueryParams, };
16
17
  export declare function listProductBackInStockRemind(params: ListProductBackInStockRemindQueryParams): Promise<APIResponse<import("../../__api/types").ProductBackInStockRemind[]> | APIResponse<undefined>>;
17
18
  export declare function saveProductBackInStockRemind(params: SaveProductBackInStockRemindQueryParams): Promise<APIResponse<undefined> | APIResponse<import("../../__api/types").ProductBackInStockRemind>>;
19
+ export declare function listCampaignOffer(params: ListCampaignOfferQueryParams): Promise<APIResponse<undefined> | APIResponse<import("../../__api/types").CampaignOffer[]>>;
18
20
  export declare function searchProducts(params: SearchProductsQueryParams, excludedFields?: string[] | null): Promise<APIResponse<{
19
21
  data: IkasProduct[] | undefined;
20
22
  count: number;
@@ -1 +1 @@
1
- import{__awaiter as t,__generator as e,__assign as n,__spreadArray as r}from'./../../ext/tslib/tslib.es6.js';import{APIResponse as i}from"@ikas/fe-api-client";import{IkasStorefrontConfig as a}from"@ikas/storefront-config";import{initIkasProduct as u,IkasBrandOrderType as o,IkasCategoryProductsOrderType as d,initIkasProductAttribute as l,initIkasProductOptionSet as s}from"@ikas/storefront-models";function c(n){return t(this,void 0,void 0,(function(){return e(this,(function(t){switch(t.label){case 0:return[4,import("../../__api/queries/listProductBackInStockRemind.js")];case 1:return[4,(0,t.sent().default)(n)];case 2:return[2,t.sent()]}}))}))}function p(n){return t(this,void 0,void 0,(function(){return e(this,(function(t){switch(t.label){case 0:return[4,import("../../__api/mutations/saveProductBackInStockRemind.js")];case 1:return[4,(0,t.sent().default)(n)];case 2:return[2,t.sent()]}}))}))}function v(r,o){var d,l;return t(this,void 0,void 0,(function(){var t,s,c,p,v,m;return e(this,(function(e){switch(e.label){case 0:return[4,import("../../__api/queries/searchProducts.js")];case 1:return t=e.sent().default,s=null===(d=a.getCurrentRouting())||void 0===d?void 0:d.dynamicCurrencySettings,p=t,v=[{input:n({locale:a.getCurrentLocale(),dynamicCurrencySettings:s?{roundingFormat:s.roundingFormat,targetCurrencyCode:s.targetCurrencyCode}:void 0},r.input)}],[4,C(o)];case 2:return[4,p.apply(void 0,v.concat([e.sent()]))];case 3:return c=e.sent(),null==(m=null===(l=c.data)||void 0===l?void 0:l.results.map(T))||m.forEach((function(t){return u(t,a.getCurrentLocale())})),[2,new i(c.data?n(n({},c.data),{data:m}):null,c.graphQLErrors)]}}))}))}function m(n){var r,a,u;return t(this,void 0,void 0,(function(){var t,o,d,l;return e(this,(function(e){switch(e.label){case 0:return[4,import("../../__api/queries/getProductFilterData.js")];case 1:return[4,(0,e.sent().default)(n)];case 2:return t=e.sent(),o=null===(r=t.data)||void 0===r?void 0:r.filters,d=(null===(a=t.data)||void 0===a?void 0:a.categories)||null,l=(null===(u=t.data)||void 0===u?void 0:u.disabledSortTypes)||null,[2,new i(t.data?{filters:o,categories:d,disabledSortTypes:l}:null,t.graphQLErrors)]}}))}))}function f(r){var o,d;return t(this,void 0,void 0,(function(){var t,l,s,c;return e(this,(function(e){switch(e.label){case 0:return[4,import("../../__api/queries/getRelatedProducts.js")];case 1:return t=e.sent().default,l=null===(o=a.getCurrentRouting())||void 0===o?void 0:o.dynamicCurrencySettings,[4,t(n({locale:a.getCurrentLocale(),dynamicCurrencySettings:l?{roundingFormat:l.roundingFormat,targetCurrencyCode:l.targetCurrencyCode}:void 0},r))];case 2:return s=e.sent(),(c=(null===(d=null==s?void 0:s.data)||void 0===d?void 0:d.map((function(t){return T(t)})))||[]).forEach((function(t){return u(t,a.getCurrentLocale())})),[2,new i(s.data?{data:c,count:s.data.length,facets:null,limit:20,page:1,totalCount:s.data.length}:null,s.graphQLErrors)]}}))}))}function g(r){var o,d;return t(this,void 0,void 0,(function(){var t,l,s,c;return e(this,(function(e){switch(e.label){case 0:return[4,import("../../__api/queries/getSuggestedProducts.js")];case 1:return t=e.sent().default,l=null===(o=a.getCurrentRouting())||void 0===o?void 0:o.dynamicCurrencySettings,[4,t(n({locale:a.getCurrentLocale(),dynamicCurrencySettings:l?{roundingFormat:l.roundingFormat,targetCurrencyCode:l.targetCurrencyCode}:void 0},r))];case 2:return s=e.sent(),(c=(null===(d=null==s?void 0:s.data)||void 0===d?void 0:d.map((function(t){return T(t)})))||[]).forEach((function(t){return u(t,a.getCurrentLocale())})),[2,new i(s.data?{data:c,count:s.data.length,facets:null,limit:20,page:1,totalCount:s.data.length}:null,s.graphQLErrors)]}}))}))}function b(n){return t(this,void 0,void 0,(function(){var t,r;return e(this,(function(e){switch(e.label){case 0:return[4,import("../../__api/queries/listProductAttribute.js")];case 1:return[4,(0,e.sent().default)(n)];case 2:return t=e.sent(),null==(r=t.data)||r.forEach((function(t){return l(t,a.getCurrentLocale())})),[2,new i(r,t.graphQLErrors)]}}))}))}function h(n){var r;return t(this,void 0,void 0,(function(){var t;return e(this,(function(e){switch(e.label){case 0:return[4,import("../../__api/queries/getProductCampaigns.js")];case 1:return[4,(0,e.sent().default)(n)];case 2:return t=e.sent(),[2,new i(null===(r=t.data)||void 0===r?void 0:r.map((function(t){return t})),t.graphQLErrors)]}}))}))}function y(n){var r;return t(this,void 0,void 0,(function(){var t;return e(this,(function(e){switch(e.label){case 0:return[4,import("../../__api/queries/getVariantStockLocations.js")];case 1:return[4,(0,e.sent().default)(n)];case 2:return t=e.sent(),[2,new i(null===(r=t.data)||void 0===r?void 0:r.stockLocations.map((function(t){return t})),t.graphQLErrors)]}}))}))}function A(n){return t(this,void 0,void 0,(function(){return e(this,(function(t){switch(t.label){case 0:return[4,import("../../__api/mutations/getOrderLineFile.js")];case 1:return[4,(0,t.sent().default)(n)];case 2:return[2,t.sent()]}}))}))}function I(n){return t(this,void 0,void 0,(function(){var t,r;return e(this,(function(e){switch(e.label){case 0:return[4,import("../../__api/queries/listProductOptionSet.js")];case 1:return[4,(0,e.sent().default)(n)];case 2:return t=e.sent(),null==(r=t.data)||r.forEach((function(t){return s(t,a.getCurrentLocale())})),[2,new i(r,t.graphQLErrors)]}}))}))}function C(n){return t(this,void 0,void 0,(function(){var t,i;return e(this,(function(e){switch(e.label){case 0:return[4,import("../../__api/queries/searchProducts.js")];case 1:return t=e.sent().ResponseField,i=["DATA"],n&&n.length&&n.map((function(e){var n=Object.keys(t).filter((function(t){return t.startsWith(e)}));i=r(r([],i,!0),n,!0)})),[2,Object.entries(t).filter((function(t){var e=t[0];return!i.includes(e)})).map((function(t){return t[1]}))]}}))}))}function T(t){var e,r,i,u,l="local"===process.env.NEXT_PUBLIC_ENV;return{id:t.id,type:t.type,groupVariantsByVariantTypeId:t.groupVariantsByVariantTypeId,deleted:t.deleted,attributes:(null===(e=t.attributes)||void 0===e?void 0:e.map((function(t){var e,r,i,a,u,o;return n(n({},t),{value:t.value,productAttributeId:(null===(e=t.productAttribute)||void 0===e?void 0:e.id)||null,productAttributeOptionId:(null===(r=t.productAttributeOption)||void 0===r?void 0:r.id)||null,productAttribute:{id:(null===(i=t.productAttribute)||void 0===i?void 0:i.id)||"",name:(null===(a=t.productAttribute)||void 0===a?void 0:a.name)||"",description:null,type:null===(u=t.productAttribute)||void 0===u?void 0:u.type,tableTemplate:(null===(o=t.productAttribute)||void 0===o?void 0:o.tableTemplate)?t.productAttribute.tableTemplate:null,options:null},productAttributeOption:t.productAttributeOption})})))||[],brand:t.brand?n(n({},t.brand),{id:t.brand.id,name:t.brand.name,createdAt:0,updatedAt:0,description:null,imageId:t.brand.imageId,orderType:o.BEST_SELLER,metaData:{id:"",createdAt:0,updatedAt:0,slug:t.brand.slug||""}}):null,campaigns:null===(r=t.campaigns)||void 0===r?void 0:r.map((function(t){return{campaign:t,variantIds:[]}})),categories:(null===(i=t.categories)||void 0===i?void 0:i.map((function(t){return n(n({},t),{categoryPath:t.path.map((function(t){return t.name})),description:null,imageId:null,parentId:null,metaData:t.slug?{id:"",createdAt:0,updatedAt:0,name:t.name||"",slug:t.slug}:null,categoryPathItems:t.path.map((function(t){return{metaData:{id:"",createdAt:0,updatedAt:0,name:t.name||"",slug:t.slug||""},description:null,name:t.name,translations:t.translations,imageId:null,id:t.id,createdAt:0,updatedAt:0}})),createdAt:0,updatedAt:0,orderType:d.BEST_SELLER,conditions:null,conditionValues:null})})))||[],tags:t.tags||[],description:t.description||"",averageRating:t.averageRating,reviewCount:t.reviewCount,stars:t.stars,baseUnit:t.baseUnit,metaData:n(n({},t.metaData),{id:"",createdAt:0,updatedAt:0,slug:(null===(u=t.metaData)||void 0===u?void 0:u.slug)||""})||null,name:t.name,shortDescription:t.shortDescription||"",productOptionSetId:t.productOptionSetId,variantTypes:t.productVariantTypes.map((function(t){return{order:t.order,variantType:{id:t.variantType.id,name:t.variantType.name,selectionType:t.variantType.selectionType,values:t.variantType.values.map((function(e){return{id:e.id,colorCode:e.colorCode,name:e.name,thumbnailImageId:e.thumbnailImageId,variantTypeId:t.variantType.id}})).filter((function(e){return t.variantValueIds.includes(e.id)}))},variantValueIds:t.variantValueIds}})),variants:t.variants.map((function(e){var r,i,u,o;return n(n({},e),{id:e.id,productId:t.id,images:(null===(r=e.images)||void 0===r?void 0:r.map((function(t){return{imageId:t.id,isMain:t.isMain||!1,isVideo:t.isVideo,order:t.order,fileName:t.fileName}})))||null,sellIfOutOfStock:e.sellIfOutOfStock||!1,unit:e.unit,attributes:(null===(i=e.attributes)||void 0===i?void 0:i.map((function(t){var e,r,i,a,u,o;return n(n({},t),{value:t.value,productAttributeId:(null===(e=t.productAttribute)||void 0===e?void 0:e.id)||null,productAttributeOptionId:(null===(r=t.productAttributeOption)||void 0===r?void 0:r.id)||null,productAttribute:{id:(null===(i=t.productAttribute)||void 0===i?void 0:i.id)||"",name:(null===(a=t.productAttribute)||void 0===a?void 0:a.name)||"",description:"",type:null===(u=t.productAttribute)||void 0===u?void 0:u.type,tableTemplate:(null===(o=t.productAttribute)||void 0===o?void 0:o.tableTemplate)?t.productAttribute.tableTemplate:null,options:null},productAttributeOption:t.productAttributeOption})})))||[],sku:e.sku,barcodeList:e.barcodeList||null,prices:e.prices||[],stock:(null===(u=e.stocks)||void 0===u?void 0:u.filter((function(t){var e;return l||a.getIsEditor()||(null===(e=a.getStockLocationIds())||void 0===e?void 0:e.includes(t.stockLocationId))})).reduce((function(t,e){return e.stockCount+t}),0))||0,variantValues:(null===(o=e.variantValues)||void 0===o?void 0:o.map((function(e){var n=t.productVariantTypes.find((function(t){return t.variantType.id===e.variantTypeId})),r=null==n?void 0:n.variantType.values.find((function(t){return t.id===e.variantValueId}));return{id:e.variantValueId,name:(null==r?void 0:r.name)||"",colorCode:(null==r?void 0:r.colorCode)||"",thumbnailImageId:(null==r?void 0:r.thumbnailImageId)||"",variantTypeId:(null==n?void 0:n.variantType.id)||""}})))||[],isActive:e.isActive||!1,bundleSettings:e.bundleSettings||null})})),dynamicPriceListIds:null,productVolumeDiscountId:null}}export{A as getOrderLineFile,h as getProductCampaigns,m as getProductFilterData,f as getRelatedProducts,g as getSuggestedProducts,y as getVariantStockLocations,b as listProductAttribute,c as listProductBackInStockRemind,I as listProductOptionSet,p as saveProductBackInStockRemind,v as searchProducts};
1
+ import{__awaiter as t,__generator as e,__assign as n,__spreadArray as r}from'./../../ext/tslib/tslib.es6.js';import{APIResponse as i}from"@ikas/fe-api-client";import{IkasStorefrontConfig as a}from"@ikas/storefront-config";import{initIkasProduct as u,IkasBrandOrderType as o,IkasCategoryProductsOrderType as d,initIkasProductAttribute as l,initIkasProductOptionSet as s}from"@ikas/storefront-models";function c(n){return t(this,void 0,void 0,(function(){return e(this,(function(t){switch(t.label){case 0:return[4,import("../../__api/queries/listProductBackInStockRemind.js")];case 1:return[4,(0,t.sent().default)(n)];case 2:return[2,t.sent()]}}))}))}function p(n){return t(this,void 0,void 0,(function(){return e(this,(function(t){switch(t.label){case 0:return[4,import("../../__api/mutations/saveProductBackInStockRemind.js")];case 1:return[4,(0,t.sent().default)(n)];case 2:return[2,t.sent()]}}))}))}function v(n){return t(this,void 0,void 0,(function(){return e(this,(function(t){switch(t.label){case 0:return[4,import("../../__api/queries/listCampaignOffer.js")];case 1:return[4,(0,t.sent().default)(n)];case 2:return[2,t.sent()]}}))}))}function m(r,o){var d,l;return t(this,void 0,void 0,(function(){var t,s,c,p,v,m;return e(this,(function(e){switch(e.label){case 0:return[4,import("../../__api/queries/searchProducts.js")];case 1:return t=e.sent().default,s=null===(d=a.getCurrentRouting())||void 0===d?void 0:d.dynamicCurrencySettings,p=t,v=[{input:n({locale:a.getCurrentLocale(),dynamicCurrencySettings:s?{roundingFormat:s.roundingFormat,targetCurrencyCode:s.targetCurrencyCode}:void 0},r.input)}],[4,T(o)];case 2:return[4,p.apply(void 0,v.concat([e.sent()]))];case 3:return c=e.sent(),null==(m=null===(l=c.data)||void 0===l?void 0:l.results.map(_))||m.forEach((function(t){return u(t,a.getCurrentLocale())})),[2,new i(c.data?n(n({},c.data),{data:m}):null,c.graphQLErrors)]}}))}))}function f(n){var r,a,u;return t(this,void 0,void 0,(function(){var t,o,d,l;return e(this,(function(e){switch(e.label){case 0:return[4,import("../../__api/queries/getProductFilterData.js")];case 1:return[4,(0,e.sent().default)(n)];case 2:return t=e.sent(),o=null===(r=t.data)||void 0===r?void 0:r.filters,d=(null===(a=t.data)||void 0===a?void 0:a.categories)||null,l=(null===(u=t.data)||void 0===u?void 0:u.disabledSortTypes)||null,[2,new i(t.data?{filters:o,categories:d,disabledSortTypes:l}:null,t.graphQLErrors)]}}))}))}function g(r){var o,d;return t(this,void 0,void 0,(function(){var t,l,s,c;return e(this,(function(e){switch(e.label){case 0:return[4,import("../../__api/queries/getRelatedProducts.js")];case 1:return t=e.sent().default,l=null===(o=a.getCurrentRouting())||void 0===o?void 0:o.dynamicCurrencySettings,[4,t(n({locale:a.getCurrentLocale(),dynamicCurrencySettings:l?{roundingFormat:l.roundingFormat,targetCurrencyCode:l.targetCurrencyCode}:void 0},r))];case 2:return s=e.sent(),(c=(null===(d=null==s?void 0:s.data)||void 0===d?void 0:d.map((function(t){return _(t)})))||[]).forEach((function(t){return u(t,a.getCurrentLocale())})),[2,new i(s.data?{data:c,count:s.data.length,facets:null,limit:20,page:1,totalCount:s.data.length}:null,s.graphQLErrors)]}}))}))}function b(r){var o,d;return t(this,void 0,void 0,(function(){var t,l,s,c;return e(this,(function(e){switch(e.label){case 0:return[4,import("../../__api/queries/getSuggestedProducts.js")];case 1:return t=e.sent().default,l=null===(o=a.getCurrentRouting())||void 0===o?void 0:o.dynamicCurrencySettings,[4,t(n({locale:a.getCurrentLocale(),dynamicCurrencySettings:l?{roundingFormat:l.roundingFormat,targetCurrencyCode:l.targetCurrencyCode}:void 0},r))];case 2:return s=e.sent(),(c=(null===(d=null==s?void 0:s.data)||void 0===d?void 0:d.map((function(t){return _(t)})))||[]).forEach((function(t){return u(t,a.getCurrentLocale())})),[2,new i(s.data?{data:c,count:s.data.length,facets:null,limit:20,page:1,totalCount:s.data.length}:null,s.graphQLErrors)]}}))}))}function h(n){return t(this,void 0,void 0,(function(){var t,r;return e(this,(function(e){switch(e.label){case 0:return[4,import("../../__api/queries/listProductAttribute.js")];case 1:return[4,(0,e.sent().default)(n)];case 2:return t=e.sent(),null==(r=t.data)||r.forEach((function(t){return l(t,a.getCurrentLocale())})),[2,new i(r,t.graphQLErrors)]}}))}))}function y(n){var r;return t(this,void 0,void 0,(function(){var t;return e(this,(function(e){switch(e.label){case 0:return[4,import("../../__api/queries/getProductCampaigns.js")];case 1:return[4,(0,e.sent().default)(n)];case 2:return t=e.sent(),[2,new i(null===(r=t.data)||void 0===r?void 0:r.map((function(t){return t})),t.graphQLErrors)]}}))}))}function A(n){var r;return t(this,void 0,void 0,(function(){var t;return e(this,(function(e){switch(e.label){case 0:return[4,import("../../__api/queries/getVariantStockLocations.js")];case 1:return[4,(0,e.sent().default)(n)];case 2:return t=e.sent(),[2,new i(null===(r=t.data)||void 0===r?void 0:r.stockLocations.map((function(t){return t})),t.graphQLErrors)]}}))}))}function I(n){return t(this,void 0,void 0,(function(){return e(this,(function(t){switch(t.label){case 0:return[4,import("../../__api/mutations/getOrderLineFile.js")];case 1:return[4,(0,t.sent().default)(n)];case 2:return[2,t.sent()]}}))}))}function C(n){return t(this,void 0,void 0,(function(){var t,r;return e(this,(function(e){switch(e.label){case 0:return[4,import("../../__api/queries/listProductOptionSet.js")];case 1:return[4,(0,e.sent().default)(n)];case 2:return t=e.sent(),null==(r=t.data)||r.forEach((function(t){return s(t,a.getCurrentLocale())})),[2,new i(r,t.graphQLErrors)]}}))}))}function T(n){return t(this,void 0,void 0,(function(){var t,i;return e(this,(function(e){switch(e.label){case 0:return[4,import("../../__api/queries/searchProducts.js")];case 1:return t=e.sent().ResponseField,i=["DATA"],n&&n.length&&n.map((function(e){var n=Object.keys(t).filter((function(t){return t.startsWith(e)}));i=r(r([],i,!0),n,!0)})),[2,Object.entries(t).filter((function(t){var e=t[0];return!i.includes(e)})).map((function(t){return t[1]}))]}}))}))}function _(t){var e,r,i,u,l="local"===process.env.NEXT_PUBLIC_ENV;return{id:t.id,type:t.type,groupVariantsByVariantTypeId:t.groupVariantsByVariantTypeId,deleted:t.deleted,attributes:(null===(e=t.attributes)||void 0===e?void 0:e.map((function(t){var e,r,i,a,u,o;return n(n({},t),{value:t.value,productAttributeId:(null===(e=t.productAttribute)||void 0===e?void 0:e.id)||null,productAttributeOptionId:(null===(r=t.productAttributeOption)||void 0===r?void 0:r.id)||null,productAttribute:{id:(null===(i=t.productAttribute)||void 0===i?void 0:i.id)||"",name:(null===(a=t.productAttribute)||void 0===a?void 0:a.name)||"",description:null,type:null===(u=t.productAttribute)||void 0===u?void 0:u.type,tableTemplate:(null===(o=t.productAttribute)||void 0===o?void 0:o.tableTemplate)?t.productAttribute.tableTemplate:null,options:null},productAttributeOption:t.productAttributeOption})})))||[],brand:t.brand?n(n({},t.brand),{id:t.brand.id,name:t.brand.name,createdAt:0,updatedAt:0,description:null,imageId:t.brand.imageId,orderType:o.BEST_SELLER,metaData:{id:"",createdAt:0,updatedAt:0,slug:t.brand.slug||""}}):null,campaigns:null===(r=t.campaigns)||void 0===r?void 0:r.map((function(t){return{campaign:t,variantIds:[]}})),campaignOffers:t.campaignOffers,categories:(null===(i=t.categories)||void 0===i?void 0:i.map((function(t){return n(n({},t),{categoryPath:t.path.map((function(t){return t.name})),description:null,imageId:null,parentId:null,metaData:t.slug?{id:"",createdAt:0,updatedAt:0,name:t.name||"",slug:t.slug}:null,categoryPathItems:t.path.map((function(t){return{metaData:{id:"",createdAt:0,updatedAt:0,name:t.name||"",slug:t.slug||""},description:null,name:t.name,translations:t.translations,imageId:null,id:t.id,createdAt:0,updatedAt:0}})),createdAt:0,updatedAt:0,orderType:d.BEST_SELLER,conditions:null,conditionValues:null})})))||[],tags:t.tags||[],description:t.description||"",averageRating:t.averageRating,reviewCount:t.reviewCount,stars:t.stars,baseUnit:t.baseUnit,metaData:n(n({},t.metaData),{id:"",createdAt:0,updatedAt:0,slug:(null===(u=t.metaData)||void 0===u?void 0:u.slug)||""})||null,name:t.name,shortDescription:t.shortDescription||"",productOptionSetId:t.productOptionSetId,variantTypes:t.productVariantTypes.map((function(t){return{order:t.order,variantType:{id:t.variantType.id,name:t.variantType.name,selectionType:t.variantType.selectionType,values:t.variantType.values.map((function(e){return{id:e.id,colorCode:e.colorCode,name:e.name,thumbnailImageId:e.thumbnailImageId,variantTypeId:t.variantType.id}})).filter((function(e){return t.variantValueIds.includes(e.id)}))},variantValueIds:t.variantValueIds}})),variants:t.variants.map((function(e){var r,i,u,o;return n(n({},e),{id:e.id,productId:t.id,images:(null===(r=e.images)||void 0===r?void 0:r.map((function(t){return{imageId:t.id,isMain:t.isMain||!1,isVideo:t.isVideo,order:t.order,fileName:t.fileName}})))||null,sellIfOutOfStock:e.sellIfOutOfStock||!1,unit:e.unit,attributes:(null===(i=e.attributes)||void 0===i?void 0:i.map((function(t){var e,r,i,a,u,o;return n(n({},t),{value:t.value,productAttributeId:(null===(e=t.productAttribute)||void 0===e?void 0:e.id)||null,productAttributeOptionId:(null===(r=t.productAttributeOption)||void 0===r?void 0:r.id)||null,productAttribute:{id:(null===(i=t.productAttribute)||void 0===i?void 0:i.id)||"",name:(null===(a=t.productAttribute)||void 0===a?void 0:a.name)||"",description:"",type:null===(u=t.productAttribute)||void 0===u?void 0:u.type,tableTemplate:(null===(o=t.productAttribute)||void 0===o?void 0:o.tableTemplate)?t.productAttribute.tableTemplate:null,options:null},productAttributeOption:t.productAttributeOption})})))||[],sku:e.sku,barcodeList:e.barcodeList||null,prices:e.prices||[],stock:(null===(u=e.stocks)||void 0===u?void 0:u.filter((function(t){var e;return l||a.getIsEditor()||(null===(e=a.getStockLocationIds())||void 0===e?void 0:e.includes(t.stockLocationId))})).reduce((function(t,e){return e.stockCount+t}),0))||0,variantValues:(null===(o=e.variantValues)||void 0===o?void 0:o.map((function(e){var n=t.productVariantTypes.find((function(t){return t.variantType.id===e.variantTypeId})),r=null==n?void 0:n.variantType.values.find((function(t){return t.id===e.variantValueId}));return{id:e.variantValueId,name:(null==r?void 0:r.name)||"",colorCode:(null==r?void 0:r.colorCode)||"",thumbnailImageId:(null==r?void 0:r.thumbnailImageId)||"",variantTypeId:(null==n?void 0:n.variantType.id)||""}})))||[],isActive:e.isActive||!1,bundleSettings:e.bundleSettings||null})})),dynamicPriceListIds:null,productVolumeDiscountId:null}}export{I as getOrderLineFile,y as getProductCampaigns,f as getProductFilterData,g as getRelatedProducts,b as getSuggestedProducts,A as getVariantStockLocations,v as listCampaignOffer,h as listProductAttribute,c as listProductBackInStockRemind,C as listProductOptionSet,p as saveProductBackInStockRemind,m as searchProducts};
package/build/index.js CHANGED
@@ -1 +1 @@
1
- export{setAPIClientConfig}from"./index2.js";export{SaveMyCustomerInput}from"./__api/models/SaveMyCustomerInput.js";export{SaveCartInput}from"./__api/models/SaveCartInput.js";export{CheckStocksLineInput}from"./__api/models/CheckStocksLineInput.js";export{GetSuggestedProductsMethodEnum,MasterPassOperationTypeEnum,SortByDirectionEnum,SortByTypeEnum}from"./__api/types/index.js";export{APIResponse,Config as IkasAPIClientConfig}from"@ikas/fe-api-client";export{listBlog,listBlogCategory,listBlogMetaData}from"./api/blog/index.js";export{listProductBrand}from"./api/brand/index.js";export{addItemToCart,getCartById,saveCart,saveCartCouponCode,updateCartCampaignOffer}from"./api/cart/index.js";export{listCategory}from"./api/category/index.js";export{checkCartStocks,checkStocks,createAdyenClientToken,createKlarnaClientToken,createPayPalOrder,createSaleTransactionWithCart,createStripePaymentIntent,getAvailableShippingCountries,getAvailableStockLocations,getPayPalClientId,listCheckoutSettings,listPaymentGateway,listProductFile,listStockLocations,retrieveInstallmentInfo}from"./api/checkout/index.js";export{IkasRegisterError,activateCustomer,checkEmail,createCustomerReview,createOrderRefundRequest,forgotPassword,getCustomer,getLastViewedProducts,getOrderByEmail,getOrders,isFavoriteProduct,listCustomerAttribute,listCustomerReviewSummary,listCustomerReviews,listCustomerSettings,listFavoriteProducts,listOrderRefundSettings,listOrderTransactions,login,recoverPassword,refreshToken,register,resendCustomerActivationMail,saveCustomer,saveFavoriteProduct,saveLastViewedProducts,sendContactFormToMerchant,socialLogin,subscribeToMarketingNotifications}from"./api/customer/index.js";export{getDigitalProductFileDownloadUrl,getProductOptionFileUrl,uploadFile}from"./api/file-upload/index.js";export{listHTMLMetaData}from"./api/html-meta-data/index.js";export{getAvailableShippingZones,getMyCountry,listCity,listCountry,listDistrict,listState}from"./api/location/index.js";export{getMasterPassRequestToken}from"./api/masterpass/index.js";export{listMerchantSettings}from"./api/merchant/index.js";export{getOrderLineFile,getProductCampaigns,getProductFilterData,getRelatedProducts,getSuggestedProducts,getVariantStockLocations,listProductAttribute,listProductBackInStockRemind,listProductOptionSet,saveProductBackInStockRemind,searchProducts}from"./api/product/index.js";export{listRaffleMetaData,listRaffleParticipants,listStorefrontRaffle,saveRaffleParticipant}from"./api/raffle/index.js";export{getStorefrontSettings}from"./api/storefront/index.js";
1
+ export{setAPIClientConfig}from"./index2.js";export{SaveMyCustomerInput}from"./__api/models/SaveMyCustomerInput.js";export{SaveCartInput}from"./__api/models/SaveCartInput.js";export{CheckStocksLineInput}from"./__api/models/CheckStocksLineInput.js";export{GetSuggestedProductsMethodEnum,MasterPassOperationTypeEnum,SortByDirectionEnum,SortByTypeEnum}from"./__api/types/index.js";export{APIResponse,Config as IkasAPIClientConfig}from"@ikas/fe-api-client";export{listBlog,listBlogCategory,listBlogMetaData}from"./api/blog/index.js";export{listProductBrand}from"./api/brand/index.js";export{addItemToCart,getCartById,saveCart,saveCartCouponCode,updateCartCampaignOffer}from"./api/cart/index.js";export{listCategory}from"./api/category/index.js";export{checkCartStocks,checkStocks,createAdyenClientToken,createKlarnaClientToken,createPayPalOrder,createSaleTransactionWithCart,createStripePaymentIntent,getAvailableShippingCountries,getAvailableStockLocations,getPayPalClientId,listCheckoutSettings,listPaymentGateway,listProductFile,listStockLocations,retrieveInstallmentInfo}from"./api/checkout/index.js";export{IkasRegisterError,activateCustomer,checkEmail,createCustomerReview,createOrderRefundRequest,forgotPassword,getCustomer,getLastViewedProducts,getOrderByEmail,getOrders,isFavoriteProduct,listCustomerAttribute,listCustomerReviewSummary,listCustomerReviews,listCustomerSettings,listFavoriteProducts,listOrderRefundSettings,listOrderTransactions,login,recoverPassword,refreshToken,register,resendCustomerActivationMail,saveCustomer,saveFavoriteProduct,saveLastViewedProducts,sendContactFormToMerchant,socialLogin,subscribeToMarketingNotifications}from"./api/customer/index.js";export{getDigitalProductFileDownloadUrl,getProductOptionFileUrl,uploadFile}from"./api/file-upload/index.js";export{listHTMLMetaData}from"./api/html-meta-data/index.js";export{getAvailableShippingZones,getMyCountry,listCity,listCountry,listDistrict,listState}from"./api/location/index.js";export{getMasterPassRequestToken}from"./api/masterpass/index.js";export{listMerchantSettings}from"./api/merchant/index.js";export{getOrderLineFile,getProductCampaigns,getProductFilterData,getRelatedProducts,getSuggestedProducts,getVariantStockLocations,listCampaignOffer,listProductAttribute,listProductBackInStockRemind,listProductOptionSet,saveProductBackInStockRemind,searchProducts}from"./api/product/index.js";export{listRaffleMetaData,listRaffleParticipants,listStorefrontRaffle,saveRaffleParticipant}from"./api/raffle/index.js";export{getStorefrontSettings}from"./api/storefront/index.js";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ikas/storefront-api",
3
- "version": "4.12.0-beta.2",
3
+ "version": "4.12.0-beta.4",
4
4
  "author": "ikas",
5
5
  "license": "ISC",
6
6
  "description": "API functions that returns models from the ikas-storefront-models package.",
@@ -17,8 +17,8 @@
17
17
  },
18
18
  "devDependencies": {
19
19
  "@rollup/plugin-commonjs": "^22.0.0",
20
- "@ikas/storefront-config": "^4.12.0-beta.2",
21
- "@ikas/storefront-models": "^4.12.0-beta.2",
20
+ "@ikas/storefront-config": "^4.12.0-beta.4",
21
+ "@ikas/storefront-models": "^4.12.0-beta.4",
22
22
  "@rollup/plugin-node-resolve": "^13.3.0",
23
23
  "rollup-plugin-rename-node-modules": "^1.2.0",
24
24
  "prettier": "^2.2.1",
@@ -34,8 +34,8 @@
34
34
  "@ikas/fe-api-client": "^1.0.19"
35
35
  },
36
36
  "peerDependencies": {
37
- "@ikas/storefront-config": "^4.12.0-beta.2",
38
- "@ikas/storefront-models": "^4.12.0-beta.2",
37
+ "@ikas/storefront-config": "^4.12.0-beta.4",
38
+ "@ikas/storefront-models": "^4.12.0-beta.4",
39
39
  "@ikas/fe-api-client": "^1.0.18",
40
40
  "axios": "^0.26.0",
41
41
  "ts-essentials": "^7.0.1"