@daffodil/customer 0.87.2 → 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 (165) hide show
  1. package/driver/in-memory/index.d.ts +129 -1
  2. package/driver/index.d.ts +118 -1
  3. package/driver/magento/index.d.ts +206 -1
  4. package/driver/magento/testing/index.d.ts +37 -1
  5. package/driver/testing/index.d.ts +55 -1
  6. package/fesm2022/daffodil-customer-driver-in-memory.mjs +16 -16
  7. package/fesm2022/daffodil-customer-driver-in-memory.mjs.map +1 -1
  8. package/fesm2022/daffodil-customer-driver-magento-testing.mjs +10 -10
  9. package/fesm2022/daffodil-customer-driver-magento-testing.mjs.map +1 -1
  10. package/fesm2022/daffodil-customer-driver-magento.mjs +10 -10
  11. package/fesm2022/daffodil-customer-driver-magento.mjs.map +1 -1
  12. package/fesm2022/daffodil-customer-driver-testing.mjs +10 -10
  13. package/fesm2022/daffodil-customer-driver-testing.mjs.map +1 -1
  14. package/fesm2022/daffodil-customer-driver.mjs.map +1 -1
  15. package/fesm2022/daffodil-customer-routing.mjs +6 -6
  16. package/fesm2022/daffodil-customer-routing.mjs.map +1 -1
  17. package/fesm2022/daffodil-customer-state-testing.mjs +13 -13
  18. package/fesm2022/daffodil-customer-state-testing.mjs.map +1 -1
  19. package/fesm2022/daffodil-customer-state.mjs +16 -16
  20. package/fesm2022/daffodil-customer-state.mjs.map +1 -1
  21. package/fesm2022/daffodil-customer-testing.mjs +8 -8
  22. package/fesm2022/daffodil-customer-testing.mjs.map +1 -1
  23. package/index.d.ts +44 -1
  24. package/package.json +1 -1
  25. package/routing/index.d.ts +29 -1
  26. package/state/index.d.ts +493 -1
  27. package/state/testing/index.d.ts +66 -1
  28. package/testing/index.d.ts +46 -1
  29. package/driver/errors/address-not-found.d.ts +0 -10
  30. package/driver/errors/codes.d.ts +0 -6
  31. package/driver/errors/default-billing-address-deletion.d.ts +0 -10
  32. package/driver/errors/default-shipping-address-deletion.d.ts +0 -10
  33. package/driver/errors/invalid-api-response.d.ts +0 -10
  34. package/driver/errors/map.d.ts +0 -13
  35. package/driver/errors/public_api.d.ts +0 -6
  36. package/driver/in-memory/backend/address.service.d.ts +0 -39
  37. package/driver/in-memory/backend/customer.service.d.ts +0 -41
  38. package/driver/in-memory/collection-names/address.const.d.ts +0 -1
  39. package/driver/in-memory/collection-names/customer.const.d.ts +0 -1
  40. package/driver/in-memory/driver/address.service.d.ts +0 -24
  41. package/driver/in-memory/driver/customer-driver.module.d.ts +0 -12
  42. package/driver/in-memory/driver/customer.service.d.ts +0 -22
  43. package/driver/in-memory/public_api.d.ts +0 -5
  44. package/driver/interfaces/address-service.interface.d.ts +0 -29
  45. package/driver/interfaces/customer-service.interface.d.ts +0 -26
  46. package/driver/magento/address.service.d.ts +0 -27
  47. package/driver/magento/customer-driver.module.d.ts +0 -9
  48. package/driver/magento/customer.service.d.ts +0 -20
  49. package/driver/magento/errors/map.d.ts +0 -3
  50. package/driver/magento/errors/public_api.d.ts +0 -1
  51. package/driver/magento/errors/transform.d.ts +0 -10
  52. package/driver/magento/models/gender.enum.d.ts +0 -4
  53. package/driver/magento/models/public_api.d.ts +0 -3
  54. package/driver/magento/models/requests/address-attribute-input.type.d.ts +0 -4
  55. package/driver/magento/models/requests/address-input.type.d.ts +0 -22
  56. package/driver/magento/models/requests/address-region-input.type.d.ts +0 -8
  57. package/driver/magento/models/requests/customer-input.type.d.ts +0 -14
  58. package/driver/magento/models/requests/public_api.d.ts +0 -4
  59. package/driver/magento/models/responses/change-email.type.d.ts +0 -6
  60. package/driver/magento/models/responses/change-password.type.d.ts +0 -5
  61. package/driver/magento/models/responses/create-customer-address.type.d.ts +0 -4
  62. package/driver/magento/models/responses/customer-address.type.d.ts +0 -18
  63. package/driver/magento/models/responses/customer.type.d.ts +0 -8
  64. package/driver/magento/models/responses/delete-customer-address.type.d.ts +0 -3
  65. package/driver/magento/models/responses/get-customer-addresses.type.d.ts +0 -4
  66. package/driver/magento/models/responses/get-customer.type.d.ts +0 -4
  67. package/driver/magento/models/responses/public_api.d.ts +0 -10
  68. package/driver/magento/models/responses/update-customer-address.type.d.ts +0 -4
  69. package/driver/magento/models/responses/update-customer.type.d.ts +0 -6
  70. package/driver/magento/public_api.d.ts +0 -7
  71. package/driver/magento/queries/change-password.d.ts +0 -2
  72. package/driver/magento/queries/create-customer-address.d.ts +0 -1
  73. package/driver/magento/queries/delete-customer-address.d.ts +0 -1
  74. package/driver/magento/queries/fragments/customer-address.d.ts +0 -1
  75. package/driver/magento/queries/fragments/customer.d.ts +0 -1
  76. package/driver/magento/queries/fragments/public_api.d.ts +0 -2
  77. package/driver/magento/queries/get-customer-addresses.d.ts +0 -2
  78. package/driver/magento/queries/get-customer.d.ts +0 -2
  79. package/driver/magento/queries/public_api.d.ts +0 -9
  80. package/driver/magento/queries/update-customer-address.d.ts +0 -1
  81. package/driver/magento/queries/update-customer.d.ts +0 -2
  82. package/driver/magento/queries/update-email.d.ts +0 -2
  83. package/driver/magento/testing/factories/address.factory.d.ts +0 -28
  84. package/driver/magento/testing/factories/customer.factory.d.ts +0 -9
  85. package/driver/magento/testing/factories/public_api.d.ts +0 -2
  86. package/driver/magento/testing/public_api.d.ts +0 -1
  87. package/driver/magento/transforms/public_api.d.ts +0 -2
  88. package/driver/magento/transforms/requests/address-input.d.ts +0 -3
  89. package/driver/magento/transforms/requests/customer-input.d.ts +0 -3
  90. package/driver/magento/transforms/requests/public_api.d.ts +0 -2
  91. package/driver/magento/transforms/responses/customer-address.d.ts +0 -3
  92. package/driver/magento/transforms/responses/customer.d.ts +0 -3
  93. package/driver/magento/transforms/responses/public_api.d.ts +0 -2
  94. package/driver/magento/validators/change-email.d.ts +0 -3
  95. package/driver/magento/validators/change-password.d.ts +0 -3
  96. package/driver/magento/validators/create-customer-address.d.ts +0 -3
  97. package/driver/magento/validators/delete-customer-address.d.ts +0 -3
  98. package/driver/magento/validators/get-customer-addresses.d.ts +0 -3
  99. package/driver/magento/validators/get-customer.d.ts +0 -3
  100. package/driver/magento/validators/public_api.d.ts +0 -8
  101. package/driver/magento/validators/update-customer-address.d.ts +0 -3
  102. package/driver/magento/validators/update-customer.d.ts +0 -3
  103. package/driver/public_api.d.ts +0 -3
  104. package/driver/testing/drivers/address.service.d.ts +0 -23
  105. package/driver/testing/drivers/customer-driver.module.d.ts +0 -12
  106. package/driver/testing/drivers/customer.service.d.ts +0 -21
  107. package/driver/testing/drivers/public_api.d.ts +0 -3
  108. package/driver/testing/public_api.d.ts +0 -1
  109. package/models/address.type.d.ts +0 -15
  110. package/models/customer.type.d.ts +0 -27
  111. package/models/public_api.d.ts +0 -2
  112. package/public_api.d.ts +0 -1
  113. package/routing/guards/clear-errors.guard.d.ts +0 -14
  114. package/routing/guards/public_api.d.ts +0 -1
  115. package/routing/public_api.d.ts +0 -2
  116. package/routing/resolvers/customer.resolver.d.ts +0 -13
  117. package/routing/resolvers/public_api.d.ts +0 -1
  118. package/state/actions/address.actions.d.ts +0 -166
  119. package/state/actions/customer.actions.d.ts +0 -133
  120. package/state/actions/public_api.d.ts +0 -2
  121. package/state/customer.module.d.ts +0 -11
  122. package/state/effects/address.effects.d.ts +0 -31
  123. package/state/effects/customer.effects.d.ts +0 -30
  124. package/state/facades/address/facade.d.ts +0 -28
  125. package/state/facades/address/interface.d.ts +0 -14
  126. package/state/facades/customer/facade.d.ts +0 -26
  127. package/state/facades/customer/interface.d.ts +0 -13
  128. package/state/facades/public_api.d.ts +0 -4
  129. package/state/injection-tokens/error-matcher.token.d.ts +0 -2
  130. package/state/injection-tokens/public_api.d.ts +0 -1
  131. package/state/models/address.type.d.ts +0 -3
  132. package/state/models/public_api.d.ts +0 -1
  133. package/state/public_api.d.ts +0 -7
  134. package/state/reducers/address/initial-state.d.ts +0 -5
  135. package/state/reducers/address/public_api.d.ts +0 -3
  136. package/state/reducers/address/reducer.d.ts +0 -7
  137. package/state/reducers/address/type.d.ts +0 -5
  138. package/state/reducers/address-entities/adapter.d.ts +0 -6
  139. package/state/reducers/address-entities/public_api.d.ts +0 -2
  140. package/state/reducers/address-entities/reducer.d.ts +0 -12
  141. package/state/reducers/customer/adapter.d.ts +0 -12
  142. package/state/reducers/customer/initial-state.d.ts +0 -5
  143. package/state/reducers/customer/interface.d.ts +0 -9
  144. package/state/reducers/customer/public_api.d.ts +0 -4
  145. package/state/reducers/customer/reducer.d.ts +0 -7
  146. package/state/reducers/public_api.d.ts +0 -6
  147. package/state/reducers/reducers.interface.d.ts +0 -19
  148. package/state/reducers/store-feature-key.d.ts +0 -4
  149. package/state/reducers/token/extra.token.d.ts +0 -3
  150. package/state/reducers/token/public_api.d.ts +0 -1
  151. package/state/reducers/token/reducers.token.d.ts +0 -3
  152. package/state/selectors/address/selector.d.ts +0 -15
  153. package/state/selectors/customer/selector.d.ts +0 -14
  154. package/state/selectors/feature.selector.d.ts +0 -10
  155. package/state/selectors/public_api.d.ts +0 -3
  156. package/state/testing/customer-testing.module.d.ts +0 -9
  157. package/state/testing/factories/customer-address.factory.d.ts +0 -21
  158. package/state/testing/factories/public_api.d.ts +0 -1
  159. package/state/testing/mock-address-facade.d.ts +0 -19
  160. package/state/testing/mock-customer-facade.d.ts +0 -20
  161. package/state/testing/public_api.d.ts +0 -4
  162. package/testing/factories/customer-address.factory.d.ts +0 -20
  163. package/testing/factories/customer.factory.d.ts +0 -26
  164. package/testing/factories/public_api.d.ts +0 -2
  165. package/testing/public_api.d.ts +0 -1
