@daffodil/driver 0.78.0 → 0.79.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,4 +1,9 @@
1
- import { InjectionToken, inject, } from '@angular/core';
1
+ import { inject } from '@angular/core';
2
+ import { createSingletonInjectionToken } from '@daffodil/core';
2
3
  import { DaffDriverHttpClientCacheNoopService } from './noop.service';
3
- export const DAFF_DRIVER_HTTP_CLIENT_CACHE_SERVICE = new InjectionToken('DAFF_DRIVER_HTTP_CLIENT_CACHE_SERVICE', { factory: () => inject(DaffDriverHttpClientCacheNoopService) });
4
- //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoic2VydmljZS50b2tlbi5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uLy4uLy4uLy4uL2xpYnMvZHJpdmVyL3NyYy9odHRwLWNsaWVudC1jYWNoZS9zZXJ2aWNlLnRva2VuLnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQUFBLE9BQU8sRUFDTCxjQUFjLEVBQ2QsTUFBTSxHQUNQLE1BQU0sZUFBZSxDQUFDO0FBRXZCLE9BQU8sRUFBRSxvQ0FBb0MsRUFBRSxNQUFNLGdCQUFnQixDQUFDO0FBR3RFLE1BQU0sQ0FBQyxNQUFNLHFDQUFxQyxHQUFHLElBQUksY0FBYyxDQUE0Qyx1Q0FBdUMsRUFBRSxFQUFFLE9BQU8sRUFBRSxHQUFHLEVBQUUsQ0FBQyxNQUFNLENBQUMsb0NBQW9DLENBQUMsRUFBRSxDQUFDLENBQUMiLCJzb3VyY2VzQ29udGVudCI6WyJpbXBvcnQge1xuICBJbmplY3Rpb25Ub2tlbixcbiAgaW5qZWN0LFxufSBmcm9tICdAYW5ndWxhci9jb3JlJztcblxuaW1wb3J0IHsgRGFmZkRyaXZlckh0dHBDbGllbnRDYWNoZU5vb3BTZXJ2aWNlIH0gZnJvbSAnLi9ub29wLnNlcnZpY2UnO1xuaW1wb3J0IHsgRGFmZkRyaXZlckh0dHBDbGllbnRDYWNoZVNlcnZpY2VJbnRlcmZhY2UgfSBmcm9tICcuL3NlcnZpY2UudHlwZSc7XG5cbmV4cG9ydCBjb25zdCBEQUZGX0RSSVZFUl9IVFRQX0NMSUVOVF9DQUNIRV9TRVJWSUNFID0gbmV3IEluamVjdGlvblRva2VuPERhZmZEcml2ZXJIdHRwQ2xpZW50Q2FjaGVTZXJ2aWNlSW50ZXJmYWNlPignREFGRl9EUklWRVJfSFRUUF9DTElFTlRfQ0FDSEVfU0VSVklDRScsIHsgZmFjdG9yeTogKCkgPT4gaW5qZWN0KERhZmZEcml2ZXJIdHRwQ2xpZW50Q2FjaGVOb29wU2VydmljZSkgfSk7XG4iXX0=
4
+ export const { token: DAFF_DRIVER_HTTP_CLIENT_CACHE_SERVICE,
5
+ /**
6
+ * Provider function for {@link DAFF_DRIVER_HTTP_CLIENT_CACHE_SERVICE}.
7
+ */
8
+ provider: provideDaffDriverHttpClientCacheService, } = createSingletonInjectionToken('DAFF_DRIVER_HTTP_CLIENT_CACHE_SERVICE', { factory: () => inject(DaffDriverHttpClientCacheNoopService) });
9
+ //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoic2VydmljZS50b2tlbi5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uLy4uLy4uLy4uL2xpYnMvZHJpdmVyL3NyYy9odHRwLWNsaWVudC1jYWNoZS9zZXJ2aWNlLnRva2VuLnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQUFBLE9BQU8sRUFBRSxNQUFNLEVBQUUsTUFBTSxlQUFlLENBQUM7QUFFdkMsT0FBTyxFQUFFLDZCQUE2QixFQUFFLE1BQU0sZ0JBQWdCLENBQUM7QUFFL0QsT0FBTyxFQUFFLG9DQUFvQyxFQUFFLE1BQU0sZ0JBQWdCLENBQUM7QUFHdEUsTUFBTS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kgPT4gaW5qZWN0KERhZmZEcml2ZXJIdHRwQ2xpZW50Q2FjaGVOb29wU2VydmljZSkgfSxcbik7XG4iXX0=
@@ -1,4 +1,8 @@
1
1
  import { createConfigInjectionToken } from '@daffodil/core';
2
2
  import { DAFF_IN_MEMORY_DRIVER_CONFIG_DEFAULT } from './default';
3
- export const { token: DAFF_IN_MEMORY_DRIVER_CONFIG, provider: provideDaffInMemoryDriverConfig, } = createConfigInjectionToken(DAFF_IN_MEMORY_DRIVER_CONFIG_DEFAULT, 'DAFF_IN_MEMORY_DRIVER_CONFIG');
4
- //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoidG9rZW4uanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi8uLi8uLi8uLi9saWJzL2RyaXZlci9pbi1tZW1vcnkvc3JjL2NvbmZpZy90b2tlbi50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFBQSxPQUFPLEVBQUUsMEJBQTBCLEVBQUUsTUFBTSxnQkFBZ0IsQ0FBQztBQUU1RCxPQUFPLEVBQUUsb0NBQW9DLEVBQUUsTUFBTSxXQUFXLENBQUM7QUFHakUsTUFBTSxDQUFDLE1BQU0sRUFDWCxLQUFLLEVBQUUsNEJBQTRCLEVBQ25DLFFBQVEsRUFBRSwrQkFBK0IsR0FDMUMsR0FBRywwQkFBMEIsQ0FBMkIsb0NBQW9DLEVBQUUsOEJBQThCLENBQUMsQ0FBQyIsInNvdXJjZXNDb250ZW50IjpbImltcG9ydCB7IGNyZWF0ZUNvbmZpZ0luamVjdGlvblRva2VuIH0gZnJvbSAnQGRhZmZvZGlsL2NvcmUnO1xuXG5pbXBvcnQgeyBEQUZGX0lOX01FTU9SWV9EUklWRVJfQ09ORklHX0RFRkFVTFQgfSBmcm9tICcuL2RlZmF1bHQnO1xuaW1wb3J0IHsgRGFmZkluTWVtb3J5RHJpdmVyQ29uZmlnIH0gZnJvbSAnLi90eXBlJztcblxuZXhwb3J0IGNvbnN0IHtcbiAgdG9rZW46IERBRkZfSU5fTUVNT1JZX0RSSVZFUl9DT05GSUcsXG4gIHByb3ZpZGVyOiBwcm92aWRlRGFmZkluTWVtb3J5RHJpdmVyQ29uZmlnLFxufSA9IGNyZWF0ZUNvbmZpZ0luamVjdGlvblRva2VuPERhZmZJbk1lbW9yeURyaXZlckNvbmZpZz4oREFGRl9JTl9NRU1PUllfRFJJVkVSX0NPTkZJR19ERUZBVUxULCAnREFGRl9JTl9NRU1PUllfRFJJVkVSX0NPTkZJRycpO1xuIl19
3
+ export const { token: DAFF_IN_MEMORY_DRIVER_CONFIG,
4
+ /**
5
+ * Provider function for {@link DAFF_IN_MEMORY_DRIVER_CONFIG}.
6
+ */
7
+ provider: provideDaffInMemoryDriverConfig, } = createConfigInjectionToken(DAFF_IN_MEMORY_DRIVER_CONFIG_DEFAULT, 'DAFF_IN_MEMORY_DRIVER_CONFIG');
8
+ //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoidG9rZW4uanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi8uLi8uLi8uLi9saWJzL2RyaXZlci9pbi1tZW1vcnkvc3JjL2NvbmZpZy90b2tlbi50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFBQSxPQUFPLEVBQUUsMEJBQTBCLEVBQUUsTUFBTSxnQkFBZ0IsQ0FBQztBQUU1RCxPQUFPLEVBQUUsb0NBQW9DLEVBQUUsTUFBTSxXQUFXLENBQUM7QUFHakUsTUFBTSxDQUFDLE1BQU0sRUFDWCxLQUFLLEVBQUUsNEJBQTRCO0FBQ25DOztHQUVHO0FBQ0gsUUFBUSxFQUFFLCtCQUErQixHQUMxQyxHQUFHLDBCQUEwQixDQUEyQixvQ0FBb0MsRUFBRSw4QkFBOEIsQ0FBQyxDQUFDIiwic291cmNlc0NvbnRlbnQiOlsiaW1wb3J0IHsgY3JlYXRlQ29uZmlnSW5qZWN0aW9uVG9rZW4gfSBmcm9tICdAZGFmZm9kaWwvY29yZSc7XG5cbmltcG9ydCB7IERBRkZfSU5fTUVNT1JZX0RSSVZFUl9DT05GSUdfREVGQVVMVCB9IGZyb20gJy4vZGVmYXVsdCc7XG5pbXBvcnQgeyBEYWZmSW5NZW1vcnlEcml2ZXJDb25maWcgfSBmcm9tICcuL3R5cGUnO1xuXG5leHBvcnQgY29uc3Qge1xuICB0b2tlbjogREFGRl9JTl9NRU1PUllfRFJJVkVSX0NPTkZJRyxcbiAgLyoqXG4gICAqIFByb3ZpZGVyIGZ1bmN0aW9uIGZvciB7QGxpbmsgREFGRl9JTl9NRU1PUllfRFJJVkVSX0NPTkZJR30uXG4gICAqL1xuICBwcm92aWRlcjogcHJvdmlkZURhZmZJbk1lbW9yeURyaXZlckNvbmZpZyxcbn0gPSBjcmVhdGVDb25maWdJbmplY3Rpb25Ub2tlbjxEYWZmSW5NZW1vcnlEcml2ZXJDb25maWc+KERBRkZfSU5fTUVNT1JZX0RSSVZFUl9DT05GSUdfREVGQVVMVCwgJ0RBRkZfSU5fTUVNT1JZX0RSSVZFUl9DT05GSUcnKTtcbiJdfQ==
@@ -1,12 +1,12 @@
1
1
  import { DaffInheritableError, } from '@daffodil/core';
