@daffodil/driver 0.92.3 → 0.93.1
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.
- package/fesm2022/daffodil-driver-hubspot-testing.mjs +3 -3
- package/fesm2022/daffodil-driver-hubspot-testing.mjs.map +1 -1
- package/fesm2022/daffodil-driver-in-memory.mjs +7 -7
- package/fesm2022/daffodil-driver-in-memory.mjs.map +1 -1
- package/fesm2022/daffodil-driver-magento-testing.mjs +9 -9
- package/fesm2022/daffodil-driver-magento-testing.mjs.map +1 -1
- package/fesm2022/daffodil-driver-magento.mjs +34 -39
- package/fesm2022/daffodil-driver-magento.mjs.map +1 -1
- package/fesm2022/daffodil-driver-shopify-testing.mjs +21 -21
- package/fesm2022/daffodil-driver-shopify-testing.mjs.map +1 -1
- package/fesm2022/daffodil-driver-shopify.mjs +14 -16
- package/fesm2022/daffodil-driver-shopify.mjs.map +1 -1
- package/fesm2022/daffodil-driver.mjs +3 -3
- package/fesm2022/daffodil-driver.mjs.map +1 -1
- package/package.json +1 -1
- package/{magento/index.d.ts → types/daffodil-driver-magento.d.ts} +10 -9
- /package/{hubspot/testing/index.d.ts → types/daffodil-driver-hubspot-testing.d.ts} +0 -0
- /package/{hubspot/index.d.ts → types/daffodil-driver-hubspot.d.ts} +0 -0
- /package/{in-memory/index.d.ts → types/daffodil-driver-in-memory.d.ts} +0 -0
- /package/{magento/testing/index.d.ts → types/daffodil-driver-magento-testing.d.ts} +0 -0
- /package/{shopify/testing/index.d.ts → types/daffodil-driver-shopify-testing.d.ts} +0 -0
- /package/{shopify/index.d.ts → types/daffodil-driver-shopify.d.ts} +0 -0
- /package/{index.d.ts → types/daffodil-driver.d.ts} +0 -0
|
@@ -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 { ApolloClientOptions } from '@apollo/client/core';\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<ApolloClientOptions<any>, '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/core';\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/core';\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/core';\n\nimport {\n DaffApolloLinkGenerator,\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: {\n ...operation.getContext().headers,\n [MAGENTO_CUSTOMER_CACHE_ID_HEADER]: cacheHeader,\n },\n });\n }\n return forward(operation).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 * 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: {\n ...operation.getContext().headers,\n [MAGENTO_CUSTOMER_CACHE_ID_HEADER]: this._cacheHeader,\n },\n });\n }\n return forward(operation).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","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 type { ErrorHandler } 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<ErrorHandler>('DAFF_DRIVER_MAGENTO_ERROR_HANDLER', {\n factory: () => ({ graphQLErrors, networkError }) => {\n if (graphQLErrors) {\n graphQLErrors.map(({ message, locations, path }) =>\n console.error(\n `[GraphQL error]: Message: ${message}, Location: ${locations}, Path: ${path}`,\n ),\n );\n }\n if (networkError) {\n console.error(`[Network error]: ${networkError}`);\n }\n },\n});\n\n/**\n * A {@link provideMagentoDriver} feature that specifies the error handler.\n */\nexport const withDaffDriverMagentoErrorHandler = (handler: 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 from,\n InMemoryCache,\n PossibleTypesMap,\n TypePolicies,\n} from '@apollo/client/core';\nimport { onError } from '@apollo/client/link/error';\nimport { provideApollo } from 'apollo-angular';\nimport {\n HttpLink,\n Options as HttpOptions,\n} 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 HttpOptions {\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: from([\n ...inject(DAFF_APOLLO_REQUEST_HANDLERS),\n onError(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 { ApolloError } from '@apollo/client/core';\n\nimport {\n DaffError,\n DaffErrorCodeMap,\n daffIsError,\n} from '@daffodil/core';\nimport { DaffDriverNetworkError } from '@daffodil/driver';\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 (error.graphQLErrors?.length > 0) {\n return (<ApolloError>error).graphQLErrors.map(err => daffMagentoTransformGraphQlError<T>(err, map))[0];\n } else if (error.networkError) {\n return new DaffDriverNetworkError((<ApolloError>error).networkError.message);\n } else if (daffIsError(error)) {\n return error;\n } else {\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;AAC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AAA;;;;;;;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/**\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":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;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A,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;;;;"}
|
|
@@ -16,10 +16,10 @@ class ShopifyPageInfoFactory extends DaffModelFactory {
|
|
|
16
16
|
constructor() {
|
|
17
17
|
super(MockShopifyPageInfo);
|
|
18
18
|
}
|
|
19
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
20
|
-
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "
|
|
19
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: ShopifyPageInfoFactory, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
20
|
+
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: ShopifyPageInfoFactory, providedIn: 'root' }); }
|
|
21
21
|
}
|
|
22
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
22
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: ShopifyPageInfoFactory, decorators: [{
|
|
23
23
|
type: Injectable,
|
|
24
24
|
args: [{
|
|
25
25
|
providedIn: 'root',
|
|
@@ -40,10 +40,10 @@ class ShopifyImageNodeFactory extends DaffModelFactory {
|
|
|
40
40
|
constructor() {
|
|
41
41
|
super(MockShopifyImageNode);
|
|
42
42
|
}
|
|
43
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
44
|
-
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "
|
|
43
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: ShopifyImageNodeFactory, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
44
|
+
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: ShopifyImageNodeFactory, providedIn: 'root' }); }
|
|
45
45
|
}
|
|
46
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
46
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: ShopifyImageNodeFactory, decorators: [{
|
|
47
47
|
type: Injectable,
|
|
48
48
|
args: [{
|
|
49
49
|
providedIn: 'root',
|
|
@@ -60,10 +60,10 @@ class ShopifyMoneyFactory extends DaffModelFactory {
|
|
|
60
60
|
constructor() {
|
|
61
61
|
super(MockShopifyMoney);
|
|
62
62
|
}
|
|
63
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
64
|
-
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "
|
|
63
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: ShopifyMoneyFactory, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
64
|
+
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: ShopifyMoneyFactory, providedIn: 'root' }); }
|
|
65
65
|
}
|
|
66
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
66
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: ShopifyMoneyFactory, decorators: [{
|
|
67
67
|
type: Injectable,
|
|
68
68
|
args: [{
|
|
69
69
|
providedIn: 'root',
|
|
@@ -81,10 +81,10 @@ class ShopifyProductVariantsPriceRangeFactory extends DaffModelFactory {
|
|
|
81
81
|
constructor(shopifyMoneyFactory) {
|
|
82
82
|
super(MockShopifyProductVariantsPriceRange, shopifyMoneyFactory);
|
|
83
83
|
}
|
|
84
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
85
|
-
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "
|
|
84
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: ShopifyProductVariantsPriceRangeFactory, deps: [{ token: ShopifyMoneyFactory }], target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
85
|
+
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: ShopifyProductVariantsPriceRangeFactory, providedIn: 'root' }); }
|
|
86
86
|
}
|
|
87
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
87
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: ShopifyProductVariantsPriceRangeFactory, decorators: [{
|
|
88
88
|
type: Injectable,
|
|
89
89
|
args: [{
|
|
90
90
|
providedIn: 'root',
|
|
@@ -134,10 +134,10 @@ class ShopifyProductNodeFactory extends DaffModelFactory {
|
|
|
134
134
|
constructor(shopifyProductVariantsPriceRangeFactory, shopifyImageNodeFactory) {
|
|
135
135
|
super(MockShopifyProductNode, shopifyProductVariantsPriceRangeFactory, shopifyImageNodeFactory);
|
|
136
136
|
}
|
|
137
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
138
|
-
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "
|
|
137
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: ShopifyProductNodeFactory, deps: [{ token: ShopifyProductVariantsPriceRangeFactory }, { token: ShopifyImageNodeFactory }], target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
138
|
+
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: ShopifyProductNodeFactory, providedIn: 'root' }); }
|
|
139
139
|
}
|
|
140
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
140
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: ShopifyProductNodeFactory, decorators: [{
|
|
141
141
|
type: Injectable,
|
|
142
142
|
args: [{
|
|
143
143
|
providedIn: 'root',
|
|
@@ -158,10 +158,10 @@ class ShopifyProductGraphFactory extends DaffModelFactory {
|
|
|
158
158
|
constructor(shopifyProductNodeFactory, shopifyPageInfoFactory) {
|
|
159
159
|
super(MockShopifyProductGraph, shopifyProductNodeFactory, shopifyPageInfoFactory);
|
|
160
160
|
}
|
|
161
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
162
|
-
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "
|
|
161
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: ShopifyProductGraphFactory, deps: [{ token: ShopifyProductNodeFactory }, { token: ShopifyPageInfoFactory }], target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
162
|
+
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: ShopifyProductGraphFactory, providedIn: 'root' }); }
|
|
163
163
|
}
|
|
164
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
164
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: ShopifyProductGraphFactory, decorators: [{
|
|
165
165
|
type: Injectable,
|
|
166
166
|
args: [{
|
|
167
167
|
providedIn: 'root',
|
|
@@ -199,10 +199,10 @@ class DaffCategoryDriverShopifyCategoryFactory extends DaffModelFactory {
|
|
|
199
199
|
constructor(shopifyProductNodeFactory, shopifyImageNodeFactory) {
|
|
200
200
|
super(MockShopifyCategory, shopifyProductNodeFactory, shopifyImageNodeFactory);
|
|
201
201
|
}
|
|
202
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
203
|
-
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "
|
|
202
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: DaffCategoryDriverShopifyCategoryFactory, deps: [{ token: ShopifyProductNodeFactory }, { token: ShopifyImageNodeFactory }], target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
203
|
+
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: DaffCategoryDriverShopifyCategoryFactory, providedIn: 'root' }); }
|
|
204
204
|
}
|
|
205
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
205
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: DaffCategoryDriverShopifyCategoryFactory, decorators: [{
|
|
206
206
|
type: Injectable,
|
|
207
207
|
args: [{
|
|
208
208
|
providedIn: 'root',
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"daffodil-driver-shopify-testing.mjs","sources":["../../../libs/driver/shopify/testing/src/factories/page-info.factory.ts","../../../libs/driver/shopify/testing/src/factories/image-node.factory.ts","../../../libs/driver/shopify/testing/src/factories/money.factory.ts","../../../libs/driver/shopify/testing/src/factories/product-variants-price-range.factory.ts","../../../libs/driver/shopify/testing/src/factories/product-node.factory.ts","../../../libs/driver/shopify/testing/src/factories/product-graph.factory.ts","../../../libs/driver/shopify/testing/src/factories/collection.factory.ts","../../../libs/driver/shopify/testing/src/daffodil-driver-shopify-testing.ts"],"sourcesContent":["import { Injectable } from '@angular/core';\nimport { faker } from '@faker-js/faker/locale/en_US';\n\nimport { DaffModelFactory } from '@daffodil/core/testing';\nimport { ShopifyPageInfo } from '@daffodil/driver/shopify';\n\nclass MockShopifyPageInfo implements ShopifyPageInfo {\n endCursor = faker.lorem.word();\n hasNextPage = faker.datatype.boolean();\n hasPreviousPage = faker.datatype.boolean();\n startCursor = faker.lorem.word();\n}\n\n@Injectable({\n providedIn: 'root',\n})\nexport class ShopifyPageInfoFactory extends DaffModelFactory<ShopifyPageInfo, typeof MockShopifyPageInfo> {\n constructor(){\n super(MockShopifyPageInfo);\n }\n}\n","import { Injectable } from '@angular/core';\nimport { faker } from '@faker-js/faker/locale/en_US';\n\nimport { DaffModelFactory } from '@daffodil/core/testing';\nimport { ShopifyImageNode } from '@daffodil/driver/shopify';\n\nclass MockShopifyImageNode implements ShopifyImageNode {\n id = '';\n url = faker.image.url();\n altText = faker.lorem.words(5);\n originalSrc = faker.image.url();\n src = faker.image.url();\n transformedSrc = faker.image.url();\n}\n\n@Injectable({\n providedIn: 'root',\n})\nexport class ShopifyImageNodeFactory extends DaffModelFactory<ShopifyImageNode, typeof MockShopifyImageNode> {\n constructor(){\n super(MockShopifyImageNode);\n }\n}\n","import { Injectable } from '@angular/core';\nimport { faker } from '@faker-js/faker/locale/en_US';\n\nimport { DaffModelFactory } from '@daffodil/core/testing';\nimport {\n ShopifyMoneyV2,\n ShopifyCurrencyCode,\n} from '@daffodil/driver/shopify';\n\nclass MockShopifyMoney implements ShopifyMoneyV2 {\n amount = parseFloat(faker.commerce.price());\n currencyCode = faker.helpers.objectValue(ShopifyCurrencyCode);\n}\n\n@Injectable({\n providedIn: 'root',\n})\nexport class ShopifyMoneyFactory extends DaffModelFactory<ShopifyMoneyV2, typeof MockShopifyMoney> {\n constructor(){\n super(MockShopifyMoney);\n }\n}\n","import { Injectable } from '@angular/core';\n\nimport { DaffModelFactory } from '@daffodil/core/testing';\nimport { ShopifyProductPriceRange } from '@daffodil/driver/shopify';\n\nimport { ShopifyMoneyFactory } from './money.factory';\n\nclass MockShopifyProductVariantsPriceRange implements ShopifyProductPriceRange {\n maxVariantPrice = this.shopifyMoneyFactory.create();\n minVariantPrice = this.shopifyMoneyFactory.create();\n constructor(\n protected shopifyMoneyFactory: ShopifyMoneyFactory,\n ) {}\n}\n\n@Injectable({\n providedIn: 'root',\n})\nexport class ShopifyProductVariantsPriceRangeFactory extends DaffModelFactory<ShopifyProductPriceRange, typeof MockShopifyProductVariantsPriceRange> {\n constructor(\n shopifyMoneyFactory: ShopifyMoneyFactory,\n ){\n super(MockShopifyProductVariantsPriceRange, shopifyMoneyFactory);\n }\n}\n","import { Injectable } from '@angular/core';\nimport { faker } from '@faker-js/faker/locale/en_US';\n\nimport { DaffModelFactory } from '@daffodil/core/testing';\nimport {\n ShopifyProductNode,\n shopifyHandleTransformer,\n shopifyIdTransformer,\n shopifyImageTransformer,\n} from '@daffodil/driver/shopify';\n\nimport { ShopifyImageNodeFactory } from './image-node.factory';\nimport { ShopifyProductVariantsPriceRangeFactory } from './product-variants-price-range.factory';\n\nclass MockShopifyProductNode implements ShopifyProductNode {\n availableForSale = faker.datatype.boolean();\n collections = null;\n compareAtPriceRange = this.shopifyProductVariantsPriceRangeFactory.create();\n createdAt = faker.date.past();\n description = faker.commerce.productDescription();\n descriptionHtml = faker.commerce.productDescription();\n handle = shopifyHandleTransformer(faker.commerce.productName());\n id = shopifyIdTransformer(`${faker.number.int({ min: 100000000000 })}`, 'Product');\n images = {\n edges: [],\n nodes: this.shopifyImageNodeFactory.createMany().map(node => (<any>shopifyImageTransformer(node, 'ProductImage'))),\n pageInfo: {\n hasNextPage: false,\n hasPreviousPage: false,\n },\n };\n isGiftCard = faker.datatype.boolean();\n media = null;\n metafields = [];\n onlineStoreUrl = faker.internet.domainName();\n options = [];\n priceRange = this.shopifyProductVariantsPriceRangeFactory.create();\n productType = faker.commerce.productMaterial();\n publishedAt = faker.date.past();\n requiresSellingPlan = faker.datatype.boolean();\n sellingPlanGroups = null;\n seo = {};\n tags = [];\n title = faker.commerce.productName();\n updatedAt = faker.date.past();\n variants = null;\n adjacentVariants = null;\n vendor = faker.company.name();\n\n constructor(\n protected shopifyProductVariantsPriceRangeFactory: ShopifyProductVariantsPriceRangeFactory,\n protected shopifyImageNodeFactory: ShopifyImageNodeFactory,\n ) {}\n}\n\n@Injectable({\n providedIn: 'root',\n})\nexport class ShopifyProductNodeFactory extends DaffModelFactory<ShopifyProductNode, typeof MockShopifyProductNode> {\n constructor(\n shopifyProductVariantsPriceRangeFactory: ShopifyProductVariantsPriceRangeFactory,\n shopifyImageNodeFactory: ShopifyImageNodeFactory,\n ) {\n super(MockShopifyProductNode, shopifyProductVariantsPriceRangeFactory, shopifyImageNodeFactory);\n }\n}\n","import { Injectable } from '@angular/core';\n\nimport { DaffModelFactory } from '@daffodil/core/testing';\nimport { ShopifyProductGraph } from '@daffodil/driver/shopify';\n\nimport { ShopifyPageInfoFactory } from './page-info.factory';\nimport { ShopifyProductNodeFactory } from './product-node.factory';\n\nclass MockShopifyProductGraph implements ShopifyProductGraph {\n nodes = this.shopifyProductNodeFactory.createMany();\n edges = [];\n filters = [];\n pageInfo = this.shopifyPageInfoFactory.create();\n\n constructor(\n protected shopifyProductNodeFactory: ShopifyProductNodeFactory,\n protected shopifyPageInfoFactory: ShopifyPageInfoFactory,\n ) {}\n}\n\n@Injectable({\n providedIn: 'root',\n})\nexport class ShopifyProductGraphFactory extends DaffModelFactory<ShopifyProductGraph, typeof MockShopifyProductGraph> {\n constructor(\n shopifyProductNodeFactory: ShopifyProductNodeFactory,\n shopifyPageInfoFactory: ShopifyPageInfoFactory,\n\n ){\n super(MockShopifyProductGraph, shopifyProductNodeFactory, shopifyPageInfoFactory);\n }\n}\n","import { Injectable } from '@angular/core';\nimport { faker } from '@faker-js/faker/locale/en_US';\n\nimport { DaffModelFactory } from '@daffodil/core/testing';\nimport {\n ShopifyCategory,\n shopifyHandleTransformer,\n shopifyIdTransformer,\n shopifyImageTransformer,\n} from '@daffodil/driver/shopify';\n\nimport { ShopifyImageNodeFactory } from './image-node.factory';\nimport { ShopifyProductNodeFactory } from './product-node.factory';\n\nclass MockShopifyCategory implements ShopifyCategory {\n title = faker.commerce.department();\n handle = shopifyHandleTransformer(faker.commerce.department());\n id = shopifyIdTransformer(`${faker.number.int({ min: 100000000000 })}`, 'Collection');\n description = faker.commerce.productDescription();\n descriptionHtml = faker.commerce.productDescription();\n onlineStoreUrl = faker.internet.domainName();\n image = <any>shopifyImageTransformer(this.shopifyImageNodeFactory.create(), 'CollectionImage');\n products = {\n edges: [],\n nodes: this.shopifyProductNodeFactory.createMany(),\n filters: [],\n pageInfo: {\n hasNextPage: false,\n hasPreviousPage: false,\n },\n };\n metafield = null;\n metafields = [];\n seo = {};\n trackingParameters = null;\n updatedAt = faker.date.past();\n\n constructor(\n protected shopifyProductNodeFactory: ShopifyProductNodeFactory,\n protected shopifyImageNodeFactory: ShopifyImageNodeFactory,\n ) {}\n}\n\n@Injectable({\n providedIn: 'root',\n})\nexport class DaffCategoryDriverShopifyCategoryFactory extends DaffModelFactory<ShopifyCategory, typeof MockShopifyCategory> {\n constructor(\n shopifyProductNodeFactory: ShopifyProductNodeFactory,\n shopifyImageNodeFactory: ShopifyImageNodeFactory,\n ){\n super(MockShopifyCategory, shopifyProductNodeFactory, shopifyImageNodeFactory);\n }\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":["i1.ShopifyMoneyFactory","i1.ShopifyProductVariantsPriceRangeFactory","i2.ShopifyImageNodeFactory","i1.ShopifyProductNodeFactory","i2.ShopifyPageInfoFactory"],"mappings":";;;;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A,CAAA,SAAS,GAAG,KAAK,CAAC,IAAI,CAAC,IAAI,EAAE;IAK1B;AACJ;AAKK,MAAO,wCAAyC,SAAQ,gBAA6D,CAAA;IACzH,WAAA,CACE,yBAAoD,EACpD,uBAAgD,EAAA;AAEhD,QAAA,KAAK,CAAC,mBAAmB,EAAE,yBAAyB,EAAE,uBAAuB,CAAC;IAChF;+GANW,wCAAwC,EAAA,IAAA,EAAA,CAAA,EAAA,KAAA,EAAAD,yBAAA,EAAA,EAAA,EAAA,KAAA,EAAAD,uBAAA,EAAA,CAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,UAAA,EAAA,CAAA,CAAA;AAAxC,IAAA,SAAA,IAAA,CAAA,KAAA,GAAA,EAAA,CAAA,qBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,SAAA,EAAA,QAAA,EAAA,EAAA,EAAA,IAAA,EAAA,wCAAwC,cAFvC,MAAM,EAAA,CAAA,CAAA;;4FAEP,wCAAwC,EAAA,UAAA,EAAA,CAAA;kBAHpD,UAAU;AAAC,YAAA,IAAA,EAAA,CAAA;AACV,oBAAA,UAAU,EAAE,MAAM;AACnB,iBAAA;;;AC7CD;;AAEG;;;;"}
|
|
1
|
+
{"version":3,"file":"daffodil-driver-shopify-testing.mjs","sources":["../../../libs/driver/shopify/testing/src/factories/page-info.factory.ts","../../../libs/driver/shopify/testing/src/factories/image-node.factory.ts","../../../libs/driver/shopify/testing/src/factories/money.factory.ts","../../../libs/driver/shopify/testing/src/factories/product-variants-price-range.factory.ts","../../../libs/driver/shopify/testing/src/factories/product-node.factory.ts","../../../libs/driver/shopify/testing/src/factories/product-graph.factory.ts","../../../libs/driver/shopify/testing/src/factories/collection.factory.ts","../../../libs/driver/shopify/testing/src/daffodil-driver-shopify-testing.ts"],"sourcesContent":["import { Injectable } from '@angular/core';\nimport { faker } from '@faker-js/faker/locale/en_US';\n\nimport { DaffModelFactory } from '@daffodil/core/testing';\nimport { ShopifyPageInfo } from '@daffodil/driver/shopify';\n\nclass MockShopifyPageInfo implements ShopifyPageInfo {\n endCursor = faker.lorem.word();\n hasNextPage = faker.datatype.boolean();\n hasPreviousPage = faker.datatype.boolean();\n startCursor = faker.lorem.word();\n}\n\n@Injectable({\n providedIn: 'root',\n})\nexport class ShopifyPageInfoFactory extends DaffModelFactory<ShopifyPageInfo, typeof MockShopifyPageInfo> {\n constructor(){\n super(MockShopifyPageInfo);\n }\n}\n","import { Injectable } from '@angular/core';\nimport { faker } from '@faker-js/faker/locale/en_US';\n\nimport { DaffModelFactory } from '@daffodil/core/testing';\nimport { ShopifyImageNode } from '@daffodil/driver/shopify';\n\nclass MockShopifyImageNode implements ShopifyImageNode {\n id = '';\n url = faker.image.url();\n altText = faker.lorem.words(5);\n originalSrc = faker.image.url();\n src = faker.image.url();\n transformedSrc = faker.image.url();\n}\n\n@Injectable({\n providedIn: 'root',\n})\nexport class ShopifyImageNodeFactory extends DaffModelFactory<ShopifyImageNode, typeof MockShopifyImageNode> {\n constructor(){\n super(MockShopifyImageNode);\n }\n}\n","import { Injectable } from '@angular/core';\nimport { faker } from '@faker-js/faker/locale/en_US';\n\nimport { DaffModelFactory } from '@daffodil/core/testing';\nimport {\n ShopifyMoneyV2,\n ShopifyCurrencyCode,\n} from '@daffodil/driver/shopify';\n\nclass MockShopifyMoney implements ShopifyMoneyV2 {\n amount = parseFloat(faker.commerce.price());\n currencyCode = faker.helpers.objectValue(ShopifyCurrencyCode);\n}\n\n@Injectable({\n providedIn: 'root',\n})\nexport class ShopifyMoneyFactory extends DaffModelFactory<ShopifyMoneyV2, typeof MockShopifyMoney> {\n constructor(){\n super(MockShopifyMoney);\n }\n}\n","import { Injectable } from '@angular/core';\n\nimport { DaffModelFactory } from '@daffodil/core/testing';\nimport { ShopifyProductPriceRange } from '@daffodil/driver/shopify';\n\nimport { ShopifyMoneyFactory } from './money.factory';\n\nclass MockShopifyProductVariantsPriceRange implements ShopifyProductPriceRange {\n maxVariantPrice = this.shopifyMoneyFactory.create();\n minVariantPrice = this.shopifyMoneyFactory.create();\n constructor(\n protected shopifyMoneyFactory: ShopifyMoneyFactory,\n ) {}\n}\n\n@Injectable({\n providedIn: 'root',\n})\nexport class ShopifyProductVariantsPriceRangeFactory extends DaffModelFactory<ShopifyProductPriceRange, typeof MockShopifyProductVariantsPriceRange> {\n constructor(\n shopifyMoneyFactory: ShopifyMoneyFactory,\n ){\n super(MockShopifyProductVariantsPriceRange, shopifyMoneyFactory);\n }\n}\n","import { Injectable } from '@angular/core';\nimport { faker } from '@faker-js/faker/locale/en_US';\n\nimport { DaffModelFactory } from '@daffodil/core/testing';\nimport {\n ShopifyProductNode,\n shopifyHandleTransformer,\n shopifyIdTransformer,\n shopifyImageTransformer,\n} from '@daffodil/driver/shopify';\n\nimport { ShopifyImageNodeFactory } from './image-node.factory';\nimport { ShopifyProductVariantsPriceRangeFactory } from './product-variants-price-range.factory';\n\nclass MockShopifyProductNode implements ShopifyProductNode {\n availableForSale = faker.datatype.boolean();\n collections = null;\n compareAtPriceRange = this.shopifyProductVariantsPriceRangeFactory.create();\n createdAt = faker.date.past();\n description = faker.commerce.productDescription();\n descriptionHtml = faker.commerce.productDescription();\n handle = shopifyHandleTransformer(faker.commerce.productName());\n id = shopifyIdTransformer(`${faker.number.int({ min: 100000000000 })}`, 'Product');\n images = {\n edges: [],\n nodes: this.shopifyImageNodeFactory.createMany().map(node => (<any>shopifyImageTransformer(node, 'ProductImage'))),\n pageInfo: {\n hasNextPage: false,\n hasPreviousPage: false,\n },\n };\n isGiftCard = faker.datatype.boolean();\n media = null;\n metafields = [];\n onlineStoreUrl = faker.internet.domainName();\n options = [];\n priceRange = this.shopifyProductVariantsPriceRangeFactory.create();\n productType = faker.commerce.productMaterial();\n publishedAt = faker.date.past();\n requiresSellingPlan = faker.datatype.boolean();\n sellingPlanGroups = null;\n seo = {};\n tags = [];\n title = faker.commerce.productName();\n updatedAt = faker.date.past();\n variants = null;\n adjacentVariants = null;\n vendor = faker.company.name();\n\n constructor(\n protected shopifyProductVariantsPriceRangeFactory: ShopifyProductVariantsPriceRangeFactory,\n protected shopifyImageNodeFactory: ShopifyImageNodeFactory,\n ) {}\n}\n\n@Injectable({\n providedIn: 'root',\n})\nexport class ShopifyProductNodeFactory extends DaffModelFactory<ShopifyProductNode, typeof MockShopifyProductNode> {\n constructor(\n shopifyProductVariantsPriceRangeFactory: ShopifyProductVariantsPriceRangeFactory,\n shopifyImageNodeFactory: ShopifyImageNodeFactory,\n ) {\n super(MockShopifyProductNode, shopifyProductVariantsPriceRangeFactory, shopifyImageNodeFactory);\n }\n}\n","import { Injectable } from '@angular/core';\n\nimport { DaffModelFactory } from '@daffodil/core/testing';\nimport { ShopifyProductGraph } from '@daffodil/driver/shopify';\n\nimport { ShopifyPageInfoFactory } from './page-info.factory';\nimport { ShopifyProductNodeFactory } from './product-node.factory';\n\nclass MockShopifyProductGraph implements ShopifyProductGraph {\n nodes = this.shopifyProductNodeFactory.createMany();\n edges = [];\n filters = [];\n pageInfo = this.shopifyPageInfoFactory.create();\n\n constructor(\n protected shopifyProductNodeFactory: ShopifyProductNodeFactory,\n protected shopifyPageInfoFactory: ShopifyPageInfoFactory,\n ) {}\n}\n\n@Injectable({\n providedIn: 'root',\n})\nexport class ShopifyProductGraphFactory extends DaffModelFactory<ShopifyProductGraph, typeof MockShopifyProductGraph> {\n constructor(\n shopifyProductNodeFactory: ShopifyProductNodeFactory,\n shopifyPageInfoFactory: ShopifyPageInfoFactory,\n\n ){\n super(MockShopifyProductGraph, shopifyProductNodeFactory, shopifyPageInfoFactory);\n }\n}\n","import { Injectable } from '@angular/core';\nimport { faker } from '@faker-js/faker/locale/en_US';\n\nimport { DaffModelFactory } from '@daffodil/core/testing';\nimport {\n ShopifyCategory,\n shopifyHandleTransformer,\n shopifyIdTransformer,\n shopifyImageTransformer,\n} from '@daffodil/driver/shopify';\n\nimport { ShopifyImageNodeFactory } from './image-node.factory';\nimport { ShopifyProductNodeFactory } from './product-node.factory';\n\nclass MockShopifyCategory implements ShopifyCategory {\n title = faker.commerce.department();\n handle = shopifyHandleTransformer(faker.commerce.department());\n id = shopifyIdTransformer(`${faker.number.int({ min: 100000000000 })}`, 'Collection');\n description = faker.commerce.productDescription();\n descriptionHtml = faker.commerce.productDescription();\n onlineStoreUrl = faker.internet.domainName();\n image = <any>shopifyImageTransformer(this.shopifyImageNodeFactory.create(), 'CollectionImage');\n products = {\n edges: [],\n nodes: this.shopifyProductNodeFactory.createMany(),\n filters: [],\n pageInfo: {\n hasNextPage: false,\n hasPreviousPage: false,\n },\n };\n metafield = null;\n metafields = [];\n seo = {};\n trackingParameters = null;\n updatedAt = faker.date.past();\n\n constructor(\n protected shopifyProductNodeFactory: ShopifyProductNodeFactory,\n protected shopifyImageNodeFactory: ShopifyImageNodeFactory,\n ) {}\n}\n\n@Injectable({\n providedIn: 'root',\n})\nexport class DaffCategoryDriverShopifyCategoryFactory extends DaffModelFactory<ShopifyCategory, typeof MockShopifyCategory> {\n constructor(\n shopifyProductNodeFactory: ShopifyProductNodeFactory,\n shopifyImageNodeFactory: ShopifyImageNodeFactory,\n ){\n super(MockShopifyCategory, shopifyProductNodeFactory, shopifyImageNodeFactory);\n }\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":["i1.ShopifyMoneyFactory","i1.ShopifyProductVariantsPriceRangeFactory","i2.ShopifyImageNodeFactory","i1.ShopifyProductNodeFactory","i2.ShopifyPageInfoFactory"],"mappings":";;;;;;AAMA,MAAM,mBAAmB,CAAA;AAAzB,IAAA,WAAA,GAAA;AACE,QAAA,IAAA,CAAA,SAAS,GAAG,KAAK,CAAC,KAAK,CAAC,IAAI,EAAE;AAC9B,QAAA,IAAA,CAAA,WAAW,GAAG,KAAK,CAAC,QAAQ,CAAC,OAAO,EAAE;AACtC,QAAA,IAAA,CAAA,eAAe,GAAG,KAAK,CAAC,QAAQ,CAAC,OAAO,EAAE;AAC1C,QAAA,IAAA,CAAA,WAA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,EAAA,EAAA,KAAA,EAAAD,uBAAA,EAAA,CAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,UAAA,EAAA,CAAA,CAAA;AAAxC,IAAA,SAAA,IAAA,CAAA,KAAA,GAAA,EAAA,CAAA,qBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,QAAA,EAAA,QAAA,EAAA,EAAA,EAAA,IAAA,EAAA,wCAAwC,cAFvC,MAAM,EAAA,CAAA,CAAA;;2FAEP,wCAAwC,EAAA,UAAA,EAAA,CAAA;kBAHpD,UAAU;AAAC,YAAA,IAAA,EAAA,CAAA;AACV,oBAAA,UAAU,EAAE,MAAM;AACnB,iBAAA;;;AC7CD;;AAEG;;;;"}
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import { faker } from '@faker-js/faker/locale/en_US';
|
|
2
2
|
import { gql, provideNamedApollo } from 'apollo-angular';
|
|
3
3
|
import { inject, InjectionToken } from '@angular/core';
|
|
4
|
-
import { InMemoryCache,
|
|
5
|
-
import { setContext } from '@apollo/client/link/context';
|
|
6
|
-
import { onError } from '@apollo/client/link/error';
|
|
4
|
+
import { CombinedGraphQLErrors, InMemoryCache, ApolloLink } from '@apollo/client';
|
|
7
5
|
import { HttpHeaders } from '@angular/common/http';
|
|
6
|
+
import { SetContextLink } from '@apollo/client/link/context';
|
|
7
|
+
import { ErrorLink } from '@apollo/client/link/error';
|
|
8
8
|
import { HttpLink } from 'apollo-angular/http';
|
|
9
9
|
|
|
10
10
|
/** The set of valid sort keys for the Article query. */
|
|
@@ -2408,18 +2408,18 @@ const shopifyProductPriceRangeFragment = gql `
|
|
|
2408
2408
|
* @returns An ApolloLink instance that sets authentication headers.
|
|
2409
2409
|
*/
|
|
2410
2410
|
function createAuthLink(accessToken) {
|
|
2411
|
-
return
|
|
2411
|
+
return new SetContextLink(() => {
|
|
2412
2412
|
if (typeof accessToken === 'function') {
|
|
2413
2413
|
return {
|
|
2414
|
-
headers: {
|
|
2414
|
+
headers: new HttpHeaders({
|
|
2415
2415
|
'X-Shopify-Storefront-Access-Token': accessToken(),
|
|
2416
|
-
},
|
|
2416
|
+
}),
|
|
2417
2417
|
};
|
|
2418
2418
|
}
|
|
2419
2419
|
return {
|
|
2420
|
-
headers: {
|
|
2420
|
+
headers: new HttpHeaders({
|
|
2421
2421
|
'X-Shopify-Storefront-Access-Token': accessToken,
|
|
2422
|
-
},
|
|
2422
|
+
}),
|
|
2423
2423
|
};
|
|
2424
2424
|
});
|
|
2425
2425
|
}
|
|
@@ -2430,14 +2430,12 @@ function createAuthLink(accessToken) {
|
|
|
2430
2430
|
* @returns An ApolloLink instance that logs errors to the console.
|
|
2431
2431
|
*/
|
|
2432
2432
|
function createErrorLink() {
|
|
2433
|
-
return
|
|
2434
|
-
if (
|
|
2435
|
-
|
|
2436
|
-
console.error(`[GraphQL error]: Message: ${message}, Location: ${locations}, Path: ${path}`);
|
|
2437
|
-
});
|
|
2433
|
+
return new ErrorLink(({ error }) => {
|
|
2434
|
+
if (CombinedGraphQLErrors.is(error)) {
|
|
2435
|
+
error.errors.map(({ message, locations, path }) => console.error(`[GraphQL error]: Message: ${message}, Location: ${locations}, Path: ${path}`));
|
|
2438
2436
|
}
|
|
2439
|
-
|
|
2440
|
-
console.error(`[Network error]: ${
|
|
2437
|
+
else {
|
|
2438
|
+
console.error(`[Network error]: ${error.message}`);
|
|
2441
2439
|
}
|
|
2442
2440
|
});
|
|
2443
2441
|
}
|
|
@@ -2473,7 +2471,7 @@ const provideShopifyDriver = (config) => provideNamedApollo(() => {
|
|
|
2473
2471
|
const resolvedConfig = config instanceof InjectionToken ? inject(config) : config;
|
|
2474
2472
|
return {
|
|
2475
2473
|
[APOLLO_CLIENT_NAME]: {
|
|
2476
|
-
link: from([
|
|
2474
|
+
link: ApolloLink.from([
|
|
2477
2475
|
createErrorLink(),
|
|
2478
2476
|
createAuthLink(resolvedConfig.accessToken),
|
|
2479
2477
|
createHttpLink(resolvedConfig.domain),
|