@@ -1,31 +0,0 @@
1
- import { Actions } from '@ngrx/effects';
2
- import { ErrorTransformer } from '@daffodil/core/state';
3
- import { DaffCustomerAddress } from '@daffodil/customer';
4
- import { DaffCustomerAddressDriverInterface } from '@daffodil/customer/driver';
5
- import { DaffCustomerAddressLoadSuccess, DaffCustomerAddressLoadFailure, DaffCustomerAddressUpdateSuccess, DaffCustomerAddressUpdateFailure, DaffCustomerAddressAddFailure, DaffCustomerAddressAddSuccess, DaffCustomerAddressDeleteFailure, DaffCustomerAddressDeleteSuccess, DaffCustomerAddressListFailure, DaffCustomerAddressListSuccess } from '../actions/address.actions';
6
- import * as i0 from "@angular/core";
7
- export declare class DaffCustomerAddressEffects<T extends DaffCustomerAddress = DaffCustomerAddress> {
8
- private actions$;
9
- private driver;
10
- private errorMatcher;
11
- constructor(actions$: Actions, driver: DaffCustomerAddressDriverInterface<T>, errorMatcher: ErrorTransformer);
12
- list$: import("rxjs").Observable<DaffCustomerAddressListFailure | DaffCustomerAddressListSuccess<T>> & import("@ngrx/effects").CreateEffectMetadata;
13
- /**
14
- * An effect for loading a customer address.
15
- */
16
- get$: import("rxjs").Observable<DaffCustomerAddressLoadFailure | DaffCustomerAddressLoadSuccess<T>> & import("@ngrx/effects").CreateEffectMetadata;
17
- /**
18
- * An effect for updating a customer address.
19
- */
20
- update$: import("rxjs").Observable<DaffCustomerAddressUpdateFailure | DaffCustomerAddressUpdateSuccess<T>> & import("@ngrx/effects").CreateEffectMetadata;
21
- /**
22
- * An effect for adding a new customer address.
23
- */
24
- add$: import("rxjs").Observable<DaffCustomerAddressAddFailure | DaffCustomerAddressAddSuccess<T>> & import("@ngrx/effects").CreateEffectMetadata;
25
- /**
26
- * An effect for adding a new customer address.
27
- */
28
- delete$: import("rxjs").Observable<DaffCustomerAddressDeleteFailure | DaffCustomerAddressDeleteSuccess<T>> & import("@ngrx/effects").CreateEffectMetadata;
29
- static ɵfac: i0.ɵɵFactoryDeclaration<DaffCustomerAddressEffects<any>, never>;
30
- static ɵprov: i0.ɵɵInjectableDeclaration<DaffCustomerAddressEffects<any>>;
31
- }
@@ -1,30 +0,0 @@
1
- import { Actions } from '@ngrx/effects';
2
- import { ErrorTransformer } from '@daffodil/core/state';
3
- import { DaffCustomer } from '@daffodil/customer';
4
- import { DaffCustomerDriverInterface } from '@daffodil/customer/driver';
5
- import { DaffCustomerLoadSuccess, DaffCustomerLoadFailure, DaffCustomerUpdateFailure, DaffCustomerUpdateSuccess, DaffCustomerChangeEmailFailure, DaffCustomerChangeEmailSuccess, DaffCustomerChangePasswordFailure, DaffCustomerChangePasswordSuccess } from '../actions/customer.actions';
6
- import * as i0 from "@angular/core";
7
- export declare class DaffCustomerEffects<T extends DaffCustomer = DaffCustomer> {
8
- private actions$;
9
- private driver;
10
- private errorMatcher;
11
- constructor(actions$: Actions, driver: DaffCustomerDriverInterface<T>, errorMatcher: ErrorTransformer);
12
- /**
13
- * An effect for the loading of an customer.
14
- */
15
- get$: import("rxjs").Observable<DaffCustomerLoadFailure | DaffCustomerLoadSuccess<T>> & import("@ngrx/effects").CreateEffectMetadata;
16
- /**
17
- * An effect for the updating of an customer.
18
- */
19
- update$: import("rxjs").Observable<DaffCustomerUpdateFailure | DaffCustomerUpdateSuccess<T>> & import("@ngrx/effects").CreateEffectMetadata;
20
- /**
21
- * An effect for changing a customer email.
22
- */
23
- changeEmail$: import("rxjs").Observable<DaffCustomerChangeEmailFailure | DaffCustomerChangeEmailSuccess<T>> & import("@ngrx/effects").CreateEffectMetadata;
24
- /**
25
- * An effect for changing a customer password.
26
- */
27
- changePassword$: import("rxjs").Observable<DaffCustomerChangePasswordSuccess | DaffCustomerChangePasswordFailure> & import("@ngrx/effects").CreateEffectMetadata;
28
- static ɵfac: i0.ɵɵFactoryDeclaration<DaffCustomerEffects<any>, never>;
29
- static ɵprov: i0.ɵɵInjectableDeclaration<DaffCustomerEffects<any>>;
30
- }
@@ -1,28 +0,0 @@
1
- import { Store, Action } from '@ngrx/store';
2
- import { Observable } from 'rxjs';
3
- import { DaffCustomerAddressPageFacadeInterface } from './interface';
4
- import { DaffCustomerAddressEntity } from '../../models/public_api';
5
- import { DaffCustomerAddressReducerState, DaffCustomerStateRootSlice } from '../../reducers/public_api';
6
- import * as i0 from "@angular/core";
7
- /**
8
- * @inheritdoc
9
- *
10
- * Serves as the base for a customer facade.
11
- * Extend this class and pass in the selectors for the specific state you wish to target.
12
- */
13
- export declare class DaffCustomerAddressPageFacade<T extends DaffCustomerAddressEntity = DaffCustomerAddressEntity> implements DaffCustomerAddressPageFacadeInterface<T> {
14
- private store;
15
- private _selectAddress;
16
- addresses$: Observable<T[]>;
17
- loadingState$: Observable<DaffCustomerAddressReducerState['daffState']>;
18
- loading$: Observable<boolean>;
19
- resolving$: Observable<boolean>;
20
- mutating$: Observable<boolean>;
21
- errors$: Observable<DaffCustomerAddressReducerState['daffErrors']>;
22
- hasErrors$: Observable<boolean>;
23
- constructor(store: Store<DaffCustomerStateRootSlice>);
24
- getAddress(id: T['id']): Observable<T>;
25
- dispatch(action: Action): void;
26
- static ɵfac: i0.ɵɵFactoryDeclaration<DaffCustomerAddressPageFacade<any>, never>;
27
- static ɵprov: i0.ɵɵInjectableDeclaration<DaffCustomerAddressPageFacade<any>>;
28
- }
@@ -1,14 +0,0 @@
1
- import { Observable } from 'rxjs';
2
- import { DaffOperationStateFacadeInterface } from '@daffodil/core/state';
3
- import { DaffCustomerAddressEntity } from '../../models/public_api';
4
- import { DaffCustomerAddressReducerState } from '../../reducers/public_api';
5
- /**
6
- * Exposes the customer state selectors.
7
- */
8
- export interface DaffCustomerAddressPageFacadeInterface<T extends DaffCustomerAddressEntity = DaffCustomerAddressEntity> extends DaffOperationStateFacadeInterface<DaffCustomerAddressReducerState> {
9
- /**
10
- * A list of all customer address entities.
11
- */
12
- addresses$: Observable<T[]>;
13
- getAddress(id: T['id']): Observable<T>;
14
- }
@@ -1,26 +0,0 @@
1
- import { Store, Action } from '@ngrx/store';
2
- import { Observable } from 'rxjs';
3
- import { DaffCustomer } from '@daffodil/customer';
4
- import { DaffCustomerPageFacadeInterface } from './interface';
5
- import { DaffCustomerReducerState, DaffCustomerStateRootSlice } from '../../reducers/public_api';
6
- import * as i0 from "@angular/core";
7
- /**
8
- * @inheritdoc
9
- *
10
- * Serves as the base for a customer facade.
11
- * Extend this class and pass in the selectors for the specific state you wish to target.
12
- */
13
- export declare class DaffCustomerPageFacade<T extends DaffCustomer = DaffCustomer> implements DaffCustomerPageFacadeInterface<T> {
14
- private store;
15
- customer$: Observable<T>;
16
- loadingState$: Observable<DaffCustomerReducerState<T>['daffState']>;
17
- loading$: Observable<boolean>;
18
- resolving$: Observable<boolean>;
19
- mutating$: Observable<boolean>;
20
- errors$: Observable<DaffCustomerReducerState<T>['daffErrors']>;
21
- hasErrors$: Observable<boolean>;
22
- constructor(store: Store<DaffCustomerStateRootSlice>);
23
- dispatch(action: Action): void;
24
- static ɵfac: i0.ɵɵFactoryDeclaration<DaffCustomerPageFacade<any>, never>;
25
- static ɵprov: i0.ɵɵInjectableDeclaration<DaffCustomerPageFacade<any>>;
26
- }
@@ -1,13 +0,0 @@
1
- import { Observable } from 'rxjs';
2
- import { DaffOperationStateFacadeInterface } from '@daffodil/core/state';
3
- import { DaffCustomer } from '@daffodil/customer';
4
- import { DaffCustomerReducerState } from '../../public_api';
5
- /**
6
- * Exposes the customer state selectors.
7
- */
8
- export interface DaffCustomerPageFacadeInterface<T extends DaffCustomer = DaffCustomer> extends DaffOperationStateFacadeInterface<DaffCustomerReducerState<T>> {
9
- /**
10
- * Whether there is a pending customer operation.
11
- */
12
- customer$: Observable<T>;
13
- }
@@ -1,4 +0,0 @@
1
- export { DaffCustomerPageFacadeInterface } from './customer/interface';
2
- export { DaffCustomerPageFacade } from './customer/facade';
3
- export { DaffCustomerAddressPageFacadeInterface } from './address/interface';
4
- export { DaffCustomerAddressPageFacade } from './address/facade';
@@ -1,2 +0,0 @@
1
- import { daffTransformErrorToStateError } from '@daffodil/core/state';
2
- export declare const DAFF_CUSTOMER_ERROR_MATCHER: import("@angular/core").InjectionToken<typeof daffTransformErrorToStateError>, provideDaffCustomerErrorMatcher: <R extends typeof daffTransformErrorToStateError = typeof daffTransformErrorToStateError>(value: R) => import("@angular/core").ValueProvider;
@@ -1 +0,0 @@
1
- export * from './error-matcher.token';
@@ -1,3 +0,0 @@
1
- import { DaffOperationEntity } from '@daffodil/core/state';
2
- import { DaffCustomerAddress } from '@daffodil/customer';
3
- export type DaffCustomerAddressEntity = DaffOperationEntity<DaffCustomerAddress>;
@@ -1 +0,0 @@
1
- export * from './address.type';
@@ -1,7 +0,0 @@
1
- export * from './actions/public_api';
2
- export * from './reducers/public_api';
3
- export * from './selectors/public_api';
4
- export * from './facades/public_api';
5
- export * from './models/public_api';
6
- export * from './injection-tokens/public_api';
7
- export * from './customer.module';
@@ -1,5 +0,0 @@
1
- import { DaffCustomerAddressReducerState } from './type';
2
- /**
3
- * The initial state for the main customer state, see {@link DaffCustomerAddressReducerState}.
4
- */
5
- export declare const daffCustomerAddressInitialState: DaffCustomerAddressReducerState;
@@ -1,3 +0,0 @@
1
- export { DaffCustomerAddressReducerState } from './type';
2
- export { daffCustomerAddressInitialState } from './initial-state';
3
- export { daffCustomerAddressReducer } from './reducer';
@@ -1,7 +0,0 @@
1
- import { DaffCustomerAddress } from '@daffodil/customer';
2
- import { DaffCustomerAddressReducerState } from './type';
3
- import { DaffCustomerAddressActions } from '../../actions/address.actions';
4
- /**
5
- * The reducer for the customer page state, see {@link DaffCustomerAddressReducerState}.
6
- */
7
- export declare const daffCustomerAddressReducer: <T extends DaffCustomerAddress = DaffCustomerAddress>(state: import("@daffodil/core/state").DaffOperationState, action: DaffCustomerAddressActions<T>) => DaffCustomerAddressReducerState;
@@ -1,5 +0,0 @@
1
- import { DaffOperationState } from '@daffodil/core/state';
2
- /**
3
- * The customer address state.
4
- */
5
- export type DaffCustomerAddressReducerState = DaffOperationState;
@@ -1,6 +0,0 @@
1
- import { DaffOperationEntityStateAdapter } from '@daffodil/core/state';
2
- import { DaffCustomerAddress } from '@daffodil/customer';
3
- /**
4
- * Customer Address Entities Adapter for changing/overwriting entity state.
5
- */
6
- export declare const daffCustomerAddressEntitiesAdapter: <T extends DaffCustomerAddress = DaffCustomerAddress>() => DaffOperationEntityStateAdapter<T>;
@@ -1,2 +0,0 @@
1
- export { daffCustomerAddressEntitiesAdapter } from './adapter';
2
- export { daffCustomerAddressEntitiesReducer } from './reducer';
@@ -1,12 +0,0 @@
1
- import { DaffOperationEntityState } from '@daffodil/core/state';
2
- import { DaffCustomerAddress } from '@daffodil/customer';
3
- import { DaffCustomerAddressActions } from '../../actions/address.actions';
4
- import { DaffCustomerActions } from '../../actions/customer.actions';
5
- /**
6
- * Reducer function that catches actions and changes/overwrites product entities state.
7
- *
8
- * @param state current State of the redux store
9
- * @param action CartItemGrid, BestSellers, or CartItem actions
10
- * @returns CartItem entities state
11
- */
12
- export declare function daffCustomerAddressEntitiesReducer<T extends DaffCustomerAddress = DaffCustomerAddress>(state: DaffOperationEntityState<T>, action: DaffCustomerAddressActions<T> | DaffCustomerActions): DaffOperationEntityState<T>;
@@ -1,12 +0,0 @@
1
- import { DaffCustomer } from '@daffodil/customer';
2
- import { DaffCustomerReducerState } from './interface';
3
- /**
4
- * Stores the customer in state.
5
- * Sets loading to false and resets errors.
6
- */
7
- export declare function daffCustomerStateStoreCustomer<T extends DaffCustomer = DaffCustomer>(customer: T, state: DaffCustomerReducerState<T>): DaffCustomerReducerState<T>;
8
- /**
9
- * Stores customer addresses.
10
- * Sets loading to false and resets errors.
11
- */
12
- export declare function daffCustomerStateStoreAddresses<T extends DaffCustomer = DaffCustomer>(addresses: T[], state: DaffCustomerReducerState<T>): DaffCustomerReducerState<T>;
@@ -1,5 +0,0 @@
1
- import { DaffCustomerReducerState } from './interface';
2
- /**
3
- * The initial state for the main customer state, see {@link DaffCustomerReducerState}.
4
- */
5
- export declare const daffCustomerInitialState: DaffCustomerReducerState<any>;
@@ -1,9 +0,0 @@
1
- import { DaffOperationState } from '@daffodil/core/state';
2
- import { DaffCustomer } from '@daffodil/customer';
3
- /**
4
- * The main customer state.
5
- * Contains info about the current or most recent customer operation.
6
- */
7
- export interface DaffCustomerReducerState<T extends DaffCustomer = DaffCustomer> extends DaffOperationState {
8
- customer: T;
9
- }
@@ -1,4 +0,0 @@
1
- export { daffCustomerStateStoreCustomer } from './adapter';
2
- export { DaffCustomerReducerState } from './interface';
3
- export { daffCustomerInitialState } from './initial-state';
4
- export { daffCustomerReducer } from './reducer';
@@ -1,7 +0,0 @@
1
- import { DaffCustomer } from '@daffodil/customer';
2
- import { DaffCustomerReducerState } from './interface';
3
- import { DaffCustomerActions, DaffCustomerAddressActions } from '../../actions/public_api';
4
- /**
5
- * The reducer for the customer page state, see {@link DaffCustomerReducerState}.
6
- */
7
- export declare const daffCustomerReducer: <T extends DaffCustomer = DaffCustomer>(state: DaffCustomerReducerState<any>, action: DaffCustomerActions<T> | DaffCustomerAddressActions) => DaffCustomerReducerState<T>;
@@ -1,6 +0,0 @@
1
- export { DaffCustomerReducersState, DaffCustomerStateRootSlice, } from './reducers.interface';
2
- export { DAFF_CUSTOMER_STORE_FEATURE_KEY } from './store-feature-key';
3
- export * from './token/public_api';
4
- export * from './customer/public_api';
5
- export * from './address/public_api';
6
- export * from './address-entities/public_api';
@@ -1,19 +0,0 @@
1
- import { DaffOperationEntityState } from '@daffodil/core/state';
2
- import { DaffCustomer, DaffCustomerAddress } from '@daffodil/customer';
3
- import { DaffCustomerAddressReducerState } from './address/type';
4
- import { DaffCustomerReducerState } from './customer/public_api';
5
- import { DAFF_CUSTOMER_STORE_FEATURE_KEY } from './store-feature-key';
6
- /**
7
- * The feature state for customer.
8
- */
9
- export interface DaffCustomerReducersState<TCustomer extends DaffCustomer = DaffCustomer, TAddress extends DaffCustomerAddress = DaffCustomerAddress> {
10
- customer: DaffCustomerReducerState<TCustomer>;
11
- address: DaffCustomerAddressReducerState;
12
- addressEntities: DaffOperationEntityState<TAddress>;
13
- }
14
- /**
15
- * The footprint of customer feature state in the root application state.
16
- */
17
- export interface DaffCustomerStateRootSlice<TCustomer extends DaffCustomer = DaffCustomer, TAddress extends DaffCustomerAddress = DaffCustomerAddress> {
18
- [DAFF_CUSTOMER_STORE_FEATURE_KEY]: DaffCustomerReducersState<TCustomer, TAddress>;
19
- }
@@ -1,4 +0,0 @@
1
- /**
2
- * The key under which the customer feature state will be stored.
3
- */
4
- export declare const DAFF_CUSTOMER_STORE_FEATURE_KEY = "daffCustomer";
@@ -1,3 +0,0 @@
1
- import { ActionReducer } from '@ngrx/store';
2
- import { DaffCustomerReducersState } from '../reducers.interface';
3
- export declare const DAFF_CUSTOMER_EXTRA_REDUCERS: import("@angular/core").InjectionToken<ActionReducer<DaffCustomerReducersState<import("@daffodil/customer").DaffCustomer, import("@daffodil/customer").DaffCustomerAddress>, import("@ngrx/store").Action<string>>[]>, daffCustomerProvideExtraReducers: <R extends ActionReducer<DaffCustomerReducersState<import("@daffodil/customer").DaffCustomer, import("@daffodil/customer").DaffCustomerAddress>, import("@ngrx/store").Action<string>> = ActionReducer<DaffCustomerReducersState<import("@daffodil/customer").DaffCustomer, import("@daffodil/customer").DaffCustomerAddress>, import("@ngrx/store").Action<string>>>(...values: R[]) => Array<import("@angular/core").ValueProvider>;
@@ -1 +0,0 @@
1
- export { daffCustomerProvideExtraReducers, DAFF_CUSTOMER_EXTRA_REDUCERS, } from './extra.token';
@@ -1,3 +0,0 @@
1
- import { ActionReducer } from '@ngrx/store';
2
- import { DaffCustomerReducersState } from '../reducers.interface';
3
- export declare const DAFF_CUSTOMER_REDUCERS: import("@angular/core").InjectionToken<ActionReducer<DaffCustomerReducersState<import("@daffodil/customer").DaffCustomer, import("@daffodil/customer").DaffCustomerAddress>, import("@ngrx/store").Action<string>>>, provideDaffCustomerReducers: <R extends ActionReducer<DaffCustomerReducersState<import("@daffodil/customer").DaffCustomer, import("@daffodil/customer").DaffCustomerAddress>, import("@ngrx/store").Action<string>> = ActionReducer<DaffCustomerReducersState<import("@daffodil/customer").DaffCustomer, import("@daffodil/customer").DaffCustomerAddress>, import("@ngrx/store").Action<string>>>(value: R) => import("@angular/core").ValueProvider;
@@ -1,15 +0,0 @@
1
- import { MemoizedSelector } from '@ngrx/store';
2
- import { DaffOperationStateSelectors } from '@daffodil/core/state';
3
- import { DaffCustomer, DaffCustomerAddress } from '@daffodil/customer';
4
- import { DaffCustomerAddressReducerState, DaffCustomerStateRootSlice } from '../../reducers/public_api';
5
- /**
6
- * Selectors for the main part of customer state.
7
- */
8
- export interface DaffCustomerAddressSelectors<T extends DaffCustomerAddress = DaffCustomerAddress> extends DaffOperationStateSelectors<DaffCustomerStateRootSlice<DaffCustomer, T>, DaffCustomerAddressReducerState> {
9
- /**
10
- * Selects the customer.
11
- */
12
- selectAddress: (id: T['id']) => MemoizedSelector<DaffCustomerStateRootSlice<DaffCustomer, T>, T>;
13
- selectAddresses: MemoizedSelector<DaffCustomerStateRootSlice<DaffCustomer, T>, T[]>;
14
- }
15
- export declare const daffCustomerAddressGetSelectors: <T extends DaffCustomerAddress = DaffCustomerAddress>() => DaffCustomerAddressSelectors<T>;
@@ -1,14 +0,0 @@
1
- import { MemoizedSelector } from '@ngrx/store';
2
- import { DaffOperationStateSelectors } from '@daffodil/core/state';
3
- import { DaffCustomer } from '@daffodil/customer';
4
- import { DaffCustomerReducerState, DaffCustomerStateRootSlice } from '../../reducers/public_api';
5
- /**
6
- * Selectors for the main part of customer state.
7
- */
8
- export interface DaffCustomerSelectors<T extends DaffCustomer = DaffCustomer> extends DaffOperationStateSelectors<DaffCustomerStateRootSlice<T>, DaffCustomerReducerState<T>> {
9
- /**
10
- * Selects the customer.
11
- */
12
- selectCustomer: MemoizedSelector<DaffCustomerStateRootSlice<T>, T>;
13
- }
14
- export declare const daffCustomerGetSelectors: <T extends DaffCustomer = DaffCustomer>() => DaffCustomerSelectors<T>;
@@ -1,10 +0,0 @@
1
- import { MemoizedSelector } from '@ngrx/store';
2
- import { DaffCustomer, DaffCustomerAddress } from '@daffodil/customer';
3
- import { DaffCustomerStateRootSlice, DaffCustomerReducersState } from '../reducers/public_api';
4
- /**
5
- * Selector for the customer feature state.
6
- */
7
- export interface DaffCustomerFeatureSelector<TCustomer extends DaffCustomer = DaffCustomer, TAddress extends DaffCustomerAddress = DaffCustomerAddress> {
8
- selectCustomerFeatureState: MemoizedSelector<DaffCustomerStateRootSlice<TCustomer, TAddress>, DaffCustomerReducersState<TCustomer, TAddress>>;
9
- }
10
- export declare const getDaffCustomerReducersStateSelector: <TCustomer extends DaffCustomer = DaffCustomer, TAddress extends DaffCustomerAddress = DaffCustomerAddress>() => DaffCustomerFeatureSelector<TCustomer, TAddress>;
@@ -1,3 +0,0 @@
1
- export * from './customer/selector';
2
- export * from './address/selector';
3
- export * from './feature.selector';
@@ -1,9 +0,0 @@
1
- import * as i0 from "@angular/core";
2
- /**
3
- * Provides the {@link MockDaffCustomerPageFacade} for {@link DaffCustomerPageFacade}.
4
- */
5
- export declare class DaffCustomerStateTestingModule {
6
- static ɵfac: i0.ɵɵFactoryDeclaration<DaffCustomerStateTestingModule, never>;
7
- static ɵmod: i0.ɵɵNgModuleDeclaration<DaffCustomerStateTestingModule, never, never, never>;
8
- static ɵinj: i0.ɵɵInjectorDeclaration<DaffCustomerStateTestingModule>;
9
- }
@@ -1,21 +0,0 @@
1
- import { DaffState } from '@daffodil/core/state';
2
- import { DaffModelFactory } from '@daffodil/core/testing';
3
- import { DaffCustomerAddressEntity } from '@daffodil/customer/state';
4
- import { MockDaffCustomerAddress } from '@daffodil/customer/testing';
5
- import * as i0 from "@angular/core";
6
- /**
7
- * Mock class for {@link DaffCustomerAddressEntity}.
8
- */
9
- export declare class MockDaffCustomerAddressEntity extends MockDaffCustomerAddress implements DaffCustomerAddressEntity {
10
- daffState: DaffState;
11
- daffErrors: any[];
12
- daffTemp: boolean;
13
- }
14
- /**
15
- * Model factory for {@link DaffCustomerAddressEntity}.
16
- */
17
- export declare class DaffCustomerAddressEntityFactory extends DaffModelFactory<DaffCustomerAddressEntity> {
18
- constructor();
19
- static ɵfac: i0.ɵɵFactoryDeclaration<DaffCustomerAddressEntityFactory, never>;
20
- static ɵprov: i0.ɵɵInjectableDeclaration<DaffCustomerAddressEntityFactory>;
21
- }
@@ -1 +0,0 @@
1
- export * from './customer-address.factory';
@@ -1,19 +0,0 @@
1
- import { Action } from '@ngrx/store';
2
- import { BehaviorSubject } from 'rxjs';
3
- import { DaffStateError } from '@daffodil/core/state';
4
- import { MockDaffOperationStateFacade } from '@daffodil/core/state/testing';
5
- import { DaffCustomerAddressEntity, DaffCustomerAddressPageFacadeInterface } from '@daffodil/customer/state';
6
- import * as i0 from "@angular/core";
7
- /**
8
- * Mocks out facade fields and methods for testing purposes.
9
- *
10
- * @inheritdoc
11
- */
12
- export declare class MockDaffCustomerAddressPageFacade extends MockDaffOperationStateFacade implements DaffCustomerAddressPageFacadeInterface {
13
- addresses$: BehaviorSubject<DaffCustomerAddressEntity[]>;
14
- errors$: BehaviorSubject<DaffStateError[]>;
15
- getAddress(): import("rxjs").Observable<null>;
16
- dispatch(action: Action): void;
17
- static ɵfac: i0.ɵɵFactoryDeclaration<MockDaffCustomerAddressPageFacade, never>;
18
- static ɵprov: i0.ɵɵInjectableDeclaration<MockDaffCustomerAddressPageFacade>;
19
- }
@@ -1,20 +0,0 @@
1
- import { Action } from '@ngrx/store';
2
- import { BehaviorSubject } from 'rxjs';
3
- import { DaffStateError } from '@daffodil/core/state';
4
- import { MockDaffOperationStateFacade } from '@daffodil/core/state/testing';
5
- import { DaffCustomer } from '@daffodil/customer';
6
- import { DaffCustomerPageFacadeInterface } from '@daffodil/customer/state';
7
- import * as i0 from "@angular/core";
8
- /**
9
- * Mocks out facade fields and methods for testing purposes.
10
- *
11
- * @inheritdoc
12
- */
13
- export declare class MockDaffCustomerPageFacade extends MockDaffOperationStateFacade implements DaffCustomerPageFacadeInterface {
14
- customer$: BehaviorSubject<DaffCustomer>;
15
- loading$: BehaviorSubject<boolean>;
16
- errors$: BehaviorSubject<DaffStateError[]>;
17
- dispatch(action: Action): void;
18
- static ɵfac: i0.ɵɵFactoryDeclaration<MockDaffCustomerPageFacade, never>;
19
- static ɵprov: i0.ɵɵInjectableDeclaration<MockDaffCustomerPageFacade>;
20
- }
@@ -1,4 +0,0 @@
1
- export { MockDaffCustomerPageFacade } from './mock-customer-facade';
2
- export { MockDaffCustomerAddressPageFacade } from './mock-address-facade';
3
- export { DaffCustomerStateTestingModule } from './customer-testing.module';
4
- export * from './factories/public_api';
@@ -1,20 +0,0 @@
1
- import { DaffModelFactory } from '@daffodil/core/testing';
2
- import { DaffCustomerAddress } from '@daffodil/customer';
3
- import { MockDaffPersonalAddress } from '@daffodil/geography/testing';
4
- import * as i0 from "@angular/core";
5
- /**
6
- * Mock class for {@link DaffCustomerAddress}.
7
- */
8
- export declare class MockDaffCustomerAddress extends MockDaffPersonalAddress implements DaffCustomerAddress {
9
- id: string;
10
- defaultBilling: boolean;
11
- defaultShipping: boolean;
12
- }
13
- /**
14
- * Model factory for {@link DaffCustomerAddress}.
15
- */
16
- export declare class DaffCustomerAddressFactory extends DaffModelFactory<DaffCustomerAddress> {
17
- constructor();
18
- static ɵfac: i0.ɵɵFactoryDeclaration<DaffCustomerAddressFactory, never>;
19
- static ɵprov: i0.ɵɵInjectableDeclaration<DaffCustomerAddressFactory>;
20
- }
@@ -1,26 +0,0 @@
1
- import { DaffModelFactory } from '@daffodil/core/testing';
2
- import { DaffCustomer, DaffCustomerAddress } from '@daffodil/customer';
3
- import { DaffCustomerAddressFactory } from './customer-address.factory';
4
- import * as i0 from "@angular/core";
5
- /**
6
- * Mock class for {@link DaffCustomer}.
7
- */
8
- export declare class MockDaffCustomer implements DaffCustomer {
9
- private addressFactory;
10
- id: string;
11
- email: string;
12
- firstName: string;
13
- lastName: string;
14
- isSubscribed: boolean;
15
- addresses: DaffCustomerAddress[];
16
- constructor(addressFactory: DaffCustomerAddressFactory);
17
- private createAddresses;
18
- }
19
- /**
20
- * Model factory for {@link DaffCustomer}.
21
- */
22
- export declare class DaffCustomerFactory extends DaffModelFactory<DaffCustomer> {
23
- constructor(addressFactory: DaffCustomerAddressFactory);
24
- static ɵfac: i0.ɵɵFactoryDeclaration<DaffCustomerFactory, never>;
25
- static ɵprov: i0.ɵɵInjectableDeclaration<DaffCustomerFactory>;
26
- }
@@ -1,2 +0,0 @@
1
- export * from './customer.factory';
2
- export * from './customer-address.factory';
@@ -1 +0,0 @@
1
- export * from './factories/public_api';