@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
package/index.d.ts CHANGED
@@ -1 +1,44 @@
1
- export * from './public_api';
1
+ import { DaffIdentifiable } from '@daffodil/core';
2
+ import { DaffPersonalAddress } from '@daffodil/geography';
3
+
4
+ /**
5
+ * An address that belongs to a {@link DaffCustomer}
6
+ */
7
+ interface DaffCustomerAddress extends DaffPersonalAddress, DaffIdentifiable {
8
+ /**
9
+ * Whether this address is the customer's default billing address.
10
+ */
11
+ defaultBilling: boolean;
12
+ /**
13
+ * Whether this address is the customer's default shipping address.
14
+ */
15
+ defaultShipping: boolean;
16
+ }
17
+
18
+ /**
19
+ * A customer.
20
+ */
21
+ interface DaffCustomer extends DaffIdentifiable {
22
+ /**
23
+ * The customer's email.
24
+ */
25
+ email: string;
26
+ /**
27
+ * The customer's first or birth name.
28
+ */
29
+ firstName: string;
30
+ /**
31
+ * The customer's last or family name.
32
+ */
33
+ lastName: string;
34
+ /**
35
+ * Whether the customer is subscribed to the newsletter.
36
+ */
37
+ isSubscribed: boolean;
38
+ /**
39
+ * A list of the customer's stored addresses.
40
+ */
41
+ addresses: DaffCustomerAddress[];
42
+ }
43
+
44
+ export type { DaffCustomer, DaffCustomerAddress };
package/package.json CHANGED
@@ -1 +1 @@
1
- {"name":"@daffodil/customer","nx":{"targets":{"build":{"outputs":["{workspaceRoot}/dist/customer"]}}},"version":"0.87.2","description":"A client-side Angular package for managing ecommerce customers agnostic to the ecommerce platform.","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","peerDependencies":{"@angular/common":"^19.0.0","@angular/core":"^19.0.0","@daffodil/geography":"0.87.2","@daffodil/core":"0.87.2","@ngrx/effects":"^19.0.0","@ngrx/store":"^19.0.0","rxjs":"7.8.1"},"optionalDependencies":{"@apollo/client":"^3.12.6","@daffodil/driver":"0.87.2","apollo-angular":"^10.0.3","@faker-js/faker":"^9.8.0"},"module":"fesm2022/daffodil-customer.mjs","typings":"index.d.ts","exports":{"./package.json":{"default":"./package.json"},".":{"types":"./index.d.ts","default":"./fesm2022/daffodil-customer.mjs"},"./driver":{"types":"./driver/index.d.ts","default":"./fesm2022/daffodil-customer-driver.mjs"},"./routing":{"types":"./routing/index.d.ts","default":"./fesm2022/daffodil-customer-routing.mjs"},"./state":{"types":"./state/index.d.ts","default":"./fesm2022/daffodil-customer-state.mjs"},"./testing":{"types":"./testing/index.d.ts","default":"./fesm2022/daffodil-customer-testing.mjs"},"./driver/in-memory":{"types":"./driver/in-memory/index.d.ts","default":"./fesm2022/daffodil-customer-driver-in-memory.mjs"},"./driver/magento":{"types":"./driver/magento/index.d.ts","default":"./fesm2022/daffodil-customer-driver-magento.mjs"},"./driver/testing":{"types":"./driver/testing/index.d.ts","default":"./fesm2022/daffodil-customer-driver-testing.mjs"},"./state/testing":{"types":"./state/testing/index.d.ts","default":"./fesm2022/daffodil-customer-state-testing.mjs"},"./driver/magento/testing":{"types":"./driver/magento/testing/index.d.ts","default":"./fesm2022/daffodil-customer-driver-magento-testing.mjs"}},"sideEffects":false,"dependencies":{"tslib":"^2.3.0"}}
1
+ {"name":"@daffodil/customer","nx":{"targets":{"build":{"outputs":["{workspaceRoot}/dist/customer"]}}},"version":"0.89.0","description":"A client-side Angular package for managing ecommerce customers agnostic to the ecommerce platform.","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","peerDependencies":{"@angular/common":"^20.0.0","@angular/core":"^20.0.0","@daffodil/geography":"0.89.0","@daffodil/core":"0.89.0","@ngrx/effects":"^20.0.0","@ngrx/store":"^20.0.0","rxjs":"7.8.1"},"optionalDependencies":{"@apollo/client":"^3.12.6","@daffodil/driver":"0.89.0","apollo-angular":"^11.0.0","@faker-js/faker":"^9.8.0"},"module":"fesm2022/daffodil-customer.mjs","typings":"index.d.ts","exports":{"./package.json":{"default":"./package.json"},".":{"types":"./index.d.ts","default":"./fesm2022/daffodil-customer.mjs"},"./driver":{"types":"./driver/index.d.ts","default":"./fesm2022/daffodil-customer-driver.mjs"},"./routing":{"types":"./routing/index.d.ts","default":"./fesm2022/daffodil-customer-routing.mjs"},"./state":{"types":"./state/index.d.ts","default":"./fesm2022/daffodil-customer-state.mjs"},"./testing":{"types":"./testing/index.d.ts","default":"./fesm2022/daffodil-customer-testing.mjs"},"./driver/in-memory":{"types":"./driver/in-memory/index.d.ts","default":"./fesm2022/daffodil-customer-driver-in-memory.mjs"},"./driver/magento":{"types":"./driver/magento/index.d.ts","default":"./fesm2022/daffodil-customer-driver-magento.mjs"},"./driver/testing":{"types":"./driver/testing/index.d.ts","default":"./fesm2022/daffodil-customer-driver-testing.mjs"},"./state/testing":{"types":"./state/testing/index.d.ts","default":"./fesm2022/daffodil-customer-state-testing.mjs"},"./driver/magento/testing":{"types":"./driver/magento/testing/index.d.ts","default":"./fesm2022/daffodil-customer-driver-magento-testing.mjs"}},"sideEffects":false,"dependencies":{"tslib":"^2.3.0"}}
@@ -1 +1,29 @@
1
- export * from './public_api';
1
+ import { UrlTree } from '@angular/router';
2
+ import { Store } from '@ngrx/store';
3
+ import { Observable } from 'rxjs';
4
+ import * as i0 from '@angular/core';
5
+ import { DaffCustomerPageFacade } from '@daffodil/customer/state';
6
+
7
+ /**
8
+ * A guard that will clear customer state errors before allowing route deactivation.
9
+ */
10
+ declare class DaffCustomerClearErrorsGuard {
11
+ private store;
12
+ constructor(store: Store<any>);
13
+ canDeactivate(): boolean | UrlTree | Observable<boolean | UrlTree> | Promise<boolean | UrlTree>;
14
+ static ɵfac: i0.ɵɵFactoryDeclaration<DaffCustomerClearErrorsGuard, never>;
15
+ static ɵprov: i0.ɵɵInjectableDeclaration<DaffCustomerClearErrorsGuard>;
16
+ }
17
+
18
+ /**
19
+ * Dispatches customer load.
20
+ */
21
+ declare class DaffCustomerResolver {
22
+ private facade;
23
+ constructor(facade: DaffCustomerPageFacade);
24
+ resolve(): Observable<boolean>;
25
+ static ɵfac: i0.ɵɵFactoryDeclaration<DaffCustomerResolver, never>;
26
+ static ɵprov: i0.ɵɵInjectableDeclaration<DaffCustomerResolver>;
27
+ }
28
+
29
+ export { DaffCustomerClearErrorsGuard, DaffCustomerResolver };
package/state/index.d.ts CHANGED
@@ -1 +1,493 @@
1
- export * from './public_api';
1
+ import * as _ngrx_store from '@ngrx/store';
2
+ import { Action, ActionReducer, MemoizedSelector, Store } from '@ngrx/store';
3
+ import { DaffIdentifiable } from '@daffodil/core';
4
+ import * as _daffodil_core_state from '@daffodil/core/state';
5
+ import { DaffStateError, DaffOperationState, DaffOperationEntityState, DaffOperationEntityStateAdapter, DaffOperationStateSelectors, DaffOperationStateFacadeInterface, DaffOperationEntity, daffTransformErrorToStateError } from '@daffodil/core/state';
6
+ import * as _daffodil_customer from '@daffodil/customer';
7
+ import { DaffCustomerAddress, DaffCustomer } from '@daffodil/customer';
8
+ import * as i0 from '@angular/core';
9
+ import { Observable } from 'rxjs';
10
+ import * as i2 from '@ngrx/effects';
11
+
12
+ /**
13
+ * The customer address action types enum.
14
+ */
15
+ declare enum DaffCustomerAddressActionTypes {
16
+ AddressListAction = "[@daffodil/customer] Address List Action",
17
+ AddressListSuccessAction = "[@daffodil/customer] Address List Success Action",
18
+ AddressListFailureAction = "[@daffodil/customer] Address List Failure Action",
19
+ AddressLoadAction = "[@daffodil/customer] Address Load Action",
20
+ AddressLoadSuccessAction = "[@daffodil/customer] Address Load Success Action",
21
+ AddressLoadFailureAction = "[@daffodil/customer] Address Load Failure Action",
22
+ AddressAddAction = "[@daffodil/customer] Address Add Action",
23
+ AddressAddSuccessAction = "[@daffodil/customer] Address Add Success Action",
24
+ AddressAddFailureAction = "[@daffodil/customer] Address Add Failure Action",
25
+ AddressUpdateAction = "[@daffodil/customer] Address Update Action",
26
+ AddressUpdateSuccessAction = "[@daffodil/customer] Address Update Success Action",
27
+ AddressUpdateFailureAction = "[@daffodil/customer] Address Update Failure Action",
28
+ AddressDeleteAction = "[@daffodil/customer] Address Delete Action",
29
+ AddressDeleteSuccessAction = "[@daffodil/customer] Address Delete Success Action",
30
+ AddressDeleteFailureAction = "[@daffodil/customer] Address Delete Failure Action"
31
+ }
32
+ /**
33
+ * Lists the addresses of the current customer.
34
+ *
35
+ * @param addressId The ID of the address.
36
+ */
37
+ declare class DaffCustomerAddressList implements Action {
38
+ readonly type = DaffCustomerAddressActionTypes.AddressListAction;
39
+ constructor();
40
+ }
41
+ /**
42
+ * Indicates a successful listing of customer addresses.
43
+ */
44
+ declare class DaffCustomerAddressListSuccess<T extends DaffCustomerAddress = DaffCustomerAddress> implements Action {
45
+ payload: T[];
46
+ readonly type = DaffCustomerAddressActionTypes.AddressListSuccessAction;
47
+ constructor(payload: T[]);
48
+ }
49
+ /**
50
+ * A failed customer address list with the error message.
51
+ */
52
+ declare class DaffCustomerAddressListFailure implements Action {
53
+ payload: DaffStateError;
54
+ readonly type = DaffCustomerAddressActionTypes.AddressListFailureAction;
55
+ constructor(payload: DaffStateError);
56
+ }
57
+ /**
58
+ * Loads an address of the current customer.
59
+ *
60
+ * @param addressId The ID of the address.
61
+ */
62
+ declare class DaffCustomerAddressLoad implements Action {
63
+ addressId: DaffCustomerAddress['id'];
64
+ readonly type = DaffCustomerAddressActionTypes.AddressLoadAction;
65
+ constructor(addressId: DaffCustomerAddress['id']);
66
+ }
67
+ /**
68
+ * Indicates a successful load of a customer address.
69
+ */
70
+ declare class DaffCustomerAddressLoadSuccess<T extends DaffCustomerAddress = DaffCustomerAddress> implements Action {
71
+ payload: T;
72
+ readonly type = DaffCustomerAddressActionTypes.AddressLoadSuccessAction;
73
+ constructor(payload: T);
74
+ }
75
+ /**
76
+ * A failed customer address load with the error message.
77
+ */
78
+ declare class DaffCustomerAddressLoadFailure implements Action {
79
+ payload: DaffStateError;
80
+ id: DaffCustomer['id'];
81
+ readonly type = DaffCustomerAddressActionTypes.AddressLoadFailureAction;
82
+ constructor(payload: DaffStateError, id: DaffCustomer['id']);
83
+ }
84
+ /**
85
+ * Updates one of the currently logged-in customer's addresses.
86
+ *
87
+ * @param query The customer query.
88
+ */
89
+ declare class DaffCustomerAddressUpdate<T extends DaffCustomerAddress = DaffCustomerAddress> implements Action {
90
+ address: Partial<T> & DaffIdentifiable;
91
+ readonly type = DaffCustomerAddressActionTypes.AddressUpdateAction;
92
+ constructor(address: Partial<T> & DaffIdentifiable);
93
+ }
94
+ /**
95
+ * Indicates a successful update of one of the currently logged-in customer's addresses.
96
+ */
97
+ declare class DaffCustomerAddressUpdateSuccess<T extends DaffCustomerAddress = DaffCustomerAddress> implements Action {
98
+ payload: T[];
99
+ readonly type = DaffCustomerAddressActionTypes.AddressUpdateSuccessAction;
100
+ constructor(payload: T[]);
101
+ }
102
+ /**
103
+ * A failed address update with the error message.
104
+ */
105
+ declare class DaffCustomerAddressUpdateFailure implements Action {
106
+ payload: DaffStateError;
107
+ id: DaffCustomer['id'];
108
+ readonly type = DaffCustomerAddressActionTypes.AddressUpdateFailureAction;
109
+ constructor(payload: DaffStateError, id: DaffCustomer['id']);
110
+ }
111
+ /**
112
+ * Adds one of the currently logged-in customer's addresses.
113
+ *
114
+ * @param query The customer query.
115
+ */
116
+ declare class DaffCustomerAddressAdd<T extends DaffCustomerAddress = DaffCustomerAddress> implements Action {
117
+ address: T;
118
+ placeholderId?: string;
119
+ readonly type = DaffCustomerAddressActionTypes.AddressAddAction;
120
+ constructor(address: T, placeholderId?: string);
121
+ }
122
+ /**
123
+ * Indicates a successful addition of one of the currently logged-in customer's addresses.
124
+ *
125
+ * @param payload The updated list of customer addresses.
126
+ */
127
+ declare class DaffCustomerAddressAddSuccess<T extends DaffCustomerAddress = DaffCustomerAddress> implements Action {
128
+ payload: T[];
129
+ readonly type = DaffCustomerAddressActionTypes.AddressAddSuccessAction;
130
+ constructor(payload: T[]);
131
+ }
132
+ /**
133
+ * A failed address addition with the error message.
134
+ */
135
+ declare class DaffCustomerAddressAddFailure implements Action {
136
+ payload: DaffStateError;
137
+ id: DaffCustomer['id'];
138
+ readonly type = DaffCustomerAddressActionTypes.AddressAddFailureAction;
139
+ constructor(payload: DaffStateError, id: DaffCustomer['id']);
140
+ }
141
+ /**
142
+ * Deletes one of the currently logged-in customer's addresses.
143
+ *
144
+ * @param addressId The ID of the address.
145
+ */
146
+ declare class DaffCustomerAddressDelete implements Action {
147
+ addressId: DaffCustomerAddress['id'];
148
+ readonly type = DaffCustomerAddressActionTypes.AddressDeleteAction;
149
+ constructor(addressId: DaffCustomerAddress['id']);
150
+ }
151
+ /**
152
+ * Indicates a successful deletion of one of the currently logged-in customer's addresses.
153
+ *
154
+ * @param payload The updated list of customer addresses.
155
+ */
156
+ declare class DaffCustomerAddressDeleteSuccess<T extends DaffCustomerAddress = DaffCustomerAddress> implements Action {
157
+ payload: T[];
158
+ readonly type = DaffCustomerAddressActionTypes.AddressDeleteSuccessAction;
159
+ constructor(payload: T[]);
160
+ }
161
+ /**
162
+ * A failed address deletion with the error message.
163
+ */
164
+ declare class DaffCustomerAddressDeleteFailure implements Action {
165
+ payload: DaffStateError;
166
+ id: DaffCustomer['id'];
167
+ readonly type = DaffCustomerAddressActionTypes.AddressDeleteFailureAction;
168
+ constructor(payload: DaffStateError, id: DaffCustomer['id']);
169
+ }
170
+ /**
171
+ * A union of the customer action types.
172
+ */
173
+ type DaffCustomerAddressActions<T extends DaffCustomerAddress = DaffCustomerAddress> = DaffCustomerAddressList | DaffCustomerAddressListSuccess<T> | DaffCustomerAddressListFailure | DaffCustomerAddressLoad | DaffCustomerAddressLoadSuccess<T> | DaffCustomerAddressLoadFailure | DaffCustomerAddressUpdate<T> | DaffCustomerAddressUpdateSuccess<T> | DaffCustomerAddressUpdateFailure | DaffCustomerAddressAdd<T> | DaffCustomerAddressAddSuccess<T> | DaffCustomerAddressAddFailure | DaffCustomerAddressDelete | DaffCustomerAddressDeleteSuccess | DaffCustomerAddressDeleteFailure;
174
+
175
+ /**
176
+ * The customer action types enum.
177
+ */
178
+ declare enum DaffCustomerActionTypes {
179
+ CustomerLoadAction = "[@daffodil/customer] Customer Load Action",
180
+ CustomerLoadSuccessAction = "[@daffodil/customer] Customer Load Success Action",
181
+ CustomerLoadFailureAction = "[@daffodil/customer] Customer Load Failure Action",
182
+ CustomerUpdateAction = "[@daffodil/customer] Customer Update Action",
183
+ CustomerUpdateSuccessAction = "[@daffodil/customer] Customer Update Success Action",
184
+ CustomerUpdateFailureAction = "[@daffodil/customer] Customer Update Failure Action",
185
+ CustomerChangeEmailAction = "[@daffodil/customer] Customer Change Email Action",
186
+ CustomerChangeEmailSuccessAction = "[@daffodil/customer] Customer Change Email Success Action",
187
+ CustomerChangeEmailFailureAction = "[@daffodil/customer] Customer Change Email Failure Action",
188
+ CustomerChangePasswordAction = "[@daffodil/customer] Customer Change Password Action",
189
+ CustomerChangePasswordSuccessAction = "[@daffodil/customer] Customer Change Password Success Action",
190
+ CustomerChangePasswordFailureAction = "[@daffodil/customer] Customer Change Password Failure Action",
191
+ CustomerClearErrorsAction = "[@daffodil/customer] Customer Clear Errors Action"
192
+ }
193
+ /**
194
+ * Loads the currently logged-in customer.
195
+ *
196
+ * @param query The customer query.
197
+ */
198
+ declare class DaffCustomerLoad implements Action {
199
+ readonly type = DaffCustomerActionTypes.CustomerLoadAction;
200
+ }
201
+ /**
202
+ * Indicates a successful load of the currently logged-in customer.
203
+ */
204
+ declare class DaffCustomerLoadSuccess<T extends DaffCustomer = DaffCustomer> implements Action {
205
+ payload: T;
206
+ readonly type = DaffCustomerActionTypes.CustomerLoadSuccessAction;
207
+ constructor(payload: T);
208
+ }
209
+ /**
210
+ * A failed customer load with the error message.
211
+ */
212
+ declare class DaffCustomerLoadFailure implements Action {
213
+ payload: DaffStateError;
214
+ readonly type = DaffCustomerActionTypes.CustomerLoadFailureAction;
215
+ constructor(payload: DaffStateError);
216
+ }
217
+ /**
218
+ * Updates the currently logged-in customer.
219
+ *
220
+ * @param query The customer query.
221
+ */
222
+ declare class DaffCustomerUpdate<T extends DaffCustomer = DaffCustomer> implements Action {
223
+ customer: Partial<T>;
224
+ readonly type = DaffCustomerActionTypes.CustomerUpdateAction;
225
+ constructor(customer: Partial<T>);
226
+ }
227
+ /**
228
+ * Indicates a successful update of the currently logged-in customer.
229
+ */
230
+ declare class DaffCustomerUpdateSuccess<T extends DaffCustomer = DaffCustomer> implements Action {
231
+ payload: T;
232
+ readonly type = DaffCustomerActionTypes.CustomerUpdateSuccessAction;
233
+ constructor(payload: T);
234
+ }
235
+ /**
236
+ * A failed customer update with the error message.
237
+ */
238
+ declare class DaffCustomerUpdateFailure implements Action {
239
+ payload: DaffStateError;
240
+ readonly type = DaffCustomerActionTypes.CustomerUpdateFailureAction;
241
+ constructor(payload: DaffStateError);
242
+ }
243
+ /**
244
+ * Changes the email of the currently logged-in customer.
245
+ *
246
+ * @param query The customer query.
247
+ */
248
+ declare class DaffCustomerChangeEmail implements Action {
249
+ email: string;
250
+ password: string;
251
+ readonly type = DaffCustomerActionTypes.CustomerChangeEmailAction;
252
+ constructor(email: string, password: string);
253
+ }
254
+ /**
255
+ * Indicates a successful email change of the currently logged-in customer.
256
+ */
257
+ declare class DaffCustomerChangeEmailSuccess<T extends DaffCustomer = DaffCustomer> implements Action {
258
+ payload: T;
259
+ readonly type = DaffCustomerActionTypes.CustomerChangeEmailSuccessAction;
260
+ constructor(payload: T);
261
+ }
262
+ /**
263
+ * A failed customer email change with the error message.
264
+ */
265
+ declare class DaffCustomerChangeEmailFailure implements Action {
266
+ payload: DaffStateError;
267
+ readonly type = DaffCustomerActionTypes.CustomerChangeEmailFailureAction;
268
+ constructor(payload: DaffStateError);
269
+ }
270
+ /**
271
+ * Changes the password of the currently logged-in customer.
272
+ *
273
+ * @param query The customer query.
274
+ */
275
+ declare class DaffCustomerChangePassword implements Action {
276
+ newPassword: string;
277
+ oldPassword: string;
278
+ readonly type = DaffCustomerActionTypes.CustomerChangePasswordAction;
279
+ constructor(newPassword: string, oldPassword: string);
280
+ }
281
+ /**
282
+ * Indicates a successful password change of the currently logged-in customer.
283
+ */
284
+ declare class DaffCustomerChangePasswordSuccess implements Action {
285
+ readonly type = DaffCustomerActionTypes.CustomerChangePasswordSuccessAction;
286
+ }
287
+ /**
288
+ * A failed customer password change with the error message.
289
+ */
290
+ declare class DaffCustomerChangePasswordFailure implements Action {
291
+ payload: DaffStateError;
292
+ readonly type = DaffCustomerActionTypes.CustomerChangePasswordFailureAction;
293
+ constructor(payload: DaffStateError);
294
+ }
295
+ /**
296
+ * An action to clear all customer errors in state.
297
+ */
298
+ declare class DaffCustomerClearErrors implements Action {
299
+ readonly type = DaffCustomerActionTypes.CustomerClearErrorsAction;
300
+ }
301
+ /**
302
+ * A union of the customer action types.
303
+ */
304
+ type DaffCustomerActions<T extends DaffCustomer = DaffCustomer> = DaffCustomerLoad | DaffCustomerLoadSuccess<T> | DaffCustomerLoadFailure | DaffCustomerUpdate | DaffCustomerUpdateSuccess<T> | DaffCustomerUpdateFailure | DaffCustomerChangeEmail | DaffCustomerChangeEmailSuccess<T> | DaffCustomerChangeEmailFailure | DaffCustomerChangePassword | DaffCustomerChangePasswordSuccess | DaffCustomerChangePasswordFailure | DaffCustomerClearErrors;
305
+
306
+ /**
307
+ * The customer address state.
308
+ */
309
+ type DaffCustomerAddressReducerState = DaffOperationState;
310
+
311
+ /**
312
+ * The main customer state.
313
+ * Contains info about the current or most recent customer operation.
314
+ */
315
+ interface DaffCustomerReducerState<T extends DaffCustomer = DaffCustomer> extends DaffOperationState {
316
+ customer: T;
317
+ }
318
+
319
+ /**
320
+ * Stores the customer in state.
321
+ * Sets loading to false and resets errors.
322
+ */
323
+ declare function daffCustomerStateStoreCustomer<T extends DaffCustomer = DaffCustomer>(customer: T, state: DaffCustomerReducerState<T>): DaffCustomerReducerState<T>;
324
+
325
+ /**
326
+ * The initial state for the main customer state, see {@link DaffCustomerReducerState}.
327
+ */
328
+ declare const daffCustomerInitialState: DaffCustomerReducerState<any>;
329
+
330
+ /**
331
+ * The reducer for the customer page state, see {@link DaffCustomerReducerState}.
332
+ */
333
+ declare const daffCustomerReducer: <T extends DaffCustomer = DaffCustomer>(state: DaffCustomerReducerState<any>, action: DaffCustomerActions<T> | DaffCustomerAddressActions) => DaffCustomerReducerState<T>;
334
+
335
+ /**
336
+ * The key under which the customer feature state will be stored.
337
+ */
338
+ declare const DAFF_CUSTOMER_STORE_FEATURE_KEY = "daffCustomer";
339
+
340
+ /**
341
+ * The feature state for customer.
342
+ */
343
+ interface DaffCustomerReducersState<TCustomer extends DaffCustomer = DaffCustomer, TAddress extends DaffCustomerAddress = DaffCustomerAddress> {
344
+ customer: DaffCustomerReducerState<TCustomer>;
345
+ address: DaffCustomerAddressReducerState;
346
+ addressEntities: DaffOperationEntityState<TAddress>;
347
+ }
348
+ /**
349
+ * The footprint of customer feature state in the root application state.
350
+ */
351
+ interface DaffCustomerStateRootSlice<TCustomer extends DaffCustomer = DaffCustomer, TAddress extends DaffCustomerAddress = DaffCustomerAddress> {
352
+ [DAFF_CUSTOMER_STORE_FEATURE_KEY]: DaffCustomerReducersState<TCustomer, TAddress>;
353
+ }
354
+
355
+ declare const DAFF_CUSTOMER_EXTRA_REDUCERS: i0.InjectionToken<ActionReducer<DaffCustomerReducersState<_daffodil_customer.DaffCustomer, _daffodil_customer.DaffCustomerAddress>, _ngrx_store.Action<string>>[]>;
356
+ declare const daffCustomerProvideExtraReducers: <R extends ActionReducer<DaffCustomerReducersState<_daffodil_customer.DaffCustomer, _daffodil_customer.DaffCustomerAddress>, _ngrx_store.Action<string>> = ActionReducer<DaffCustomerReducersState<_daffodil_customer.DaffCustomer, _daffodil_customer.DaffCustomerAddress>, _ngrx_store.Action<string>>>(...values: R[]) => Array<i0.ValueProvider>;
357
+
358
+ /**
359
+ * The initial state for the main customer state, see {@link DaffCustomerAddressReducerState}.
360
+ */
361
+ declare const daffCustomerAddressInitialState: DaffCustomerAddressReducerState;
362
+
363
+ /**
364
+ * The reducer for the customer page state, see {@link DaffCustomerAddressReducerState}.
365
+ */
366
+ declare const daffCustomerAddressReducer: <T extends DaffCustomerAddress = DaffCustomerAddress>(state: _daffodil_core_state.DaffOperationState, action: DaffCustomerAddressActions<T>) => DaffCustomerAddressReducerState;
367
+
368
+ /**
369
+ * Customer Address Entities Adapter for changing/overwriting entity state.
370
+ */
371
+ declare const daffCustomerAddressEntitiesAdapter: <T extends DaffCustomerAddress = DaffCustomerAddress>() => DaffOperationEntityStateAdapter<T>;
372
+
373
+ /**
374
+ * Reducer function that catches actions and changes/overwrites product entities state.
375
+ *
376
+ * @param state current State of the redux store
377
+ * @param action CartItemGrid, BestSellers, or CartItem actions
378
+ * @returns CartItem entities state
379
+ */
380
+ declare function daffCustomerAddressEntitiesReducer<T extends DaffCustomerAddress = DaffCustomerAddress>(state: DaffOperationEntityState<T>, action: DaffCustomerAddressActions<T> | DaffCustomerActions): DaffOperationEntityState<T>;
381
+
382
+ /**
383
+ * Selectors for the main part of customer state.
384
+ */
385
+ interface DaffCustomerSelectors<T extends DaffCustomer = DaffCustomer> extends DaffOperationStateSelectors<DaffCustomerStateRootSlice<T>, DaffCustomerReducerState<T>> {
386
+ /**
387
+ * Selects the customer.
388
+ */
389
+ selectCustomer: MemoizedSelector<DaffCustomerStateRootSlice<T>, T>;
390
+ }
391
+ declare const daffCustomerGetSelectors: <T extends DaffCustomer = DaffCustomer>() => DaffCustomerSelectors<T>;
392
+
393
+ /**
394
+ * Selectors for the main part of customer state.
395
+ */
396
+ interface DaffCustomerAddressSelectors<T extends DaffCustomerAddress = DaffCustomerAddress> extends DaffOperationStateSelectors<DaffCustomerStateRootSlice<DaffCustomer, T>, DaffCustomerAddressReducerState> {
397
+ /**
398
+ * Selects the customer.
399
+ */
400
+ selectAddress: (id: T['id']) => MemoizedSelector<DaffCustomerStateRootSlice<DaffCustomer, T>, T>;
401
+ selectAddresses: MemoizedSelector<DaffCustomerStateRootSlice<DaffCustomer, T>, T[]>;
402
+ }
403
+ declare const daffCustomerAddressGetSelectors: <T extends DaffCustomerAddress = DaffCustomerAddress>() => DaffCustomerAddressSelectors<T>;
404
+
405
+ /**
406
+ * Selector for the customer feature state.
407
+ */
408
+ interface DaffCustomerFeatureSelector<TCustomer extends DaffCustomer = DaffCustomer, TAddress extends DaffCustomerAddress = DaffCustomerAddress> {
409
+ selectCustomerFeatureState: MemoizedSelector<DaffCustomerStateRootSlice<TCustomer, TAddress>, DaffCustomerReducersState<TCustomer, TAddress>>;
410
+ }
411
+ declare const getDaffCustomerReducersStateSelector: <TCustomer extends DaffCustomer = DaffCustomer, TAddress extends DaffCustomerAddress = DaffCustomerAddress>() => DaffCustomerFeatureSelector<TCustomer, TAddress>;
412
+
413
+ /**
414
+ * Exposes the customer state selectors.
415
+ */
416
+ interface DaffCustomerPageFacadeInterface<T extends DaffCustomer = DaffCustomer> extends DaffOperationStateFacadeInterface<DaffCustomerReducerState<T>> {
417
+ /**
418
+ * Whether there is a pending customer operation.
419
+ */
420
+ customer$: Observable<T>;
421
+ }
422
+
423
+ /**
424
+ * @inheritdoc
425
+ *
426
+ * Serves as the base for a customer facade.
427
+ * Extend this class and pass in the selectors for the specific state you wish to target.
428
+ */
429
+ declare class DaffCustomerPageFacade<T extends DaffCustomer = DaffCustomer> implements DaffCustomerPageFacadeInterface<T> {
430
+ private store;
431
+ customer$: Observable<T>;
432
+ loadingState$: Observable<DaffCustomerReducerState<T>['daffState']>;
433
+ loading$: Observable<boolean>;
434
+ resolving$: Observable<boolean>;
435
+ mutating$: Observable<boolean>;
436
+ errors$: Observable<DaffCustomerReducerState<T>['daffErrors']>;
437
+ hasErrors$: Observable<boolean>;
438
+ constructor(store: Store<DaffCustomerStateRootSlice>);
439
+ dispatch(action: Action): void;
440
+ static ɵfac: i0.ɵɵFactoryDeclaration<DaffCustomerPageFacade<any>, never>;
441
+ static ɵprov: i0.ɵɵInjectableDeclaration<DaffCustomerPageFacade<any>>;
442
+ }
443
+
444
+ type DaffCustomerAddressEntity = DaffOperationEntity<DaffCustomerAddress>;
445
+
446
+ /**
447
+ * Exposes the customer state selectors.
448
+ */
449
+ interface DaffCustomerAddressPageFacadeInterface<T extends DaffCustomerAddressEntity = DaffCustomerAddressEntity> extends DaffOperationStateFacadeInterface<DaffCustomerAddressReducerState> {
450
+ /**
451
+ * A list of all customer address entities.
452
+ */
453
+ addresses$: Observable<T[]>;
454
+ getAddress(id: T['id']): Observable<T>;
455
+ }
456
+
457
+ /**
458
+ * @inheritdoc
459
+ *
460
+ * Serves as the base for a customer facade.
461
+ * Extend this class and pass in the selectors for the specific state you wish to target.
462
+ */
463
+ declare class DaffCustomerAddressPageFacade<T extends DaffCustomerAddressEntity = DaffCustomerAddressEntity> implements DaffCustomerAddressPageFacadeInterface<T> {
464
+ private store;
465
+ private _selectAddress;
466
+ addresses$: Observable<T[]>;
467
+ loadingState$: Observable<DaffCustomerAddressReducerState['daffState']>;
468
+ loading$: Observable<boolean>;
469
+ resolving$: Observable<boolean>;
470
+ mutating$: Observable<boolean>;
471
+ errors$: Observable<DaffCustomerAddressReducerState['daffErrors']>;
472
+ hasErrors$: Observable<boolean>;
473
+ constructor(store: Store<DaffCustomerStateRootSlice>);
474
+ getAddress(id: T['id']): Observable<T>;
475
+ dispatch(action: Action): void;
476
+ static ɵfac: i0.ɵɵFactoryDeclaration<DaffCustomerAddressPageFacade<any>, never>;
477
+ static ɵprov: i0.ɵɵInjectableDeclaration<DaffCustomerAddressPageFacade<any>>;
478
+ }
479
+
480
+ declare const DAFF_CUSTOMER_ERROR_MATCHER: i0.InjectionToken<typeof daffTransformErrorToStateError>;
481
+ declare const provideDaffCustomerErrorMatcher: <R extends typeof daffTransformErrorToStateError = typeof daffTransformErrorToStateError>(value: R) => i0.ValueProvider;
482
+
483
+ /**
484
+ * Creates the customer feature store.
485
+ */
486
+ declare class DaffCustomerStateModule {
487
+ static ɵfac: i0.ɵɵFactoryDeclaration<DaffCustomerStateModule, never>;
488
+ static ɵmod: i0.ɵɵNgModuleDeclaration<DaffCustomerStateModule, never, [typeof _ngrx_store.StoreFeatureModule, typeof i2.EffectsFeatureModule], never>;
489
+ static ɵinj: i0.ɵɵInjectorDeclaration<DaffCustomerStateModule>;
490
+ }
491
+
492
+ export { DAFF_CUSTOMER_ERROR_MATCHER, DAFF_CUSTOMER_EXTRA_REDUCERS, DAFF_CUSTOMER_STORE_FEATURE_KEY, DaffCustomerActionTypes, DaffCustomerAddressActionTypes, DaffCustomerAddressAdd, DaffCustomerAddressAddFailure, DaffCustomerAddressAddSuccess, DaffCustomerAddressDelete, DaffCustomerAddressDeleteFailure, DaffCustomerAddressDeleteSuccess, DaffCustomerAddressList, DaffCustomerAddressListFailure, DaffCustomerAddressListSuccess, DaffCustomerAddressLoad, DaffCustomerAddressLoadFailure, DaffCustomerAddressLoadSuccess, DaffCustomerAddressPageFacade, DaffCustomerAddressUpdate, DaffCustomerAddressUpdateFailure, DaffCustomerAddressUpdateSuccess, DaffCustomerChangeEmail, DaffCustomerChangeEmailFailure, DaffCustomerChangeEmailSuccess, DaffCustomerChangePassword, DaffCustomerChangePasswordFailure, DaffCustomerChangePasswordSuccess, DaffCustomerClearErrors, DaffCustomerLoad, DaffCustomerLoadFailure, DaffCustomerLoadSuccess, DaffCustomerPageFacade, DaffCustomerStateModule, DaffCustomerUpdate, DaffCustomerUpdateFailure, DaffCustomerUpdateSuccess, daffCustomerAddressEntitiesAdapter, daffCustomerAddressEntitiesReducer, daffCustomerAddressGetSelectors, daffCustomerAddressInitialState, daffCustomerAddressReducer, daffCustomerGetSelectors, daffCustomerInitialState, daffCustomerProvideExtraReducers, daffCustomerReducer, daffCustomerStateStoreCustomer, getDaffCustomerReducersStateSelector, provideDaffCustomerErrorMatcher };
493
+ export type { DaffCustomerActions, DaffCustomerAddressActions, DaffCustomerAddressEntity, DaffCustomerAddressPageFacadeInterface, DaffCustomerAddressReducerState, DaffCustomerAddressSelectors, DaffCustomerFeatureSelector, DaffCustomerPageFacadeInterface, DaffCustomerReducerState, DaffCustomerReducersState, DaffCustomerSelectors, DaffCustomerStateRootSlice };
@@ -1 +1,66 @@
1
- export * from './public_api';
1
+ import { Action } from '@ngrx/store';
2
+ import * as rxjs from 'rxjs';
3
+ import { BehaviorSubject } from 'rxjs';
4
+ import { DaffStateError, DaffState } from '@daffodil/core/state';
5
+ import { MockDaffOperationStateFacade } from '@daffodil/core/state/testing';
6
+ import { DaffCustomer } from '@daffodil/customer';
7
+ import { DaffCustomerPageFacadeInterface, DaffCustomerAddressPageFacadeInterface, DaffCustomerAddressEntity } from '@daffodil/customer/state';
8
+ import * as i0 from '@angular/core';
9
+ import { DaffModelFactory } from '@daffodil/core/testing';
10
+ import { MockDaffCustomerAddress } from '@daffodil/customer/testing';
11
+
12
+ /**
13
+ * Mocks out facade fields and methods for testing purposes.
14
+ *
15
+ * @inheritdoc
16
+ */
17
+ declare class MockDaffCustomerPageFacade extends MockDaffOperationStateFacade implements DaffCustomerPageFacadeInterface {
18
+ customer$: BehaviorSubject<DaffCustomer>;
19
+ loading$: BehaviorSubject<boolean>;
20
+ errors$: BehaviorSubject<DaffStateError[]>;
21
+ dispatch(action: Action): void;
22
+ static ɵfac: i0.ɵɵFactoryDeclaration<MockDaffCustomerPageFacade, never>;
23
+ static ɵprov: i0.ɵɵInjectableDeclaration<MockDaffCustomerPageFacade>;
24
+ }
25
+
26
+ /**
27
+ * Mocks out facade fields and methods for testing purposes.
28
+ *
29
+ * @inheritdoc
30
+ */
31
+ declare class MockDaffCustomerAddressPageFacade extends MockDaffOperationStateFacade implements DaffCustomerAddressPageFacadeInterface {
32
+ addresses$: BehaviorSubject<DaffCustomerAddressEntity[]>;
33
+ errors$: BehaviorSubject<DaffStateError[]>;
34
+ getAddress(): rxjs.Observable<null>;
35
+ dispatch(action: Action): void;
36
+ static ɵfac: i0.ɵɵFactoryDeclaration<MockDaffCustomerAddressPageFacade, never>;
37
+ static ɵprov: i0.ɵɵInjectableDeclaration<MockDaffCustomerAddressPageFacade>;
38
+ }
39
+
40
+ /**
41
+ * Provides the {@link MockDaffCustomerPageFacade} for {@link DaffCustomerPageFacade}.
42
+ */
43
+ declare class DaffCustomerStateTestingModule {
44
+ static ɵfac: i0.ɵɵFactoryDeclaration<DaffCustomerStateTestingModule, never>;
45
+ static ɵmod: i0.ɵɵNgModuleDeclaration<DaffCustomerStateTestingModule, never, never, never>;
46
+ static ɵinj: i0.ɵɵInjectorDeclaration<DaffCustomerStateTestingModule>;
47
+ }
48
+
49
+ /**
50
+ * Mock class for {@link DaffCustomerAddressEntity}.
51
+ */
52
+ declare class MockDaffCustomerAddressEntity extends MockDaffCustomerAddress implements DaffCustomerAddressEntity {
53
+ daffState: DaffState;
54
+ daffErrors: any[];
55
+ daffTemp: boolean;
56
+ }
57
+ /**
58
+ * Model factory for {@link DaffCustomerAddressEntity}.
59
+ */
60
+ declare class DaffCustomerAddressEntityFactory extends DaffModelFactory<DaffCustomerAddressEntity> {
61
+ constructor();
62
+ static ɵfac: i0.ɵɵFactoryDeclaration<DaffCustomerAddressEntityFactory, never>;
63
+ static ɵprov: i0.ɵɵInjectableDeclaration<DaffCustomerAddressEntityFactory>;
64
+ }
65
+
66
+ export { DaffCustomerAddressEntityFactory, DaffCustomerStateTestingModule, MockDaffCustomerAddressEntity, MockDaffCustomerAddressPageFacade, MockDaffCustomerPageFacade };