2
2
  /**
3
- * @deprecated use {@link DaffDriverNetworkError} instead.
3
+ * @deprecated use {@link DaffDriverNetworkError} instead. Deprecated in version 0.78.0. Will be removed in version 0.81.0.
4
4
  */
5
5
  export const DAFF_DRIVER_MAGENTO_NETWORK_ERROR_CODE = 'DAFF_DRIVER_MAGENTO_NETWORK_ERROR';
6
6
  /**
7
7
  * An error thrown when the Magento driver encountered a problem with network connectivity.
8
8
  *
9
- * @deprecated use {@link DaffDriverNetworkError} instead.
9
+ * @deprecated use {@link DaffDriverNetworkError} instead. Deprecated in version 0.78.0. Will be removed in version 0.81.0.
10
10
  */
11
11
  export class DaffDriverMagentoNetworkError extends DaffInheritableError {
12
12
  constructor(message) {
@@ -14,4 +14,4 @@ export class DaffDriverMagentoNetworkError extends DaffInheritableError {
14
14
  this.code = DAFF_DRIVER_MAGENTO_NETWORK_ERROR_CODE;
15
15
  }
16
16
  }
17
- //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoibmV0d29yay1lcnJvci5jbGFzcy5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uLy4uLy4uLy4uLy4uL2xpYnMvZHJpdmVyL21hZ2VudG8vc3JjL2Vycm9ycy9uZXR3b3JrLWVycm9yLmNsYXNzLnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQUFBLE9BQU8sRUFFTCxvQkFBb0IsR0FDckIsTUFBTSxnQkFBZ0IsQ0FBQztBQUV4Qjs7R0FFRztBQUNILE1BQU0sQ0FBQyxNQUFNLHNDQUFzQyxHQUFHLG1DQUFtQyxDQUFDO0FBRTFGOzs7O0dBSUc7QUFDSCxNQUFNLE9BQU8sNkJBQThCLFNBQVEsb0JBQW9CO0lBR3JFLFlBQVksT0FBZ0I7UUFDMUIsS0FBSyxDQUFDLE9BQU8sQ0FBQyxDQUFDO1FBSEQsU0FBSSxHQUFXLHNDQUFzQyxDQUFDO0lBSXRFLENBQUM7Q0FDRiIsInNvdXJjZXNDb250ZW50IjpbImltcG9ydCB7XG4gIERhZmZFcnJvcixcbiAgRGFmZkluaGVyaXRhYmxlRXJyb3IsXG59IGZyb20gJ0BkYWZmb2RpbC9jb3JlJztcblxuLyoqXG4gKiBAZGVwcmVjYXRlZCB1c2Uge0BsaW5rIERhZmZEcml2ZXJOZXR3b3JrRXJyb3J9IGluc3RlYWQuXG4gKi9cbmV4cG9ydCBjb25zdCBEQUZGX0RSSVZFUl9NQUdFTlRPX05FVFdPUktfRVJST1JfQ09ERSA9ICdEQUZGX0RSSVZFUl9NQUdFTlRPX05FVFdPUktfRVJST1InO1xuXG4vKipcbiAqIEFuIGVycm9yIHRocm93biB3aGVuIHRoZSBNYWdl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1,11 +1,16 @@
1
- import { InjectionToken } from '@angular/core';
1
+ import { createMultiInjectionToken } from '@daffodil/core';
2
+ export const {
2
3
  /**
3
4
  * A multi-provider injection token of the operation names of magento queries that should
4
5
  * be cached. This is needed because queries need to be converted into GET queries in order for Magento
5
6
  * to cache them. This token should be used by daffodil driver platform modules to register operation names that are cacheable, and is
6
7
  * intended for internal daffodil use only.
7
8
  */
8
- export const DAFF_MAGENTO_CACHEABLE_OPERATIONS = new InjectionToken('DAFF_MAGENTO_CACHEABLE_OPERATIONS', { factory: () => [] });
9
+ token: DAFF_MAGENTO_CACHEABLE_OPERATIONS,
10
+ /**
11
+ * Adds many operation names to the list of cacheable Magento operations. Use only with Angular 9+.
12
+ */
13
+ provider: provideManyDaffMagentoCacheableOperations, } = createMultiInjectionToken('DAFF_MAGENTO_CACHEABLE_OPERATIONS');
9
14
  /**
10
15
  * Adds an operation name to the list of cacheable Magento operations. Use only with Angular 9+.
11
16
  */
@@ -16,14 +21,4 @@ export function provideDaffMagentoCacheableOperation(operationName) {
16
21
  multi: true,
17
22
  };
18
23
  }
19
- /**
20
- * Adds many operation names to the list of cacheable Magento operations. Use only with Angular 9+.
21
- */
22
- export function provideManyDaffMagentoCacheableOperations(...operationNames) {
23
- return operationNames.map(name => ({
24
- provide: DAFF_MAGENTO_CACHEABLE_OPERATIONS,
25
- useValue: name,
26
- multi: true,
27
- }));
28
- }
29
- //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiY2FjaGVhYmxlLW9wZXJhdGlvbnMtdG9rZW4uanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi8uLi8uLi8uLi8uLi9saWJzL2RyaXZlci9tYWdlbnRvL3NyYy9ncmFwaHFsL2NhY2hlYWJsZS1vcGVyYXRpb25zL2NhY2hlYWJsZS1vcGVyYXRpb25zLXRva2VuLnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQUFBLE9BQU8sRUF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d1bGFyIDkrLlxuICovXG5leHBvcnQgZnVuY3Rpb24gcHJvdmlkZURhZmZNYWdlbnRvQ2FjaGVhYmxlT3BlcmF0aW9uKG9wZXJhdGlvbk5hbWU6IHN0cmluZykge1xuICByZXR1cm4ge1xuICAgIHByb3ZpZGU6IERBRkZfTUFHRU5UT19DQUNIRUFCTEVfT1BFUkFUSU9OUyxcbiAgICB1c2VWYWx1ZTogb3BlcmF0aW9uTmFtZSxcbiAgICBtdWx0aTogdHJ1ZSxcbiAgfTtcbn1cbiJdfQ==
@@ -1,26 +1,20 @@
1
1
  import { NgModule } from '@angular/core';
2
- import { DAFF_DRIVER_HTTP_CLIENT_CACHE_SERVICE } from '@daffodil/driver';
2
+ import { provideDaffDriverHttpClientCacheService } from '@daffodil/driver';
3
3
  import { DaffDriverHttpClientCacheMagentoService } from './graphql/cache.service';
4
4
  import * as i0 from "@angular/core";
5
5
  export class DaffDriverMagentoModule {
6
6
  static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.2", ngImport: i0, type: DaffDriverMagentoModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
7
7
  static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "18.2.2", ngImport: i0, type: DaffDriverMagentoModule }); }
8
8
  static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "18.2.2", ngImport: i0, type: DaffDriverMagentoModule, providers: [
9
- {
10
- provide: DAFF_DRIVER_HTTP_CLIENT_CACHE_SERVICE,
11
- useExisting: DaffDriverHttpClientCacheMagentoService,
12
- },
9
+ provideDaffDriverHttpClientCacheService(DaffDriverHttpClientCacheMagentoService),
13
10
  ] }); }
14
11
  }
15
12
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.2", ngImport: i0, type: DaffDriverMagentoModule, decorators: [{
16
13
  type: NgModule,
17
14
  args: [{
18
15
  providers: [
19
- {
20
- provide: DAFF_DRIVER_HTTP_CLIENT_CACHE_SERVICE,
21
- useExisting: DaffDriverHttpClientCacheMagentoService,
22
- },
16
+ provideDaffDriverHttpClientCacheService(DaffDriverHttpClientCacheMagentoService),
23
17
  ],
24
18
  }]
25
19
  }] });
