@daffodil/cart 0.94.1 → 0.95.1
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,49 +1,48 @@
|
|
|
1
|
-
import * as
|
|
2
|
-
import { Action,
|
|
3
|
-
import { DaffCart,
|
|
4
|
-
import { DaffFailureAction,
|
|
5
|
-
import { DaffProduct } from
|
|
6
|
-
import * as
|
|
7
|
-
import {
|
|
8
|
-
import
|
|
9
|
-
import {
|
|
10
|
-
import {
|
|
11
|
-
import {
|
|
12
|
-
import {
|
|
13
|
-
import
|
|
14
|
-
import
|
|
15
|
-
import { Dictionary } from
|
|
16
|
-
|
|
1
|
+
import * as i1 from "@ngrx/store";
|
|
2
|
+
import { Action, ActionReducer, ActionReducerMap, DefaultProjectorFn, MemoizedSelector, MetaReducer, Store } from "@ngrx/store";
|
|
3
|
+
import { DaffCart, DaffCartAddress, DaffCartCoupon, DaffCartItem, DaffCartItemInput, DaffCartOrderResult, DaffCartPaymentMethod, DaffCartShippingRate, DaffCompositeCartItem, DaffCompositeCartItemOption, DaffConfigurableCartItem, DaffConfigurableCartItemAttribute } from "@daffodil/cart";
|
|
4
|
+
import { DaffFailureAction, DaffLoadingState, DaffMutableLoadingState, DaffOperationEntity, DaffOperationEntityState, DaffOperationEntityStateAdapter, DaffState, DaffStateError, DaffStoreFacade, daffTransformErrorToStateError } from "@daffodil/core/state";
|
|
5
|
+
import { DaffProduct } from "@daffodil/product";
|
|
6
|
+
import * as i0 from "@angular/core";
|
|
7
|
+
import { EnvironmentProviders } from "@angular/core";
|
|
8
|
+
import * as i2 from "@ngrx/effects";
|
|
9
|
+
import { Observable } from "rxjs";
|
|
10
|
+
import { DaffCartDriverResolveService, DaffCartPaymentServiceInterface } from "@daffodil/cart/driver";
|
|
11
|
+
import { DaffError } from "@daffodil/core";
|
|
12
|
+
import { DaffPaymentRequest, DaffPaymentResponse } from "@daffodil/payment";
|
|
13
|
+
import { DaffPaymentDriverInterface } from "@daffodil/payment/driver";
|
|
14
|
+
import { DaffPaymentGenerateTokenPayload } from "@daffodil/payment/state";
|
|
15
|
+
import { Dictionary } from "@ngrx/entity";
|
|
17
16
|
/**
|
|
18
17
|
* Represents an action that loads a portion of the cart.
|
|
19
18
|
*/
|
|
20
|
-
interface DaffCartRetrievalAction<T extends DaffCart = DaffCart> extends Action {
|
|
21
|
-
|
|
19
|
+
export interface DaffCartRetrievalAction<T extends DaffCart = DaffCart> extends Action {
|
|
20
|
+
readonly payload: Partial<T>;
|
|
22
21
|
}
|
|
23
22
|
/**
|
|
24
23
|
* Represents an injection of a retrieval action that implements the {@link DaffCartRetrievalAction} interface
|
|
25
24
|
* and therefore does not need transformation.
|
|
26
25
|
* If the injected action needs transformation, use {@link DaffCartRetrievalActionTransformedInjection}
|
|
27
26
|
*/
|
|
28
|
-
interface DaffCartRetrievalActionDirectInjection<T extends DaffCartRetrievalAction = DaffCartRetrievalAction> {
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
27
|
+
export interface DaffCartRetrievalActionDirectInjection<T extends DaffCartRetrievalAction = DaffCartRetrievalAction> {
|
|
28
|
+
/**
|
|
29
|
+
* The action type.
|
|
30
|
+
*/
|
|
31
|
+
type: T['type'];
|
|
33
32
|
}
|
|
34
33
|
/**
|
|
35
34
|
* Represents an injection of a retrieval action that doesn't implement the {@link DaffCartRetrievalAction} interface.
|
|
36
35
|
* Contains a way to get the cart from the action.
|
|
37
36
|
*/
|
|
38
|
-
interface DaffCartRetrievalActionTransformedInjection<T extends Action = Action> {
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
37
|
+
export interface DaffCartRetrievalActionTransformedInjection<T extends Action = Action> {
|
|
38
|
+
/**
|
|
39
|
+
* The action type.
|
|
40
|
+
*/
|
|
41
|
+
type: T['type'];
|
|
42
|
+
/**
|
|
43
|
+
* A function that gets the retrieved cart from the action.
|
|
44
|
+
*/
|
|
45
|
+
transform: <TCart extends DaffCart = DaffCart>(action: T) => Partial<TCart>;
|
|
47
46
|
}
|
|
48
47
|
/**
|
|
49
48
|
* Represents an injection of a cart retrieval action.
|
|
@@ -51,62 +50,58 @@ interface DaffCartRetrievalActionTransformedInjection<T extends Action = Action>
|
|
|
51
50
|
* Actions provided to {@link DAFF_CART_RETRIEVAL_ACTIONS} are natively understood by Daffodil reducers and will automatically
|
|
52
51
|
* populate the appropriate pieces of state when they are dispatched.
|
|
53
52
|
*/
|
|
54
|
-
type DaffCartRetrievalActionInjection = DaffCartRetrievalActionDirectInjection | DaffCartRetrievalActionTransformedInjection;
|
|
55
|
-
|
|
56
|
-
declare const DAFF_CART_RETRIEVAL_ACTIONS: _angular_core.InjectionToken<DaffCartRetrievalActionInjection[]>;
|
|
57
|
-
declare const daffCartProvideRetrievalActions: <R extends DaffCartRetrievalActionInjection = DaffCartRetrievalActionInjection>(...values: R[]) => Array<_angular_core.ValueProvider>;
|
|
58
|
-
|
|
53
|
+
export type DaffCartRetrievalActionInjection = DaffCartRetrievalActionDirectInjection | DaffCartRetrievalActionTransformedInjection;
|
|
54
|
+
export declare const DAFF_CART_RETRIEVAL_ACTIONS: import("@angular/core").InjectionToken<DaffCartRetrievalActionInjection[]>, daffCartProvideRetrievalActions: <R extends DaffCartRetrievalActionInjection = DaffCartRetrievalActionInjection>(...values: R[]) => Array<import("@angular/core").ValueProvider>;
|
|
59
55
|
/**
|
|
60
56
|
* Gets the cart from the passed action if it is a recognized retrieval action and applies the transformation if needed.
|
|
61
57
|
* If the action is not recognized as a retrieval action, returns `null`.
|
|
62
58
|
*/
|
|
63
|
-
declare function daffCartRetrievalGetResponse<T extends DaffCart = DaffCart>(action: Action, retrievalActions: DaffCartRetrievalActionInjection[]): Partial<T> | null;
|
|
64
|
-
|
|
59
|
+
export declare function daffCartRetrievalGetResponse<T extends DaffCart = DaffCart>(action: Action, retrievalActions: DaffCartRetrievalActionInjection[]): Partial<T> | null;
|
|
65
60
|
/**
|
|
66
61
|
* An enum for the cart action types.
|
|
67
62
|
*/
|
|
68
|
-
declare enum DaffCartActionTypes {
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
63
|
+
export declare enum DaffCartActionTypes {
|
|
64
|
+
CartStorageFailureAction = "[@daffodil/cart] Cart Storage Failure Action",
|
|
65
|
+
CartLoadAction = "[@daffodil/cart] Cart Load Action",
|
|
66
|
+
CartLoadSuccessAction = "[@daffodil/cart] Cart Load Success Action",
|
|
67
|
+
CartLoadPartialSuccessAction = "[@daffodil/cart] Cart Load Partial Success Action",
|
|
68
|
+
CartLoadFailureAction = "[@daffodil/cart] Cart Load Failure Action",
|
|
69
|
+
CartCreateAction = "[@daffodil/cart] Cart Create Action",
|
|
70
|
+
CartCreateSuccessAction = "[@daffodil/cart] Cart Create Success Action",
|
|
71
|
+
CartCreateFailureAction = "[@daffodil/cart] Cart Create Failure Action",
|
|
72
|
+
AddToCartAction = "[@daffodil/cart] Cart Add To Cart Action",
|
|
73
|
+
AddToCartSuccessAction = "[@daffodil/cart] Cart Add to Cart Success Action",
|
|
74
|
+
AddToCartFailureAction = "[@daffodil/cart] Cart Add to Cart Failure Action",
|
|
75
|
+
CartClearAction = "[@daffodil/cart] Cart Reset Action",
|
|
76
|
+
CartClearSuccessAction = "[@daffodil/cart] Cart Reset Success Action",
|
|
77
|
+
CartClearFailureAction = "[@daffodil/cart] Cart Reset Failure Action",
|
|
78
|
+
ResolveCartAction = "[@daffodil/cart] Resolve Cart Action",
|
|
79
|
+
ResolveCartSuccessAction = "[@daffodil/cart] Resolve Cart Success Action",
|
|
80
|
+
ResolveCartPartialSuccessAction = "[@daffodil/cart] Resolve Cart Partial Success Action",
|
|
81
|
+
ResolveCartServerSideAction = "[@daffodil/cart] Resolve Cart Server Side Action",
|
|
82
|
+
ResolveCartFailureAction = "[@daffodil/cart] Resolve Cart Failure Action"
|
|
88
83
|
}
|
|
89
84
|
/**
|
|
90
85
|
* Indicates that an error occured while either reading or writing the cart ID to or from storage.
|
|
91
86
|
*/
|
|
92
|
-
declare class DaffCartStorageFailure implements DaffFailureAction {
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
87
|
+
export declare class DaffCartStorageFailure implements DaffFailureAction {
|
|
88
|
+
payload: DaffStateError[];
|
|
89
|
+
readonly type = DaffCartActionTypes.CartStorageFailureAction;
|
|
90
|
+
constructor(payload: DaffStateError[]);
|
|
96
91
|
}
|
|
97
92
|
/**
|
|
98
93
|
* Triggers the load of the cart.
|
|
99
94
|
*/
|
|
100
|
-
declare class DaffCartLoad implements Action {
|
|
101
|
-
|
|
95
|
+
export declare class DaffCartLoad implements Action {
|
|
96
|
+
readonly type = DaffCartActionTypes.CartLoadAction;
|
|
102
97
|
}
|
|
103
98
|
/**
|
|
104
99
|
* Indicates the successful load of the cart.
|
|
105
100
|
*/
|
|
106
|
-
declare class DaffCartLoadSuccess<T extends DaffCart = DaffCart> implements DaffCartRetrievalAction<T> {
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
101
|
+
export declare class DaffCartLoadSuccess<T extends DaffCart = DaffCart> implements DaffCartRetrievalAction<T> {
|
|
102
|
+
payload: T;
|
|
103
|
+
readonly type = DaffCartActionTypes.CartLoadSuccessAction;
|
|
104
|
+
constructor(payload: T);
|
|
110
105
|
}
|
|
111
106
|
/**
|
|
112
107
|
* An action that indicates a user's cart is loaded but recoverable errors occurred.
|
|
@@ -114,99 +109,99 @@ declare class DaffCartLoadSuccess<T extends DaffCart = DaffCart> implements Daff
|
|
|
114
109
|
* but the user should probably be shown error messages as well.
|
|
115
110
|
* A common example is some cart items being out of stock.
|
|
116
111
|
*/
|
|
117
|
-
declare class DaffCartLoadPartialSuccess<T extends DaffCart = DaffCart> implements DaffCartRetrievalAction<T> {
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
112
|
+
export declare class DaffCartLoadPartialSuccess<T extends DaffCart = DaffCart> implements DaffCartRetrievalAction<T> {
|
|
113
|
+
payload: T;
|
|
114
|
+
errors: DaffStateError[];
|
|
115
|
+
readonly type = DaffCartActionTypes.CartLoadPartialSuccessAction;
|
|
116
|
+
constructor(payload: T, errors: DaffStateError[]);
|
|
122
117
|
}
|
|
123
118
|
/**
|
|
124
119
|
* Indicates the failed load of the cart.
|
|
125
120
|
*/
|
|
126
|
-
declare class DaffCartLoadFailure implements DaffFailureAction {
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
121
|
+
export declare class DaffCartLoadFailure implements DaffFailureAction {
|
|
122
|
+
payload: DaffStateError[];
|
|
123
|
+
readonly type = DaffCartActionTypes.CartLoadFailureAction;
|
|
124
|
+
constructor(payload: DaffStateError[]);
|
|
130
125
|
}
|
|
131
126
|
/**
|
|
132
127
|
* Triggers the creation of a new cart.
|
|
133
128
|
*/
|
|
134
|
-
declare class DaffCartCreate implements Action {
|
|
135
|
-
|
|
129
|
+
export declare class DaffCartCreate implements Action {
|
|
130
|
+
readonly type = DaffCartActionTypes.CartCreateAction;
|
|
136
131
|
}
|
|
137
132
|
/**
|
|
138
133
|
* Indicates the successful creation of a new cart.
|
|
139
134
|
*/
|
|
140
|
-
declare class DaffCartCreateSuccess<T extends DaffCart = DaffCart> implements Action {
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
135
|
+
export declare class DaffCartCreateSuccess<T extends DaffCart = DaffCart> implements Action {
|
|
136
|
+
payload: Pick<T, 'id'>;
|
|
137
|
+
readonly type = DaffCartActionTypes.CartCreateSuccessAction;
|
|
138
|
+
constructor(payload: Pick<T, 'id'>);
|
|
144
139
|
}
|
|
145
140
|
/**
|
|
146
141
|
* Indicates the failed creation of a new cart.
|
|
147
142
|
*/
|
|
148
|
-
declare class DaffCartCreateFailure implements DaffFailureAction {
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
}
|
|
153
|
-
declare class DaffAddToCart implements Action {
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
}
|
|
164
|
-
declare class DaffAddToCartSuccess implements Action {
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
}
|
|
169
|
-
declare class DaffAddToCartFailure implements DaffFailureAction {
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
143
|
+
export declare class DaffCartCreateFailure implements DaffFailureAction {
|
|
144
|
+
payload: DaffStateError[];
|
|
145
|
+
readonly type = DaffCartActionTypes.CartCreateFailureAction;
|
|
146
|
+
constructor(payload: DaffStateError[]);
|
|
147
|
+
}
|
|
148
|
+
export declare class DaffAddToCart implements Action {
|
|
149
|
+
payload: {
|
|
150
|
+
productId: DaffProduct['id'];
|
|
151
|
+
qty: number;
|
|
152
|
+
};
|
|
153
|
+
readonly type = DaffCartActionTypes.AddToCartAction;
|
|
154
|
+
constructor(payload: {
|
|
155
|
+
productId: DaffProduct['id'];
|
|
156
|
+
qty: number;
|
|
157
|
+
});
|
|
158
|
+
}
|
|
159
|
+
export declare class DaffAddToCartSuccess implements Action {
|
|
160
|
+
payload: DaffCart;
|
|
161
|
+
readonly type = DaffCartActionTypes.AddToCartSuccessAction;
|
|
162
|
+
constructor(payload: DaffCart);
|
|
163
|
+
}
|
|
164
|
+
export declare class DaffAddToCartFailure implements DaffFailureAction {
|
|
165
|
+
payload: DaffStateError[];
|
|
166
|
+
readonly type = DaffCartActionTypes.AddToCartFailureAction;
|
|
167
|
+
constructor(payload: DaffStateError[]);
|
|
173
168
|
}
|
|
174
169
|
/**
|
|
175
170
|
* Triggers the removal of all items from the cart.
|
|
176
171
|
*/
|
|
177
|
-
declare class DaffCartClear implements Action {
|
|
178
|
-
|
|
172
|
+
export declare class DaffCartClear implements Action {
|
|
173
|
+
readonly type = DaffCartActionTypes.CartClearAction;
|
|
179
174
|
}
|
|
180
175
|
/**
|
|
181
176
|
* Indicates the successful removal of all items from the cart.
|
|
182
177
|
*/
|
|
183
|
-
declare class DaffCartClearSuccess<T extends DaffCart = DaffCart> implements DaffCartRetrievalAction<T> {
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
178
|
+
export declare class DaffCartClearSuccess<T extends DaffCart = DaffCart> implements DaffCartRetrievalAction<T> {
|
|
179
|
+
payload: Partial<T>;
|
|
180
|
+
readonly type = DaffCartActionTypes.CartClearSuccessAction;
|
|
181
|
+
constructor(payload: Partial<T>);
|
|
187
182
|
}
|
|
188
183
|
/**
|
|
189
184
|
* Indicates the failed removal of all items from the cart.
|
|
190
185
|
*/
|
|
191
|
-
declare class DaffCartClearFailure implements DaffFailureAction {
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
186
|
+
export declare class DaffCartClearFailure implements DaffFailureAction {
|
|
187
|
+
payload: DaffStateError[];
|
|
188
|
+
readonly type = DaffCartActionTypes.CartClearFailureAction;
|
|
189
|
+
constructor(payload: DaffStateError[]);
|
|
195
190
|
}
|
|
196
191
|
/**
|
|
197
192
|
* Triggers cart resolution.
|
|
198
193
|
* Will attempt to load a cart if it exists and create a cart otherwise.
|
|
199
194
|
*/
|
|
200
|
-
declare class DaffResolveCart implements Action {
|
|
201
|
-
|
|
195
|
+
export declare class DaffResolveCart implements Action {
|
|
196
|
+
readonly type = DaffCartActionTypes.ResolveCartAction;
|
|
202
197
|
}
|
|
203
198
|
/**
|
|
204
199
|
* An action that indicates a user's cart is resolved successfully.
|
|
205
200
|
*/
|
|
206
|
-
declare class DaffResolveCartSuccess<T extends DaffCart = DaffCart> implements DaffCartRetrievalAction<T> {
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
201
|
+
export declare class DaffResolveCartSuccess<T extends DaffCart = DaffCart> implements DaffCartRetrievalAction<T> {
|
|
202
|
+
payload: T;
|
|
203
|
+
readonly type = DaffCartActionTypes.ResolveCartSuccessAction;
|
|
204
|
+
constructor(payload: T);
|
|
210
205
|
}
|
|
211
206
|
/**
|
|
212
207
|
* An action that indicates a user's cart is resolved but recoverable errors occurred.
|
|
@@ -214,556 +209,549 @@ declare class DaffResolveCartSuccess<T extends DaffCart = DaffCart> implements D
|
|
|
214
209
|
* but the user should probably be shown error messages as well.
|
|
215
210
|
* A common example is some cart items being out of stock.
|
|
216
211
|
*/
|
|
217
|
-
declare class DaffResolveCartPartialSuccess<T extends DaffCart = DaffCart> implements DaffCartRetrievalAction<T> {
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
212
|
+
export declare class DaffResolveCartPartialSuccess<T extends DaffCart = DaffCart> implements DaffCartRetrievalAction<T> {
|
|
213
|
+
payload: T;
|
|
214
|
+
errors: DaffStateError[];
|
|
215
|
+
readonly type = DaffCartActionTypes.ResolveCartPartialSuccessAction;
|
|
216
|
+
constructor(payload: T, errors: DaffStateError[]);
|
|
222
217
|
}
|
|
223
218
|
/**
|
|
224
219
|
* An action that indicates that a cart failed to resolve.
|
|
225
220
|
*/
|
|
226
|
-
declare class DaffResolveCartFailure implements DaffFailureAction {
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
221
|
+
export declare class DaffResolveCartFailure implements DaffFailureAction {
|
|
222
|
+
payload: DaffStateError[];
|
|
223
|
+
readonly type = DaffCartActionTypes.ResolveCartFailureAction;
|
|
224
|
+
constructor(payload: DaffStateError[]);
|
|
230
225
|
}
|
|
231
226
|
/**
|
|
232
227
|
* An action indicating that the cart resolution terminated as a result
|
|
233
228
|
* of an attempted resolution on the server.
|
|
234
229
|
*/
|
|
235
|
-
declare class DaffResolveCartServerSide implements Action {
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
230
|
+
export declare class DaffResolveCartServerSide implements Action {
|
|
231
|
+
payload: DaffStateError[];
|
|
232
|
+
readonly type = DaffCartActionTypes.ResolveCartServerSideAction;
|
|
233
|
+
constructor(payload: DaffStateError[]);
|
|
239
234
|
}
|
|
240
235
|
/**
|
|
241
236
|
* A union of all the cart action classes.
|
|
242
237
|
*/
|
|
243
|
-
type DaffCartActions<T extends DaffCart = DaffCart> = DaffCartStorageFailure | DaffCartLoad | DaffCartLoadSuccess<T> | DaffCartLoadPartialSuccess<T> | DaffCartLoadFailure | DaffCartCreate | DaffCartCreateSuccess<T> | DaffCartCreateFailure | DaffAddToCart | DaffAddToCartSuccess | DaffAddToCartFailure | DaffCartClear | DaffCartClearSuccess<T> | DaffCartClearFailure | DaffResolveCart | DaffResolveCartSuccess<T> | DaffResolveCartPartialSuccess<T> | DaffResolveCartServerSide | DaffResolveCartFailure;
|
|
244
|
-
|
|
238
|
+
export type DaffCartActions<T extends DaffCart = DaffCart> = DaffCartStorageFailure | DaffCartLoad | DaffCartLoadSuccess<T> | DaffCartLoadPartialSuccess<T> | DaffCartLoadFailure | DaffCartCreate | DaffCartCreateSuccess<T> | DaffCartCreateFailure | DaffAddToCart | DaffAddToCartSuccess | DaffAddToCartFailure | DaffCartClear | DaffCartClearSuccess<T> | DaffCartClearFailure | DaffResolveCart | DaffResolveCartSuccess<T> | DaffResolveCartPartialSuccess<T> | DaffResolveCartServerSide | DaffResolveCartFailure;
|
|
245
239
|
/**
|
|
246
240
|
* An enum for the cart item action types.
|
|
247
241
|
*/
|
|
248
|
-
declare enum DaffCartItemActionTypes {
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
|
|
242
|
+
export declare enum DaffCartItemActionTypes {
|
|
243
|
+
CartItemListAction = "[@daffodil/cart] Cart Items List Action",
|
|
244
|
+
CartItemListSuccessAction = "[@daffodil/cart] Cart Items List Success Action",
|
|
245
|
+
CartItemListFailureAction = "[@daffodil/cart] Cart Items List Failure Action",
|
|
246
|
+
CartItemLoadAction = "[@daffodil/cart] Cart Item Load Action",
|
|
247
|
+
CartItemLoadSuccessAction = "[@daffodil/cart] Cart Item Load Success Action",
|
|
248
|
+
CartItemLoadFailureAction = "[@daffodil/cart] Cart Item Load Failure Action",
|
|
249
|
+
CartItemUpdateAction = "[@daffodil/cart] Cart Item Update Action",
|
|
250
|
+
CartItemUpdateSuccessAction = "[@daffodil/cart] Cart Item Update Success Action",
|
|
251
|
+
CartItemUpdateFailureAction = "[@daffodil/cart] Cart Item Update Failure Action",
|
|
252
|
+
CartItemAddAction = "[@daffodil/cart] Cart Item Add Action",
|
|
253
|
+
CartItemAddSuccessAction = "[@daffodil/cart] Cart Item Add Success Action",
|
|
254
|
+
CartItemAddFailureAction = "[@daffodil/cart] Cart Item Add Failure Action",
|
|
255
|
+
CartItemDeleteAction = "[@daffodil/cart] Cart Item Remove Action",
|
|
256
|
+
CartItemDeleteSuccessAction = "[@daffodil/cart] Cart Item Remove Success Action",
|
|
257
|
+
CartItemDeleteFailureAction = "[@daffodil/cart] Cart Item Remove Failure Action",
|
|
258
|
+
CartItemDeleteOutOfStockAction = "[@daffodil/cart] Cart Item Delete Out Of Stock Action",
|
|
259
|
+
CartItemDeleteOutOfStockSuccessAction = "[@daffodil/cart] Cart Item Delete Out Of Stock Success Action",
|
|
260
|
+
CartItemDeleteOutOfStockFailureAction = "[@daffodil/cart] Cart Item Delete Out Of Stock Failure Action",
|
|
261
|
+
CartItemStateResetAction = "[@daffodil/cart] Cart Item State Reset Action"
|
|
268
262
|
}
|
|
269
263
|
/**
|
|
270
264
|
* Triggers the load of the cart's items.
|
|
271
265
|
*/
|
|
272
|
-
declare class DaffCartItemList implements Action {
|
|
273
|
-
|
|
266
|
+
export declare class DaffCartItemList implements Action {
|
|
267
|
+
readonly type = DaffCartItemActionTypes.CartItemListAction;
|
|
274
268
|
}
|
|
275
269
|
/**
|
|
276
270
|
* Indicates the successful load of the cart's items.
|
|
277
271
|
*/
|
|
278
|
-
declare class DaffCartItemListSuccess<T extends DaffCartItem = DaffCartItem> implements Action {
|
|
279
|
-
|
|
280
|
-
|
|
281
|
-
|
|
272
|
+
export declare class DaffCartItemListSuccess<T extends DaffCartItem = DaffCartItem> implements Action {
|
|
273
|
+
payload: T[];
|
|
274
|
+
readonly type = DaffCartItemActionTypes.CartItemListSuccessAction;
|
|
275
|
+
constructor(payload: T[]);
|
|
282
276
|
}
|
|
283
277
|
/**
|
|
284
278
|
* Indicates the failed load of the cart's items.
|
|
285
279
|
*/
|
|
286
|
-
declare class DaffCartItemListFailure implements DaffFailureAction {
|
|
287
|
-
|
|
288
|
-
|
|
289
|
-
|
|
280
|
+
export declare class DaffCartItemListFailure implements DaffFailureAction {
|
|
281
|
+
payload: DaffStateError[];
|
|
282
|
+
readonly type = DaffCartItemActionTypes.CartItemListFailureAction;
|
|
283
|
+
constructor(payload: DaffStateError[]);
|
|
290
284
|
}
|
|
291
285
|
/**
|
|
292
286
|
* Triggers the load of a specific cart item.
|
|
293
287
|
*/
|
|
294
|
-
declare class DaffCartItemLoad<T extends DaffCartItem = DaffCartItem> implements Action {
|
|
295
|
-
|
|
296
|
-
|
|
297
|
-
|
|
288
|
+
export declare class DaffCartItemLoad<T extends DaffCartItem = DaffCartItem> implements Action {
|
|
289
|
+
itemId: T['id'];
|
|
290
|
+
readonly type = DaffCartItemActionTypes.CartItemLoadAction;
|
|
291
|
+
constructor(itemId: T['id']);
|
|
298
292
|
}
|
|
299
293
|
/**
|
|
300
294
|
* Indicates the successful load of a specific cart item.
|
|
301
295
|
*/
|
|
302
|
-
declare class DaffCartItemLoadSuccess<T extends DaffCartItem = DaffCartItem> implements Action {
|
|
303
|
-
|
|
304
|
-
|
|
305
|
-
|
|
296
|
+
export declare class DaffCartItemLoadSuccess<T extends DaffCartItem = DaffCartItem> implements Action {
|
|
297
|
+
payload: T;
|
|
298
|
+
readonly type = DaffCartItemActionTypes.CartItemLoadSuccessAction;
|
|
299
|
+
constructor(payload: T);
|
|
306
300
|
}
|
|
307
301
|
/**
|
|
308
302
|
* Indicates the failed load of a specific cart item.
|
|
309
303
|
*/
|
|
310
|
-
declare class DaffCartItemLoadFailure implements Action {
|
|
311
|
-
|
|
312
|
-
|
|
313
|
-
|
|
314
|
-
|
|
304
|
+
export declare class DaffCartItemLoadFailure implements Action {
|
|
305
|
+
payload: DaffStateError[];
|
|
306
|
+
itemId: DaffCartItem['id'];
|
|
307
|
+
readonly type = DaffCartItemActionTypes.CartItemLoadFailureAction;
|
|
308
|
+
constructor(payload: DaffStateError[], itemId: DaffCartItem['id']);
|
|
315
309
|
}
|
|
316
310
|
/**
|
|
317
311
|
* Triggers the update of a specific cart item.
|
|
318
312
|
*/
|
|
319
|
-
declare class DaffCartItemUpdate<T extends DaffCartItem = DaffCartItem> implements Action {
|
|
320
|
-
|
|
321
|
-
|
|
322
|
-
|
|
323
|
-
|
|
313
|
+
export declare class DaffCartItemUpdate<T extends DaffCartItem = DaffCartItem> implements Action {
|
|
314
|
+
itemId: T['id'];
|
|
315
|
+
changes: Partial<T>;
|
|
316
|
+
readonly type = DaffCartItemActionTypes.CartItemUpdateAction;
|
|
317
|
+
constructor(itemId: T['id'], changes: Partial<T>);
|
|
324
318
|
}
|
|
325
319
|
/**
|
|
326
320
|
* Indicates the successful update of a specific cart item.
|
|
327
321
|
*/
|
|
328
|
-
declare class DaffCartItemUpdateSuccess<T extends DaffCart = DaffCart> implements Action {
|
|
329
|
-
|
|
330
|
-
|
|
331
|
-
|
|
332
|
-
|
|
322
|
+
export declare class DaffCartItemUpdateSuccess<T extends DaffCart = DaffCart> implements Action {
|
|
323
|
+
payload: Partial<T>;
|
|
324
|
+
itemId: T['items'][number]['id'];
|
|
325
|
+
readonly type = DaffCartItemActionTypes.CartItemUpdateSuccessAction;
|
|
326
|
+
constructor(payload: Partial<T>, itemId: T['items'][number]['id']);
|
|
333
327
|
}
|
|
334
328
|
/**
|
|
335
329
|
* Indicates the failed update of a specific cart item.
|
|
336
330
|
*/
|
|
337
|
-
declare class DaffCartItemUpdateFailure implements Action {
|
|
338
|
-
|
|
339
|
-
|
|
340
|
-
|
|
341
|
-
|
|
331
|
+
export declare class DaffCartItemUpdateFailure implements Action {
|
|
332
|
+
payload: DaffStateError[];
|
|
333
|
+
itemId: DaffCartItem['id'];
|
|
334
|
+
readonly type = DaffCartItemActionTypes.CartItemUpdateFailureAction;
|
|
335
|
+
constructor(payload: DaffStateError[], itemId: DaffCartItem['id']);
|
|
342
336
|
}
|
|
343
337
|
/**
|
|
344
338
|
* Triggers the addition of a product to the cart.
|
|
345
339
|
*/
|
|
346
|
-
declare class DaffCartItemAdd<T extends DaffCartItemInput = DaffCartItemInput> implements Action {
|
|
347
|
-
|
|
348
|
-
|
|
349
|
-
|
|
350
|
-
|
|
340
|
+
export declare class DaffCartItemAdd<T extends DaffCartItemInput = DaffCartItemInput> implements Action {
|
|
341
|
+
input: T;
|
|
342
|
+
placeholderId?: string;
|
|
343
|
+
readonly type = DaffCartItemActionTypes.CartItemAddAction;
|
|
344
|
+
constructor(input: T, placeholderId?: string);
|
|
351
345
|
}
|
|
352
346
|
/**
|
|
353
347
|
* Indicates the successful addition of a product to the cart.
|
|
354
348
|
*/
|
|
355
|
-
declare class DaffCartItemAddSuccess<T extends DaffCart = DaffCart> implements DaffCartRetrievalAction<T> {
|
|
356
|
-
|
|
357
|
-
|
|
358
|
-
|
|
359
|
-
|
|
349
|
+
export declare class DaffCartItemAddSuccess<T extends DaffCart = DaffCart> implements DaffCartRetrievalAction<T> {
|
|
350
|
+
payload: Partial<T>;
|
|
351
|
+
itemId: DaffCartItem['id'];
|
|
352
|
+
readonly type = DaffCartItemActionTypes.CartItemAddSuccessAction;
|
|
353
|
+
constructor(payload: Partial<T>, itemId: DaffCartItem['id']);
|
|
360
354
|
}
|
|
361
355
|
/**
|
|
362
356
|
* Indicates the failed addition of a product to the cart.
|
|
363
357
|
*/
|
|
364
|
-
declare class DaffCartItemAddFailure implements DaffFailureAction {
|
|
365
|
-
|
|
366
|
-
|
|
367
|
-
|
|
368
|
-
|
|
358
|
+
export declare class DaffCartItemAddFailure implements DaffFailureAction {
|
|
359
|
+
payload: DaffStateError[];
|
|
360
|
+
placeholderId?: string;
|
|
361
|
+
readonly type = DaffCartItemActionTypes.CartItemAddFailureAction;
|
|
362
|
+
constructor(payload: DaffStateError[], placeholderId?: string);
|
|
369
363
|
}
|
|
370
364
|
/**
|
|
371
365
|
* Triggers the deletion of a specific cart item.
|
|
372
366
|
*/
|
|
373
|
-
declare class DaffCartItemDelete<T extends DaffCartItem = DaffCartItem> implements Action {
|
|
374
|
-
|
|
375
|
-
|
|
376
|
-
|
|
367
|
+
export declare class DaffCartItemDelete<T extends DaffCartItem = DaffCartItem> implements Action {
|
|
368
|
+
itemId: T['id'];
|
|
369
|
+
readonly type = DaffCartItemActionTypes.CartItemDeleteAction;
|
|
370
|
+
constructor(itemId: T['id']);
|
|
377
371
|
}
|
|
378
372
|
/**
|
|
379
373
|
* Indicates the successful deletion of a specific cart item.
|
|
380
374
|
*/
|
|
381
|
-
declare class DaffCartItemDeleteSuccess<T extends DaffCart = DaffCart> implements Action {
|
|
382
|
-
|
|
383
|
-
|
|
384
|
-
|
|
375
|
+
export declare class DaffCartItemDeleteSuccess<T extends DaffCart = DaffCart> implements Action {
|
|
376
|
+
payload: Partial<T>;
|
|
377
|
+
readonly type = DaffCartItemActionTypes.CartItemDeleteSuccessAction;
|
|
378
|
+
constructor(payload: Partial<T>);
|
|
385
379
|
}
|
|
386
380
|
/**
|
|
387
381
|
* Indicates the failed deletion of a specific cart item.
|
|
388
382
|
*/
|
|
389
|
-
declare class DaffCartItemDeleteFailure implements Action {
|
|
390
|
-
|
|
391
|
-
|
|
392
|
-
|
|
393
|
-
|
|
383
|
+
export declare class DaffCartItemDeleteFailure implements Action {
|
|
384
|
+
payload: DaffStateError[];
|
|
385
|
+
itemId: DaffCartItem['id'];
|
|
386
|
+
readonly type = DaffCartItemActionTypes.CartItemDeleteFailureAction;
|
|
387
|
+
constructor(payload: DaffStateError[], itemId: DaffCartItem['id']);
|
|
394
388
|
}
|
|
395
389
|
/**
|
|
396
390
|
* Triggers the deletion of all out of stock cart items.
|
|
397
391
|
*/
|
|
398
|
-
declare class DaffCartItemDeleteOutOfStock implements Action {
|
|
399
|
-
|
|
392
|
+
export declare class DaffCartItemDeleteOutOfStock implements Action {
|
|
393
|
+
readonly type = DaffCartItemActionTypes.CartItemDeleteOutOfStockAction;
|
|
400
394
|
}
|
|
401
395
|
/**
|
|
402
396
|
* Indicates the successful deletion of all out of stock cart items.
|
|
403
397
|
*/
|
|
404
|
-
declare class DaffCartItemDeleteOutOfStockSuccess<T extends DaffCart = DaffCart> implements Action {
|
|
405
|
-
|
|
406
|
-
|
|
407
|
-
|
|
398
|
+
export declare class DaffCartItemDeleteOutOfStockSuccess<T extends DaffCart = DaffCart> implements Action {
|
|
399
|
+
payload: Partial<T>;
|
|
400
|
+
readonly type = DaffCartItemActionTypes.CartItemDeleteOutOfStockSuccessAction;
|
|
401
|
+
constructor(payload: Partial<T>);
|
|
408
402
|
}
|
|
409
403
|
/**
|
|
410
404
|
* Indicates the failed deletion of all out of stock cart items.
|
|
411
405
|
*/
|
|
412
|
-
declare class DaffCartItemDeleteOutOfStockFailure implements DaffFailureAction {
|
|
413
|
-
|
|
414
|
-
|
|
415
|
-
|
|
406
|
+
export declare class DaffCartItemDeleteOutOfStockFailure implements DaffFailureAction {
|
|
407
|
+
payload: DaffStateError[];
|
|
408
|
+
readonly type = DaffCartItemActionTypes.CartItemDeleteOutOfStockFailureAction;
|
|
409
|
+
constructor(payload: DaffStateError[]);
|
|
416
410
|
}
|
|
417
411
|
/**
|
|
418
412
|
* Resets cart item "new" or "updated" states to default.
|
|
419
413
|
*/
|
|
420
|
-
declare class DaffCartItemStateReset implements Action {
|
|
421
|
-
|
|
422
|
-
|
|
423
|
-
|
|
414
|
+
export declare class DaffCartItemStateReset implements Action {
|
|
415
|
+
itemId: DaffCartItem['id'];
|
|
416
|
+
readonly type = DaffCartItemActionTypes.CartItemStateResetAction;
|
|
417
|
+
constructor(itemId: DaffCartItem['id']);
|
|
424
418
|
}
|
|
425
419
|
/**
|
|
426
420
|
* A union of all the cart item action classes.
|
|
427
421
|
*/
|
|
428
|
-
type DaffCartItemActions<T extends DaffCart = DaffCart, U extends DaffCartItemInput = DaffCartItemInput> = DaffCartItemList | DaffCartItemListSuccess<T['items'][number]> | DaffCartItemListFailure | DaffCartItemLoad<T['items'][number]> | DaffCartItemLoadSuccess<T['items'][number]> | DaffCartItemLoadFailure | DaffCartItemUpdate<T['items'][number]> | DaffCartItemUpdateSuccess<T> | DaffCartItemUpdateFailure | DaffCartItemAdd<U> | DaffCartItemAddSuccess<T> | DaffCartItemAddFailure | DaffCartItemDelete<T['items'][number]> | DaffCartItemDeleteSuccess<T> | DaffCartItemDeleteFailure | DaffCartItemDeleteOutOfStock | DaffCartItemDeleteOutOfStockSuccess<T> | DaffCartItemDeleteOutOfStockFailure | DaffCartItemStateReset;
|
|
429
|
-
|
|
422
|
+
export type DaffCartItemActions<T extends DaffCart = DaffCart, U extends DaffCartItemInput = DaffCartItemInput> = DaffCartItemList | DaffCartItemListSuccess<T['items'][number]> | DaffCartItemListFailure | DaffCartItemLoad<T['items'][number]> | DaffCartItemLoadSuccess<T['items'][number]> | DaffCartItemLoadFailure | DaffCartItemUpdate<T['items'][number]> | DaffCartItemUpdateSuccess<T> | DaffCartItemUpdateFailure | DaffCartItemAdd<U> | DaffCartItemAddSuccess<T> | DaffCartItemAddFailure | DaffCartItemDelete<T['items'][number]> | DaffCartItemDeleteSuccess<T> | DaffCartItemDeleteFailure | DaffCartItemDeleteOutOfStock | DaffCartItemDeleteOutOfStockSuccess<T> | DaffCartItemDeleteOutOfStockFailure | DaffCartItemStateReset;
|
|
430
423
|
/**
|
|
431
424
|
* An enum for the cart billing address action types.
|
|
432
425
|
*/
|
|
433
|
-
declare enum DaffCartBillingAddressActionTypes {
|
|
434
|
-
|
|
435
|
-
|
|
436
|
-
|
|
437
|
-
|
|
438
|
-
|
|
439
|
-
|
|
426
|
+
export declare enum DaffCartBillingAddressActionTypes {
|
|
427
|
+
CartBillingAddressLoadAction = "[@daffodil/cart] Billing Address Load Action",
|
|
428
|
+
CartBillingAddressLoadSuccessAction = "[@daffodil/cart] Billing Address Load Success Action",
|
|
429
|
+
CartBillingAddressLoadFailureAction = "[@daffodil/cart] Billing Address Load Failure Action",
|
|
430
|
+
CartBillingAddressUpdateAction = "[@daffodil/cart] Billing Address Update Action",
|
|
431
|
+
CartBillingAddressUpdateSuccessAction = "[@daffodil/cart] Billing Address Update Success Action",
|
|
432
|
+
CartBillingAddressUpdateFailureAction = "[@daffodil/cart] Billing Address Update Failure Action"
|
|
440
433
|
}
|
|
441
434
|
/**
|
|
442
435
|
* Triggers the load of the cart's billing address.
|
|
443
436
|
*/
|
|
444
|
-
declare class DaffCartBillingAddressLoad implements Action {
|
|
445
|
-
|
|
437
|
+
export declare class DaffCartBillingAddressLoad implements Action {
|
|
438
|
+
readonly type = DaffCartBillingAddressActionTypes.CartBillingAddressLoadAction;
|
|
446
439
|
}
|
|
447
440
|
/**
|
|
448
441
|
* Indicates the successful load of the cart's billing address.
|
|
449
442
|
*/
|
|
450
|
-
declare class DaffCartBillingAddressLoadSuccess<T extends DaffCart = DaffCart> implements Action {
|
|
451
|
-
|
|
452
|
-
|
|
453
|
-
|
|
443
|
+
export declare class DaffCartBillingAddressLoadSuccess<T extends DaffCart = DaffCart> implements Action {
|
|
444
|
+
payload: T['billing_address'];
|
|
445
|
+
readonly type = DaffCartBillingAddressActionTypes.CartBillingAddressLoadSuccessAction;
|
|
446
|
+
constructor(payload: T['billing_address']);
|
|
454
447
|
}
|
|
455
448
|
/**
|
|
456
449
|
* Indicates the failed load of the cart's billing address.
|
|
457
450
|
*/
|
|
458
|
-
declare class DaffCartBillingAddressLoadFailure implements DaffFailureAction {
|
|
459
|
-
|
|
460
|
-
|
|
461
|
-
|
|
451
|
+
export declare class DaffCartBillingAddressLoadFailure implements DaffFailureAction {
|
|
452
|
+
payload: DaffStateError[];
|
|
453
|
+
readonly type = DaffCartBillingAddressActionTypes.CartBillingAddressLoadFailureAction;
|
|
454
|
+
constructor(payload: DaffStateError[]);
|
|
462
455
|
}
|
|
463
456
|
/**
|
|
464
457
|
* Triggers the update of the cart's billing address.
|
|
465
458
|
*/
|
|
466
|
-
declare class DaffCartBillingAddressUpdate<T extends DaffCart = DaffCart> implements Action {
|
|
467
|
-
|
|
468
|
-
|
|
469
|
-
|
|
459
|
+
export declare class DaffCartBillingAddressUpdate<T extends DaffCart = DaffCart> implements Action {
|
|
460
|
+
payload: Partial<T['billing_address']>;
|
|
461
|
+
readonly type = DaffCartBillingAddressActionTypes.CartBillingAddressUpdateAction;
|
|
462
|
+
constructor(payload: Partial<T['billing_address']>);
|
|
470
463
|
}
|
|
471
464
|
/**
|
|
472
465
|
* Indicates the successful update of the cart's billing address.
|
|
473
466
|
*/
|
|
474
|
-
declare class DaffCartBillingAddressUpdateSuccess<T extends DaffCart = DaffCart> implements DaffCartRetrievalAction<T> {
|
|
475
|
-
|
|
476
|
-
|
|
477
|
-
|
|
467
|
+
export declare class DaffCartBillingAddressUpdateSuccess<T extends DaffCart = DaffCart> implements DaffCartRetrievalAction<T> {
|
|
468
|
+
payload: Partial<T>;
|
|
469
|
+
readonly type = DaffCartBillingAddressActionTypes.CartBillingAddressUpdateSuccessAction;
|
|
470
|
+
constructor(payload: Partial<T>);
|
|
478
471
|
}
|
|
479
472
|
/**
|
|
480
473
|
* Indicates the failed update of the cart's billing address.
|
|
481
474
|
*/
|
|
482
|
-
declare class DaffCartBillingAddressUpdateFailure implements DaffFailureAction {
|
|
483
|
-
|
|
484
|
-
|
|
485
|
-
|
|
475
|
+
export declare class DaffCartBillingAddressUpdateFailure implements DaffFailureAction {
|
|
476
|
+
payload: DaffStateError[];
|
|
477
|
+
readonly type = DaffCartBillingAddressActionTypes.CartBillingAddressUpdateFailureAction;
|
|
478
|
+
constructor(payload: DaffStateError[]);
|
|
486
479
|
}
|
|
487
480
|
/**
|
|
488
481
|
* A union of all the cart billing address action classes.
|
|
489
482
|
*/
|
|
490
|
-
type DaffCartBillingAddressActions<T extends DaffCart = DaffCart> = DaffCartBillingAddressLoad | DaffCartBillingAddressLoadSuccess<T> | DaffCartBillingAddressLoadFailure | DaffCartBillingAddressUpdate<T> | DaffCartBillingAddressUpdateSuccess<T> | DaffCartBillingAddressUpdateFailure;
|
|
491
|
-
|
|
483
|
+
export type DaffCartBillingAddressActions<T extends DaffCart = DaffCart> = DaffCartBillingAddressLoad | DaffCartBillingAddressLoadSuccess<T> | DaffCartBillingAddressLoadFailure | DaffCartBillingAddressUpdate<T> | DaffCartBillingAddressUpdateSuccess<T> | DaffCartBillingAddressUpdateFailure;
|
|
492
484
|
/**
|
|
493
485
|
* An enum for the cart shipping address action types.
|
|
494
486
|
*/
|
|
495
|
-
declare enum DaffCartShippingAddressActionTypes {
|
|
496
|
-
|
|
497
|
-
|
|
498
|
-
|
|
499
|
-
|
|
500
|
-
|
|
501
|
-
|
|
487
|
+
export declare enum DaffCartShippingAddressActionTypes {
|
|
488
|
+
CartShippingAddressLoadAction = "[@daffodil/cart] Shipping Address Load Action",
|
|
489
|
+
CartShippingAddressLoadSuccessAction = "[@daffodil/cart] Shipping Address Load Success Action",
|
|
490
|
+
CartShippingAddressLoadFailureAction = "[@daffodil/cart] Shipping Address Load Failure Action",
|
|
491
|
+
CartShippingAddressUpdateAction = "[@daffodil/cart] Shipping Address Update Action",
|
|
492
|
+
CartShippingAddressUpdateSuccessAction = "[@daffodil/cart] Shipping Address Update Success Action",
|
|
493
|
+
CartShippingAddressUpdateFailureAction = "[@daffodil/cart] Shipping Address Update Failure Action"
|
|
502
494
|
}
|
|
503
495
|
/**
|
|
504
496
|
* Triggers the load of the cart's shipping address.
|
|
505
497
|
*/
|
|
506
|
-
declare class DaffCartShippingAddressLoad implements Action {
|
|
507
|
-
|
|
498
|
+
export declare class DaffCartShippingAddressLoad implements Action {
|
|
499
|
+
readonly type = DaffCartShippingAddressActionTypes.CartShippingAddressLoadAction;
|
|
508
500
|
}
|
|
509
501
|
/**
|
|
510
502
|
* Indicates the successful load of the cart's shipping address.
|
|
511
503
|
*/
|
|
512
|
-
declare class DaffCartShippingAddressLoadSuccess<T extends DaffCart = DaffCart> implements Action {
|
|
513
|
-
|
|
514
|
-
|
|
515
|
-
|
|
504
|
+
export declare class DaffCartShippingAddressLoadSuccess<T extends DaffCart = DaffCart> implements Action {
|
|
505
|
+
payload: T['shipping_address'];
|
|
506
|
+
readonly type = DaffCartShippingAddressActionTypes.CartShippingAddressLoadSuccessAction;
|
|
507
|
+
constructor(payload: T['shipping_address']);
|
|
516
508
|
}
|
|
517
509
|
/**
|
|
518
510
|
* Indicates the failed load of the cart's shipping address.
|
|
519
511
|
*/
|
|
520
|
-
declare class DaffCartShippingAddressLoadFailure implements DaffFailureAction {
|
|
521
|
-
|
|
522
|
-
|
|
523
|
-
|
|
512
|
+
export declare class DaffCartShippingAddressLoadFailure implements DaffFailureAction {
|
|
513
|
+
payload: DaffStateError[];
|
|
514
|
+
readonly type = DaffCartShippingAddressActionTypes.CartShippingAddressLoadFailureAction;
|
|
515
|
+
constructor(payload: DaffStateError[]);
|
|
524
516
|
}
|
|
525
517
|
/**
|
|
526
518
|
* Triggers the update of the cart's shipping address.
|
|
527
519
|
*/
|
|
528
|
-
declare class DaffCartShippingAddressUpdate<T extends DaffCart = DaffCart> implements Action {
|
|
529
|
-
|
|
530
|
-
|
|
531
|
-
|
|
520
|
+
export declare class DaffCartShippingAddressUpdate<T extends DaffCart = DaffCart> implements Action {
|
|
521
|
+
payload: Partial<T['shipping_address']>;
|
|
522
|
+
readonly type = DaffCartShippingAddressActionTypes.CartShippingAddressUpdateAction;
|
|
523
|
+
constructor(payload: Partial<T['shipping_address']>);
|
|
532
524
|
}
|
|
533
525
|
/**
|
|
534
526
|
* Indicates the successful update of the cart's shipping address.
|
|
535
527
|
*/
|
|
536
|
-
declare class DaffCartShippingAddressUpdateSuccess<T extends DaffCart = DaffCart> implements DaffCartRetrievalAction<T> {
|
|
537
|
-
|
|
538
|
-
|
|
539
|
-
|
|
528
|
+
export declare class DaffCartShippingAddressUpdateSuccess<T extends DaffCart = DaffCart> implements DaffCartRetrievalAction<T> {
|
|
529
|
+
payload: Partial<T>;
|
|
530
|
+
readonly type = DaffCartShippingAddressActionTypes.CartShippingAddressUpdateSuccessAction;
|
|
531
|
+
constructor(payload: Partial<T>);
|
|
540
532
|
}
|
|
541
533
|
/**
|
|
542
534
|
* Indicates the failed update of the cart's shipping address.
|
|
543
535
|
*/
|
|
544
|
-
declare class DaffCartShippingAddressUpdateFailure implements DaffFailureAction {
|
|
545
|
-
|
|
546
|
-
|
|
547
|
-
|
|
536
|
+
export declare class DaffCartShippingAddressUpdateFailure implements DaffFailureAction {
|
|
537
|
+
payload: DaffStateError[];
|
|
538
|
+
readonly type = DaffCartShippingAddressActionTypes.CartShippingAddressUpdateFailureAction;
|
|
539
|
+
constructor(payload: DaffStateError[]);
|
|
548
540
|
}
|
|
549
541
|
/**
|
|
550
542
|
* A union of all the cart shipping address action classes.
|
|
551
543
|
*/
|
|
552
|
-
type DaffCartShippingAddressActions<T extends DaffCart = DaffCart> = DaffCartShippingAddressLoad | DaffCartShippingAddressLoadSuccess<T> | DaffCartShippingAddressLoadFailure | DaffCartShippingAddressUpdate<T> | DaffCartShippingAddressUpdateSuccess<T> | DaffCartShippingAddressUpdateFailure;
|
|
553
|
-
|
|
544
|
+
export type DaffCartShippingAddressActions<T extends DaffCart = DaffCart> = DaffCartShippingAddressLoad | DaffCartShippingAddressLoadSuccess<T> | DaffCartShippingAddressLoadFailure | DaffCartShippingAddressUpdate<T> | DaffCartShippingAddressUpdateSuccess<T> | DaffCartShippingAddressUpdateFailure;
|
|
554
545
|
/**
|
|
555
546
|
* An enum for the cart address action types.
|
|
556
547
|
*/
|
|
557
|
-
declare enum DaffCartAddressActionTypes {
|
|
558
|
-
|
|
559
|
-
|
|
560
|
-
|
|
548
|
+
export declare enum DaffCartAddressActionTypes {
|
|
549
|
+
CartAddressUpdateAction = "[@daffodil/cart] Cart Address Update Action",
|
|
550
|
+
CartAddressUpdateSuccessAction = "[@daffodil/cart] Cart Address Update Success Action",
|
|
551
|
+
CartAddressUpdateFailureAction = "[@daffodil/cart] Cart Address Update Failure Action"
|
|
561
552
|
}
|
|
562
553
|
/**
|
|
563
554
|
* Triggers the update of both the shipping and billing address of the cart.
|
|
564
555
|
*/
|
|
565
|
-
declare class DaffCartAddressUpdate<T extends DaffCartAddress = DaffCartAddress> implements Action {
|
|
566
|
-
|
|
567
|
-
|
|
568
|
-
|
|
556
|
+
export declare class DaffCartAddressUpdate<T extends DaffCartAddress = DaffCartAddress> implements Action {
|
|
557
|
+
payload: Partial<T>;
|
|
558
|
+
readonly type = DaffCartAddressActionTypes.CartAddressUpdateAction;
|
|
559
|
+
constructor(payload: Partial<T>);
|
|
569
560
|
}
|
|
570
561
|
/**
|
|
571
562
|
* Indicates the successful update of both the shipping and billing address of the cart.
|
|
572
563
|
*/
|
|
573
|
-
declare class DaffCartAddressUpdateSuccess<T extends DaffCart = DaffCart> implements DaffCartRetrievalAction<T> {
|
|
574
|
-
|
|
575
|
-
|
|
576
|
-
|
|
564
|
+
export declare class DaffCartAddressUpdateSuccess<T extends DaffCart = DaffCart> implements DaffCartRetrievalAction<T> {
|
|
565
|
+
payload: Partial<T>;
|
|
566
|
+
readonly type = DaffCartAddressActionTypes.CartAddressUpdateSuccessAction;
|
|
567
|
+
constructor(payload: Partial<T>);
|
|
577
568
|
}
|
|
578
569
|
/**
|
|
579
570
|
* Indicates the failed update of either the shipping or billing address of the cart.
|
|
580
571
|
*/
|
|
581
|
-
declare class DaffCartAddressUpdateFailure implements DaffFailureAction {
|
|
582
|
-
|
|
583
|
-
|
|
584
|
-
|
|
572
|
+
export declare class DaffCartAddressUpdateFailure implements DaffFailureAction {
|
|
573
|
+
payload: DaffStateError[];
|
|
574
|
+
readonly type = DaffCartAddressActionTypes.CartAddressUpdateFailureAction;
|
|
575
|
+
constructor(payload: DaffStateError[]);
|
|
585
576
|
}
|
|
586
577
|
/**
|
|
587
578
|
* A union of all the cart address action classes.
|
|
588
579
|
*/
|
|
589
|
-
type DaffCartAddressActions<T extends DaffCart = DaffCart> = DaffCartAddressUpdate<T['shipping_address'] | T['billing_address']> | DaffCartAddressUpdateSuccess<T> | DaffCartAddressUpdateFailure;
|
|
590
|
-
|
|
580
|
+
export type DaffCartAddressActions<T extends DaffCart = DaffCart> = DaffCartAddressUpdate<T['shipping_address'] | T['billing_address']> | DaffCartAddressUpdateSuccess<T> | DaffCartAddressUpdateFailure;
|
|
591
581
|
/**
|
|
592
582
|
* An enum for the cart shipping information action types.
|
|
593
583
|
*/
|
|
594
|
-
declare enum DaffCartShippingInformationActionTypes {
|
|
595
|
-
|
|
596
|
-
|
|
597
|
-
|
|
598
|
-
|
|
599
|
-
|
|
600
|
-
|
|
601
|
-
|
|
602
|
-
|
|
603
|
-
|
|
584
|
+
export declare enum DaffCartShippingInformationActionTypes {
|
|
585
|
+
CartShippingInformationLoadAction = "[@daffodil/cart] Shipping Information Load Action",
|
|
586
|
+
CartShippingInformationLoadSuccessAction = "[@daffodil/cart] Shipping Information Load Success Action",
|
|
587
|
+
CartShippingInformationLoadFailureAction = "[@daffodil/cart] Shipping Information Load Failure Action",
|
|
588
|
+
CartShippingInformationUpdateAction = "[@daffodil/cart] Shipping Information Update Action",
|
|
589
|
+
CartShippingInformationUpdateSuccessAction = "[@daffodil/cart] Shipping Information Update Success Action",
|
|
590
|
+
CartShippingInformationUpdateFailureAction = "[@daffodil/cart] Shipping Information Update Failure Action",
|
|
591
|
+
CartShippingInformationDeleteAction = "[@daffodil/cart] Shipping Information Remove Action",
|
|
592
|
+
CartShippingInformationDeleteSuccessAction = "[@daffodil/cart] Shipping Information Remove Success Action",
|
|
593
|
+
CartShippingInformationDeleteFailureAction = "[@daffodil/cart] Shipping Information Remove Failure Action"
|
|
604
594
|
}
|
|
605
595
|
/**
|
|
606
596
|
* Triggers the load of the cart's shipping information.
|
|
607
597
|
*/
|
|
608
|
-
declare class DaffCartShippingInformationLoad implements Action {
|
|
609
|
-
|
|
598
|
+
export declare class DaffCartShippingInformationLoad implements Action {
|
|
599
|
+
readonly type = DaffCartShippingInformationActionTypes.CartShippingInformationLoadAction;
|
|
610
600
|
}
|
|
611
601
|
/**
|
|
612
602
|
* Indicates the successful load of the cart's shipping information.
|
|
613
603
|
*/
|
|
614
|
-
declare class DaffCartShippingInformationLoadSuccess<T extends DaffCartShippingRate = DaffCartShippingRate> implements Action {
|
|
615
|
-
|
|
616
|
-
|
|
617
|
-
|
|
604
|
+
export declare class DaffCartShippingInformationLoadSuccess<T extends DaffCartShippingRate = DaffCartShippingRate> implements Action {
|
|
605
|
+
payload: T;
|
|
606
|
+
readonly type = DaffCartShippingInformationActionTypes.CartShippingInformationLoadSuccessAction;
|
|
607
|
+
constructor(payload: T);
|
|
618
608
|
}
|
|
619
609
|
/**
|
|
620
610
|
* Indicates the failed load of the cart's shipping information.
|
|
621
611
|
*/
|
|
622
|
-
declare class DaffCartShippingInformationLoadFailure implements DaffFailureAction {
|
|
623
|
-
|
|
624
|
-
|
|
625
|
-
|
|
612
|
+
export declare class DaffCartShippingInformationLoadFailure implements DaffFailureAction {
|
|
613
|
+
payload: DaffStateError[];
|
|
614
|
+
readonly type = DaffCartShippingInformationActionTypes.CartShippingInformationLoadFailureAction;
|
|
615
|
+
constructor(payload: DaffStateError[]);
|
|
626
616
|
}
|
|
627
617
|
/**
|
|
628
618
|
* Triggers the update of the cart's shipping information.
|
|
629
619
|
*/
|
|
630
|
-
declare class DaffCartShippingInformationUpdate<T extends DaffCartShippingRate = DaffCartShippingRate> implements Action {
|
|
631
|
-
|
|
632
|
-
|
|
633
|
-
|
|
620
|
+
export declare class DaffCartShippingInformationUpdate<T extends DaffCartShippingRate = DaffCartShippingRate> implements Action {
|
|
621
|
+
payload: Partial<T>;
|
|
622
|
+
readonly type = DaffCartShippingInformationActionTypes.CartShippingInformationUpdateAction;
|
|
623
|
+
constructor(payload: Partial<T>);
|
|
634
624
|
}
|
|
635
625
|
/**
|
|
636
626
|
* Indicates the successful update of the cart's shipping information.
|
|
637
627
|
*/
|
|
638
|
-
declare class DaffCartShippingInformationUpdateSuccess<T extends DaffCart = DaffCart> implements DaffCartRetrievalAction<T> {
|
|
639
|
-
|
|
640
|
-
|
|
641
|
-
|
|
628
|
+
export declare class DaffCartShippingInformationUpdateSuccess<T extends DaffCart = DaffCart> implements DaffCartRetrievalAction<T> {
|
|
629
|
+
payload: Partial<T>;
|
|
630
|
+
readonly type = DaffCartShippingInformationActionTypes.CartShippingInformationUpdateSuccessAction;
|
|
631
|
+
constructor(payload: Partial<T>);
|
|
642
632
|
}
|
|
643
633
|
/**
|
|
644
634
|
* Indicates the failed update of the cart's shipping information.
|
|
645
635
|
*/
|
|
646
|
-
declare class DaffCartShippingInformationUpdateFailure implements DaffFailureAction {
|
|
647
|
-
|
|
648
|
-
|
|
649
|
-
|
|
636
|
+
export declare class DaffCartShippingInformationUpdateFailure implements DaffFailureAction {
|
|
637
|
+
payload: DaffStateError[];
|
|
638
|
+
readonly type = DaffCartShippingInformationActionTypes.CartShippingInformationUpdateFailureAction;
|
|
639
|
+
constructor(payload: DaffStateError[]);
|
|
650
640
|
}
|
|
651
641
|
/**
|
|
652
642
|
* Triggers the deletion of the cart's shipping information.
|
|
653
643
|
*/
|
|
654
|
-
declare class DaffCartShippingInformationDelete implements Action {
|
|
655
|
-
|
|
656
|
-
|
|
657
|
-
|
|
644
|
+
export declare class DaffCartShippingInformationDelete implements Action {
|
|
645
|
+
id?: DaffCartShippingRate['id'];
|
|
646
|
+
readonly type = DaffCartShippingInformationActionTypes.CartShippingInformationDeleteAction;
|
|
647
|
+
constructor(id?: DaffCartShippingRate['id']);
|
|
658
648
|
}
|
|
659
|
-
declare class DaffCartShippingInformationDeleteSuccess<T extends DaffCart = DaffCart> implements DaffCartRetrievalAction<T> {
|
|
660
|
-
|
|
661
|
-
|
|
662
|
-
|
|
649
|
+
export declare class DaffCartShippingInformationDeleteSuccess<T extends DaffCart = DaffCart> implements DaffCartRetrievalAction<T> {
|
|
650
|
+
payload: Partial<T>;
|
|
651
|
+
readonly type = DaffCartShippingInformationActionTypes.CartShippingInformationDeleteSuccessAction;
|
|
652
|
+
constructor(payload: Partial<T>);
|
|
663
653
|
}
|
|
664
|
-
declare class DaffCartShippingInformationDeleteFailure implements DaffFailureAction {
|
|
665
|
-
|
|
666
|
-
|
|
667
|
-
|
|
654
|
+
export declare class DaffCartShippingInformationDeleteFailure implements DaffFailureAction {
|
|
655
|
+
payload: DaffStateError[];
|
|
656
|
+
readonly type = DaffCartShippingInformationActionTypes.CartShippingInformationDeleteFailureAction;
|
|
657
|
+
constructor(payload: DaffStateError[]);
|
|
668
658
|
}
|
|
669
659
|
/**
|
|
670
660
|
* A union of all the cart shipping information action classes.
|
|
671
661
|
*/
|
|
672
|
-
type DaffCartShippingInformationActions<T extends DaffCart = DaffCart> = DaffCartShippingInformationLoad | DaffCartShippingInformationLoadSuccess<T['shipping_information']> | DaffCartShippingInformationLoadFailure | DaffCartShippingInformationUpdate<T['shipping_information']> | DaffCartShippingInformationUpdateSuccess<T> | DaffCartShippingInformationUpdateFailure | DaffCartShippingInformationDelete | DaffCartShippingInformationDeleteSuccess<T> | DaffCartShippingInformationDeleteFailure;
|
|
673
|
-
|
|
662
|
+
export type DaffCartShippingInformationActions<T extends DaffCart = DaffCart> = DaffCartShippingInformationLoad | DaffCartShippingInformationLoadSuccess<T['shipping_information']> | DaffCartShippingInformationLoadFailure | DaffCartShippingInformationUpdate<T['shipping_information']> | DaffCartShippingInformationUpdateSuccess<T> | DaffCartShippingInformationUpdateFailure | DaffCartShippingInformationDelete | DaffCartShippingInformationDeleteSuccess<T> | DaffCartShippingInformationDeleteFailure;
|
|
674
663
|
/**
|
|
675
664
|
* An enum for the cart shipping methods action types.
|
|
676
665
|
*/
|
|
677
|
-
declare enum DaffCartShippingMethodsActionTypes {
|
|
678
|
-
|
|
679
|
-
|
|
680
|
-
|
|
666
|
+
export declare enum DaffCartShippingMethodsActionTypes {
|
|
667
|
+
CartShippingMethodsLoadAction = "[@daffodil/cart] Shipping Methods Load Action",
|
|
668
|
+
CartShippingMethodsLoadSuccessAction = "[@daffodil/cart] Shipping Methods Load Success Action",
|
|
669
|
+
CartShippingMethodsLoadFailureAction = "[@daffodil/cart] Shipping Methods Load Failure Action"
|
|
681
670
|
}
|
|
682
671
|
/**
|
|
683
672
|
* Triggers the load of the cart's available shipping methods.
|
|
684
673
|
*/
|
|
685
|
-
declare class DaffCartShippingMethodsLoad implements Action {
|
|
686
|
-
|
|
687
|
-
|
|
674
|
+
export declare class DaffCartShippingMethodsLoad implements Action {
|
|
675
|
+
readonly type = DaffCartShippingMethodsActionTypes.CartShippingMethodsLoadAction;
|
|
676
|
+
constructor();
|
|
688
677
|
}
|
|
689
|
-
declare class DaffCartShippingMethodsLoadSuccess<T extends DaffCartShippingRate = DaffCartShippingRate> implements Action {
|
|
690
|
-
|
|
691
|
-
|
|
692
|
-
|
|
678
|
+
export declare class DaffCartShippingMethodsLoadSuccess<T extends DaffCartShippingRate = DaffCartShippingRate> implements Action {
|
|
679
|
+
payload: T[];
|
|
680
|
+
readonly type = DaffCartShippingMethodsActionTypes.CartShippingMethodsLoadSuccessAction;
|
|
681
|
+
constructor(payload: T[]);
|
|
693
682
|
}
|
|
694
|
-
declare class DaffCartShippingMethodsLoadFailure implements DaffFailureAction {
|
|
695
|
-
|
|
696
|
-
|
|
697
|
-
|
|
683
|
+
export declare class DaffCartShippingMethodsLoadFailure implements DaffFailureAction {
|
|
684
|
+
payload: DaffStateError[];
|
|
685
|
+
readonly type = DaffCartShippingMethodsActionTypes.CartShippingMethodsLoadFailureAction;
|
|
686
|
+
constructor(payload: DaffStateError[]);
|
|
698
687
|
}
|
|
699
688
|
/**
|
|
700
689
|
* A union of all the cart shipping methods action classes.
|
|
701
690
|
*/
|
|
702
|
-
type DaffCartShippingMethodsActions<T extends DaffCartShippingRate = DaffCartShippingRate> = DaffCartShippingMethodsLoad | DaffCartShippingMethodsLoadSuccess<T> | DaffCartShippingMethodsLoadFailure;
|
|
703
|
-
|
|
691
|
+
export type DaffCartShippingMethodsActions<T extends DaffCartShippingRate = DaffCartShippingRate> = DaffCartShippingMethodsLoad | DaffCartShippingMethodsLoadSuccess<T> | DaffCartShippingMethodsLoadFailure;
|
|
704
692
|
/**
|
|
705
693
|
* An enum for the cart payment action types.
|
|
706
694
|
*/
|
|
707
|
-
declare enum DaffCartPaymentActionTypes {
|
|
708
|
-
|
|
709
|
-
|
|
710
|
-
|
|
711
|
-
|
|
712
|
-
|
|
713
|
-
|
|
714
|
-
|
|
715
|
-
|
|
716
|
-
|
|
717
|
-
|
|
718
|
-
|
|
719
|
-
|
|
720
|
-
|
|
695
|
+
export declare enum DaffCartPaymentActionTypes {
|
|
696
|
+
CartPaymentLoadAction = "[@daffodil/cart] Payment Load Action",
|
|
697
|
+
CartPaymentLoadSuccessAction = "[@daffodil/cart] Payment Load Success Action",
|
|
698
|
+
CartPaymentLoadFailureAction = "[@daffodil/cart] Payment Load Failure Action",
|
|
699
|
+
CartPaymentUpdateAction = "[@daffodil/cart] Payment Update Action",
|
|
700
|
+
CartPaymentUpdateSuccessAction = "[@daffodil/cart] Payment Update Success Action",
|
|
701
|
+
CartPaymentUpdateFailureAction = "[@daffodil/cart] Payment Update Failure Action",
|
|
702
|
+
CartPaymentUpdateWithBillingAction = "[@daffodil/cart] Payment Update With Billing Action",
|
|
703
|
+
CartPaymentUpdateWithBillingSuccessAction = "[@daffodil/cart] Payment Update With Billing Success Action",
|
|
704
|
+
CartPaymentUpdateWithBillingFailureAction = "[@daffodil/cart] Payment Update With Billing Failure Action",
|
|
705
|
+
CartPaymentRemoveAction = "[@daffodil/cart] Payment Remove Action",
|
|
706
|
+
CartPaymentRemoveSuccessAction = "[@daffodil/cart] Payment Remove Success Action",
|
|
707
|
+
CartPaymentRemoveFailureAction = "[@daffodil/cart] Payment Remove Failure Action",
|
|
708
|
+
CartPaymentMethodAddAction = "[@daffodil/cart] Payment Method Add Action"
|
|
721
709
|
}
|
|
722
710
|
/**
|
|
723
711
|
* Triggers the load of the cart's selected payment method.
|
|
724
712
|
*/
|
|
725
|
-
declare class DaffCartPaymentLoad implements Action {
|
|
726
|
-
|
|
713
|
+
export declare class DaffCartPaymentLoad implements Action {
|
|
714
|
+
readonly type = DaffCartPaymentActionTypes.CartPaymentLoadAction;
|
|
727
715
|
}
|
|
728
716
|
/**
|
|
729
717
|
* Indicates the successful load of the cart's selected payment method.
|
|
730
718
|
*/
|
|
731
|
-
declare class DaffCartPaymentLoadSuccess<T extends DaffCart = DaffCart> implements Action {
|
|
732
|
-
|
|
733
|
-
|
|
734
|
-
|
|
719
|
+
export declare class DaffCartPaymentLoadSuccess<T extends DaffCart = DaffCart> implements Action {
|
|
720
|
+
payload: T['payment'];
|
|
721
|
+
readonly type = DaffCartPaymentActionTypes.CartPaymentLoadSuccessAction;
|
|
722
|
+
constructor(payload: T['payment']);
|
|
735
723
|
}
|
|
736
724
|
/**
|
|
737
725
|
* Indicates the failed load of the cart's selected payment method.
|
|
738
726
|
*/
|
|
739
|
-
declare class DaffCartPaymentLoadFailure implements DaffFailureAction {
|
|
740
|
-
|
|
741
|
-
|
|
742
|
-
|
|
727
|
+
export declare class DaffCartPaymentLoadFailure implements DaffFailureAction {
|
|
728
|
+
payload: DaffStateError[];
|
|
729
|
+
readonly type = DaffCartPaymentActionTypes.CartPaymentLoadFailureAction;
|
|
730
|
+
constructor(payload: DaffStateError[]);
|
|
743
731
|
}
|
|
744
732
|
/**
|
|
745
733
|
* Triggers the update of the cart's selected payment method.
|
|
746
734
|
*/
|
|
747
|
-
declare class DaffCartPaymentUpdate<T extends DaffCart = DaffCart> implements Action {
|
|
748
|
-
|
|
749
|
-
|
|
750
|
-
|
|
735
|
+
export declare class DaffCartPaymentUpdate<T extends DaffCart = DaffCart> implements Action {
|
|
736
|
+
payload: Partial<T['payment']>;
|
|
737
|
+
readonly type = DaffCartPaymentActionTypes.CartPaymentUpdateAction;
|
|
738
|
+
constructor(payload: Partial<T['payment']>);
|
|
751
739
|
}
|
|
752
740
|
/**
|
|
753
741
|
* Indicates the successful update of the cart's selected payment method.
|
|
754
742
|
*/
|
|
755
|
-
declare class DaffCartPaymentUpdateSuccess<T extends DaffCart = DaffCart> implements DaffCartRetrievalAction<T> {
|
|
756
|
-
|
|
757
|
-
|
|
758
|
-
|
|
743
|
+
export declare class DaffCartPaymentUpdateSuccess<T extends DaffCart = DaffCart> implements DaffCartRetrievalAction<T> {
|
|
744
|
+
payload: Partial<T>;
|
|
745
|
+
readonly type = DaffCartPaymentActionTypes.CartPaymentUpdateSuccessAction;
|
|
746
|
+
constructor(payload: Partial<T>);
|
|
759
747
|
}
|
|
760
748
|
/**
|
|
761
749
|
* Indicates the failed update of the cart's selected payment method.
|
|
762
750
|
*/
|
|
763
|
-
declare class DaffCartPaymentUpdateFailure implements DaffFailureAction {
|
|
764
|
-
|
|
765
|
-
|
|
766
|
-
|
|
751
|
+
export declare class DaffCartPaymentUpdateFailure implements DaffFailureAction {
|
|
752
|
+
payload: DaffStateError[];
|
|
753
|
+
readonly type = DaffCartPaymentActionTypes.CartPaymentUpdateFailureAction;
|
|
754
|
+
constructor(payload: DaffStateError[]);
|
|
767
755
|
}
|
|
768
756
|
/**
|
|
769
757
|
* Triggers an update of the cart's selected payment method and billing address.
|
|
@@ -771,51 +759,51 @@ declare class DaffCartPaymentUpdateFailure implements DaffFailureAction {
|
|
|
771
759
|
* @param payment The payment method.
|
|
772
760
|
* @param address The billing address.
|
|
773
761
|
*/
|
|
774
|
-
declare class DaffCartPaymentUpdateWithBilling<T extends DaffCart = DaffCart> implements Action {
|
|
775
|
-
|
|
776
|
-
|
|
777
|
-
|
|
778
|
-
|
|
762
|
+
export declare class DaffCartPaymentUpdateWithBilling<T extends DaffCart = DaffCart> implements Action {
|
|
763
|
+
payment: Partial<T['payment']>;
|
|
764
|
+
address: Partial<T['billing_address']>;
|
|
765
|
+
readonly type = DaffCartPaymentActionTypes.CartPaymentUpdateWithBillingAction;
|
|
766
|
+
constructor(payment: Partial<T['payment']>, address: Partial<T['billing_address']>);
|
|
779
767
|
}
|
|
780
768
|
/**
|
|
781
769
|
* Indicates the success of an update of the cart's selected payment method and billing address.
|
|
782
770
|
*
|
|
783
771
|
* @param payload The updated cart.
|
|
784
772
|
*/
|
|
785
|
-
declare class DaffCartPaymentUpdateWithBillingSuccess<T extends DaffCart = DaffCart> implements DaffCartRetrievalAction<T> {
|
|
786
|
-
|
|
787
|
-
|
|
788
|
-
|
|
773
|
+
export declare class DaffCartPaymentUpdateWithBillingSuccess<T extends DaffCart = DaffCart> implements DaffCartRetrievalAction<T> {
|
|
774
|
+
payload: Partial<T>;
|
|
775
|
+
readonly type = DaffCartPaymentActionTypes.CartPaymentUpdateWithBillingSuccessAction;
|
|
776
|
+
constructor(payload: Partial<T>);
|
|
789
777
|
}
|
|
790
778
|
/**
|
|
791
779
|
* Indicates the failure of an update of the cart's selected payment method and billing address.
|
|
792
780
|
*
|
|
793
781
|
* @param payload The error message.
|
|
794
782
|
*/
|
|
795
|
-
declare class DaffCartPaymentUpdateWithBillingFailure implements DaffFailureAction {
|
|
796
|
-
|
|
797
|
-
|
|
798
|
-
|
|
783
|
+
export declare class DaffCartPaymentUpdateWithBillingFailure implements DaffFailureAction {
|
|
784
|
+
payload: DaffStateError[];
|
|
785
|
+
readonly type = DaffCartPaymentActionTypes.CartPaymentUpdateWithBillingFailureAction;
|
|
786
|
+
constructor(payload: DaffStateError[]);
|
|
799
787
|
}
|
|
800
788
|
/**
|
|
801
789
|
* Triggers the removal of the cart's selected payment method.
|
|
802
790
|
*/
|
|
803
|
-
declare class DaffCartPaymentRemove implements Action {
|
|
804
|
-
|
|
791
|
+
export declare class DaffCartPaymentRemove implements Action {
|
|
792
|
+
readonly type = DaffCartPaymentActionTypes.CartPaymentRemoveAction;
|
|
805
793
|
}
|
|
806
794
|
/**
|
|
807
795
|
* Indicates the successful removal of the cart's selected payment method.
|
|
808
796
|
*/
|
|
809
|
-
declare class DaffCartPaymentRemoveSuccess implements Action {
|
|
810
|
-
|
|
797
|
+
export declare class DaffCartPaymentRemoveSuccess implements Action {
|
|
798
|
+
readonly type = DaffCartPaymentActionTypes.CartPaymentRemoveSuccessAction;
|
|
811
799
|
}
|
|
812
800
|
/**
|
|
813
801
|
* Indicates the failed removal of the cart's selected payment method.
|
|
814
802
|
*/
|
|
815
|
-
declare class DaffCartPaymentRemoveFailure implements DaffFailureAction {
|
|
816
|
-
|
|
817
|
-
|
|
818
|
-
|
|
803
|
+
export declare class DaffCartPaymentRemoveFailure implements DaffFailureAction {
|
|
804
|
+
payload: DaffStateError[];
|
|
805
|
+
readonly type = DaffCartPaymentActionTypes.CartPaymentRemoveFailureAction;
|
|
806
|
+
constructor(payload: DaffStateError[]);
|
|
819
807
|
}
|
|
820
808
|
/**
|
|
821
809
|
* This action is temporary until custom reducers can be injected by the @daffodil/paymentSource modules. Right now,
|
|
@@ -823,226 +811,221 @@ declare class DaffCartPaymentRemoveFailure implements DaffFailureAction {
|
|
|
823
811
|
*
|
|
824
812
|
* todo: remove when possible.
|
|
825
813
|
*/
|
|
826
|
-
declare class DaffCartPaymentMethodAdd<T extends DaffCart = DaffCart> implements Action {
|
|
827
|
-
|
|
828
|
-
|
|
829
|
-
|
|
814
|
+
export declare class DaffCartPaymentMethodAdd<T extends DaffCart = DaffCart> implements Action {
|
|
815
|
+
payload: T['payment'];
|
|
816
|
+
readonly type = DaffCartPaymentActionTypes.CartPaymentMethodAddAction;
|
|
817
|
+
constructor(payload: T['payment']);
|
|
830
818
|
}
|
|
831
819
|
/**
|
|
832
820
|
* A union of all the cart payment action classes.
|
|
833
821
|
*/
|
|
834
|
-
type DaffCartPaymentActions<T extends DaffCart = DaffCart> = DaffCartPaymentLoad | DaffCartPaymentLoadSuccess<T> | DaffCartPaymentLoadFailure | DaffCartPaymentUpdate<T> | DaffCartPaymentUpdateSuccess<T> | DaffCartPaymentUpdateFailure | DaffCartPaymentUpdateWithBilling<T> | DaffCartPaymentUpdateWithBillingSuccess<T> | DaffCartPaymentUpdateWithBillingFailure | DaffCartPaymentRemove | DaffCartPaymentRemoveSuccess | DaffCartPaymentRemoveFailure | DaffCartPaymentMethodAdd<T>;
|
|
835
|
-
|
|
822
|
+
export type DaffCartPaymentActions<T extends DaffCart = DaffCart> = DaffCartPaymentLoad | DaffCartPaymentLoadSuccess<T> | DaffCartPaymentLoadFailure | DaffCartPaymentUpdate<T> | DaffCartPaymentUpdateSuccess<T> | DaffCartPaymentUpdateFailure | DaffCartPaymentUpdateWithBilling<T> | DaffCartPaymentUpdateWithBillingSuccess<T> | DaffCartPaymentUpdateWithBillingFailure | DaffCartPaymentRemove | DaffCartPaymentRemoveSuccess | DaffCartPaymentRemoveFailure | DaffCartPaymentMethodAdd<T>;
|
|
836
823
|
/**
|
|
837
824
|
* An enum for the cart payment methods action types.
|
|
838
825
|
*/
|
|
839
|
-
declare enum DaffCartPaymentMethodsActionTypes {
|
|
840
|
-
|
|
841
|
-
|
|
842
|
-
|
|
826
|
+
export declare enum DaffCartPaymentMethodsActionTypes {
|
|
827
|
+
CartPaymentMethodsLoadAction = "[@daffodil/cart] Payment Methods Load Action",
|
|
828
|
+
CartPaymentMethodsLoadSuccessAction = "[@daffodil/cart] Payment Methods Load Success Action",
|
|
829
|
+
CartPaymentMethodsLoadFailureAction = "[@daffodil/cart] Payment Methods Load Failure Action"
|
|
843
830
|
}
|
|
844
831
|
/**
|
|
845
832
|
* Triggers the load of the cart's available payment methods.
|
|
846
833
|
*/
|
|
847
|
-
declare class DaffCartPaymentMethodsLoad implements Action {
|
|
848
|
-
|
|
849
|
-
|
|
834
|
+
export declare class DaffCartPaymentMethodsLoad implements Action {
|
|
835
|
+
readonly type = DaffCartPaymentMethodsActionTypes.CartPaymentMethodsLoadAction;
|
|
836
|
+
constructor();
|
|
850
837
|
}
|
|
851
838
|
/**
|
|
852
839
|
* Indicates the successful load of the cart's available payment methods.
|
|
853
840
|
*/
|
|
854
|
-
declare class DaffCartPaymentMethodsLoadSuccess<T extends DaffCartPaymentMethod = DaffCartPaymentMethod> implements Action {
|
|
855
|
-
|
|
856
|
-
|
|
857
|
-
|
|
841
|
+
export declare class DaffCartPaymentMethodsLoadSuccess<T extends DaffCartPaymentMethod = DaffCartPaymentMethod> implements Action {
|
|
842
|
+
payload: T[];
|
|
843
|
+
readonly type = DaffCartPaymentMethodsActionTypes.CartPaymentMethodsLoadSuccessAction;
|
|
844
|
+
constructor(payload: T[]);
|
|
858
845
|
}
|
|
859
846
|
/**
|
|
860
847
|
* Indicates the failed load of the cart's available payment methods.
|
|
861
848
|
*/
|
|
862
|
-
declare class DaffCartPaymentMethodsLoadFailure implements DaffFailureAction {
|
|
863
|
-
|
|
864
|
-
|
|
865
|
-
|
|
849
|
+
export declare class DaffCartPaymentMethodsLoadFailure implements DaffFailureAction {
|
|
850
|
+
payload: DaffStateError[];
|
|
851
|
+
readonly type = DaffCartPaymentMethodsActionTypes.CartPaymentMethodsLoadFailureAction;
|
|
852
|
+
constructor(payload: DaffStateError[]);
|
|
866
853
|
}
|
|
867
854
|
/**
|
|
868
855
|
* A union of all the cart payment methods action classes.
|
|
869
856
|
*/
|
|
870
|
-
type DaffCartPaymentMethodsActions<T extends DaffCartPaymentMethod = DaffCartPaymentMethod> = DaffCartPaymentMethodsLoad | DaffCartPaymentMethodsLoadSuccess<T> | DaffCartPaymentMethodsLoadFailure;
|
|
871
|
-
|
|
857
|
+
export type DaffCartPaymentMethodsActions<T extends DaffCartPaymentMethod = DaffCartPaymentMethod> = DaffCartPaymentMethodsLoad | DaffCartPaymentMethodsLoadSuccess<T> | DaffCartPaymentMethodsLoadFailure;
|
|
872
858
|
/**
|
|
873
859
|
* An enum for the cart order action types.
|
|
874
860
|
*/
|
|
875
|
-
declare enum DaffCartOrderActionTypes {
|
|
876
|
-
|
|
877
|
-
|
|
878
|
-
|
|
879
|
-
|
|
861
|
+
export declare enum DaffCartOrderActionTypes {
|
|
862
|
+
CartPlaceOrderAction = "[@daffodil/cart] Cart Place Order Action",
|
|
863
|
+
CartPlaceOrderSuccessAction = "[@daffodil/cart] Cart Place Order Success Action",
|
|
864
|
+
CartPlaceOrderFailureAction = "[@daffodil/cart] Cart Place Order Failure Action",
|
|
865
|
+
CartPlaceOrderFailureFromOutOfStockProductAction = "[@daffodil/cart] Cart Place Order Failure From Out of Stock Product Action"
|
|
880
866
|
}
|
|
881
867
|
/**
|
|
882
868
|
* Triggers the order placement for a cart.
|
|
883
869
|
*/
|
|
884
|
-
declare class DaffCartPlaceOrder<T extends DaffCartPaymentMethod = DaffCartPaymentMethod> implements Action {
|
|
885
|
-
|
|
886
|
-
|
|
887
|
-
|
|
870
|
+
export declare class DaffCartPlaceOrder<T extends DaffCartPaymentMethod = DaffCartPaymentMethod> implements Action {
|
|
871
|
+
payload?: T;
|
|
872
|
+
readonly type = DaffCartOrderActionTypes.CartPlaceOrderAction;
|
|
873
|
+
constructor(payload?: T);
|
|
888
874
|
}
|
|
889
875
|
/**
|
|
890
876
|
* Indicates the successful order placement for a cart.
|
|
891
877
|
*/
|
|
892
|
-
declare class DaffCartPlaceOrderSuccess<T extends DaffCartOrderResult = DaffCartOrderResult> implements Action {
|
|
893
|
-
|
|
894
|
-
|
|
895
|
-
|
|
878
|
+
export declare class DaffCartPlaceOrderSuccess<T extends DaffCartOrderResult = DaffCartOrderResult> implements Action {
|
|
879
|
+
payload: T;
|
|
880
|
+
readonly type = DaffCartOrderActionTypes.CartPlaceOrderSuccessAction;
|
|
881
|
+
constructor(payload: T);
|
|
896
882
|
}
|
|
897
883
|
/**
|
|
898
884
|
* Indicates the failed order placement for a cart.
|
|
899
885
|
*/
|
|
900
|
-
declare class DaffCartPlaceOrderFailure implements DaffFailureAction {
|
|
901
|
-
|
|
902
|
-
|
|
903
|
-
|
|
886
|
+
export declare class DaffCartPlaceOrderFailure implements DaffFailureAction {
|
|
887
|
+
payload: DaffStateError[];
|
|
888
|
+
readonly type = DaffCartOrderActionTypes.CartPlaceOrderFailureAction;
|
|
889
|
+
constructor(payload: DaffStateError[]);
|
|
904
890
|
}
|
|
905
891
|
/**
|
|
906
892
|
* Indicates the failed order placement for a cart due to a product being out of stock.
|
|
907
893
|
*/
|
|
908
|
-
declare class DaffCartPlaceOrderFailureFromOutOfStockProduct<T extends DaffCart = DaffCart> implements DaffFailureAction {
|
|
909
|
-
|
|
910
|
-
|
|
911
|
-
|
|
912
|
-
|
|
894
|
+
export declare class DaffCartPlaceOrderFailureFromOutOfStockProduct<T extends DaffCart = DaffCart> implements DaffFailureAction {
|
|
895
|
+
payload: DaffStateError[];
|
|
896
|
+
cart: T;
|
|
897
|
+
readonly type = DaffCartOrderActionTypes.CartPlaceOrderFailureFromOutOfStockProductAction;
|
|
898
|
+
constructor(payload: DaffStateError[], cart: T);
|
|
913
899
|
}
|
|
914
|
-
declare const daffCartPlaceOrderFailureFromOutOfStockProductCartRetreivalInjection: DaffCartRetrievalActionTransformedInjection<DaffCartPlaceOrderFailureFromOutOfStockProduct<any>>;
|
|
900
|
+
export declare const daffCartPlaceOrderFailureFromOutOfStockProductCartRetreivalInjection: DaffCartRetrievalActionTransformedInjection<DaffCartPlaceOrderFailureFromOutOfStockProduct<any>>;
|
|
915
901
|
/**
|
|
916
902
|
* A union of all the cart order action classes.
|
|
917
903
|
*/
|
|
918
|
-
type DaffCartOrderActions<T extends DaffCartOrderResult = DaffCartOrderResult, V extends DaffCart = DaffCart> = DaffCartPlaceOrder<V['payment']> | DaffCartPlaceOrderSuccess<T> | DaffCartPlaceOrderFailureFromOutOfStockProduct<V> | DaffCartPlaceOrderFailure;
|
|
919
|
-
|
|
904
|
+
export type DaffCartOrderActions<T extends DaffCartOrderResult = DaffCartOrderResult, V extends DaffCart = DaffCart> = DaffCartPlaceOrder<V['payment']> | DaffCartPlaceOrderSuccess<T> | DaffCartPlaceOrderFailureFromOutOfStockProduct<V> | DaffCartPlaceOrderFailure;
|
|
920
905
|
/**
|
|
921
906
|
* An enum for the cart coupon action types.
|
|
922
907
|
*/
|
|
923
|
-
declare enum DaffCartCouponActionTypes {
|
|
924
|
-
|
|
925
|
-
|
|
926
|
-
|
|
927
|
-
|
|
928
|
-
|
|
929
|
-
|
|
930
|
-
|
|
931
|
-
|
|
932
|
-
|
|
933
|
-
|
|
934
|
-
|
|
935
|
-
|
|
936
|
-
|
|
908
|
+
export declare enum DaffCartCouponActionTypes {
|
|
909
|
+
CartCouponApplyAction = "[@daffodil/cart] Cart Coupon Apply Action",
|
|
910
|
+
CartCouponApplySuccessAction = "[@daffodil/cart] Cart Coupon Apply Success Action",
|
|
911
|
+
CartCouponApplyFailureAction = "[@daffodil/cart] Cart Coupon Apply Failure Action",
|
|
912
|
+
CartCouponListAction = "[@daffodil/cart] Cart Coupon List Action",
|
|
913
|
+
CartCouponListSuccessAction = "[@daffodil/cart] Cart Coupon List Success Action",
|
|
914
|
+
CartCouponListFailureAction = "[@daffodil/cart] Cart Coupon List Failure Action",
|
|
915
|
+
CartCouponRemoveAction = "[@daffodil/cart] Cart Coupon Remove Action",
|
|
916
|
+
CartCouponRemoveSuccessAction = "[@daffodil/cart] Cart Coupon Remove Success Action",
|
|
917
|
+
CartCouponRemoveFailureAction = "[@daffodil/cart] Cart Coupon Remove Failure Action",
|
|
918
|
+
CartCouponRemoveAllAction = "[@daffodil/cart] Cart Coupon Remove All Action",
|
|
919
|
+
CartCouponRemoveAllSuccessAction = "[@daffodil/cart] Cart Coupon Remove All Success Action",
|
|
920
|
+
CartCouponRemoveAllFailureAction = "[@daffodil/cart] Cart Coupon Remove All Failure Action",
|
|
921
|
+
CartCouponClearErrorsAction = "[@daffodil/cart] Cart Coupon Clear Errors Action"
|
|
937
922
|
}
|
|
938
923
|
/**
|
|
939
924
|
* Triggers the application of a cart coupon.
|
|
940
925
|
*/
|
|
941
|
-
declare class DaffCartCouponApply<T extends DaffCartCoupon = DaffCartCoupon> implements Action {
|
|
942
|
-
|
|
943
|
-
|
|
944
|
-
|
|
926
|
+
export declare class DaffCartCouponApply<T extends DaffCartCoupon = DaffCartCoupon> implements Action {
|
|
927
|
+
payload: T;
|
|
928
|
+
readonly type = DaffCartCouponActionTypes.CartCouponApplyAction;
|
|
929
|
+
constructor(payload: T);
|
|
945
930
|
}
|
|
946
931
|
/**
|
|
947
932
|
* Indicates the successful application of a cart coupon.
|
|
948
933
|
*/
|
|
949
|
-
declare class DaffCartCouponApplySuccess<T extends DaffCart = DaffCart> implements DaffCartRetrievalAction<T> {
|
|
950
|
-
|
|
951
|
-
|
|
952
|
-
|
|
934
|
+
export declare class DaffCartCouponApplySuccess<T extends DaffCart = DaffCart> implements DaffCartRetrievalAction<T> {
|
|
935
|
+
payload: Partial<T>;
|
|
936
|
+
readonly type = DaffCartCouponActionTypes.CartCouponApplySuccessAction;
|
|
937
|
+
constructor(payload: Partial<T>);
|
|
953
938
|
}
|
|
954
939
|
/**
|
|
955
940
|
* Indicates the failed application of a cart coupon.
|
|
956
941
|
*/
|
|
957
|
-
declare class DaffCartCouponApplyFailure implements DaffFailureAction {
|
|
958
|
-
|
|
959
|
-
|
|
960
|
-
|
|
942
|
+
export declare class DaffCartCouponApplyFailure implements DaffFailureAction {
|
|
943
|
+
payload: DaffStateError[];
|
|
944
|
+
readonly type = DaffCartCouponActionTypes.CartCouponApplyFailureAction;
|
|
945
|
+
constructor(payload: DaffStateError[]);
|
|
961
946
|
}
|
|
962
947
|
/**
|
|
963
948
|
* Triggers the load of the cart's coupons.
|
|
964
949
|
*/
|
|
965
|
-
declare class DaffCartCouponList implements Action {
|
|
966
|
-
|
|
950
|
+
export declare class DaffCartCouponList implements Action {
|
|
951
|
+
readonly type = DaffCartCouponActionTypes.CartCouponListAction;
|
|
967
952
|
}
|
|
968
953
|
/**
|
|
969
954
|
* Indicates the successful load of the cart's coupons.
|
|
970
955
|
*/
|
|
971
|
-
declare class DaffCartCouponListSuccess<T extends DaffCartCoupon = DaffCartCoupon> implements Action {
|
|
972
|
-
|
|
973
|
-
|
|
974
|
-
|
|
956
|
+
export declare class DaffCartCouponListSuccess<T extends DaffCartCoupon = DaffCartCoupon> implements Action {
|
|
957
|
+
payload: T[];
|
|
958
|
+
readonly type = DaffCartCouponActionTypes.CartCouponListSuccessAction;
|
|
959
|
+
constructor(payload: T[]);
|
|
975
960
|
}
|
|
976
961
|
/**
|
|
977
962
|
* Indicates the failed load of the cart's coupons.
|
|
978
963
|
*/
|
|
979
|
-
declare class DaffCartCouponListFailure implements DaffFailureAction {
|
|
980
|
-
|
|
981
|
-
|
|
982
|
-
|
|
964
|
+
export declare class DaffCartCouponListFailure implements DaffFailureAction {
|
|
965
|
+
payload: DaffStateError[];
|
|
966
|
+
readonly type = DaffCartCouponActionTypes.CartCouponListFailureAction;
|
|
967
|
+
constructor(payload: DaffStateError[]);
|
|
983
968
|
}
|
|
984
969
|
/**
|
|
985
970
|
* Triggers the removal of a cart coupon.
|
|
986
971
|
*/
|
|
987
|
-
declare class DaffCartCouponRemove<T extends DaffCartCoupon = DaffCartCoupon> implements Action {
|
|
988
|
-
|
|
989
|
-
|
|
990
|
-
|
|
972
|
+
export declare class DaffCartCouponRemove<T extends DaffCartCoupon = DaffCartCoupon> implements Action {
|
|
973
|
+
payload: T;
|
|
974
|
+
readonly type = DaffCartCouponActionTypes.CartCouponRemoveAction;
|
|
975
|
+
constructor(payload: T);
|
|
991
976
|
}
|
|
992
977
|
/**
|
|
993
978
|
* Indicates the successful removal of a cart coupon.
|
|
994
979
|
*/
|
|
995
|
-
declare class DaffCartCouponRemoveSuccess<T extends DaffCart = DaffCart> implements DaffCartRetrievalAction<T> {
|
|
996
|
-
|
|
997
|
-
|
|
998
|
-
|
|
980
|
+
export declare class DaffCartCouponRemoveSuccess<T extends DaffCart = DaffCart> implements DaffCartRetrievalAction<T> {
|
|
981
|
+
payload: Partial<T>;
|
|
982
|
+
readonly type = DaffCartCouponActionTypes.CartCouponRemoveSuccessAction;
|
|
983
|
+
constructor(payload: Partial<T>);
|
|
999
984
|
}
|
|
1000
985
|
/**
|
|
1001
986
|
* Indicates the failed removal of a cart coupon.
|
|
1002
987
|
*/
|
|
1003
|
-
declare class DaffCartCouponRemoveFailure implements DaffFailureAction {
|
|
1004
|
-
|
|
1005
|
-
|
|
1006
|
-
|
|
988
|
+
export declare class DaffCartCouponRemoveFailure implements DaffFailureAction {
|
|
989
|
+
payload: DaffStateError[];
|
|
990
|
+
readonly type = DaffCartCouponActionTypes.CartCouponRemoveFailureAction;
|
|
991
|
+
constructor(payload: DaffStateError[]);
|
|
1007
992
|
}
|
|
1008
993
|
/**
|
|
1009
994
|
* Triggers the removal of all of the cart's coupons.
|
|
1010
995
|
*/
|
|
1011
|
-
declare class DaffCartCouponRemoveAll implements Action {
|
|
1012
|
-
|
|
996
|
+
export declare class DaffCartCouponRemoveAll implements Action {
|
|
997
|
+
readonly type = DaffCartCouponActionTypes.CartCouponRemoveAllAction;
|
|
1013
998
|
}
|
|
1014
999
|
/**
|
|
1015
1000
|
* Indicates the successful removal of all of the cart's coupons.
|
|
1016
1001
|
*/
|
|
1017
|
-
declare class DaffCartCouponRemoveAllSuccess<T extends DaffCart = DaffCart> implements DaffCartRetrievalAction<T> {
|
|
1018
|
-
|
|
1019
|
-
|
|
1020
|
-
|
|
1002
|
+
export declare class DaffCartCouponRemoveAllSuccess<T extends DaffCart = DaffCart> implements DaffCartRetrievalAction<T> {
|
|
1003
|
+
payload: Partial<T>;
|
|
1004
|
+
readonly type = DaffCartCouponActionTypes.CartCouponRemoveAllSuccessAction;
|
|
1005
|
+
constructor(payload: Partial<T>);
|
|
1021
1006
|
}
|
|
1022
1007
|
/**
|
|
1023
1008
|
* Indicates the failed removal of all of the cart's coupons.
|
|
1024
1009
|
*/
|
|
1025
|
-
declare class DaffCartCouponRemoveAllFailure implements DaffFailureAction {
|
|
1026
|
-
|
|
1027
|
-
|
|
1028
|
-
|
|
1010
|
+
export declare class DaffCartCouponRemoveAllFailure implements DaffFailureAction {
|
|
1011
|
+
payload: DaffStateError[];
|
|
1012
|
+
readonly type = DaffCartCouponActionTypes.CartCouponRemoveAllFailureAction;
|
|
1013
|
+
constructor(payload: DaffStateError[]);
|
|
1029
1014
|
}
|
|
1030
1015
|
/**
|
|
1031
1016
|
* Removes the errors in cart coupon state.
|
|
1032
1017
|
*/
|
|
1033
|
-
declare class DaffCartCouponClearErrors implements Action {
|
|
1034
|
-
|
|
1018
|
+
export declare class DaffCartCouponClearErrors implements Action {
|
|
1019
|
+
readonly type = DaffCartCouponActionTypes.CartCouponClearErrorsAction;
|
|
1035
1020
|
}
|
|
1036
1021
|
/**
|
|
1037
1022
|
* A union of all the cart coupon action classes.
|
|
1038
1023
|
*/
|
|
1039
|
-
type DaffCartCouponActions<T extends DaffCart = DaffCart> = DaffCartCouponApply<T['coupons'][number]> | DaffCartCouponApplySuccess<T> | DaffCartCouponApplyFailure | DaffCartCouponList | DaffCartCouponListSuccess<T['coupons'][number]> | DaffCartCouponListFailure | DaffCartCouponRemove<T['coupons'][number]> | DaffCartCouponRemoveSuccess<T> | DaffCartCouponRemoveFailure | DaffCartCouponRemoveAll | DaffCartCouponRemoveAllSuccess<T> | DaffCartCouponRemoveAllFailure | DaffCartCouponClearErrors;
|
|
1040
|
-
|
|
1024
|
+
export type DaffCartCouponActions<T extends DaffCart = DaffCart> = DaffCartCouponApply<T['coupons'][number]> | DaffCartCouponApplySuccess<T> | DaffCartCouponApplyFailure | DaffCartCouponList | DaffCartCouponListSuccess<T['coupons'][number]> | DaffCartCouponListFailure | DaffCartCouponRemove<T['coupons'][number]> | DaffCartCouponRemoveSuccess<T> | DaffCartCouponRemoveFailure | DaffCartCouponRemoveAll | DaffCartCouponRemoveAllSuccess<T> | DaffCartCouponRemoveAllFailure | DaffCartCouponClearErrors;
|
|
1041
1025
|
/**
|
|
1042
1026
|
* A list of the Daffodil cart actions that are cart retrieval actions, in injection form.
|
|
1043
1027
|
*/
|
|
1044
|
-
declare const daffCartRetrivalActions: DaffCartRetrievalActionInjection[];
|
|
1045
|
-
|
|
1028
|
+
export declare const daffCartRetrivalActions: DaffCartRetrievalActionInjection[];
|
|
1046
1029
|
/**
|
|
1047
1030
|
* Performs a payment update on the current cart.
|
|
1048
1031
|
*
|
|
@@ -1050,656 +1033,626 @@ declare const daffCartRetrivalActions: DaffCartRetrievalActionInjection[];
|
|
|
1050
1033
|
* @param deps DI deps.
|
|
1051
1034
|
* @param cbs Return the actions and/or perform custom behavior in response to each particular case.
|
|
1052
1035
|
*/
|
|
1053
|
-
declare function daffCartPaymentProcessorUpdate<Cart extends DaffCart = DaffCart, Request extends DaffPaymentRequest = DaffPaymentRequest, Response extends DaffPaymentResponse = DaffPaymentResponse, Success = unknown, PaymentFailure = unknown, UpdateFailure = unknown>(payload: DaffPaymentGenerateTokenPayload<Request>, deps: {
|
|
1054
|
-
|
|
1055
|
-
|
|
1056
|
-
|
|
1036
|
+
export declare function daffCartPaymentProcessorUpdate<Cart extends DaffCart = DaffCart, Request extends DaffPaymentRequest = DaffPaymentRequest, Response extends DaffPaymentResponse = DaffPaymentResponse, Success = unknown, PaymentFailure = unknown, UpdateFailure = unknown>(payload: DaffPaymentGenerateTokenPayload<Request>, deps: {
|
|
1037
|
+
cartDriver: DaffCartPaymentServiceInterface<Cart>;
|
|
1038
|
+
paymentDriver: DaffPaymentDriverInterface<Response>;
|
|
1039
|
+
cartResolver: DaffCartDriverResolveService;
|
|
1057
1040
|
}, cbs: {
|
|
1058
|
-
|
|
1059
|
-
|
|
1060
|
-
|
|
1041
|
+
success: (resp: Cart) => Observable<Success>;
|
|
1042
|
+
paymentFailure: (errors: Array<DaffError>) => Observable<PaymentFailure>;
|
|
1043
|
+
updateFailure: (errors: Array<DaffError>) => Observable<UpdateFailure>;
|
|
1061
1044
|
}): Observable<PaymentFailure>;
|
|
1062
|
-
|
|
1063
|
-
|
|
1064
|
-
|
|
1065
|
-
|
|
1066
|
-
|
|
1067
|
-
|
|
1068
|
-
|
|
1069
|
-
|
|
1070
|
-
|
|
1071
|
-
|
|
1072
|
-
|
|
1073
|
-
|
|
1074
|
-
errors: DaffStateError[];
|
|
1075
|
-
}
|
|
1076
|
-
|
|
1045
|
+
export declare enum DaffCartResolveState {
|
|
1046
|
+
Default = "default",
|
|
1047
|
+
Resolving = "resolving",
|
|
1048
|
+
Succeeded = "succeeded",
|
|
1049
|
+
Failed = "failed",
|
|
1050
|
+
ServerSide = "server"
|
|
1051
|
+
}
|
|
1052
|
+
export interface DaffCartOrderReducerState<T extends DaffCartOrderResult = DaffCartOrderResult> {
|
|
1053
|
+
cartOrderResult: T;
|
|
1054
|
+
loading: DaffMutableLoadingState;
|
|
1055
|
+
errors: DaffStateError[];
|
|
1056
|
+
}
|
|
1077
1057
|
/**
|
|
1078
1058
|
* The particular segment of DaffCart that an operation applies to.
|
|
1079
1059
|
* Errors and loading are tracked separately for each type of cart operation.
|
|
1080
1060
|
*/
|
|
1081
|
-
declare enum DaffCartOperationType {
|
|
1082
|
-
|
|
1083
|
-
|
|
1084
|
-
|
|
1085
|
-
|
|
1086
|
-
|
|
1087
|
-
|
|
1088
|
-
|
|
1089
|
-
|
|
1090
|
-
|
|
1091
|
-
}
|
|
1092
|
-
|
|
1093
|
-
|
|
1094
|
-
|
|
1095
|
-
|
|
1096
|
-
|
|
1097
|
-
|
|
1098
|
-
|
|
1099
|
-
|
|
1100
|
-
|
|
1101
|
-
|
|
1102
|
-
|
|
1103
|
-
|
|
1104
|
-
|
|
1105
|
-
|
|
1106
|
-
|
|
1107
|
-
|
|
1108
|
-
|
|
1109
|
-
|
|
1110
|
-
|
|
1111
|
-
|
|
1112
|
-
|
|
1113
|
-
|
|
1114
|
-
|
|
1115
|
-
|
|
1116
|
-
|
|
1117
|
-
"Shipping Information": DaffMutableLoadingState;
|
|
1118
|
-
"Shipping Methods": DaffLoadingState;
|
|
1119
|
-
Coupon: DaffMutableLoadingState;
|
|
1120
|
-
};
|
|
1061
|
+
export declare enum DaffCartOperationType {
|
|
1062
|
+
Cart = "Cart",
|
|
1063
|
+
Item = "Item",
|
|
1064
|
+
BillingAddress = "Billing Address",
|
|
1065
|
+
ShippingAddress = "Shipping Address",
|
|
1066
|
+
Payment = "Payment",
|
|
1067
|
+
PaymentMethods = "Payment Methods",
|
|
1068
|
+
ShippingInformation = "Shipping Information",
|
|
1069
|
+
ShippingMethods = "Shipping Methods",
|
|
1070
|
+
Coupon = "Coupon"
|
|
1071
|
+
}
|
|
1072
|
+
export type DaffCartErrors = { [K in DaffCartOperationType]: DaffStateError[]; };
|
|
1073
|
+
export interface DaffCartLoading {
|
|
1074
|
+
[DaffCartOperationType.Cart]: DaffMutableLoadingState;
|
|
1075
|
+
[DaffCartOperationType.Item]: DaffCartItemLoadingState;
|
|
1076
|
+
[DaffCartOperationType.BillingAddress]: DaffMutableLoadingState;
|
|
1077
|
+
[DaffCartOperationType.ShippingAddress]: DaffMutableLoadingState;
|
|
1078
|
+
[DaffCartOperationType.Payment]: DaffMutableLoadingState;
|
|
1079
|
+
[DaffCartOperationType.PaymentMethods]: DaffLoadingState;
|
|
1080
|
+
[DaffCartOperationType.ShippingInformation]: DaffMutableLoadingState;
|
|
1081
|
+
[DaffCartOperationType.ShippingMethods]: DaffLoadingState;
|
|
1082
|
+
[DaffCartOperationType.Coupon]: DaffMutableLoadingState;
|
|
1083
|
+
}
|
|
1084
|
+
export type DaffCartItemLoadingState = DaffMutableLoadingState | DaffState.Adding;
|
|
1085
|
+
export declare const initializeLoadingSetter: (loadingSpace: DaffCartOperationType) => (loadingObj: DaffCartLoading, loading: DaffLoadingState | DaffMutableLoadingState | DaffCartItemLoadingState) => {
|
|
1086
|
+
loading: {
|
|
1087
|
+
Cart: DaffMutableLoadingState;
|
|
1088
|
+
Item: DaffCartItemLoadingState;
|
|
1089
|
+
"Billing Address": DaffMutableLoadingState;
|
|
1090
|
+
"Shipping Address": DaffMutableLoadingState;
|
|
1091
|
+
Payment: DaffMutableLoadingState;
|
|
1092
|
+
"Payment Methods": DaffLoadingState;
|
|
1093
|
+
"Shipping Information": DaffMutableLoadingState;
|
|
1094
|
+
"Shipping Methods": DaffLoadingState;
|
|
1095
|
+
Coupon: DaffMutableLoadingState;
|
|
1096
|
+
};
|
|
1121
1097
|
};
|
|
1122
|
-
|
|
1123
|
-
|
|
1124
|
-
|
|
1125
|
-
|
|
1126
|
-
|
|
1127
|
-
|
|
1128
|
-
|
|
1129
|
-
|
|
1130
|
-
|
|
1131
|
-
|
|
1132
|
-
|
|
1133
|
-
|
|
1134
|
-
|
|
1135
|
-
|
|
1136
|
-
}
|
|
1137
|
-
|
|
1138
|
-
[DAFF_CART_STORE_FEATURE_KEY]: DaffCartReducersState<T, V>;
|
|
1139
|
-
}
|
|
1140
|
-
|
|
1141
|
-
declare const daffCartReducers: ActionReducerMap<DaffCartReducersState>;
|
|
1142
|
-
|
|
1098
|
+
export interface DaffCartReducerState<T extends DaffCart = DaffCart> {
|
|
1099
|
+
cart: T;
|
|
1100
|
+
loading: DaffCartLoading;
|
|
1101
|
+
errors: DaffCartErrors;
|
|
1102
|
+
resolved: DaffCartResolveState;
|
|
1103
|
+
}
|
|
1104
|
+
export declare const DAFF_CART_STORE_FEATURE_KEY = "daffCart";
|
|
1105
|
+
export interface DaffCartReducersState<T extends DaffCart = DaffCart, V extends DaffCartOrderResult = DaffCartOrderResult> {
|
|
1106
|
+
cart: DaffCartReducerState<T>;
|
|
1107
|
+
cartItems: DaffOperationEntityState<T['items'][number]>;
|
|
1108
|
+
order: DaffCartOrderReducerState<V>;
|
|
1109
|
+
}
|
|
1110
|
+
export interface DaffCartStateRootSlice<T extends DaffCart = DaffCart, V extends DaffCartOrderResult = DaffCartOrderResult> {
|
|
1111
|
+
[DAFF_CART_STORE_FEATURE_KEY]: DaffCartReducersState<T, V>;
|
|
1112
|
+
}
|
|
1113
|
+
export declare const daffCartReducers: ActionReducerMap<DaffCartReducersState>;
|
|
1143
1114
|
type ActionTypes<T extends DaffCart = DaffCart, U extends DaffCartItemInput = DaffCartItemInput, TOrderResult extends DaffCartOrderResult = DaffCartOrderResult> = DaffCartActions<T> | DaffCartItemActions<T, U> | DaffCartBillingAddressActions<T> | DaffCartShippingAddressActions<T> | DaffCartAddressActions<T> | DaffCartShippingMethodsActions<T['available_shipping_methods'][number]> | DaffCartShippingInformationActions<T> | DaffCartPaymentActions<T> | DaffCartPaymentMethodsActions<T['available_payment_methods'][number]> | DaffCartOrderActions<TOrderResult> | DaffCartCouponActions<T>;
|
|
1144
|
-
|
|
1145
1115
|
/**
|
|
1146
1116
|
* Calls each of the individual cart reducers in turn,
|
|
1147
1117
|
* passing the returned state into the next.
|
|
1148
1118
|
*/
|
|
1149
|
-
declare function daffCartReducer<T extends DaffCart = DaffCart>(state: DaffCartReducerState<any>, action: ActionTypes<T>): DaffCartReducerState<T>;
|
|
1150
|
-
|
|
1151
|
-
declare
|
|
1152
|
-
|
|
1153
|
-
declare function daffCartOrderReducer<T extends DaffCartOrderResult = DaffCartOrderResult>(state: DaffCartOrderReducerState<any>, action: ActionTypes<DaffCart, DaffCartItemInput, T>): DaffCartOrderReducerState<T>;
|
|
1154
|
-
|
|
1155
|
-
declare const daffCartOrderInitialState: DaffCartOrderReducerState<any>;
|
|
1156
|
-
|
|
1119
|
+
export declare function daffCartReducer<T extends DaffCart = DaffCart>(state: DaffCartReducerState<any>, action: ActionTypes<T>): DaffCartReducerState<T>;
|
|
1120
|
+
export declare const daffCartReducerInitialState: DaffCartReducerState<any>;
|
|
1121
|
+
export declare function daffCartOrderReducer<T extends DaffCartOrderResult = DaffCartOrderResult>(state: DaffCartOrderReducerState<any>, action: ActionTypes<DaffCart, DaffCartItemInput, T>): DaffCartOrderReducerState<T>;
|
|
1122
|
+
export declare const daffCartOrderInitialState: DaffCartOrderReducerState<any>;
|
|
1157
1123
|
/**
|
|
1158
1124
|
* Cart Item Entities Adapter for changing/overwriting entity state.
|
|
1159
1125
|
*/
|
|
1160
|
-
declare const daffCartItemEntitiesAdapter: <T extends DaffCartItem = DaffCartItem>() => DaffOperationEntityStateAdapter<T>;
|
|
1161
|
-
|
|
1126
|
+
export declare const daffCartItemEntitiesAdapter: <T extends DaffCartItem = DaffCartItem>() => DaffOperationEntityStateAdapter<T>;
|
|
1162
1127
|
/**
|
|
1163
1128
|
* Reducer function factory that updates cart item entities according to a list of passed cart retrieval actions.
|
|
1164
1129
|
* See {@link DaffCartRetrievalActionInjection}.
|
|
1165
1130
|
*/
|
|
1166
|
-
declare function daffCartItemEntitiesRetrievalActionsReducerFactory<T extends DaffCart = DaffCart>(retrievalActions: DaffCartRetrievalActionInjection[]): (state: DaffOperationEntityState<T["items"][number]>, action: Action) => DaffOperationEntityState<T["items"][number]>;
|
|
1167
|
-
|
|
1131
|
+
export declare function daffCartItemEntitiesRetrievalActionsReducerFactory<T extends DaffCart = DaffCart>(retrievalActions: DaffCartRetrievalActionInjection[]): (state: DaffOperationEntityState<T["items"][number]>, action: Action) => DaffOperationEntityState<T["items"][number]>;
|
|
1168
1132
|
/**
|
|
1169
1133
|
* Reducer function factory that updates cart state according to a list of passed cart retrieval actions.
|
|
1170
1134
|
* See {@link DaffCartRetrievalActionInjection}.
|
|
1171
1135
|
*/
|
|
1172
|
-
declare function daffCartRetrievalActionsReducerFactory<T extends DaffCart = DaffCart>(retrievalActions: DaffCartRetrievalActionInjection[]): ActionReducer<DaffCartReducerState<T>>;
|
|
1173
|
-
|
|
1174
|
-
declare const
|
|
1175
|
-
declare const daffCartProvideExtraReducers: <R extends ActionReducer<DaffCartReducersState<_daffodil_cart_types_daffodil_cart.DaffCart, _daffodil_cart_types_daffodil_cart.DaffCartOrderResult>, _ngrx_store.Action<string>> = ActionReducer<DaffCartReducersState<_daffodil_cart_types_daffodil_cart.DaffCart, _daffodil_cart_types_daffodil_cart.DaffCartOrderResult>, _ngrx_store.Action<string>>>(...values: R[]) => Array<_angular_core.ValueProvider>;
|
|
1176
|
-
|
|
1177
|
-
declare const DAFF_CART_META_REDUCERS: _angular_core.InjectionToken<MetaReducer<DaffCartReducersState<_daffodil_cart_types_daffodil_cart.DaffCart, _daffodil_cart_types_daffodil_cart.DaffCartOrderResult>>[]>;
|
|
1178
|
-
declare const daffCartProvideMetaReducers: <R extends MetaReducer<DaffCartReducersState<_daffodil_cart_types_daffodil_cart.DaffCart, _daffodil_cart_types_daffodil_cart.DaffCartOrderResult>> = MetaReducer<DaffCartReducersState<_daffodil_cart_types_daffodil_cart.DaffCart, _daffodil_cart_types_daffodil_cart.DaffCartOrderResult>>>(...values: R[]) => Array<_angular_core.ValueProvider>;
|
|
1179
|
-
declare const daffCartProvideMetaReducerFactories: <R extends MetaReducer<DaffCartReducersState<_daffodil_cart_types_daffodil_cart.DaffCart, _daffodil_cart_types_daffodil_cart.DaffCartOrderResult>> = MetaReducer<DaffCartReducersState<_daffodil_cart_types_daffodil_cart.DaffCart, _daffodil_cart_types_daffodil_cart.DaffCartOrderResult>>>(...factories: (() => R)[]) => Array<_angular_core.FactoryProvider>;
|
|
1180
|
-
|
|
1136
|
+
export declare function daffCartRetrievalActionsReducerFactory<T extends DaffCart = DaffCart>(retrievalActions: DaffCartRetrievalActionInjection[]): ActionReducer<DaffCartReducerState<T>>;
|
|
1137
|
+
export declare const DAFF_CART_EXTRA_REDUCERS: import("@angular/core").InjectionToken<ActionReducer<DaffCartReducersState<import("@daffodil/cart/types/daffodil-cart").DaffCart, import("@daffodil/cart/types/daffodil-cart").DaffCartOrderResult>, import("@ngrx/store").Action<string>>[]>, daffCartProvideExtraReducers: <R extends ActionReducer<DaffCartReducersState<import("@daffodil/cart/types/daffodil-cart").DaffCart, import("@daffodil/cart/types/daffodil-cart").DaffCartOrderResult>, import("@ngrx/store").Action<string>> = ActionReducer<DaffCartReducersState<import("@daffodil/cart/types/daffodil-cart").DaffCart, import("@daffodil/cart/types/daffodil-cart").DaffCartOrderResult>, import("@ngrx/store").Action<string>>>(...values: R[]) => Array<import("@angular/core").ValueProvider>;
|
|
1138
|
+
export declare const DAFF_CART_META_REDUCERS: import("@angular/core").InjectionToken<MetaReducer<DaffCartReducersState<import("@daffodil/cart/types/daffodil-cart").DaffCart, import("@daffodil/cart/types/daffodil-cart").DaffCartOrderResult>>[]>, daffCartProvideMetaReducers: <R extends MetaReducer<DaffCartReducersState<import("@daffodil/cart/types/daffodil-cart").DaffCart, import("@daffodil/cart/types/daffodil-cart").DaffCartOrderResult>> = MetaReducer<DaffCartReducersState<import("@daffodil/cart/types/daffodil-cart").DaffCart, import("@daffodil/cart/types/daffodil-cart").DaffCartOrderResult>>>(...values: R[]) => Array<import("@angular/core").ValueProvider>, daffCartProvideMetaReducerFactories: <R extends MetaReducer<DaffCartReducersState<import("@daffodil/cart/types/daffodil-cart").DaffCart, import("@daffodil/cart/types/daffodil-cart").DaffCartOrderResult>> = MetaReducer<DaffCartReducersState<import("@daffodil/cart/types/daffodil-cart").DaffCart, import("@daffodil/cart/types/daffodil-cart").DaffCartOrderResult>>>(...factories: (() => R)[]) => Array<import("@angular/core").FactoryProvider>;
|
|
1181
1139
|
interface DaffCartStateMemoizedSelectors<T extends DaffCart = DaffCart, V extends DaffCartOrderResult = DaffCartOrderResult> {
|
|
1182
|
-
|
|
1183
|
-
|
|
1184
|
-
|
|
1185
|
-
|
|
1186
|
-
|
|
1187
|
-
|
|
1188
|
-
|
|
1189
|
-
|
|
1190
|
-
|
|
1191
|
-
|
|
1192
|
-
|
|
1193
|
-
|
|
1194
|
-
|
|
1195
|
-
|
|
1196
|
-
|
|
1197
|
-
|
|
1198
|
-
|
|
1199
|
-
|
|
1200
|
-
|
|
1201
|
-
|
|
1202
|
-
|
|
1203
|
-
|
|
1204
|
-
|
|
1205
|
-
|
|
1206
|
-
|
|
1207
|
-
|
|
1208
|
-
|
|
1209
|
-
|
|
1210
|
-
|
|
1211
|
-
|
|
1212
|
-
|
|
1213
|
-
|
|
1214
|
-
|
|
1215
|
-
|
|
1216
|
-
|
|
1217
|
-
|
|
1218
|
-
|
|
1219
|
-
|
|
1220
|
-
|
|
1221
|
-
|
|
1222
|
-
|
|
1223
|
-
|
|
1224
|
-
|
|
1225
|
-
|
|
1226
|
-
|
|
1227
|
-
|
|
1228
|
-
|
|
1229
|
-
|
|
1230
|
-
|
|
1231
|
-
|
|
1232
|
-
|
|
1233
|
-
|
|
1234
|
-
|
|
1235
|
-
|
|
1236
|
-
|
|
1237
|
-
|
|
1238
|
-
|
|
1239
|
-
|
|
1240
|
-
|
|
1241
|
-
|
|
1242
|
-
|
|
1243
|
-
|
|
1244
|
-
|
|
1245
|
-
|
|
1246
|
-
|
|
1247
|
-
|
|
1248
|
-
|
|
1249
|
-
|
|
1250
|
-
|
|
1251
|
-
|
|
1252
|
-
|
|
1253
|
-
|
|
1254
|
-
|
|
1255
|
-
|
|
1256
|
-
|
|
1257
|
-
|
|
1258
|
-
|
|
1259
|
-
|
|
1260
|
-
|
|
1261
|
-
|
|
1262
|
-
|
|
1263
|
-
|
|
1264
|
-
|
|
1265
|
-
|
|
1266
|
-
|
|
1267
|
-
|
|
1268
|
-
|
|
1269
|
-
|
|
1270
|
-
|
|
1271
|
-
|
|
1272
|
-
|
|
1273
|
-
|
|
1274
|
-
|
|
1275
|
-
|
|
1276
|
-
|
|
1277
|
-
|
|
1278
|
-
|
|
1279
|
-
|
|
1280
|
-
|
|
1281
|
-
|
|
1282
|
-
|
|
1283
|
-
|
|
1284
|
-
|
|
1285
|
-
|
|
1286
|
-
|
|
1287
|
-
|
|
1288
|
-
|
|
1289
|
-
|
|
1290
|
-
|
|
1291
|
-
|
|
1292
|
-
|
|
1293
|
-
|
|
1294
|
-
|
|
1295
|
-
|
|
1296
|
-
|
|
1297
|
-
|
|
1298
|
-
|
|
1299
|
-
|
|
1300
|
-
|
|
1301
|
-
|
|
1302
|
-
|
|
1303
|
-
|
|
1304
|
-
|
|
1305
|
-
|
|
1306
|
-
|
|
1307
|
-
|
|
1308
|
-
|
|
1309
|
-
|
|
1310
|
-
|
|
1311
|
-
|
|
1312
|
-
|
|
1313
|
-
|
|
1314
|
-
|
|
1315
|
-
|
|
1316
|
-
|
|
1317
|
-
|
|
1318
|
-
|
|
1319
|
-
|
|
1320
|
-
|
|
1321
|
-
|
|
1322
|
-
|
|
1323
|
-
|
|
1324
|
-
|
|
1325
|
-
|
|
1326
|
-
|
|
1327
|
-
|
|
1328
|
-
|
|
1329
|
-
|
|
1330
|
-
|
|
1331
|
-
|
|
1332
|
-
|
|
1333
|
-
|
|
1334
|
-
|
|
1335
|
-
|
|
1336
|
-
|
|
1337
|
-
|
|
1338
|
-
|
|
1339
|
-
|
|
1340
|
-
|
|
1341
|
-
|
|
1342
|
-
|
|
1343
|
-
|
|
1344
|
-
|
|
1345
|
-
|
|
1346
|
-
|
|
1347
|
-
|
|
1348
|
-
|
|
1349
|
-
|
|
1350
|
-
|
|
1351
|
-
|
|
1352
|
-
}
|
|
1353
|
-
|
|
1140
|
+
selectCartState: MemoizedSelector<DaffCartStateRootSlice<T, V>, DaffCartReducerState<T>>;
|
|
1141
|
+
selectCartValue: MemoizedSelector<DaffCartStateRootSlice<T, V>, T>;
|
|
1142
|
+
selectCartResolved: MemoizedSelector<DaffCartStateRootSlice<T, V>, DaffCartResolveState>;
|
|
1143
|
+
/**
|
|
1144
|
+
* The object that holds all the loading states for cart operations.
|
|
1145
|
+
*/
|
|
1146
|
+
selectCartLoadingObject: MemoizedSelector<DaffCartStateRootSlice<T, V>, DaffCartReducerState<T>['loading']>;
|
|
1147
|
+
/**
|
|
1148
|
+
* Selects whether there is any cart operation in progress.
|
|
1149
|
+
* This includes operations specifically for cart subfields.
|
|
1150
|
+
*/
|
|
1151
|
+
selectCartFeatureLoading: MemoizedSelector<DaffCartStateRootSlice<T, V>, boolean>;
|
|
1152
|
+
/**
|
|
1153
|
+
* Selects whether there is any cart resolve operation in progress.
|
|
1154
|
+
* This includes operations for cart subfields.
|
|
1155
|
+
* This pertains only to requests that do not mutate data such as "load" or "list".
|
|
1156
|
+
*/
|
|
1157
|
+
selectCartFeatureResolving: MemoizedSelector<DaffCartStateRootSlice<T, V>, boolean>;
|
|
1158
|
+
/**
|
|
1159
|
+
* Selects whether there is any cart mutate operation in progress.
|
|
1160
|
+
* This includes operations for cart subfields.
|
|
1161
|
+
* This pertains only to requests that mutate data such as "update".
|
|
1162
|
+
*/
|
|
1163
|
+
selectCartFeatureMutating: MemoizedSelector<DaffCartStateRootSlice<T, V>, boolean>;
|
|
1164
|
+
/**
|
|
1165
|
+
* Selects whether there is a cart operation in progress.
|
|
1166
|
+
* This does not include operations specifically for cart subfields.
|
|
1167
|
+
*/
|
|
1168
|
+
selectCartLoading: MemoizedSelector<DaffCartStateRootSlice<T, V>, boolean>;
|
|
1169
|
+
/**
|
|
1170
|
+
* Selects whether there is a cart resolve operation in progress.
|
|
1171
|
+
* This does not include operations specifically for cart subfields.
|
|
1172
|
+
* This pertains only to requests that do not mutate data such as "load" or "list".
|
|
1173
|
+
*/
|
|
1174
|
+
selectCartResolving: MemoizedSelector<DaffCartStateRootSlice<T, V>, boolean>;
|
|
1175
|
+
/**
|
|
1176
|
+
* Selects whether there is a cart mutate operation in progress.
|
|
1177
|
+
* This does not include operations specifically for cart subfields.
|
|
1178
|
+
* This pertains only to requests that mutate data such as "update".
|
|
1179
|
+
*/
|
|
1180
|
+
selectCartMutating: MemoizedSelector<DaffCartStateRootSlice<T, V>, boolean>;
|
|
1181
|
+
/**
|
|
1182
|
+
* Selects whether there is a cart billing address operation in progress.
|
|
1183
|
+
*/
|
|
1184
|
+
selectBillingAddressLoading: MemoizedSelector<DaffCartStateRootSlice<T, V>, boolean>;
|
|
1185
|
+
/**
|
|
1186
|
+
* Selects whether there is a cart billing address resolve operation in progress.
|
|
1187
|
+
* This pertains only to requests that do not mutate data such as "load" or "list".
|
|
1188
|
+
*/
|
|
1189
|
+
selectBillingAddressResolving: MemoizedSelector<DaffCartStateRootSlice<T, V>, boolean>;
|
|
1190
|
+
/**
|
|
1191
|
+
* Selects whether there is a cart billing address mutate operation in progress.
|
|
1192
|
+
* This pertains only to requests that mutate data such as "update".
|
|
1193
|
+
*/
|
|
1194
|
+
selectBillingAddressMutating: MemoizedSelector<DaffCartStateRootSlice<T, V>, boolean>;
|
|
1195
|
+
/**
|
|
1196
|
+
* Selects whether there is a cart shipping address operation in progress.
|
|
1197
|
+
*/
|
|
1198
|
+
selectShippingAddressLoading: MemoizedSelector<DaffCartStateRootSlice<T, V>, boolean>;
|
|
1199
|
+
/**
|
|
1200
|
+
* Selects whether there is a cart shipping address resolve operation in progress.
|
|
1201
|
+
* This pertains only to requests that do not mutate data such as "load" or "list".
|
|
1202
|
+
*/
|
|
1203
|
+
selectShippingAddressResolving: MemoizedSelector<DaffCartStateRootSlice<T, V>, boolean>;
|
|
1204
|
+
/**
|
|
1205
|
+
* Selects whether there is a cart shipping address mutate operation in progress.
|
|
1206
|
+
* This pertains only to requests that mutate data such as "update".
|
|
1207
|
+
*/
|
|
1208
|
+
selectShippingAddressMutating: MemoizedSelector<DaffCartStateRootSlice<T, V>, boolean>;
|
|
1209
|
+
/**
|
|
1210
|
+
* Selects whether there is a cart shipping information operation in progress.
|
|
1211
|
+
*/
|
|
1212
|
+
selectShippingInformationLoading: MemoizedSelector<DaffCartStateRootSlice<T, V>, boolean>;
|
|
1213
|
+
/**
|
|
1214
|
+
* Selects whether there is a cart shipping information resolve operation in progress.
|
|
1215
|
+
* This pertains only to requests that do not mutate data such as "load" or "list".
|
|
1216
|
+
*/
|
|
1217
|
+
selectShippingInformationResolving: MemoizedSelector<DaffCartStateRootSlice<T, V>, boolean>;
|
|
1218
|
+
/**
|
|
1219
|
+
* Selects whether there is a cart shipping information mutate operation in progress.
|
|
1220
|
+
* This pertains only to requests that mutate data such as "update".
|
|
1221
|
+
*/
|
|
1222
|
+
selectShippingInformationMutating: MemoizedSelector<DaffCartStateRootSlice<T, V>, boolean>;
|
|
1223
|
+
/**
|
|
1224
|
+
* Selects whether there is a cart shipping methods operation in progress.
|
|
1225
|
+
*/
|
|
1226
|
+
selectShippingMethodsLoading: MemoizedSelector<DaffCartStateRootSlice<T, V>, boolean>;
|
|
1227
|
+
/**
|
|
1228
|
+
* Selects whether there is a cart shipping methods resolve operation in progress.
|
|
1229
|
+
* This pertains only to requests that do not mutate data such as "load" or "list".
|
|
1230
|
+
*/
|
|
1231
|
+
selectShippingMethodsResolving: MemoizedSelector<DaffCartStateRootSlice<T, V>, boolean>;
|
|
1232
|
+
/**
|
|
1233
|
+
* Selects whether there is a cart payment operation in progress.
|
|
1234
|
+
*/
|
|
1235
|
+
selectPaymentLoading: MemoizedSelector<DaffCartStateRootSlice<T, V>, boolean>;
|
|
1236
|
+
/**
|
|
1237
|
+
* Selects whether there is a cart payment resolve operation in progress.
|
|
1238
|
+
* This pertains only to requests that do not mutate data such as "load" or "list".
|
|
1239
|
+
*/
|
|
1240
|
+
selectPaymentResolving: MemoizedSelector<DaffCartStateRootSlice<T, V>, boolean>;
|
|
1241
|
+
/**
|
|
1242
|
+
* Selects whether there is a cart payment mutate operation in progress.
|
|
1243
|
+
* This pertains only to requests that mutate data such as "update".
|
|
1244
|
+
*/
|
|
1245
|
+
selectPaymentMutating: MemoizedSelector<DaffCartStateRootSlice<T, V>, boolean>;
|
|
1246
|
+
/**
|
|
1247
|
+
* Selects whether there is a cart payment methods operation in progress.
|
|
1248
|
+
*/
|
|
1249
|
+
selectPaymentMethodsLoading: MemoizedSelector<DaffCartStateRootSlice<T, V>, boolean>;
|
|
1250
|
+
/**
|
|
1251
|
+
* Selects whether there is a cart payment methods resolve operation in progress.
|
|
1252
|
+
* This pertains only to requests that do not mutate data such as "load" or "list".
|
|
1253
|
+
*/
|
|
1254
|
+
selectPaymentMethodsResolving: MemoizedSelector<DaffCartStateRootSlice<T, V>, boolean>;
|
|
1255
|
+
/**
|
|
1256
|
+
* Selects whether there is a cart coupon operation in progress.
|
|
1257
|
+
*/
|
|
1258
|
+
selectCouponLoading: MemoizedSelector<DaffCartStateRootSlice<T, V>, boolean>;
|
|
1259
|
+
/**
|
|
1260
|
+
* Selects whether there is a cart coupon resolve operation in progress.
|
|
1261
|
+
* This pertains only to requests that do not mutate data such as "load" or "list".
|
|
1262
|
+
*/
|
|
1263
|
+
selectCouponResolving: MemoizedSelector<DaffCartStateRootSlice<T, V>, boolean>;
|
|
1264
|
+
/**
|
|
1265
|
+
* Selects whether there is a cart coupon mutate operation in progress.
|
|
1266
|
+
* This pertains only to requests that mutate data such as "update".
|
|
1267
|
+
*/
|
|
1268
|
+
selectCouponMutating: MemoizedSelector<DaffCartStateRootSlice<T, V>, boolean>;
|
|
1269
|
+
/**
|
|
1270
|
+
* Selects whether there is a cart item operation in progress.
|
|
1271
|
+
*/
|
|
1272
|
+
selectItemLoading: MemoizedSelector<DaffCartStateRootSlice<T, V>, boolean>;
|
|
1273
|
+
/**
|
|
1274
|
+
* Selects whether there is a cart item add operation in progress.
|
|
1275
|
+
*/
|
|
1276
|
+
selectItemAdding: MemoizedSelector<DaffCartStateRootSlice<T, V>, boolean>;
|
|
1277
|
+
/**
|
|
1278
|
+
* Selects whether there is a cart item resolve operation in progress.
|
|
1279
|
+
* This pertains only to requests that do not mutate data such as "load" or "list".
|
|
1280
|
+
*/
|
|
1281
|
+
selectItemResolving: MemoizedSelector<DaffCartStateRootSlice<T, V>, boolean>;
|
|
1282
|
+
/**
|
|
1283
|
+
* Selects whether there is a cart item mutate operation in progress.
|
|
1284
|
+
* This pertains only to requests that mutate existing data such as update.
|
|
1285
|
+
* This does not apply to add requests. see {@link selectItemAdding} for that.
|
|
1286
|
+
*/
|
|
1287
|
+
selectItemMutating: MemoizedSelector<DaffCartStateRootSlice<T, V>, boolean>;
|
|
1288
|
+
selectCartErrorsObject: MemoizedSelector<DaffCartStateRootSlice<T, V>, DaffCartReducerState<T>['errors']>;
|
|
1289
|
+
selectCartErrors: MemoizedSelector<DaffCartStateRootSlice<T, V>, DaffStateError[]>;
|
|
1290
|
+
selectBillingAddressErrors: MemoizedSelector<DaffCartStateRootSlice<T, V>, DaffStateError[]>;
|
|
1291
|
+
selectShippingAddressErrors: MemoizedSelector<DaffCartStateRootSlice<T, V>, DaffStateError[]>;
|
|
1292
|
+
selectShippingInformationErrors: MemoizedSelector<DaffCartStateRootSlice<T, V>, DaffStateError[]>;
|
|
1293
|
+
selectShippingMethodsErrors: MemoizedSelector<DaffCartStateRootSlice<T, V>, DaffStateError[]>;
|
|
1294
|
+
selectPaymentErrors: MemoizedSelector<DaffCartStateRootSlice<T, V>, DaffStateError[]>;
|
|
1295
|
+
selectPaymentMethodsErrors: MemoizedSelector<DaffCartStateRootSlice<T, V>, DaffStateError[]>;
|
|
1296
|
+
selectCouponErrors: MemoizedSelector<DaffCartStateRootSlice<T, V>, DaffStateError[]>;
|
|
1297
|
+
selectItemErrors: MemoizedSelector<DaffCartStateRootSlice<T, V>, DaffStateError[]>;
|
|
1298
|
+
selectCartHasOutOfStockItems: MemoizedSelector<DaffCartStateRootSlice<T, V>, boolean>;
|
|
1299
|
+
selectIsCartEmpty: MemoizedSelector<DaffCartStateRootSlice<T, V>, boolean>;
|
|
1300
|
+
/**
|
|
1301
|
+
* Selects whether the cart's shipping address equals the billing address.
|
|
1302
|
+
* Returns false if either address is null or undefined.
|
|
1303
|
+
*/
|
|
1304
|
+
selectIsBillingSameAsShipping: MemoizedSelector<DaffCartStateRootSlice<T, V>, boolean>;
|
|
1305
|
+
selectHasBillingAddress: MemoizedSelector<DaffCartStateRootSlice<T, V>, boolean>;
|
|
1306
|
+
selectHasShippingAddress: MemoizedSelector<DaffCartStateRootSlice<T, V>, boolean>;
|
|
1307
|
+
selectHasShippingMethod: MemoizedSelector<DaffCartStateRootSlice<T, V>, boolean>;
|
|
1308
|
+
selectHasPaymentMethod: MemoizedSelector<DaffCartStateRootSlice<T, V>, boolean>;
|
|
1309
|
+
selectCanPlaceOrder: MemoizedSelector<DaffCartStateRootSlice<T, V>, boolean, DefaultProjectorFn<boolean>>;
|
|
1310
|
+
}
|
|
1354
1311
|
interface DaffCartFeatureMemoizedSelectors<T extends DaffCart = DaffCart, V extends DaffCartOrderResult = DaffCartOrderResult> {
|
|
1355
|
-
|
|
1312
|
+
selectCartFeatureState: MemoizedSelector<DaffCartStateRootSlice<T, V>, DaffCartReducersState<T, V>>;
|
|
1356
1313
|
}
|
|
1357
|
-
|
|
1358
1314
|
interface DaffCartItemEntitiesMemoizedSelectors<T extends DaffCart = DaffCart, V extends DaffCartOrderResult = DaffCartOrderResult> {
|
|
1359
|
-
|
|
1360
|
-
|
|
1361
|
-
|
|
1362
|
-
|
|
1363
|
-
|
|
1364
|
-
|
|
1365
|
-
|
|
1366
|
-
|
|
1367
|
-
|
|
1368
|
-
|
|
1369
|
-
|
|
1370
|
-
|
|
1371
|
-
|
|
1372
|
-
|
|
1373
|
-
|
|
1374
|
-
|
|
1375
|
-
|
|
1376
|
-
|
|
1377
|
-
|
|
1378
|
-
}
|
|
1379
|
-
|
|
1315
|
+
selectCartItemEntitiesState: MemoizedSelector<DaffCartStateRootSlice<T, V>, DaffOperationEntityState<T['items'][number]>>;
|
|
1316
|
+
selectCartItemIds: MemoizedSelector<DaffCartStateRootSlice<T, V>, DaffOperationEntityState<T['items'][number]>['ids']>;
|
|
1317
|
+
selectCartItemEntities: MemoizedSelector<DaffCartStateRootSlice<T, V>, DaffOperationEntityState<T['items'][number]>['entities']>;
|
|
1318
|
+
selectAllCartItems: MemoizedSelector<DaffCartStateRootSlice<T, V>, DaffOperationEntity<T['items'][number]>[]>;
|
|
1319
|
+
selectCartItemTotal: MemoizedSelector<DaffCartStateRootSlice<T, V>, number>;
|
|
1320
|
+
selectCartItem: (id: T['items'][number]['id']) => MemoizedSelector<DaffCartStateRootSlice<T, V>, DaffOperationEntity<T['items'][number]>>;
|
|
1321
|
+
selectTotalNumberOfCartItems: MemoizedSelector<DaffCartStateRootSlice<T, V>, number>;
|
|
1322
|
+
selectCartItemConfiguredAttributes: (id: T['items'][number]['id']) => MemoizedSelector<DaffCartStateRootSlice<T, V>, DaffConfigurableCartItemAttribute[]>;
|
|
1323
|
+
selectCartItemCompositeOptions: (id: T['items'][number]['id']) => MemoizedSelector<DaffCartStateRootSlice<T, V>, DaffCompositeCartItemOption[]>;
|
|
1324
|
+
selectIsCartItemOutOfStock: (id: T['items'][number]['id']) => MemoizedSelector<DaffCartStateRootSlice<T, V>, boolean>;
|
|
1325
|
+
/**
|
|
1326
|
+
* Selects all cart items that are out of stock.
|
|
1327
|
+
*/
|
|
1328
|
+
selectOutOfStockCartItems: MemoizedSelector<DaffCartStateRootSlice<T, V>, DaffOperationEntity<T['items'][number]>[]>;
|
|
1329
|
+
/**
|
|
1330
|
+
* Selects all cart items that are in stock.
|
|
1331
|
+
*/
|
|
1332
|
+
selectInStockCartItems: MemoizedSelector<DaffCartStateRootSlice<T, V>, DaffOperationEntity<T['items'][number]>[]>;
|
|
1333
|
+
selectCartItemMutating: MemoizedSelector<DaffCartStateRootSlice<T, V>, boolean>;
|
|
1334
|
+
}
|
|
1335
|
+
/**
|
|
1336
|
+
* @deprecated Use {@link DaffCheckoutOrderMemoizedSelectors} instead. Deprecated in version 0.95.0. Will be removed in version 0.98.0.
|
|
1337
|
+
*/
|
|
1380
1338
|
interface DaffCartOrderMemoizedSelectors<T extends DaffCart = DaffCart, V extends DaffCartOrderResult = DaffCartOrderResult> {
|
|
1381
|
-
|
|
1382
|
-
|
|
1383
|
-
|
|
1384
|
-
|
|
1385
|
-
|
|
1386
|
-
|
|
1387
|
-
|
|
1388
|
-
|
|
1389
|
-
|
|
1390
|
-
|
|
1391
|
-
|
|
1392
|
-
|
|
1393
|
-
|
|
1394
|
-
|
|
1395
|
-
}
|
|
1396
|
-
|
|
1397
|
-
|
|
1398
|
-
|
|
1399
|
-
declare const
|
|
1400
|
-
|
|
1401
|
-
declare const DaffCartItemStateDebounceTime: _angular_core.InjectionToken<number>;
|
|
1402
|
-
declare const provideDaffCartItemStateDebounceTime: <R extends number = number>(value: R) => _angular_core.ValueProvider;
|
|
1403
|
-
|
|
1404
|
-
declare const DAFF_CART_ERROR_MATCHER: _angular_core.InjectionToken<typeof daffTransformErrorToStateError>;
|
|
1405
|
-
declare const provideDaffCartErrorMatcher: <R extends typeof daffTransformErrorToStateError = typeof daffTransformErrorToStateError>(value: R) => _angular_core.ValueProvider;
|
|
1406
|
-
|
|
1339
|
+
selectCartOrderState: MemoizedSelector<DaffCartStateRootSlice<T, V>, DaffCartOrderReducerState<V>>;
|
|
1340
|
+
/**
|
|
1341
|
+
* Selects whether there is a cart order operation in progress.
|
|
1342
|
+
*/
|
|
1343
|
+
selectCartOrderLoading: MemoizedSelector<DaffCartStateRootSlice<T, V>, boolean>;
|
|
1344
|
+
/**
|
|
1345
|
+
* Selects whether there is a place order operation in progress.
|
|
1346
|
+
*/
|
|
1347
|
+
selectCartOrderMutating: MemoizedSelector<DaffCartStateRootSlice<T, V>, boolean>;
|
|
1348
|
+
selectCartOrderErrors: MemoizedSelector<DaffCartStateRootSlice<T, V>, DaffCartOrderReducerState<V>['errors']>;
|
|
1349
|
+
selectCartOrderValue: MemoizedSelector<DaffCartStateRootSlice<T, V>, DaffCartOrderReducerState<V>['cartOrderResult']>;
|
|
1350
|
+
selectCartOrderId: MemoizedSelector<DaffCartStateRootSlice<T, V>, DaffCartOrderReducerState<V>['cartOrderResult']['orderId']>;
|
|
1351
|
+
selectCartOrderCartId: MemoizedSelector<DaffCartStateRootSlice<T, V>, DaffCartOrderReducerState<V>['cartOrderResult']['cartId']>;
|
|
1352
|
+
selectHasOrderResult: MemoizedSelector<DaffCartStateRootSlice<T, V>, boolean>;
|
|
1353
|
+
}
|
|
1354
|
+
export interface DaffCartMemoizedSelectors<T extends DaffCart = DaffCart, V extends DaffCartOrderResult = DaffCartOrderResult> extends DaffCartFeatureMemoizedSelectors<T, V>, DaffCartOrderMemoizedSelectors<T, V>, DaffCartStateMemoizedSelectors<T>, DaffCartItemEntitiesMemoizedSelectors<T, V> {}
|
|
1355
|
+
export declare const getDaffCartSelectors: <T extends DaffCart = DaffCart, V extends DaffCartOrderResult = DaffCartOrderResult>() => DaffCartMemoizedSelectors<T, V>;
|
|
1356
|
+
export declare const DaffCartItemStateDebounceTime: import("@angular/core").InjectionToken<number>, provideDaffCartItemStateDebounceTime: <R extends number = number>(value: R) => import("@angular/core").ValueProvider;
|
|
1357
|
+
export declare const DAFF_CART_ERROR_MATCHER: import("@angular/core").InjectionToken<typeof daffTransformErrorToStateError>, provideDaffCartErrorMatcher: <R extends typeof daffTransformErrorToStateError = typeof daffTransformErrorToStateError>(value: R) => import("@angular/core").ValueProvider;
|
|
1407
1358
|
/**
|
|
1408
1359
|
* A cart with stateful cart items.
|
|
1409
1360
|
*/
|
|
1410
|
-
interface DaffStatefulCart extends DaffCart {
|
|
1411
|
-
|
|
1412
|
-
}
|
|
1413
|
-
|
|
1414
|
-
|
|
1415
|
-
|
|
1416
|
-
|
|
1417
|
-
|
|
1418
|
-
|
|
1419
|
-
|
|
1420
|
-
|
|
1421
|
-
|
|
1422
|
-
|
|
1423
|
-
|
|
1424
|
-
|
|
1425
|
-
|
|
1426
|
-
|
|
1427
|
-
|
|
1428
|
-
|
|
1429
|
-
|
|
1430
|
-
|
|
1431
|
-
|
|
1432
|
-
|
|
1433
|
-
|
|
1434
|
-
|
|
1435
|
-
|
|
1436
|
-
|
|
1437
|
-
|
|
1438
|
-
|
|
1439
|
-
|
|
1440
|
-
|
|
1441
|
-
|
|
1442
|
-
|
|
1443
|
-
|
|
1444
|
-
|
|
1445
|
-
|
|
1446
|
-
|
|
1447
|
-
|
|
1448
|
-
|
|
1449
|
-
|
|
1450
|
-
|
|
1451
|
-
|
|
1452
|
-
|
|
1453
|
-
|
|
1454
|
-
|
|
1455
|
-
|
|
1456
|
-
|
|
1457
|
-
|
|
1458
|
-
|
|
1459
|
-
|
|
1460
|
-
|
|
1461
|
-
|
|
1462
|
-
|
|
1463
|
-
|
|
1464
|
-
|
|
1465
|
-
|
|
1466
|
-
|
|
1467
|
-
|
|
1468
|
-
|
|
1469
|
-
|
|
1470
|
-
|
|
1471
|
-
|
|
1472
|
-
|
|
1473
|
-
|
|
1474
|
-
|
|
1475
|
-
|
|
1476
|
-
|
|
1477
|
-
|
|
1478
|
-
|
|
1479
|
-
|
|
1480
|
-
|
|
1481
|
-
|
|
1482
|
-
|
|
1483
|
-
|
|
1484
|
-
|
|
1485
|
-
|
|
1486
|
-
|
|
1487
|
-
|
|
1488
|
-
|
|
1489
|
-
|
|
1490
|
-
|
|
1491
|
-
|
|
1492
|
-
|
|
1493
|
-
|
|
1494
|
-
|
|
1495
|
-
|
|
1496
|
-
|
|
1497
|
-
|
|
1498
|
-
|
|
1499
|
-
|
|
1500
|
-
|
|
1501
|
-
|
|
1502
|
-
|
|
1503
|
-
|
|
1504
|
-
|
|
1505
|
-
|
|
1506
|
-
|
|
1507
|
-
|
|
1508
|
-
|
|
1509
|
-
|
|
1510
|
-
|
|
1511
|
-
|
|
1512
|
-
|
|
1513
|
-
|
|
1514
|
-
|
|
1515
|
-
|
|
1516
|
-
|
|
1517
|
-
|
|
1518
|
-
|
|
1519
|
-
|
|
1520
|
-
|
|
1521
|
-
|
|
1522
|
-
|
|
1523
|
-
|
|
1524
|
-
|
|
1525
|
-
|
|
1526
|
-
|
|
1527
|
-
|
|
1528
|
-
|
|
1529
|
-
|
|
1530
|
-
|
|
1531
|
-
|
|
1532
|
-
|
|
1533
|
-
|
|
1534
|
-
|
|
1535
|
-
|
|
1536
|
-
|
|
1537
|
-
|
|
1538
|
-
|
|
1539
|
-
|
|
1540
|
-
|
|
1541
|
-
|
|
1542
|
-
|
|
1543
|
-
|
|
1544
|
-
|
|
1545
|
-
|
|
1546
|
-
|
|
1547
|
-
|
|
1548
|
-
|
|
1549
|
-
|
|
1550
|
-
|
|
1551
|
-
|
|
1552
|
-
|
|
1553
|
-
|
|
1554
|
-
|
|
1555
|
-
|
|
1556
|
-
|
|
1557
|
-
|
|
1558
|
-
|
|
1559
|
-
|
|
1560
|
-
|
|
1561
|
-
|
|
1562
|
-
|
|
1563
|
-
|
|
1564
|
-
|
|
1565
|
-
|
|
1566
|
-
|
|
1567
|
-
|
|
1568
|
-
|
|
1569
|
-
|
|
1570
|
-
|
|
1571
|
-
|
|
1572
|
-
|
|
1573
|
-
|
|
1574
|
-
|
|
1575
|
-
|
|
1576
|
-
|
|
1577
|
-
|
|
1578
|
-
|
|
1579
|
-
|
|
1580
|
-
|
|
1581
|
-
|
|
1582
|
-
|
|
1583
|
-
|
|
1584
|
-
|
|
1585
|
-
|
|
1586
|
-
|
|
1587
|
-
|
|
1588
|
-
|
|
1589
|
-
|
|
1590
|
-
|
|
1591
|
-
|
|
1592
|
-
|
|
1593
|
-
|
|
1594
|
-
|
|
1595
|
-
|
|
1596
|
-
|
|
1597
|
-
|
|
1598
|
-
|
|
1599
|
-
|
|
1600
|
-
|
|
1601
|
-
|
|
1602
|
-
|
|
1603
|
-
|
|
1604
|
-
|
|
1605
|
-
|
|
1606
|
-
|
|
1607
|
-
|
|
1608
|
-
|
|
1609
|
-
|
|
1610
|
-
|
|
1611
|
-
|
|
1612
|
-
|
|
1613
|
-
|
|
1614
|
-
|
|
1615
|
-
|
|
1616
|
-
|
|
1617
|
-
|
|
1618
|
-
|
|
1619
|
-
|
|
1620
|
-
|
|
1621
|
-
|
|
1622
|
-
|
|
1623
|
-
|
|
1361
|
+
export interface DaffStatefulCart extends DaffCart {
|
|
1362
|
+
items: Array<DaffOperationEntity<DaffCartItem | DaffCompositeCartItem | DaffConfigurableCartItem>>;
|
|
1363
|
+
}
|
|
1364
|
+
/**
|
|
1365
|
+
* @deprecated in favor of {@link provideDaffCartState} Deprecated in version 0.95.0. Will be removed in version 0.98.0.
|
|
1366
|
+
*/
|
|
1367
|
+
export declare class DaffCartStateModule {
|
|
1368
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<DaffCartStateModule, never>;
|
|
1369
|
+
static ɵmod: i0.ɵɵNgModuleDeclaration<DaffCartStateModule, never, [typeof i1.StoreFeatureModule, typeof i2.EffectsFeatureModule], never>;
|
|
1370
|
+
static ɵinj: i0.ɵɵInjectorDeclaration<DaffCartStateModule>;
|
|
1371
|
+
}
|
|
1372
|
+
/**
|
|
1373
|
+
* Provides the `@daffodil/cart/state` feature state and effects.
|
|
1374
|
+
*/
|
|
1375
|
+
export declare const provideDaffCartState: () => EnvironmentProviders;
|
|
1376
|
+
export interface DaffCartFacadeInterface<T extends DaffCart = DaffCart, V extends DaffCartOrderResult = DaffCartOrderResult> extends DaffStoreFacade<Action> {
|
|
1377
|
+
cart$: Observable<T>;
|
|
1378
|
+
resolved$: Observable<DaffCartResolveState>;
|
|
1379
|
+
/**
|
|
1380
|
+
* The object that holds all the loading states for cart operations.
|
|
1381
|
+
*/
|
|
1382
|
+
loadingObject$: Observable<DaffCartLoading>;
|
|
1383
|
+
/**
|
|
1384
|
+
* Whether there is any cart operation in progress.
|
|
1385
|
+
* This includes operations specifically for cart subfields.
|
|
1386
|
+
*/
|
|
1387
|
+
featureLoading$: Observable<boolean>;
|
|
1388
|
+
/**
|
|
1389
|
+
* Whether there is any cart resolve operation in progress.
|
|
1390
|
+
* This includes operations for cart subfields.
|
|
1391
|
+
* This pertains only to requests that do not mutate data such as "load" or "list".
|
|
1392
|
+
*/
|
|
1393
|
+
featureResolving$: Observable<boolean>;
|
|
1394
|
+
/**
|
|
1395
|
+
* Whether there is any cart mutate operation in progress.
|
|
1396
|
+
* This includes operations for cart subfields.
|
|
1397
|
+
* This pertains only to requests that mutate data such as "update".
|
|
1398
|
+
*/
|
|
1399
|
+
featureMutating$: Observable<boolean>;
|
|
1400
|
+
/**
|
|
1401
|
+
* Whether there is a cart operation in progress.
|
|
1402
|
+
* This does not include operations specifically for cart subfields.
|
|
1403
|
+
*/
|
|
1404
|
+
loading$: Observable<boolean>;
|
|
1405
|
+
/**
|
|
1406
|
+
* Whether there is a cart resolve operation in progress.
|
|
1407
|
+
* This does not include operations specifically for cart subfields.
|
|
1408
|
+
* This pertains only to requests that do not mutate data such as "load" or "list".
|
|
1409
|
+
*/
|
|
1410
|
+
resolving$: Observable<boolean>;
|
|
1411
|
+
/**
|
|
1412
|
+
* Whether there is a cart mutate operation in progress.
|
|
1413
|
+
* This does not include operations specifically for cart subfields.
|
|
1414
|
+
* This pertains only to requests that mutate data such as "update".
|
|
1415
|
+
*/
|
|
1416
|
+
mutating$: Observable<boolean>;
|
|
1417
|
+
/**
|
|
1418
|
+
* Whether there is a cart billing address operation in progress.
|
|
1419
|
+
*/
|
|
1420
|
+
billingAddressLoading$: Observable<boolean>;
|
|
1421
|
+
/**
|
|
1422
|
+
* Whether there is a cart billing address resolve operation in progress.
|
|
1423
|
+
* This pertains only to requests that do not mutate data such as "load" or "list".
|
|
1424
|
+
*/
|
|
1425
|
+
billingAddressResolving$: Observable<boolean>;
|
|
1426
|
+
/**
|
|
1427
|
+
* Whether there is a cart billing address mutate operation in progress.
|
|
1428
|
+
* This pertains only to requests that mutate data such as "update".
|
|
1429
|
+
*/
|
|
1430
|
+
billingAddressMutating$: Observable<boolean>;
|
|
1431
|
+
/**
|
|
1432
|
+
* Whether there is a cart shipping address operation in progress.
|
|
1433
|
+
*/
|
|
1434
|
+
shippingAddressLoading$: Observable<boolean>;
|
|
1435
|
+
/**
|
|
1436
|
+
* Whether there is a cart shipping address resolve operation in progress.
|
|
1437
|
+
* This pertains only to requests that do not mutate data such as "load" or "list".
|
|
1438
|
+
*/
|
|
1439
|
+
shippingAddressResolving$: Observable<boolean>;
|
|
1440
|
+
/**
|
|
1441
|
+
* Whether there is a cart shipping address mutate operation in progress.
|
|
1442
|
+
* This pertains only to requests that mutate data such as "update".
|
|
1443
|
+
*/
|
|
1444
|
+
shippingAddressMutating$: Observable<boolean>;
|
|
1445
|
+
/**
|
|
1446
|
+
* Whether there is a cart shipping information operation in progress.
|
|
1447
|
+
*/
|
|
1448
|
+
shippingInformationLoading$: Observable<boolean>;
|
|
1449
|
+
/**
|
|
1450
|
+
* Whether there is a cart shipping information resolve operation in progress.
|
|
1451
|
+
* This pertains only to requests that do not mutate data such as "load" or "list".
|
|
1452
|
+
*/
|
|
1453
|
+
shippingInformationResolving$: Observable<boolean>;
|
|
1454
|
+
/**
|
|
1455
|
+
* Whether there is a cart shipping information mutate operation in progress.
|
|
1456
|
+
* This pertains only to requests that mutate data such as "update".
|
|
1457
|
+
*/
|
|
1458
|
+
shippingInformationMutating$: Observable<boolean>;
|
|
1459
|
+
/**
|
|
1460
|
+
* Whether there is a cart shipping methods operation in progress.
|
|
1461
|
+
*/
|
|
1462
|
+
shippingMethodsLoading$: Observable<boolean>;
|
|
1463
|
+
/**
|
|
1464
|
+
* Whether there is a cart shipping methods resolve operation in progress.
|
|
1465
|
+
* This pertains only to requests that do not mutate data such as "load" or "list".
|
|
1466
|
+
*/
|
|
1467
|
+
shippingMethodsResolving$: Observable<boolean>;
|
|
1468
|
+
/**
|
|
1469
|
+
* Whether there is a cart payment operation in progress.
|
|
1470
|
+
*/
|
|
1471
|
+
paymentLoading$: Observable<boolean>;
|
|
1472
|
+
/**
|
|
1473
|
+
* Whether there is a cart payment resolve operation in progress.
|
|
1474
|
+
* This pertains only to requests that do not mutate data such as "load" or "list".
|
|
1475
|
+
*/
|
|
1476
|
+
paymentResolving$: Observable<boolean>;
|
|
1477
|
+
/**
|
|
1478
|
+
* Whether there is a cart payment mutate operation in progress.
|
|
1479
|
+
* This pertains only to requests that mutate data such as "update".
|
|
1480
|
+
*/
|
|
1481
|
+
paymentMutating$: Observable<boolean>;
|
|
1482
|
+
/**
|
|
1483
|
+
* Whether there is a cart payment methods operation in progress.
|
|
1484
|
+
*/
|
|
1485
|
+
paymentMethodsLoading$: Observable<boolean>;
|
|
1486
|
+
/**
|
|
1487
|
+
* Whether there is a cart payment methods resolve operation in progress.
|
|
1488
|
+
* This pertains only to requests that do not mutate data such as "load" or "list".
|
|
1489
|
+
*/
|
|
1490
|
+
paymentMethodsResolving$: Observable<boolean>;
|
|
1491
|
+
/**
|
|
1492
|
+
* Whether there is a cart coupon operation in progress.
|
|
1493
|
+
*/
|
|
1494
|
+
couponLoading$: Observable<boolean>;
|
|
1495
|
+
/**
|
|
1496
|
+
* Whether there is a cart coupon resolve operation in progress.
|
|
1497
|
+
* This pertains only to requests that do not mutate data such as "load" or "list".
|
|
1498
|
+
*/
|
|
1499
|
+
couponResolving$: Observable<boolean>;
|
|
1500
|
+
/**
|
|
1501
|
+
* Whether there is a cart coupon mutate operation in progress.
|
|
1502
|
+
* This pertains only to requests that mutate data such as "update".
|
|
1503
|
+
*/
|
|
1504
|
+
couponMutating$: Observable<boolean>;
|
|
1505
|
+
/**
|
|
1506
|
+
* Whether there is a cart item operation in progress.
|
|
1507
|
+
*/
|
|
1508
|
+
itemLoading$: Observable<boolean>;
|
|
1509
|
+
/**
|
|
1510
|
+
* Whether there is a cart item add operation in progress.
|
|
1511
|
+
*/
|
|
1512
|
+
itemAdding$: Observable<boolean>;
|
|
1513
|
+
/**
|
|
1514
|
+
* Whether there is a cart item resolve operation in progress.
|
|
1515
|
+
* This pertains only to requests that do not mutate data such as "load" or "list".
|
|
1516
|
+
*/
|
|
1517
|
+
itemResolving$: Observable<boolean>;
|
|
1518
|
+
/**
|
|
1519
|
+
* Whether there is a cart item mutate operation in progress.
|
|
1520
|
+
* This pertains only to requests that mutate data such as "update".
|
|
1521
|
+
*/
|
|
1522
|
+
itemMutating$: Observable<boolean>;
|
|
1523
|
+
errors$: Observable<DaffCartErrors>;
|
|
1524
|
+
cartErrors$: Observable<DaffCartErrors[DaffCartOperationType.Cart]>;
|
|
1525
|
+
itemErrors$: Observable<DaffCartErrors[DaffCartOperationType.Item]>;
|
|
1526
|
+
billingAddressErrors$: Observable<DaffCartErrors[DaffCartOperationType.BillingAddress]>;
|
|
1527
|
+
shippingAddressErrors$: Observable<DaffCartErrors[DaffCartOperationType.ShippingAddress]>;
|
|
1528
|
+
shippingInformationErrors$: Observable<DaffCartErrors[DaffCartOperationType.ShippingInformation]>;
|
|
1529
|
+
shippingMethodsErrors$: Observable<DaffCartErrors[DaffCartOperationType.ShippingMethods]>;
|
|
1530
|
+
paymentErrors$: Observable<DaffCartErrors[DaffCartOperationType.Payment]>;
|
|
1531
|
+
paymentMethodsErrors$: Observable<DaffCartErrors[DaffCartOperationType.PaymentMethods]>;
|
|
1532
|
+
couponErrors$: Observable<DaffCartErrors[DaffCartOperationType.Coupon]>;
|
|
1533
|
+
/**
|
|
1534
|
+
* A list of the cart items.
|
|
1535
|
+
*/
|
|
1536
|
+
itemEntities$: Observable<DaffOperationEntity<T['items'][number]>[]>;
|
|
1537
|
+
/**
|
|
1538
|
+
* The total number of cart items, taking into account the quantity of each cart item.
|
|
1539
|
+
*/
|
|
1540
|
+
totalItems$: Observable<number>;
|
|
1541
|
+
hasOutOfStockItems$: Observable<boolean>;
|
|
1542
|
+
/**
|
|
1543
|
+
* All cart items that are out of stock.
|
|
1544
|
+
*/
|
|
1545
|
+
outOfStockItems$: Observable<DaffOperationEntity<T['items'][number]>[]>;
|
|
1546
|
+
/**
|
|
1547
|
+
* All cart items that are in stock.
|
|
1548
|
+
*/
|
|
1549
|
+
inStockItems$: Observable<DaffOperationEntity<T['items'][number]>[]>;
|
|
1550
|
+
itemDictionary$: Observable<Dictionary<DaffOperationEntity<T['items'][number]>>>;
|
|
1551
|
+
/**
|
|
1552
|
+
* The user-defined platform-agnostic payment identifier that corresponds to the cart's current (platform-specific) payment method.
|
|
1553
|
+
* Define the mapping with the `DaffCartPaymentMethodIdMap` injection token.
|
|
1554
|
+
*
|
|
1555
|
+
* @see DaffCartPaymentMethodIdMap
|
|
1556
|
+
*/
|
|
1557
|
+
paymentId$: Observable<any>;
|
|
1558
|
+
isCartEmpty$: Observable<boolean>;
|
|
1559
|
+
/**
|
|
1560
|
+
* Whether the cart's shipping address equals the billing address.
|
|
1561
|
+
* Returns false if either address is null or undefined.
|
|
1562
|
+
*/
|
|
1563
|
+
isBillingSameAsShipping$: Observable<boolean>;
|
|
1564
|
+
hasBillingAddress$: Observable<boolean>;
|
|
1565
|
+
hasShippingAddress$: Observable<boolean>;
|
|
1566
|
+
hasShippingMethod$: Observable<boolean>;
|
|
1567
|
+
hasPaymentMethod$: Observable<boolean>;
|
|
1568
|
+
canPlaceOrder$: Observable<boolean>;
|
|
1569
|
+
orderResultLoading$: Observable<boolean>;
|
|
1570
|
+
orderResultErrors$: Observable<DaffStateError[]>;
|
|
1571
|
+
orderResult$: Observable<V>;
|
|
1572
|
+
orderResultId$: Observable<V['orderId']>;
|
|
1573
|
+
orderResultCartId$: Observable<V['cartId']>;
|
|
1574
|
+
hasOrderResult$: Observable<boolean>;
|
|
1575
|
+
getConfiguredCartItemAttributes(itemId: T['items'][number]['id']): Observable<DaffConfigurableCartItemAttribute[]>;
|
|
1576
|
+
getCompositeCartItemOptions(itemId: T['items'][number]['id']): Observable<DaffCompositeCartItemOption[]>;
|
|
1577
|
+
isCartItemOutOfStock(itemId: T['items'][number]['id']): Observable<boolean>;
|
|
1578
|
+
}
|
|
1624
1579
|
/**
|
|
1625
1580
|
* @inheritdoc
|
|
1626
1581
|
*/
|
|
1627
|
-
declare class DaffCartFacade<T extends DaffCart = DaffCart, V extends DaffCartOrderResult = DaffCartOrderResult> implements DaffCartFacadeInterface<T, V> {
|
|
1628
|
-
|
|
1629
|
-
|
|
1630
|
-
|
|
1631
|
-
|
|
1632
|
-
|
|
1633
|
-
|
|
1634
|
-
|
|
1635
|
-
|
|
1636
|
-
|
|
1637
|
-
|
|
1638
|
-
|
|
1639
|
-
|
|
1640
|
-
|
|
1641
|
-
|
|
1642
|
-
|
|
1643
|
-
|
|
1644
|
-
|
|
1645
|
-
|
|
1646
|
-
|
|
1647
|
-
|
|
1648
|
-
|
|
1649
|
-
|
|
1650
|
-
|
|
1651
|
-
|
|
1652
|
-
|
|
1653
|
-
|
|
1654
|
-
|
|
1655
|
-
|
|
1656
|
-
|
|
1657
|
-
|
|
1658
|
-
|
|
1659
|
-
|
|
1660
|
-
|
|
1661
|
-
|
|
1662
|
-
|
|
1663
|
-
|
|
1664
|
-
|
|
1665
|
-
|
|
1666
|
-
|
|
1667
|
-
|
|
1668
|
-
|
|
1669
|
-
|
|
1670
|
-
|
|
1671
|
-
|
|
1672
|
-
|
|
1673
|
-
|
|
1674
|
-
|
|
1675
|
-
|
|
1676
|
-
|
|
1677
|
-
|
|
1678
|
-
|
|
1679
|
-
|
|
1680
|
-
|
|
1681
|
-
|
|
1682
|
-
|
|
1683
|
-
|
|
1684
|
-
|
|
1685
|
-
|
|
1686
|
-
|
|
1687
|
-
|
|
1688
|
-
|
|
1689
|
-
|
|
1690
|
-
|
|
1691
|
-
|
|
1692
|
-
|
|
1693
|
-
|
|
1694
|
-
|
|
1695
|
-
|
|
1696
|
-
|
|
1697
|
-
|
|
1698
|
-
|
|
1699
|
-
|
|
1700
|
-
|
|
1701
|
-
|
|
1702
|
-
}
|
|
1703
|
-
|
|
1704
|
-
export { DAFF_CART_ERROR_MATCHER, DAFF_CART_EXTRA_REDUCERS, DAFF_CART_META_REDUCERS, DAFF_CART_RETRIEVAL_ACTIONS, DAFF_CART_STORE_FEATURE_KEY, DaffAddToCart, DaffAddToCartFailure, DaffAddToCartSuccess, DaffCartActionTypes, DaffCartAddressActionTypes, DaffCartAddressUpdate, DaffCartAddressUpdateFailure, DaffCartAddressUpdateSuccess, DaffCartBillingAddressActionTypes, DaffCartBillingAddressLoad, DaffCartBillingAddressLoadFailure, DaffCartBillingAddressLoadSuccess, DaffCartBillingAddressUpdate, DaffCartBillingAddressUpdateFailure, DaffCartBillingAddressUpdateSuccess, DaffCartClear, DaffCartClearFailure, DaffCartClearSuccess, DaffCartCouponActionTypes, DaffCartCouponApply, DaffCartCouponApplyFailure, DaffCartCouponApplySuccess, DaffCartCouponClearErrors, DaffCartCouponList, DaffCartCouponListFailure, DaffCartCouponListSuccess, DaffCartCouponRemove, DaffCartCouponRemoveAll, DaffCartCouponRemoveAllFailure, DaffCartCouponRemoveAllSuccess, DaffCartCouponRemoveFailure, DaffCartCouponRemoveSuccess, DaffCartCreate, DaffCartCreateFailure, DaffCartCreateSuccess, DaffCartFacade, DaffCartItemActionTypes, DaffCartItemAdd, DaffCartItemAddFailure, DaffCartItemAddSuccess, DaffCartItemDelete, DaffCartItemDeleteFailure, DaffCartItemDeleteOutOfStock, DaffCartItemDeleteOutOfStockFailure, DaffCartItemDeleteOutOfStockSuccess, DaffCartItemDeleteSuccess, DaffCartItemList, DaffCartItemListFailure, DaffCartItemListSuccess, DaffCartItemLoad, DaffCartItemLoadFailure, DaffCartItemLoadSuccess, DaffCartItemStateDebounceTime, DaffCartItemStateReset, DaffCartItemUpdate, DaffCartItemUpdateFailure, DaffCartItemUpdateSuccess, DaffCartLoad, DaffCartLoadFailure, DaffCartLoadPartialSuccess, DaffCartLoadSuccess, DaffCartOperationType, DaffCartOrderActionTypes, DaffCartPaymentActionTypes, DaffCartPaymentLoad, DaffCartPaymentLoadFailure, DaffCartPaymentLoadSuccess, DaffCartPaymentMethodAdd, DaffCartPaymentMethodsActionTypes, DaffCartPaymentMethodsLoad, DaffCartPaymentMethodsLoadFailure, DaffCartPaymentMethodsLoadSuccess, DaffCartPaymentRemove, DaffCartPaymentRemoveFailure, DaffCartPaymentRemoveSuccess, DaffCartPaymentUpdate, DaffCartPaymentUpdateFailure, DaffCartPaymentUpdateSuccess, DaffCartPaymentUpdateWithBilling, DaffCartPaymentUpdateWithBillingFailure, DaffCartPaymentUpdateWithBillingSuccess, DaffCartPlaceOrder, DaffCartPlaceOrderFailure, DaffCartPlaceOrderFailureFromOutOfStockProduct, DaffCartPlaceOrderSuccess, DaffCartResolveState, DaffCartShippingAddressActionTypes, DaffCartShippingAddressLoad, DaffCartShippingAddressLoadFailure, DaffCartShippingAddressLoadSuccess, DaffCartShippingAddressUpdate, DaffCartShippingAddressUpdateFailure, DaffCartShippingAddressUpdateSuccess, DaffCartShippingInformationActionTypes, DaffCartShippingInformationDelete, DaffCartShippingInformationDeleteFailure, DaffCartShippingInformationDeleteSuccess, DaffCartShippingInformationLoad, DaffCartShippingInformationLoadFailure, DaffCartShippingInformationLoadSuccess, DaffCartShippingInformationUpdate, DaffCartShippingInformationUpdateFailure, DaffCartShippingInformationUpdateSuccess, DaffCartShippingMethodsActionTypes, DaffCartShippingMethodsLoad, DaffCartShippingMethodsLoadFailure, DaffCartShippingMethodsLoadSuccess, DaffCartStateModule, DaffCartStorageFailure, DaffResolveCart, DaffResolveCartFailure, DaffResolveCartPartialSuccess, DaffResolveCartServerSide, DaffResolveCartSuccess, daffCartItemEntitiesAdapter, daffCartItemEntitiesRetrievalActionsReducerFactory, daffCartOrderInitialState, daffCartOrderReducer, daffCartPaymentProcessorUpdate, daffCartPlaceOrderFailureFromOutOfStockProductCartRetreivalInjection, daffCartProvideExtraReducers, daffCartProvideMetaReducerFactories, daffCartProvideMetaReducers, daffCartProvideRetrievalActions, daffCartReducer, daffCartReducerInitialState, daffCartReducers, daffCartRetrievalActionsReducerFactory, daffCartRetrievalGetResponse, daffCartRetrivalActions, getDaffCartSelectors, initializeLoadingSetter, provideDaffCartErrorMatcher, provideDaffCartItemStateDebounceTime };
|
|
1705
|
-
export type { DaffCartActions, DaffCartAddressActions, DaffCartBillingAddressActions, DaffCartCouponActions, DaffCartErrors, DaffCartFacadeInterface, DaffCartItemActions, DaffCartItemLoadingState, DaffCartLoading, DaffCartMemoizedSelectors, DaffCartOrderActions, DaffCartOrderReducerState, DaffCartPaymentActions, DaffCartPaymentMethodsActions, DaffCartReducerState, DaffCartReducersState, DaffCartRetrievalAction, DaffCartRetrievalActionDirectInjection, DaffCartRetrievalActionInjection, DaffCartRetrievalActionTransformedInjection, DaffCartShippingAddressActions, DaffCartShippingInformationActions, DaffCartShippingMethodsActions, DaffCartStateRootSlice, DaffStatefulCart };
|
|
1582
|
+
export declare class DaffCartFacade<T extends DaffCart = DaffCart, V extends DaffCartOrderResult = DaffCartOrderResult> implements DaffCartFacadeInterface<T, V> {
|
|
1583
|
+
private store;
|
|
1584
|
+
private paymentMethodMap;
|
|
1585
|
+
cart$: Observable<T>;
|
|
1586
|
+
resolved$: Observable<DaffCartResolveState>;
|
|
1587
|
+
loadingObject$: Observable<DaffCartLoading>;
|
|
1588
|
+
featureLoading$: Observable<boolean>;
|
|
1589
|
+
featureResolving$: Observable<boolean>;
|
|
1590
|
+
featureMutating$: Observable<boolean>;
|
|
1591
|
+
loading$: Observable<boolean>;
|
|
1592
|
+
resolving$: Observable<boolean>;
|
|
1593
|
+
mutating$: Observable<boolean>;
|
|
1594
|
+
billingAddressLoading$: Observable<boolean>;
|
|
1595
|
+
billingAddressResolving$: Observable<boolean>;
|
|
1596
|
+
billingAddressMutating$: Observable<boolean>;
|
|
1597
|
+
shippingAddressLoading$: Observable<boolean>;
|
|
1598
|
+
shippingAddressResolving$: Observable<boolean>;
|
|
1599
|
+
shippingAddressMutating$: Observable<boolean>;
|
|
1600
|
+
shippingInformationLoading$: Observable<boolean>;
|
|
1601
|
+
shippingInformationResolving$: Observable<boolean>;
|
|
1602
|
+
shippingInformationMutating$: Observable<boolean>;
|
|
1603
|
+
shippingMethodsLoading$: Observable<boolean>;
|
|
1604
|
+
shippingMethodsResolving$: Observable<boolean>;
|
|
1605
|
+
paymentLoading$: Observable<boolean>;
|
|
1606
|
+
paymentResolving$: Observable<boolean>;
|
|
1607
|
+
paymentMutating$: Observable<boolean>;
|
|
1608
|
+
paymentMethodsLoading$: Observable<boolean>;
|
|
1609
|
+
paymentMethodsResolving$: Observable<boolean>;
|
|
1610
|
+
couponLoading$: Observable<boolean>;
|
|
1611
|
+
couponResolving$: Observable<boolean>;
|
|
1612
|
+
couponMutating$: Observable<boolean>;
|
|
1613
|
+
itemLoading$: Observable<boolean>;
|
|
1614
|
+
itemAdding$: Observable<boolean>;
|
|
1615
|
+
itemResolving$: Observable<boolean>;
|
|
1616
|
+
itemMutating$: Observable<boolean>;
|
|
1617
|
+
errors$: Observable<DaffCartErrors>;
|
|
1618
|
+
cartErrors$: Observable<DaffCartErrors[DaffCartOperationType.Cart]>;
|
|
1619
|
+
itemErrors$: Observable<DaffCartErrors[DaffCartOperationType.Item]>;
|
|
1620
|
+
billingAddressErrors$: Observable<DaffCartErrors[DaffCartOperationType.BillingAddress]>;
|
|
1621
|
+
shippingAddressErrors$: Observable<DaffCartErrors[DaffCartOperationType.ShippingAddress]>;
|
|
1622
|
+
shippingInformationErrors$: Observable<DaffCartErrors[DaffCartOperationType.ShippingInformation]>;
|
|
1623
|
+
shippingMethodsErrors$: Observable<DaffCartErrors[DaffCartOperationType.ShippingMethods]>;
|
|
1624
|
+
paymentErrors$: Observable<DaffCartErrors[DaffCartOperationType.Payment]>;
|
|
1625
|
+
paymentMethodsErrors$: Observable<DaffCartErrors[DaffCartOperationType.PaymentMethods]>;
|
|
1626
|
+
couponErrors$: Observable<DaffCartErrors[DaffCartOperationType.Coupon]>;
|
|
1627
|
+
itemEntities$: Observable<DaffOperationEntity<T['items'][number]>[]>;
|
|
1628
|
+
totalItems$: Observable<number>;
|
|
1629
|
+
hasOutOfStockItems$: Observable<boolean>;
|
|
1630
|
+
outOfStockItems$: Observable<DaffOperationEntity<T['items'][number]>[]>;
|
|
1631
|
+
inStockItems$: Observable<DaffOperationEntity<T['items'][number]>[]>;
|
|
1632
|
+
itemDictionary$: Observable<Dictionary<DaffOperationEntity<T['items'][number]>>>;
|
|
1633
|
+
paymentId$: Observable<any>;
|
|
1634
|
+
isCartEmpty$: Observable<boolean>;
|
|
1635
|
+
isBillingSameAsShipping$: Observable<boolean>;
|
|
1636
|
+
hasBillingAddress$: Observable<boolean>;
|
|
1637
|
+
hasShippingAddress$: Observable<boolean>;
|
|
1638
|
+
hasShippingMethod$: Observable<boolean>;
|
|
1639
|
+
hasPaymentMethod$: Observable<boolean>;
|
|
1640
|
+
canPlaceOrder$: Observable<boolean>;
|
|
1641
|
+
orderResultLoading$: Observable<boolean>;
|
|
1642
|
+
orderResultErrors$: Observable<DaffStateError[]>;
|
|
1643
|
+
orderResult$: Observable<V>;
|
|
1644
|
+
orderResultId$: Observable<V['orderId']>;
|
|
1645
|
+
orderResultCartId$: Observable<V['cartId']>;
|
|
1646
|
+
hasOrderResult$: Observable<boolean>;
|
|
1647
|
+
private _selectCartItemConfiguredAttributes;
|
|
1648
|
+
private _selectCartItemCompositeOptions;
|
|
1649
|
+
private _selectIsCartItemOutOfStock;
|
|
1650
|
+
constructor(store: Store<DaffCartStateRootSlice<T, V>>, paymentMethodMap: object);
|
|
1651
|
+
getConfiguredCartItemAttributes(itemId: T['items'][number]['id']): Observable<DaffConfigurableCartItemAttribute[]>;
|
|
1652
|
+
getCompositeCartItemOptions(itemId: T['items'][number]['id']): Observable<DaffCompositeCartItemOption[]>;
|
|
1653
|
+
isCartItemOutOfStock(itemId: T['items'][number]['id']): Observable<boolean>;
|
|
1654
|
+
dispatch(action: Action): void;
|
|
1655
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<DaffCartFacade<any, any>, never>;
|
|
1656
|
+
static ɵprov: i0.ɵɵInjectableDeclaration<any>;
|
|
1657
|
+
}
|
|
1658
|
+
export {};
|