@daffodil/driver 0.93.0 → 0.94.0

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,15 +1,15 @@
1
1
  import * as i0 from '@angular/core';
2
- import { makeEnvironmentProviders, inject, Inject, Injectable, PLATFORM_ID, provideAppInitializer, TransferState, InjectionToken } from '@angular/core';
3
- import { InMemoryCache, ApolloLink as ApolloLink$1 } from '@apollo/client/core';
2
+ import { makeEnvironmentProviders, inject, PLATFORM_ID, Inject, Injectable, provideAppInitializer, TransferState, InjectionToken } from '@angular/core';
3
+ import { InMemoryCache, ApolloLink } from '@apollo/client/core';
4
4
  import { ErrorLink } from '@apollo/client/link/error';
5
5
  import { Apollo, provideApollo, gql } from 'apollo-angular';
6
6
  import { HttpLink } from 'apollo-angular/http';
7
7
  import { provideDaffApolloRequestHandlerFactories, getApolloOperationHeaders, DAFF_APOLLO_REQUEST_HANDLERS } from '@daffodil/core/graphql';
8
8
  import { provideDaffDriverHttpClientCacheService } from '@daffodil/driver';
9
9
  import { createSingleInjectionToken, createMultiInjectionToken, DaffInheritableError, daffIsError, DaffSortDirectionEnum } from '@daffodil/core';
10
- import { ApolloLink, CombinedGraphQLErrors } from '@apollo/client';
11
10
  import { isPlatformBrowser } from '@angular/common';
12
11
  import { map as map$2 } from 'rxjs';
12
+ import { CombinedGraphQLErrors } from '@apollo/client';
13
13
 
14
14
  var possibleTypes = {
15
15
  AggregationOptionInterface: [
@@ -521,36 +521,6 @@ const provideDaffMagentoApolloCacheableOperations = () => makeEnvironmentProvide
521
521
  };
522
522
  }),
523
523
  ]);
524
- /**
525
- * A service that will convert cacheable apollo operations into a format that Magento will understand as cacheable.
526
- *
527
- * @inheritdoc
528
- * @deprecated Prefer using {@link provideDaffMagentoApolloCacheableOperations} instead. Deprecated in version 0.91.0. Will be removed in version 0.94.0.
529
- */
530
- class DaffMagentoApolloCacheableOperationsLinkGenerator {
531
- constructor(apolloGetRequests) {
532
- this.apolloGetRequests = apolloGetRequests;
533
- }
534
- getLink() {
535
- return new ApolloLink((operation, forward) => {
536
- if (this.apolloGetRequests.indexOf(operation.operationName) > -1) {
537
- operation.setContext({ method: 'GET' });
538
- }
539
- return forward(operation);
540
- });
541
- }
542
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: DaffMagentoApolloCacheableOperationsLinkGenerator, deps: [{ token: DAFF_MAGENTO_CACHEABLE_OPERATIONS }], target: i0.ɵɵFactoryTarget.Injectable }); }
543
- static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: DaffMagentoApolloCacheableOperationsLinkGenerator, providedIn: 'root' }); }
544
- }
545
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: DaffMagentoApolloCacheableOperationsLinkGenerator, decorators: [{
546
- type: Injectable,
547
- args: [{
548
- providedIn: 'root',
549
- }]
550
- }], ctorParameters: () => [{ type: undefined, decorators: [{
551
- type: Inject,
552
- args: [DAFF_MAGENTO_CACHEABLE_OPERATIONS]
553
- }] }] });
554
524
 
555
525
  /**
556
526
  * Custom type policies that allow us to have more granular control
@@ -830,40 +800,6 @@ const provideDaffMagentoCacheHeader = () => makeEnvironmentProviders([
830
800
  };
831
801
  }),
832
802
  ]);
833
- /**
834
- * Stores and sets the Magento cache ID header.
835
- * This will set the `X-Magento-Cache-Id` header from the most recent value encountered
836
- * on a response, if there was a response with that header set.
837
- *
838
- * @inheritdoc
839
- * @deprecated Prefer using {@link provideDaffMagentoCacheHeader} instead. Deprecated in version 0.91.0. Will be removed in version 0.94.0.
840
- */
841
- class DaffMagentoCacheHeaderApolloLinkGenerator {
842
- getLink() {
843
- return new ApolloLink((operation, forward) => {
844
- if (this._cacheHeader) {
845
- operation.setContext({
846
- headers: getApolloOperationHeaders(operation).append(MAGENTO_CUSTOMER_CACHE_ID_HEADER, this._cacheHeader),
847
- });
848
- }
849
- return forward(operation).pipe(map$2((response) => {
850
- const { headers } = operation.getContext().response;
851
- if (headers.get(MAGENTO_CUSTOMER_CACHE_ID_HEADER)) {
852
- this._cacheHeader = headers.get(MAGENTO_CUSTOMER_CACHE_ID_HEADER);
853
- }
854
- return response;
855
- }));
856
- });
857
- }
858
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: DaffMagentoCacheHeaderApolloLinkGenerator, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
859
- static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: DaffMagentoCacheHeaderApolloLinkGenerator, providedIn: 'root' }); }
860
- }
861
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: DaffMagentoCacheHeaderApolloLinkGenerator, decorators: [{
862
- type: Injectable,
863
- args: [{
864
- providedIn: 'root',
865
- }]
866
- }] });
867
803
 
868
804
  /**
869
805
  * A {@link provideMagentoDriver} feature that sets up {@link provideDaffMagentoApolloCacheableOperations}.
@@ -954,8 +890,8 @@ function provideMagentoDriver(options, ...features) {
954
890
  };
955
891
  return {
956
892
  ...inject(DAFF_DRIVER_MAGENTO_EXTRA_APOLLO_OPTIONS),
957
- link: ApolloLink$1.from([
958
- ...inject(DAFF_APOLLO_REQUEST_HANDLERS).map((handler) => new ApolloLink$1(handler)),
893
+ link: ApolloLink.from([
894
+ ...inject(DAFF_APOLLO_REQUEST_HANDLERS).map((handler) => new ApolloLink(handler)),
959
895
  new ErrorLink(inject(DAFF_DRIVER_MAGENTO_ERROR_HANDLER)),
960
896
  inject(HttpLink).create(opts),
961
897
  ]),
@@ -1058,5 +994,5 @@ const magentoMoneyFragment = gql `
1058
994
  * Generated bundle index. Do not edit.
1059
995
  */
1060
996
 
