@daffodil/driver 0.94.1 → 0.95.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/fesm2022/daffodil-driver-hubspot-testing.mjs +53 -38
- package/fesm2022/daffodil-driver-hubspot-testing.mjs.map +1 -1
- package/fesm2022/daffodil-driver-hubspot.mjs +41 -60
- package/fesm2022/daffodil-driver-hubspot.mjs.map +1 -1
- package/fesm2022/daffodil-driver-in-memory.mjs +186 -258
- package/fesm2022/daffodil-driver-in-memory.mjs.map +1 -1
- package/fesm2022/daffodil-driver-magento-2.4.7-testing.mjs +139 -0
- package/fesm2022/daffodil-driver-magento-2.4.7-testing.mjs.map +1 -0
- package/fesm2022/daffodil-driver-magento-2.4.7.mjs +543 -0
- package/fesm2022/daffodil-driver-magento-2.4.7.mjs.map +1 -0
- package/fesm2022/daffodil-driver-magento-auto-testing.mjs +7 -0
- package/fesm2022/daffodil-driver-magento-auto-testing.mjs.map +1 -0
- package/fesm2022/daffodil-driver-magento-auto.mjs +7 -0
- package/fesm2022/daffodil-driver-magento-auto.mjs.map +1 -0
- package/fesm2022/daffodil-driver-shopify-testing.mjs +359 -216
- package/fesm2022/daffodil-driver-shopify-testing.mjs.map +1 -1
- package/fesm2022/daffodil-driver-shopify.mjs +1090 -2289
- package/fesm2022/daffodil-driver-shopify.mjs.map +1 -1
- package/fesm2022/daffodil-driver.mjs +55 -54
- package/fesm2022/daffodil-driver.mjs.map +1 -1
- package/package.json +1 -1
- package/types/daffodil-driver-hubspot-testing.d.ts +12 -15
- package/types/daffodil-driver-hubspot.d.ts +44 -52
- package/types/daffodil-driver-in-memory.d.ts +104 -121
- package/types/daffodil-driver-magento-2.4.7-testing.d.ts +18 -0
- package/types/daffodil-driver-magento-2.4.7.d.ts +189 -0
- package/types/daffodil-driver-magento-auto-testing.d.ts +1 -0
- package/types/daffodil-driver-magento-auto.d.ts +1 -0
- package/types/daffodil-driver-shopify-testing.d.ts +112 -121
- package/types/daffodil-driver-shopify.d.ts +6902 -6943
- package/types/daffodil-driver.d.ts +32 -42
- package/fesm2022/daffodil-driver-magento-testing.mjs +0 -79
- package/fesm2022/daffodil-driver-magento-testing.mjs.map +0 -1
- package/fesm2022/daffodil-driver-magento.mjs +0 -998
- package/fesm2022/daffodil-driver-magento.mjs.map +0 -1
- package/types/daffodil-driver-magento-testing.d.ts +0 -23
- package/types/daffodil-driver-magento.d.ts +0 -225
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"daffodil-driver-magento.mjs","sources":["../../../libs/driver/magento/src/schema/schema.ts","../../../libs/driver/magento/src/apollo/type-policies.ts","../../../libs/driver/magento/src/features/kind.enum.ts","../../../libs/driver/magento/src/features/make-feature.ts","../../../libs/driver/magento/src/features/apollo-options.ts","../../../libs/driver/magento/src/graphql/cacheable-operations/cacheable-operations-token.ts","../../../libs/driver/magento/src/graphql/cacheable-operations/apollo-cacheable-operations-link-generator.ts","../../../libs/driver/magento/src/graphql/type-policies.ts","../../../libs/driver/magento/src/graphql/cache.service.ts","../../../libs/driver/magento/src/graphql/cache-header/cache-header-apollo-link.ts","../../../libs/driver/magento/src/features/cacheable-operations.ts","../../../libs/driver/magento/src/features/error-handler.ts","../../../libs/driver/magento/src/features/transfer-state.ts","../../../libs/driver/magento/src/provider.ts","../../../libs/driver/magento/src/errors/error.class.ts","../../../libs/driver/magento/src/errors/transform-graphql.ts","../../../libs/driver/magento/src/errors/transform.ts","../../../libs/driver/magento/src/models/sort.enum.ts","../../../libs/driver/magento/src/transforms/responses/page-info.ts","../../../libs/driver/magento/src/transforms/responses/sort-direction.ts","../../../libs/driver/magento/src/transforms/requests/sort-direction.ts","../../../libs/driver/magento/src/fragments/page-info.ts","../../../libs/driver/magento/src/fragments/money.ts","../../../libs/driver/magento/src/daffodil-driver-magento.ts"],"sourcesContent":["import introspectionQueryResultData from './introspection.json';\n\nexport const MAGENTO_POSSIBLE_TYPES = introspectionQueryResultData;\n","/**\n * Custom type policies that allow us to have more granular control\n * over how ApolloClient reads from and writes to the cache.\n *\n * https://www.apollographql.com/docs/react/caching/cache-configuration/#typepolicy-fields\n * https://www.apollographql.com/docs/react/caching/cache-field-behavior/\n */\n\nimport { TypePolicies } from '@apollo/client/cache';\n\nconst typePolicies: TypePolicies = {\n // Query/Mutation are \"types\" just like \"Cart\".\n Query: {\n fields: {\n cart: {\n // Replaces @connection(key: \"Cart\")\n keyArgs: () => 'Cart',\n },\n customer: {\n keyArgs: () => 'Customer',\n },\n customerCart: {\n keyArgs: () => 'Cart',\n },\n customerWishlistProducts: {\n read: existing => existing || [],\n },\n },\n },\n AppliedGiftCard: {\n keyFields: ['code'],\n },\n AvailablePaymentMethod: {\n keyFields: ['code'],\n },\n AvailableShippingMethod: {\n // The combination of these fields makes an instance of\n // AvailableShippingMethod unique.\n keyFields: ['carrier_code', 'method_code'],\n },\n Breadcrumb: {\n // Uses provided fields on the object as the `uid`.\n keyFields: ['category_uid'],\n },\n Cart: {\n keyFields: () => 'Cart',\n fields: {\n applied_gift_cards: {\n\n merge(existing, incoming) {\n return incoming;\n },\n },\n available_payment_methods: {\n\n merge(existing, incoming) {\n return incoming;\n },\n },\n items: {\n\n merge(existing, incoming) {\n return incoming;\n },\n },\n prices: {\n // `merge: true` can be used for an object field.\n merge: true,\n },\n shipping_addresses: {\n merge(existing = [], incoming, { readField, mergeObjects }) {\n // street makes these things unique\n const mergeResult = new Set();\n const streetToIndex = new Map();\n\n existing.forEach((existingShippingAddress, index) => {\n // Use readField instead of existingShippingAddress.street directly because it will follow cache references.\n const street = readField(\n 'street',\n existingShippingAddress,\n );\n streetToIndex.set(street, index);\n });\n\n incoming.forEach(incomingShippingAddress => {\n const street = readField(\n 'street',\n incomingShippingAddress,\n );\n\n if (streetToIndex.has(street)) {\n const targetIndex = streetToIndex.get(street);\n const existingShippingAddress =\n existing[targetIndex];\n const merged = mergeObjects(\n existingShippingAddress,\n incomingShippingAddress,\n );\n mergeResult.add(merged);\n } else {\n // We do not have an address with this street yet, add it on to the end.\n streetToIndex.set(street, streetToIndex.size);\n mergeResult.add(incomingShippingAddress);\n }\n });\n\n return Array.from(mergeResult);\n },\n },\n },\n },\n Customer: {\n keyFields: () => 'Customer',\n merge: true,\n fields: {\n addresses: {\n merge(existing, incoming) {\n return incoming;\n },\n read(cachedAddresses, { toReference }) {\n if (cachedAddresses) {\n return cachedAddresses.map(address => {\n // Update v2 identifiers to new references. Previous\n // entries had `id: CustomerAddress:1` which caused\n // v3's lookup to fail. If we find a legacy id,\n // point it at the object using a reference.\n if (\n address.id &&\n address.id.includes('CustomerAddress')\n ) {\n return toReference(address.id);\n } else {\n return address;\n }\n });\n }\n // If there are no cached addresses that's fine - the schema\n // shows that it is a nullable field.\n },\n },\n orders: {\n keyArgs: ['filter'],\n },\n },\n },\n CustomerAddress: {\n fields: {\n street: {\n\n merge(existing, incoming) {\n return incoming;\n },\n },\n },\n },\n CustomerPaymentTokens: {\n keyFields: () => 'CustomerPaymentTokens',\n fields: {\n items: {\n\n merge(existing, incoming) {\n return incoming;\n },\n },\n },\n },\n Currency: {\n merge: true,\n },\n ProductImage: {\n keyFields: ['url'],\n },\n ConfigurableProductOptions: {\n keyFields: ['uid'],\n },\n SelectedConfigurableOption: {\n // id alone is not enough to identify a selected option as it can refer\n // to something like \"size\" where value_id refers to \"large\".\n // TODO: Use configurable_product_option_uid for ConfigurableWishlistItem when available in 2.4.5\n keyFields: fields => fields.configurable_product_option_uid\n ? [\n 'configurable_product_option_uid',\n 'configurable_product_option_value_uid',\n ]\n : ['id', 'value_id'],\n },\n SelectedPaymentMethod: {\n keyFields: ['code'],\n },\n ShippingCartAddress: {\n keyFields: ['street'],\n fields: {\n available_shipping_methods: {\n merge(existing = [], incoming, { readField, mergeObjects }) {\n // carrier_code + method_code makes these things unique\n const mergeResult = new Set();\n const carrierToIndex = new Map();\n\n existing.forEach((existingShippingMethod, index) => {\n // Use readField because it will follow cache references.\n const carrierCode = readField(\n 'carrier_code',\n existingShippingMethod,\n );\n const methodCode = readField(\n 'method_code',\n existingShippingMethod,\n );\n const carrierKey = `${carrierCode}|${methodCode}`;\n carrierToIndex.set(carrierKey, index);\n });\n\n incoming.forEach(incomingShippingMethod => {\n // Use readField because it will follow cache references.\n const carrierCode = readField(\n 'carrier_code',\n incomingShippingMethod,\n );\n const methodCode = readField(\n 'method_code',\n incomingShippingMethod,\n );\n const carrierKey = `${carrierCode}|${methodCode}`;\n if (carrierToIndex.has(carrierKey)) {\n const targetIndex = carrierToIndex.get(carrierKey);\n const existingShippingMethod =\n existing[targetIndex];\n const merged = mergeObjects(\n existingShippingMethod,\n incomingShippingMethod,\n );\n mergeResult.add(merged);\n } else {\n // We do not have a method with this key yet, add it on to the end.\n carrierToIndex.set(carrierKey, carrierToIndex.size);\n mergeResult.add(incomingShippingMethod);\n }\n });\n\n return Array.from(mergeResult);\n },\n },\n country: {\n merge: true,\n },\n region: {\n merge: true,\n },\n selected_shipping_method: {\n merge: true,\n },\n },\n },\n CategoryTree: {\n keyFields: ['uid'],\n fields: {\n children: {\n merge(existing, incoming) {\n return incoming;\n },\n },\n },\n },\n Wishlist: {\n keyFields: ({ id }) => `CustomerWishlist:${id}`,\n fields: {\n items_v2: {\n keyArgs: false,\n merge: false,\n },\n },\n },\n WishlistItem: {\n keyFields: ({ id }) => `CustomerWishlistItem:${id}`,\n },\n WishlistItems: {\n fields: {\n items: {\n merge: (existing = [], incoming, { variables }) => {\n if (variables) {\n const { currentPage = 1 } = variables;\n // reset cache collection if we're on the first page\n\n if (currentPage === 1) {\n return incoming;\n }\n }\n\n return [...existing, ...incoming];\n },\n },\n },\n },\n SimpleWishlistItem: {\n keyFields: ({ id }) => `CustomerSimpleWishlistItem:${id}`,\n },\n VirtualWishlistItem: {\n keyFields: ({ id }) => `CustomerVirtualWishlistItem:${id}`,\n },\n DownloadableWishlistItem: {\n keyFields: ({ id }) => `CustomerDownloadableWishlistItem:${id}`,\n },\n BundleWishlistItem: {\n keyFields: ({ id }) => `CustomerBundleWishlistItem:${id}`,\n },\n GroupedProductWishlistItem: {\n keyFields: ({ id }) => `CustomerGroupedProductWishlistItem:${id}`,\n },\n ConfigurableWishlistItem: {\n keyFields: ({ id }) => `CustomerConfigurableWishlistItem:${id}`,\n },\n GiftCardWishlistItem: {\n keyFields: ({ id }) => `CustomerGiftCardWishlistItem:${id}`,\n },\n SimpleProduct: {\n keyFields: ['uid'],\n },\n ConfigurableProduct: {\n keyFields: ['uid'],\n },\n BundleProduct: {\n keyFields: ['uid'],\n },\n GroupedProduct: {\n keyFields: ['uid'],\n },\n VirtualProduct: {\n keyFields: ['uid'],\n },\n CartItemInterface: {\n keyFields: ['uid'],\n },\n StoreConfig: {\n keyFields: ['store_code'],\n },\n};\n\nexport default typePolicies;\n","/**\n * A non-exhaustive list of feature kinds that exist for {@link provideMagentoDriver}.\n */\nexport enum MagentoDriverFeatureKind {\n CacheableOperations = 'DaffMagentoDriverCacheableOperationsFeature',\n CacheHeader = 'DaffMagentoDriverCacheHeaderFeature',\n ErrorHandler = 'DaffMagentoDriverErrorHandlerFeature',\n TransferState = 'DaffMagentoDriverTransferStateFeature',\n ExtraApolloOptions = 'DaffMagentoDriverExtraApolloOptionsFeature',\n}\n","import {\n Provider,\n EnvironmentProviders,\n} from '@angular/core';\n\nimport { MagentoDriverFeatureKind } from './kind.enum';\nimport { MagentoDriverFeature } from './type';\n\n/**\n * Creates a magento driver feature for {@link provideMagentoDriver}.\n */\nexport function makeMagentoDriverFeature(\n kind: MagentoDriverFeatureKind | string,\n providers: Array<Provider | EnvironmentProviders>,\n): MagentoDriverFeature {\n return { ɵkind: kind, ɵproviders: providers };\n}\n","import type { ApolloClient } from '@apollo/client';\n\nimport { createSingleInjectionToken } from '@daffodil/core';\n\nimport { MagentoDriverFeatureKind } from './kind.enum';\nimport { makeMagentoDriverFeature } from './make-feature';\nimport { MagentoDriverFeature } from './type';\n\n/**\n * Apollo client options except link and cache, creation of which is done by {@link provideMagentoDriver}.\n */\nexport type DaffDriverMagentoExtraApolloOptions = Omit<ApolloClient.Options, 'link' | 'cache'>;\n\nexport const {\n /**\n * A token to hold {@link DaffDriverMagentoExtraApolloOptions}.\n */\n token: DAFF_DRIVER_MAGENTO_EXTRA_APOLLO_OPTIONS,\n /**\n * A provider for {@link DAFF_DRIVER_MAGENTO_EXTRA_APOLLO_OPTIONS}.\n */\n provider: provideDaffDriverMagentoExtraApolloOptions,\n /**\n * A factory provider for {@link DAFF_DRIVER_MAGENTO_EXTRA_APOLLO_OPTIONS}.\n */\n factoryProvider: provideDaffDriverMagentoExtraApolloOptionsFactory,\n} = createSingleInjectionToken<DaffDriverMagentoExtraApolloOptions>('DAFF_DRIVER_MAGENTO_EXTRA_APOLLO_OPTIONS', {\n factory: () => ({}),\n});\n\n/**\n * A {@link provideMagentoDriver} feature that allow specifying {@link DaffDriverMagentoExtraApolloOptions}.\n */\nexport const withDaffDriverMagentoExtraApolloOptions = (options: DaffDriverMagentoExtraApolloOptions): MagentoDriverFeature => makeMagentoDriverFeature(MagentoDriverFeatureKind.TransferState, [\n provideDaffDriverMagentoExtraApolloOptions(options),\n]);\n","import { createMultiInjectionToken } from '@daffodil/core';\n\nexport const {\n /**\n * A multi-provider injection token of the operation names of magento queries that should\n * be cached. This is needed because queries need to be converted into GET queries in order for Magento\n * to cache them. This token should be used by daffodil driver platform modules to register operation names that are cacheable, and is\n * intended for internal daffodil use only.\n */\n token: DAFF_MAGENTO_CACHEABLE_OPERATIONS,\n /**\n * Adds many operation names to the list of cacheable Magento operations. Use only with Angular 9+.\n */\n provider: provideManyDaffMagentoCacheableOperations,\n} = createMultiInjectionToken<string>('DAFF_MAGENTO_CACHEABLE_OPERATIONS');\n\n/**\n * Adds an operation name to the list of cacheable Magento operations. Use only with Angular 9+.\n */\nexport function provideDaffMagentoCacheableOperation(operationName: string) {\n return {\n provide: DAFF_MAGENTO_CACHEABLE_OPERATIONS,\n useValue: operationName,\n multi: true,\n };\n}\n","import {\n inject,\n makeEnvironmentProviders,\n} from '@angular/core';\n\nimport { provideDaffApolloRequestHandlerFactories } from '@daffodil/core/graphql';\n\nimport { DAFF_MAGENTO_CACHEABLE_OPERATIONS } from './cacheable-operations-token';\n\n/**\n * A request handler provider that will convert cacheable apollo operations into a format that Magento will understand as cacheable.\n */\nexport const provideDaffMagentoApolloCacheableOperations = () => makeEnvironmentProviders([\n provideDaffApolloRequestHandlerFactories(() => {\n const cacheableOperations = inject(DAFF_MAGENTO_CACHEABLE_OPERATIONS);\n return (operation, forward) => {\n if (cacheableOperations.indexOf(operation.operationName) > -1) {\n operation.setContext({ method: 'GET' });\n }\n return forward(operation);\n };\n }),\n]);\n","import { TypePolicies } from '@apollo/client';\n\n/**\n * Custom type policies that allow us to have more granular control\n * over how ApolloClient reads from and writes to the cache.\n *\n * This is applicable to Magento 2.4.3 and up.\n * Heavily based on https://github.com/magento/pwa-studio/blob/99270701b2b607551f2e5881af272ed48ba7064c/packages/peregrine/lib/Apollo/policies/index.js.\n *\n * https://www.apollographql.com/docs/react/caching/cache-configuration/#typepolicy-fields\n * https://www.apollographql.com/docs/react/caching/cache-field-behavior/\n */\nexport const DAFF_MAGENTO_2_4_3_TYPE_POLICIES: TypePolicies = {\n Query: {\n fields: {\n cart: {\n // Replaces @connection(key: \"Cart\")\n keyArgs: () => 'Cart',\n },\n customer: {\n keyArgs: () => 'Customer',\n },\n customerCart: {\n keyArgs: () => 'Cart',\n },\n },\n },\n AppliedGiftCard: {\n keyFields: ['code'],\n },\n AvailablePaymentMethod: {\n keyFields: ['code'],\n },\n AvailableShippingMethod: {\n // The combination of these fields makes an instance of\n // AvailableShippingMethod unique.\n keyFields: ['carrier_code', 'method_code'],\n },\n Breadcrumb: {\n // Uses provided fields on the object as the `id`.\n keyFields: ['category_uid'],\n },\n Cart: {\n keyFields: () => 'Cart',\n fields: {\n applied_gift_cards: {\n merge: (existing, incoming) => incoming,\n },\n available_payment_methods: {\n merge: (existing, incoming) => incoming,\n },\n items: {\n merge: (existing, incoming) => incoming,\n },\n prices: {\n // `merge: true` can be used for an object field.\n merge: true,\n },\n shipping_addresses: {\n merge:(existing = [], incoming, { readField, mergeObjects }) => {\n // street makes these things unique\n const mergeResult = new Set();\n const streetToIndex = new Map();\n\n existing.forEach((existingShippingAddress, index) => {\n // Use readField instead of existingShippingAddress.street directly because it will follow cache references.\n const street = readField(\n 'street',\n existingShippingAddress,\n );\n streetToIndex.set(street, index);\n });\n\n incoming.forEach(incomingShippingAddress => {\n const street = readField(\n 'street',\n incomingShippingAddress,\n );\n\n if (streetToIndex.has(street)) {\n const targetIndex = streetToIndex.get(street);\n const existingShippingAddress = existing[targetIndex];\n const merged = mergeObjects(\n existingShippingAddress,\n incomingShippingAddress,\n );\n mergeResult.add(merged);\n } else {\n // We do not have an address with this street yet, add it on to the end.\n streetToIndex.set(street, streetToIndex.size);\n mergeResult.add(incomingShippingAddress);\n }\n });\n\n return Array.from(mergeResult);\n },\n },\n },\n },\n Customer: {\n keyFields: () => 'Customer',\n fields: {\n addresses: {\n merge: (existing, incoming) => incoming,\n read: (cachedAddresses, { toReference }) => {\n if (cachedAddresses) {\n return cachedAddresses.map(address => {\n // Update v2 identifiers to new references. Previous\n // entries had `id: CustomerAddress:1` which caused\n // v3's lookup to fail. If we find a legacy id,\n // point it at the object using a reference.\n if (address.id?.includes('CustomerAddress')) {\n return toReference(address.id);\n } else {\n return address;\n }\n });\n }\n // If there are no cached addresses that's fine - the schema\n // shows that it is a nullable field.\n },\n },\n orders: {\n keyArgs: ['filter'],\n // TODO: write merge function that handles pagination\n // items: {\n // merge: true,\n // },\n },\n },\n },\n CustomerAddress: {\n fields: {\n street: {\n merge: (existing, incoming) => incoming,\n },\n },\n },\n CustomerPaymentTokens: {\n keyFields: () => 'CustomerPaymentTokens',\n fields: {\n items: {\n merge: (existing, incoming) => incoming,\n },\n },\n },\n ProductImage: {\n keyFields: ['url'],\n },\n SelectedConfigurableOption: {\n // id alone is not enough to identify a selected option as it can refer\n // to something like \"size\" where value_id refers to \"large\".\n keyFields: ['id', 'value_id'],\n },\n SelectedPaymentMethod: {\n keyFields: ['code'],\n },\n ShippingCartAddress: {\n keyFields: ['street'],\n fields: {\n available_shipping_methods: {\n merge: (existing = [], incoming, { readField, mergeObjects }) => {\n // carrier_code + method_code makes these things unique\n const mergeResult = new Set();\n const carrierToIndex = new Map();\n\n existing.forEach((existingShippingMethod, index) => {\n // Use readField because it will follow cache references.\n const carrierCode = readField(\n 'carrier_code',\n existingShippingMethod,\n );\n const methodCode = readField(\n 'method_code',\n existingShippingMethod,\n );\n const carrierKey = `${carrierCode}|${methodCode}`;\n carrierToIndex.set(carrierKey, index);\n });\n\n incoming.forEach(incomingShippingMethod => {\n // Use readField because it will follow cache references.\n const carrierCode = readField(\n 'carrier_code',\n incomingShippingMethod,\n );\n const methodCode = readField(\n 'method_code',\n incomingShippingMethod,\n );\n const carrierKey = `${carrierCode}|${methodCode}`;\n if (carrierToIndex.has(carrierKey)) {\n const targetIndex = carrierToIndex.get(carrierKey);\n const existingShippingMethod = existing[targetIndex];\n const merged = mergeObjects(\n existingShippingMethod,\n incomingShippingMethod,\n );\n mergeResult.add(merged);\n } else {\n // We do not have a method with this key yet, add it on to the end.\n carrierToIndex.set(carrierKey, carrierToIndex.size);\n mergeResult.add(incomingShippingMethod);\n }\n });\n\n return Array.from(mergeResult);\n },\n },\n country: {\n merge: true,\n },\n region: {\n merge: true,\n },\n selected_shipping_method: {\n merge: true,\n },\n },\n },\n CategoryTree: {\n fields: {\n children: {\n merge: (existing, incoming) => incoming,\n },\n },\n },\n Wishlist: {\n keyFields: ({ id }) => `CustomerWishlist:${id}`,\n },\n WishlistItem: {\n keyFields: ({ id }) => `CustomerWishlistItem:${id}`,\n },\n SimpleWishlistItem: {\n keyFields: ({ id }) => `CustomerSimpleWishlistItem:${id}`,\n },\n VirtualWishlistItem: {\n keyFields: ({ id }) => `CustomerVirtualWishlistItem:${id}`,\n },\n DownloadableWishlistItem: {\n keyFields: ({ id }) => `CustomerDownloadableWishlistItem:${id}`,\n },\n BundleWishlistItem: {\n keyFields: ({ id }) => `CustomerBundleWishlistItem:${id}`,\n },\n GroupedProductWishlistItem: {\n keyFields: ({ id }) => `CustomerGroupedProductWishlistItem:${id}`,\n },\n ConfigurableWishlistItem: {\n keyFields: ({ id }) => `CustomerConfigurableWishlistItem:${id}`,\n },\n GiftCardWishlistItem: {\n keyFields: ({ id }) => `CustomerGiftCardWishlistItem:${id}`,\n },\n};\n","import { isPlatformBrowser } from '@angular/common';\nimport {\n Inject,\n Injectable,\n PLATFORM_ID,\n} from '@angular/core';\n\nimport { DaffDriverHttpClientCacheServiceInterface } from '@daffodil/driver';\n\n/**\n * Interacts with the Apollo client.\n *\n * @inheritdoc\n */\n@Injectable({\n providedIn: 'root',\n})\nexport class DaffDriverHttpClientCacheMagentoService implements DaffDriverHttpClientCacheServiceInterface {\n constructor(\n @Inject(PLATFORM_ID) private platformId: string,\n ) {}\n\n reset(): void {\n if (isPlatformBrowser(this.platformId)) {\n location.reload();\n }\n }\n}\n","import { makeEnvironmentProviders } from '@angular/core';\nimport { map } from 'rxjs';\n\nimport {\n getApolloOperationHeaders,\n provideDaffApolloRequestHandlerFactories,\n} from '@daffodil/core/graphql';\n\nexport const MAGENTO_CUSTOMER_CACHE_ID_HEADER = 'X-Magento-Cache-Id';\n\n/**\n * Stores and sets the Magento cache ID header.\n * This will set the `X-Magento-Cache-Id` header from the most recent value encountered\n * on a response, if there was a response with that header set.\n */\nexport const provideDaffMagentoCacheHeader = () => makeEnvironmentProviders([\n provideDaffApolloRequestHandlerFactories(() => {\n let cacheHeader: string | undefined;\n return (operation, forward) => {\n if (cacheHeader) {\n operation.setContext({\n headers: getApolloOperationHeaders(operation).append(MAGENTO_CUSTOMER_CACHE_ID_HEADER, cacheHeader),\n });\n }\n return forward(operation).pipe(\n map((response) => {\n const { headers } = operation.getContext().response;\n if (headers.get(MAGENTO_CUSTOMER_CACHE_ID_HEADER)) {\n cacheHeader = headers.get(MAGENTO_CUSTOMER_CACHE_ID_HEADER);\n }\n return response;\n }),\n );\n };\n }),\n]);\n","import { makeEnvironmentProviders } from '@angular/core';\n\nimport { MagentoDriverFeatureKind } from './kind.enum';\nimport { makeMagentoDriverFeature } from './make-feature';\nimport { MagentoDriverFeature } from './type';\nimport {\n provideDaffMagentoApolloCacheableOperations,\n provideManyDaffMagentoCacheableOperations,\n} from '../graphql/public_api';\n\n/**\n * A {@link provideMagentoDriver} feature that sets up {@link provideDaffMagentoApolloCacheableOperations}.\n */\nexport const withOperationCache = (...extraOperations: Array<string>): MagentoDriverFeature => makeMagentoDriverFeature(MagentoDriverFeatureKind.CacheableOperations, [\n provideDaffMagentoApolloCacheableOperations(),\n makeEnvironmentProviders(provideManyDaffMagentoCacheableOperations(...extraOperations)),\n]);\n","import { CombinedGraphQLErrors } from '@apollo/client';\nimport type { ErrorLink } from '@apollo/client/link/error';\n\nimport { createSingleInjectionToken } from '@daffodil/core';\n\nimport { MagentoDriverFeatureKind } from './kind.enum';\nimport { makeMagentoDriverFeature } from './make-feature';\nimport { MagentoDriverFeature } from './type';\n\nexport const {\n /**\n * Holds the error handler for {@link provideMagentoDriver}.\n */\n token: DAFF_DRIVER_MAGENTO_ERROR_HANDLER,\n /**\n * Provider function for {@link DAFF_DRIVER_MAGENTO_ERROR_HANDLER}.\n */\n provider: provideDaffDriverMagentoErrorHandler,\n} = createSingleInjectionToken<ErrorLink.ErrorHandler>('DAFF_DRIVER_MAGENTO_ERROR_HANDLER', {\n factory: () => ({ error }) => {\n if (CombinedGraphQLErrors.is(error)) {\n error.errors.map(({ message, locations, path }) =>\n console.error(\n `[GraphQL error]: Message: ${message}, Location: ${locations}, Path: ${path}`,\n ),\n );\n } else {\n console.error(`[Network error]: ${error.message}`);\n }\n },\n});\n\n/**\n * A {@link provideMagentoDriver} feature that specifies the error handler.\n */\nexport const withDaffDriverMagentoErrorHandler = (handler: ErrorLink.ErrorHandler): MagentoDriverFeature => makeMagentoDriverFeature(MagentoDriverFeatureKind.ErrorHandler, [\n provideDaffDriverMagentoErrorHandler(handler),\n]);\n","import {\n inject,\n makeEnvironmentProviders,\n provideAppInitializer,\n TransferState,\n type EnvironmentProviders,\n type StateKey,\n} from '@angular/core';\nimport { NormalizedCacheObject } from '@apollo/client/cache';\nimport { Apollo } from 'apollo-angular';\n\nimport { createSingleInjectionToken } from '@daffodil/core';\n\nimport { MagentoDriverFeatureKind } from './kind.enum';\nimport { makeMagentoDriverFeature } from './make-feature';\nimport { MagentoDriverFeature } from './type';\n\nexport const {\n /**\n * Holds the `StateKey` with which {@link provideMagentoDriver} can use to transfer Apollo state from the server to the client.\n */\n token: DAFF_DRIVER_MAGENTO_TRANSFER_STATE_KEY,\n /**\n * Provider for {@link DAFF_DRIVER_MAGENTO_TRANSFER_STATE_KEY}.\n */\n provider: provideDaffDriverMagentoTransferStateKey,\n} = createSingleInjectionToken<StateKey<any>>('DAFF_DRIVER_MAGENTO_TRANSFER_STATE_KEY');\n\n/**\n * A {@link provideMagentoDriver} feature that sets up transfer state with the specified key.\n *\n * @param stateKey The key under which the Apollo state is stored.\n */\nexport const withDaffDriverMagentoTransferState = <T extends StateKey<any> = StateKey<any>>(stateKey: T): MagentoDriverFeature => makeMagentoDriverFeature(MagentoDriverFeatureKind.TransferState, [\n provideDaffDriverMagentoTransferStateKey(stateKey),\n]);\n\n/**\n * Holds the logic for hydrating the Apollo cache with the server's transferred state.\n * It is recommended to use {@link withDaffDriverMagentoTransferState} with {@link provideMagentoDriver}\n * to provide this functionality automatically.\n */\nexport const provideDaffDriverMagentoTransferState = (): EnvironmentProviders => makeEnvironmentProviders([\n provideAppInitializer(() => {\n const cache = inject(Apollo).client.cache;\n const transferState = inject(TransferState);\n const stateKey = inject(DAFF_DRIVER_MAGENTO_TRANSFER_STATE_KEY);\n const hasStateKey = transferState.hasKey(stateKey);\n if (hasStateKey) {\n const state = transferState.get<NormalizedCacheObject>(\n stateKey,\n null,\n );\n cache.restore(state);\n } else {\n transferState.onSerialize(stateKey, () => cache.extract());\n }\n }),\n]);\n","import {\n EnvironmentProviders,\n inject,\n InjectionToken,\n makeEnvironmentProviders,\n} from '@angular/core';\nimport {\n ApolloLink,\n InMemoryCache,\n PossibleTypesMap,\n TypePolicies,\n} from '@apollo/client/core';\nimport { ErrorLink } from '@apollo/client/link/error';\nimport { provideApollo } from 'apollo-angular';\nimport { HttpLink } from 'apollo-angular/http';\n\nimport { DAFF_APOLLO_REQUEST_HANDLERS } from '@daffodil/core/graphql';\nimport { provideDaffDriverHttpClientCacheService } from '@daffodil/driver';\n\nimport typePolicies from './apollo/type-policies';\nimport {\n DAFF_DRIVER_MAGENTO_ERROR_HANDLER,\n DAFF_DRIVER_MAGENTO_EXTRA_APOLLO_OPTIONS,\n MagentoDriverFeatureKind,\n MagentoDriverFeature,\n provideDaffDriverMagentoTransferState,\n} from './features/public_api';\nimport { DaffDriverHttpClientCacheMagentoService } from './graphql/cache.service';\nimport {\n provideDaffMagentoApolloCacheableOperations,\n provideDaffMagentoCacheHeader,\n} from './graphql/public_api';\nimport { MAGENTO_POSSIBLE_TYPES } from './schema/schema';\n\nexport interface DaffMagentoDriverConfig extends HttpLink.Options {\n possibleTypes?: PossibleTypesMap;\n typePolicies?: TypePolicies;\n}\n\n/**\n * Sets up the Magento Daffodil driver configuration for Magento's GraphQl API.\n *\n * Under the hood, this creates an Apollo Client configuration.\n *\n * @param endpoint - The Magento store domain (e.g. \"https://www.my-store.com/graphql\") or an injection token for a string or function that returns a string\n */\nexport function provideMagentoDriver(options: DaffMagentoDriverConfig | InjectionToken<DaffMagentoDriverConfig>, ...features: Array<MagentoDriverFeature>): EnvironmentProviders {\n const providers = [\n ...features.flatMap(({ ɵproviders }) => ɵproviders),\n provideApollo(() => {\n const opts: DaffMagentoDriverConfig = {\n possibleTypes: MAGENTO_POSSIBLE_TYPES.possibleTypes,\n typePolicies,\n ...(options instanceof InjectionToken ? inject(options) : options),\n };\n return {\n ...inject(DAFF_DRIVER_MAGENTO_EXTRA_APOLLO_OPTIONS),\n link: ApolloLink.from([\n ...inject(DAFF_APOLLO_REQUEST_HANDLERS).map((handler) => new ApolloLink(handler)),\n new ErrorLink(inject(DAFF_DRIVER_MAGENTO_ERROR_HANDLER)),\n inject(HttpLink).create(opts),\n ]),\n cache: new InMemoryCache({ typePolicies: opts.typePolicies, possibleTypes: opts.possibleTypes }),\n };\n }),\n provideDaffDriverHttpClientCacheService(DaffDriverHttpClientCacheMagentoService),\n\n // enable caching by default\n provideDaffMagentoApolloCacheableOperations(),\n provideDaffMagentoCacheHeader(),\n ];\n\n if (features.find(({ ɵkind }) => ɵkind === MagentoDriverFeatureKind.TransferState)) {\n providers.push(provideDaffDriverMagentoTransferState());\n }\n\n return makeEnvironmentProviders(providers);\n}\n","import {\n DaffError,\n DaffInheritableError,\n} from '@daffodil/core';\n\nexport const DAFF_DRIVER_MAGENTO_ERROR_CODE = 'DAFF_DRIVER_MAGENTO_ERROR';\n\n/**\n * A very general error thrown when a more specific error type cannot be determined.\n */\nexport class DaffDriverMagentoError extends DaffInheritableError implements DaffError {\n public readonly code: string = DAFF_DRIVER_MAGENTO_ERROR_CODE;\n\n constructor(message?: string) {\n super(message);\n }\n}\n","import { GraphQLFormattedError } from 'graphql';\n\nimport {\n DaffError,\n DaffErrorCodeMap,\n} from '@daffodil/core';\n\nimport { DaffDriverMagentoError } from './error.class';\n\nexport function daffMagentoTransformGraphQlError<T extends DaffErrorCodeMap>(\n error: GraphQLFormattedError,\n map: T,\n): DaffError {\n const ErrorClass = map[<string>error?.extensions?.category] || DaffDriverMagentoError;\n\n return new ErrorClass(error.message) ;\n};\n","import { CombinedGraphQLErrors } from '@apollo/client';\n\nimport {\n DaffError,\n DaffErrorCodeMap,\n daffIsError,\n} from '@daffodil/core';\n\nimport { DaffDriverMagentoError } from './error.class';\nimport { daffMagentoTransformGraphQlError } from './transform-graphql';\n\n/**\n * Transforms the passed error according to the lookup in the passed map.\n */\n// TODO: return array of errors\nexport function daffTransformMagentoError<T extends DaffErrorCodeMap>(error: any, map: T): DaffError {\n if (CombinedGraphQLErrors.is(error)) {\n return error.errors.map(err => daffMagentoTransformGraphQlError<T>(err, map))[0];\n } else if (daffIsError(error)) {\n return error;\n } else {\n // TODO: how do we determine which error to return?\n // https://www.apollographql.com/docs/react/data/error-handling#identifying-error-types\n // return new DaffDriverNetworkError((<ApolloError>error).networkError.message);\n return new DaffDriverMagentoError(error.message);\n }\n}\n","export enum MagentoSortEnum {\n ASC = 'ASC',\n DESC = 'DESC'\n}\n","import { DaffCollectionMetadata } from '@daffodil/core';\n\nimport { MagentoSearchResultPageInfo } from '../../models/public_api';\n\nexport function magentoPageInfoTransform(pageInfo: MagentoSearchResultPageInfo): Pick<DaffCollectionMetadata, 'pageSize' | 'currentPage' | 'totalPages'> {\n return {\n pageSize: pageInfo.page_size,\n currentPage: pageInfo.current_page,\n totalPages: pageInfo.total_pages,\n };\n}\n","import { DaffSortDirectionEnum } from '@daffodil/core';\n\nimport { MagentoSortEnum } from '../../models/public_api';\n\nconst map = <const>{\n [MagentoSortEnum.ASC]: DaffSortDirectionEnum.Ascending,\n [MagentoSortEnum.DESC]: DaffSortDirectionEnum.Descending,\n};\n\nexport function magentoSortDirectionResponseTransform(direction: MagentoSortEnum): DaffSortDirectionEnum {\n return map[direction];\n}\n","import { DaffSortDirectionEnum } from '@daffodil/core';\n\nimport { MagentoSortEnum } from '../../models/public_api';\n\nconst map = <const>{\n [DaffSortDirectionEnum.Ascending]: MagentoSortEnum.ASC,\n [DaffSortDirectionEnum.Descending]: MagentoSortEnum.DESC,\n};\n\nexport function magentoSortDirectionRequestTransform(direction: DaffSortDirectionEnum): MagentoSortEnum {\n return map[direction];\n}\n","import { gql } from 'apollo-angular';\n\nexport const magentoSearchResultPageInfoFragment = gql`\n fragment magentoSearchResultPageInfo on SearchResultPageInfo {\n page_size\n current_page\n total_pages\n }\n`;\n","import { gql } from 'apollo-angular';\n\nexport const magentoMoneyFragment = gql`\n fragment moneyFragment on Money {\n value\n currency\n }\n`;\n","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U,wBAAwB,CAAC,QAAqC,EAAA;IAC5E,OAAO;QACL,QAAQ,EAAE,QAAQ,CAAC,SAAS;QAC5B,WAAW,EAAE,QAAQ,CAAC,YAAY;QAClC,UAAU,EAAE,QAAQ,CAAC,WAAW;KACjC;AACH;;ACNA,MAAMA,KAAG,GAAU;AACjB,IAAA,CAAC,eAAe,CAAC,GAAG,GAAG,qBAAqB,CAAC,SAAS;AACtD,IAAA,CAAC,eAAe,CAAC,IAAI,GAAG,qBAAqB,CAAC,UAAU;CACzD;AAEK,SAAU,qCAAqC,CAAC,SAA0B,EAAA;AAC9E,IAAA,OAAOA,KAAG,CAAC,SAAS,CAAC;AACvB;;ACPA,MAAM,GAAG,GAAU;AACjB,IAAA,CAAC,qBAAqB,CAAC,SAAS,GAAG,eAAe,CAAC,GAAG;AACtD,IAAA,CAAC,qBAAqB,CAAC,UAAU,GAAG,eAAe,CAAC,IAAI;CACzD;AAEK,SAAU,oCAAoC,CAAC,SAAgC,EAAA;AACnF,IAAA,OAAO,GAAG,CAAC,SAAS,CAAC;AACvB;;ACTO,MAAM,mCAAmC,GAAG,GAAG,CAAA;;;;;;;;ACA/C,MAAM,oBAAoB,GAAG,GAAG,CAAA;;;;;;;ACFvC;;AAEG;;;;"}
|
|
@@ -1,23 +0,0 @@
|
|
|
1
|
-
import { DaffModelFactory } from '@daffodil/core/testing';
|
|
2
|
-
import { MagentoMoney, MagentoDiscount, MagentoSearchResultPageInfo } from '@daffodil/driver/magento';
|
|
3
|
-
import * as i0 from '@angular/core';
|
|
4
|
-
|
|
5
|
-
declare class MagentoMoneyFactory extends DaffModelFactory<MagentoMoney> {
|
|
6
|
-
constructor();
|
|
7
|
-
static ɵfac: i0.ɵɵFactoryDeclaration<MagentoMoneyFactory, never>;
|
|
8
|
-
static ɵprov: i0.ɵɵInjectableDeclaration<MagentoMoneyFactory>;
|
|
9
|
-
}
|
|
10
|
-
|
|
11
|
-
declare class MagentoDiscountFactory extends DaffModelFactory<MagentoDiscount> {
|
|
12
|
-
constructor();
|
|
13
|
-
static ɵfac: i0.ɵɵFactoryDeclaration<MagentoDiscountFactory, never>;
|
|
14
|
-
static ɵprov: i0.ɵɵInjectableDeclaration<MagentoDiscountFactory>;
|
|
15
|
-
}
|
|
16
|
-
|
|
17
|
-
declare class MagentoSearchResultPageInfoFactory extends DaffModelFactory<MagentoSearchResultPageInfo> {
|
|
18
|
-
constructor();
|
|
19
|
-
static ɵfac: i0.ɵɵFactoryDeclaration<MagentoSearchResultPageInfoFactory, never>;
|
|
20
|
-
static ɵprov: i0.ɵɵInjectableDeclaration<MagentoSearchResultPageInfoFactory>;
|
|
21
|
-
}
|
|
22
|
-
|
|
23
|
-
export { MagentoDiscountFactory, MagentoMoneyFactory, MagentoSearchResultPageInfoFactory };
|
|
@@ -1,225 +0,0 @@
|
|
|
1
|
-
import * as _angular_core from '@angular/core';
|
|
2
|
-
import { Provider, EnvironmentProviders, StateKey, InjectionToken } from '@angular/core';
|
|
3
|
-
import { PossibleTypesMap, TypePolicies } from '@apollo/client/core';
|
|
4
|
-
import { HttpLink } from 'apollo-angular/http';
|
|
5
|
-
import { ApolloClient, TypePolicies as TypePolicies$1 } from '@apollo/client';
|
|
6
|
-
import { ErrorLink } from '@apollo/client/link/error';
|
|
7
|
-
import { DaffErrorCodeMap, DaffError, DaffInheritableError, DaffCollectionMetadata, DaffSortDirectionEnum } from '@daffodil/core';
|
|
8
|
-
import { GraphQLFormattedError } from 'graphql';
|
|
9
|
-
import { DaffDriverHttpClientCacheServiceInterface } from '@daffodil/driver';
|
|
10
|
-
import * as apollo_angular from 'apollo-angular';
|
|
11
|
-
|
|
12
|
-
declare const MAGENTO_POSSIBLE_TYPES: {
|
|
13
|
-
possibleTypes: {
|
|
14
|
-
AggregationOptionInterface: string[];
|
|
15
|
-
AttributeSelectedOptionInterface: string[];
|
|
16
|
-
AttributeValueInterface: string[];
|
|
17
|
-
CartAddressInterface: string[];
|
|
18
|
-
CartItemInterface: string[];
|
|
19
|
-
CategoryInterface: string[];
|
|
20
|
-
CreditMemoItemInterface: string[];
|
|
21
|
-
CustomAttributeMetadataInterface: string[];
|
|
22
|
-
CustomAttributeOptionInterface: string[];
|
|
23
|
-
CustomizableOptionInterface: string[];
|
|
24
|
-
CustomizableProductInterface: string[];
|
|
25
|
-
Error: string[];
|
|
26
|
-
ErrorInterface: string[];
|
|
27
|
-
InvoiceItemInterface: string[];
|
|
28
|
-
LayerFilterItemInterface: string[];
|
|
29
|
-
MediaGalleryInterface: string[];
|
|
30
|
-
OrderItemInterface: string[];
|
|
31
|
-
PhysicalProductInterface: string[];
|
|
32
|
-
ProductInterface: string[];
|
|
33
|
-
ProductLinksInterface: string[];
|
|
34
|
-
RoutableInterface: string[];
|
|
35
|
-
ShipmentItemInterface: string[];
|
|
36
|
-
SwatchDataInterface: string[];
|
|
37
|
-
SwatchLayerFilterItemInterface: string[];
|
|
38
|
-
WishlistItemInterface: string[];
|
|
39
|
-
};
|
|
40
|
-
};
|
|
41
|
-
|
|
42
|
-
/**
|
|
43
|
-
* A non-exhaustive list of feature kinds that exist for {@link provideMagentoDriver}.
|
|
44
|
-
*/
|
|
45
|
-
declare enum MagentoDriverFeatureKind {
|
|
46
|
-
CacheableOperations = "DaffMagentoDriverCacheableOperationsFeature",
|
|
47
|
-
CacheHeader = "DaffMagentoDriverCacheHeaderFeature",
|
|
48
|
-
ErrorHandler = "DaffMagentoDriverErrorHandlerFeature",
|
|
49
|
-
TransferState = "DaffMagentoDriverTransferStateFeature",
|
|
50
|
-
ExtraApolloOptions = "DaffMagentoDriverExtraApolloOptionsFeature"
|
|
51
|
-
}
|
|
52
|
-
|
|
53
|
-
/**
|
|
54
|
-
* A feature for {@link provideMagentoDriver}.
|
|
55
|
-
*/
|
|
56
|
-
interface MagentoDriverFeature {
|
|
57
|
-
ɵkind: MagentoDriverFeatureKind | string;
|
|
58
|
-
ɵproviders: Array<Provider | EnvironmentProviders>;
|
|
59
|
-
}
|
|
60
|
-
|
|
61
|
-
/**
|
|
62
|
-
* Apollo client options except link and cache, creation of which is done by {@link provideMagentoDriver}.
|
|
63
|
-
*/
|
|
64
|
-
type DaffDriverMagentoExtraApolloOptions = Omit<ApolloClient.Options, 'link' | 'cache'>;
|
|
65
|
-
declare const DAFF_DRIVER_MAGENTO_EXTRA_APOLLO_OPTIONS: _angular_core.InjectionToken<DaffDriverMagentoExtraApolloOptions>;
|
|
66
|
-
declare const provideDaffDriverMagentoExtraApolloOptions: <R extends DaffDriverMagentoExtraApolloOptions = DaffDriverMagentoExtraApolloOptions>(value: R) => _angular_core.ValueProvider;
|
|
67
|
-
declare const provideDaffDriverMagentoExtraApolloOptionsFactory: <R extends DaffDriverMagentoExtraApolloOptions = DaffDriverMagentoExtraApolloOptions>(factory: () => R) => _angular_core.FactoryProvider;
|
|
68
|
-
/**
|
|
69
|
-
* A {@link provideMagentoDriver} feature that allow specifying {@link DaffDriverMagentoExtraApolloOptions}.
|
|
70
|
-
*/
|
|
71
|
-
declare const withDaffDriverMagentoExtraApolloOptions: (options: DaffDriverMagentoExtraApolloOptions) => MagentoDriverFeature;
|
|
72
|
-
|
|
73
|
-
/**
|
|
74
|
-
* A {@link provideMagentoDriver} feature that sets up {@link provideDaffMagentoApolloCacheableOperations}.
|
|
75
|
-
*/
|
|
76
|
-
declare const withOperationCache: (...extraOperations: Array<string>) => MagentoDriverFeature;
|
|
77
|
-
|
|
78
|
-
declare const DAFF_DRIVER_MAGENTO_ERROR_HANDLER: _angular_core.InjectionToken<ErrorLink.ErrorHandler>;
|
|
79
|
-
declare const provideDaffDriverMagentoErrorHandler: <R extends ErrorLink.ErrorHandler = ErrorLink.ErrorHandler>(value: R) => _angular_core.ValueProvider;
|
|
80
|
-
/**
|
|
81
|
-
* A {@link provideMagentoDriver} feature that specifies the error handler.
|
|
82
|
-
*/
|
|
83
|
-
declare const withDaffDriverMagentoErrorHandler: (handler: ErrorLink.ErrorHandler) => MagentoDriverFeature;
|
|
84
|
-
|
|
85
|
-
/**
|
|
86
|
-
* Creates a magento driver feature for {@link provideMagentoDriver}.
|
|
87
|
-
*/
|
|
88
|
-
declare function makeMagentoDriverFeature(kind: MagentoDriverFeatureKind | string, providers: Array<Provider | EnvironmentProviders>): MagentoDriverFeature;
|
|
89
|
-
|
|
90
|
-
declare const DAFF_DRIVER_MAGENTO_TRANSFER_STATE_KEY: _angular_core.InjectionToken<StateKey<any>>;
|
|
91
|
-
declare const provideDaffDriverMagentoTransferStateKey: <R extends StateKey<any> = StateKey<any>>(value: R) => _angular_core.ValueProvider;
|
|
92
|
-
/**
|
|
93
|
-
* A {@link provideMagentoDriver} feature that sets up transfer state with the specified key.
|
|
94
|
-
*
|
|
95
|
-
* @param stateKey The key under which the Apollo state is stored.
|
|
96
|
-
*/
|
|
97
|
-
declare const withDaffDriverMagentoTransferState: <T extends StateKey<any> = StateKey<any>>(stateKey: T) => MagentoDriverFeature;
|
|
98
|
-
/**
|
|
99
|
-
* Holds the logic for hydrating the Apollo cache with the server's transferred state.
|
|
100
|
-
* It is recommended to use {@link withDaffDriverMagentoTransferState} with {@link provideMagentoDriver}
|
|
101
|
-
* to provide this functionality automatically.
|
|
102
|
-
*/
|
|
103
|
-
declare const provideDaffDriverMagentoTransferState: () => EnvironmentProviders;
|
|
104
|
-
|
|
105
|
-
interface DaffMagentoDriverConfig extends HttpLink.Options {
|
|
106
|
-
possibleTypes?: PossibleTypesMap;
|
|
107
|
-
typePolicies?: TypePolicies;
|
|
108
|
-
}
|
|
109
|
-
/**
|
|
110
|
-
* Sets up the Magento Daffodil driver configuration for Magento's GraphQl API.
|
|
111
|
-
*
|
|
112
|
-
* Under the hood, this creates an Apollo Client configuration.
|
|
113
|
-
*
|
|
114
|
-
* @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
|
|
115
|
-
*/
|
|
116
|
-
declare function provideMagentoDriver(options: DaffMagentoDriverConfig | InjectionToken<DaffMagentoDriverConfig>, ...features: Array<MagentoDriverFeature>): EnvironmentProviders;
|
|
117
|
-
|
|
118
|
-
/**
|
|
119
|
-
* Transforms the passed error according to the lookup in the passed map.
|
|
120
|
-
*/
|
|
121
|
-
declare function daffTransformMagentoError<T extends DaffErrorCodeMap>(error: any, map: T): DaffError;
|
|
122
|
-
|
|
123
|
-
declare function daffMagentoTransformGraphQlError<T extends DaffErrorCodeMap>(error: GraphQLFormattedError, map: T): DaffError;
|
|
124
|
-
|
|
125
|
-
declare const DAFF_DRIVER_MAGENTO_ERROR_CODE = "DAFF_DRIVER_MAGENTO_ERROR";
|
|
126
|
-
/**
|
|
127
|
-
* A very general error thrown when a more specific error type cannot be determined.
|
|
128
|
-
*/
|
|
129
|
-
declare class DaffDriverMagentoError extends DaffInheritableError implements DaffError {
|
|
130
|
-
readonly code: string;
|
|
131
|
-
constructor(message?: string);
|
|
132
|
-
}
|
|
133
|
-
|
|
134
|
-
interface MagentoMoney {
|
|
135
|
-
__typename?: string;
|
|
136
|
-
value: number;
|
|
137
|
-
currency: string;
|
|
138
|
-
}
|
|
139
|
-
|
|
140
|
-
interface MagentoDiscount {
|
|
141
|
-
__typename?: string;
|
|
142
|
-
amount: MagentoMoney;
|
|
143
|
-
label: string;
|
|
144
|
-
}
|
|
145
|
-
|
|
146
|
-
interface MagentoSearchResultPageInfo {
|
|
147
|
-
__typename?: 'SearchResultPageInfo';
|
|
148
|
-
current_page: number;
|
|
149
|
-
page_size: number;
|
|
150
|
-
total_pages: number;
|
|
151
|
-
}
|
|
152
|
-
|
|
153
|
-
interface MagentoFilterInput {
|
|
154
|
-
typename?: 'FilterStringTypeInput';
|
|
155
|
-
eq?: string;
|
|
156
|
-
in?: string;
|
|
157
|
-
match?: string;
|
|
158
|
-
}
|
|
159
|
-
|
|
160
|
-
declare enum MagentoSortEnum {
|
|
161
|
-
ASC = "ASC",
|
|
162
|
-
DESC = "DESC"
|
|
163
|
-
}
|
|
164
|
-
|
|
165
|
-
/**
|
|
166
|
-
* A request handler provider that will convert cacheable apollo operations into a format that Magento will understand as cacheable.
|
|
167
|
-
*/
|
|
168
|
-
declare const provideDaffMagentoApolloCacheableOperations: () => _angular_core.EnvironmentProviders;
|
|
169
|
-
|
|
170
|
-
declare const DAFF_MAGENTO_CACHEABLE_OPERATIONS: _angular_core.InjectionToken<string[]>;
|
|
171
|
-
declare const provideManyDaffMagentoCacheableOperations: <R extends string = string>(...values: R[]) => Array<_angular_core.ValueProvider>;
|
|
172
|
-
/**
|
|
173
|
-
* Adds an operation name to the list of cacheable Magento operations. Use only with Angular 9+.
|
|
174
|
-
*/
|
|
175
|
-
declare function provideDaffMagentoCacheableOperation(operationName: string): {
|
|
176
|
-
provide: _angular_core.InjectionToken<string[]>;
|
|
177
|
-
useValue: string;
|
|
178
|
-
multi: boolean;
|
|
179
|
-
};
|
|
180
|
-
|
|
181
|
-
/**
|
|
182
|
-
* Custom type policies that allow us to have more granular control
|
|
183
|
-
* over how ApolloClient reads from and writes to the cache.
|
|
184
|
-
*
|
|
185
|
-
* This is applicable to Magento 2.4.3 and up.
|
|
186
|
-
* Heavily based on https://github.com/magento/pwa-studio/blob/99270701b2b607551f2e5881af272ed48ba7064c/packages/peregrine/lib/Apollo/policies/index.js.
|
|
187
|
-
*
|
|
188
|
-
* https://www.apollographql.com/docs/react/caching/cache-configuration/#typepolicy-fields
|
|
189
|
-
* https://www.apollographql.com/docs/react/caching/cache-field-behavior/
|
|
190
|
-
*/
|
|
191
|
-
declare const DAFF_MAGENTO_2_4_3_TYPE_POLICIES: TypePolicies$1;
|
|
192
|
-
|
|
193
|
-
/**
|
|
194
|
-
* Interacts with the Apollo client.
|
|
195
|
-
*
|
|
196
|
-
* @inheritdoc
|
|
197
|
-
*/
|
|
198
|
-
declare class DaffDriverHttpClientCacheMagentoService implements DaffDriverHttpClientCacheServiceInterface {
|
|
199
|
-
private platformId;
|
|
200
|
-
constructor(platformId: string);
|
|
201
|
-
reset(): void;
|
|
202
|
-
static ɵfac: _angular_core.ɵɵFactoryDeclaration<DaffDriverHttpClientCacheMagentoService, never>;
|
|
203
|
-
static ɵprov: _angular_core.ɵɵInjectableDeclaration<DaffDriverHttpClientCacheMagentoService>;
|
|
204
|
-
}
|
|
205
|
-
|
|
206
|
-
declare const MAGENTO_CUSTOMER_CACHE_ID_HEADER = "X-Magento-Cache-Id";
|
|
207
|
-
/**
|
|
208
|
-
* Stores and sets the Magento cache ID header.
|
|
209
|
-
* This will set the `X-Magento-Cache-Id` header from the most recent value encountered
|
|
210
|
-
* on a response, if there was a response with that header set.
|
|
211
|
-
*/
|
|
212
|
-
declare const provideDaffMagentoCacheHeader: () => _angular_core.EnvironmentProviders;
|
|
213
|
-
|
|
214
|
-
declare function magentoPageInfoTransform(pageInfo: MagentoSearchResultPageInfo): Pick<DaffCollectionMetadata, 'pageSize' | 'currentPage' | 'totalPages'>;
|
|
215
|
-
|
|
216
|
-
declare function magentoSortDirectionResponseTransform(direction: MagentoSortEnum): DaffSortDirectionEnum;
|
|
217
|
-
|
|
218
|
-
declare function magentoSortDirectionRequestTransform(direction: DaffSortDirectionEnum): MagentoSortEnum;
|
|
219
|
-
|
|
220
|
-
declare const magentoSearchResultPageInfoFragment: apollo_angular.TypedDocumentNode<unknown, unknown>;
|
|
221
|
-
|
|
222
|
-
declare const magentoMoneyFragment: apollo_angular.TypedDocumentNode<unknown, unknown>;
|
|
223
|
-
|
|
224
|
-
export { DAFF_DRIVER_MAGENTO_ERROR_CODE, DAFF_DRIVER_MAGENTO_ERROR_HANDLER, DAFF_DRIVER_MAGENTO_EXTRA_APOLLO_OPTIONS, DAFF_DRIVER_MAGENTO_TRANSFER_STATE_KEY, DAFF_MAGENTO_2_4_3_TYPE_POLICIES, DAFF_MAGENTO_CACHEABLE_OPERATIONS, DaffDriverHttpClientCacheMagentoService, DaffDriverMagentoError, MAGENTO_CUSTOMER_CACHE_ID_HEADER, MAGENTO_POSSIBLE_TYPES, MagentoDriverFeatureKind, MagentoSortEnum, daffMagentoTransformGraphQlError, daffTransformMagentoError, magentoMoneyFragment, magentoPageInfoTransform, magentoSearchResultPageInfoFragment, magentoSortDirectionRequestTransform, magentoSortDirectionResponseTransform, makeMagentoDriverFeature, provideDaffDriverMagentoErrorHandler, provideDaffDriverMagentoExtraApolloOptions, provideDaffDriverMagentoExtraApolloOptionsFactory, provideDaffDriverMagentoTransferState, provideDaffDriverMagentoTransferStateKey, provideDaffMagentoApolloCacheableOperations, provideDaffMagentoCacheHeader, provideDaffMagentoCacheableOperation, provideMagentoDriver, provideManyDaffMagentoCacheableOperations, withDaffDriverMagentoErrorHandler, withDaffDriverMagentoExtraApolloOptions, withDaffDriverMagentoTransferState, withOperationCache };
|
|
225
|
-
export type { DaffDriverMagentoExtraApolloOptions, DaffMagentoDriverConfig, MagentoDiscount, MagentoDriverFeature, MagentoFilterInput, MagentoMoney, MagentoSearchResultPageInfo };
|