@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
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {}
|
|
@@ -1,163 +1,156 @@
|
|
|
1
|
-
import { Observable } from
|
|
2
|
-
import { DaffCart, DaffCartItem, DaffCartItemInput,
|
|
3
|
-
import {
|
|
4
|
-
import { DaffCartFactory, DaffCartItemFactory,
|
|
5
|
-
import { DaffDriverResponse } from
|
|
6
|
-
import * as i0 from
|
|
7
|
-
import { ModuleWithProviders } from
|
|
8
|
-
import * as i1 from
|
|
9
|
-
|
|
1
|
+
import { Observable } from "rxjs";
|
|
2
|
+
import { DaffCart, DaffCartAddress, DaffCartCoupon, DaffCartItem, DaffCartItemInput, DaffCartOrderResult, DaffCartPaymentMethod, DaffCartShippingRate } from "@daffodil/cart";
|
|
3
|
+
import { DaffCartAddressServiceInterface, DaffCartBillingAddressServiceInterface, DaffCartCouponServiceInterface, DaffCartItemServiceInterface, DaffCartOrderServiceInterface, DaffCartPaymentMethodsServiceInterface, DaffCartPaymentServiceInterface, DaffCartServiceInterface, DaffCartShippingAddressServiceInterface, DaffCartShippingInformationServiceInterface, DaffCartShippingMethodsServiceInterface } from "@daffodil/cart/driver";
|
|
4
|
+
import { DaffCartAddressFactory, DaffCartCouponFactory, DaffCartFactory, DaffCartItemFactory, DaffCartPaymentFactory, DaffCartShippingRateFactory } from "@daffodil/cart/testing";
|
|
5
|
+
import { DaffDriverResponse } from "@daffodil/driver";
|
|
6
|
+
import * as i0 from "@angular/core";
|
|
7
|
+
import { EnvironmentProviders, ModuleWithProviders } from "@angular/core";
|
|
8
|
+
import * as i1 from "@angular/common";
|
|
10
9
|
/**
|
|
11
10
|
* @inheritdoc
|
|
12
11
|
*/
|
|
13
|
-
declare class DaffTestingCartService implements DaffCartServiceInterface {
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
12
|
+
export declare class DaffTestingCartService implements DaffCartServiceInterface {
|
|
13
|
+
private cartFactory;
|
|
14
|
+
constructor(cartFactory: DaffCartFactory);
|
|
15
|
+
get(id: DaffCart['id']): Observable<DaffDriverResponse<DaffCart>>;
|
|
16
|
+
addToCart(productId: string, qty: number): Observable<DaffCart>;
|
|
17
|
+
clear(id: DaffCart['id']): Observable<DaffCart>;
|
|
18
|
+
create(): Observable<{
|
|
19
|
+
id: string;
|
|
20
|
+
}>;
|
|
21
|
+
merge(guestCart: DaffCart['id'], customerCart?: DaffCart['id']): Observable<DaffDriverResponse<DaffCart>>;
|
|
22
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<DaffTestingCartService, never>;
|
|
23
|
+
static ɵprov: i0.ɵɵInjectableDeclaration<any>;
|
|
25
24
|
}
|
|
26
|
-
|
|
27
25
|
/**
|
|
28
26
|
* @inheritdoc
|
|
29
27
|
*/
|
|
30
|
-
declare class DaffTestingCartItemService implements DaffCartItemServiceInterface {
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
28
|
+
export declare class DaffTestingCartItemService implements DaffCartItemServiceInterface {
|
|
29
|
+
private cartItemFactory;
|
|
30
|
+
private cartFactory;
|
|
31
|
+
constructor(cartItemFactory: DaffCartItemFactory, cartFactory: DaffCartFactory);
|
|
32
|
+
list(cartId: DaffCart['id']): Observable<DaffCartItem[]>;
|
|
33
|
+
get(cartId: DaffCart['id'], itemId: DaffCartItem['id']): Observable<DaffCartItem>;
|
|
34
|
+
add(cartId: DaffCart['id'], input: DaffCartItemInput): Observable<Partial<DaffCart>>;
|
|
35
|
+
update(cartId: DaffCart['id'], itemId: DaffCartItem['id'], item: Partial<DaffCartItem>): Observable<Partial<DaffCart>>;
|
|
36
|
+
delete(cartId: DaffCart['id'], itemId: DaffCartItem['id']): Observable<Partial<DaffCart>>;
|
|
37
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<DaffTestingCartItemService, never>;
|
|
38
|
+
static ɵprov: i0.ɵɵInjectableDeclaration<any>;
|
|
41
39
|
}
|
|
42
|
-
|
|
43
40
|
/**
|
|
44
41
|
* @inheritdoc
|
|
45
42
|
*/
|
|
46
|
-
declare class DaffTestingCartAddressService implements DaffCartAddressServiceInterface {
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
43
|
+
export declare class DaffTestingCartAddressService implements DaffCartAddressServiceInterface {
|
|
44
|
+
private addressFactory;
|
|
45
|
+
private cartFactory;
|
|
46
|
+
constructor(addressFactory: DaffCartAddressFactory, cartFactory: DaffCartFactory);
|
|
47
|
+
update(cartId: DaffCart['id'], address: DaffCartAddress): Observable<Partial<DaffCart>>;
|
|
48
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<DaffTestingCartAddressService, never>;
|
|
49
|
+
static ɵprov: i0.ɵɵInjectableDeclaration<any>;
|
|
53
50
|
}
|
|
54
|
-
|
|
55
51
|
/**
|
|
56
52
|
* @inheritdoc
|
|
57
53
|
*/
|
|
58
|
-
declare class DaffTestingCartBillingAddressService implements DaffCartBillingAddressServiceInterface {
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
54
|
+
export declare class DaffTestingCartBillingAddressService implements DaffCartBillingAddressServiceInterface {
|
|
55
|
+
private addressFactory;
|
|
56
|
+
private cartFactory;
|
|
57
|
+
constructor(addressFactory: DaffCartAddressFactory, cartFactory: DaffCartFactory);
|
|
58
|
+
get(cartId: DaffCart['id']): Observable<DaffCartAddress>;
|
|
59
|
+
update(cartId: DaffCart['id'], address: DaffCartAddress): Observable<Partial<DaffCart>>;
|
|
60
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<DaffTestingCartBillingAddressService, never>;
|
|
61
|
+
static ɵprov: i0.ɵɵInjectableDeclaration<any>;
|
|
66
62
|
}
|
|
67
|
-
|
|
68
63
|
/**
|
|
69
64
|
* @inheritdoc
|
|
70
65
|
*/
|
|
71
|
-
declare class DaffTestingCartPaymentService implements DaffCartPaymentServiceInterface {
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
66
|
+
export declare class DaffTestingCartPaymentService implements DaffCartPaymentServiceInterface {
|
|
67
|
+
private paymentFactory;
|
|
68
|
+
private cartFactory;
|
|
69
|
+
constructor(paymentFactory: DaffCartPaymentFactory, cartFactory: DaffCartFactory);
|
|
70
|
+
get(cartId: DaffCart['id']): Observable<DaffCartPaymentMethod>;
|
|
71
|
+
update(cartId: DaffCart['id'], payment: Partial<DaffCartPaymentMethod>): Observable<Partial<DaffCart>>;
|
|
72
|
+
updateWithBilling(cartId: DaffCart['id'], payment: Partial<DaffCartPaymentMethod>, address: Partial<DaffCartAddress>): Observable<Partial<DaffCart>>;
|
|
73
|
+
remove(cartId: DaffCart['id']): Observable<void>;
|
|
74
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<DaffTestingCartPaymentService, never>;
|
|
75
|
+
static ɵprov: i0.ɵɵInjectableDeclaration<any>;
|
|
81
76
|
}
|
|
82
|
-
|
|
83
77
|
/**
|
|
84
78
|
* @inheritdoc
|
|
85
79
|
*/
|
|
86
|
-
declare class DaffTestingCartPaymentMethodsService implements DaffCartPaymentMethodsServiceInterface {
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
80
|
+
export declare class DaffTestingCartPaymentMethodsService implements DaffCartPaymentMethodsServiceInterface {
|
|
81
|
+
private paymentFactory;
|
|
82
|
+
constructor(paymentFactory: DaffCartPaymentFactory);
|
|
83
|
+
list(cartId: DaffCart['id']): Observable<DaffCartPaymentMethod[]>;
|
|
84
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<DaffTestingCartPaymentMethodsService, never>;
|
|
85
|
+
static ɵprov: i0.ɵɵInjectableDeclaration<any>;
|
|
92
86
|
}
|
|
93
|
-
|
|
94
87
|
/**
|
|
95
88
|
* @inheritdoc
|
|
96
89
|
*/
|
|
97
|
-
declare class DaffTestingCartShippingAddressService implements DaffCartShippingAddressServiceInterface {
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
90
|
+
export declare class DaffTestingCartShippingAddressService implements DaffCartShippingAddressServiceInterface {
|
|
91
|
+
private addressFactory;
|
|
92
|
+
private cartFactory;
|
|
93
|
+
constructor(addressFactory: DaffCartAddressFactory, cartFactory: DaffCartFactory);
|
|
94
|
+
get(cartId: DaffCart['id']): Observable<DaffCartAddress>;
|
|
95
|
+
update(cartId: DaffCart['id'], address: DaffCartAddress): Observable<Partial<DaffCart>>;
|
|
96
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<DaffTestingCartShippingAddressService, never>;
|
|
97
|
+
static ɵprov: i0.ɵɵInjectableDeclaration<any>;
|
|
105
98
|
}
|
|
106
|
-
|
|
107
99
|
/**
|
|
108
100
|
* @inheritdoc
|
|
109
101
|
*/
|
|
110
|
-
declare class DaffTestingCartShippingInformationService implements DaffCartShippingInformationServiceInterface {
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
102
|
+
export declare class DaffTestingCartShippingInformationService implements DaffCartShippingInformationServiceInterface {
|
|
103
|
+
private shippingInfoFactory;
|
|
104
|
+
private cartFactory;
|
|
105
|
+
constructor(shippingInfoFactory: DaffCartShippingRateFactory, cartFactory: DaffCartFactory);
|
|
106
|
+
get(cartId: DaffCart['id']): Observable<DaffCartShippingRate>;
|
|
107
|
+
update(cartId: DaffCart['id'], info: Partial<DaffCartShippingRate>): Observable<Partial<DaffCart>>;
|
|
108
|
+
delete(cartId: DaffCart['id']): Observable<Partial<DaffCart>>;
|
|
109
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<DaffTestingCartShippingInformationService, never>;
|
|
110
|
+
static ɵprov: i0.ɵɵInjectableDeclaration<any>;
|
|
119
111
|
}
|
|
120
|
-
|
|
121
112
|
/**
|
|
122
113
|
* @inheritdoc
|
|
123
114
|
*/
|
|
124
|
-
declare class DaffTestingCartShippingMethodsService implements DaffCartShippingMethodsServiceInterface {
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
115
|
+
export declare class DaffTestingCartShippingMethodsService implements DaffCartShippingMethodsServiceInterface {
|
|
116
|
+
private shippingInfoFactory;
|
|
117
|
+
constructor(shippingInfoFactory: DaffCartShippingRateFactory);
|
|
118
|
+
list(cartId: DaffCart['id']): Observable<DaffCartShippingRate[]>;
|
|
119
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<DaffTestingCartShippingMethodsService, never>;
|
|
120
|
+
static ɵprov: i0.ɵɵInjectableDeclaration<any>;
|
|
130
121
|
}
|
|
131
|
-
|
|
132
122
|
/**
|
|
133
123
|
* @inheritdoc
|
|
134
124
|
*/
|
|
135
|
-
declare class DaffTestingCartOrderService implements DaffCartOrderServiceInterface {
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
125
|
+
export declare class DaffTestingCartOrderService implements DaffCartOrderServiceInterface {
|
|
126
|
+
placeOrder(cartId: DaffCart['id'], payment?: DaffCartPaymentMethod): Observable<DaffCartOrderResult>;
|
|
127
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<DaffTestingCartOrderService, never>;
|
|
128
|
+
static ɵprov: i0.ɵɵInjectableDeclaration<any>;
|
|
139
129
|
}
|
|
140
|
-
|
|
141
130
|
/**
|
|
142
131
|
* @inheritdoc
|
|
143
132
|
*/
|
|
144
|
-
declare class DaffTestingCartCouponService implements DaffCartCouponServiceInterface {
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
133
|
+
export declare class DaffTestingCartCouponService implements DaffCartCouponServiceInterface {
|
|
134
|
+
private couponFactory;
|
|
135
|
+
private cartFactory;
|
|
136
|
+
constructor(couponFactory: DaffCartCouponFactory, cartFactory: DaffCartFactory);
|
|
137
|
+
list(cartId: DaffCart['id']): Observable<DaffCartCoupon[]>;
|
|
138
|
+
apply(cartId: DaffCart['id'], coupon: DaffCartCoupon): Observable<Partial<DaffCart>>;
|
|
139
|
+
remove(cartId: DaffCart['id'], coupon: DaffCartCoupon): Observable<Partial<DaffCart>>;
|
|
140
|
+
removeAll(cartId: DaffCart['id']): Observable<Partial<DaffCart>>;
|
|
141
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<DaffTestingCartCouponService, never>;
|
|
142
|
+
static ɵprov: i0.ɵɵInjectableDeclaration<any>;
|
|
154
143
|
}
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
144
|
+
/**
|
|
145
|
+
* @deprecated in favor of {@link provideDaffCartTestingDriver} Deprecated in version 0.95.0. Will be removed in version 0.98.0.
|
|
146
|
+
*/
|
|
147
|
+
export declare class DaffTestingCartDriverModule {
|
|
148
|
+
static forRoot(): ModuleWithProviders<DaffTestingCartDriverModule>;
|
|
149
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<DaffTestingCartDriverModule, never>;
|
|
150
|
+
static ɵmod: i0.ɵɵNgModuleDeclaration<DaffTestingCartDriverModule, never, [typeof i1.CommonModule], never>;
|
|
151
|
+
static ɵinj: i0.ɵɵInjectorDeclaration<DaffTestingCartDriverModule>;
|
|
161
152
|
}
|
|
162
|
-
|
|
163
|
-
|
|
153
|
+
/**
|
|
154
|
+
* Provides the testing implementations of the `@daffodil/cart/driver` interfaces.
|
|
155
|
+
*/
|
|
156
|
+
export declare const provideDaffCartTestingDriver: () => EnvironmentProviders;
|