1061
- export { DAFF_DRIVER_MAGENTO_ERROR_CODE, DAFF_DRIVER_MAGENTO_ERROR_HANDLER, DAFF_DRIVER_MAGENTO_EXTRA_APOLLO_OPTIONS, DAFF_DRIVER_MAGENTO_TRANSFER_STATE_KEY, DAFF_MAGENTO_2_4_3_TYPE_POLICIES, DAFF_MAGENTO_CACHEABLE_OPERATIONS, DaffDriverHttpClientCacheMagentoService, DaffDriverMagentoError, DaffMagentoApolloCacheableOperationsLinkGenerator, DaffMagentoCacheHeaderApolloLinkGenerator, MAGENTO_CUSTOMER_CACHE_ID_HEADER, MAGENTO_POSSIBLE_TYPES, MagentoDriverFeatureKind, MagentoSortEnum, daffMagentoTransformGraphQlError, daffTransformMagentoError, magentoMoneyFragment, magentoPageInfoTransform, magentoSearchResultPageInfoFragment, magentoSortDirectionRequestTransform, magentoSortDirectionResponseTransform, makeMagentoDriverFeature, provideDaffDriverMagentoErrorHandler, provideDaffDriverMagentoExtraApolloOptions, provideDaffDriverMagentoExtraApolloOptionsFactory, provideDaffDriverMagentoTransferState, provideDaffDriverMagentoTransferStateKey, provideDaffMagentoApolloCacheableOperations, provideDaffMagentoCacheHeader, provideDaffMagentoCacheableOperation, provideMagentoDriver, provideManyDaffMagentoCacheableOperations, MAGENTO_POSSIBLE_TYPES as schema, withDaffDriverMagentoErrorHandler, withDaffDriverMagentoExtraApolloOptions, withDaffDriverMagentoTransferState, withOperationCache };
997
+ export { DAFF_DRIVER_MAGENTO_ERROR_CODE, DAFF_DRIVER_MAGENTO_ERROR_HANDLER, DAFF_DRIVER_MAGENTO_EXTRA_APOLLO_OPTIONS, DAFF_DRIVER_MAGENTO_TRANSFER_STATE_KEY, DAFF_MAGENTO_2_4_3_TYPE_POLICIES, DAFF_MAGENTO_CACHEABLE_OPERATIONS, DaffDriverHttpClientCacheMagentoService, DaffDriverMagentoError, MAGENTO_CUSTOMER_CACHE_ID_HEADER, MAGENTO_POSSIBLE_TYPES, MagentoDriverFeatureKind, MagentoSortEnum, daffMagentoTransformGraphQlError, daffTransformMagentoError, magentoMoneyFragment, magentoPageInfoTransform, magentoSearchResultPageInfoFragment, magentoSortDirectionRequestTransform, magentoSortDirectionResponseTransform, makeMagentoDriverFeature, provideDaffDriverMagentoErrorHandler, provideDaffDriverMagentoExtraApolloOptions, provideDaffDriverMagentoExtraApolloOptionsFactory, provideDaffDriverMagentoTransferState, provideDaffDriverMagentoTransferStateKey, provideDaffMagentoApolloCacheableOperations, provideDaffMagentoCacheHeader, provideDaffMagentoCacheableOperation, provideMagentoDriver, provideManyDaffMagentoCacheableOperations, withDaffDriverMagentoErrorHandler, withDaffDriverMagentoExtraApolloOptions, withDaffDriverMagentoTransferState, withOperationCache };
1062
998
  //# sourceMappingURL=daffodil-driver-magento.mjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"daffodil-driver-magento.mjs","sources":["../../../libs/driver/magento/src/schema/schema.ts","../../../libs/driver/magento/src/apollo/type-policies.ts","../../../libs/driver/magento/src/features/kind.enum.ts","../../../libs/driver/magento/src/features/make-feature.ts","../../../libs/driver/magento/src/features/apollo-options.ts","../../../libs/driver/magento/src/graphql/cacheable-operations/cacheable-operations-token.ts","../../../libs/driver/magento/src/graphql/cacheable-operations/apollo-cacheable-operations-link-generator.ts","../../../libs/driver/magento/src/graphql/type-policies.ts","../../../libs/driver/magento/src/graphql/cache.service.ts","../../../libs/driver/magento/src/graphql/cache-header/cache-header-apollo-link.ts","../../../libs/driver/magento/src/features/cacheable-operations.ts","../../../libs/driver/magento/src/features/error-handler.ts","../../../libs/driver/magento/src/features/transfer-state.ts","../../../libs/driver/magento/src/provider.ts","../../../libs/driver/magento/src/errors/error.class.ts","../../../libs/driver/magento/src/errors/transform-graphql.ts","../../../libs/driver/magento/src/errors/transform.ts","../../../libs/driver/magento/src/models/sort.enum.ts","../../../libs/driver/magento/src/transforms/responses/page-info.ts","../../../libs/driver/magento/src/transforms/responses/sort-direction.ts","../../../libs/driver/magento/src/transforms/requests/sort-direction.ts","../../../libs/driver/magento/src/fragments/page-info.ts","../../../libs/driver/magento/src/fragments/money.ts","../../../libs/driver/magento/src/daffodil-driver-magento.ts"],"sourcesContent":["import introspectionQueryResultData from './introspection.json';\n\nexport const MAGENTO_POSSIBLE_TYPES = introspectionQueryResultData;\n\n/**\n * @deprecated Prefer {@link MAGENTO_POSSIBLE_TYPES} instead. Deprecated in version 0.91.0. Will be removed in version 0.94.0.\n */\nexport { MAGENTO_POSSIBLE_TYPES as schema };\n","/**\n * Custom type policies that allow us to have more granular control\n * over how ApolloClient reads from and writes to the cache.\n *\n * https://www.apollographql.com/docs/react/caching/cache-configuration/#typepolicy-fields\n * https://www.apollographql.com/docs/react/caching/cache-field-behavior/\n */\n\nimport { TypePolicies } from '@apollo/client/cache';\n\nconst typePolicies: TypePolicies = {\n // Query/Mutation are \"types\" just like \"Cart\".\n Query: {\n fields: {\n cart: {\n // Replaces @connection(key: \"Cart\")\n keyArgs: () => 'Cart',\n },\n customer: {\n keyArgs: () => 'Customer',\n },\n customerCart: {\n keyArgs: () => 'Cart',\n },\n customerWishlistProducts: {\n read: existing => existing || [],\n },\n },\n },\n AppliedGiftCard: {\n keyFields: ['code'],\n },\n AvailablePaymentMethod: {\n keyFields: ['code'],\n },\n AvailableShippingMethod: {\n // The combination of these fields makes an instance of\n // AvailableShippingMethod unique.\n keyFields: ['carrier_code', 'method_code'],\n },\n Breadcrumb: {\n // Uses provided fields on the object as the `uid`.\n keyFields: ['category_uid'],\n },\n Cart: {\n keyFields: () => 'Cart',\n fields: {\n applied_gift_cards: {\n\n merge(existing, incoming) {\n return incoming;\n },\n },\n available_payment_methods: {\n\n merge(existing, incoming) {\n return incoming;\n },\n },\n items: {\n\n merge(existing, incoming) {\n return incoming;\n },\n },\n prices: {\n // `merge: true` can be used for an object field.\n merge: true,\n },\n shipping_addresses: {\n merge(existing = [], incoming, { readField, mergeObjects }) {\n // street makes these things unique\n const mergeResult = new Set();\n const streetToIndex = new Map();\n\n existing.forEach((existingShippingAddress, index) => {\n // Use readField instead of existingShippingAddress.street directly because it will follow cache references.\n const street = readField(\n 'street',\n existingShippingAddress,\n );\n streetToIndex.set(street, index);\n });\n\n incoming.forEach(incomingShippingAddress => {\n const street = readField(\n 'street',\n incomingShippingAddress,\n );\n\n if (streetToIndex.has(street)) {\n const targetIndex = streetToIndex.get(street);\n const existingShippingAddress =\n existing[targetIndex];\n const merged = mergeObjects(\n existingShippingAddress,\n incomingShippingAddress,\n );\n mergeResult.add(merged);\n } else {\n // We do not have an address with this street yet, add it on to the end.\n streetToIndex.set(street, streetToIndex.size);\n mergeResult.add(incomingShippingAddress);\n }\n });\n\n return Array.from(mergeResult);\n },\n },\n },\n },\n Customer: {\n keyFields: () => 'Customer',\n merge: true,\n fields: {\n addresses: {\n merge(existing, incoming) {\n return incoming;\n },\n read(cachedAddresses, { toReference }) {\n if (cachedAddresses) {\n return cachedAddresses.map(address => {\n // Update v2 identifiers to new references. Previous\n // entries had `id: CustomerAddress:1` which caused\n // v3's lookup to fail. If we find a legacy id,\n // point it at the object using a reference.\n if (\n address.id &&\n address.id.includes('CustomerAddress')\n ) {\n return toReference(address.id);\n } else {\n return address;\n }\n });\n }\n // If there are no cached addresses that's fine - the schema\n // shows that it is a nullable field.\n },\n },\n orders: {\n keyArgs: ['filter'],\n },\n },\n },\n CustomerAddress: {\n fields: {\n street: {\n\n merge(existing, incoming) {\n return incoming;\n },\n },\n },\n },\n CustomerPaymentTokens: {\n keyFields: () => 'CustomerPaymentTokens',\n fields: {\n items: {\n\n merge(existing, incoming) {\n return incoming;\n },\n },\n },\n },\n Currency: {\n merge: true,\n },\n ProductImage: {\n keyFields: ['url'],\n },\n ConfigurableProductOptions: {\n keyFields: ['uid'],\n },\n SelectedConfigurableOption: {\n // id alone is not enough to identify a selected option as it can refer\n // to something like \"size\" where value_id refers to \"large\".\n // TODO: Use configurable_product_option_uid for ConfigurableWishlistItem when available in 2.4.5\n keyFields: fields => fields.configurable_product_option_uid\n ? [\n 'configurable_product_option_uid',\n 'configurable_product_option_value_uid',\n ]\n : ['id', 'value_id'],\n },\n SelectedPaymentMethod: {\n keyFields: ['code'],\n },\n ShippingCartAddress: {\n keyFields: ['street'],\n fields: {\n available_shipping_methods: {\n merge(existing = [], incoming, { readField, mergeObjects }) {\n // carrier_code + method_code makes these things unique\n const mergeResult = new Set();\n const carrierToIndex = new Map();\n\n existing.forEach((existingShippingMethod, index) => {\n // Use readField because it will follow cache references.\n const carrierCode = readField(\n 'carrier_code',\n existingShippingMethod,\n );\n const methodCode = readField(\n 'method_code',\n existingShippingMethod,\n );\n const carrierKey = `${carrierCode}|${methodCode}`;\n carrierToIndex.set(carrierKey, index);\n });\n\n incoming.forEach(incomingShippingMethod => {\n // Use readField because it will follow cache references.\n const carrierCode = readField(\n 'carrier_code',\n incomingShippingMethod,\n );\n const methodCode = readField(\n 'method_code',\n incomingShippingMethod,\n );\n const carrierKey = `${carrierCode}|${methodCode}`;\n if (carrierToIndex.has(carrierKey)) {\n const targetIndex = carrierToIndex.get(carrierKey);\n const existingShippingMethod =\n existing[targetIndex];\n const merged = mergeObjects(\n existingShippingMethod,\n incomingShippingMethod,\n );\n mergeResult.add(merged);\n } else {\n // We do not have a method with this key yet, add it on to the end.\n carrierToIndex.set(carrierKey, carrierToIndex.size);\n mergeResult.add(incomingShippingMethod);\n }\n });\n\n return Array.from(mergeResult);\n },\n },\n country: {\n merge: true,\n },\n region: {\n merge: true,\n },\n selected_shipping_method: {\n merge: true,\n },\n },\n },\n CategoryTree: {\n keyFields: ['uid'],\n fields: {\n children: {\n merge(existing, incoming) {\n return incoming;\n },\n },\n },\n },\n Wishlist: {\n keyFields: ({ id }) => `CustomerWishlist:${id}`,\n fields: {\n items_v2: {\n keyArgs: false,\n merge: false,\n },\n },\n },\n WishlistItem: {\n keyFields: ({ id }) => `CustomerWishlistItem:${id}`,\n },\n WishlistItems: {\n fields: {\n items: {\n merge: (existing = [], incoming, { variables }) => {\n if (variables) {\n const { currentPage = 1 } = variables;\n // reset cache collection if we're on the first page\n\n if (currentPage === 1) {\n return incoming;\n }\n }\n\n return [...existing, ...incoming];\n },\n },\n },\n },\n SimpleWishlistItem: {\n keyFields: ({ id }) => `CustomerSimpleWishlistItem:${id}`,\n },\n VirtualWishlistItem: {\n keyFields: ({ id }) => `CustomerVirtualWishlistItem:${id}`,\n },\n DownloadableWishlistItem: {\n keyFields: ({ id }) => `CustomerDownloadableWishlistItem:${id}`,\n },\n BundleWishlistItem: {\n keyFields: ({ id }) => `CustomerBundleWishlistItem:${id}`,\n },\n GroupedProductWishlistItem: {\n keyFields: ({ id }) => `CustomerGroupedProductWishlistItem:${id}`,\n },\n ConfigurableWishlistItem: {\n keyFields: ({ id }) => `CustomerConfigurableWishlistItem:${id}`,\n },\n GiftCardWishlistItem: {\n keyFields: ({ id }) => `CustomerGiftCardWishlistItem:${id}`,\n },\n SimpleProduct: {\n keyFields: ['uid'],\n },\n ConfigurableProduct: {\n keyFields: ['uid'],\n },\n BundleProduct: {\n keyFields: ['uid'],\n },\n GroupedProduct: {\n keyFields: ['uid'],\n },\n VirtualProduct: {\n keyFields: ['uid'],\n },\n CartItemInterface: {\n keyFields: ['uid'],\n },\n StoreConfig: {\n keyFields: ['store_code'],\n },\n};\n\nexport default typePolicies;\n","/**\n * A non-exhaustive list of feature kinds that exist for {@link provideMagentoDriver}.\n */\nexport enum MagentoDriverFeatureKind {\n CacheableOperations = 'DaffMagentoDriverCacheableOperationsFeature',\n CacheHeader = 'DaffMagentoDriverCacheHeaderFeature',\n ErrorHandler = 'DaffMagentoDriverErrorHandlerFeature',\n TransferState = 'DaffMagentoDriverTransferStateFeature',\n ExtraApolloOptions = 'DaffMagentoDriverExtraApolloOptionsFeature',\n}\n","import {\n Provider,\n EnvironmentProviders,\n} from '@angular/core';\n\nimport { MagentoDriverFeatureKind } from './kind.enum';\nimport { MagentoDriverFeature } from './type';\n\n/**\n * Creates a magento driver feature for {@link provideMagentoDriver}.\n */\nexport function makeMagentoDriverFeature(\n kind: MagentoDriverFeatureKind | string,\n providers: Array<Provider | EnvironmentProviders>,\n): MagentoDriverFeature {\n return { ɵkind: kind, ɵproviders: providers };\n}\n","import type { ApolloClient } from '@apollo/client';\n\nimport { createSingleInjectionToken } from '@daffodil/core';\n\nimport { MagentoDriverFeatureKind } from './kind.enum';\nimport { makeMagentoDriverFeature } from './make-feature';\nimport { MagentoDriverFeature } from './type';\n\n/**\n * Apollo client options except link and cache, creation of which is done by {@link provideMagentoDriver}.\n */\nexport type DaffDriverMagentoExtraApolloOptions = Omit<ApolloClient.Options, 'link' | 'cache'>;\n\nexport const {\n /**\n * A token to hold {@link DaffDriverMagentoExtraApolloOptions}.\n */\n token: DAFF_DRIVER_MAGENTO_EXTRA_APOLLO_OPTIONS,\n /**\n * A provider for {@link DAFF_DRIVER_MAGENTO_EXTRA_APOLLO_OPTIONS}.\n */\n provider: provideDaffDriverMagentoExtraApolloOptions,\n /**\n * A factory provider for {@link DAFF_DRIVER_MAGENTO_EXTRA_APOLLO_OPTIONS}.\n */\n factoryProvider: provideDaffDriverMagentoExtraApolloOptionsFactory,\n} = createSingleInjectionToken<DaffDriverMagentoExtraApolloOptions>('DAFF_DRIVER_MAGENTO_EXTRA_APOLLO_OPTIONS', {\n factory: () => ({}),\n});\n\n/**\n * A {@link provideMagentoDriver} feature that allow specifying {@link DaffDriverMagentoExtraApolloOptions}.\n */\nexport const withDaffDriverMagentoExtraApolloOptions = (options: DaffDriverMagentoExtraApolloOptions): MagentoDriverFeature => makeMagentoDriverFeature(MagentoDriverFeatureKind.TransferState, [\n provideDaffDriverMagentoExtraApolloOptions(options),\n]);\n","import { createMultiInjectionToken } from '@daffodil/core';\n\nexport const {\n /**\n * A multi-provider injection token of the operation names of magento queries that should\n * be cached. This is needed because queries need to be converted into GET queries in order for Magento\n * to cache them. This token should be used by daffodil driver platform modules to register operation names that are cacheable, and is\n * intended for internal daffodil use only.\n */\n token: DAFF_MAGENTO_CACHEABLE_OPERATIONS,\n /**\n * Adds many operation names to the list of cacheable Magento operations. Use only with Angular 9+.\n */\n provider: provideManyDaffMagentoCacheableOperations,\n} = createMultiInjectionToken<string>('DAFF_MAGENTO_CACHEABLE_OPERATIONS');\n\n/**\n * Adds an operation name to the list of cacheable Magento operations. Use only with Angular 9+.\n */\nexport function provideDaffMagentoCacheableOperation(operationName: string) {\n return {\n provide: DAFF_MAGENTO_CACHEABLE_OPERATIONS,\n useValue: operationName,\n multi: true,\n };\n}\n","import {\n inject,\n Inject,\n Injectable,\n makeEnvironmentProviders,\n} from '@angular/core';\nimport { ApolloLink } from '@apollo/client';\n\nimport {\n DaffApolloLinkGenerator,\n provideDaffApolloRequestHandlerFactories,\n} from '@daffodil/core/graphql';\n\nimport { DAFF_MAGENTO_CACHEABLE_OPERATIONS } from './cacheable-operations-token';\n\n/**\n * A request handler provider that will convert cacheable apollo operations into a format that Magento will understand as cacheable.\n */\nexport const provideDaffMagentoApolloCacheableOperations = () => makeEnvironmentProviders([\n provideDaffApolloRequestHandlerFactories(() => {\n const cacheableOperations = inject(DAFF_MAGENTO_CACHEABLE_OPERATIONS);\n return (operation, forward) => {\n if (cacheableOperations.indexOf(operation.operationName) > -1) {\n operation.setContext({ method: 'GET' });\n }\n return forward(operation);\n };\n }),\n]);\n\n/**\n * A service that will convert cacheable apollo operations into a format that Magento will understand as cacheable.\n *\n * @inheritdoc\n * @deprecated Prefer using {@link provideDaffMagentoApolloCacheableOperations} instead. Deprecated in version 0.91.0. Will be removed in version 0.94.0.\n */\n@Injectable({\n providedIn: 'root',\n})\nexport class DaffMagentoApolloCacheableOperationsLinkGenerator implements DaffApolloLinkGenerator {\n constructor(\n @Inject(DAFF_MAGENTO_CACHEABLE_OPERATIONS) private apolloGetRequests: string[],\n ) {}\n\n getLink(): ApolloLink {\n return new ApolloLink((operation, forward) => {\n if(this.apolloGetRequests.indexOf(operation.operationName) > -1) {\n operation.setContext({ method: 'GET' });\n }\n return forward(operation);\n });\n }\n}\n","import { TypePolicies } from '@apollo/client';\n\n/**\n * Custom type policies that allow us to have more granular control\n * over how ApolloClient reads from and writes to the cache.\n *\n * This is applicable to Magento 2.4.3 and up.\n * Heavily based on https://github.com/magento/pwa-studio/blob/99270701b2b607551f2e5881af272ed48ba7064c/packages/peregrine/lib/Apollo/policies/index.js.\n *\n * https://www.apollographql.com/docs/react/caching/cache-configuration/#typepolicy-fields\n * https://www.apollographql.com/docs/react/caching/cache-field-behavior/\n */\nexport const DAFF_MAGENTO_2_4_3_TYPE_POLICIES: TypePolicies = {\n Query: {\n fields: {\n cart: {\n // Replaces @connection(key: \"Cart\")\n keyArgs: () => 'Cart',\n },\n customer: {\n keyArgs: () => 'Customer',\n },\n customerCart: {\n keyArgs: () => 'Cart',\n },\n },\n },\n AppliedGiftCard: {\n keyFields: ['code'],\n },\n AvailablePaymentMethod: {\n keyFields: ['code'],\n },\n AvailableShippingMethod: {\n // The combination of these fields makes an instance of\n // AvailableShippingMethod unique.\n keyFields: ['carrier_code', 'method_code'],\n },\n Breadcrumb: {\n // Uses provided fields on the object as the `id`.\n keyFields: ['category_uid'],\n },\n Cart: {\n keyFields: () => 'Cart',\n fields: {\n applied_gift_cards: {\n merge: (existing, incoming) => incoming,\n },\n available_payment_methods: {\n merge: (existing, incoming) => incoming,\n },\n items: {\n merge: (existing, incoming) => incoming,\n },\n prices: {\n // `merge: true` can be used for an object field.\n merge: true,\n },\n shipping_addresses: {\n merge:(existing = [], incoming, { readField, mergeObjects }) => {\n // street makes these things unique\n const mergeResult = new Set();\n const streetToIndex = new Map();\n\n existing.forEach((existingShippingAddress, index) => {\n // Use readField instead of existingShippingAddress.street directly because it will follow cache references.\n const street = readField(\n 'street',\n existingShippingAddress,\n );\n streetToIndex.set(street, index);\n });\n\n incoming.forEach(incomingShippingAddress => {\n const street = readField(\n 'street',\n incomingShippingAddress,\n );\n\n if (streetToIndex.has(street)) {\n const targetIndex = streetToIndex.get(street);\n const existingShippingAddress = existing[targetIndex];\n const merged = mergeObjects(\n existingShippingAddress,\n incomingShippingAddress,\n );\n mergeResult.add(merged);\n } else {\n // We do not have an address with this street yet, add it on to the end.\n streetToIndex.set(street, streetToIndex.size);\n mergeResult.add(incomingShippingAddress);\n }\n });\n\n return Array.from(mergeResult);\n },\n },\n },\n },\n Customer: {\n keyFields: () => 'Customer',\n fields: {\n addresses: {\n merge: (existing, incoming) => incoming,\n read: (cachedAddresses, { toReference }) => {\n if (cachedAddresses) {\n return cachedAddresses.map(address => {\n // Update v2 identifiers to new references. Previous\n // entries had `id: CustomerAddress:1` which caused\n // v3's lookup to fail. If we find a legacy id,\n // point it at the object using a reference.\n if (address.id?.includes('CustomerAddress')) {\n return toReference(address.id);\n } else {\n return address;\n }\n });\n }\n // If there are no cached addresses that's fine - the schema\n // shows that it is a nullable field.\n },\n },\n orders: {\n keyArgs: ['filter'],\n // TODO: write merge function that handles pagination\n // items: {\n // merge: true,\n // },\n },\n },\n },\n CustomerAddress: {\n fields: {\n street: {\n merge: (existing, incoming) => incoming,\n },\n },\n },\n CustomerPaymentTokens: {\n keyFields: () => 'CustomerPaymentTokens',\n fields: {\n items: {\n merge: (existing, incoming) => incoming,\n },\n },\n },\n ProductImage: {\n keyFields: ['url'],\n },\n SelectedConfigurableOption: {\n // id alone is not enough to identify a selected option as it can refer\n // to something like \"size\" where value_id refers to \"large\".\n keyFields: ['id', 'value_id'],\n },\n SelectedPaymentMethod: {\n keyFields: ['code'],\n },\n ShippingCartAddress: {\n keyFields: ['street'],\n fields: {\n available_shipping_methods: {\n merge: (existing = [], incoming, { readField, mergeObjects }) => {\n // carrier_code + method_code makes these things unique\n const mergeResult = new Set();\n const carrierToIndex = new Map();\n\n existing.forEach((existingShippingMethod, index) => {\n // Use readField because it will follow cache references.\n const carrierCode = readField(\n 'carrier_code',\n existingShippingMethod,\n );\n const methodCode = readField(\n 'method_code',\n existingShippingMethod,\n );\n const carrierKey = `${carrierCode}|${methodCode}`;\n carrierToIndex.set(carrierKey, index);\n });\n\n incoming.forEach(incomingShippingMethod => {\n // Use readField because it will follow cache references.\n const carrierCode = readField(\n 'carrier_code',\n incomingShippingMethod,\n );\n const methodCode = readField(\n 'method_code',\n incomingShippingMethod,\n );\n const carrierKey = `${carrierCode}|${methodCode}`;\n if (carrierToIndex.has(carrierKey)) {\n const targetIndex = carrierToIndex.get(carrierKey);\n const existingShippingMethod = existing[targetIndex];\n const merged = mergeObjects(\n existingShippingMethod,\n incomingShippingMethod,\n );\n mergeResult.add(merged);\n } else {\n // We do not have a method with this key yet, add it on to the end.\n carrierToIndex.set(carrierKey, carrierToIndex.size);\n mergeResult.add(incomingShippingMethod);\n }\n });\n\n return Array.from(mergeResult);\n },\n },\n country: {\n merge: true,\n },\n region: {\n merge: true,\n },\n selected_shipping_method: {\n merge: true,\n },\n },\n },\n CategoryTree: {\n fields: {\n children: {\n merge: (existing, incoming) => incoming,\n },\n },\n },\n Wishlist: {\n keyFields: ({ id }) => `CustomerWishlist:${id}`,\n },\n WishlistItem: {\n keyFields: ({ id }) => `CustomerWishlistItem:${id}`,\n },\n SimpleWishlistItem: {\n keyFields: ({ id }) => `CustomerSimpleWishlistItem:${id}`,\n },\n VirtualWishlistItem: {\n keyFields: ({ id }) => `CustomerVirtualWishlistItem:${id}`,\n },\n DownloadableWishlistItem: {\n keyFields: ({ id }) => `CustomerDownloadableWishlistItem:${id}`,\n },\n BundleWishlistItem: {\n keyFields: ({ id }) => `CustomerBundleWishlistItem:${id}`,\n },\n GroupedProductWishlistItem: {\n keyFields: ({ id }) => `CustomerGroupedProductWishlistItem:${id}`,\n },\n ConfigurableWishlistItem: {\n keyFields: ({ id }) => `CustomerConfigurableWishlistItem:${id}`,\n },\n GiftCardWishlistItem: {\n keyFields: ({ id }) => `CustomerGiftCardWishlistItem:${id}`,\n },\n};\n","import { isPlatformBrowser } from '@angular/common';\nimport {\n Inject,\n Injectable,\n PLATFORM_ID,\n} from '@angular/core';\n\nimport { DaffDriverHttpClientCacheServiceInterface } from '@daffodil/driver';\n\n/**\n * Interacts with the Apollo client.\n *\n * @inheritdoc\n */\n@Injectable({\n providedIn: 'root',\n})\nexport class DaffDriverHttpClientCacheMagentoService implements DaffDriverHttpClientCacheServiceInterface {\n constructor(\n @Inject(PLATFORM_ID) private platformId: string,\n ) {}\n\n reset(): void {\n if (isPlatformBrowser(this.platformId)) {\n location.reload();\n }\n }\n}\n","import {\n Injectable,\n makeEnvironmentProviders,\n} from '@angular/core';\nimport { ApolloLink } from '@apollo/client';\nimport { map } from 'rxjs';\n\nimport {\n DaffApolloLinkGenerator,\n getApolloOperationHeaders,\n provideDaffApolloRequestHandlerFactories,\n} from '@daffodil/core/graphql';\n\nexport const MAGENTO_CUSTOMER_CACHE_ID_HEADER = 'X-Magento-Cache-Id';\n\n/**\n * Stores and sets the Magento cache ID header.\n * This will set the `X-Magento-Cache-Id` header from the most recent value encountered\n * on a response, if there was a response with that header set.\n */\nexport const provideDaffMagentoCacheHeader = () => makeEnvironmentProviders([\n provideDaffApolloRequestHandlerFactories(() => {\n let cacheHeader: string | undefined;\n return (operation, forward) => {\n if (cacheHeader) {\n operation.setContext({\n headers: getApolloOperationHeaders(operation).append(MAGENTO_CUSTOMER_CACHE_ID_HEADER, cacheHeader),\n });\n }\n return forward(operation).pipe(\n map((response) => {\n const { headers } = operation.getContext().response;\n if (headers.get(MAGENTO_CUSTOMER_CACHE_ID_HEADER)) {\n cacheHeader = headers.get(MAGENTO_CUSTOMER_CACHE_ID_HEADER);\n }\n return response;\n }),\n );\n };\n }),\n]);\n\n/**\n * Stores and sets the Magento cache ID header.\n * This will set the `X-Magento-Cache-Id` header from the most recent value encountered\n * on a response, if there was a response with that header set.\n *\n * @inheritdoc\n * @deprecated Prefer using {@link provideDaffMagentoCacheHeader} instead. Deprecated in version 0.91.0. Will be removed in version 0.94.0.\n */\n@Injectable({\n providedIn: 'root',\n})\nexport class DaffMagentoCacheHeaderApolloLinkGenerator implements DaffApolloLinkGenerator {\n private _cacheHeader?: string;\n\n getLink(): ApolloLink {\n return new ApolloLink((operation, forward) => {\n if (this._cacheHeader) {\n operation.setContext({\n headers: getApolloOperationHeaders(operation).append(MAGENTO_CUSTOMER_CACHE_ID_HEADER, this._cacheHeader),\n });\n }\n return forward(operation).pipe(\n map((response) => {\n const { headers } = operation.getContext().response;\n if (headers.get(MAGENTO_CUSTOMER_CACHE_ID_HEADER)) {\n this._cacheHeader = headers.get(MAGENTO_CUSTOMER_CACHE_ID_HEADER);\n }\n return response;\n }),\n );\n });\n }\n}\n","import { makeEnvironmentProviders } from '@angular/core';\n\nimport { MagentoDriverFeatureKind } from './kind.enum';\nimport { makeMagentoDriverFeature } from './make-feature';\nimport { MagentoDriverFeature } from './type';\nimport {\n provideDaffMagentoApolloCacheableOperations,\n provideManyDaffMagentoCacheableOperations,\n} from '../graphql/public_api';\n\n/**\n * A {@link provideMagentoDriver} feature that sets up {@link provideDaffMagentoApolloCacheableOperations}.\n */\nexport const withOperationCache = (...extraOperations: Array<string>): MagentoDriverFeature => makeMagentoDriverFeature(MagentoDriverFeatureKind.CacheableOperations, [\n provideDaffMagentoApolloCacheableOperations(),\n makeEnvironmentProviders(provideManyDaffMagentoCacheableOperations(...extraOperations)),\n]);\n","import { CombinedGraphQLErrors } from '@apollo/client';\nimport type { ErrorLink } from '@apollo/client/link/error';\n\nimport { createSingleInjectionToken } from '@daffodil/core';\n\nimport { MagentoDriverFeatureKind } from './kind.enum';\nimport { makeMagentoDriverFeature } from './make-feature';\nimport { MagentoDriverFeature } from './type';\n\nexport const {\n /**\n * Holds the error handler for {@link provideMagentoDriver}.\n */\n token: DAFF_DRIVER_MAGENTO_ERROR_HANDLER,\n /**\n * Provider function for {@link DAFF_DRIVER_MAGENTO_ERROR_HANDLER}.\n */\n provider: provideDaffDriverMagentoErrorHandler,\n} = createSingleInjectionToken<ErrorLink.ErrorHandler>('DAFF_DRIVER_MAGENTO_ERROR_HANDLER', {\n factory: () => ({ error }) => {\n if (CombinedGraphQLErrors.is(error)) {\n error.errors.map(({ message, locations, path }) =>\n console.error(\n `[GraphQL error]: Message: ${message}, Location: ${locations}, Path: ${path}`,\n ),\n );\n } else {\n console.error(`[Network error]: ${error.message}`);\n }\n },\n});\n\n/**\n * A {@link provideMagentoDriver} feature that specifies the error handler.\n */\nexport const withDaffDriverMagentoErrorHandler = (handler: ErrorLink.ErrorHandler): MagentoDriverFeature => makeMagentoDriverFeature(MagentoDriverFeatureKind.ErrorHandler, [\n provideDaffDriverMagentoErrorHandler(handler),\n]);\n","import {\n inject,\n makeEnvironmentProviders,\n provideAppInitializer,\n TransferState,\n type EnvironmentProviders,\n type StateKey,\n} from '@angular/core';\nimport { NormalizedCacheObject } from '@apollo/client/cache';\nimport { Apollo } from 'apollo-angular';\n\nimport { createSingleInjectionToken } from '@daffodil/core';\n\nimport { MagentoDriverFeatureKind } from './kind.enum';\nimport { makeMagentoDriverFeature } from './make-feature';\nimport { MagentoDriverFeature } from './type';\n\nexport const {\n /**\n * Holds the `StateKey` with which {@link provideMagentoDriver} can use to transfer Apollo state from the server to the client.\n */\n token: DAFF_DRIVER_MAGENTO_TRANSFER_STATE_KEY,\n /**\n * Provider for {@link DAFF_DRIVER_MAGENTO_TRANSFER_STATE_KEY}.\n */\n provider: provideDaffDriverMagentoTransferStateKey,\n} = createSingleInjectionToken<StateKey<any>>('DAFF_DRIVER_MAGENTO_TRANSFER_STATE_KEY');\n\n/**\n * A {@link provideMagentoDriver} feature that sets up transfer state with the specified key.\n *\n * @param stateKey The key under which the Apollo state is stored.\n */\nexport const withDaffDriverMagentoTransferState = <T extends StateKey<any> = StateKey<any>>(stateKey: T): MagentoDriverFeature => makeMagentoDriverFeature(MagentoDriverFeatureKind.TransferState, [\n provideDaffDriverMagentoTransferStateKey(stateKey),\n]);\n\n/**\n * Holds the logic for hydrating the Apollo cache with the server's transferred state.\n * It is recommended to use {@link withDaffDriverMagentoTransferState} with {@link provideMagentoDriver}\n * to provide this functionality automatically.\n */\nexport const provideDaffDriverMagentoTransferState = (): EnvironmentProviders => makeEnvironmentProviders([\n provideAppInitializer(() => {\n const cache = inject(Apollo).client.cache;\n const transferState = inject(TransferState);\n const stateKey = inject(DAFF_DRIVER_MAGENTO_TRANSFER_STATE_KEY);\n const hasStateKey = transferState.hasKey(stateKey);\n if (hasStateKey) {\n const state = transferState.get<NormalizedCacheObject>(\n stateKey,\n null,\n );\n cache.restore(state);\n } else {\n transferState.onSerialize(stateKey, () => cache.extract());\n }\n }),\n]);\n","import {\n EnvironmentProviders,\n inject,\n InjectionToken,\n makeEnvironmentProviders,\n} from '@angular/core';\nimport {\n ApolloLink,\n InMemoryCache,\n PossibleTypesMap,\n TypePolicies,\n} from '@apollo/client/core';\nimport { ErrorLink } from '@apollo/client/link/error';\nimport { provideApollo } from 'apollo-angular';\nimport { HttpLink } from 'apollo-angular/http';\n\nimport { DAFF_APOLLO_REQUEST_HANDLERS } from '@daffodil/core/graphql';\nimport { provideDaffDriverHttpClientCacheService } from '@daffodil/driver';\n\nimport typePolicies from './apollo/type-policies';\nimport {\n DAFF_DRIVER_MAGENTO_ERROR_HANDLER,\n DAFF_DRIVER_MAGENTO_EXTRA_APOLLO_OPTIONS,\n MagentoDriverFeatureKind,\n MagentoDriverFeature,\n provideDaffDriverMagentoTransferState,\n} from './features/public_api';\nimport { DaffDriverHttpClientCacheMagentoService } from './graphql/cache.service';\nimport {\n provideDaffMagentoApolloCacheableOperations,\n provideDaffMagentoCacheHeader,\n} from './graphql/public_api';\nimport { MAGENTO_POSSIBLE_TYPES } from './schema/schema';\n\nexport interface DaffMagentoDriverConfig extends HttpLink.Options {\n possibleTypes?: PossibleTypesMap;\n typePolicies?: TypePolicies;\n}\n\n/**\n * Sets up the Magento Daffodil driver configuration for Magento's GraphQl API.\n *\n * Under the hood, this creates an Apollo Client configuration.\n *\n * @param endpoint - The Magento store domain (e.g. \"https://www.my-store.com/graphql\") or an injection token for a string or function that returns a string\n */\nexport function provideMagentoDriver(options: DaffMagentoDriverConfig | InjectionToken<DaffMagentoDriverConfig>, ...features: Array<MagentoDriverFeature>): EnvironmentProviders {\n const providers = [\n ...features.flatMap(({ ɵproviders }) => ɵproviders),\n provideApollo(() => {\n const opts: DaffMagentoDriverConfig = {\n possibleTypes: MAGENTO_POSSIBLE_TYPES.possibleTypes,\n typePolicies,\n ...(options instanceof InjectionToken ? inject(options) : options),\n };\n return {\n ...inject(DAFF_DRIVER_MAGENTO_EXTRA_APOLLO_OPTIONS),\n link: ApolloLink.from([\n ...inject(DAFF_APOLLO_REQUEST_HANDLERS).map((handler) => new ApolloLink(handler)),\n new ErrorLink(inject(DAFF_DRIVER_MAGENTO_ERROR_HANDLER)),\n inject(HttpLink).create(opts),\n ]),\n cache: new InMemoryCache({ typePolicies: opts.typePolicies, possibleTypes: opts.possibleTypes }),\n };\n }),\n provideDaffDriverHttpClientCacheService(DaffDriverHttpClientCacheMagentoService),\n\n // enable caching by default\n provideDaffMagentoApolloCacheableOperations(),\n provideDaffMagentoCacheHeader(),\n ];\n\n if (features.find(({ ɵkind }) => ɵkind === MagentoDriverFeatureKind.TransferState)) {\n providers.push(provideDaffDriverMagentoTransferState());\n }\n\n return makeEnvironmentProviders(providers);\n}\n","import {\n DaffError,\n DaffInheritableError,\n} from '@daffodil/core';\n\nexport const DAFF_DRIVER_MAGENTO_ERROR_CODE = 'DAFF_DRIVER_MAGENTO_ERROR';\n\n/**\n * A very general error thrown when a more specific error type cannot be determined.\n */\nexport class DaffDriverMagentoError extends DaffInheritableError implements DaffError {\n public readonly code: string = DAFF_DRIVER_MAGENTO_ERROR_CODE;\n\n constructor(message?: string) {\n super(message);\n }\n}\n","import { GraphQLFormattedError } from 'graphql';\n\nimport {\n DaffError,\n DaffErrorCodeMap,\n} from '@daffodil/core';\n\nimport { DaffDriverMagentoError } from './error.class';\n\nexport function daffMagentoTransformGraphQlError<T extends DaffErrorCodeMap>(\n error: GraphQLFormattedError,\n map: T,\n): DaffError {\n const ErrorClass = map[<string>error?.extensions?.category] || DaffDriverMagentoError;\n\n return new ErrorClass(error.message) ;\n};\n","import { CombinedGraphQLErrors } from '@apollo/client';\n\nimport {\n DaffError,\n DaffErrorCodeMap,\n daffIsError,\n} from '@daffodil/core';\n\nimport { DaffDriverMagentoError } from './error.class';\nimport { daffMagentoTransformGraphQlError } from './transform-graphql';\n\n/**\n * Transforms the passed error according to the lookup in the passed map.\n */\n// TODO: return array of errors\nexport function daffTransformMagentoError<T extends DaffErrorCodeMap>(error: any, map: T): DaffError {\n if (CombinedGraphQLErrors.is(error)) {\n return error.errors.map(err => daffMagentoTransformGraphQlError<T>(err, map))[0];\n } else if (daffIsError(error)) {\n return error;\n } else {\n // TODO: how do we determine which error to return?\n // https://www.apollographql.com/docs/react/data/error-handling#identifying-error-types\n // return new DaffDriverNetworkError((<ApolloError>error).networkError.message);\n return new DaffDriverMagentoError(error.message);\n }\n}\n","export enum MagentoSortEnum {\n ASC = 'ASC',\n DESC = 'DESC'\n}\n","import { DaffCollectionMetadata } from '@daffodil/core';\n\nimport { MagentoSearchResultPageInfo } from '../../models/public_api';\n\nexport function magentoPageInfoTransform(pageInfo: MagentoSearchResultPageInfo): Pick<DaffCollectionMetadata, 'pageSize' | 'currentPage' | 'totalPages'> {\n return {\n pageSize: pageInfo.page_size,\n currentPage: pageInfo.current_page,\n totalPages: pageInfo.total_pages,\n };\n}\n","import { DaffSortDirectionEnum } from '@daffodil/core';\n\nimport { MagentoSortEnum } from '../../models/public_api';\n\nconst map = <const>{\n [MagentoSortEnum.ASC]: DaffSortDirectionEnum.Ascending,\n [MagentoSortEnum.DESC]: DaffSortDirectionEnum.Descending,\n};\n\nexport function magentoSortDirectionResponseTransform(direction: MagentoSortEnum): DaffSortDirectionEnum {\n return map[direction];\n}\n","import { DaffSortDirectionEnum } from '@daffodil/core';\n\nimport { MagentoSortEnum } from '../../models/public_api';\n\nconst map = <const>{\n [DaffSortDirectionEnum.Ascending]: MagentoSortEnum.ASC,\n [DaffSortDirectionEnum.Descending]: MagentoSortEnum.DESC,\n};\n\nexport function magentoSortDirectionRequestTransform(direction: DaffSortDirectionEnum): MagentoSortEnum {\n return map[direction];\n}\n","import { gql } from 'apollo-angular';\n\nexport const magentoSearchResultPageInfoFragment = gql`\n fragment magentoSearchResultPageInfo on SearchResultPageInfo {\n page_size\n current_page\n total_pages\n }\n`;\n","import { gql } from 'apollo-angular';\n\nexport const magentoMoneyFragment = gql`\n fragment moneyFragment on Money {\n value\n currency\n }\n`;\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":["map","ApolloLink"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAEO,MAAM,sBAAsB,GAAG;;ACFtC;;;;;;AAMG;AAIH,MAAM,YAAY,GAAiB;;AAEjC,IAAA,KAAK,EAAE;AACL,QAAA,MAAM,EAAE;AACN,YAAA,IAAI,EAAE;;AAEJ,gBAAA,OAAO,EAAE,MAAM,MAAM;AACtB,aAAA;AACD,YAAA,QAAQ,EAAE;AACR,gBAAA,OAAO,EAAE,MAAM,UAAU;AAC1B,aAAA;AACD,YAAA,YAAY,EAAE;AACZ,gBAAA,OAAO,EAAE,MAAM,MAAM;AACtB,aAAA;AACD,YAAA,wBAAwB,EAAE;AACxB,gBAAA,IAAI,EAAE,QAAQ,IAAI,QAAQ,IAAI,EAAE;AACjC,aAAA;AACF,SAAA;AACF,KAAA;AACD,IAAA,eAAe,EAAE;QACf,SAAS,EAAE,CAAC,MAAM,CAAC;AACpB,KAAA;AACD,IAAA,sBAAsB,EAAE;QACtB,SAAS,EAAE,CAAC,MAAM,CAAC;AACpB,KAAA;AACD,IAAA,uBAAuB,EAAE;;;AAGvB,QAAA,SAAS,EAAE,CAAC,cAAc,EAAE,aAAa,CAAC;AAC3C,KAAA;AACD,IAAA,UAAU,EAAE;;QAEV,SAAS,EAAE,CAAC,cAAc,CAAC;AAC5B,KAAA;AACD,IAAA,IAAI,EAAE;AACJ,QAAA,SAAS,EAAE,MAA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AAC,SAAS;QAC5B,WAAW,EAAE,QAAQ,CAAC,YAAY;QAClC,UAAU,EAAE,QAAQ,CAAC,WAAW;KACjC;AACH;;ACNA,MAAMD,KAAG,GAAU;AACjB,IAAA,CAAC,eAAe,CAAC,GAAG,GAAG,qBAAqB,CAAC,SAAS;AACtD,IAAA,CAAC,eAAe,CAAC,IAAI,GAAG,qBAAqB,CAAC,UAAU;CACzD;AAEK,SAAU,qCAAqC,CAAC,SAA0B,EAAA;AAC9E,IAAA,OAAOA,KAAG,CAAC,SAAS,CAAC;AACvB;;ACPA,MAAM,GAAG,GAAU;AACjB,IAAA,CAAC,qBAAqB,CAAC,SAAS,GAAG,eAAe,CAAC,GAAG;AACtD,IAAA,CAAC,qBAAqB,CAAC,UAAU,GAAG,eAAe,CAAC,IAAI;CACzD;AAEK,SAAU,oCAAoC,CAAC,SAAgC,EAAA;AACnF,IAAA,OAAO,GAAG,CAAC,SAAS,CAAC;AACvB;;ACTO,MAAM,mCAAmC,GAAG,GAAG,CAAA;;;;;;;;ACA/C,MAAM,oBAAoB,GAAG,GAAG,CAAA;;;;;;;ACFvC;;AAEG;;;;"}
