@daffodil/customer 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 (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 +6 -6
  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 +6 -6
  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 +1,46 @@
1
- export * from './public_api';
1
+ import { DaffModelFactory } from '@daffodil/core/testing';
2
+ import { DaffCustomerAddress, DaffCustomer } from '@daffodil/customer';
3
+ import { MockDaffPersonalAddress } from '@daffodil/geography/testing';
4
+ import * as i0 from '@angular/core';
5
+
6
+ /**
7
+ * Mock class for {@link DaffCustomerAddress}.
8
+ */
9
+ declare class MockDaffCustomerAddress extends MockDaffPersonalAddress implements DaffCustomerAddress {
10
+ id: string;
11
+ defaultBilling: boolean;
12
+ defaultShipping: boolean;
13
+ }
14
+ /**
15
+ * Model factory for {@link DaffCustomerAddress}.
16
+ */
17
+ declare class DaffCustomerAddressFactory extends DaffModelFactory<DaffCustomerAddress> {
18
+ constructor();
19
+ static ɵfac: i0.ɵɵFactoryDeclaration<DaffCustomerAddressFactory, never>;
20
+ static ɵprov: i0.ɵɵInjectableDeclaration<DaffCustomerAddressFactory>;
21
+ }
22
+
23
+ /**
24
+ * Mock class for {@link DaffCustomer}.
25
+ */
26
+ declare class MockDaffCustomer implements DaffCustomer {
27
+ private addressFactory;
28
+ id: string;
29
+ email: string;
30
+ firstName: string;
31
+ lastName: string;
32
+ isSubscribed: boolean;
33
+ addresses: DaffCustomerAddress[];
34
+ constructor(addressFactory: DaffCustomerAddressFactory);
35
+ private createAddresses;
36
+ }
37
+ /**
38
+ * Model factory for {@link DaffCustomer}.
39
+ */
40
+ declare class DaffCustomerFactory extends DaffModelFactory<DaffCustomer> {
41
+ constructor(addressFactory: DaffCustomerAddressFactory);
42
+ static ɵfac: i0.ɵɵFactoryDeclaration<DaffCustomerFactory, never>;
43
+ static ɵprov: i0.ɵɵInjectableDeclaration<DaffCustomerFactory>;
44
+ }
45
+
46
+ export { DaffCustomerAddressFactory, DaffCustomerFactory, MockDaffCustomer, MockDaffCustomerAddress };
@@ -1,10 +0,0 @@
1
- import { DaffError, DaffInheritableError } from '@daffodil/core';
2
- export declare const DAFF_CUSTOMER_ADDRESS_NOT_FOUND_ERROR_CODE = "DAFF_CUSTOMER_ADDRESS_NOT_FOUND";
3
- /**
4
- * An error indicating that the requested address cannot be found.
5
- */
6
- export declare class DaffCustomerAddressNotFoundError extends DaffInheritableError implements DaffError {
7
- message: string;
8
- readonly code: string;
9
- constructor(message: string);
10
- }
@@ -1,6 +0,0 @@
1
- export declare const DaffCustomerDriverErrorCodes: {
2
- ADDRESS_NOT_FOUND: string;
3
- DEFAULT_BILLING_ADDRESS_DELETION: string;
4
- DEFAULT_SHIPPING_ADDRESS_DELETION: string;
5
- INVALID_API_RESPONSE: string;
6
- };
@@ -1,10 +0,0 @@
1
- import { DaffError, DaffInheritableError } from '@daffodil/core';
2
- export declare const DAFF_CUSTOMER_DEFAULT_BILLING_ADDRESS_DELETION_ERROR_CODE = "DAFF_CUSTOMER_DEFAULT_BILLING_ADDRESS_DELETION";
3
- /**
4
- * An error indicating that a deletion of the customer's default billing address was attempted and failed.
5
- */
6
- export declare class DaffCustomerDefaultBillingAddressDeletionError extends DaffInheritableError implements DaffError {
7
- message: string;
8
- readonly code: string;
9
- constructor(message: string);
10
- }
@@ -1,10 +0,0 @@
1
- import { DaffError, DaffInheritableError } from '@daffodil/core';
2
- export declare const DAFF_CUSTOMER_DEFAULT_SHIPPING_ADDRESS_DELETION_ERROR_CODE = "DAFF_CUSTOMER_DEFAULT_SHIPPING_ADDRESS_DELETION";
3
- /**
4
- * An error indicating that a deletion of the customer's default shipping address was attempted and failed.
5
- */
6
- export declare class DaffCustomerDefaultShippingAddressDeletionError extends DaffInheritableError implements DaffError {
7
- message: string;
8
- readonly code: string;
9
- constructor(message: string);
10
- }
@@ -1,10 +0,0 @@
1
- import { DaffError, DaffInheritableError } from '@daffodil/core';
2
- export declare const DAFF_CUSTOMER_INVALID_API_RESPONSE_ERROR_CODE = "DAFF_CUSTOMER_INVALID_API_RESPONSE";
3
- /**
4
- * A general error indicating that the platform returned a response which cannot be processed.
5
- */
6
- export declare class DaffCustomerInvalidAPIResponseError extends DaffInheritableError implements DaffError {
7
- message: string;
8
- readonly code: string;
9
- constructor(message: string);
10
- }
@@ -1,13 +0,0 @@
1
- import { DaffCustomerAddressNotFoundError } from './address-not-found';
2
- import { DaffCustomerDefaultBillingAddressDeletionError } from './default-billing-address-deletion';
3
- import { DaffCustomerDefaultShippingAddressDeletionError } from './default-shipping-address-deletion';
4
- import { DaffCustomerInvalidAPIResponseError } from './invalid-api-response';
5
- /**
6
- * A mapping from error codes to error class constructors.
7
- */
8
- export declare const DaffCustomerDriverErrorMap: {
9
- DAFF_CUSTOMER_INVALID_API_RESPONSE: typeof DaffCustomerInvalidAPIResponseError;
10
- DAFF_CUSTOMER_ADDRESS_NOT_FOUND: typeof DaffCustomerAddressNotFoundError;
11
- DAFF_CUSTOMER_DEFAULT_BILLING_ADDRESS_DELETION: typeof DaffCustomerDefaultBillingAddressDeletionError;
12
- DAFF_CUSTOMER_DEFAULT_SHIPPING_ADDRESS_DELETION: typeof DaffCustomerDefaultShippingAddressDeletionError;
13
- };
@@ -1,6 +0,0 @@
1
- export { DaffCustomerInvalidAPIResponseError, DAFF_CUSTOMER_INVALID_API_RESPONSE_ERROR_CODE, } from './invalid-api-response';
2
- export { DAFF_CUSTOMER_ADDRESS_NOT_FOUND_ERROR_CODE, DaffCustomerAddressNotFoundError, } from './address-not-found';
3
- export { DAFF_CUSTOMER_DEFAULT_BILLING_ADDRESS_DELETION_ERROR_CODE, DaffCustomerDefaultBillingAddressDeletionError, } from './default-billing-address-deletion';
4
- export { DAFF_CUSTOMER_DEFAULT_SHIPPING_ADDRESS_DELETION_ERROR_CODE, DaffCustomerDefaultShippingAddressDeletionError, } from './default-shipping-address-deletion';
5
- export { DaffCustomerDriverErrorMap } from './map';
6
- export { DaffCustomerDriverErrorCodes } from './codes';
@@ -1,39 +0,0 @@
1
- import { InMemoryDbService, RequestInfoUtilities, ParsedRequestUrl, RequestInfo } from 'angular-in-memory-web-api';
2
- import { DaffCustomerAddress } from '@daffodil/customer';
3
- import { DaffCustomerAddressFactory } from '@daffodil/customer/testing';
4
- import { DaffInMemorySingleRouteableBackend } from '@daffodil/driver/in-memory';
5
- import * as i0 from "@angular/core";
6
- /**
7
- * An in-memory service that handles customer address HTTP requests.
8
- */
9
- export declare class DaffCustomerAddressInMemoryBackendService implements InMemoryDbService, DaffInMemorySingleRouteableBackend {
10
- private factory;
11
- readonly collectionName = "customer-address";
12
- addresses: Record<DaffCustomerAddress['id'], DaffCustomerAddress>;
13
- constructor(factory: DaffCustomerAddressFactory);
14
- /**
15
- * Automatically called as part of the InMemoryDbService to parse incoming urls to match the InMemory backend urls.
16
- *
17
- * @param url initial url
18
- * @param utils utility to parse url
19
- * @returns ParsedRequestUrl
20
- * @docs-private
21
- */
22
- parseRequestUrl(url: string, utils: RequestInfoUtilities): ParsedRequestUrl;
23
- /**
24
- * @docs-private
25
- */
26
- createDb(): any;
27
- /**
28
- * Gets a customer.
29
- *
30
- * @param reqInfo request object
31
- * @returns An http response object
32
- */
33
- get(reqInfo: RequestInfo): import("rxjs").Observable<any>;
34
- put(reqInfo: RequestInfo): import("rxjs").Observable<any>;
35
- post(reqInfo: RequestInfo): import("rxjs").Observable<any>;
36
- delete(reqInfo: RequestInfo): import("rxjs").Observable<any>;
37
- static ɵfac: i0.ɵɵFactoryDeclaration<DaffCustomerAddressInMemoryBackendService, never>;
38
- static ɵprov: i0.ɵɵInjectableDeclaration<DaffCustomerAddressInMemoryBackendService>;
39
- }
@@ -1,41 +0,0 @@
1
- import { InMemoryDbService, RequestInfoUtilities, ParsedRequestUrl, RequestInfo } from 'angular-in-memory-web-api';
2
- import { DaffCustomer } from '@daffodil/customer';
3
- import { DaffCustomerFactory } from '@daffodil/customer/testing';
4
- import { DaffInMemorySingleRouteableBackend } from '@daffodil/driver/in-memory';
5
- import * as i0 from "@angular/core";
6
- /**
7
- * An in-memory service that delegates customer queries to child backends
8
- * via the {@link DAFF_CUSTOMER_IN_MEMORY_BACKENDS}.
9
- */
10
- export declare class DaffCustomerInMemoryBackendService implements InMemoryDbService, DaffInMemorySingleRouteableBackend {
11
- private factory;
12
- readonly collectionName = "customer";
13
- customers: Record<DaffCustomer['id'], DaffCustomer>;
14
- constructor(factory: DaffCustomerFactory);
15
- /**
16
- * Automatically called as part of the InMemoryDbService to parse incoming urls to match the InMemory backend urls.
17
- *
18
- * @param url initial url
19
- * @param utils utility to parse url
20
- * @returns ParsedRequestUrl
21
- * @docs-private
22
- */
23
- parseRequestUrl(url: string, utils: RequestInfoUtilities): ParsedRequestUrl;
24
- /**
25
- * @docs-private
26
- */
27
- createDb(): any;
28
- /**
29
- * Gets a customer.
30
- *
31
- * @param reqInfo request object
32
- * @returns An http response object
33
- */
34
- get(reqInfo: RequestInfo): import("rxjs").Observable<any>;
35
- put(reqInfo: RequestInfo): import("rxjs").Observable<any>;
36
- private updateCustomer;
37
- private changeEmail;
38
- private changePassword;
39
- static ɵfac: i0.ɵɵFactoryDeclaration<DaffCustomerInMemoryBackendService, never>;
40
- static ɵprov: i0.ɵɵInjectableDeclaration<DaffCustomerInMemoryBackendService>;
41
- }
@@ -1 +0,0 @@
1
- export declare const DAFF_CUSTOMER_ADDRESS_IN_MEMORY_COLLECTION_NAME = "customer-address";
@@ -1 +0,0 @@
1
- export declare const DAFF_CUSTOMER_IN_MEMORY_COLLECTION_NAME = "customer";
@@ -1,24 +0,0 @@
1
- import { HttpClient } from '@angular/common/http';
2
- import { InMemoryBackendConfig } from 'angular-in-memory-web-api';
3
- import { Observable } from 'rxjs';
4
- import { DaffIdentifiable } from '@daffodil/core';
5
- import { DaffCustomerAddress } from '@daffodil/customer';
6
- import { DaffCustomerAddressDriverInterface } from '@daffodil/customer/driver';
7
- import { DaffInMemoryDriverBase } from '@daffodil/driver/in-memory';
8
- import * as i0 from "@angular/core";
9
- /**
10
- * The customer address in-memory driver to mock the customer address backend service.
11
- *
12
- * @inheritdoc
13
- */
14
- export declare class DaffCustomerAddressInMemoryDriver extends DaffInMemoryDriverBase implements DaffCustomerAddressDriverInterface {
15
- private http;
16
- constructor(http: HttpClient, config: InMemoryBackendConfig);
17
- list(): Observable<DaffCustomerAddress[]>;
18
- get(addressId: string): Observable<DaffCustomerAddress>;
19
- update(address: Partial<DaffCustomerAddress> & DaffIdentifiable): Observable<DaffCustomerAddress[]>;
20
- add(address: DaffCustomerAddress): Observable<DaffCustomerAddress[]>;
21
- delete(addressId: string): Observable<DaffCustomerAddress[]>;
22
- static ɵfac: i0.ɵɵFactoryDeclaration<DaffCustomerAddressInMemoryDriver, never>;
23
- static ɵprov: i0.ɵɵInjectableDeclaration<DaffCustomerAddressInMemoryDriver>;
24
- }
@@ -1,12 +0,0 @@
1
- import { ModuleWithProviders } from '@angular/core';
2
- import * as i0 from "@angular/core";
3
- import * as i1 from "@angular/common";
4
- /**
5
- * Provides the {@link DaffCustomerInMemoryDriver} as the {@link DaffCustomerDriver}.
6
- */
7
- export declare class DaffCustomerInMemoryDriverModule {
8
- static forRoot(): ModuleWithProviders<DaffCustomerInMemoryDriverModule>;
9
- static ɵfac: i0.ɵɵFactoryDeclaration<DaffCustomerInMemoryDriverModule, never>;
10
- static ɵmod: i0.ɵɵNgModuleDeclaration<DaffCustomerInMemoryDriverModule, never, [typeof i1.CommonModule], never>;
11
- static ɵinj: i0.ɵɵInjectorDeclaration<DaffCustomerInMemoryDriverModule>;
12
- }
@@ -1,22 +0,0 @@
1
- import { HttpClient } from '@angular/common/http';
2
- import { InMemoryBackendConfig } from 'angular-in-memory-web-api';
3
- import { Observable } from 'rxjs';
4
- import { DaffCustomer } from '@daffodil/customer';
5
- import { DaffCustomerDriverInterface } from '@daffodil/customer/driver';
6
- import { DaffInMemoryDriverBase } from '@daffodil/driver/in-memory';
7
- import * as i0 from "@angular/core";
8
- /**
9
- * The customer inmemory driver to mock the customer backend service.
10
- *
11
- * @inheritdoc
12
- */
13
- export declare class DaffCustomerInMemoryDriver extends DaffInMemoryDriverBase implements DaffCustomerDriverInterface {
14
- private http;
15
- constructor(http: HttpClient, config: InMemoryBackendConfig);
16
- changeEmail(email: string, password: string): Observable<DaffCustomer>;
17
- changePassword(oldPassword: string, newPassword: string): Observable<void>;
18
- get(): Observable<DaffCustomer>;
19
- update(customer: Partial<DaffCustomer>): Observable<DaffCustomer>;
20
- static ɵfac: i0.ɵɵFactoryDeclaration<DaffCustomerInMemoryDriver, never>;
21
- static ɵprov: i0.ɵɵInjectableDeclaration<DaffCustomerInMemoryDriver>;
22
- }
@@ -1,5 +0,0 @@
1
- export { DaffCustomerInMemoryBackendService } from './backend/customer.service';
2
- export { DaffCustomerAddressInMemoryBackendService } from './backend/address.service';
3
- export { DaffCustomerInMemoryDriver } from './driver/customer.service';
4
- export { DaffCustomerAddressInMemoryDriver } from './driver/address.service';
5
- export { DaffCustomerInMemoryDriverModule } from './driver/customer-driver.module';
@@ -1,29 +0,0 @@
1
- import { Observable } from 'rxjs';
2
- import { DaffIdentifiable } from '@daffodil/core';
3
- import { DaffCustomerAddress } from '@daffodil/customer';
4
- export declare const DaffCustomerAddressDriver: import("@angular/core").InjectionToken<DaffCustomerAddressDriverInterface<DaffCustomerAddress>>, provideDaffCustomerAddressDriver: <R extends DaffCustomerAddressDriverInterface<DaffCustomerAddress> = DaffCustomerAddressDriverInterface<DaffCustomerAddress>>(klass: import("@angular/core").Type<R>) => import("@angular/core").ExistingProvider;
5
- /**
6
- * The customer driver is responsible for loading customers.
7
- */
8
- export interface DaffCustomerAddressDriverInterface<T extends DaffCustomerAddress = DaffCustomerAddress> {
9
- /**
10
- * Lists the customer's addresses.
11
- */
12
- list(): Observable<T[]>;
13
- /**
14
- * Get the specified address.
15
- */
16
- get(addressId: DaffCustomerAddress['id']): Observable<T>;
17
- /**
18
- * Update the passed address.
19
- */
20
- update(address: Partial<T> & DaffIdentifiable): Observable<T[]>;
21
- /**
22
- * Adds the passed address.
23
- */
24
- add(address: T): Observable<T[]>;
25
- /**
26
- * Deletes the specified address.
27
- */
28
- delete(addressId: DaffCustomerAddress['id']): Observable<T[]>;
29
- }
@@ -1,26 +0,0 @@
1
- import { Observable } from 'rxjs';
2
- import { DaffCustomer } from '@daffodil/customer';
3
- export declare const DaffCustomerDriver: import("@angular/core").InjectionToken<DaffCustomerDriverInterface<DaffCustomer>>, provideDaffCustomerDriver: <R extends DaffCustomerDriverInterface<DaffCustomer> = DaffCustomerDriverInterface<DaffCustomer>>(klass: import("@angular/core").Type<R>) => import("@angular/core").ExistingProvider;
4
- /**
5
- * The customer driver is responsible for loading customers.
6
- */
7
- export interface DaffCustomerDriverInterface<T extends DaffCustomer = DaffCustomer> {
8
- /**
9
- * Get the currently logged-in customer.
10
- */
11
- get(): Observable<T>;
12
- /**
13
- * Update the currently logged-in customer.
14
- *
15
- * @param customer The customer info to update.
16
- */
17
- update(customer: Partial<T>): Observable<T>;
18
- /**
19
- * Change the currently logged-in customer's email.
20
- */
21
- changeEmail(email: string, password: string): Observable<T>;
22
- /**
23
- * Change the currently logged-in customer's password.
24
- */
25
- changePassword(oldPassword: string, newPassword: string): Observable<void>;
26
- }
@@ -1,27 +0,0 @@
1
- import { ApolloQueryResult } from '@apollo/client/core';
2
- import { Apollo } from 'apollo-angular';
3
- import { Observable } from 'rxjs';
4
- import { DaffIdentifiable } from '@daffodil/core';
5
- import { DaffQueuedApollo } from '@daffodil/core/graphql';
6
- import { DaffCustomerAddress } from '@daffodil/customer';
7
- import { DaffCustomerAddressDriverInterface } from '@daffodil/customer/driver';
8
- import { MagentoGetCustomerAddressesResponse } from './models/public_api';
9
- import * as i0 from "@angular/core";
10
- /**
11
- * A service for making Magento GraphQL queries for customers.
12
- *
13
- * @inheritdoc
14
- */
15
- export declare class DaffCustomerMagentoAddressService implements DaffCustomerAddressDriverInterface {
16
- private apollo;
17
- private mutationQueue;
18
- constructor(apollo: Apollo, mutationQueue: DaffQueuedApollo);
19
- add(address: DaffCustomerAddress): Observable<DaffCustomerAddress[]>;
20
- delete(addressId: DaffCustomerAddress['id']): Observable<DaffCustomerAddress[]>;
21
- list(): Observable<DaffCustomerAddress[]>;
22
- get(addressId: DaffCustomerAddress['id']): Observable<DaffCustomerAddress>;
23
- update(address: Partial<DaffCustomerAddress> & DaffIdentifiable): Observable<DaffCustomerAddress[]>;
24
- protected listAddresses(): Observable<ApolloQueryResult<MagentoGetCustomerAddressesResponse>>;
25
- static ɵfac: i0.ɵɵFactoryDeclaration<DaffCustomerMagentoAddressService, never>;
26
- static ɵprov: i0.ɵɵInjectableDeclaration<DaffCustomerMagentoAddressService>;
27
- }
@@ -1,9 +0,0 @@
1
- import { ModuleWithProviders } from '@angular/core';
2
- import * as i0 from "@angular/core";
3
- import * as i1 from "@angular/common";
4
- export declare class DaffCustomerMagentoDriverModule {
5
- static forRoot(): ModuleWithProviders<DaffCustomerMagentoDriverModule>;
6
- static ɵfac: i0.ɵɵFactoryDeclaration<DaffCustomerMagentoDriverModule, never>;
7
- static ɵmod: i0.ɵɵNgModuleDeclaration<DaffCustomerMagentoDriverModule, never, [typeof i1.CommonModule], never>;
8
- static ɵinj: i0.ɵɵInjectorDeclaration<DaffCustomerMagentoDriverModule>;
9
- }
@@ -1,20 +0,0 @@
1
- import { Apollo } from 'apollo-angular';
2
- import { Observable } from 'rxjs';
3
- import { DaffCustomer } from '@daffodil/customer';
4
- import { DaffCustomerDriverInterface } from '@daffodil/customer/driver';
5
- import * as i0 from "@angular/core";
6
- /**
7
- * A service for making Magento GraphQL queries for customers.
8
- *
9
- * @inheritdoc
10
- */
11
- export declare class DaffCustomerMagentoService implements DaffCustomerDriverInterface {
12
- private apollo;
13
- constructor(apollo: Apollo);
14
- changeEmail(email: string, password: string): Observable<DaffCustomer>;
15
- changePassword(oldPassword: string, newPassword: string): Observable<void>;
16
- get(): Observable<DaffCustomer>;
17
- update(customer: Partial<DaffCustomer>): Observable<DaffCustomer>;
18
- static ɵfac: i0.ɵɵFactoryDeclaration<DaffCustomerMagentoService, never>;
19
- static ɵprov: i0.ɵɵInjectableDeclaration<DaffCustomerMagentoService>;
20
- }
@@ -1,3 +0,0 @@
1
- export declare const DaffCustomerMagentoErrorMessageRegexMap: {
2
- [x: string]: RegExp;
3
- };
@@ -1 +0,0 @@
1
- export { transformMagentoReviewsError } from './transform';
@@ -1,10 +0,0 @@
1
- import { GraphQLFormattedError } from 'graphql';
2
- import { DaffError } from '@daffodil/core';
3
- import { DaffCustomerInvalidAPIResponseError } from '@daffodil/customer/driver';
4
- /**
5
- * Transforms a single GraphQL error.
6
- * Optionally accepts a request payload which can be used in certain cases
7
- * to add supplemental info to the error.
8
- */
9
- export declare function transformMagentoCartGraphQlError(error: GraphQLFormattedError, requestPayload?: unknown): DaffError;
10
- export declare function transformMagentoReviewsError(error: any, requestPayload?: unknown): DaffError | DaffCustomerInvalidAPIResponseError;
@@ -1,4 +0,0 @@
1
- export declare enum MagentoCustomerGender {
2
- MALE = 1,
3
- FEMALE = 2
4
- }
@@ -1,3 +0,0 @@
1
- export * from './requests/public_api';
2
- export * from './responses/public_api';
3
- export { MagentoCustomerGender } from './gender.enum';
@@ -1,4 +0,0 @@
1
- export interface MagentoCustomerAddressAttributeInput {
2
- attribute_code?: string;
3
- value?: string;
4
- }
@@ -1,22 +0,0 @@
1
- import { MagentoCustomerAddressAttributeInput } from './address-attribute-input.type';
2
- import { MagentoCustomerAddressRegionInput } from './address-region-input.type';
3
- export interface MagentoCustomerAddressInput {
4
- city?: string;
5
- company?: string;
6
- country_code?: string;
7
- country_id?: string;
8
- custom_attributes?: MagentoCustomerAddressAttributeInput;
9
- default_billing?: boolean;
10
- default_shipping?: boolean;
11
- fax?: string;
12
- firstname?: string;
13
- lastname?: string;
14
- middlename?: string;
15
- postcode?: string;
16
- prefix?: string;
17
- region?: MagentoCustomerAddressRegionInput;
18
- street?: string[];
19
- suffix?: string;
20
- telephone?: string;
21
- vat_id?: string;
22
- }
@@ -1,8 +0,0 @@
1
- export interface MagentoCustomerAddressRegionInput {
2
- region?: string;
3
- region_code?: string;
4
- /**
5
- * Note that this is always required for US addresses even though the schema does not enforce it.
6
- */
7
- region_id?: number;
8
- }
@@ -1,14 +0,0 @@
1
- import { MagentoCustomerGender } from '../gender.enum';
2
- export interface MagentoCustomerInput {
3
- allow_remote_shopping_assistance?: boolean;
4
- date_of_birth?: string;
5
- firstname?: string;
6
- gender?: MagentoCustomerGender;
7
- is_subscribed?: boolean;
8
- lastname?: string;
9
- middlename?: string;
10
- password?: string;
11
- prefix?: string;
12
- suffix?: string;
13
- taxvat?: string;
14
- }
@@ -1,4 +0,0 @@
1
- export { MagentoCustomerInput } from './customer-input.type';
2
- export { MagentoCustomerAddressInput } from './address-input.type';
3
- export { MagentoCustomerAddressAttributeInput } from './address-attribute-input.type';
4
- export { MagentoCustomerAddressRegionInput } from './address-region-input.type';
@@ -1,6 +0,0 @@
1
- import { MagentoCustomer } from './customer.type';
2
- export interface MagentoChangeEmailResponse {
3
- updateCustomerEmail: {
4
- customer: MagentoCustomer;
5
- };
6
- }
@@ -1,5 +0,0 @@
1
- export interface MagentoChangePasswordResponse {
2
- changeCustomerPassword: {
3
- email: string;
4
- };
5
- }
@@ -1,4 +0,0 @@
1
- import { MagentoCustomerAddress } from './customer-address.type';
2
- export interface MagentoCreateCustomerAddressResponse {
3
- createCustomerAddress: MagentoCustomerAddress;
4
- }
@@ -1,18 +0,0 @@
1
- export interface MagentoCustomerAddress {
2
- id?: number;
3
- region: {
4
- region_code: string;
5
- region_id: number;
6
- };
7
- country_code?: string;
8
- street?: string[];
9
- company?: string;
10
- telephone?: string;
11
- postcode?: string;
12
- city?: string;
13
- firstname?: string;
14
- lastname?: string;
15
- email?: string;
16
- default_billing?: boolean;
17
- default_shipping?: boolean;
18
- }
@@ -1,8 +0,0 @@
1
- import { MagentoCustomerAddress } from './customer-address.type';
2
- export interface MagentoCustomer {
3
- email: string;
4
- firstname: string;
5
- lastname: string;
6
- is_subscribed: boolean;
7
- addresses: MagentoCustomerAddress[];
8
- }
@@ -1,3 +0,0 @@
1
- export interface MagentoDeleteCustomerAddressResponse {
2
- deleteCustomerAddress: boolean;
3
- }
@@ -1,4 +0,0 @@
1
- import { MagentoCustomer } from './customer.type';
2
- export interface MagentoGetCustomerAddressesResponse {
3
- customer: Pick<MagentoCustomer, 'addresses'>;
4
- }
@@ -1,4 +0,0 @@
1
- import { MagentoCustomer } from './customer.type';
2
- export interface MagentoGetCustomerResponse {
3
- customer: MagentoCustomer;
4
- }
@@ -1,10 +0,0 @@
1
- export { MagentoCustomer } from './customer.type';
2
- export { MagentoCustomerAddress } from './customer-address.type';
3
- export { MagentoGetCustomerResponse } from './get-customer.type';
4
- export { MagentoChangeEmailResponse } from './change-email.type';
5
- export { MagentoChangePasswordResponse } from './change-password.type';
6
- export { MagentoUpdateCustomerResponse } from './update-customer.type';
7
- export { MagentoGetCustomerAddressesResponse } from './get-customer-addresses.type';
8
- export { MagentoCreateCustomerAddressResponse } from './create-customer-address.type';
9
- export { MagentoUpdateCustomerAddressResponse } from './update-customer-address.type';
10
- export { MagentoDeleteCustomerAddressResponse } from './delete-customer-address.type';
@@ -1,4 +0,0 @@
1
- import { MagentoCustomerAddress } from './customer-address.type';
2
- export interface MagentoUpdateCustomerAddressResponse {
3
- updateCustomerAddress: MagentoCustomerAddress;
4
- }
@@ -1,6 +0,0 @@
1
- import { MagentoCustomer } from './customer.type';
2
- export interface MagentoUpdateCustomerResponse {
3
- updateCustomerV2: {
4
- customer: MagentoCustomer;
5
- };
6
- }
@@ -1,7 +0,0 @@
1
- export * from './transforms/public_api';
2
- export * from './models/public_api';
3
- export * from './queries/public_api';
4
- export * from './errors/public_api';
5
- export * from './validators/public_api';
6
- export { DaffCustomerMagentoService } from './customer.service';
7
- export { DaffCustomerMagentoDriverModule } from './customer-driver.module';
@@ -1,2 +0,0 @@
1
- export declare const MAGENTO_CHANGE_PASSWORD_QUERY_NAME = "MagentoChangePassword";
2
- export declare const changePassword: import("apollo-angular").TypedDocumentNode<unknown, unknown>;
@@ -1 +0,0 @@
1
- export declare const createCustomerAddress: import("apollo-angular").TypedDocumentNode<unknown, unknown>;
@@ -1 +0,0 @@
1
- export declare const deleteCustomerAddress: import("apollo-angular").TypedDocumentNode<unknown, unknown>;
@@ -1 +0,0 @@
1
- export declare const magentoCustomerAddressFragment: import("apollo-angular").TypedDocumentNode<unknown, unknown>;
@@ -1 +0,0 @@
1
- export declare const magentoCustomerFragment: import("apollo-angular").TypedDocumentNode<unknown, unknown>;
@@ -1,2 +0,0 @@
1
- export { magentoCustomerFragment } from './customer';
2
- export { magentoCustomerAddressFragment } from './customer-address';
@@ -1,2 +0,0 @@
1
- export declare const MAGENTO_GET_CUSTOMER_ADDRESSES_QUERY_NAME = "MagentoGetCustomerAddresses";
2
- export declare const getCustomerAddresses: import("apollo-angular").TypedDocumentNode<unknown, unknown>;
@@ -1,2 +0,0 @@
1
- export declare const MAGENTO_GET_CUSTOMER_QUERY_NAME = "MagentoGetCustomer";
2
- export declare const getCustomer: import("apollo-angular").TypedDocumentNode<unknown, unknown>;