26
- //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoibWFnZW50by5tb2R1bGUuanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi8uLi8uLi9saWJzL2RyaXZlci9tYWdlbnRvL3NyYy9tYWdlbnRvLm1vZHVsZS50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFBQSxPQUFPLEVBQUUsUUFBUSxFQUFFLE1BQU0sZUFBZSxDQUFDO0FBRXpDLE9BQU8sRUFBRSxxQ0FBcUMsRUFBRSxNQUFNLGtCQUFrQixDQUFDO0FBRXpFLE9BQU8sRUFBRSx1Q0FBdUMsRUFBRSxNQUFNLHlCQUF5QixDQUFDOztBQVVsRixNQUFNLE9BQU8sdUJBQXVCOzhHQUF2Qix1QkFBdUI7K0dBQXZCLHVCQUF1QjsrR0FBdkIsdUJBQXVCLGFBUHZCO1lBQ1Q7Z0JBQ0UsT0FBTyxFQUFFLHFDQUFxQztnQkFDOUMsV0FBVyxFQUFFLHVDQUF1QzthQUNyRDtTQUNGOzsyRkFFVSx1QkFBdUI7a0JBUm5DLFFBQVE7bUJBQUM7b0JBQ1IsU0FBUyxFQUFFO3dCQUNUOzRCQUNFLE9BQU8sRUFBRSxxQ0FBcUM7NEJBQzlDLFdBQVcsRUFBRSx1Q0FBdUM7eUJBQ3JEO3FCQUNGO2lCQUNGIiwic291cmNlc0NvbnRlbnQiOlsiaW1wb3J0IHsgTmdNb2R1bGUgfSBmcm9tICdAYW5ndWxhci9jb3JlJztcblxuaW1wb3J0IHsgREFGRl9EUklWRVJfSFRUUF9DTElFTlRfQ0FDSEVfU0VSVklDRSB9IGZyb20gJ0BkYWZmb2RpbC9kcml2ZXInO1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GIiwic291cmNlc0NvbnRlbnQiOlsiaW1wb3J0IHsgTmdNb2R1bGUgfSBmcm9tICdAYW5ndWxhci9jb3JlJztcblxuaW1wb3J0IHsgcHJvdmlkZURhZmZEcml2ZXJIdHRwQ2xpZW50Q2FjaGVTZXJ2aWNlIH0gZnJvbSAnQGRhZmZvZGlsL2RyaXZlcic7XG5cbmltcG9ydCB7IERhZmZEcml2ZXJIdHRwQ2xpZW50Q2FjaGVNYWdlbnRvU2VydmljZSB9IGZyb20gJy4vZ3JhcGhxbC9jYWNoZS5zZXJ2aWNlJztcblxuQE5nTW9kdWxlKHtcbiAgcHJvdmlkZXJzOiBbXG4gICAgcHJvdmlkZURhZmZEcml2ZXJIdHRwQ2xpZW50Q2FjaGVTZXJ2aWNlKERhZmZEcml2ZXJIdHRwQ2xpZW50Q2FjaGVNYWdlbnRvU2VydmljZSksXG4gIF0sXG59KVxuZXhwb3J0IGNsYXNzIERhZmZEcml2ZXJNYWdlbnRvTW9kdWxlIHt9XG4iXX0=
@@ -104,7 +104,11 @@ const DAFF_IN_MEMORY_DRIVER_CONFIG_DEFAULT = {
104
104
  apiBase: 'api',
105
105
  };
106
106
 
107
- const { token: DAFF_IN_MEMORY_DRIVER_CONFIG, provider: provideDaffInMemoryDriverConfig, } = createConfigInjectionToken(DAFF_IN_MEMORY_DRIVER_CONFIG_DEFAULT, 'DAFF_IN_MEMORY_DRIVER_CONFIG');
107
+ const { token: DAFF_IN_MEMORY_DRIVER_CONFIG,
108
+ /**
109
+ * Provider function for {@link DAFF_IN_MEMORY_DRIVER_CONFIG}.
110
+ */
111
+ provider: provideDaffInMemoryDriverConfig, } = createConfigInjectionToken(DAFF_IN_MEMORY_DRIVER_CONFIG_DEFAULT, 'DAFF_IN_MEMORY_DRIVER_CONFIG');
108
112
 