1
+ {"version":3,"file":"daffodil-driver-magento.mjs","sources":["../../../libs/driver/magento/src/schema/schema.ts","../../../libs/driver/magento/src/apollo/type-policies.ts","../../../libs/driver/magento/src/features/kind.enum.ts","../../../libs/driver/magento/src/features/make-feature.ts","../../../libs/driver/magento/src/features/apollo-options.ts","../../../libs/driver/magento/src/graphql/cacheable-operations/cacheable-operations-token.ts","../../../libs/driver/magento/src/graphql/cacheable-operations/apollo-cacheable-operations-link-generator.ts","../../../libs/driver/magento/src/graphql/type-policies.ts","../../../libs/driver/magento/src/graphql/cache.service.ts","../../../libs/driver/magento/src/graphql/cache-header/cache-header-apollo-link.ts","../../../libs/driver/magento/src/features/cacheable-operations.ts","../../../libs/driver/magento/src/features/error-handler.ts","../../../libs/driver/magento/src/features/transfer-state.ts","../../../libs/driver/magento/src/provider.ts","../../../libs/driver/magento/src/errors/error.class.ts","../../../libs/driver/magento/src/errors/transform-graphql.ts","../../../libs/driver/magento/src/errors/transform.ts","../../../libs/driver/magento/src/models/sort.enum.ts","../../../libs/driver/magento/src/transforms/responses/page-info.ts","../../../libs/driver/magento/src/transforms/responses/sort-direction.ts","../../../libs/driver/magento/src/transforms/requests/sort-direction.ts","../../../libs/driver/magento/src/fragments/page-info.ts","../../../libs/driver/magento/src/fragments/money.ts","../../../libs/driver/magento/src/daffodil-driver-magento.ts"],"sourcesContent":["import introspectionQueryResultData from './introspection.json';\n\nexport const MAGENTO_POSSIBLE_TYPES = introspectionQueryResultData;\n","/**\n * Custom type policies that allow us to have more granular control\n * over how ApolloClient reads from and writes to the cache.\n *\n * https://www.apollographql.com/docs/react/caching/cache-configuration/#typepolicy-fields\n * https://www.apollographql.com/docs/react/caching/cache-field-behavior/\n */\n\nimport { TypePolicies } from '@apollo/client/cache';\n\nconst typePolicies: TypePolicies = {\n // Query/Mutation are \"types\" just like \"Cart\".\n Query: {\n fields: {\n cart: {\n // Replaces @connection(key: \"Cart\")\n keyArgs: () => 'Cart',\n },\n customer: {\n keyArgs: () => 'Customer',\n },\n customerCart: {\n keyArgs: () => 'Cart',\n },\n customerWishlistProducts: {\n read: existing => existing || [],\n },\n },\n },\n AppliedGiftCard: {\n keyFields: ['code'],\n },\n AvailablePaymentMethod: {\n keyFields: ['code'],\n },\n AvailableShippingMethod: {\n // The combination of these fields makes an instance of\n // AvailableShippingMethod unique.\n keyFields: ['carrier_code', 'method_code'],\n },\n Breadcrumb: {\n // Uses provided fields on the object as the `uid`.\n keyFields: ['category_uid'],\n },\n Cart: {\n keyFields: () => 'Cart',\n fields: {\n applied_gift_cards: {\n\n merge(existing, incoming) {\n return incoming;\n },\n },\n available_payment_methods: {\n\n merge(existing, incoming) {\n return incoming;\n },\n },\n items: {\n\n merge(existing, incoming) {\n return incoming;\n },\n },\n prices: {\n // `merge: true` can be used for an object field.\n merge: true,\n },\n shipping_addresses: {\n merge(existing = [], incoming, { readField, mergeObjects }) {\n // street makes these things unique\n const mergeResult = new Set();\n const streetToIndex = new Map();\n\n existing.forEach((existingShippingAddress, index) => {\n // Use readField instead of existingShippingAddress.street directly because it will follow cache references.\n const street = readField(\n 'street',\n existingShippingAddress,\n );\n streetToIndex.set(street, index);\n });\n\n incoming.forEach(incomingShippingAddress => {\n const street = readField(\n 'street',\n incomingShippingAddress,\n );\n\n if (streetToIndex.has(street)) {\n const targetIndex = streetToIndex.get(street);\n const existingShippingAddress =\n existing[targetIndex];\n const merged = mergeObjects(\n existingShippingAddress,\n incomingShippingAddress,\n );\n mergeResult.add(merged);\n } else {\n // We do not have an address with this street yet, add it on to the end.\n streetToIndex.set(street, streetToIndex.size);\n mergeResult.add(incomingShippingAddress);\n }\n });\n\n return Array.from(mergeResult);\n },\n },\n },\n },\n Customer: {\n keyFields: () => 'Customer',\n merge: true,\n fields: {\n addresses: {\n merge(existing, incoming) {\n return incoming;\n },\n read(cachedAddresses, { toReference }) {\n if (cachedAddresses) {\n return cachedAddresses.map(address => {\n // Update v2 identifiers to new references. Previous\n // entries had `id: CustomerAddress:1` which caused\n // v3's lookup to fail. If we find a legacy id,\n // point it at the object using a reference.\n if (\n address.id &&\n address.id.includes('CustomerAddress')\n ) {\n return toReference(address.id);\n } else {\n return address;\n }\n });\n }\n // If there are no cached addresses that's fine - the schema\n // shows that it is a nullable field.\n },\n },\n orders: {\n keyArgs: ['filter'],\n },\n },\n },\n CustomerAddress: {\n fields: {\n street: {\n\n merge(existing, incoming) {\n return incoming;\n },\n },\n },\n },\n CustomerPaymentTokens: {\n keyFields: () => 'CustomerPaymentTokens',\n fields: {\n items: {\n\n merge(existing, incoming) {\n return incoming;\n },\n },\n },\n },\n Currency: {\n merge: true,\n },\n ProductImage: {\n keyFields: ['url'],\n },\n ConfigurableProductOptions: {\n keyFields: ['uid'],\n },\n SelectedConfigurableOption: {\n // id alone is not enough to identify a selected option as it can refer\n // to something like \"size\" where value_id refers to \"large\".\n // TODO: Use configurable_product_option_uid for ConfigurableWishlistItem when available in 2.4.5\n keyFields: fields => fields.configurable_product_option_uid\n ? [\n 'configurable_product_option_uid',\n 'configurable_product_option_value_uid',\n ]\n : ['id', 'value_id'],\n },\n SelectedPaymentMethod: {\n keyFields: ['code'],\n },\n ShippingCartAddress: {\n keyFields: ['street'],\n fields: {\n available_shipping_methods: {\n merge(existing = [], incoming, { readField, mergeObjects }) {\n // carrier_code + method_code makes these things unique\n const mergeResult = new Set();\n const carrierToIndex = new Map();\n\n existing.forEach((existingShippingMethod, index) => {\n // Use readField because it will follow cache references.\n const carrierCode = readField(\n 'carrier_code',\n existingShippingMethod,\n );\n const methodCode = readField(\n 'method_code',\n existingShippingMethod,\n );\n const carrierKey = `${carrierCode}|${methodCode}`;\n carrierToIndex.set(carrierKey, index);\n });\n\n incoming.forEach(incomingShippingMethod => {\n // Use readField because it will follow cache references.\n const carrierCode = readField(\n 'carrier_code',\n incomingShippingMethod,\n );\n const methodCode = readField(\n 'method_code',\n incomingShippingMethod,\n );\n const carrierKey = `${carrierCode}|${methodCode}`;\n if (carrierToIndex.has(carrierKey)) {\n const targetIndex = carrierToIndex.get(carrierKey);\n const existingShippingMethod =\n existing[targetIndex];\n const merged = mergeObjects(\n existingShippingMethod,\n incomingShippingMethod,\n );\n mergeResult.add(merged);\n } else {\n // We do not have a method with this key yet, add it on to the end.\n carrierToIndex.set(carrierKey, carrierToIndex.size);\n mergeResult.add(incomingShippingMethod);\n }\n });\n\n return Array.from(mergeResult);\n },\n },\n country: {\n merge: true,\n },\n region: {\n merge: true,\n },\n selected_shipping_method: {\n merge: true,\n },\n },\n },\n CategoryTree: {\n keyFields: ['uid'],\n fields: {\n children: {\n merge(existing, incoming) {\n return incoming;\n },\n },\n },\n },\n Wishlist: {\n keyFields: ({ id }) => `CustomerWishlist:${id}`,\n fields: {\n items_v2: {\n keyArgs: false,\n merge: false,\n },\n },\n },\n WishlistItem: {\n keyFields: ({ id }) => `CustomerWishlistItem:${id}`,\n },\n WishlistItems: {\n fields: {\n items: {\n merge: (existing = [], incoming, { variables }) => {\n if (variables) {\n const { currentPage = 1 } = variables;\n // reset cache collection if we're on the first page\n\n if (currentPage === 1) {\n return incoming;\n }\n }\n\n return [...existing, ...incoming];\n },\n },\n },\n },\n SimpleWishlistItem: {\n keyFields: ({ id }) => `CustomerSimpleWishlistItem:${id}`,\n },\n VirtualWishlistItem: {\n keyFields: ({ id }) => `CustomerVirtualWishlistItem:${id}`,\n },\n DownloadableWishlistItem: {\n keyFields: ({ id }) => `CustomerDownloadableWishlistItem:${id}`,\n },\n BundleWishlistItem: {\n keyFields: ({ id }) => `CustomerBundleWishlistItem:${id}`,\n },\n GroupedProductWishlistItem: {\n keyFields: ({ id }) => `CustomerGroupedProductWishlistItem:${id}`,\n },\n ConfigurableWishlistItem: {\n keyFields: ({ id }) => `CustomerConfigurableWishlistItem:${id}`,\n },\n GiftCardWishlistItem: {\n keyFields: ({ id }) => `CustomerGiftCardWishlistItem:${id}`,\n },\n SimpleProduct: {\n keyFields: ['uid'],\n },\n ConfigurableProduct: {\n keyFields: ['uid'],\n },\n BundleProduct: {\n keyFields: ['uid'],\n },\n GroupedProduct: {\n keyFields: ['uid'],\n },\n VirtualProduct: {\n keyFields: ['uid'],\n },\n CartItemInterface: {\n keyFields: ['uid'],\n },\n StoreConfig: {\n keyFields: ['store_code'],\n },\n};\n\nexport default typePolicies;\n","/**\n * A non-exhaustive list of feature kinds that exist for {@link provideMagentoDriver}.\n */\nexport enum MagentoDriverFeatureKind {\n CacheableOperations = 'DaffMagentoDriverCacheableOperationsFeature',\n CacheHeader = 'DaffMagentoDriverCacheHeaderFeature',\n ErrorHandler = 'DaffMagentoDriverErrorHandlerFeature',\n TransferState = 'DaffMagentoDriverTransferStateFeature',\n ExtraApolloOptions = 'DaffMagentoDriverExtraApolloOptionsFeature',\n}\n","import {\n Provider,\n EnvironmentProviders,\n} from '@angular/core';\n\nimport { MagentoDriverFeatureKind } from './kind.enum';\nimport { MagentoDriverFeature } from './type';\n\n/**\n * Creates a magento driver feature for {@link provideMagentoDriver}.\n */\nexport function makeMagentoDriverFeature(\n kind: MagentoDriverFeatureKind | string,\n providers: Array<Provider | EnvironmentProviders>,\n): MagentoDriverFeature {\n return { ɵkind: kind, ɵproviders: providers };\n}\n","import type { ApolloClient } from '@apollo/client';\n\nimport { createSingleInjectionToken } from '@daffodil/core';\n\nimport { MagentoDriverFeatureKind } from './kind.enum';\nimport { makeMagentoDriverFeature } from './make-feature';\nimport { MagentoDriverFeature } from './type';\n\n/**\n * Apollo client options except link and cache, creation of which is done by {@link provideMagentoDriver}.\n */\nexport type DaffDriverMagentoExtraApolloOptions = Omit<ApolloClient.Options, 'link' | 'cache'>;\n\nexport const {\n /**\n * A token to hold {@link DaffDriverMagentoExtraApolloOptions}.\n */\n token: DAFF_DRIVER_MAGENTO_EXTRA_APOLLO_OPTIONS,\n /**\n * A provider for {@link DAFF_DRIVER_MAGENTO_EXTRA_APOLLO_OPTIONS}.\n */\n provider: provideDaffDriverMagentoExtraApolloOptions,\n /**\n * A factory provider for {@link DAFF_DRIVER_MAGENTO_EXTRA_APOLLO_OPTIONS}.\n */\n factoryProvider: provideDaffDriverMagentoExtraApolloOptionsFactory,\n} = createSingleInjectionToken<DaffDriverMagentoExtraApolloOptions>('DAFF_DRIVER_MAGENTO_EXTRA_APOLLO_OPTIONS', {\n factory: () => ({}),\n});\n\n/**\n * A {@link provideMagentoDriver} feature that allow specifying {@link DaffDriverMagentoExtraApolloOptions}.\n */\nexport const withDaffDriverMagentoExtraApolloOptions = (options: DaffDriverMagentoExtraApolloOptions): MagentoDriverFeature => makeMagentoDriverFeature(MagentoDriverFeatureKind.TransferState, [\n provideDaffDriverMagentoExtraApolloOptions(options),\n]);\n","import { createMultiInjectionToken } from '@daffodil/core';\n\nexport const {\n /**\n * A multi-provider injection token of the operation names of magento queries that should\n * be cached. This is needed because queries need to be converted into GET queries in order for Magento\n * to cache them. This token should be used by daffodil driver platform modules to register operation names that are cacheable, and is\n * intended for internal daffodil use only.\n */\n token: DAFF_MAGENTO_CACHEABLE_OPERATIONS,\n /**\n * Adds many operation names to the list of cacheable Magento operations. Use only with Angular 9+.\n */\n provider: provideManyDaffMagentoCacheableOperations,\n} = createMultiInjectionToken<string>('DAFF_MAGENTO_CACHEABLE_OPERATIONS');\n\n/**\n * Adds an operation name to the list of cacheable Magento operations. Use only with Angular 9+.\n */\nexport function provideDaffMagentoCacheableOperation(operationName: string) {\n return {\n provide: DAFF_MAGENTO_CACHEABLE_OPERATIONS,\n useValue: operationName,\n multi: true,\n };\n}\n","import {\n inject,\n makeEnvironmentProviders,\n} from '@angular/core';\n\nimport { provideDaffApolloRequestHandlerFactories } from '@daffodil/core/graphql';\n\nimport { DAFF_MAGENTO_CACHEABLE_OPERATIONS } from './cacheable-operations-token';\n\n/**\n * A request handler provider that will convert cacheable apollo operations into a format that Magento will understand as cacheable.\n */\nexport const provideDaffMagentoApolloCacheableOperations = () => makeEnvironmentProviders([\n provideDaffApolloRequestHandlerFactories(() => {\n const cacheableOperations = inject(DAFF_MAGENTO_CACHEABLE_OPERATIONS);\n return (operation, forward) => {\n if (cacheableOperations.indexOf(operation.operationName) > -1) {\n operation.setContext({ method: 'GET' });\n }\n return forward(operation);\n };\n }),\n]);\n","import { TypePolicies } from '@apollo/client';\n\n/**\n * Custom type policies that allow us to have more granular control\n * over how ApolloClient reads from and writes to the cache.\n *\n * This is applicable to Magento 2.4.3 and up.\n * Heavily based on https://github.com/magento/pwa-studio/blob/99270701b2b607551f2e5881af272ed48ba7064c/packages/peregrine/lib/Apollo/policies/index.js.\n *\n * https://www.apollographql.com/docs/react/caching/cache-configuration/#typepolicy-fields\n * https://www.apollographql.com/docs/react/caching/cache-field-behavior/\n */\nexport const DAFF_MAGENTO_2_4_3_TYPE_POLICIES: TypePolicies = {\n Query: {\n fields: {\n cart: {\n // Replaces @connection(key: \"Cart\")\n keyArgs: () => 'Cart',\n },\n customer: {\n keyArgs: () => 'Customer',\n },\n customerCart: {\n keyArgs: () => 'Cart',\n },\n },\n },\n AppliedGiftCard: {\n keyFields: ['code'],\n },\n AvailablePaymentMethod: {\n keyFields: ['code'],\n },\n AvailableShippingMethod: {\n // The combination of these fields makes an instance of\n // AvailableShippingMethod unique.\n keyFields: ['carrier_code', 'method_code'],\n },\n Breadcrumb: {\n // Uses provided fields on the object as the `id`.\n keyFields: ['category_uid'],\n },\n Cart: {\n keyFields: () => 'Cart',\n fields: {\n applied_gift_cards: {\n merge: (existing, incoming) => incoming,\n },\n available_payment_methods: {\n merge: (existing, incoming) => incoming,\n },\n items: {\n merge: (existing, incoming) => incoming,\n },\n prices: {\n // `merge: true` can be used for an object field.\n merge: true,\n },\n shipping_addresses: {\n merge:(existing = [], incoming, { readField, mergeObjects }) => {\n // street makes these things unique\n const mergeResult = new Set();\n const streetToIndex = new Map();\n\n existing.forEach((existingShippingAddress, index) => {\n // Use readField instead of existingShippingAddress.street directly because it will follow cache references.\n const street = readField(\n 'street',\n existingShippingAddress,\n );\n streetToIndex.set(street, index);\n });\n\n incoming.forEach(incomingShippingAddress => {\n const street = readField(\n 'street',\n incomingShippingAddress,\n );\n\n if (streetToIndex.has(street)) {\n const targetIndex = streetToIndex.get(street);\n const existingShippingAddress = existing[targetIndex];\n const merged = mergeObjects(\n existingShippingAddress,\n incomingShippingAddress,\n );\n mergeResult.add(merged);\n } else {\n // We do not have an address with this street yet, add it on to the end.\n streetToIndex.set(street, streetToIndex.size);\n mergeResult.add(incomingShippingAddress);\n }\n });\n\n return Array.from(mergeResult);\n },\n },\n },\n },\n Customer: {\n keyFields: () => 'Customer',\n fields: {\n addresses: {\n merge: (existing, incoming) => incoming,\n read: (cachedAddresses, { toReference }) => {\n if (cachedAddresses) {\n return cachedAddresses.map(address => {\n // Update v2 identifiers to new references. Previous\n // entries had `id: CustomerAddress:1` which caused\n // v3's lookup to fail. If we find a legacy id,\n // point it at the object using a reference.\n if (address.id?.includes('CustomerAddress')) {\n return toReference(address.id);\n } else {\n return address;\n }\n });\n }\n // If there are no cached addresses that's fine - the schema\n // shows that it is a nullable field.\n },\n },\n orders: {\n keyArgs: ['filter'],\n // TODO: write merge function that handles pagination\n // items: {\n // merge: true,\n // },\n },\n },\n },\n CustomerAddress: {\n fields: {\n street: {\n merge: (existing, incoming) => incoming,\n },\n },\n },\n CustomerPaymentTokens: {\n keyFields: () => 'CustomerPaymentTokens',\n fields: {\n items: {\n merge: (existing, incoming) => incoming,\n },\n },\n },\n ProductImage: {\n keyFields: ['url'],\n },\n SelectedConfigurableOption: {\n // id alone is not enough to identify a selected option as it can refer\n // to something like \"size\" where value_id refers to \"large\".\n keyFields: ['id', 'value_id'],\n },\n SelectedPaymentMethod: {\n keyFields: ['code'],\n },\n ShippingCartAddress: {\n keyFields: ['street'],\n fields: {\n available_shipping_methods: {\n merge: (existing = [], incoming, { readField, mergeObjects }) => {\n // carrier_code + method_code makes these things unique\n const mergeResult = new Set();\n const carrierToIndex = new Map();\n\n existing.forEach((existingShippingMethod, index) => {\n // Use readField because it will follow cache references.\n const carrierCode = readField(\n 'carrier_code',\n existingShippingMethod,\n );\n const methodCode = readField(\n 'method_code',\n existingShippingMethod,\n );\n const carrierKey = `${carrierCode}|${methodCode}`;\n carrierToIndex.set(carrierKey, index);\n });\n\n incoming.forEach(incomingShippingMethod => {\n // Use readField because it will follow cache references.\n const carrierCode = readField(\n 'carrier_code',\n incomingShippingMethod,\n );\n const methodCode = readField(\n 'method_code',\n incomingShippingMethod,\n );\n const carrierKey = `${carrierCode}|${methodCode}`;\n if (carrierToIndex.has(carrierKey)) {\n const targetIndex = carrierToIndex.get(carrierKey);\n const existingShippingMethod = existing[targetIndex];\n const merged = mergeObjects(\n existingShippingMethod,\n incomingShippingMethod,\n );\n mergeResult.add(merged);\n } else {\n // We do not have a method with this key yet, add it on to the end.\n carrierToIndex.set(carrierKey, carrierToIndex.size);\n mergeResult.add(incomingShippingMethod);\n }\n });\n\n return Array.from(mergeResult);\n },\n },\n country: {\n merge: true,\n },\n region: {\n merge: true,\n },\n selected_shipping_method: {\n merge: true,\n },\n },\n },\n CategoryTree: {\n fields: {\n children: {\n merge: (existing, incoming) => incoming,\n },\n },\n },\n Wishlist: {\n keyFields: ({ id }) => `CustomerWishlist:${id}`,\n },\n WishlistItem: {\n keyFields: ({ id }) => `CustomerWishlistItem:${id}`,\n },\n SimpleWishlistItem: {\n keyFields: ({ id }) => `CustomerSimpleWishlistItem:${id}`,\n },\n VirtualWishlistItem: {\n keyFields: ({ id }) => `CustomerVirtualWishlistItem:${id}`,\n },\n DownloadableWishlistItem: {\n keyFields: ({ id }) => `CustomerDownloadableWishlistItem:${id}`,\n },\n BundleWishlistItem: {\n keyFields: ({ id }) => `CustomerBundleWishlistItem:${id}`,\n },\n GroupedProductWishlistItem: {\n keyFields: ({ id }) => `CustomerGroupedProductWishlistItem:${id}`,\n },\n ConfigurableWishlistItem: {\n keyFields: ({ id }) => `CustomerConfigurableWishlistItem:${id}`,\n },\n GiftCardWishlistItem: {\n keyFields: ({ id }) => `CustomerGiftCardWishlistItem:${id}`,\n },\n};\n","import { isPlatformBrowser } from '@angular/common';\nimport {\n Inject,\n Injectable,\n PLATFORM_ID,\n} from '@angular/core';\n\nimport { DaffDriverHttpClientCacheServiceInterface } from '@daffodil/driver';\n\n/**\n * Interacts with the Apollo client.\n *\n * @inheritdoc\n */\n@Injectable({\n providedIn: 'root',\n})\nexport class DaffDriverHttpClientCacheMagentoService implements DaffDriverHttpClientCacheServiceInterface {\n constructor(\n @Inject(PLATFORM_ID) private platformId: string,\n ) {}\n\n reset(): void {\n if (isPlatformBrowser(this.platformId)) {\n location.reload();\n }\n }\n}\n","import { makeEnvironmentProviders } from '@angular/core';\nimport { map } from 'rxjs';\n\nimport {\n getApolloOperationHeaders,\n provideDaffApolloRequestHandlerFactories,\n} from '@daffodil/core/graphql';\n\nexport const MAGENTO_CUSTOMER_CACHE_ID_HEADER = 'X-Magento-Cache-Id';\n\n/**\n * Stores and sets the Magento cache ID header.\n * This will set the `X-Magento-Cache-Id` header from the most recent value encountered\n * on a response, if there was a response with that header set.\n */\nexport const provideDaffMagentoCacheHeader = () => makeEnvironmentProviders([\n provideDaffApolloRequestHandlerFactories(() => {\n let cacheHeader: string | undefined;\n return (operation, forward) => {\n if (cacheHeader) {\n operation.setContext({\n headers: getApolloOperationHeaders(operation).append(MAGENTO_CUSTOMER_CACHE_ID_HEADER, cacheHeader),\n });\n }\n return forward(operation).pipe(\n map((response) => {\n const { headers } = operation.getContext().response;\n if (headers.get(MAGENTO_CUSTOMER_CACHE_ID_HEADER)) {\n cacheHeader = headers.get(MAGENTO_CUSTOMER_CACHE_ID_HEADER);\n }\n return response;\n }),\n );\n };\n }),\n]);\n","import { makeEnvironmentProviders } from '@angular/core';\n\nimport { MagentoDriverFeatureKind } from './kind.enum';\nimport { makeMagentoDriverFeature } from './make-feature';\nimport { MagentoDriverFeature } from './type';\nimport {\n provideDaffMagentoApolloCacheableOperations,\n provideManyDaffMagentoCacheableOperations,\n} from '../graphql/public_api';\n\n/**\n * A {@link provideMagentoDriver} feature that sets up {@link provideDaffMagentoApolloCacheableOperations}.\n */\nexport const withOperationCache = (...extraOperations: Array<string>): MagentoDriverFeature => makeMagentoDriverFeature(MagentoDriverFeatureKind.CacheableOperations, [\n provideDaffMagentoApolloCacheableOperations(),\n makeEnvironmentProviders(provideManyDaffMagentoCacheableOperations(...extraOperations)),\n]);\n","import { CombinedGraphQLErrors } from '@apollo/client';\nimport type { ErrorLink } from '@apollo/client/link/error';\n\nimport { createSingleInjectionToken } from '@daffodil/core';\n\nimport { MagentoDriverFeatureKind } from './kind.enum';\nimport { makeMagentoDriverFeature } from './make-feature';\nimport { MagentoDriverFeature } from './type';\n\nexport const {\n /**\n * Holds the error handler for {@link provideMagentoDriver}.\n */\n token: DAFF_DRIVER_MAGENTO_ERROR_HANDLER,\n /**\n * Provider function for {@link DAFF_DRIVER_MAGENTO_ERROR_HANDLER}.\n */\n provider: provideDaffDriverMagentoErrorHandler,\n} = createSingleInjectionToken<ErrorLink.ErrorHandler>('DAFF_DRIVER_MAGENTO_ERROR_HANDLER', {\n factory: () => ({ error }) => {\n if (CombinedGraphQLErrors.is(error)) {\n error.errors.map(({ message, locations, path }) =>\n console.error(\n `[GraphQL error]: Message: ${message}, Location: ${locations}, Path: ${path}`,\n ),\n );\n } else {\n console.error(`[Network error]: ${error.message}`);\n }\n },\n});\n\n/**\n * A {@link provideMagentoDriver} feature that specifies the error handler.\n */\nexport const withDaffDriverMagentoErrorHandler = (handler: ErrorLink.ErrorHandler): MagentoDriverFeature => makeMagentoDriverFeature(MagentoDriverFeatureKind.ErrorHandler, [\n provideDaffDriverMagentoErrorHandler(handler),\n]);\n","import {\n inject,\n makeEnvironmentProviders,\n provideAppInitializer,\n TransferState,\n type EnvironmentProviders,\n type StateKey,\n} from '@angular/core';\nimport { NormalizedCacheObject } from '@apollo/client/cache';\nimport { Apollo } from 'apollo-angular';\n\nimport { createSingleInjectionToken } from '@daffodil/core';\n\nimport { MagentoDriverFeatureKind } from './kind.enum';\nimport { makeMagentoDriverFeature } from './make-feature';\nimport { MagentoDriverFeature } from './type';\n\nexport const {\n /**\n * Holds the `StateKey` with which {@link provideMagentoDriver} can use to transfer Apollo state from the server to the client.\n */\n token: DAFF_DRIVER_MAGENTO_TRANSFER_STATE_KEY,\n /**\n * Provider for {@link DAFF_DRIVER_MAGENTO_TRANSFER_STATE_KEY}.\n */\n provider: provideDaffDriverMagentoTransferStateKey,\n} = createSingleInjectionToken<StateKey<any>>('DAFF_DRIVER_MAGENTO_TRANSFER_STATE_KEY');\n\n/**\n * A {@link provideMagentoDriver} feature that sets up transfer state with the specified key.\n *\n * @param stateKey The key under which the Apollo state is stored.\n */\nexport const withDaffDriverMagentoTransferState = <T extends StateKey<any> = StateKey<any>>(stateKey: T): MagentoDriverFeature => makeMagentoDriverFeature(MagentoDriverFeatureKind.TransferState, [\n provideDaffDriverMagentoTransferStateKey(stateKey),\n]);\n\n/**\n * Holds the logic for hydrating the Apollo cache with the server's transferred state.\n * It is recommended to use {@link withDaffDriverMagentoTransferState} with {@link provideMagentoDriver}\n * to provide this functionality automatically.\n */\nexport const provideDaffDriverMagentoTransferState = (): EnvironmentProviders => makeEnvironmentProviders([\n provideAppInitializer(() => {\n const cache = inject(Apollo).client.cache;\n const transferState = inject(TransferState);\n const stateKey = inject(DAFF_DRIVER_MAGENTO_TRANSFER_STATE_KEY);\n const hasStateKey = transferState.hasKey(stateKey);\n if (hasStateKey) {\n const state = transferState.get<NormalizedCacheObject>(\n stateKey,\n null,\n );\n cache.restore(state);\n } else {\n transferState.onSerialize(stateKey, () => cache.extract());\n }\n }),\n]);\n","import {\n EnvironmentProviders,\n inject,\n InjectionToken,\n makeEnvironmentProviders,\n} from '@angular/core';\nimport {\n ApolloLink,\n InMemoryCache,\n PossibleTypesMap,\n TypePolicies,\n} from '@apollo/client/core';\nimport { ErrorLink } from '@apollo/client/link/error';\nimport { provideApollo } from 'apollo-angular';\nimport { HttpLink } from 'apollo-angular/http';\n\nimport { DAFF_APOLLO_REQUEST_HANDLERS } from '@daffodil/core/graphql';\nimport { provideDaffDriverHttpClientCacheService } from '@daffodil/driver';\n\nimport typePolicies from './apollo/type-policies';\nimport {\n DAFF_DRIVER_MAGENTO_ERROR_HANDLER,\n DAFF_DRIVER_MAGENTO_EXTRA_APOLLO_OPTIONS,\n MagentoDriverFeatureKind,\n MagentoDriverFeature,\n provideDaffDriverMagentoTransferState,\n} from './features/public_api';\nimport { DaffDriverHttpClientCacheMagentoService } from './graphql/cache.service';\nimport {\n provideDaffMagentoApolloCacheableOperations,\n provideDaffMagentoCacheHeader,\n} from './graphql/public_api';\nimport { MAGENTO_POSSIBLE_TYPES } from './schema/schema';\n\nexport interface DaffMagentoDriverConfig extends HttpLink.Options {\n possibleTypes?: PossibleTypesMap;\n typePolicies?: TypePolicies;\n}\n\n/**\n * Sets up the Magento Daffodil driver configuration for Magento's GraphQl API.\n *\n * Under the hood, this creates an Apollo Client configuration.\n *\n * @param endpoint - The Magento store domain (e.g. \"https://www.my-store.com/graphql\") or an injection token for a string or function that returns a string\n */\nexport function provideMagentoDriver(options: DaffMagentoDriverConfig | InjectionToken<DaffMagentoDriverConfig>, ...features: Array<MagentoDriverFeature>): EnvironmentProviders {\n const providers = [\n ...features.flatMap(({ ɵproviders }) => ɵproviders),\n provideApollo(() => {\n const opts: DaffMagentoDriverConfig = {\n possibleTypes: MAGENTO_POSSIBLE_TYPES.possibleTypes,\n typePolicies,\n ...(options instanceof InjectionToken ? inject(options) : options),\n };\n return {\n ...inject(DAFF_DRIVER_MAGENTO_EXTRA_APOLLO_OPTIONS),\n link: ApolloLink.from([\n ...inject(DAFF_APOLLO_REQUEST_HANDLERS).map((handler) => new ApolloLink(handler)),\n new ErrorLink(inject(DAFF_DRIVER_MAGENTO_ERROR_HANDLER)),\n inject(HttpLink).create(opts),\n ]),\n cache: new InMemoryCache({ typePolicies: opts.typePolicies, possibleTypes: opts.possibleTypes }),\n };\n }),\n provideDaffDriverHttpClientCacheService(DaffDriverHttpClientCacheMagentoService),\n\n // enable caching by default\n provideDaffMagentoApolloCacheableOperations(),\n provideDaffMagentoCacheHeader(),\n ];\n\n if (features.find(({ ɵkind }) => ɵkind === MagentoDriverFeatureKind.TransferState)) {\n providers.push(provideDaffDriverMagentoTransferState());\n }\n\n return makeEnvironmentProviders(providers);\n}\n","import {\n DaffError,\n DaffInheritableError,\n} from '@daffodil/core';\n\nexport const DAFF_DRIVER_MAGENTO_ERROR_CODE = 'DAFF_DRIVER_MAGENTO_ERROR';\n\n/**\n * A very general error thrown when a more specific error type cannot be determined.\n */\nexport class DaffDriverMagentoError extends DaffInheritableError implements DaffError {\n public readonly code: string = DAFF_DRIVER_MAGENTO_ERROR_CODE;\n\n constructor(message?: string) {\n super(message);\n }\n}\n","import { GraphQLFormattedError } from 'graphql';\n\nimport {\n DaffError,\n DaffErrorCodeMap,\n} from '@daffodil/core';\n\nimport { DaffDriverMagentoError } from './error.class';\n\nexport function daffMagentoTransformGraphQlError<T extends DaffErrorCodeMap>(\n error: GraphQLFormattedError,\n map: T,\n): DaffError {\n const ErrorClass = map[<string>error?.extensions?.category] || DaffDriverMagentoError;\n\n return new ErrorClass(error.message) ;\n};\n","import { CombinedGraphQLErrors } from '@apollo/client';\n\nimport {\n DaffError,\n DaffErrorCodeMap,\n daffIsError,\n} from '@daffodil/core';\n\nimport { DaffDriverMagentoError } from './error.class';\nimport { daffMagentoTransformGraphQlError } from './transform-graphql';\n\n/**\n * Transforms the passed error according to the lookup in the passed map.\n */\n// TODO: return array of errors\nexport function daffTransformMagentoError<T extends DaffErrorCodeMap>(error: any, map: T): DaffError {\n if (CombinedGraphQLErrors.is(error)) {\n return error.errors.map(err => daffMagentoTransformGraphQlError<T>(err, map))[0];\n } else if (daffIsError(error)) {\n return error;\n } else {\n // TODO: how do we determine which error to return?\n // https://www.apollographql.com/docs/react/data/error-handling#identifying-error-types\n // return new DaffDriverNetworkError((<ApolloError>error).networkError.message);\n return new DaffDriverMagentoError(error.message);\n }\n}\n","export enum MagentoSortEnum {\n ASC = 'ASC',\n DESC = 'DESC'\n}\n","import { DaffCollectionMetadata } from '@daffodil/core';\n\nimport { MagentoSearchResultPageInfo } from '../../models/public_api';\n\nexport function magentoPageInfoTransform(pageInfo: MagentoSearchResultPageInfo): Pick<DaffCollectionMetadata, 'pageSize' | 'currentPage' | 'totalPages'> {\n return {\n pageSize: pageInfo.page_size,\n currentPage: pageInfo.current_page,\n totalPages: pageInfo.total_pages,\n };\n}\n","import { DaffSortDirectionEnum } from '@daffodil/core';\n\nimport { MagentoSortEnum } from '../../models/public_api';\n\nconst map = <const>{\n [MagentoSortEnum.ASC]: DaffSortDirectionEnum.Ascending,\n [MagentoSortEnum.DESC]: DaffSortDirectionEnum.Descending,\n};\n\nexport function magentoSortDirectionResponseTransform(direction: MagentoSortEnum): DaffSortDirectionEnum {\n return map[direction];\n}\n","import { DaffSortDirectionEnum } from '@daffodil/core';\n\nimport { MagentoSortEnum } from '../../models/public_api';\n\nconst map = <const>{\n [DaffSortDirectionEnum.Ascending]: MagentoSortEnum.ASC,\n [DaffSortDirectionEnum.Descending]: MagentoSortEnum.DESC,\n};\n\nexport function magentoSortDirectionRequestTransform(direction: DaffSortDirectionEnum): MagentoSortEnum {\n return map[direction];\n}\n","import { gql } from 'apollo-angular';\n\nexport const magentoSearchResultPageInfoFragment = gql`\n fragment magentoSearchResultPageInfo on SearchResultPageInfo {\n page_size\n current_page\n total_pages\n }\n`;\n","import { gql } from 'apollo-angular';\n\nexport const magentoMoneyFragment = gql`\n fragment moneyFragment on Money {\n value\n currency\n }\n`;\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":["map"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAEO,MAAM,sBAAsB,GAAG;;ACFtC;;;;;;AAMG;AAIH,MAAM,YAAY,GAAiB;;AAEjC,IAAA,KAAK,EAAE;AACL,QAAA,MAAM,EAAE;AACN,YAAA,IAAI,EAAE;;AAEJ,gBAAA,OAAO,EAAE,MAAM,MAAM;AACtB,aAAA;AACD,YAAA,QAAQ,EAAE;AACR,gBAAA,OAAO,EAAE,MAAM,UAAU;AAC1B,aAAA;AACD,YAAA,YAAY,EAAE;AACZ,gBAAA,OAAO,EAAE,MAAM,MAAM;AACtB,aAAA;AACD,YAAA,wBAAwB,EAAE;AACxB,gBAAA,IAAI,EAAE,QAAQ,IAAI,QAAQ,IAAI,EAAE;AACjC,aAAA;AACF,SAAA;AACF,KAAA;AACD,IAAA,eAAe,EAAE;QACf,SAAS,EAAE,CAAC,MAAM,CAAC;AACpB,KAAA;AACD,IAAA,sBAAsB,EAAE;QACtB,SAAS,EAAE,CAAC,MAAM,CAAC;AACpB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ets":{"build":{"outputs":["{workspaceRoot}/dist/driver"]}}},"version":"0.93.0","description":"Base driver interfaces and utilities for connecting Daffodil to ecommerce platforms. Part of the Daffodil ecommerce framework.","repository":{"type":"git","url":"https://github.com/graycoreio/daffodil"},"author":"Graycore LLC","license":"MIT","bugs":{"url":"https://github.com/graycoreio/daffodil/issues"},"homepage":"https://github.com/graycoreio/daffodil","optionalDependencies":{"angular-in-memory-web-api":"^0.21.0"},"peerDependencies":{"@angular/common":"^21","@angular/core":"^21","rxjs":"^7.0.0"},"module":"fesm2022/daffodil-driver.mjs","typings":"types/daffodil-driver.d.ts","exports":{"./package.json":{"default":"./package.json"},".":{"types":"./types/daffodil-driver.d.ts","default":"./fesm2022/daffodil-driver.mjs"},"./hubspot":{"types":"./types/daffodil-driver-hubspot.d.ts","default":"./fesm2022/daffodil-driver-hubspot.mjs"},"./hubspot/testing":{"types":"./types/daffodil-driver-hubspot-testing.d.ts","default":"./fesm2022/daffodil-driver-hubspot-testing.mjs"},"./in-memory":{"types":"./types/daffodil-driver-in-memory.d.ts","default":"./fesm2022/daffodil-driver-in-memory.mjs"},"./magento":{"types":"./types/daffodil-driver-magento.d.ts","default":"./fesm2022/daffodil-driver-magento.mjs"},"./magento/testing":{"types":"./types/daffodil-driver-magento-testing.d.ts","default":"./fesm2022/daffodil-driver-magento-testing.mjs"},"./shopify":{"types":"./types/daffodil-driver-shopify.d.ts","default":"./fesm2022/daffodil-driver-shopify.mjs"},"./shopify/testing":{"types":"./types/daffodil-driver-shopify-testing.d.ts","default":"./fesm2022/daffodil-driver-shopify-testing.mjs"}},"sideEffects":false,"type":"module","dependencies":{"tslib":"^2.6.2"}}
1
+ {"name":"@daffodil/driver","nx":{"targets":{"build":{"outputs":["{workspaceRoot}/dist/driver"]}}},"version":"0.94.0","description":"Base driver interfaces and utilities for connecting Daffodil to ecommerce platforms. Part of the Daffodil ecommerce framework.","repository":{"type":"git","url":"https://github.com/graycoreio/daffodil"},"author":"Graycore LLC","license":"MIT","bugs":{"url":"https://github.com/graycoreio/daffodil/issues"},"homepage":"https://github.com/graycoreio/daffodil","optionalDependencies":{"angular-in-memory-web-api":"^0.21.0"},"peerDependencies":{"@angular/common":"^21","@angular/core":"^21","rxjs":"^7.0.0"},"module":"fesm2022/daffodil-driver.mjs","typings":"types/daffodil-driver.d.ts","exports":{"./package.json":{"default":"./package.json"},".":{"types":"./types/daffodil-driver.d.ts","default":"./fesm2022/daffodil-driver.mjs"},"./hubspot":{"types":"./types/daffodil-driver-hubspot.d.ts","default":"./fesm2022/daffodil-driver-hubspot.mjs"},"./hubspot/testing":{"types":"./types/daffodil-driver-hubspot-testing.d.ts","default":"./fesm2022/daffodil-driver-hubspot-testing.mjs"},"./in-memory":{"types":"./types/daffodil-driver-in-memory.d.ts","default":"./fesm2022/daffodil-driver-in-memory.mjs"},"./magento":{"types":"./types/daffodil-driver-magento.d.ts","default":"./fesm2022/daffodil-driver-magento.mjs"},"./magento/testing":{"types":"./types/daffodil-driver-magento-testing.d.ts","default":"./fesm2022/daffodil-driver-magento-testing.mjs"},"./shopify":{"types":"./types/daffodil-driver-shopify.d.ts","default":"./fesm2022/daffodil-driver-shopify.mjs"},"./shopify/testing":{"types":"./types/daffodil-driver-shopify-testing.d.ts","default":"./fesm2022/daffodil-driver-shopify-testing.mjs"}},"sideEffects":false,"type":"module","dependencies":{"tslib":"^2.6.2"}}
@@ -2,11 +2,10 @@ import * as _angular_core from '@angular/core';
2
2
  import { Provider, EnvironmentProviders, StateKey, InjectionToken } from '@angular/core';
3
3
  import { PossibleTypesMap, TypePolicies } from '@apollo/client/core';
4
4
  import { HttpLink } from 'apollo-angular/http';
5
- import { ApolloClient, ApolloLink, TypePolicies as TypePolicies$1 } from '@apollo/client';
5
+ import { ApolloClient, TypePolicies as TypePolicies$1 } from '@apollo/client';
6
6
  import { ErrorLink } from '@apollo/client/link/error';
7
7
  import { DaffErrorCodeMap, DaffError, DaffInheritableError, DaffCollectionMetadata, DaffSortDirectionEnum } from '@daffodil/core';
8
8
  import { GraphQLFormattedError } from 'graphql';
9
- import { DaffApolloLinkGenerator } from '@daffodil/core/graphql';
10
9
  import { DaffDriverHttpClientCacheServiceInterface } from '@daffodil/driver';
11
10
  import * as apollo_angular from 'apollo-angular';
12
11
 
@@ -167,19 +166,6 @@ declare enum MagentoSortEnum {
167
166
  * A request handler provider that will convert cacheable apollo operations into a format that Magento will understand as cacheable.
168
167
  */
169
168
  declare const provideDaffMagentoApolloCacheableOperations: () => _angular_core.EnvironmentProviders;
170
- /**
171
- * A service that will convert cacheable apollo operations into a format that Magento will understand as cacheable.
172
- *
173
- * @inheritdoc
174
- * @deprecated Prefer using {@link provideDaffMagentoApolloCacheableOperations} instead. Deprecated in version 0.91.0. Will be removed in version 0.94.0.
175
- */
176
- declare class DaffMagentoApolloCacheableOperationsLinkGenerator implements DaffApolloLinkGenerator {
177
- private apolloGetRequests;
178
- constructor(apolloGetRequests: string[]);
179
- getLink(): ApolloLink;
180
- static ɵfac: _angular_core.ɵɵFactoryDeclaration<DaffMagentoApolloCacheableOperationsLinkGenerator, never>;
181
- static ɵprov: _angular_core.ɵɵInjectableDeclaration<DaffMagentoApolloCacheableOperationsLinkGenerator>;
182
- }
183
169
 
184
170
  declare const DAFF_MAGENTO_CACHEABLE_OPERATIONS: _angular_core.InjectionToken<string[]>;
185
171
  declare const provideManyDaffMagentoCacheableOperations: <R extends string = string>(...values: R[]) => Array<_angular_core.ValueProvider>;
@@ -224,20 +210,6 @@ declare const MAGENTO_CUSTOMER_CACHE_ID_HEADER = "X-Magento-Cache-Id";
224
210
  * on a response, if there was a response with that header set.
225
211
  */
226
212
  declare const provideDaffMagentoCacheHeader: () => _angular_core.EnvironmentProviders;
227
- /**
228
- * Stores and sets the Magento cache ID header.
229
- * This will set the `X-Magento-Cache-Id` header from the most recent value encountered
230
- * on a response, if there was a response with that header set.
231
- *
232
- * @inheritdoc
233
- * @deprecated Prefer using {@link provideDaffMagentoCacheHeader} instead. Deprecated in version 0.91.0. Will be removed in version 0.94.0.
234
- */
235
- declare class DaffMagentoCacheHeaderApolloLinkGenerator implements DaffApolloLinkGenerator {
236
- private _cacheHeader?;
237
- getLink(): ApolloLink;
238
- static ɵfac: _angular_core.ɵɵFactoryDeclaration<DaffMagentoCacheHeaderApolloLinkGenerator, never>;
239
- static ɵprov: _angular_core.ɵɵInjectableDeclaration<DaffMagentoCacheHeaderApolloLinkGenerator>;
240
- }
241
213
 
242
214
  declare function magentoPageInfoTransform(pageInfo: MagentoSearchResultPageInfo): Pick<DaffCollectionMetadata, 'pageSize' | 'currentPage' | 'totalPages'>;
243
215
 
@@ -249,5 +221,5 @@ declare const magentoSearchResultPageInfoFragment: apollo_angular.TypedDocumentN
249
221
 
250
222
  declare const magentoMoneyFragment: apollo_angular.TypedDocumentNode<unknown, unknown>;
251
223
 
252
- export { DAFF_DRIVER_MAGENTO_ERROR_CODE, DAFF_DRIVER_MAGENTO_ERROR_HANDLER, DAFF_DRIVER_MAGENTO_EXTRA_APOLLO_OPTIONS, DAFF_DRIVER_MAGENTO_TRANSFER_STATE_KEY, DAFF_MAGENTO_2_4_3_TYPE_POLICIES, DAFF_MAGENTO_CACHEABLE_OPERATIONS, DaffDriverHttpClientCacheMagentoService, DaffDriverMagentoError, DaffMagentoApolloCacheableOperationsLinkGenerator, DaffMagentoCacheHeaderApolloLinkGenerator, MAGENTO_CUSTOMER_CACHE_ID_HEADER, MAGENTO_POSSIBLE_TYPES, MagentoDriverFeatureKind, MagentoSortEnum, daffMagentoTransformGraphQlError, daffTransformMagentoError, magentoMoneyFragment, magentoPageInfoTransform, magentoSearchResultPageInfoFragment, magentoSortDirectionRequestTransform, magentoSortDirectionResponseTransform, makeMagentoDriverFeature, provideDaffDriverMagentoErrorHandler, provideDaffDriverMagentoExtraApolloOptions, provideDaffDriverMagentoExtraApolloOptionsFactory, provideDaffDriverMagentoTransferState, provideDaffDriverMagentoTransferStateKey, provideDaffMagentoApolloCacheableOperations, provideDaffMagentoCacheHeader, provideDaffMagentoCacheableOperation, provideMagentoDriver, provideManyDaffMagentoCacheableOperations, MAGENTO_POSSIBLE_TYPES as schema, withDaffDriverMagentoErrorHandler, withDaffDriverMagentoExtraApolloOptions, withDaffDriverMagentoTransferState, withOperationCache };
224
+ export { DAFF_DRIVER_MAGENTO_ERROR_CODE, DAFF_DRIVER_MAGENTO_ERROR_HANDLER, DAFF_DRIVER_MAGENTO_EXTRA_APOLLO_OPTIONS, DAFF_DRIVER_MAGENTO_TRANSFER_STATE_KEY, DAFF_MAGENTO_2_4_3_TYPE_POLICIES, DAFF_MAGENTO_CACHEABLE_OPERATIONS, DaffDriverHttpClientCacheMagentoService, DaffDriverMagentoError, MAGENTO_CUSTOMER_CACHE_ID_HEADER, MAGENTO_POSSIBLE_TYPES, MagentoDriverFeatureKind, MagentoSortEnum, daffMagentoTransformGraphQlError, daffTransformMagentoError, magentoMoneyFragment, magentoPageInfoTransform, magentoSearchResultPageInfoFragment, magentoSortDirectionRequestTransform, magentoSortDirectionResponseTransform, makeMagentoDriverFeature, provideDaffDriverMagentoErrorHandler, provideDaffDriverMagentoExtraApolloOptions, provideDaffDriverMagentoExtraApolloOptionsFactory, provideDaffDriverMagentoTransferState, provideDaffDriverMagentoTransferStateKey, provideDaffMagentoApolloCacheableOperations, provideDaffMagentoCacheHeader, provideDaffMagentoCacheableOperation, provideMagentoDriver, provideManyDaffMagentoCacheableOperations, withDaffDriverMagentoErrorHandler, withDaffDriverMagentoExtraApolloOptions, withDaffDriverMagentoTransferState, withOperationCache };
253
225
  export type { DaffDriverMagentoExtraApolloOptions, DaffMagentoDriverConfig, MagentoDiscount, MagentoDriverFeature, MagentoFilterInput, MagentoMoney, MagentoSearchResultPageInfo };