@daffodil/cart 0.94.1-rc.0 → 0.95.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/fesm2022/daffodil-cart-driver-in-memory.mjs +1618 -1198
- package/fesm2022/daffodil-cart-driver-in-memory.mjs.map +1 -1
- package/fesm2022/daffodil-cart-driver-magento-2.4.7-testing.mjs +546 -0
- package/fesm2022/daffodil-cart-driver-magento-2.4.7-testing.mjs.map +1 -0
- package/fesm2022/daffodil-cart-driver-magento-2.4.7.mjs +2607 -0
- package/fesm2022/daffodil-cart-driver-magento-2.4.7.mjs.map +1 -0
- package/fesm2022/daffodil-cart-driver-magento-auto-testing.mjs +7 -0
- package/fesm2022/daffodil-cart-driver-magento-auto-testing.mjs.map +1 -0
- package/fesm2022/daffodil-cart-driver-magento-auto.mjs +7 -0
- package/fesm2022/daffodil-cart-driver-magento-auto.mjs.map +1 -0
- package/fesm2022/daffodil-cart-driver-testing.mjs +553 -335
- package/fesm2022/daffodil-cart-driver-testing.mjs.map +1 -1
- package/fesm2022/daffodil-cart-driver.mjs +167 -292
- package/fesm2022/daffodil-cart-driver.mjs.map +1 -1
- package/fesm2022/daffodil-cart-routing.mjs +741 -542
- package/fesm2022/daffodil-cart-routing.mjs.map +1 -1
- package/fesm2022/daffodil-cart-state-testing.mjs +288 -193
- package/fesm2022/daffodil-cart-state-testing.mjs.map +1 -1
- package/fesm2022/daffodil-cart-state.mjs +2571 -2800
- package/fesm2022/daffodil-cart-state.mjs.map +1 -1
- package/fesm2022/daffodil-cart-testing.mjs +542 -357
- package/fesm2022/daffodil-cart-testing.mjs.map +1 -1
- package/fesm2022/daffodil-cart.mjs +131 -200
- package/fesm2022/daffodil-cart.mjs.map +1 -1
- package/package.json +1 -1
- package/types/daffodil-cart-driver-in-memory.d.ts +273 -292
- package/types/daffodil-cart-driver-magento-2.4.7-testing.d.ts +176 -0
- package/types/daffodil-cart-driver-magento-2.4.7.d.ts +860 -0
- package/types/daffodil-cart-driver-magento-auto-testing.d.ts +1 -0
- package/types/daffodil-cart-driver-magento-auto.d.ts +1 -0
- package/types/daffodil-cart-driver-testing.d.ts +111 -118
- package/types/daffodil-cart-driver.d.ts +219 -262
- package/types/daffodil-cart-routing.d.ts +130 -149
- package/types/daffodil-cart-state-testing.d.ts +115 -114
- package/types/daffodil-cart-state.d.ts +1126 -1173
- package/types/daffodil-cart-testing.d.ts +146 -158
- package/types/daffodil-cart.d.ts +302 -321
- package/fesm2022/daffodil-cart-driver-magento-testing.mjs +0 -332
- package/fesm2022/daffodil-cart-driver-magento-testing.mjs.map +0 -1
- package/fesm2022/daffodil-cart-driver-magento.mjs +0 -2273
- package/fesm2022/daffodil-cart-driver-magento.mjs.map +0 -1
- package/types/daffodil-cart-driver-magento-testing.d.ts +0 -188
- package/types/daffodil-cart-driver-magento.d.ts +0 -999
|
@@ -1,382 +1,363 @@
|
|
|
1
|
-
import { HttpClient } from
|
|
2
|
-
import { InMemoryBackendConfig,
|
|
3
|
-
import
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
8
|
-
import
|
|
9
|
-
import
|
|
10
|
-
import
|
|
11
|
-
import
|
|
12
|
-
import {
|
|
13
|
-
import { DaffInMemoryBackendProductService } from '@daffodil/product/driver/in-memory';
|
|
14
|
-
|
|
1
|
+
import { HttpClient } from "@angular/common/http";
|
|
2
|
+
import { InMemoryBackendConfig, InMemoryDbService, RequestInfo } from "angular-in-memory-web-api";
|
|
3
|
+
import { Observable } from "rxjs";
|
|
4
|
+
import { DaffCart, DaffCartAddress, DaffCartCoupon, DaffCartItem, DaffCartItemInput, DaffCartOrderResult, DaffCartPaymentMethod, DaffCartShippingRate } from "@daffodil/cart";
|
|
5
|
+
import { DaffCartBillingAddressServiceInterface, DaffCartCouponServiceInterface, DaffCartItemServiceInterface, DaffCartOrderServiceInterface, DaffCartPaymentMethodsServiceInterface, DaffCartPaymentServiceInterface, DaffCartServiceInterface, DaffCartShippingAddressServiceInterface, DaffCartShippingInformationServiceInterface, DaffCartShippingMethodsServiceInterface } from "@daffodil/cart/driver";
|
|
6
|
+
import { DaffDriverResponse } from "@daffodil/driver";
|
|
7
|
+
import { DaffInMemoryBackendDelegate, DaffInMemoryDriverBase, DaffInMemoryDriverConfig, DaffInMemoryMultiRouteableBackend, DaffInMemorySingleRouteableBackend } from "@daffodil/driver/in-memory";
|
|
8
|
+
import * as i0 from "@angular/core";
|
|
9
|
+
import { EnvironmentProviders, ModuleWithProviders } from "@angular/core";
|
|
10
|
+
import * as i1 from "@angular/common";
|
|
11
|
+
import { DaffCartFactory, DaffCartItemFactory, DaffCartShippingRateFactory } from "@daffodil/cart/testing";
|
|
12
|
+
import { DaffInMemoryBackendProductService } from "@daffodil/product/driver/in-memory";
|
|
15
13
|
/**
|
|
16
14
|
* @inheritdoc
|
|
17
15
|
*/
|
|
18
|
-
declare class DaffInMemoryCartService extends DaffInMemoryDriverBase implements DaffCartServiceInterface {
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
16
|
+
export declare class DaffInMemoryCartService extends DaffInMemoryDriverBase implements DaffCartServiceInterface {
|
|
17
|
+
private http;
|
|
18
|
+
constructor(http: HttpClient, config: InMemoryBackendConfig);
|
|
19
|
+
get(cartId: DaffCart['id']): Observable<DaffDriverResponse<DaffCart>>;
|
|
20
|
+
addToCart(productId: string, qty: number): Observable<DaffCart>;
|
|
21
|
+
clear(cartId: DaffCart['id']): Observable<Partial<DaffCart>>;
|
|
22
|
+
create(): Observable<{
|
|
23
|
+
id: DaffCart['id'];
|
|
24
|
+
}>;
|
|
25
|
+
merge(guestCart: DaffCart['id'], customerCart?: DaffCart['id']): Observable<DaffDriverResponse<DaffCart>>;
|
|
26
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<DaffInMemoryCartService, never>;
|
|
27
|
+
static ɵprov: i0.ɵɵInjectableDeclaration<any>;
|
|
30
28
|
}
|
|
31
|
-
|
|
32
29
|
/**
|
|
33
30
|
* @inheritdoc
|
|
34
31
|
*/
|
|
35
|
-
declare class DaffInMemoryCartItemService extends DaffInMemoryDriverBase implements DaffCartItemServiceInterface {
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
32
|
+
export declare class DaffInMemoryCartItemService extends DaffInMemoryDriverBase implements DaffCartItemServiceInterface {
|
|
33
|
+
private http;
|
|
34
|
+
constructor(http: HttpClient, config: InMemoryBackendConfig);
|
|
35
|
+
list(cartId: DaffCart['id']): Observable<DaffCartItem[]>;
|
|
36
|
+
get(cartId: DaffCart['id'], itemId: DaffCartItem['id']): Observable<DaffCartItem>;
|
|
37
|
+
add(cartId: DaffCart['id'], input: DaffCartItemInput): Observable<Partial<DaffCart>>;
|
|
38
|
+
update(cartId: DaffCart['id'], itemId: DaffCartItem['id'], item: Partial<DaffCartItem>): Observable<Partial<DaffCart>>;
|
|
39
|
+
delete(cartId: DaffCart['id'], itemId: DaffCartItem['id']): Observable<Partial<DaffCart>>;
|
|
40
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<DaffInMemoryCartItemService, never>;
|
|
41
|
+
static ɵprov: i0.ɵɵInjectableDeclaration<any>;
|
|
45
42
|
}
|
|
46
|
-
|
|
47
43
|
/**
|
|
48
44
|
* @inheritdoc
|
|
49
45
|
*/
|
|
50
|
-
declare class DaffInMemoryCartBillingAddressService extends DaffInMemoryDriverBase implements DaffCartBillingAddressServiceInterface {
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
46
|
+
export declare class DaffInMemoryCartBillingAddressService extends DaffInMemoryDriverBase implements DaffCartBillingAddressServiceInterface {
|
|
47
|
+
private http;
|
|
48
|
+
constructor(http: HttpClient, config: InMemoryBackendConfig);
|
|
49
|
+
get(cartId: DaffCart['id']): Observable<DaffCartAddress>;
|
|
50
|
+
update(cartId: DaffCart['id'], address: DaffCartAddress): Observable<Partial<DaffCart>>;
|
|
51
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<DaffInMemoryCartBillingAddressService, never>;
|
|
52
|
+
static ɵprov: i0.ɵɵInjectableDeclaration<any>;
|
|
57
53
|
}
|
|
58
|
-
|
|
59
54
|
/**
|
|
60
55
|
* @inheritdoc
|
|
61
56
|
*/
|
|
62
|
-
declare class DaffInMemoryCartPaymentService extends DaffInMemoryDriverBase implements DaffCartPaymentServiceInterface {
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
57
|
+
export declare class DaffInMemoryCartPaymentService extends DaffInMemoryDriverBase implements DaffCartPaymentServiceInterface {
|
|
58
|
+
private http;
|
|
59
|
+
constructor(http: HttpClient, config: InMemoryBackendConfig);
|
|
60
|
+
get(cartId: DaffCart['id']): Observable<DaffCartPaymentMethod>;
|
|
61
|
+
update(cartId: DaffCart['id'], payment: Partial<DaffCartPaymentMethod>): Observable<Partial<DaffCart>>;
|
|
62
|
+
updateWithBilling(cartId: DaffCart['id'], payment: Partial<DaffCartPaymentMethod>, address: Partial<DaffCartAddress>): Observable<Partial<DaffCart>>;
|
|
63
|
+
remove(cartId: DaffCart['id']): Observable<void>;
|
|
64
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<DaffInMemoryCartPaymentService, never>;
|
|
65
|
+
static ɵprov: i0.ɵɵInjectableDeclaration<any>;
|
|
71
66
|
}
|
|
72
|
-
|
|
73
67
|
/**
|
|
74
68
|
* @inheritdoc
|
|
75
69
|
*/
|
|
76
|
-
declare class DaffInMemoryCartPaymentMethodsService extends DaffInMemoryDriverBase implements DaffCartPaymentMethodsServiceInterface<DaffCartPaymentMethod> {
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
70
|
+
export declare class DaffInMemoryCartPaymentMethodsService extends DaffInMemoryDriverBase implements DaffCartPaymentMethodsServiceInterface<DaffCartPaymentMethod> {
|
|
71
|
+
private http;
|
|
72
|
+
constructor(http: HttpClient, config: InMemoryBackendConfig);
|
|
73
|
+
list(cartId: DaffCart['id']): Observable<DaffCartPaymentMethod[]>;
|
|
74
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<DaffInMemoryCartPaymentMethodsService, never>;
|
|
75
|
+
static ɵprov: i0.ɵɵInjectableDeclaration<any>;
|
|
82
76
|
}
|
|
83
|
-
|
|
84
77
|
/**
|
|
85
78
|
* @inheritdoc
|
|
86
79
|
*/
|
|
87
|
-
declare class DaffInMemoryCartShippingAddressService extends DaffInMemoryDriverBase implements DaffCartShippingAddressServiceInterface {
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
80
|
+
export declare class DaffInMemoryCartShippingAddressService extends DaffInMemoryDriverBase implements DaffCartShippingAddressServiceInterface {
|
|
81
|
+
private http;
|
|
82
|
+
constructor(http: HttpClient, config: InMemoryBackendConfig);
|
|
83
|
+
get(cartId: DaffCart['id']): Observable<DaffCartAddress>;
|
|
84
|
+
update(cartId: DaffCart['id'], address: Partial<DaffCartAddress>): Observable<Partial<DaffCart>>;
|
|
85
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<DaffInMemoryCartShippingAddressService, never>;
|
|
86
|
+
static ɵprov: i0.ɵɵInjectableDeclaration<any>;
|
|
94
87
|
}
|
|
95
|
-
|
|
96
88
|
/**
|
|
97
89
|
* @inheritdoc
|
|
98
90
|
*/
|
|
99
|
-
declare class DaffInMemoryCartShippingInformationService extends DaffInMemoryDriverBase implements DaffCartShippingInformationServiceInterface {
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
91
|
+
export declare class DaffInMemoryCartShippingInformationService extends DaffInMemoryDriverBase implements DaffCartShippingInformationServiceInterface {
|
|
92
|
+
private http;
|
|
93
|
+
constructor(http: HttpClient, config: InMemoryBackendConfig);
|
|
94
|
+
get(cartId: DaffCart['id']): Observable<DaffCartShippingRate>;
|
|
95
|
+
update(cartId: DaffCart['id'], info: Partial<DaffCartShippingRate>): Observable<Partial<DaffCart>>;
|
|
96
|
+
delete(cartId: DaffCart['id']): Observable<Partial<DaffCart>>;
|
|
97
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<DaffInMemoryCartShippingInformationService, never>;
|
|
98
|
+
static ɵprov: i0.ɵɵInjectableDeclaration<any>;
|
|
107
99
|
}
|
|
108
|
-
|
|
109
100
|
/**
|
|
110
101
|
* @inheritdoc
|
|
111
102
|
*/
|
|
112
|
-
declare class DaffInMemoryCartShippingMethodsService extends DaffInMemoryDriverBase implements DaffCartShippingMethodsServiceInterface<DaffCartShippingRate> {
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
103
|
+
export declare class DaffInMemoryCartShippingMethodsService extends DaffInMemoryDriverBase implements DaffCartShippingMethodsServiceInterface<DaffCartShippingRate> {
|
|
104
|
+
private http;
|
|
105
|
+
constructor(http: HttpClient, config: InMemoryBackendConfig);
|
|
106
|
+
list(cartId: DaffCart['id']): Observable<DaffCartShippingRate[]>;
|
|
107
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<DaffInMemoryCartShippingMethodsService, never>;
|
|
108
|
+
static ɵprov: i0.ɵɵInjectableDeclaration<any>;
|
|
118
109
|
}
|
|
119
|
-
|
|
120
110
|
/**
|
|
121
111
|
* @inheritdoc
|
|
122
112
|
*/
|
|
123
|
-
declare class DaffInMemoryCartOrderService extends DaffInMemoryDriverBase implements DaffCartOrderServiceInterface {
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
113
|
+
export declare class DaffInMemoryCartOrderService extends DaffInMemoryDriverBase implements DaffCartOrderServiceInterface {
|
|
114
|
+
private http;
|
|
115
|
+
constructor(http: HttpClient, config: InMemoryBackendConfig);
|
|
116
|
+
placeOrder(cartId: DaffCart['id'], payment?: DaffCartPaymentMethod): Observable<DaffCartOrderResult>;
|
|
117
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<DaffInMemoryCartOrderService, never>;
|
|
118
|
+
static ɵprov: i0.ɵɵInjectableDeclaration<any>;
|
|
129
119
|
}
|
|
130
|
-
|
|
131
120
|
/**
|
|
132
121
|
* @inheritdoc
|
|
133
122
|
*/
|
|
134
|
-
declare class DaffInMemoryCartCouponService extends DaffInMemoryDriverBase implements DaffCartCouponServiceInterface {
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
123
|
+
export declare class DaffInMemoryCartCouponService extends DaffInMemoryDriverBase implements DaffCartCouponServiceInterface {
|
|
124
|
+
private http;
|
|
125
|
+
constructor(http: HttpClient, config: InMemoryBackendConfig);
|
|
126
|
+
list(cartId: DaffCart['id']): Observable<DaffCartCoupon[]>;
|
|
127
|
+
apply(cartId: DaffCart['id'], coupon: DaffCartCoupon): Observable<Partial<DaffCart>>;
|
|
128
|
+
remove(cartId: DaffCart['id'], coupon: DaffCartCoupon): Observable<Partial<DaffCart>>;
|
|
129
|
+
removeAll(cartId: DaffCart['id']): Observable<Partial<DaffCart>>;
|
|
130
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<DaffInMemoryCartCouponService, never>;
|
|
131
|
+
static ɵprov: i0.ɵɵInjectableDeclaration<any>;
|
|
143
132
|
}
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
133
|
+
/**
|
|
134
|
+
* @deprecated in favor of {@link provideDaffCartInMemoryDriver} Deprecated in version 0.95.0. Will be removed in version 0.98.0.
|
|
135
|
+
*/
|
|
136
|
+
export declare class DaffCartInMemoryDriverModule {
|
|
137
|
+
static forRoot(): ModuleWithProviders<DaffCartInMemoryDriverModule>;
|
|
138
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<DaffCartInMemoryDriverModule, never>;
|
|
139
|
+
static ɵmod: i0.ɵɵNgModuleDeclaration<DaffCartInMemoryDriverModule, never, [typeof i1.CommonModule], never>;
|
|
140
|
+
static ɵinj: i0.ɵɵInjectorDeclaration<DaffCartInMemoryDriverModule>;
|
|
150
141
|
}
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
142
|
+
/**
|
|
143
|
+
* Provides the in-memory implementations of the `@daffodil/cart/driver` interfaces.
|
|
144
|
+
*/
|
|
145
|
+
export declare const provideDaffCartInMemoryDriver: () => EnvironmentProviders;
|
|
146
|
+
export type DaffCartInMemoryExtraAttributesHook = (reqInfo: RequestInfo, cart: DaffCart) => Record<string, any>;
|
|
147
|
+
declare const DAFF_CART_IN_MEMORY_EXTRA_ATTRIBUTES_HOOK: import("@angular/core").InjectionToken<DaffCartInMemoryExtraAttributesHook>, provideDaffCartInMemoryExtraAttributesHook: <R extends DaffCartInMemoryExtraAttributesHook = DaffCartInMemoryExtraAttributesHook>(value: R) => import("@angular/core").ValueProvider;
|
|
155
148
|
/**
|
|
156
149
|
* @inheritdoc
|
|
157
150
|
*/
|
|
158
|
-
declare class DaffInMemoryBackendCartService implements DaffInMemorySingleRouteableBackend {
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
151
|
+
export declare class DaffInMemoryBackendCartService implements DaffInMemorySingleRouteableBackend {
|
|
152
|
+
private cartFactory;
|
|
153
|
+
private extraFieldsHook;
|
|
154
|
+
private productBackend;
|
|
155
|
+
readonly collectionName = "cart";
|
|
156
|
+
constructor(cartFactory: DaffCartFactory, extraFieldsHook: DaffCartInMemoryExtraAttributesHook, productBackend: DaffInMemoryBackendProductService);
|
|
157
|
+
get(reqInfo: RequestInfo): import("rxjs").Observable<any>;
|
|
158
|
+
post(reqInfo: RequestInfo): import("rxjs").Observable<any>;
|
|
159
|
+
/**
|
|
160
|
+
* Gets whatever follows the cart ID section of the request URL.
|
|
161
|
+
*/
|
|
162
|
+
private getAction;
|
|
163
|
+
private clear;
|
|
164
|
+
private create;
|
|
165
|
+
private merge;
|
|
166
|
+
private getCart;
|
|
167
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<DaffInMemoryBackendCartService, never>;
|
|
168
|
+
static ɵprov: i0.ɵɵInjectableDeclaration<any>;
|
|
176
169
|
}
|
|
177
|
-
|
|
178
170
|
/**
|
|
179
171
|
* @inheritdoc
|
|
180
172
|
*/
|
|
181
|
-
declare class DaffInMemoryBackendCartAddressService implements DaffInMemorySingleRouteableBackend {
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
173
|
+
export declare class DaffInMemoryBackendCartAddressService implements DaffInMemorySingleRouteableBackend {
|
|
174
|
+
private extraFieldsHook;
|
|
175
|
+
readonly collectionName = "cart-address";
|
|
176
|
+
constructor(extraFieldsHook: DaffCartInMemoryExtraAttributesHook);
|
|
177
|
+
put(reqInfo: RequestInfo): import("rxjs").Observable<any>;
|
|
178
|
+
private getCart;
|
|
179
|
+
private updateAddress;
|
|
180
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<DaffInMemoryBackendCartAddressService, never>;
|
|
181
|
+
static ɵprov: i0.ɵɵInjectableDeclaration<any>;
|
|
190
182
|
}
|
|
191
|
-
|
|
192
183
|
/**
|
|
193
184
|
* @inheritdoc
|
|
194
185
|
*/
|
|
195
|
-
declare class DaffInMemoryBackendCartBillingAddressService implements DaffInMemorySingleRouteableBackend {
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
186
|
+
export declare class DaffInMemoryBackendCartBillingAddressService implements DaffInMemorySingleRouteableBackend {
|
|
187
|
+
private extraFieldsHook;
|
|
188
|
+
readonly collectionName = "cart-billing-address";
|
|
189
|
+
constructor(extraFieldsHook: DaffCartInMemoryExtraAttributesHook);
|
|
190
|
+
get(reqInfo: RequestInfo): import("rxjs").Observable<any>;
|
|
191
|
+
put(reqInfo: RequestInfo): import("rxjs").Observable<any>;
|
|
192
|
+
private getCart;
|
|
193
|
+
private getBillingAddress;
|
|
194
|
+
private updateBillingAddress;
|
|
195
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<DaffInMemoryBackendCartBillingAddressService, never>;
|
|
196
|
+
static ɵprov: i0.ɵɵInjectableDeclaration<any>;
|
|
206
197
|
}
|
|
207
|
-
|
|
208
198
|
/**
|
|
209
199
|
* @inheritdoc
|
|
210
200
|
*/
|
|
211
|
-
declare class DaffInMemoryBackendCartCouponService implements DaffInMemorySingleRouteableBackend {
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
201
|
+
export declare class DaffInMemoryBackendCartCouponService implements DaffInMemorySingleRouteableBackend {
|
|
202
|
+
private extraFieldsHook;
|
|
203
|
+
readonly collectionName = "cart-coupon";
|
|
204
|
+
constructor(extraFieldsHook: DaffCartInMemoryExtraAttributesHook);
|
|
205
|
+
get(reqInfo: RequestInfo): import("rxjs").Observable<any>;
|
|
206
|
+
post(reqInfo: RequestInfo): import("rxjs").Observable<any>;
|
|
207
|
+
delete(reqInfo: RequestInfo): import("rxjs").Observable<any>;
|
|
208
|
+
/**
|
|
209
|
+
* Gets whatever follows the cart ID section of the request URL.
|
|
210
|
+
*/
|
|
211
|
+
private getAction;
|
|
212
|
+
private getCart;
|
|
213
|
+
private listCoupons;
|
|
214
|
+
private applyCoupon;
|
|
215
|
+
private removeCoupon;
|
|
216
|
+
private removeAllCoupons;
|
|
217
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<DaffInMemoryBackendCartCouponService, never>;
|
|
218
|
+
static ɵprov: i0.ɵɵInjectableDeclaration<any>;
|
|
229
219
|
}
|
|
230
|
-
|
|
231
220
|
/**
|
|
232
221
|
* @inheritdoc
|
|
233
222
|
*/
|
|
234
|
-
declare class DaffInMemoryBackendCartItemsService implements DaffInMemorySingleRouteableBackend {
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
|
|
223
|
+
export declare class DaffInMemoryBackendCartItemsService implements DaffInMemorySingleRouteableBackend {
|
|
224
|
+
private cartItemFactory;
|
|
225
|
+
private extraFieldsHook;
|
|
226
|
+
private productBackend;
|
|
227
|
+
readonly collectionName = "cart-items";
|
|
228
|
+
constructor(cartItemFactory: DaffCartItemFactory, extraFieldsHook: DaffCartInMemoryExtraAttributesHook, productBackend: DaffInMemoryBackendProductService);
|
|
229
|
+
get(reqInfo: RequestInfo): import("rxjs").Observable<any>;
|
|
230
|
+
put(reqInfo: RequestInfo): import("rxjs").Observable<any>;
|
|
231
|
+
post(reqInfo: RequestInfo): import("rxjs").Observable<any>;
|
|
232
|
+
delete(reqInfo: RequestInfo): import("rxjs").Observable<any>;
|
|
233
|
+
/**
|
|
234
|
+
* Gets whatever follows the cart ID section of the request URL.
|
|
235
|
+
*/
|
|
236
|
+
private getAction;
|
|
237
|
+
private getCart;
|
|
238
|
+
private transformItemInput;
|
|
239
|
+
private listItems;
|
|
240
|
+
private getItem;
|
|
241
|
+
private updateItem;
|
|
242
|
+
private addItem;
|
|
243
|
+
private deleteItem;
|
|
244
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<DaffInMemoryBackendCartItemsService, never>;
|
|
245
|
+
static ɵprov: i0.ɵɵInjectableDeclaration<any>;
|
|
257
246
|
}
|
|
258
|
-
|
|
259
247
|
/**
|
|
260
248
|
* @inheritdoc
|
|
249
|
+
*
|
|
250
|
+
* @deprecated Use {@link DaffCheckoutInMemoryBackendOrderService} instead. Deprecated in version 0.95.0. Will be removed in version 0.98.0.
|
|
261
251
|
*/
|
|
262
|
-
declare class DaffInMemoryBackendCartOrderService implements DaffInMemorySingleRouteableBackend {
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
|
|
252
|
+
export declare class DaffInMemoryBackendCartOrderService implements DaffInMemorySingleRouteableBackend {
|
|
253
|
+
readonly collectionName = "cart-order";
|
|
254
|
+
post(reqInfo: RequestInfo): import("rxjs").Observable<any>;
|
|
255
|
+
private placeOrder;
|
|
256
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<DaffInMemoryBackendCartOrderService, never>;
|
|
257
|
+
static ɵprov: i0.ɵɵInjectableDeclaration<any>;
|
|
268
258
|
}
|
|
269
|
-
|
|
270
259
|
/**
|
|
271
260
|
* @inheritdoc
|
|
272
261
|
*/
|
|
273
|
-
declare class DaffInMemoryBackendCartPaymentService implements DaffInMemorySingleRouteableBackend {
|
|
274
|
-
|
|
275
|
-
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
|
|
279
|
-
|
|
280
|
-
|
|
281
|
-
|
|
282
|
-
|
|
283
|
-
|
|
284
|
-
|
|
285
|
-
|
|
262
|
+
export declare class DaffInMemoryBackendCartPaymentService implements DaffInMemorySingleRouteableBackend {
|
|
263
|
+
private extraFieldsHook;
|
|
264
|
+
readonly collectionName = "cart-payment";
|
|
265
|
+
constructor(extraFieldsHook: DaffCartInMemoryExtraAttributesHook);
|
|
266
|
+
get(reqInfo: RequestInfo): import("rxjs").Observable<any>;
|
|
267
|
+
put(reqInfo: RequestInfo): import("rxjs").Observable<any>;
|
|
268
|
+
delete(reqInfo: RequestInfo): import("rxjs").Observable<any>;
|
|
269
|
+
private getCart;
|
|
270
|
+
private getPayment;
|
|
271
|
+
private updatePayment;
|
|
272
|
+
private removePayment;
|
|
273
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<DaffInMemoryBackendCartPaymentService, never>;
|
|
274
|
+
static ɵprov: i0.ɵɵInjectableDeclaration<any>;
|
|
286
275
|
}
|
|
287
|
-
|
|
288
276
|
/**
|
|
289
277
|
* @inheritdoc
|
|
290
278
|
*/
|
|
291
|
-
declare class DaffInMemoryBackendCartPaymentMethodsService implements DaffInMemorySingleRouteableBackend {
|
|
292
|
-
|
|
293
|
-
|
|
294
|
-
|
|
295
|
-
|
|
296
|
-
|
|
297
|
-
|
|
279
|
+
export declare class DaffInMemoryBackendCartPaymentMethodsService implements DaffInMemorySingleRouteableBackend {
|
|
280
|
+
readonly collectionName = "cart-payment-methods";
|
|
281
|
+
get(reqInfo: RequestInfo): import("rxjs").Observable<any>;
|
|
282
|
+
private getCart;
|
|
283
|
+
private listPaymentMethods;
|
|
284
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<DaffInMemoryBackendCartPaymentMethodsService, never>;
|
|
285
|
+
static ɵprov: i0.ɵɵInjectableDeclaration<any>;
|
|
298
286
|
}
|
|
299
|
-
|
|
300
287
|
/**
|
|
301
288
|
* @inheritdoc
|
|
302
289
|
*/
|
|
303
|
-
declare class DaffInMemoryBackendCartShippingAddressService implements DaffInMemorySingleRouteableBackend {
|
|
304
|
-
|
|
305
|
-
|
|
306
|
-
|
|
307
|
-
|
|
308
|
-
|
|
309
|
-
|
|
310
|
-
|
|
311
|
-
|
|
312
|
-
|
|
313
|
-
|
|
290
|
+
export declare class DaffInMemoryBackendCartShippingAddressService implements DaffInMemorySingleRouteableBackend {
|
|
291
|
+
private extraFieldsHook;
|
|
292
|
+
readonly collectionName = "cart-shipping-address";
|
|
293
|
+
constructor(extraFieldsHook: DaffCartInMemoryExtraAttributesHook);
|
|
294
|
+
get(reqInfo: RequestInfo): import("rxjs").Observable<any>;
|
|
295
|
+
put(reqInfo: RequestInfo): import("rxjs").Observable<any>;
|
|
296
|
+
private getCart;
|
|
297
|
+
private getShippingAddress;
|
|
298
|
+
private updateShippingAddress;
|
|
299
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<DaffInMemoryBackendCartShippingAddressService, never>;
|
|
300
|
+
static ɵprov: i0.ɵɵInjectableDeclaration<any>;
|
|
314
301
|
}
|
|
315
|
-
|
|
316
302
|
/**
|
|
317
303
|
* @inheritdoc
|
|
318
304
|
*/
|
|
319
|
-
declare class DaffInMemoryBackendCartShippingInformationService implements DaffInMemorySingleRouteableBackend {
|
|
320
|
-
|
|
321
|
-
|
|
322
|
-
|
|
323
|
-
|
|
324
|
-
|
|
325
|
-
|
|
326
|
-
|
|
327
|
-
|
|
328
|
-
|
|
329
|
-
|
|
330
|
-
|
|
331
|
-
|
|
332
|
-
|
|
305
|
+
export declare class DaffInMemoryBackendCartShippingInformationService implements DaffInMemorySingleRouteableBackend {
|
|
306
|
+
private extraFieldsHook;
|
|
307
|
+
private productBackend;
|
|
308
|
+
readonly collectionName = "cart-shipping-information";
|
|
309
|
+
constructor(extraFieldsHook: DaffCartInMemoryExtraAttributesHook, productBackend: DaffInMemoryBackendProductService);
|
|
310
|
+
get(reqInfo: RequestInfo): import("rxjs").Observable<any>;
|
|
311
|
+
put(reqInfo: RequestInfo): import("rxjs").Observable<any>;
|
|
312
|
+
delete(reqInfo: RequestInfo): import("rxjs").Observable<any>;
|
|
313
|
+
private getCart;
|
|
314
|
+
private getShippingInformation;
|
|
315
|
+
private updateShippingInformation;
|
|
316
|
+
private removeShippingInformation;
|
|
317
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<DaffInMemoryBackendCartShippingInformationService, never>;
|
|
318
|
+
static ɵprov: i0.ɵɵInjectableDeclaration<any>;
|
|
333
319
|
}
|
|
334
|
-
|
|
335
320
|
/**
|
|
336
321
|
* @inheritdoc
|
|
337
322
|
*/
|
|
338
|
-
declare class DaffInMemoryBackendCartShippingMethodsService implements DaffInMemorySingleRouteableBackend {
|
|
339
|
-
|
|
340
|
-
|
|
341
|
-
|
|
342
|
-
|
|
343
|
-
|
|
344
|
-
|
|
345
|
-
|
|
346
|
-
|
|
323
|
+
export declare class DaffInMemoryBackendCartShippingMethodsService implements DaffInMemorySingleRouteableBackend {
|
|
324
|
+
private shippingMethodFactory;
|
|
325
|
+
readonly collectionName = "cart-shipping-methods";
|
|
326
|
+
constructor(shippingMethodFactory: DaffCartShippingRateFactory);
|
|
327
|
+
get(reqInfo: RequestInfo): import("rxjs").Observable<any>;
|
|
328
|
+
private getCart;
|
|
329
|
+
private listShippingMethods;
|
|
330
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<DaffInMemoryBackendCartShippingMethodsService, never>;
|
|
331
|
+
static ɵprov: i0.ɵɵInjectableDeclaration<any>;
|
|
347
332
|
}
|
|
348
|
-
|
|
349
333
|
/**
|
|
350
334
|
* The root cart in-memory backend.
|
|
351
335
|
* Creates the database and delegates requests to child backends.
|
|
352
336
|
*/
|
|
353
|
-
declare class DaffInMemoryBackendCartRootService extends DaffInMemoryBackendDelegate implements InMemoryDbService, DaffInMemoryMultiRouteableBackend {
|
|
354
|
-
|
|
355
|
-
|
|
356
|
-
|
|
357
|
-
|
|
358
|
-
|
|
359
|
-
|
|
360
|
-
|
|
361
|
-
|
|
362
|
-
|
|
363
|
-
|
|
364
|
-
|
|
365
|
-
|
|
366
|
-
|
|
337
|
+
export declare class DaffInMemoryBackendCartRootService extends DaffInMemoryBackendDelegate implements InMemoryDbService, DaffInMemoryMultiRouteableBackend {
|
|
338
|
+
private _config;
|
|
339
|
+
/**
|
|
340
|
+
* The collection of carts in the backend.
|
|
341
|
+
*/
|
|
342
|
+
carts: DaffCart[];
|
|
343
|
+
constructor(cartService: DaffInMemoryBackendCartService, cartItemsService: DaffInMemoryBackendCartItemsService, cartOrderService: DaffInMemoryBackendCartOrderService, cartCouponService: DaffInMemoryBackendCartCouponService, cartAddressService: DaffInMemoryBackendCartAddressService, cartShippingAddressService: DaffInMemoryBackendCartShippingAddressService, cartBillingAddressService: DaffInMemoryBackendCartBillingAddressService, cartPaymentMethodsService: DaffInMemoryBackendCartPaymentMethodsService, cartShippingMethodsService: DaffInMemoryBackendCartShippingMethodsService, cartPaymentService: DaffInMemoryBackendCartPaymentService, cartShippingInformationService: DaffInMemoryBackendCartShippingInformationService, _config: DaffInMemoryDriverConfig);
|
|
344
|
+
protected delegateRequest(reqInfo: RequestInfo, method: any): Observable<any>;
|
|
345
|
+
canHandle(collectionName: string): boolean;
|
|
346
|
+
createDb(reqInfo: RequestInfo): Observable<{
|
|
347
|
+
cart: DaffCart[];
|
|
348
|
+
}>;
|
|
349
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<DaffInMemoryBackendCartRootService, never>;
|
|
350
|
+
static ɵprov: i0.ɵɵInjectableDeclaration<any>;
|
|
367
351
|
}
|
|
368
|
-
|
|
369
|
-
declare const
|
|
370
|
-
declare const
|
|
371
|
-
declare const
|
|
372
|
-
declare const
|
|
373
|
-
declare const
|
|
374
|
-
declare const
|
|
375
|
-
declare const
|
|
376
|
-
declare const
|
|
377
|
-
declare const
|
|
378
|
-
declare const
|
|
379
|
-
|
|
380
|
-
|
|
381
|
-
export { DAFF_CART_IN_MEMORY_CART_ADDRESS_COLLECTION_NAME, DAFF_CART_IN_MEMORY_CART_BILLING_ADDRESS_COLLECTION_NAME, DAFF_CART_IN_MEMORY_CART_COLLECTION_NAME, DAFF_CART_IN_MEMORY_CART_COUPON_COLLECTION_NAME, DAFF_CART_IN_MEMORY_CART_ITEMS_COLLECTION_NAME, DAFF_CART_IN_MEMORY_CART_ORDER_COLLECTION_NAME, DAFF_CART_IN_MEMORY_CART_PAYMENT_COLLECTION_NAME, DAFF_CART_IN_MEMORY_CART_PAYMENT_METHODS_COLLECTION_NAME, DAFF_CART_IN_MEMORY_CART_SHIPPING_ADDRESS_COLLECTION_NAME, DAFF_CART_IN_MEMORY_CART_SHIPPING_COLLECTION_NAME, DAFF_CART_IN_MEMORY_CART_SHIPPING_METHODS_COLLECTION_NAME, DAFF_CART_IN_MEMORY_EXTRA_ATTRIBUTES_HOOK, DaffCartInMemoryDriverModule, DaffInMemoryBackendCartAddressService, DaffInMemoryBackendCartBillingAddressService, DaffInMemoryBackendCartCouponService, DaffInMemoryBackendCartItemsService, DaffInMemoryBackendCartOrderService, DaffInMemoryBackendCartPaymentMethodsService, DaffInMemoryBackendCartPaymentService, DaffInMemoryBackendCartRootService, DaffInMemoryBackendCartService, DaffInMemoryBackendCartShippingAddressService, DaffInMemoryBackendCartShippingInformationService, DaffInMemoryBackendCartShippingMethodsService, DaffInMemoryCartBillingAddressService, DaffInMemoryCartCouponService, DaffInMemoryCartItemService, DaffInMemoryCartOrderService, DaffInMemoryCartPaymentMethodsService, DaffInMemoryCartPaymentService, DaffInMemoryCartService, DaffInMemoryCartShippingAddressService, DaffInMemoryCartShippingInformationService, DaffInMemoryCartShippingMethodsService };
|
|
382
|
-
export type { DaffCartInMemoryExtraAttributesHook };
|
|
352
|
+
export declare const DAFF_CART_IN_MEMORY_CART_COLLECTION_NAME = "cart";
|
|
353
|
+
export declare const DAFF_CART_IN_MEMORY_CART_ITEMS_COLLECTION_NAME = "cart-items";
|
|
354
|
+
export declare const DAFF_CART_IN_MEMORY_CART_ORDER_COLLECTION_NAME = "cart-order";
|
|
355
|
+
export declare const DAFF_CART_IN_MEMORY_CART_COUPON_COLLECTION_NAME = "cart-coupon";
|
|
356
|
+
export declare const DAFF_CART_IN_MEMORY_CART_ADDRESS_COLLECTION_NAME = "cart-address";
|
|
357
|
+
export declare const DAFF_CART_IN_MEMORY_CART_SHIPPING_ADDRESS_COLLECTION_NAME = "cart-shipping-address";
|
|
358
|
+
export declare const DAFF_CART_IN_MEMORY_CART_BILLING_ADDRESS_COLLECTION_NAME = "cart-billing-address";
|
|
359
|
+
export declare const DAFF_CART_IN_MEMORY_CART_PAYMENT_METHODS_COLLECTION_NAME = "cart-payment-methods";
|
|
360
|
+
export declare const DAFF_CART_IN_MEMORY_CART_SHIPPING_METHODS_COLLECTION_NAME = "cart-shipping-methods";
|
|
361
|
+
export declare const DAFF_CART_IN_MEMORY_CART_PAYMENT_COLLECTION_NAME = "cart-payment";
|
|
362
|
+
export declare const DAFF_CART_IN_MEMORY_CART_SHIPPING_COLLECTION_NAME = "cart-shipping-information";
|
|
363
|
+
export { DAFF_CART_IN_MEMORY_EXTRA_ATTRIBUTES_HOOK };
|