@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.
- package/driver/in-memory/index.d.ts +129 -1
- package/driver/index.d.ts +118 -1
- package/driver/magento/index.d.ts +206 -1
- package/driver/magento/testing/index.d.ts +37 -1
- package/driver/testing/index.d.ts +55 -1
- package/fesm2022/daffodil-customer-driver-in-memory.mjs +16 -16
- package/fesm2022/daffodil-customer-driver-in-memory.mjs.map +1 -1
- package/fesm2022/daffodil-customer-driver-magento-testing.mjs +6 -6
- package/fesm2022/daffodil-customer-driver-magento-testing.mjs.map +1 -1
- package/fesm2022/daffodil-customer-driver-magento.mjs +10 -10
- package/fesm2022/daffodil-customer-driver-magento.mjs.map +1 -1
- package/fesm2022/daffodil-customer-driver-testing.mjs +10 -10
- package/fesm2022/daffodil-customer-driver-testing.mjs.map +1 -1
- package/fesm2022/daffodil-customer-driver.mjs.map +1 -1
- package/fesm2022/daffodil-customer-routing.mjs +6 -6
- package/fesm2022/daffodil-customer-routing.mjs.map +1 -1
- package/fesm2022/daffodil-customer-state-testing.mjs +13 -13
- package/fesm2022/daffodil-customer-state-testing.mjs.map +1 -1
- package/fesm2022/daffodil-customer-state.mjs +16 -16
- package/fesm2022/daffodil-customer-state.mjs.map +1 -1
- package/fesm2022/daffodil-customer-testing.mjs +6 -6
- package/fesm2022/daffodil-customer-testing.mjs.map +1 -1
- package/index.d.ts +44 -1
- package/package.json +1 -1
- package/routing/index.d.ts +29 -1
- package/state/index.d.ts +493 -1
- package/state/testing/index.d.ts +66 -1
- package/testing/index.d.ts +46 -1
- package/driver/errors/address-not-found.d.ts +0 -10
- package/driver/errors/codes.d.ts +0 -6
- package/driver/errors/default-billing-address-deletion.d.ts +0 -10
- package/driver/errors/default-shipping-address-deletion.d.ts +0 -10
- package/driver/errors/invalid-api-response.d.ts +0 -10
- package/driver/errors/map.d.ts +0 -13
- package/driver/errors/public_api.d.ts +0 -6
- package/driver/in-memory/backend/address.service.d.ts +0 -39
- package/driver/in-memory/backend/customer.service.d.ts +0 -41
- package/driver/in-memory/collection-names/address.const.d.ts +0 -1
- package/driver/in-memory/collection-names/customer.const.d.ts +0 -1
- package/driver/in-memory/driver/address.service.d.ts +0 -24
- package/driver/in-memory/driver/customer-driver.module.d.ts +0 -12
- package/driver/in-memory/driver/customer.service.d.ts +0 -22
- package/driver/in-memory/public_api.d.ts +0 -5
- package/driver/interfaces/address-service.interface.d.ts +0 -29
- package/driver/interfaces/customer-service.interface.d.ts +0 -26
- package/driver/magento/address.service.d.ts +0 -27
- package/driver/magento/customer-driver.module.d.ts +0 -9
- package/driver/magento/customer.service.d.ts +0 -20
- package/driver/magento/errors/map.d.ts +0 -3
- package/driver/magento/errors/public_api.d.ts +0 -1
- package/driver/magento/errors/transform.d.ts +0 -10
- package/driver/magento/models/gender.enum.d.ts +0 -4
- package/driver/magento/models/public_api.d.ts +0 -3
- package/driver/magento/models/requests/address-attribute-input.type.d.ts +0 -4
- package/driver/magento/models/requests/address-input.type.d.ts +0 -22
- package/driver/magento/models/requests/address-region-input.type.d.ts +0 -8
- package/driver/magento/models/requests/customer-input.type.d.ts +0 -14
- package/driver/magento/models/requests/public_api.d.ts +0 -4
- package/driver/magento/models/responses/change-email.type.d.ts +0 -6
- package/driver/magento/models/responses/change-password.type.d.ts +0 -5
- package/driver/magento/models/responses/create-customer-address.type.d.ts +0 -4
- package/driver/magento/models/responses/customer-address.type.d.ts +0 -18
- package/driver/magento/models/responses/customer.type.d.ts +0 -8
- package/driver/magento/models/responses/delete-customer-address.type.d.ts +0 -3
- package/driver/magento/models/responses/get-customer-addresses.type.d.ts +0 -4
- package/driver/magento/models/responses/get-customer.type.d.ts +0 -4
- package/driver/magento/models/responses/public_api.d.ts +0 -10
- package/driver/magento/models/responses/update-customer-address.type.d.ts +0 -4
- package/driver/magento/models/responses/update-customer.type.d.ts +0 -6
- package/driver/magento/public_api.d.ts +0 -7
- package/driver/magento/queries/change-password.d.ts +0 -2
- package/driver/magento/queries/create-customer-address.d.ts +0 -1
- package/driver/magento/queries/delete-customer-address.d.ts +0 -1
- package/driver/magento/queries/fragments/customer-address.d.ts +0 -1
- package/driver/magento/queries/fragments/customer.d.ts +0 -1
- package/driver/magento/queries/fragments/public_api.d.ts +0 -2
- package/driver/magento/queries/get-customer-addresses.d.ts +0 -2
- package/driver/magento/queries/get-customer.d.ts +0 -2
- package/driver/magento/queries/public_api.d.ts +0 -9
- package/driver/magento/queries/update-customer-address.d.ts +0 -1
- package/driver/magento/queries/update-customer.d.ts +0 -2
- package/driver/magento/queries/update-email.d.ts +0 -2
- package/driver/magento/testing/factories/address.factory.d.ts +0 -28
- package/driver/magento/testing/factories/customer.factory.d.ts +0 -9
- package/driver/magento/testing/factories/public_api.d.ts +0 -2
- package/driver/magento/testing/public_api.d.ts +0 -1
- package/driver/magento/transforms/public_api.d.ts +0 -2
- package/driver/magento/transforms/requests/address-input.d.ts +0 -3
- package/driver/magento/transforms/requests/customer-input.d.ts +0 -3
- package/driver/magento/transforms/requests/public_api.d.ts +0 -2
- package/driver/magento/transforms/responses/customer-address.d.ts +0 -3
- package/driver/magento/transforms/responses/customer.d.ts +0 -3
- package/driver/magento/transforms/responses/public_api.d.ts +0 -2
- package/driver/magento/validators/change-email.d.ts +0 -3
- package/driver/magento/validators/change-password.d.ts +0 -3
- package/driver/magento/validators/create-customer-address.d.ts +0 -3
- package/driver/magento/validators/delete-customer-address.d.ts +0 -3
- package/driver/magento/validators/get-customer-addresses.d.ts +0 -3
- package/driver/magento/validators/get-customer.d.ts +0 -3
- package/driver/magento/validators/public_api.d.ts +0 -8
- package/driver/magento/validators/update-customer-address.d.ts +0 -3
- package/driver/magento/validators/update-customer.d.ts +0 -3
- package/driver/public_api.d.ts +0 -3
- package/driver/testing/drivers/address.service.d.ts +0 -23
- package/driver/testing/drivers/customer-driver.module.d.ts +0 -12
- package/driver/testing/drivers/customer.service.d.ts +0 -21
- package/driver/testing/drivers/public_api.d.ts +0 -3
- package/driver/testing/public_api.d.ts +0 -1
- package/models/address.type.d.ts +0 -15
- package/models/customer.type.d.ts +0 -27
- package/models/public_api.d.ts +0 -2
- package/public_api.d.ts +0 -1
- package/routing/guards/clear-errors.guard.d.ts +0 -14
- package/routing/guards/public_api.d.ts +0 -1
- package/routing/public_api.d.ts +0 -2
- package/routing/resolvers/customer.resolver.d.ts +0 -13
- package/routing/resolvers/public_api.d.ts +0 -1
- package/state/actions/address.actions.d.ts +0 -166
- package/state/actions/customer.actions.d.ts +0 -133
- package/state/actions/public_api.d.ts +0 -2
- package/state/customer.module.d.ts +0 -11
- package/state/effects/address.effects.d.ts +0 -31
- package/state/effects/customer.effects.d.ts +0 -30
- package/state/facades/address/facade.d.ts +0 -28
- package/state/facades/address/interface.d.ts +0 -14
- package/state/facades/customer/facade.d.ts +0 -26
- package/state/facades/customer/interface.d.ts +0 -13
- package/state/facades/public_api.d.ts +0 -4
- package/state/injection-tokens/error-matcher.token.d.ts +0 -2
- package/state/injection-tokens/public_api.d.ts +0 -1
- package/state/models/address.type.d.ts +0 -3
- package/state/models/public_api.d.ts +0 -1
- package/state/public_api.d.ts +0 -7
- package/state/reducers/address/initial-state.d.ts +0 -5
- package/state/reducers/address/public_api.d.ts +0 -3
- package/state/reducers/address/reducer.d.ts +0 -7
- package/state/reducers/address/type.d.ts +0 -5
- package/state/reducers/address-entities/adapter.d.ts +0 -6
- package/state/reducers/address-entities/public_api.d.ts +0 -2
- package/state/reducers/address-entities/reducer.d.ts +0 -12
- package/state/reducers/customer/adapter.d.ts +0 -12
- package/state/reducers/customer/initial-state.d.ts +0 -5
- package/state/reducers/customer/interface.d.ts +0 -9
- package/state/reducers/customer/public_api.d.ts +0 -4
- package/state/reducers/customer/reducer.d.ts +0 -7
- package/state/reducers/public_api.d.ts +0 -6
- package/state/reducers/reducers.interface.d.ts +0 -19
- package/state/reducers/store-feature-key.d.ts +0 -4
- package/state/reducers/token/extra.token.d.ts +0 -3
- package/state/reducers/token/public_api.d.ts +0 -1
- package/state/reducers/token/reducers.token.d.ts +0 -3
- package/state/selectors/address/selector.d.ts +0 -15
- package/state/selectors/customer/selector.d.ts +0 -14
- package/state/selectors/feature.selector.d.ts +0 -10
- package/state/selectors/public_api.d.ts +0 -3
- package/state/testing/customer-testing.module.d.ts +0 -9
- package/state/testing/factories/customer-address.factory.d.ts +0 -21
- package/state/testing/factories/public_api.d.ts +0 -1
- package/state/testing/mock-address-facade.d.ts +0 -19
- package/state/testing/mock-customer-facade.d.ts +0 -20
- package/state/testing/public_api.d.ts +0 -4
- package/testing/factories/customer-address.factory.d.ts +0 -20
- package/testing/factories/customer.factory.d.ts +0 -26
- package/testing/factories/public_api.d.ts +0 -2
- package/testing/public_api.d.ts +0 -1
|
@@ -1 +1,129 @@
|
|
|
1
|
-
|
|
1
|
+
import * as rxjs from 'rxjs';
|
|
2
|
+
import { Observable } from 'rxjs';
|
|
3
|
+
import { InMemoryDbService, RequestInfoUtilities, ParsedRequestUrl, RequestInfo, InMemoryBackendConfig } from 'angular-in-memory-web-api';
|
|
4
|
+
import { DaffCustomer, DaffCustomerAddress } from '@daffodil/customer';
|
|
5
|
+
import { DaffCustomerFactory, DaffCustomerAddressFactory } from '@daffodil/customer/testing';
|
|
6
|
+
import { DaffInMemorySingleRouteableBackend, DaffInMemoryDriverBase } from '@daffodil/driver/in-memory';
|
|
7
|
+
import * as i0 from '@angular/core';
|
|
8
|
+
import { ModuleWithProviders } from '@angular/core';
|
|
9
|
+
import { HttpClient } from '@angular/common/http';
|
|
10
|
+
import { DaffCustomerDriverInterface, DaffCustomerAddressDriverInterface } from '@daffodil/customer/driver';
|
|
11
|
+
import { DaffIdentifiable } from '@daffodil/core';
|
|
12
|
+
import * as i1 from '@angular/common';
|
|
13
|
+
|
|
14
|
+
/**
|
|
15
|
+
* An in-memory service that delegates customer queries to child backends
|
|
16
|
+
* via the {@link DAFF_CUSTOMER_IN_MEMORY_BACKENDS}.
|
|
17
|
+
*/
|
|
18
|
+
declare class DaffCustomerInMemoryBackendService implements InMemoryDbService, DaffInMemorySingleRouteableBackend {
|
|
19
|
+
private factory;
|
|
20
|
+
readonly collectionName = "customer";
|
|
21
|
+
customers: Record<DaffCustomer['id'], DaffCustomer>;
|
|
22
|
+
constructor(factory: DaffCustomerFactory);
|
|
23
|
+
/**
|
|
24
|
+
* Automatically called as part of the InMemoryDbService to parse incoming urls to match the InMemory backend urls.
|
|
25
|
+
*
|
|
26
|
+
* @param url initial url
|
|
27
|
+
* @param utils utility to parse url
|
|
28
|
+
* @returns ParsedRequestUrl
|
|
29
|
+
* @docs-private
|
|
30
|
+
*/
|
|
31
|
+
parseRequestUrl(url: string, utils: RequestInfoUtilities): ParsedRequestUrl;
|
|
32
|
+
/**
|
|
33
|
+
* @docs-private
|
|
34
|
+
*/
|
|
35
|
+
createDb(): any;
|
|
36
|
+
/**
|
|
37
|
+
* Gets a customer.
|
|
38
|
+
*
|
|
39
|
+
* @param reqInfo request object
|
|
40
|
+
* @returns An http response object
|
|
41
|
+
*/
|
|
42
|
+
get(reqInfo: RequestInfo): rxjs.Observable<any>;
|
|
43
|
+
put(reqInfo: RequestInfo): rxjs.Observable<any>;
|
|
44
|
+
private updateCustomer;
|
|
45
|
+
private changeEmail;
|
|
46
|
+
private changePassword;
|
|
47
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<DaffCustomerInMemoryBackendService, never>;
|
|
48
|
+
static ɵprov: i0.ɵɵInjectableDeclaration<DaffCustomerInMemoryBackendService>;
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
/**
|
|
52
|
+
* An in-memory service that handles customer address HTTP requests.
|
|
53
|
+
*/
|
|
54
|
+
declare class DaffCustomerAddressInMemoryBackendService implements InMemoryDbService, DaffInMemorySingleRouteableBackend {
|
|
55
|
+
private factory;
|
|
56
|
+
readonly collectionName = "customer-address";
|
|
57
|
+
addresses: Record<DaffCustomerAddress['id'], DaffCustomerAddress>;
|
|
58
|
+
constructor(factory: DaffCustomerAddressFactory);
|
|
59
|
+
/**
|
|
60
|
+
* Automatically called as part of the InMemoryDbService to parse incoming urls to match the InMemory backend urls.
|
|
61
|
+
*
|
|
62
|
+
* @param url initial url
|
|
63
|
+
* @param utils utility to parse url
|
|
64
|
+
* @returns ParsedRequestUrl
|
|
65
|
+
* @docs-private
|
|
66
|
+
*/
|
|
67
|
+
parseRequestUrl(url: string, utils: RequestInfoUtilities): ParsedRequestUrl;
|
|
68
|
+
/**
|
|
69
|
+
* @docs-private
|
|
70
|
+
*/
|
|
71
|
+
createDb(): any;
|
|
72
|
+
/**
|
|
73
|
+
* Gets a customer.
|
|
74
|
+
*
|
|
75
|
+
* @param reqInfo request object
|
|
76
|
+
* @returns An http response object
|
|
77
|
+
*/
|
|
78
|
+
get(reqInfo: RequestInfo): rxjs.Observable<any>;
|
|
79
|
+
put(reqInfo: RequestInfo): rxjs.Observable<any>;
|
|
80
|
+
post(reqInfo: RequestInfo): rxjs.Observable<any>;
|
|
81
|
+
delete(reqInfo: RequestInfo): rxjs.Observable<any>;
|
|
82
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<DaffCustomerAddressInMemoryBackendService, never>;
|
|
83
|
+
static ɵprov: i0.ɵɵInjectableDeclaration<DaffCustomerAddressInMemoryBackendService>;
|
|
84
|
+
}
|
|
85
|
+
|
|
86
|
+
/**
|
|
87
|
+
* The customer inmemory driver to mock the customer backend service.
|
|
88
|
+
*
|
|
89
|
+
* @inheritdoc
|
|
90
|
+
*/
|
|
91
|
+
declare class DaffCustomerInMemoryDriver extends DaffInMemoryDriverBase implements DaffCustomerDriverInterface {
|
|
92
|
+
private http;
|
|
93
|
+
constructor(http: HttpClient, config: InMemoryBackendConfig);
|
|
94
|
+
changeEmail(email: string, password: string): Observable<DaffCustomer>;
|
|
95
|
+
changePassword(oldPassword: string, newPassword: string): Observable<void>;
|
|
96
|
+
get(): Observable<DaffCustomer>;
|
|
97
|
+
update(customer: Partial<DaffCustomer>): Observable<DaffCustomer>;
|
|
98
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<DaffCustomerInMemoryDriver, never>;
|
|
99
|
+
static ɵprov: i0.ɵɵInjectableDeclaration<DaffCustomerInMemoryDriver>;
|
|
100
|
+
}
|
|
101
|
+
|
|
102
|
+
/**
|
|
103
|
+
* The customer address in-memory driver to mock the customer address backend service.
|
|
104
|
+
*
|
|
105
|
+
* @inheritdoc
|
|
106
|
+
*/
|
|
107
|
+
declare class DaffCustomerAddressInMemoryDriver extends DaffInMemoryDriverBase implements DaffCustomerAddressDriverInterface {
|
|
108
|
+
private http;
|
|
109
|
+
constructor(http: HttpClient, config: InMemoryBackendConfig);
|
|
110
|
+
list(): Observable<DaffCustomerAddress[]>;
|
|
111
|
+
get(addressId: string): Observable<DaffCustomerAddress>;
|
|
112
|
+
update(address: Partial<DaffCustomerAddress> & DaffIdentifiable): Observable<DaffCustomerAddress[]>;
|
|
113
|
+
add(address: DaffCustomerAddress): Observable<DaffCustomerAddress[]>;
|
|
114
|
+
delete(addressId: string): Observable<DaffCustomerAddress[]>;
|
|
115
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<DaffCustomerAddressInMemoryDriver, never>;
|
|
116
|
+
static ɵprov: i0.ɵɵInjectableDeclaration<DaffCustomerAddressInMemoryDriver>;
|
|
117
|
+
}
|
|
118
|
+
|
|
119
|
+
/**
|
|
120
|
+
* Provides the {@link DaffCustomerInMemoryDriver} as the {@link DaffCustomerDriver}.
|
|
121
|
+
*/
|
|
122
|
+
declare class DaffCustomerInMemoryDriverModule {
|
|
123
|
+
static forRoot(): ModuleWithProviders<DaffCustomerInMemoryDriverModule>;
|
|
124
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<DaffCustomerInMemoryDriverModule, never>;
|
|
125
|
+
static ɵmod: i0.ɵɵNgModuleDeclaration<DaffCustomerInMemoryDriverModule, never, [typeof i1.CommonModule], never>;
|
|
126
|
+
static ɵinj: i0.ɵɵInjectorDeclaration<DaffCustomerInMemoryDriverModule>;
|
|
127
|
+
}
|
|
128
|
+
|
|
129
|
+
export { DaffCustomerAddressInMemoryBackendService, DaffCustomerAddressInMemoryDriver, DaffCustomerInMemoryBackendService, DaffCustomerInMemoryDriver, DaffCustomerInMemoryDriverModule };
|
package/driver/index.d.ts
CHANGED
|
@@ -1 +1,118 @@
|
|
|
1
|
-
|
|
1
|
+
import * as _angular_core from '@angular/core';
|
|
2
|
+
import { Observable } from 'rxjs';
|
|
3
|
+
import { DaffCustomer, DaffCustomerAddress } from '@daffodil/customer';
|
|
4
|
+
import { DaffIdentifiable, DaffInheritableError, DaffError } from '@daffodil/core';
|
|
5
|
+
|
|
6
|
+
declare const DaffCustomerDriver: _angular_core.InjectionToken<DaffCustomerDriverInterface<DaffCustomer>>;
|
|
7
|
+
declare const provideDaffCustomerDriver: <R extends DaffCustomerDriverInterface<DaffCustomer> = DaffCustomerDriverInterface<DaffCustomer>>(klass: _angular_core.Type<R>) => _angular_core.ExistingProvider;
|
|
8
|
+
/**
|
|
9
|
+
* The customer driver is responsible for loading customers.
|
|
10
|
+
*/
|
|
11
|
+
interface DaffCustomerDriverInterface<T extends DaffCustomer = DaffCustomer> {
|
|
12
|
+
/**
|
|
13
|
+
* Get the currently logged-in customer.
|
|
14
|
+
*/
|
|
15
|
+
get(): Observable<T>;
|
|
16
|
+
/**
|
|
17
|
+
* Update the currently logged-in customer.
|
|
18
|
+
*
|
|
19
|
+
* @param customer The customer info to update.
|
|
20
|
+
*/
|
|
21
|
+
update(customer: Partial<T>): Observable<T>;
|
|
22
|
+
/**
|
|
23
|
+
* Change the currently logged-in customer's email.
|
|
24
|
+
*/
|
|
25
|
+
changeEmail(email: string, password: string): Observable<T>;
|
|
26
|
+
/**
|
|
27
|
+
* Change the currently logged-in customer's password.
|
|
28
|
+
*/
|
|
29
|
+
changePassword(oldPassword: string, newPassword: string): Observable<void>;
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
declare const DaffCustomerAddressDriver: _angular_core.InjectionToken<DaffCustomerAddressDriverInterface<DaffCustomerAddress>>;
|
|
33
|
+
declare const provideDaffCustomerAddressDriver: <R extends DaffCustomerAddressDriverInterface<DaffCustomerAddress> = DaffCustomerAddressDriverInterface<DaffCustomerAddress>>(klass: _angular_core.Type<R>) => _angular_core.ExistingProvider;
|
|
34
|
+
/**
|
|
35
|
+
* The customer driver is responsible for loading customers.
|
|
36
|
+
*/
|
|
37
|
+
interface DaffCustomerAddressDriverInterface<T extends DaffCustomerAddress = DaffCustomerAddress> {
|
|
38
|
+
/**
|
|
39
|
+
* Lists the customer's addresses.
|
|
40
|
+
*/
|
|
41
|
+
list(): Observable<T[]>;
|
|
42
|
+
/**
|
|
43
|
+
* Get the specified address.
|
|
44
|
+
*/
|
|
45
|
+
get(addressId: DaffCustomerAddress['id']): Observable<T>;
|
|
46
|
+
/**
|
|
47
|
+
* Update the passed address.
|
|
48
|
+
*/
|
|
49
|
+
update(address: Partial<T> & DaffIdentifiable): Observable<T[]>;
|
|
50
|
+
/**
|
|
51
|
+
* Adds the passed address.
|
|
52
|
+
*/
|
|
53
|
+
add(address: T): Observable<T[]>;
|
|
54
|
+
/**
|
|
55
|
+
* Deletes the specified address.
|
|
56
|
+
*/
|
|
57
|
+
delete(addressId: DaffCustomerAddress['id']): Observable<T[]>;
|
|
58
|
+
}
|
|
59
|
+
|
|
60
|
+
declare const DAFF_CUSTOMER_INVALID_API_RESPONSE_ERROR_CODE = "DAFF_CUSTOMER_INVALID_API_RESPONSE";
|
|
61
|
+
/**
|
|
62
|
+
* A general error indicating that the platform returned a response which cannot be processed.
|
|
63
|
+
*/
|
|
64
|
+
declare class DaffCustomerInvalidAPIResponseError extends DaffInheritableError implements DaffError {
|
|
65
|
+
message: string;
|
|
66
|
+
readonly code: string;
|
|
67
|
+
constructor(message: string);
|
|
68
|
+
}
|
|
69
|
+
|
|
70
|
+
declare const DAFF_CUSTOMER_ADDRESS_NOT_FOUND_ERROR_CODE = "DAFF_CUSTOMER_ADDRESS_NOT_FOUND";
|
|
71
|
+
/**
|
|
72
|
+
* An error indicating that the requested address cannot be found.
|
|
73
|
+
*/
|
|
74
|
+
declare class DaffCustomerAddressNotFoundError extends DaffInheritableError implements DaffError {
|
|
75
|
+
message: string;
|
|
76
|
+
readonly code: string;
|
|
77
|
+
constructor(message: string);
|
|
78
|
+
}
|
|
79
|
+
|
|
80
|
+
declare const DAFF_CUSTOMER_DEFAULT_BILLING_ADDRESS_DELETION_ERROR_CODE = "DAFF_CUSTOMER_DEFAULT_BILLING_ADDRESS_DELETION";
|
|
81
|
+
/**
|
|
82
|
+
* An error indicating that a deletion of the customer's default billing address was attempted and failed.
|
|
83
|
+
*/
|
|
84
|
+
declare class DaffCustomerDefaultBillingAddressDeletionError extends DaffInheritableError implements DaffError {
|
|
85
|
+
message: string;
|
|
86
|
+
readonly code: string;
|
|
87
|
+
constructor(message: string);
|
|
88
|
+
}
|
|
89
|
+
|
|
90
|
+
declare const DAFF_CUSTOMER_DEFAULT_SHIPPING_ADDRESS_DELETION_ERROR_CODE = "DAFF_CUSTOMER_DEFAULT_SHIPPING_ADDRESS_DELETION";
|
|
91
|
+
/**
|
|
92
|
+
* An error indicating that a deletion of the customer's default shipping address was attempted and failed.
|
|
93
|
+
*/
|
|
94
|
+
declare class DaffCustomerDefaultShippingAddressDeletionError extends DaffInheritableError implements DaffError {
|
|
95
|
+
message: string;
|
|
96
|
+
readonly code: string;
|
|
97
|
+
constructor(message: string);
|
|
98
|
+
}
|
|
99
|
+
|
|
100
|
+
/**
|
|
101
|
+
* A mapping from error codes to error class constructors.
|
|
102
|
+
*/
|
|
103
|
+
declare const DaffCustomerDriverErrorMap: {
|
|
104
|
+
DAFF_CUSTOMER_INVALID_API_RESPONSE: typeof DaffCustomerInvalidAPIResponseError;
|
|
105
|
+
DAFF_CUSTOMER_ADDRESS_NOT_FOUND: typeof DaffCustomerAddressNotFoundError;
|
|
106
|
+
DAFF_CUSTOMER_DEFAULT_BILLING_ADDRESS_DELETION: typeof DaffCustomerDefaultBillingAddressDeletionError;
|
|
107
|
+
DAFF_CUSTOMER_DEFAULT_SHIPPING_ADDRESS_DELETION: typeof DaffCustomerDefaultShippingAddressDeletionError;
|
|
108
|
+
};
|
|
109
|
+
|
|
110
|
+
declare const DaffCustomerDriverErrorCodes: {
|
|
111
|
+
ADDRESS_NOT_FOUND: string;
|
|
112
|
+
DEFAULT_BILLING_ADDRESS_DELETION: string;
|
|
113
|
+
DEFAULT_SHIPPING_ADDRESS_DELETION: string;
|
|
114
|
+
INVALID_API_RESPONSE: string;
|
|
115
|
+
};
|
|
116
|
+
|
|
117
|
+
export { DAFF_CUSTOMER_ADDRESS_NOT_FOUND_ERROR_CODE, DAFF_CUSTOMER_DEFAULT_BILLING_ADDRESS_DELETION_ERROR_CODE, DAFF_CUSTOMER_DEFAULT_SHIPPING_ADDRESS_DELETION_ERROR_CODE, DAFF_CUSTOMER_INVALID_API_RESPONSE_ERROR_CODE, DaffCustomerAddressDriver, DaffCustomerAddressNotFoundError, DaffCustomerDefaultBillingAddressDeletionError, DaffCustomerDefaultShippingAddressDeletionError, DaffCustomerDriver, DaffCustomerDriverErrorCodes, DaffCustomerDriverErrorMap, DaffCustomerInvalidAPIResponseError, provideDaffCustomerAddressDriver, provideDaffCustomerDriver };
|
|
118
|
+
export type { DaffCustomerAddressDriverInterface, DaffCustomerDriverInterface };
|
|
@@ -1 +1,206 @@
|
|
|
1
|
-
|
|
1
|
+
import { DaffCustomer, DaffCustomerAddress } from '@daffodil/customer';
|
|
2
|
+
import * as apollo_angular from 'apollo-angular';
|
|
3
|
+
import { Apollo } from 'apollo-angular';
|
|
4
|
+
import { DaffError } from '@daffodil/core';
|
|
5
|
+
import { DaffCustomerInvalidAPIResponseError, DaffCustomerDriverInterface } from '@daffodil/customer/driver';
|
|
6
|
+
import { ApolloQueryResult } from '@apollo/client/core';
|
|
7
|
+
import { Observable } from 'rxjs';
|
|
8
|
+
import * as i0 from '@angular/core';
|
|
9
|
+
import { ModuleWithProviders } from '@angular/core';
|
|
10
|
+
import * as i1 from '@angular/common';
|
|
11
|
+
|
|
12
|
+
declare enum MagentoCustomerGender {
|
|
13
|
+
MALE = 1,
|
|
14
|
+
FEMALE = 2
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
interface MagentoCustomerInput {
|
|
18
|
+
allow_remote_shopping_assistance?: boolean;
|
|
19
|
+
date_of_birth?: string;
|
|
20
|
+
firstname?: string;
|
|
21
|
+
gender?: MagentoCustomerGender;
|
|
22
|
+
is_subscribed?: boolean;
|
|
23
|
+
lastname?: string;
|
|
24
|
+
middlename?: string;
|
|
25
|
+
password?: string;
|
|
26
|
+
prefix?: string;
|
|
27
|
+
suffix?: string;
|
|
28
|
+
taxvat?: string;
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
interface MagentoCustomerAddressAttributeInput {
|
|
32
|
+
attribute_code?: string;
|
|
33
|
+
value?: string;
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
interface MagentoCustomerAddressRegionInput {
|
|
37
|
+
region?: string;
|
|
38
|
+
region_code?: string;
|
|
39
|
+
/**
|
|
40
|
+
* Note that this is always required for US addresses even though the schema does not enforce it.
|
|
41
|
+
*/
|
|
42
|
+
region_id?: number;
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
interface MagentoCustomerAddressInput {
|
|
46
|
+
city?: string;
|
|
47
|
+
company?: string;
|
|
48
|
+
country_code?: string;
|
|
49
|
+
country_id?: string;
|
|
50
|
+
custom_attributes?: MagentoCustomerAddressAttributeInput;
|
|
51
|
+
default_billing?: boolean;
|
|
52
|
+
default_shipping?: boolean;
|
|
53
|
+
fax?: string;
|
|
54
|
+
firstname?: string;
|
|
55
|
+
lastname?: string;
|
|
56
|
+
middlename?: string;
|
|
57
|
+
postcode?: string;
|
|
58
|
+
prefix?: string;
|
|
59
|
+
region?: MagentoCustomerAddressRegionInput;
|
|
60
|
+
street?: string[];
|
|
61
|
+
suffix?: string;
|
|
62
|
+
telephone?: string;
|
|
63
|
+
vat_id?: string;
|
|
64
|
+
}
|
|
65
|
+
|
|
66
|
+
interface MagentoCustomerAddress {
|
|
67
|
+
id?: number;
|
|
68
|
+
region: {
|
|
69
|
+
region_code: string;
|
|
70
|
+
region_id: number;
|
|
71
|
+
};
|
|
72
|
+
country_code?: string;
|
|
73
|
+
street?: string[];
|
|
74
|
+
company?: string;
|
|
75
|
+
telephone?: string;
|
|
76
|
+
postcode?: string;
|
|
77
|
+
city?: string;
|
|
78
|
+
firstname?: string;
|
|
79
|
+
lastname?: string;
|
|
80
|
+
email?: string;
|
|
81
|
+
default_billing?: boolean;
|
|
82
|
+
default_shipping?: boolean;
|
|
83
|
+
}
|
|
84
|
+
|
|
85
|
+
interface MagentoCustomer {
|
|
86
|
+
email: string;
|
|
87
|
+
firstname: string;
|
|
88
|
+
lastname: string;
|
|
89
|
+
is_subscribed: boolean;
|
|
90
|
+
addresses: MagentoCustomerAddress[];
|
|
91
|
+
}
|
|
92
|
+
|
|
93
|
+
interface MagentoGetCustomerResponse {
|
|
94
|
+
customer: MagentoCustomer;
|
|
95
|
+
}
|
|
96
|
+
|
|
97
|
+
interface MagentoChangeEmailResponse {
|
|
98
|
+
updateCustomerEmail: {
|
|
99
|
+
customer: MagentoCustomer;
|
|
100
|
+
};
|
|
101
|
+
}
|
|
102
|
+
|
|
103
|
+
interface MagentoChangePasswordResponse {
|
|
104
|
+
changeCustomerPassword: {
|
|
105
|
+
email: string;
|
|
106
|
+
};
|
|
107
|
+
}
|
|
108
|
+
|
|
109
|
+
interface MagentoUpdateCustomerResponse {
|
|
110
|
+
updateCustomerV2: {
|
|
111
|
+
customer: MagentoCustomer;
|
|
112
|
+
};
|
|
113
|
+
}
|
|
114
|
+
|
|
115
|
+
interface MagentoGetCustomerAddressesResponse {
|
|
116
|
+
customer: Pick<MagentoCustomer, 'addresses'>;
|
|
117
|
+
}
|
|
118
|
+
|
|
119
|
+
interface MagentoCreateCustomerAddressResponse {
|
|
120
|
+
createCustomerAddress: MagentoCustomerAddress;
|
|
121
|
+
}
|
|
122
|
+
|
|
123
|
+
interface MagentoUpdateCustomerAddressResponse {
|
|
124
|
+
updateCustomerAddress: MagentoCustomerAddress;
|
|
125
|
+
}
|
|
126
|
+
|
|
127
|
+
interface MagentoDeleteCustomerAddressResponse {
|
|
128
|
+
deleteCustomerAddress: boolean;
|
|
129
|
+
}
|
|
130
|
+
|
|
131
|
+
declare const magentoCustomerInputTransform: (customer: Partial<DaffCustomer>) => MagentoCustomerInput;
|
|
132
|
+
|
|
133
|
+
declare const magentoCustomerAddressInputTransform: (address: Partial<DaffCustomerAddress>) => MagentoCustomerAddressInput;
|
|
134
|
+
|
|
135
|
+
declare const magentoCustomerTransform: (customer: MagentoCustomer) => DaffCustomer;
|
|
136
|
+
|
|
137
|
+
declare const magentoCustomerAddressTransform: (address: MagentoCustomerAddress) => DaffCustomerAddress;
|
|
138
|
+
|
|
139
|
+
declare const magentoCustomerFragment: apollo_angular.TypedDocumentNode<unknown, unknown>;
|
|
140
|
+
|
|
141
|
+
declare const magentoCustomerAddressFragment: apollo_angular.TypedDocumentNode<unknown, unknown>;
|
|
142
|
+
|
|
143
|
+
declare const MAGENTO_GET_CUSTOMER_QUERY_NAME = "MagentoGetCustomer";
|
|
144
|
+
declare const getCustomer: apollo_angular.TypedDocumentNode<unknown, unknown>;
|
|
145
|
+
|
|
146
|
+
declare const MAGENTO_GET_CUSTOMER_ADDRESSES_QUERY_NAME = "MagentoGetCustomerAddresses";
|
|
147
|
+
declare const getCustomerAddresses: apollo_angular.TypedDocumentNode<unknown, unknown>;
|
|
148
|
+
|
|
149
|
+
declare const createCustomerAddress: apollo_angular.TypedDocumentNode<unknown, unknown>;
|
|
150
|
+
|
|
151
|
+
declare const updateCustomerAddress: apollo_angular.TypedDocumentNode<unknown, unknown>;
|
|
152
|
+
|
|
153
|
+
declare const deleteCustomerAddress: apollo_angular.TypedDocumentNode<unknown, unknown>;
|
|
154
|
+
|
|
155
|
+
declare const MAGENTO_UPDATE_CUSTOMER_QUERY_NAME = "MagentoUpdateCustomer";
|
|
156
|
+
declare const updateCustomer: apollo_angular.TypedDocumentNode<unknown, unknown>;
|
|
157
|
+
|
|
158
|
+
declare const MAGENTO_UPDATE_EMAIL_QUERY_NAME = "MagentoUpdateEmail";
|
|
159
|
+
declare const updateEmail: apollo_angular.TypedDocumentNode<unknown, unknown>;
|
|
160
|
+
|
|
161
|
+
declare const MAGENTO_CHANGE_PASSWORD_QUERY_NAME = "MagentoChangePassword";
|
|
162
|
+
declare const changePassword: apollo_angular.TypedDocumentNode<unknown, unknown>;
|
|
163
|
+
|
|
164
|
+
declare function transformMagentoReviewsError(error: any, requestPayload?: unknown): DaffError | DaffCustomerInvalidAPIResponseError;
|
|
165
|
+
|
|
166
|
+
declare const validateGetCustomerResponse: (response: ApolloQueryResult<MagentoGetCustomerResponse>) => ApolloQueryResult<MagentoGetCustomerResponse>;
|
|
167
|
+
|
|
168
|
+
declare const validateChangeEmailResponse: (response: ApolloQueryResult<MagentoChangeEmailResponse>) => ApolloQueryResult<MagentoChangeEmailResponse>;
|
|
169
|
+
|
|
170
|
+
declare const validateChangePasswordResponse: (response: ApolloQueryResult<MagentoChangePasswordResponse>) => ApolloQueryResult<MagentoChangePasswordResponse>;
|
|
171
|
+
|
|
172
|
+
declare const validateGetCustomerAddressesResponse: (response: ApolloQueryResult<MagentoGetCustomerAddressesResponse>) => ApolloQueryResult<MagentoGetCustomerAddressesResponse>;
|
|
173
|
+
|
|
174
|
+
declare const validateCreateCustomerAddressResponse: (response: ApolloQueryResult<MagentoCreateCustomerAddressResponse>) => ApolloQueryResult<MagentoCreateCustomerAddressResponse>;
|
|
175
|
+
|
|
176
|
+
declare const validateUpdateCustomerAddressResponse: (response: ApolloQueryResult<MagentoUpdateCustomerAddressResponse>) => ApolloQueryResult<MagentoUpdateCustomerAddressResponse>;
|
|
177
|
+
|
|
178
|
+
declare const validateDeleteCustomerAddressResponse: (response: ApolloQueryResult<MagentoDeleteCustomerAddressResponse>) => ApolloQueryResult<MagentoDeleteCustomerAddressResponse>;
|
|
179
|
+
|
|
180
|
+
declare const validateUpdateCustomerResponse: (response: ApolloQueryResult<MagentoUpdateCustomerResponse>) => ApolloQueryResult<MagentoUpdateCustomerResponse>;
|
|
181
|
+
|
|
182
|
+
/**
|
|
183
|
+
* A service for making Magento GraphQL queries for customers.
|
|
184
|
+
*
|
|
185
|
+
* @inheritdoc
|
|
186
|
+
*/
|
|
187
|
+
declare class DaffCustomerMagentoService implements DaffCustomerDriverInterface {
|
|
188
|
+
private apollo;
|
|
189
|
+
constructor(apollo: Apollo);
|
|
190
|
+
changeEmail(email: string, password: string): Observable<DaffCustomer>;
|
|
191
|
+
changePassword(oldPassword: string, newPassword: string): Observable<void>;
|
|
192
|
+
get(): Observable<DaffCustomer>;
|
|
193
|
+
update(customer: Partial<DaffCustomer>): Observable<DaffCustomer>;
|
|
194
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<DaffCustomerMagentoService, never>;
|
|
195
|
+
static ɵprov: i0.ɵɵInjectableDeclaration<DaffCustomerMagentoService>;
|
|
196
|
+
}
|
|
197
|
+
|
|
198
|
+
declare class DaffCustomerMagentoDriverModule {
|
|
199
|
+
static forRoot(): ModuleWithProviders<DaffCustomerMagentoDriverModule>;
|
|
200
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<DaffCustomerMagentoDriverModule, never>;
|
|
201
|
+
static ɵmod: i0.ɵɵNgModuleDeclaration<DaffCustomerMagentoDriverModule, never, [typeof i1.CommonModule], never>;
|
|
202
|
+
static ɵinj: i0.ɵɵInjectorDeclaration<DaffCustomerMagentoDriverModule>;
|
|
203
|
+
}
|
|
204
|
+
|
|
205
|
+
export { DaffCustomerMagentoDriverModule, DaffCustomerMagentoService, MAGENTO_CHANGE_PASSWORD_QUERY_NAME, MAGENTO_GET_CUSTOMER_ADDRESSES_QUERY_NAME, MAGENTO_GET_CUSTOMER_QUERY_NAME, MAGENTO_UPDATE_CUSTOMER_QUERY_NAME, MAGENTO_UPDATE_EMAIL_QUERY_NAME, MagentoCustomerGender, changePassword, createCustomerAddress, deleteCustomerAddress, getCustomer, getCustomerAddresses, magentoCustomerAddressFragment, magentoCustomerAddressInputTransform, magentoCustomerAddressTransform, magentoCustomerFragment, magentoCustomerInputTransform, magentoCustomerTransform, transformMagentoReviewsError, updateCustomer, updateCustomerAddress, updateEmail, validateChangeEmailResponse, validateChangePasswordResponse, validateCreateCustomerAddressResponse, validateDeleteCustomerAddressResponse, validateGetCustomerAddressesResponse, validateGetCustomerResponse, validateUpdateCustomerAddressResponse, validateUpdateCustomerResponse };
|
|
206
|
+
export type { MagentoChangeEmailResponse, MagentoChangePasswordResponse, MagentoCreateCustomerAddressResponse, MagentoCustomer, MagentoCustomerAddress, MagentoCustomerAddressAttributeInput, MagentoCustomerAddressInput, MagentoCustomerAddressRegionInput, MagentoCustomerInput, MagentoDeleteCustomerAddressResponse, MagentoGetCustomerAddressesResponse, MagentoGetCustomerResponse, MagentoUpdateCustomerAddressResponse, MagentoUpdateCustomerResponse };
|
|
@@ -1 +1,37 @@
|
|
|
1
|
-
|
|
1
|
+
import { DaffModelFactory } from '@daffodil/core/testing';
|
|
2
|
+
import { MagentoCustomerAddress, MagentoCustomer } from '@daffodil/customer/driver/magento';
|
|
3
|
+
import * as i0 from '@angular/core';
|
|
4
|
+
|
|
5
|
+
declare class MockMagentoCustomerAddress implements MagentoCustomerAddress {
|
|
6
|
+
__typename: string;
|
|
7
|
+
id: number;
|
|
8
|
+
region: {
|
|
9
|
+
__typename: string;
|
|
10
|
+
region_code: string;
|
|
11
|
+
region_id: number;
|
|
12
|
+
};
|
|
13
|
+
country_code: string;
|
|
14
|
+
street: string[];
|
|
15
|
+
company: string;
|
|
16
|
+
telephone: string;
|
|
17
|
+
postcode: string;
|
|
18
|
+
city: string;
|
|
19
|
+
firstname: string;
|
|
20
|
+
lastname: string;
|
|
21
|
+
email: string;
|
|
22
|
+
default_billing: boolean;
|
|
23
|
+
default_shipping: boolean;
|
|
24
|
+
}
|
|
25
|
+
declare class MagentoCustomerAddressFactory extends DaffModelFactory<MagentoCustomerAddress> {
|
|
26
|
+
constructor();
|
|
27
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<MagentoCustomerAddressFactory, never>;
|
|
28
|
+
static ɵprov: i0.ɵɵInjectableDeclaration<MagentoCustomerAddressFactory>;
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
declare class MagentoCustomerFactory extends DaffModelFactory<MagentoCustomer> {
|
|
32
|
+
constructor(addressFactory: MagentoCustomerAddressFactory);
|
|
33
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<MagentoCustomerFactory, never>;
|
|
34
|
+
static ɵprov: i0.ɵɵInjectableDeclaration<MagentoCustomerFactory>;
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
export { MagentoCustomerAddressFactory, MagentoCustomerFactory, MockMagentoCustomerAddress };
|
|
@@ -1 +1,55 @@
|
|
|
1
|
-
|
|
1
|
+
import * as i0 from '@angular/core';
|
|
2
|
+
import { ModuleWithProviders } from '@angular/core';
|
|
3
|
+
import * as i1 from '@angular/common';
|
|
4
|
+
import { Observable } from 'rxjs';
|
|
5
|
+
import { DaffCustomer, DaffCustomerAddress } from '@daffodil/customer';
|
|
6
|
+
import { DaffCustomerDriverInterface, DaffCustomerAddressDriverInterface } from '@daffodil/customer/driver';
|
|
7
|
+
import { DaffCustomerFactory, DaffCustomerAddressFactory } from '@daffodil/customer/testing';
|
|
8
|
+
import { DaffIdentifiable } from '@daffodil/core';
|
|
9
|
+
|
|
10
|
+
/**
|
|
11
|
+
* Provides the {@link DaffCustomerTestingDriver} as the {@link DaffCustomerDriver}.
|
|
12
|
+
*/
|
|
13
|
+
declare class DaffCustomerTestingDriverModule {
|
|
14
|
+
static forRoot(): ModuleWithProviders<DaffCustomerTestingDriverModule>;
|
|
15
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<DaffCustomerTestingDriverModule, never>;
|
|
16
|
+
static ɵmod: i0.ɵɵNgModuleDeclaration<DaffCustomerTestingDriverModule, never, [typeof i1.CommonModule], never>;
|
|
17
|
+
static ɵinj: i0.ɵɵInjectorDeclaration<DaffCustomerTestingDriverModule>;
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
/**
|
|
21
|
+
* A basic customer driver that creates mock customer results of different kinds.
|
|
22
|
+
* For testing purposes.
|
|
23
|
+
*
|
|
24
|
+
* @inheritdoc
|
|
25
|
+
*/
|
|
26
|
+
declare class DaffCustomerTestingDriver implements DaffCustomerDriverInterface {
|
|
27
|
+
private customerFactory;
|
|
28
|
+
constructor(customerFactory: DaffCustomerFactory);
|
|
29
|
+
changeEmail(email: string, password: string): Observable<DaffCustomer>;
|
|
30
|
+
changePassword(oldPassword: string, newPassword: string): Observable<void>;
|
|
31
|
+
get(): Observable<DaffCustomer>;
|
|
32
|
+
update(customer: Partial<DaffCustomer>): Observable<DaffCustomer>;
|
|
33
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<DaffCustomerTestingDriver, never>;
|
|
34
|
+
static ɵprov: i0.ɵɵInjectableDeclaration<DaffCustomerTestingDriver>;
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
/**
|
|
38
|
+
* A basic customer driver that creates mock customer results of different kinds.
|
|
39
|
+
* For testing purposes.
|
|
40
|
+
*
|
|
41
|
+
* @inheritdoc
|
|
42
|
+
*/
|
|
43
|
+
declare class DaffCustomerAddressTestingDriver implements DaffCustomerAddressDriverInterface {
|
|
44
|
+
private factory;
|
|
45
|
+
constructor(factory: DaffCustomerAddressFactory);
|
|
46
|
+
list(): Observable<DaffCustomerAddress[]>;
|
|
47
|
+
get(addressId: string): Observable<DaffCustomerAddress>;
|
|
48
|
+
update(address: Partial<DaffCustomerAddress> & DaffIdentifiable): Observable<DaffCustomerAddress[]>;
|
|
49
|
+
add(address: DaffCustomerAddress): Observable<DaffCustomerAddress[]>;
|
|
50
|
+
delete(addressId: string): Observable<DaffCustomerAddress[]>;
|
|
51
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<DaffCustomerAddressTestingDriver, never>;
|
|
52
|
+
static ɵprov: i0.ɵɵInjectableDeclaration<DaffCustomerAddressTestingDriver>;
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
export { DaffCustomerAddressTestingDriver, DaffCustomerTestingDriver, DaffCustomerTestingDriverModule };
|
|
@@ -105,10 +105,10 @@ class DaffCustomerInMemoryBackendService {
|
|
|
105
105
|
body: {},
|
|
106
106
|
}));
|
|
107
107
|
}
|
|
108
|
-
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
109
|
-
/** @nocollapse */ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "
|
|
108
|
+
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.1", ngImport: i0, type: DaffCustomerInMemoryBackendService, deps: [{ token: i1.DaffCustomerFactory }], target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
109
|
+
/** @nocollapse */ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.3.1", ngImport: i0, type: DaffCustomerInMemoryBackendService, providedIn: 'root' }); }
|
|
110
110
|
}
|
|
111
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
111
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.1", ngImport: i0, type: DaffCustomerInMemoryBackendService, decorators: [{
|
|
112
112
|
type: Injectable,
|
|
113
113
|
args: [{
|
|
114
114
|
providedIn: 'root',
|
|
@@ -213,10 +213,10 @@ class DaffCustomerAddressInMemoryBackendService {
|
|
|
213
213
|
};
|
|
214
214
|
});
|
|
215
215
|
}
|
|
216
|
-
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
217
|
-
/** @nocollapse */ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "
|
|
216
|
+
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.1", ngImport: i0, type: DaffCustomerAddressInMemoryBackendService, deps: [{ token: i1.DaffCustomerAddressFactory }], target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
217
|
+
/** @nocollapse */ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.3.1", ngImport: i0, type: DaffCustomerAddressInMemoryBackendService, providedIn: 'root' }); }
|
|
218
218
|
}
|
|
219
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
219
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.1", ngImport: i0, type: DaffCustomerAddressInMemoryBackendService, decorators: [{
|
|
220
220
|
type: Injectable,
|
|
221
221
|
args: [{
|
|
222
222
|
providedIn: 'root',
|
|
@@ -245,10 +245,10 @@ class DaffCustomerInMemoryDriver extends DaffInMemoryDriverBase {
|
|
|
245
245
|
update(customer) {
|
|
246
246
|
return this.http.put(`${this.url}/customer`, customer);
|
|
247
247
|
}
|
|
248
|
-
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
249
|
-
/** @nocollapse */ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "
|
|
248
|
+
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.1", ngImport: i0, type: DaffCustomerInMemoryDriver, deps: [{ token: i1$1.HttpClient }, { token: i2.InMemoryBackendConfig }], target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
249
|
+
/** @nocollapse */ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.3.1", ngImport: i0, type: DaffCustomerInMemoryDriver, providedIn: 'root' }); }
|
|
250
250
|
}
|
|
251
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
251
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.1", ngImport: i0, type: DaffCustomerInMemoryDriver, decorators: [{
|
|
252
252
|
type: Injectable,
|
|
253
253
|
args: [{
|
|
254
254
|
providedIn: 'root',
|
|
@@ -280,10 +280,10 @@ class DaffCustomerAddressInMemoryDriver extends DaffInMemoryDriverBase {
|
|
|
280
280
|
delete(addressId) {
|
|
281
281
|
return this.http.delete(`${this.url}/${addressId}`);
|
|
282
282
|
}
|
|
283
|
-
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
284
|
-
/** @nocollapse */ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "
|
|
283
|
+
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.1", ngImport: i0, type: DaffCustomerAddressInMemoryDriver, deps: [{ token: i1$1.HttpClient }, { token: i2.InMemoryBackendConfig }], target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
284
|
+
/** @nocollapse */ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.3.1", ngImport: i0, type: DaffCustomerAddressInMemoryDriver, providedIn: 'root' }); }
|
|
285
285
|
}
|
|
286
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
286
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.1", ngImport: i0, type: DaffCustomerAddressInMemoryDriver, decorators: [{
|
|
287
287
|
type: Injectable,
|
|
288
288
|
args: [{
|
|
289
289
|
providedIn: 'root',
|
|
@@ -304,11 +304,11 @@ class DaffCustomerInMemoryDriverModule {
|
|
|
304
304
|
],
|
|
305
305
|
};
|
|
306
306
|
}
|
|
307
|
-
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
308
|
-
/** @nocollapse */ static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "
|
|
309
|
-
/** @nocollapse */ static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "
|
|
307
|
+
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.1", ngImport: i0, type: DaffCustomerInMemoryDriverModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
|
|
308
|
+
/** @nocollapse */ static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "20.3.1", ngImport: i0, type: DaffCustomerInMemoryDriverModule, imports: [CommonModule] }); }
|
|
309
|
+
/** @nocollapse */ static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "20.3.1", ngImport: i0, type: DaffCustomerInMemoryDriverModule, imports: [CommonModule] }); }
|
|
310
310
|
}
|
|
311
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
311
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.1", ngImport: i0, type: DaffCustomerInMemoryDriverModule, decorators: [{
|
|
312
312
|
type: NgModule,
|
|
313
313
|
args: [{
|
|
314
314
|
imports: [
|