@daffodil/geography 0.88.1 → 0.89.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.
Files changed (105) hide show
  1. package/driver/in-memory/index.d.ts +59 -1
  2. package/driver/index.d.ts +32 -1
  3. package/driver/magento/index.d.ts +95 -1
  4. package/driver/testing/index.d.ts +29 -1
  5. package/fesm2022/daffodil-geography-driver-in-memory.mjs +10 -10
  6. package/fesm2022/daffodil-geography-driver-in-memory.mjs.map +1 -1
  7. package/fesm2022/daffodil-geography-driver-magento.mjs +13 -13
  8. package/fesm2022/daffodil-geography-driver-magento.mjs.map +1 -1
  9. package/fesm2022/daffodil-geography-driver-testing.mjs +7 -7
  10. package/fesm2022/daffodil-geography-driver-testing.mjs.map +1 -1
  11. package/fesm2022/daffodil-geography-driver.mjs.map +1 -1
  12. package/fesm2022/daffodil-geography-state-testing.mjs +7 -7
  13. package/fesm2022/daffodil-geography-state-testing.mjs.map +1 -1
  14. package/fesm2022/daffodil-geography-state.mjs +10 -10
  15. package/fesm2022/daffodil-geography-state.mjs.map +1 -1
  16. package/fesm2022/daffodil-geography-testing.mjs +12 -12
  17. package/fesm2022/daffodil-geography-testing.mjs.map +1 -1
  18. package/fesm2022/daffodil-geography.mjs.map +1 -1
  19. package/index.d.ts +77 -1
  20. package/package.json +1 -1
  21. package/state/index.d.ts +163 -1
  22. package/state/testing/index.d.ts +33 -1
  23. package/testing/index.d.ts +63 -1
  24. package/comparators/address.d.ts +0 -8
  25. package/comparators/personal-address.d.ts +0 -8
  26. package/comparators/public_api.d.ts +0 -2
  27. package/driver/errors/country-not-found.d.ts +0 -6
  28. package/driver/errors/invalid-api-response.d.ts +0 -6
  29. package/driver/errors/public_api.d.ts +0 -2
  30. package/driver/in-memory/backend/geography.service.d.ts +0 -32
  31. package/driver/in-memory/collection-name.const.d.ts +0 -1
  32. package/driver/in-memory/drivers/geography-driver.module.d.ts +0 -9
  33. package/driver/in-memory/drivers/geography.service.d.ts +0 -18
  34. package/driver/in-memory/drivers/public_api.d.ts +0 -2
  35. package/driver/in-memory/public_api.d.ts +0 -2
  36. package/driver/interfaces/geography-service.interface.d.ts +0 -13
  37. package/driver/magento/errors/codes.d.ts +0 -3
  38. package/driver/magento/errors/map.d.ts +0 -2
  39. package/driver/magento/errors/transform.d.ts +0 -1
  40. package/driver/magento/geography-driver.module.d.ts +0 -9
  41. package/driver/magento/geography.service.d.ts +0 -20
  42. package/driver/magento/models/responses/country.d.ts +0 -10
  43. package/driver/magento/models/responses/public_api.d.ts +0 -2
  44. package/driver/magento/models/responses/region.d.ts +0 -6
  45. package/driver/magento/public_api.d.ts +0 -6
  46. package/driver/magento/queries/fragments/country.d.ts +0 -1
  47. package/driver/magento/queries/fragments/public_api.d.ts +0 -2
  48. package/driver/magento/queries/fragments/region.d.ts +0 -1
  49. package/driver/magento/queries/get-countries.d.ts +0 -2
  50. package/driver/magento/queries/get-country.d.ts +0 -2
  51. package/driver/magento/queries/public_api.d.ts +0 -4
  52. package/driver/magento/queries/responses/get-countries.d.ts +0 -4
  53. package/driver/magento/queries/responses/get-country.d.ts +0 -4
  54. package/driver/magento/queries/responses/public_api.d.ts +0 -2
  55. package/driver/magento/transforms/responses/country.service.d.ts +0 -18
  56. package/driver/magento/transforms/responses/subdivision.service.d.ts +0 -14
  57. package/driver/magento/validators/get-countries.d.ts +0 -3
  58. package/driver/magento/validators/public_api.d.ts +0 -1
  59. package/driver/public_api.d.ts +0 -2
  60. package/driver/testing/drivers/geography-driver.module.d.ts +0 -9
  61. package/driver/testing/drivers/geography.service.d.ts +0 -17
  62. package/driver/testing/drivers/public_api.d.ts +0 -2
  63. package/driver/testing/public_api.d.ts +0 -1
  64. package/models/address.d.ts +0 -18
  65. package/models/country.d.ts +0 -18
  66. package/models/personal-address.d.ts +0 -14
  67. package/models/public_api.d.ts +0 -4
  68. package/models/subdivision.d.ts +0 -9
  69. package/public_api.d.ts +0 -2
  70. package/state/actions/geography.actions.d.ts +0 -40
  71. package/state/actions/public_api.d.ts +0 -1
  72. package/state/effects/geography.effects.d.ts +0 -16
  73. package/state/facades/geography/geography-facade.interface.d.ts +0 -16
  74. package/state/facades/geography/geography.facade.d.ts +0 -30
  75. package/state/geography-state.module.d.ts +0 -8
  76. package/state/injection-tokens/error-matcher.token.d.ts +0 -6
  77. package/state/injection-tokens/public_api.d.ts +0 -1
  78. package/state/public_api.d.ts +0 -7
  79. package/state/reducers/country-entities/country-entities-adapter.d.ts +0 -6
  80. package/state/reducers/country-entities/country-entities-initial-state.d.ts +0 -5
  81. package/state/reducers/country-entities/country-entities-state.interface.d.ts +0 -6
  82. package/state/reducers/country-entities/country-entities.reducer.d.ts +0 -7
  83. package/state/reducers/country-entities/public_api.d.ts +0 -4
  84. package/state/reducers/geography/geography-initial-state.d.ts +0 -2
  85. package/state/reducers/geography/geography-state.interface.d.ts +0 -5
  86. package/state/reducers/geography/geography.reducer.d.ts +0 -4
  87. package/state/reducers/geography/public_api.d.ts +0 -3
  88. package/state/reducers/geography-reducers-state.interface.d.ts +0 -11
  89. package/state/reducers/geography-reducers.d.ts +0 -3
  90. package/state/reducers/geography-store-feature-key.d.ts +0 -1
  91. package/state/reducers/public_api.d.ts +0 -5
  92. package/state/selectors/country-entities.selector.d.ts +0 -16
  93. package/state/selectors/geography-all.selector.d.ts +0 -7
  94. package/state/selectors/geography-feature.selector.d.ts +0 -8
  95. package/state/selectors/geography.selector.d.ts +0 -11
  96. package/state/selectors/public_api.d.ts +0 -1
  97. package/state/testing/geography-testing.module.d.ts +0 -6
  98. package/state/testing/mock-geography-facade.d.ts +0 -24
  99. package/state/testing/public_api.d.ts +0 -2
  100. package/testing/factories/address.factory.d.ts +0 -17
  101. package/testing/factories/country.factory.d.ts +0 -19
  102. package/testing/factories/personal-address.factory.d.ts +0 -18
  103. package/testing/factories/public_api.d.ts +0 -4
  104. package/testing/factories/subdivision.factory.d.ts +0 -13
  105. package/testing/public_api.d.ts +0 -1