109
113
  /**
110
114
  * Sets up the angular in memory web API with the {@link DaffInMemoryRootBackend}.
@@ -1 +1 @@
1
- {"version":3,"file":"daffodil-driver-in-memory.mjs","sources":["../../../libs/driver/in-memory/src/backend/backends.token.ts","../../../libs/driver/in-memory/src/backend/delegate.class.ts","../../../libs/driver/in-memory/src/backend/root.service.ts","../../../libs/driver/in-memory/src/driver/base.class.ts","../../../libs/driver/in-memory/src/config/default.ts","../../../libs/driver/in-memory/src/config/token.ts","../../../libs/driver/in-memory/src/module.ts","../../../libs/driver/in-memory/src/daffodil-driver-in-memory.ts"],"sourcesContent":["import { createServicesInjectionToken } from '@daffodil/core';\n\nimport { DaffInMemoryBackendInterface } from './type';\n\nexport const {\n /**\n * A token that holds the currently loaded in-memory backends.\n */\n token: DAFF_IN_MEMORY_BACKENDS,\n /**\n * Provide backend classes to {@link DAFF_IN_MEMORY_BACKENDS}.\n */\n provider: provideDaffInMemoryBackends,\n} = createServicesInjectionToken<DaffInMemoryBackendInterface>('DAFF_IN_MEMORY_BACKENDS');\n","import {\n RequestInfo,\n STATUS,\n} from 'angular-in-memory-web-api';\nimport { Observable } from 'rxjs';\n\nimport { DaffInMemoryDataServiceInterface } from './data-service.type';\nimport { DaffInMemoryRouteableBackend } from './routeable.type';\n\nenum Method {\n GET = 'get',\n POST = 'post',\n PUT = 'put',\n DELETE = 'delete',\n}\n\n/**\n * An class that automatically delegates requests to in-memory backends.\n *\n * @inheritdoc\n */\nexport class DaffInMemoryBackendDelegate implements DaffInMemoryDataServiceInterface {\n constructor(\n protected backends: Array<DaffInMemoryRouteableBackend>,\n ) {}\n\n protected delegateRequest(reqInfo: RequestInfo, method: Method): Observable<any> {\n const backend = this.backends.find((b) => 'collectionName' in b ? b.collectionName === reqInfo.collectionName : b.canHandle(reqInfo.collectionName));\n const request = backend?.[method];\n return request\n // allow child backends to return nully values\n // which will fall back to default request behavior (https://github.com/angular/angular/tree/main/packages/misc/angular-in-memory-web-api#http-request-handling)\n ? request.call(backend, reqInfo)\n : reqInfo.utils.createResponse$(() => ({\n status: STATUS.NOT_FOUND,\n statusText: `Backend ${reqInfo.collectionName} not found or does not support the ${method} request method`,\n }));\n }\n\n get?(reqInfo: RequestInfo): Observable<any> {\n return this.delegateRequest(reqInfo, Method.GET);\n }\n\n post?(reqInfo: RequestInfo): Observable<any> {\n return this.delegateRequest(reqInfo, Method.POST);\n }\n\n put?(reqInfo: RequestInfo): Observable<any> {\n return this.delegateRequest(reqInfo, Method.PUT);\n }\n\n delete?(reqInfo: RequestInfo): Observable<any> {\n return this.delegateRequest(reqInfo, Method.DELETE);\n }\n}\n","import {\n Inject,\n Injectable,\n} from '@angular/core';\nimport {\n InMemoryDbService,\n RequestInfo,\n} from 'angular-in-memory-web-api';\nimport {\n combineLatest,\n map,\n take,\n} from 'rxjs';\n\nimport { observe } from '@daffodil/core';\n\nimport { DAFF_IN_MEMORY_BACKENDS } from './backends.token';\nimport { DaffInMemoryDataServiceInterface } from './data-service.type';\nimport { DaffInMemoryBackendDelegate } from './delegate.class';\nimport { DaffInMemoryBackendInterface } from './type';\n\n/**\n * An in-memory backend that automatically delegates requests to backends provided to {@link DAFF_IN_MEMORY_BACKENDS}.\n *\n * @inheritdoc\n */\n@Injectable({\n providedIn: 'root',\n})\nexport class DaffInMemoryRootBackend extends DaffInMemoryBackendDelegate implements DaffInMemoryDataServiceInterface, InMemoryDbService {\n constructor(\n @Inject(DAFF_IN_MEMORY_BACKENDS) private _backends: Array<DaffInMemoryBackendInterface>,\n ) {\n super(_backends);\n }\n\n createDb(reqInfo?: RequestInfo) {\n return combineLatest(this._backends.map(observe)).pipe(\n take(1),\n map((backends) => backends.reduce((db, backend) => ({\n ...db,\n ...backend.createDb(reqInfo),\n }), {})),\n );\n }\n}\n","import { InMemoryBackendConfigArgs } from 'angular-in-memory-web-api';\n\n/**\n * The base class for in-memory drivers.\n */\nexport abstract class DaffInMemoryDriverBase {\n /**\n * The URL of the corresponding backend.\n * Does not include a trailing slash, it is of the form: `/<api base>/<collection name>`.\n */\n protected readonly url = `/${this.config.apiBase}/${this.collectionName}`;\n\n constructor(\n private config: InMemoryBackendConfigArgs,\n private collectionName: string,\n ) {}\n}\n","import { DaffInMemoryDriverConfig } from './type';\n\nexport const DAFF_IN_MEMORY_DRIVER_CONFIG_DEFAULT: DaffInMemoryDriverConfig = {\n apiBase: 'api',\n};\n","import { createConfigInjectionToken } from '@daffodil/core';\n\nimport { DAFF_IN_MEMORY_DRIVER_CONFIG_DEFAULT } from './default';\nimport { DaffInMemoryDriverConfig } from './type';\n\nexport const {\n token: DAFF_IN_MEMORY_DRIVER_CONFIG,\n provider: provideDaffInMemoryDriverConfig,\n} = createConfigInjectionToken<DaffInMemoryDriverConfig>(DAFF_IN_MEMORY_DRIVER_CONFIG_DEFAULT, 'DAFF_IN_MEMORY_DRIVER_CONFIG');\n","import {\n NgModule,\n ModuleWithProviders,\n importProvidersFrom,\n} from '@angular/core';\nimport { HttpClientInMemoryWebApiModule } from 'angular-in-memory-web-api';\n\nimport { DaffInMemoryRootBackend } from './backend/public_api';\nimport {\n DAFF_IN_MEMORY_DRIVER_CONFIG_DEFAULT,\n DaffInMemoryDriverConfig,\n provideDaffInMemoryDriverConfig,\n} from './config/public_api';\n\n/**\n * Sets up the angular in memory web API with the {@link DaffInMemoryRootBackend}.\n */\n@NgModule()\nexport class DaffInMemoryDriverModule {\n static forRoot(config: DaffInMemoryDriverConfig = DAFF_IN_MEMORY_DRIVER_CONFIG_DEFAULT): ModuleWithProviders<DaffInMemoryDriverModule> {\n return {\n ngModule: DaffInMemoryDriverModule,\n providers: [\n importProvidersFrom(HttpClientInMemoryWebApiModule.forRoot(DaffInMemoryRootBackend, config)),\n provideDaffInMemoryDriverConfig(config),\n ],\n };\n }\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;AAIa,MAAA;AACX;;AAEG;AACH,KAAK,EAAE,uBAAuB;AAC9B;;AAEG;AACH,QAAQ,EAAE,2BAA2B,GACtC,GAAG,4BAA4B,CAA+B,yBAAyB;;ACJxF,IAAK,MAKJ,CAAA;AALD,CAAA,UAAK,MAAM,EAAA;AACT,IAAA,MAAA,C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A;+GAAxB,wBAAwB,EAAA,CAAA,CAAA,EAAA;;2FAAxB,wBAAwB,EAAA,UAAA,EAAA,CAAA;kBADpC,QAAQ;;;ACjBT;;AAEG;;;;"}
1
+ {"version":3,"file":"daffodil-driver-in-memory.mjs","sources":["../../../libs/driver/in-memory/src/backend/backends.token.ts","../../../libs/driver/in-memory/src/backend/delegate.class.ts","../../../libs/driver/in-memory/src/backend/root.service.ts","../../../libs/driver/in-memory/src/driver/base.class.ts","../../../libs/driver/in-memory/src/config/default.ts","../../../libs/driver/in-memory/src/config/token.ts","../../../libs/driver/in-memory/src/module.ts","../../../libs/driver/in-memory/src/daffodil-driver-in-memory.ts"],"sourcesContent":["import { createServicesInjectionToken } from '@daffodil/core';\n\nimport { DaffInMemoryBackendInterface } from './type';\n\nexport const {\n /**\n * A token that holds the currently loaded in-memory backends.\n */\n token: DAFF_IN_MEMORY_BACKENDS,\n /**\n * Provide backend classes to {@link DAFF_IN_MEMORY_BACKENDS}.\n */\n provider: provideDaffInMemoryBackends,\n} = createServicesInjectionToken<DaffInMemoryBackendInterface>('DAFF_IN_MEMORY_BACKENDS');\n","import {\n RequestInfo,\n STATUS,\n} from 'angular-in-memory-web-api';\nimport { Observable } from 'rxjs';\n\nimport { DaffInMemoryDataServiceInterface } from './data-service.type';\nimport { DaffInMemoryRouteableBackend } from './routeable.type';\n\nenum Method {\n GET = 'get',\n POST = 'post',\n PUT = 'put',\n DELETE = 'delete',\n}\n\n/**\n * An class that automatically delegates requests to in-memory backends.\n *\n * @inheritdoc\n */\nexport class DaffInMemoryBackendDelegate implements DaffInMemoryDataServiceInterface {\n constructor(\n protected backends: Array<DaffInMemoryRouteableBackend>,\n ) {}\n\n protected delegateRequest(reqInfo: RequestInfo, method: Method): Observable<any> {\n const backend = this.backends.find((b) => 'collectionName' in b ? b.collectionName === reqInfo.collectionName : b.canHandle(reqInfo.collectionName));\n const request = backend?.[method];\n return request\n // allow child backends to return nully values\n // which will fall back to default request behavior (https://github.com/angular/angular/tree/main/packages/misc/angular-in-memory-web-api#http-request-handling)\n ? request.call(backend, reqInfo)\n : reqInfo.utils.createResponse$(() => ({\n status: STATUS.NOT_FOUND,\n statusText: `Backend ${reqInfo.collectionName} not found or does not support the ${method} request method`,\n }));\n }\n\n get?(reqInfo: RequestInfo): Observable<any> {\n return this.delegateRequest(reqInfo, Method.GET);\n }\n\n post?(reqInfo: RequestInfo): Observable<any> {\n return this.delegateRequest(reqInfo, Method.POST);\n }\n\n put?(reqInfo: RequestInfo): Observable<any> {\n return this.delegateRequest(reqInfo, Method.PUT);\n }\n\n delete?(reqInfo: RequestInfo): Observable<any> {\n return this.delegateRequest(reqInfo, Method.DELETE);\n }\n}\n","import {\n Inject,\n Injectable,\n} from '@angular/core';\nimport {\n InMemoryDbService,\n RequestInfo,\n} from 'angular-in-memory-web-api';\nimport {\n combineLatest,\n map,\n take,\n} from 'rxjs';\n\nimport { observe } from '@daffodil/core';\n\nimport { DAFF_IN_MEMORY_BACKENDS } from './backends.token';\nimport { DaffInMemoryDataServiceInterface } from './data-service.type';\nimport { DaffInMemoryBackendDelegate } from './delegate.class';\nimport { DaffInMemoryBackendInterface } from './type';\n\n/**\n * An in-memory backend that automatically delegates requests to backends provided to {@link DAFF_IN_MEMORY_BACKENDS}.\n *\n * @inheritdoc\n */\n@Injectable({\n providedIn: 'root',\n})\nexport class DaffInMemoryRootBackend extends DaffInMemoryBackendDelegate implements DaffInMemoryDataServiceInterface, InMemoryDbService {\n constructor(\n @Inject(DAFF_IN_MEMORY_BACKENDS) private _backends: Array<DaffInMemoryBackendInterface>,\n ) {\n super(_backends);\n }\n\n createDb(reqInfo?: RequestInfo) {\n return combineLatest(this._backends.map(observe)).pipe(\n take(1),\n map((backends) => backends.reduce((db, backend) => ({\n ...db,\n ...backend.createDb(reqInfo),\n }), {})),\n );\n }\n}\n","import { InMemoryBackendConfigArgs } from 'angular-in-memory-web-api';\n\n/**\n * The base class for in-memory drivers.\n */\nexport abstract class DaffInMemoryDriverBase {\n /**\n * The URL of the corresponding backend.\n * Does not include a trailing slash, it is of the form: `/<api base>/<collection name>`.\n */\n protected readonly url = `/${this.config.apiBase}/${this.collectionName}`;\n\n constructor(\n private config: InMemoryBackendConfigArgs,\n private collectionName: string,\n ) {}\n}\n","import { DaffInMemoryDriverConfig } from './type';\n\nexport const DAFF_IN_MEMORY_DRIVER_CONFIG_DEFAULT: DaffInMemoryDriverConfig = {\n apiBase: 'api',\n};\n","import { createConfigInjectionToken } from '@daffodil/core';\n\nimport { DAFF_IN_MEMORY_DRIVER_CONFIG_DEFAULT } from './default';\nimport { DaffInMemoryDriverConfig } from './type';\n\nexport const {\n token: DAFF_IN_MEMORY_DRIVER_CONFIG,\n /**\n * Provider function for {@link DAFF_IN_MEMORY_DRIVER_CONFIG}.\n */\n provider: provideDaffInMemoryDriverConfig,\n} = createConfigInjectionToken<DaffInMemoryDriverConfig>(DAFF_IN_MEMORY_DRIVER_CONFIG_DEFAULT, 'DAFF_IN_MEMORY_DRIVER_CONFIG');\n","import {\n NgModule,\n ModuleWithProviders,\n importProvidersFrom,\n} from '@angular/core';\nimport { HttpClientInMemoryWebApiModule } from 'angular-in-memory-web-api';\n\nimport { DaffInMemoryRootBackend } from './backend/public_api';\nimport {\n DAFF_IN_MEMORY_DRIVER_CONFIG_DEFAULT,\n DaffInMemoryDriverConfig,\n provideDaffInMemoryDriverConfig,\n} from './config/public_api';\n\n/**\n * Sets up the angular in memory web API with the {@link DaffInMemoryRootBackend}.\n */\n@NgModule()\nexport class DaffInMemoryDriverModule {\n static forRoot(config: DaffInMemoryDriverConfig = DAFF_IN_MEMORY_DRIVER_CONFIG_DEFAULT): ModuleWithProviders<DaffInMemoryDriverModule> {\n return {\n ngModule: DaffInMemoryDriverModule,\n providers: [\n importProvidersFrom(HttpClientInMemoryWebApiModule.forRoot(DaffInMemoryRootBackend, config)),\n provideDaffInMemoryDriverConfig(config),\n ],\n };\n }\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from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uB,EAAE,MAAM,CAAC,CAAC;gBAC5F,+BAA+B,CAAC,MAAM,CAAC;AACxC,aAAA;SACF,CAAC;KACH;8GATU,wBAAwB,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,QAAA,EAAA,CAAA,CAAA,EAAA;+GAAxB,wBAAwB,EAAA,CAAA,CAAA,EAAA;+GAAxB,wBAAwB,EAAA,CAAA,CAAA,EAAA;;2FAAxB,wBAAwB,EAAA,UAAA,EAAA,CAAA;kBADpC,QAAQ;;;ACjBT;;AAEG;;;;"}
@@ -1,7 +1,7 @@
1
- import { DaffInheritableError, daffIsError, DaffSortDirectionEnum } from '@daffodil/core';
2
- import { DaffDriverNetworkError, DAFF_DRIVER_HTTP_CLIENT_CACHE_SERVICE } from '@daffodil/driver';
1
+ import { DaffInheritableError, daffIsError, createMultiInjectionToken, DaffSortDirectionEnum } from '@daffodil/core';
2
+ import { DaffDriverNetworkError, provideDaffDriverHttpClientCacheService } from '@daffodil/driver';
3
3
  import * as i0 from '@angular/core';
4
- import { InjectionToken, Injectable, Inject, PLATFORM_ID, NgModule } from '@angular/core';
4
+ import { Injectable, Inject, PLATFORM_ID, NgModule } from '@angular/core';
5
5
  import { ApolloLink } from '@apollo/client/core';
6
6
  import { isPlatformBrowser } from '@angular/common';
7
7
  import { gql } from 'apollo-angular';
@@ -138,13 +138,13 @@ function daffTransformMagentoError(error, map) {
138
138
  ;
139
139
 
140
140
  /**
141
- * @deprecated use {@link DaffDriverNetworkError} instead.
141
+ * @deprecated use {@link DaffDriverNetworkError} instead. Deprecated in version 0.78.0. Will be removed in version 0.81.0.
142
142
  */
143
143
  const DAFF_DRIVER_MAGENTO_NETWORK_ERROR_CODE = 'DAFF_DRIVER_MAGENTO_NETWORK_ERROR';
144
144
  /**
145
145
  * An error thrown when the Magento driver encountered a problem with network connectivity.
146
146
  *
147
- * @deprecated use {@link DaffDriverNetworkError} instead.
147
+ * @deprecated use {@link DaffDriverNetworkError} instead. Deprecated in version 0.78.0. Will be removed in version 0.81.0.
148
148
  */
149
149
  class DaffDriverMagentoNetworkError extends DaffInheritableError {
150
150
  constructor(message) {
@@ -159,13 +159,18 @@ var MagentoSortEnum;
159
159
  MagentoSortEnum["DESC"] = "DESC";
160
160
  })(MagentoSortEnum || (MagentoSortEnum = {}));
161
161
 
162
+ const {
162
163
  /**
163
164
  * A multi-provider injection token of the operation names of magento queries that should
164
165
  * be cached. This is needed because queries need to be converted into GET queries in order for Magento
165
166
  * to cache them. This token should be used by daffodil driver platform modules to register operation names that are cacheable, and is
166
167
  * intended for internal daffodil use only.
167
168
  */
168
- const DAFF_MAGENTO_CACHEABLE_OPERATIONS = new InjectionToken('DAFF_MAGENTO_CACHEABLE_OPERATIONS', { factory: () => [] });
169
+ token: DAFF_MAGENTO_CACHEABLE_OPERATIONS,
170
+ /**
171
+ * Adds many operation names to the list of cacheable Magento operations. Use only with Angular 9+.
172
+ */
173
+ provider: provideManyDaffMagentoCacheableOperations, } = createMultiInjectionToken('DAFF_MAGENTO_CACHEABLE_OPERATIONS');
169
174
  /**
170
175
  * Adds an operation name to the list of cacheable Magento operations. Use only with Angular 9+.
171
176
  */
@@ -176,16 +181,6 @@ function provideDaffMagentoCacheableOperation(operationName) {
176
181
  multi: true,
177
182
  };
178
183
  }
179
- /**
180
- * Adds many operation names to the list of cacheable Magento operations. Use only with Angular 9+.
181
- */
182
- function provideManyDaffMagentoCacheableOperations(...operationNames) {
183
- return operationNames.map(name => ({
184
- provide: DAFF_MAGENTO_CACHEABLE_OPERATIONS,
185
- useValue: name,
186
- multi: true,
187
- }));
188
- }
189
184
 
190
185
  /**
191
186
  * A service that will convert cacheable apollo operations into a format that Magento will understand as cacheable.
@@ -556,20 +551,14 @@ class DaffDriverMagentoModule {
556
551
  static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.2", ngImport: i0, type: DaffDriverMagentoModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
557
552
  static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "18.2.2", ngImport: i0, type: DaffDriverMagentoModule }); }
558
553
  static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "18.2.2", ngImport: i0, type: DaffDriverMagentoModule, providers: [
559
- {
560
- provide: DAFF_DRIVER_HTTP_CLIENT_CACHE_SERVICE,
561
- useExisting: DaffDriverHttpClientCacheMagentoService,
562
- },
554
+ provideDaffDriverHttpClientCacheService(DaffDriverHttpClientCacheMagentoService),
563
555
  ] }); }
564
556
  }
565
557
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.2", ngImport: i0, type: DaffDriverMagentoModule, decorators: [{
566
558
  type: NgModule,
567
559
  args: [{
568
560
  providers: [
569
- {
570
- provide: DAFF_DRIVER_HTTP_CLIENT_CACHE_SERVICE,
571
- useExisting: DaffDriverHttpClientCacheMagentoService,
572
- },
561
+ provideDaffDriverHttpClientCacheService(DaffDriverHttpClientCacheMagentoService),
573
562
  ],
574
563
  }]
575
564
  }] });
@@ -1 +1 @@
1
- {"version":3,"file":"daffodil-driver-magento.mjs","sources":["../../../libs/driver/magento/src/schema/schema.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/errors/network-error.class.ts","../../../libs/driver/magento/src/models/sort.enum.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/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/magento.module.ts","../../../libs/driver/magento/src/daffodil-driver-magento.ts"],"sourcesContent":["import introspectionQueryResultData from './introspection.json';\n\nexport const schema = introspectionQueryResultData;\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 { GraphQLError } 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: GraphQLError,\n map: T,\n): DaffError {\n const ErrorClass = map[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","import {\n DaffError,\n DaffInheritableError,\n} from '@daffodil/core';\n\n/**\n * @deprecated use {@link DaffDriverNetworkError} instead.\n */\nexport const DAFF_DRIVER_MAGENTO_NETWORK_ERROR_CODE = 'DAFF_DRIVER_MAGENTO_NETWORK_ERROR';\n\n/**\n * An error thrown when the Magento driver encountered a problem with network connectivity.\n *\n * @deprecated use {@link DaffDriverNetworkError} instead.\n */\nexport class DaffDriverMagentoNetworkError extends DaffInheritableError implements DaffError {\n public readonly code: string = DAFF_DRIVER_MAGENTO_NETWORK_ERROR_CODE;\n\n constructor(message?: string) {\n super(message);\n }\n}\n","export enum MagentoSortEnum {\n ASC = 'ASC',\n DESC = 'DESC'\n}\n","import { InjectionToken } from '@angular/core';\n\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 */\nexport const DAFF_MAGENTO_CACHEABLE_OPERATIONS = new InjectionToken<string[]>('DAFF_MAGENTO_CACHEABLE_OPERATIONS', { factory: () => []});\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\n/**\n * Adds many operation names to the list of cacheable Magento operations. Use only with Angular 9+.\n */\nexport function provideManyDaffMagentoCacheableOperations(...operationNames: string[]) {\n return operationNames.map(name => ({\n provide: DAFF_MAGENTO_CACHEABLE_OPERATIONS,\n useValue: name,\n multi: true,\n }));\n}\n","import {\n Inject,\n Injectable,\n} from '@angular/core';\nimport { ApolloLink } from '@apollo/client/core';\n\nimport { DaffApolloLinkGenerator } from '@daffodil/core/graphql';\n\nimport { DAFF_MAGENTO_CACHEABLE_OPERATIONS } from './cacheable-operations-token';\n\n/**\n * A service that will convert cacheable apollo operations into a format that Magento will understand as cacheable.\n *\n * @inheritdoc\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 // eslint-disable-next-line no-unused-vars\n merge: (existing, incoming) => incoming,\n },\n available_payment_methods: {\n // eslint-disable-next-line no-unused-vars\n merge: (existing, incoming) => incoming,\n },\n items: {\n // eslint-disable-next-line no-unused-vars\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 // eslint-disable-next-line no-unused-vars\n merge: (existing, incoming) => incoming,\n },\n },\n },\n CustomerPaymentTokens: {\n keyFields: () => 'CustomerPaymentTokens',\n fields: {\n items: {\n // eslint-disable-next-line no-unused-vars\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 { Injectable } from '@angular/core';\nimport { ApolloLink } from '@apollo/client/core';\n\nimport { DaffApolloLinkGenerator } 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 *\n * @inheritdoc\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 { 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","import { NgModule } from '@angular/core';\n\nimport { DAFF_DRIVER_HTTP_CLIENT_CACHE_SERVICE } from '@daffodil/driver';\n\nimport { DaffDriverHttpClientCacheMagentoService } from './graphql/cache.service';\n\n@NgModule({\n providers: [\n {\n provide: DAFF_DRIVER_HTTP_CLIENT_CACHE_SERVICE,\n useExisting: DaffDriverHttpClientCacheMagentoService,\n },\n ],\n})\nexport class Daff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,EAAE,qCAAqC;AAC9C,4BAAA,WAAW,EAAE,uCAAuC;AACrD,yBAAA;AACF,qBAAA;AACF,iBAAA,CAAA;;;ACbD;;AAEG;;;;"}
1
+ {"version":3,"file":"daffodil-driver-magento.mjs","sources":["../../../libs/driver/magento/src/schema/schema.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/errors/network-error.class.ts","../../../libs/driver/magento/src/models/sort.enum.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/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/magento.module.ts","../../../libs/driver/magento/src/daffodil-driver-magento.ts"],"sourcesContent":["import introspectionQueryResultData from './introspection.json';\n\nexport const schema = introspectionQueryResultData;\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 { GraphQLError } 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: GraphQLError,\n map: T,\n): DaffError {\n const ErrorClass = map[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","import {\n DaffError,\n DaffInheritableError,\n} from '@daffodil/core';\n\n/**\n * @deprecated use {@link DaffDriverNetworkError} instead. Deprecated in version 0.78.0. Will be removed in version 0.81.0.\n */\nexport const DAFF_DRIVER_MAGENTO_NETWORK_ERROR_CODE = 'DAFF_DRIVER_MAGENTO_NETWORK_ERROR';\n\n/**\n * An error thrown when the Magento driver encountered a problem with network connectivity.\n *\n * @deprecated use {@link DaffDriverNetworkError} instead. Deprecated in version 0.78.0. Will be removed in version 0.81.0.\n */\nexport class DaffDriverMagentoNetworkError extends DaffInheritableError implements DaffError {\n public readonly code: string = DAFF_DRIVER_MAGENTO_NETWORK_ERROR_CODE;\n\n constructor(message?: string) {\n super(message);\n }\n}\n","export enum MagentoSortEnum {\n ASC = 'ASC',\n DESC = 'DESC'\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 Injectable,\n} from '@angular/core';\nimport { ApolloLink } from '@apollo/client/core';\n\nimport { DaffApolloLinkGenerator } from '@daffodil/core/graphql';\n\nimport { DAFF_MAGENTO_CACHEABLE_OPERATIONS } from './cacheable-operations-token';\n\n/**\n * A service that will convert cacheable apollo operations into a format that Magento will understand as cacheable.\n *\n * @inheritdoc\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 // eslint-disable-next-line no-unused-vars\n merge: (existing, incoming) => incoming,\n },\n available_payment_methods: {\n // eslint-disable-next-line no-unused-vars\n merge: (existing, incoming) => incoming,\n },\n items: {\n // eslint-disable-next-line no-unused-vars\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 // eslint-disable-next-line no-unused-vars\n merge: (existing, incoming) => incoming,\n },\n },\n },\n CustomerPaymentTokens: {\n keyFields: () => 'CustomerPaymentTokens',\n fields: {\n items: {\n // eslint-disable-next-line no-unused-vars\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 { Injectable } from '@angular/core';\nimport { ApolloLink } from '@apollo/client/core';\n\nimport { DaffApolloLinkGenerator } 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 *\n * @inheritdoc\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 { 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","import { NgModule } from '@angular/core';\n\nimport { provideDaffDriverHttpClientCacheService } from '@daffodil/driver';\n\nimport { DaffDriverHttpClientCacheMagentoService } from './graphql/cache.service';\n\n@NgModule({\n providers: [\n provideDaffDriverHttpClientCacheService(DaffDriverHttpClientCacheMagentoService),\n ],\n})\nexport class DaffDriverMagentoModule {}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":["map"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAEO,MAAM,MAAM,GAAG;;ACGf,MAAM,8BAA8B,GAAG,4BAA4B;AAE1E;;AAEG;AACG,MAAO,sBAAuB,SAAQ,oBAAoB,CAAA;AAG9D,IAAA,WAAA,CAAY,OAAgB,EAAA;QAC1B,KAAK,CAAC,OAAO,CAAC,CAAC;QAHD,IAAI,CAAA,IAAA,GAAW,8BAA8B,CAAC;KAI7D;AACF;;ACPe,SAAA,gCAAgC,CAC9C,KAAmB,EACnB,GAAM,EAAA;AAEN,IAAA,MAAM,UAAU,GAAG,GAAG,CAAC,KAAK,EAAE,UAAU,EAAE,QAAQ,CAAC,IAAI,sBAAsB,CAAC;AAE9E,IAAA,OAAO,IAAI,UAAU,CAAC,KAAK,CAAC,OAAO,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AA,OAAA,EAAA,QAAA,EAAA,QAAA,EAAA,EAAA,EAAA,IAAA,EAAA,uBAAuB,EAJvB,SAAA,EAAA;YACT,uCAAuC,CAAC,uCAAuC,CAAC;AACjF,SAAA,EAAA,CAAA,CAAA,EAAA;;2FAEU,uBAAuB,EAAA,UAAA,EAAA,CAAA;kBALnC,QAAQ;AAAC,YAAA,IAAA,EAAA,CAAA;AACR,oBAAA,SAAS,EAAE;wBACT,uCAAuC,CAAC,uCAAuC,CAAC;AACjF,qBAAA;AACF,iBAAA,CAAA;;;ACVD;;AAEG;;;;"}
@@ -1,6 +1,6 @@
1
- import { DaffInheritableError } from '@daffodil/core';
1
+ import { DaffInheritableError, createSingletonInjectionToken } from '@daffodil/core';
2
2
  import * as i0 from '@angular/core';
3
- import { Injectable, InjectionToken, inject } from '@angular/core';
3
+ import { Injectable, inject } from '@angular/core';
4
4
 
5
5
  var DaffDriverErrorCodes;
6
6
  (function (DaffDriverErrorCodes) {
@@ -43,11 +43,15 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.2", ngImpor
43
43
  }]
44
44
  }] });
45
45
 
46
- const DAFF_DRIVER_HTTP_CLIENT_CACHE_SERVICE = new InjectionToken('DAFF_DRIVER_HTTP_CLIENT_CACHE_SERVICE', { factory: () => inject(DaffDriverHttpClientCacheNoopService) });
46
+ const { token: DAFF_DRIVER_HTTP_CLIENT_CACHE_SERVICE,
47
+ /**
48
+ * Provider function for {@link DAFF_DRIVER_HTTP_CLIENT_CACHE_SERVICE}.
49
+ */
50
+ provider: provideDaffDriverHttpClientCacheService, } = createSingletonInjectionToken('DAFF_DRIVER_HTTP_CLIENT_CACHE_SERVICE', { factory: () => inject(DaffDriverHttpClientCacheNoopService) });
47
51
 
48
52
  /**
49
53
  * Generated bundle index. Do not edit.
50
54
  */
51
55
 
52
- export { DAFF_DRIVER_HTTP_CLIENT_CACHE_SERVICE, DAFF_DRIVER_NETWORK_ERROR_CODE, DaffBadInputError, DaffDriverErrorCodes, DaffDriverHttpClientCacheNoopService, DaffDriverNetworkError };
56
+ export { DAFF_DRIVER_HTTP_CLIENT_CACHE_SERVICE, DAFF_DRIVER_NETWORK_ERROR_CODE, DaffBadInputError, DaffDriverErrorCodes, DaffDriverHttpClientCacheNoopService, DaffDriverNetworkError, provideDaffDriverHttpClientCacheService };
53
57
  //# sourceMappingURL=daffodil-driver.mjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"daffodil-driver.mjs","sources":["../../../libs/driver/src/errors/codes.ts","../../../libs/driver/src/errors/bad-input.ts","../../../libs/driver/src/errors/network-error.class.ts","../../../libs/driver/src/http-client-cache/noop.service.ts","../../../libs/driver/src/http-client-cache/service.token.ts","../../../libs/driver/src/daffodil-driver.ts"],"sourcesContent":["export enum DaffDriverErrorCodes {\n BAD_INPUT = 'DAFF_BAD_INPUT'\n}\n","import {\n DaffError,\n DaffInheritableError,\n} from '@daffodil/core';\n\nimport { DaffDriverErrorCodes } from './codes';\n\nexport class DaffBadInputError extends DaffInheritableError implements DaffError {\n public readonly code: string = DaffDriverErrorCodes.BAD_INPUT;\n\n constructor(public message: string) {\n super(message);\n }\n}\n","import {\n DaffError,\n DaffInheritableError,\n} from '@daffodil/core';\n\nexport const DAFF_DRIVER_NETWORK_ERROR_CODE = 'DAFF_DRIVER_NETWORK_ERROR';\n\n/**\n * An error thrown when the a driver encounters a problem with network connectivity.\n */\nexport class DaffDriverNetworkError extends DaffInheritableError implements DaffError {\n public readonly code: string = DAFF_DRIVER_NETWORK_ERROR_CODE;\n\n constructor(message?: string) {\n super(message);\n }\n}\n","import { Injectable } from '@angular/core';\n\nimport { DaffDriverHttpClientCacheServiceInterface } from './service.type';\n\n/**\n * A noop service. Always does nothing for every single method.\n *\n * @inheritdoc\n */\n@Injectable({\n providedIn: 'root',\n})\nexport class DaffDriverHttpClientCacheNoopService implements DaffDriverHttpClientCacheServiceInterface {\n reset(): void {}\n}\n","import {\n InjectionToken,\n inject,\n} from '@angular/core';\n\nimport { DaffDriverHttpClientCacheNoopService } from './noop.service';\nimport { DaffDriverHttpClientCacheServiceInterface } from './service.type';\n\nexport const DAFF_DRIVER_HTTP_CLIENT_CACHE_SERVICE = new InjectionToken<DaffDriverHttpClientCacheServiceInterface>('DAFF_DRIVER_HTTP_CLIENT_CACHE_SERVICE', { factory: () => inject(DaffDriverHttpClientCacheNoopService) });\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;IAAY,qBAEX;AAFD,CAAA,UAAY,oBAAoB,EAAA;AAC9B,IAAA,oBAAA,CAAA,WAAA,CAAA,GAAA,gBAA4B,CAAA;AAC9B,CAAC,EAFW,oBAAoB,KAApB,oBAAoB,GAE/B,EAAA,CAAA,CAAA;;ACKK,MAAO,iBAAkB,SAAQ,oBAAoB,CAAA;AAGzD,IAAA,WAAA,CAAmB,OAAe,EAAA;QAChC,KAAK,CAAC,OAAO,CAAC,CAAC;QADE,IAAO,CAAA,OAAA,GAAP,OAAO,CAAQ;AAFlB,QAAA,IAAA,CAAA,IAAI,GAAW,oBAAoB,CAAC,SAAS,CAAC;KAI7D;AACF;;ACRM,MAAM,8BAA8B,GAAG,4BAA4B;AAE1E;;AAEG;AACG,MAAO,sBAAuB,SAAQ,oBAAoB,CAAA;AAG9D,IAAA,WAAA,CAAY,OAAgB,EAAA;QAC1B,KAAK,CAAC,OAAO,CAAC,CAAC;QAHD,IAAI,CAAA,IAAA,GAAW,8BAA8B,CAAC;KAI7D;AACF;;ACZD;;;;AAIG;MAIU,oCAAoC,CAAA;AAC/C,IAAA,KAAK,MAAW;8GADL,oCAAoC,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,UAAA,EAAA,CAAA,CAAA,EAAA;AAApC,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,oCAAoC,cAFnC,MAAM,EAAA,CAAA,CAAA,EAAA;;2FAEP,oCAAoC,EAAA,UAAA,EAAA,CAAA;kBAHhD,UAAU;AAAC,YAAA,IAAA,EAAA,CAAA;AACV,oBAAA,UAAU,EAAE,MAAM;AACnB,iBAAA,CAAA;;;MCHY,qCAAqC,GAAG,IAAI,cAAc,CAA4C,uCAAuC,EAAE,EAAE,OAAO,EAAE,MAAM,MAAM,CAAC,oCAAoC,CAAC,EAAE;;ACR3N;;AAEG;;;;"}
1
+ {"version":3,"file":"daffodil-driver.mjs","sources":["../../../libs/driver/src/errors/codes.ts","../../../libs/driver/src/errors/bad-input.ts","../../../libs/driver/src/errors/network-error.class.ts","../../../libs/driver/src/http-client-cache/noop.service.ts","../../../libs/driver/src/http-client-cache/service.token.ts","../../../libs/driver/src/daffodil-driver.ts"],"sourcesContent":["export enum DaffDriverErrorCodes {\n BAD_INPUT = 'DAFF_BAD_INPUT'\n}\n","import {\n DaffError,\n DaffInheritableError,\n} from '@daffodil/core';\n\nimport { DaffDriverErrorCodes } from './codes';\n\nexport class DaffBadInputError extends DaffInheritableError implements DaffError {\n public readonly code: string = DaffDriverErrorCodes.BAD_INPUT;\n\n constructor(public message: string) {\n super(message);\n }\n}\n","import {\n DaffError,\n DaffInheritableError,\n} from '@daffodil/core';\n\nexport const DAFF_DRIVER_NETWORK_ERROR_CODE = 'DAFF_DRIVER_NETWORK_ERROR';\n\n/**\n * An error thrown when the a driver encounters a problem with network connectivity.\n */\nexport class DaffDriverNetworkError extends DaffInheritableError implements DaffError {\n public readonly code: string = DAFF_DRIVER_NETWORK_ERROR_CODE;\n\n constructor(message?: string) {\n super(message);\n }\n}\n","import { Injectable } from '@angular/core';\n\nimport { DaffDriverHttpClientCacheServiceInterface } from './service.type';\n\n/**\n * A noop service. Always does nothing for every single method.\n *\n * @inheritdoc\n */\n@Injectable({\n providedIn: 'root',\n})\nexport class DaffDriverHttpClientCacheNoopService implements DaffDriverHttpClientCacheServiceInterface {\n reset(): void {}\n}\n","import { inject } from '@angular/core';\n\nimport { createSingletonInjectionToken } from '@daffodil/core';\n\nimport { DaffDriverHttpClientCacheNoopService } from './noop.service';\nimport { DaffDriverHttpClientCacheServiceInterface } from './service.type';\n\nexport const {\n token: DAFF_DRIVER_HTTP_CLIENT_CACHE_SERVICE,\n /**\n * Provider function for {@link DAFF_DRIVER_HTTP_CLIENT_CACHE_SERVICE}.\n */\n provider: provideDaffDriverHttpClientCacheService,\n} = createSingletonInjectionToken<DaffDriverHttpClientCacheServiceInterface>(\n 'DAFF_DRIVER_HTTP_CLIENT_CACHE_SERVICE',\n { factory: () => inject(DaffDriverHttpClientCacheNoopService) },\n);\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;IAAY,qBAEX;AAFD,CAAA,UAAY,oBAAoB,EAAA;AAC9B,IAAA,oBAAA,CAAA,WAAA,CAAA,GAAA,gBAA4B,CAAA;AAC9B,CAAC,EAFW,oBAAoB,KAApB,oBAAoB,GAE/B,EAAA,CAAA,CAAA;;ACKK,MAAO,iBAAkB,SAAQ,oBAAoB,CAAA;AAGzD,IAAA,WAAA,CAAmB,OAAe,EAAA;QAChC,KAAK,CAAC,OAAO,CAAC,CAAC;QADE,IAAO,CAAA,OAAA,GAAP,OAAO,CAAQ;AAFlB,QAAA,IAAA,CAAA,IAAI,GAAW,oBAAoB,CAAC,SAAS,CAAC;KAI7D;AACF;;ACRM,MAAM,8BAA8B,GAAG,4BAA4B;AAE1E;;AAEG;AACG,MAAO,sBAAuB,SAAQ,oBAAoB,CAAA;AAG9D,IAAA,WAAA,CAAY,OAAgB,EAAA;QAC1B,KAAK,CAAC,OAAO,CAAC,CAAC;QAHD,IAAI,CAAA,IAAA,GAAW,8BAA8B,CAAC;KAI7D;AACF;;ACZD;;;;AAIG;MAIU,oCAAoC,CAAA;AAC/C,IAAA,KAAK,MAAW;8GADL,oCAAoC,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,UAAA,EAAA,CAAA,CAAA,EAAA;AAApC,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,oCAAoC,cAFnC,MAAM,EAAA,CAAA,CAAA,EAAA;;2FAEP,oCAAoC,EAAA,UAAA,EAAA,CAAA;kBAHhD,UAAU;AAAC,YAAA,IAAA,EAAA,CAAA;AACV,oBAAA,UAAU,EAAE,MAAM;AACnB,iBAAA,CAAA;;;ACJM,MAAM,EACX,KAAK,EAAE,qCAAqC;AAC5C;;AAEG;AACH,QAAQ,EAAE,uCAAuC,GAClD,GAAG,6BAA6B,CAC/B,uCAAuC,EACvC,EAAE,OAAO,EAAE,MAAM,MAAM,CAAC,oCAAoC,CAAC,EAAE;;ACfjE;;AAEG;;;;"}
@@ -1,3 +1,2 @@
1
- import { InjectionToken } from '@angular/core';
2
1
  import { DaffDriverHttpClientCacheServiceInterface } from './service.type';
3
- export declare const DAFF_DRIVER_HTTP_CLIENT_CACHE_SERVICE: InjectionToken<DaffDriverHttpClientCacheServiceInterface>;
2
+ export declare const DAFF_DRIVER_HTTP_CLIENT_CACHE_SERVICE: import("@angular/core").InjectionToken<DaffDriverHttpClientCacheServiceInterface>, provideDaffDriverHttpClientCacheService: <R extends DaffDriverHttpClientCacheServiceInterface = DaffDriverHttpClientCacheServiceInterface>(klass: import("@angular/core").Type<R>) => import("@angular/core").ExistingProvider;
@@ -1,2 +1,2 @@
1
1
  import { DaffInMemoryDriverConfig } from './type';
2
- export declare const DAFF_IN_MEMORY_DRIVER_CONFIG: import("@angular/core").InjectionToken<DaffInMemoryDriverConfig>, provideDaffInMemoryDriverConfig: <R extends DaffInMemoryDriverConfig = DaffInMemoryDriverConfig>(config: Partial<R>) => import("@angular/core").ValueProvider;
2
+ export declare const DAFF_IN_MEMORY_DRIVER_CONFIG: import("@angular/core").InjectionToken<DaffInMemoryDriverConfig>, provideDaffInMemoryDriverConfig: <R extends DaffInMemoryDriverConfig = DaffInMemoryDriverConfig>(config: Partial<R> | import("@angular/core").InjectionToken<Partial<R>>) => import("@angular/core").FactoryProvider;
@@ -1,12 +1,12 @@
1
1
  import { DaffError, DaffInheritableError } from '@daffodil/core';
2
2
  /**
3
- * @deprecated use {@link DaffDriverNetworkError} instead.
3
+ * @deprecated use {@link DaffDriverNetworkError} instead. Deprecated in version 0.78.0. Will be removed in version 0.81.0.
4
4
  */
5
5
  export declare const DAFF_DRIVER_MAGENTO_NETWORK_ERROR_CODE = "DAFF_DRIVER_MAGENTO_NETWORK_ERROR";
6
6
  /**
7
7
  * An error thrown when the Magento driver encountered a problem with network connectivity.
8
8
  *
9
- * @deprecated use {@link DaffDriverNetworkError} instead.
9
+ * @deprecated use {@link DaffDriverNetworkError} instead. Deprecated in version 0.78.0. Will be removed in version 0.81.0.
10
10
  */
11
11
  export declare class DaffDriverMagentoNetworkError extends DaffInheritableError implements DaffError {
12
12
  readonly code: string;
@@ -1,24 +1,9 @@
1
- import { InjectionToken } from '@angular/core';
2
- /**
3
- * A multi-provider injection token of the operation names of magento queries that should
4
- * be cached. This is needed because queries need to be converted into GET queries in order for Magento
5
- * to cache them. This token should be used by daffodil driver platform modules to register operation names that are cacheable, and is
6
- * intended for internal daffodil use only.
7
- */
8
- export declare const DAFF_MAGENTO_CACHEABLE_OPERATIONS: InjectionToken<string[]>;
1
+ export declare const DAFF_MAGENTO_CACHEABLE_OPERATIONS: import("@angular/core").InjectionToken<string[]>, provideManyDaffMagentoCacheableOperations: <R extends string = string>(...values: R[]) => Array<import("@angular/core").ValueProvider>;
9
2
  /**
10
3
  * Adds an operation name to the list of cacheable Magento operations. Use only with Angular 9+.
11
4
  */
12
5
  export declare function provideDaffMagentoCacheableOperation(operationName: string): {
13
- provide: InjectionToken<string[]>;
6
+ provide: import("@angular/core").InjectionToken<string[]>;
14
7
  useValue: string;
15
8
  multi: boolean;
16
9
  };
17
- /**
18
- * Adds many operation names to the list of cacheable Magento operations. Use only with Angular 9+.
19
- */
20
- export declare function provideManyDaffMagentoCacheableOperations(...operationNames: string[]): {
21
- provide: InjectionToken<string[]>;
22
- useValue: string;
23
- multi: boolean;
24
- }[];
package/package.json CHANGED
@@ -1 +1 @@
1
- {"name":"@daffodil/driver","nx":{"targets":{"build":{"outputs":["{workspaceRoot}/dist/driver"]}}},"version":"0.78.0","description":"A consistent, sane api driver that works with different ecommerce systems.","repository":{"type":"git","url":"https://github.com/graycoreio/daffodil"},"author":"Graycore LLC","license":"MIT","bugs":{"url":"https://github.com/graycoreio/daffodil/issues"},"homepage":"https://github.com/graycoreio/daffodil","optionalDependencies":{"angular-in-memory-web-api":"^0.18.0"},"peerDependencies":{"@angular/common":"^18.2.2","@angular/core":"^18.2.2","rxjs":"7.8.1"},"module":"fesm2022/daffodil-driver.mjs","typings":"index.d.ts","exports":{"./package.json":{"default":"./package.json"},".":{"types":"./index.d.ts","esm2022":"./esm2022/daffodil-driver.mjs","esm":"./esm2022/daffodil-driver.mjs","default":"./fesm2022/daffodil-driver.mjs"},"./hubspot":{"types":"./hubspot/index.d.ts","esm2022":"./esm2022/hubspot/daffodil-driver-hubspot.mjs","esm":"./esm2022/hubspot/daffodil-driver-hubspot.mjs","default":"./fesm2022/daffodil-driver-hubspot.mjs"},"./in-memory":{"types":"./in-memory/index.d.ts","esm2022":"./esm2022/in-memory/daffodil-driver-in-memory.mjs","esm":"./esm2022/in-memory/daffodil-driver-in-memory.mjs","default":"./fesm2022/daffodil-driver-in-memory.mjs"},"./magento":{"types":"./magento/index.d.ts","esm2022":"./esm2022/magento/daffodil-driver-magento.mjs","esm":"./esm2022/magento/daffodil-driver-magento.mjs","default":"./fesm2022/daffodil-driver-magento.mjs"},"./magento/testing":{"types":"./magento/testing/index.d.ts","esm2022":"./esm2022/magento/testing/daffodil-driver-magento-testing.mjs","esm":"./esm2022/magento/testing/daffodil-driver-magento-testing.mjs","default":"./fesm2022/daffodil-driver-magento-testing.mjs"}},"sideEffects":false,"dependencies":{"tslib":"^2.3.0"}}
1
+ {"name":"@daffodil/driver","nx":{"targets":{"build":{"outputs":["{workspaceRoot}/dist/driver"]}}},"version":"0.79.0","description":"A consistent, sane api driver that works with different ecommerce systems.","repository":{"type":"git","url":"https://github.com/graycoreio/daffodil"},"author":"Graycore LLC","license":"MIT","bugs":{"url":"https://github.com/graycoreio/daffodil/issues"},"homepage":"https://github.com/graycoreio/daffodil","optionalDependencies":{"angular-in-memory-web-api":"^0.18.0"},"peerDependencies":{"@angular/common":"^18.2.2","@angular/core":"^18.2.2","rxjs":"7.8.1"},"module":"fesm2022/daffodil-driver.mjs","typings":"index.d.ts","exports":{"./package.json":{"default":"./package.json"},".":{"types":"./index.d.ts","esm2022":"./esm2022/daffodil-driver.mjs","esm":"./esm2022/daffodil-driver.mjs","default":"./fesm2022/daffodil-driver.mjs"},"./hubspot":{"types":"./hubspot/index.d.ts","esm2022":"./esm2022/hubspot/daffodil-driver-hubspot.mjs","esm":"./esm2022/hubspot/daffodil-driver-hubspot.mjs","default":"./fesm2022/daffodil-driver-hubspot.mjs"},"./in-memory":{"types":"./in-memory/index.d.ts","esm2022":"./esm2022/in-memory/daffodil-driver-in-memory.mjs","esm":"./esm2022/in-memory/daffodil-driver-in-memory.mjs","default":"./fesm2022/daffodil-driver-in-memory.mjs"},"./magento":{"types":"./magento/index.d.ts","esm2022":"./esm2022/magento/daffodil-driver-magento.mjs","esm":"./esm2022/magento/daffodil-driver-magento.mjs","default":"./fesm2022/daffodil-driver-magento.mjs"},"./magento/testing":{"types":"./magento/testing/index.d.ts","esm2022":"./esm2022/magento/testing/daffodil-driver-magento-testing.mjs","esm":"./esm2022/magento/testing/daffodil-driver-magento-testing.mjs","default":"./fesm2022/daffodil-driver-magento-testing.mjs"}},"sideEffects":false,"dependencies":{"tslib":"^2.3.0"}}