@@ -1,6 +0,0 @@
1
- import { EntityAdapter } from '@ngrx/entity';
2
- import { DaffCountry } from '@daffodil/geography';
3
- /**
4
- * Country Adapter for changing/overwriting entity state.
5
- */
6
- export declare const getCountryAdapter: <T extends DaffCountry = DaffCountry>() => EntityAdapter<T>;
@@ -1,5 +0,0 @@
1
- import { DaffCountryEntityState } from './country-entities-state.interface';
2
- /**
3
- * Initial state for country entity state.
4
- */
5
- export declare const daffCountryEntitiesInitialState: DaffCountryEntityState<any>;
@@ -1,6 +0,0 @@
1
- import { EntityState } from '@ngrx/entity';
2
- import { DaffCountry } from '@daffodil/geography';
3
- /**
4
- * Interface for country entity state.
5
- */
6
- export type DaffCountryEntityState<T extends DaffCountry = DaffCountry> = EntityState<T>;
@@ -1,7 +0,0 @@
1
- import { DaffCountry } from '@daffodil/geography';
2
- import { DaffCountryEntityState } from './country-entities-state.interface';
3
- import { DaffGeographyActions } from '../../actions/public_api';
4
- /**
5
- * Reducer function that catches actions and changes/overwrites country entities state.
6
- */
7
- export declare function daffCountryEntitiesReducer<T extends DaffCountry = DaffCountry>(state: DaffCountryEntityState<any>, action: DaffGeographyActions<T>): DaffCountryEntityState<T>;
@@ -1,4 +0,0 @@
1
- export { getCountryAdapter } from './country-entities-adapter';
2
- export { daffCountryEntitiesInitialState } from './country-entities-initial-state';
3
- export { DaffCountryEntityState } from './country-entities-state.interface';
4
- export { daffCountryEntitiesReducer } from './country-entities.reducer';
@@ -1,2 +0,0 @@
1
- import { DaffGeographyReducerState } from './geography-state.interface';
2
- export declare const daffGeographyInitialState: DaffGeographyReducerState;
@@ -1,5 +0,0 @@
1
- import { DaffStateError } from '@daffodil/core/state';
2
- export interface DaffGeographyReducerState {
3
- loading: boolean;
4
- errors: DaffStateError[];
5
- }
@@ -1,4 +0,0 @@
1
- import { DaffCountry } from '@daffodil/geography';
2
- import { DaffGeographyReducerState } from './geography-state.interface';
3
- import { DaffGeographyActions } from '../../actions/public_api';
4
- export declare function daffGeographyReducer<T extends DaffCountry>(state: DaffGeographyReducerState, action: DaffGeographyActions<T>): DaffGeographyReducerState;
@@ -1,3 +0,0 @@
1
- export { daffGeographyReducer } from './geography.reducer';
2
- export { DaffGeographyReducerState } from './geography-state.interface';
3
- export { daffGeographyInitialState } from './geography-initial-state';
@@ -1,11 +0,0 @@
1
- import { DaffCountry } from '@daffodil/geography';
2
- import { DaffCountryEntityState } from './country-entities/country-entities-state.interface';
3
- import { DaffGeographyReducerState } from './geography/geography-state.interface';
4
- import { DAFF_GEOGRAPHY_STORE_FEATURE_KEY } from './geography-store-feature-key';
5
- export interface DaffGeographyFeatureState<T extends DaffCountry = DaffCountry> {
6
- geography: DaffGeographyReducerState;
7
- countries: DaffCountryEntityState<T>;
8
- }
9
- export interface DaffGeographyStateRootSlice<T extends DaffCountry = DaffCountry> {
10
- [DAFF_GEOGRAPHY_STORE_FEATURE_KEY]: DaffGeographyFeatureState<T>;
11
- }
@@ -1,3 +0,0 @@
1
- import { ActionReducerMap } from '@ngrx/store';
2
- import { DaffGeographyFeatureState } from './geography-reducers-state.interface';
3
- export declare const daffGeographyReducers: ActionReducerMap<DaffGeographyFeatureState>;
@@ -1 +0,0 @@
1
- export declare const DAFF_GEOGRAPHY_STORE_FEATURE_KEY = "daffGeography";
@@ -1,5 +0,0 @@
1
- export { daffGeographyReducers } from './geography-reducers';
2
- export { DaffGeographyFeatureState, DaffGeographyStateRootSlice, } from './geography-reducers-state.interface';
3
- export { DAFF_GEOGRAPHY_STORE_FEATURE_KEY } from './geography-store-feature-key';
4
- export * from './country-entities/public_api';
5
- export * from './geography/public_api';
@@ -1,16 +0,0 @@
1
- import { Dictionary } from '@ngrx/entity';
2
- import { MemoizedSelector } from '@ngrx/store';
3
- import { DaffCountry } from '@daffodil/geography';
4
- import { DaffGeographyStateRootSlice } from '../reducers/geography-reducers-state.interface';
5
- import { DaffCountryEntityState } from '../reducers/public_api';
6
- export interface DaffCountryEntitySelectors<T extends DaffCountry = DaffCountry> {
7
- selectCountryEntitiesState: MemoizedSelector<DaffGeographyStateRootSlice<T>, DaffCountryEntityState<T>>;
8
- selectCountryIds: MemoizedSelector<DaffGeographyStateRootSlice<T>, T['id'][]>;
9
- selectCountryEntities: MemoizedSelector<DaffGeographyStateRootSlice<T>, Dictionary<T>>;
10
- selectAllCountries: MemoizedSelector<DaffGeographyStateRootSlice<T>, T[]>;
11
- selectCountryTotal: MemoizedSelector<DaffGeographyStateRootSlice<T>, number>;
12
- selectCountry: (id: T['id']) => MemoizedSelector<DaffGeographyStateRootSlice<T>, T>;
13
- selectCountrySubdivisions: (id: T['id']) => MemoizedSelector<DaffGeographyStateRootSlice<T>, T['subdivisions']>;
14
- selectIsCountryFullyLoaded: (id: T['id']) => MemoizedSelector<DaffGeographyStateRootSlice<T>, boolean>;
15
- }
16
- export declare const getDaffCountryEntitySelectors: <T extends DaffCountry>() => DaffCountryEntitySelectors<T>;
@@ -1,7 +0,0 @@
1
- import { DaffCountry } from '@daffodil/geography';
2
- import { DaffCountryEntitySelectors } from './country-entities.selector';
3
- import { DaffGeographyFeatureSelector } from './geography-feature.selector';
4
- import { DaffGeographySelectors } from './geography.selector';
5
- export interface DaffGeographyAllSelectors<T extends DaffCountry = DaffCountry> extends DaffCountryEntitySelectors<T>, DaffGeographySelectors, DaffGeographyFeatureSelector<T> {
6
- }
7
- export declare const getDaffGeographySelectors: <T extends DaffCountry = DaffCountry>() => DaffGeographyAllSelectors<T>;
@@ -1,8 +0,0 @@
1
- import { MemoizedSelector } from '@ngrx/store';
2
- import { DaffCountry } from '@daffodil/geography';
3
- import { DaffGeographyStateRootSlice } from '../reducers/geography-reducers-state.interface';
4
- import { DaffGeographyFeatureState } from '../reducers/public_api';
5
- export interface DaffGeographyFeatureSelector<T extends DaffCountry = DaffCountry> {
6
- selectGeographyFeatureState: MemoizedSelector<DaffGeographyStateRootSlice<T>, DaffGeographyFeatureState<T>>;
7
- }
8
- export declare const getDaffGeographyFeatureStateSelector: <T extends DaffCountry = DaffCountry>() => DaffGeographyFeatureSelector<T>;
@@ -1,11 +0,0 @@
1
- import { MemoizedSelector } from '@ngrx/store';
2
- import { DaffStateError } from '@daffodil/core/state';
3
- import { DaffCountry } from '@daffodil/geography';
4
- import { DaffGeographyStateRootSlice } from '../reducers/geography-reducers-state.interface';
5
- import { DaffGeographyReducerState } from '../reducers/public_api';
6
- export interface DaffGeographySelectors {
7
- selectGeographyState: MemoizedSelector<DaffGeographyStateRootSlice, DaffGeographyReducerState>;
8
- selectGeographyLoading: MemoizedSelector<DaffGeographyStateRootSlice, boolean>;
9
- selectGeographyErrors: MemoizedSelector<DaffGeographyStateRootSlice, DaffStateError[]>;
10
- }
11
- export declare const getGeographySelectors: <T extends DaffCountry = DaffCountry>() => DaffGeographySelectors;
@@ -1 +0,0 @@
1
- export * from './geography-all.selector';
@@ -1,6 +0,0 @@
1
- import * as i0 from "@angular/core";
2
- export declare class DaffGeographyStateTestingModule {
3
- static ɵfac: i0.ɵɵFactoryDeclaration<DaffGeographyStateTestingModule, never>;
4
- static ɵmod: i0.ɵɵNgModuleDeclaration<DaffGeographyStateTestingModule, never, never, never>;
5
- static ɵinj: i0.ɵɵInjectorDeclaration<DaffGeographyStateTestingModule>;
6
- }
@@ -1,24 +0,0 @@
1
- import { Dictionary } from '@ngrx/entity';
2
- import { Action } from '@ngrx/store';
3
- import { BehaviorSubject } from 'rxjs';
4
- import { DaffStateError } from '@daffodil/core/state';
5
- import { DaffCountry } from '@daffodil/geography';
6
- import { DaffGeographyFacadeInterface } from '@daffodil/geography/state';
7
- import * as i0 from "@angular/core";
8
- /**
9
- * @inheritdoc
10
- */
11
- export declare class MockDaffGeographyFacade implements DaffGeographyFacadeInterface {
12
- loading$: BehaviorSubject<boolean>;
13
- errors$: BehaviorSubject<DaffStateError[]>;
14
- countries$: BehaviorSubject<DaffCountry[]>;
15
- countryIds$: BehaviorSubject<DaffCountry['id'][]>;
16
- countryCount$: BehaviorSubject<number>;
17
- countryEntities$: BehaviorSubject<Dictionary<DaffCountry>>;
18
- getCountry(id: any): BehaviorSubject<any>;
19
- getCountrySubdivisions(id: any): BehaviorSubject<any[]>;
20
- isCountryFullyLoaded(id: any): BehaviorSubject<boolean>;
21
- dispatch(action: Action): void;
22
- static ɵfac: i0.ɵɵFactoryDeclaration<MockDaffGeographyFacade, never>;
23
- static ɵprov: i0.ɵɵInjectableDeclaration<MockDaffGeographyFacade>;
24
- }
@@ -1,2 +0,0 @@
1
- export { DaffGeographyStateTestingModule } from './geography-testing.module';
2
- export { MockDaffGeographyFacade } from './mock-geography-facade';
@@ -1,17 +0,0 @@
1
- import { DaffModelFactory } from '@daffodil/core/testing';
2
- import { DaffAddress } from '@daffodil/geography';
3
- import * as i0 from "@angular/core";
4
- export declare class MockDaffAddress implements DaffAddress {
5
- street: string;
6
- street2: string;
7
- city: string;
8
- region: string;
9
- region_code: string;
10
- postcode: string;
11
- country: string;
12
- }
13
- export declare class DaffAddressFactory extends DaffModelFactory<DaffAddress> {
14
- constructor();
15
- static ɵfac: i0.ɵɵFactoryDeclaration<DaffAddressFactory, never>;
16
- static ɵprov: i0.ɵɵInjectableDeclaration<DaffAddressFactory>;
17
- }
@@ -1,19 +0,0 @@
1
- import { DaffModelFactory } from '@daffodil/core/testing';
2
- import { DaffCountry } from '@daffodil/geography';
3
- import { DaffSubdivisionFactory } from './subdivision.factory';
4
- import * as i0 from "@angular/core";
5
- export declare class MockCountry implements DaffCountry {
6
- protected subdivisionFactory: DaffSubdivisionFactory;
7
- id: string;
8
- name: string;
9
- name_en: string;
10
- alpha2: string;
11
- alpha3: string;
12
- subdivisions: import("@daffodil/geography").DaffSubdivision[];
13
- constructor(subdivisionFactory: DaffSubdivisionFactory);
14
- }
15
- export declare class DaffCountryFactory extends DaffModelFactory<DaffCountry> {
16
- constructor(subdivisionFactory: DaffSubdivisionFactory);
17
- static ɵfac: i0.ɵɵFactoryDeclaration<DaffCountryFactory, never>;
18
- static ɵprov: i0.ɵɵInjectableDeclaration<DaffCountryFactory>;
19
- }
@@ -1,18 +0,0 @@
1
- import { DaffModelFactory } from '@daffodil/core/testing';
2
- import { DaffPersonalAddress } from '@daffodil/geography';
3
- import { MockDaffAddress } from './address.factory';
4
- import * as i0 from "@angular/core";
5
- export declare class MockDaffPersonalAddress extends MockDaffAddress implements DaffPersonalAddress {
6
- prefix: string;
7
- suffix: string;
8
- firstname: string;
9
- middlename: string;
10
- lastname: string;
11
- email: string;
12
- telephone: string;
13
- }
14
- export declare class DaffPersonalAddressFactory extends DaffModelFactory<DaffPersonalAddress> {
15
- constructor();
16
- static ɵfac: i0.ɵɵFactoryDeclaration<DaffPersonalAddressFactory, never>;
17
- static ɵprov: i0.ɵɵInjectableDeclaration<DaffPersonalAddressFactory>;
18
- }
@@ -1,4 +0,0 @@
1
- export * from './address.factory';
2
- export * from './personal-address.factory';
3
- export * from './country.factory';
4
- export * from './subdivision.factory';
@@ -1,13 +0,0 @@
1
- import { DaffModelFactory } from '@daffodil/core/testing';
2
- import { DaffSubdivision } from '@daffodil/geography';
3
- import * as i0 from "@angular/core";
4
- export declare class MockSubdivision implements DaffSubdivision {
5
- id: string;
6
- name: string;
7
- iso_3166_2: string;
8
- }
9
- export declare class DaffSubdivisionFactory extends DaffModelFactory<DaffSubdivision> {
10
- constructor();
11
- static ɵfac: i0.ɵɵFactoryDeclaration<DaffSubdivisionFactory, never>;
12
- static ɵprov: i0.ɵɵInjectableDeclaration<DaffSubdivisionFactory>;
13
- }
@@ -1 +0,0 @@
1
- export * from './factories/public_api';