@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,999 +0,0 @@
|
|
|
1
|
-
import { DaffCartAddress, DaffCartPaymentMethod, DaffCartShippingRate, DaffCartItem, DaffCart, DaffCartItemInput } from '@daffodil/cart';
|
|
2
|
-
import * as i0 from '@angular/core';
|
|
3
|
-
import { ModuleWithProviders } from '@angular/core';
|
|
4
|
-
import { MagentoMoney, MagentoDiscount } from '@daffodil/driver/magento';
|
|
5
|
-
import { MagentoProductStockStatusEnum } from '@daffodil/product/driver/magento';
|
|
6
|
-
import { DocumentNode, GraphQLFormattedError } from 'graphql';
|
|
7
|
-
import * as apollo_angular from 'apollo-angular';
|
|
8
|
-
import { Apollo } from 'apollo-angular';
|
|
9
|
-
import { DaffError } from '@daffodil/core';
|
|
10
|
-
import { Observable } from 'rxjs';
|
|
11
|
-
import { DaffProductOutOfStockError, DaffCartServiceInterface, DaffCartItemServiceInterface, DaffCartPaymentServiceInterface, DaffCartPaymentMethodsServiceInterface, DaffCartAddressServiceInterface, DaffCartBillingAddressServiceInterface, DaffCartShippingAddressServiceInterface, DaffCartShippingMethodsServiceInterface, DaffCartShippingInformationServiceInterface } from '@daffodil/cart/driver';
|
|
12
|
-
import { DaffQueuedApollo } from '@daffodil/core/graphql';
|
|
13
|
-
import { DaffDriverResponse } from '@daffodil/driver';
|
|
14
|
-
import * as i1 from '@angular/common';
|
|
15
|
-
|
|
16
|
-
interface MagentoCartAddress {
|
|
17
|
-
region: {
|
|
18
|
-
code: string;
|
|
19
|
-
region_id: number;
|
|
20
|
-
};
|
|
21
|
-
country: {
|
|
22
|
-
code: string;
|
|
23
|
-
label: string;
|
|
24
|
-
};
|
|
25
|
-
street: string[];
|
|
26
|
-
company: string;
|
|
27
|
-
telephone: string;
|
|
28
|
-
postcode: string;
|
|
29
|
-
city: string;
|
|
30
|
-
firstname: string;
|
|
31
|
-
lastname: string;
|
|
32
|
-
email: string;
|
|
33
|
-
customer_address_id: number;
|
|
34
|
-
}
|
|
35
|
-
|
|
36
|
-
/**
|
|
37
|
-
* Transforms magento addresses into an object usable by daffodil.
|
|
38
|
-
*/
|
|
39
|
-
declare class DaffMagentoCartAddressTransformer {
|
|
40
|
-
/**
|
|
41
|
-
* Transforms the magento MagentoCart from the magento cart query into a DaffCartAddress.
|
|
42
|
-
*
|
|
43
|
-
* @param address the address from a magento cart query.
|
|
44
|
-
*/
|
|
45
|
-
transform(address: MagentoCartAddress): DaffCartAddress;
|
|
46
|
-
static ɵfac: i0.ɵɵFactoryDeclaration<DaffMagentoCartAddressTransformer, never>;
|
|
47
|
-
static ɵprov: i0.ɵɵInjectableDeclaration<DaffMagentoCartAddressTransformer>;
|
|
48
|
-
}
|
|
49
|
-
|
|
50
|
-
/**
|
|
51
|
-
* Transforms magento addresses into an object usable by daffodil.
|
|
52
|
-
*/
|
|
53
|
-
declare class DaffMagentoBillingAddressTransformer {
|
|
54
|
-
private addressTransformer;
|
|
55
|
-
constructor(addressTransformer: DaffMagentoCartAddressTransformer);
|
|
56
|
-
/**
|
|
57
|
-
* Transforms the magento MagentoCart from the magento cart query into a DaffCartAddress.
|
|
58
|
-
*
|
|
59
|
-
* @param address the address from a magento cart query.
|
|
60
|
-
*/
|
|
61
|
-
transform(address: MagentoCartAddress): DaffCartAddress;
|
|
62
|
-
static ɵfac: i0.ɵɵFactoryDeclaration<DaffMagentoBillingAddressTransformer, never>;
|
|
63
|
-
static ɵprov: i0.ɵɵInjectableDeclaration<DaffMagentoBillingAddressTransformer>;
|
|
64
|
-
}
|
|
65
|
-
|
|
66
|
-
interface MagentoCartPaymentMethod {
|
|
67
|
-
__typename?: string;
|
|
68
|
-
code: string;
|
|
69
|
-
purchase_order_number?: string;
|
|
70
|
-
title: string;
|
|
71
|
-
}
|
|
72
|
-
|
|
73
|
-
/**
|
|
74
|
-
* Transforms magento carts into an object usable by daffodil.
|
|
75
|
-
*/
|
|
76
|
-
declare class DaffMagentoCartPaymentTransformer {
|
|
77
|
-
/**
|
|
78
|
-
* Transforms the magento CartPayment from the magento cart query into a DaffCartPaymentMethod.
|
|
79
|
-
*
|
|
80
|
-
* @param responsePayment - the response from a magento cart query.
|
|
81
|
-
*/
|
|
82
|
-
transform(responsePayment: MagentoCartPaymentMethod): DaffCartPaymentMethod;
|
|
83
|
-
static ɵfac: i0.ɵɵFactoryDeclaration<DaffMagentoCartPaymentTransformer, never>;
|
|
84
|
-
static ɵprov: i0.ɵɵInjectableDeclaration<DaffMagentoCartPaymentTransformer>;
|
|
85
|
-
}
|
|
86
|
-
|
|
87
|
-
interface MagentoCartShippingMethod {
|
|
88
|
-
carrier_code: string;
|
|
89
|
-
method_code: string;
|
|
90
|
-
carrier_title: string;
|
|
91
|
-
method_title: string;
|
|
92
|
-
amount: MagentoMoney;
|
|
93
|
-
}
|
|
94
|
-
|
|
95
|
-
/**
|
|
96
|
-
* Transforms magento cart shipping methods into an object usable by daffodil.
|
|
97
|
-
*/
|
|
98
|
-
declare class DaffMagentoCartShippingRateTransformer {
|
|
99
|
-
/**
|
|
100
|
-
* Transforms the magento shipping method from the magento cart query into a DaffCartShippingRate.
|
|
101
|
-
*
|
|
102
|
-
* @param shippingMethod the shippingMethod from a magento cart query.
|
|
103
|
-
*/
|
|
104
|
-
transform(shippingMethod: MagentoCartShippingMethod): DaffCartShippingRate;
|
|
105
|
-
static ɵfac: i0.ɵɵFactoryDeclaration<DaffMagentoCartShippingRateTransformer, never>;
|
|
106
|
-
static ɵprov: i0.ɵɵInjectableDeclaration<DaffMagentoCartShippingRateTransformer>;
|
|
107
|
-
}
|
|
108
|
-
|
|
109
|
-
interface MagentoShippingAddress extends MagentoCartAddress {
|
|
110
|
-
available_shipping_methods: MagentoCartShippingMethod[];
|
|
111
|
-
selected_shipping_method: MagentoCartShippingMethod;
|
|
112
|
-
}
|
|
113
|
-
|
|
114
|
-
/**
|
|
115
|
-
* Transforms magento addresses into an object usable by daffodil.
|
|
116
|
-
*/
|
|
117
|
-
declare class DaffMagentoShippingAddressTransformer {
|
|
118
|
-
private addressTransformer;
|
|
119
|
-
constructor(addressTransformer: DaffMagentoCartAddressTransformer);
|
|
120
|
-
/**
|
|
121
|
-
* Transforms the magento MagentoCart from the magento cart query into a DaffCartAddress.
|
|
122
|
-
*
|
|
123
|
-
* @param address the address from a magento cart query.
|
|
124
|
-
*/
|
|
125
|
-
transform(address: MagentoShippingAddress): DaffCartAddress;
|
|
126
|
-
static ɵfac: i0.ɵɵFactoryDeclaration<DaffMagentoShippingAddressTransformer, never>;
|
|
127
|
-
static ɵprov: i0.ɵɵInjectableDeclaration<DaffMagentoShippingAddressTransformer>;
|
|
128
|
-
}
|
|
129
|
-
|
|
130
|
-
interface MagentoCartAddressInput {
|
|
131
|
-
city: string;
|
|
132
|
-
company?: string;
|
|
133
|
-
country_code: string;
|
|
134
|
-
firstname: string;
|
|
135
|
-
lastname: string;
|
|
136
|
-
postcode?: string;
|
|
137
|
-
region_id: number;
|
|
138
|
-
save_in_address_book: boolean;
|
|
139
|
-
street: string[];
|
|
140
|
-
telephone?: string;
|
|
141
|
-
}
|
|
142
|
-
|
|
143
|
-
interface MagentoCartAddressInputBase {
|
|
144
|
-
address?: MagentoCartAddressInput;
|
|
145
|
-
customer_address_id?: number;
|
|
146
|
-
}
|
|
147
|
-
|
|
148
|
-
interface MagentoBillingAddressInput extends MagentoCartAddressInputBase {
|
|
149
|
-
same_as_shipping?: boolean;
|
|
150
|
-
use_for_shipping?: boolean;
|
|
151
|
-
}
|
|
152
|
-
|
|
153
|
-
interface MagentoCartItemInput {
|
|
154
|
-
quantity: number;
|
|
155
|
-
sku: string;
|
|
156
|
-
parent_sku?: string;
|
|
157
|
-
selected_options?: string[];
|
|
158
|
-
entered_options?: MagentoEnteredOptionInput[];
|
|
159
|
-
}
|
|
160
|
-
interface MagentoEnteredOptionInput {
|
|
161
|
-
uid: string;
|
|
162
|
-
value: string;
|
|
163
|
-
}
|
|
164
|
-
|
|
165
|
-
interface MagentoCartItemUpdateInput {
|
|
166
|
-
cart_item_id: number;
|
|
167
|
-
quantity: number;
|
|
168
|
-
}
|
|
169
|
-
|
|
170
|
-
interface MagentoPaymentMethodInput {
|
|
171
|
-
code: string;
|
|
172
|
-
purchase_order_number?: string;
|
|
173
|
-
}
|
|
174
|
-
|
|
175
|
-
interface MagentoShippingAddressInput extends MagentoCartAddressInputBase {
|
|
176
|
-
customer_notes?: string;
|
|
177
|
-
}
|
|
178
|
-
|
|
179
|
-
interface MagentoShippingMethodInput {
|
|
180
|
-
carrier_code: string;
|
|
181
|
-
method_code: string;
|
|
182
|
-
}
|
|
183
|
-
|
|
184
|
-
declare enum MagentoCartUserInputErrorType {
|
|
185
|
-
PRODUCT_NOT_FOUND = "PRODUCT_NOT_FOUND",
|
|
186
|
-
NOT_SALABLE = "NOT_SALABLE",
|
|
187
|
-
INSUFFICIENT_STOCK = "INSUFFICIENT_STOCK",
|
|
188
|
-
UNDEFINED = "UNDEFINED"
|
|
189
|
-
}
|
|
190
|
-
|
|
191
|
-
interface MagentoCartUserInputError {
|
|
192
|
-
message: string;
|
|
193
|
-
code: MagentoCartUserInputErrorType;
|
|
194
|
-
}
|
|
195
|
-
|
|
196
|
-
interface MagentoCartCoupon {
|
|
197
|
-
__typename?: 'AppliedCoupon';
|
|
198
|
-
code: string;
|
|
199
|
-
}
|
|
200
|
-
|
|
201
|
-
declare enum MagentoCartItemTypeEnum {
|
|
202
|
-
Simple = "SimpleCartItem",
|
|
203
|
-
Bundle = "BundleCartItem",
|
|
204
|
-
Configurable = "ConfigurableCartItem"
|
|
205
|
-
}
|
|
206
|
-
interface MagentoCartItemProduct {
|
|
207
|
-
__typename: string;
|
|
208
|
-
id: number;
|
|
209
|
-
name: string;
|
|
210
|
-
sku: string;
|
|
211
|
-
url_key: string;
|
|
212
|
-
url_suffix: string;
|
|
213
|
-
thumbnail: {
|
|
214
|
-
__typename: string;
|
|
215
|
-
label: string;
|
|
216
|
-
url: string;
|
|
217
|
-
};
|
|
218
|
-
stock_status: MagentoProductStockStatusEnum;
|
|
219
|
-
}
|
|
220
|
-
/**
|
|
221
|
-
* An object for defining what the cart service requests and retrieves from a magento backend.
|
|
222
|
-
*/
|
|
223
|
-
interface MagentoCartItem {
|
|
224
|
-
__typename: MagentoCartItemTypeEnum;
|
|
225
|
-
id: string;
|
|
226
|
-
prices: {
|
|
227
|
-
price: MagentoMoney;
|
|
228
|
-
row_total: MagentoMoney;
|
|
229
|
-
discounts?: MagentoDiscount[];
|
|
230
|
-
};
|
|
231
|
-
product: MagentoCartItemProduct;
|
|
232
|
-
quantity: number;
|
|
233
|
-
}
|
|
234
|
-
/**
|
|
235
|
-
* An interface for magento bundled cart items.
|
|
236
|
-
*/
|
|
237
|
-
interface MagentoBundleCartItem extends MagentoCartItem {
|
|
238
|
-
bundle_options: {
|
|
239
|
-
id: number;
|
|
240
|
-
label: string;
|
|
241
|
-
type: string;
|
|
242
|
-
values: {
|
|
243
|
-
id: number;
|
|
244
|
-
label: string;
|
|
245
|
-
price: number;
|
|
246
|
-
quantity: number;
|
|
247
|
-
}[];
|
|
248
|
-
}[];
|
|
249
|
-
}
|
|
250
|
-
/**
|
|
251
|
-
* An interface for magento configurable cart items.
|
|
252
|
-
*/
|
|
253
|
-
interface MagentoConfigurableCartItem extends MagentoCartItem {
|
|
254
|
-
configurable_options: {
|
|
255
|
-
option_label: string;
|
|
256
|
-
value_label: string;
|
|
257
|
-
}[];
|
|
258
|
-
}
|
|
259
|
-
|
|
260
|
-
/**
|
|
261
|
-
* An object for defining what the cart service requests and retrieves from a magento backend.
|
|
262
|
-
*/
|
|
263
|
-
interface MagentoCart {
|
|
264
|
-
id: string;
|
|
265
|
-
email: string;
|
|
266
|
-
billing_address: MagentoCartAddress;
|
|
267
|
-
shipping_addresses: MagentoShippingAddress[];
|
|
268
|
-
items: MagentoCartItem[];
|
|
269
|
-
available_payment_methods: MagentoCartPaymentMethod[];
|
|
270
|
-
selected_payment_method: MagentoCartPaymentMethod;
|
|
271
|
-
applied_coupons: MagentoCartCoupon[];
|
|
272
|
-
prices: {
|
|
273
|
-
grand_total: MagentoMoney;
|
|
274
|
-
subtotal_excluding_tax: MagentoMoney;
|
|
275
|
-
subtotal_including_tax: MagentoMoney;
|
|
276
|
-
subtotal_with_discount_excluding_tax: MagentoMoney;
|
|
277
|
-
applied_taxes: {
|
|
278
|
-
amount: MagentoMoney;
|
|
279
|
-
label: string;
|
|
280
|
-
}[];
|
|
281
|
-
discounts?: {
|
|
282
|
-
amount: MagentoMoney;
|
|
283
|
-
label: string;
|
|
284
|
-
}[];
|
|
285
|
-
};
|
|
286
|
-
}
|
|
287
|
-
|
|
288
|
-
type DaffCartMagentoCartItemTransform<T extends MagentoCartItem = MagentoCartItem, V extends DaffCartItem = DaffCartItem> = (daffCartItem: DaffCartItem, magentoCartItem: T) => V;
|
|
289
|
-
|
|
290
|
-
/**
|
|
291
|
-
* A transform for the Magento driver that can add extra fields or otherwise modify the cart driver response.
|
|
292
|
-
*/
|
|
293
|
-
type DaffCartMagentoCartTransform<T extends MagentoCart = MagentoCart, V extends DaffCart = DaffCart> = (daffCart: DaffCart, magentoCart: T) => V;
|
|
294
|
-
|
|
295
|
-
/**
|
|
296
|
-
* Transforms magento carts into an object usable by daffodil.
|
|
297
|
-
*/
|
|
298
|
-
declare class DaffMagentoCartTransformer<T extends MagentoCart = MagentoCart, V extends DaffCart = DaffCart> {
|
|
299
|
-
private shippingAddressTransformer;
|
|
300
|
-
private billingAddressTransformer;
|
|
301
|
-
private paymentTransformer;
|
|
302
|
-
private shippingRateTransformer;
|
|
303
|
-
private cartItemTransforms;
|
|
304
|
-
private cartTransforms;
|
|
305
|
-
constructor(shippingAddressTransformer: DaffMagentoShippingAddressTransformer, billingAddressTransformer: DaffMagentoBillingAddressTransformer, paymentTransformer: DaffMagentoCartPaymentTransformer, shippingRateTransformer: DaffMagentoCartShippingRateTransformer, cartItemTransforms: DaffCartMagentoCartItemTransform[], cartTransforms: DaffCartMagentoCartTransform<T, V>[]);
|
|
306
|
-
private transformShippingAddress;
|
|
307
|
-
private transformBillingAddress;
|
|
308
|
-
private transformCartItems;
|
|
309
|
-
private transformCoupons;
|
|
310
|
-
private transformPayment;
|
|
311
|
-
private transformShippingInformation;
|
|
312
|
-
private transformShippingMethods;
|
|
313
|
-
private transformPaymentMethods;
|
|
314
|
-
/**
|
|
315
|
-
* Transforms the magento MagentoCart from the magento cart query into a DaffCart.
|
|
316
|
-
*
|
|
317
|
-
* @param cart the cart from a magento cart query.
|
|
318
|
-
*/
|
|
319
|
-
transform(cart: T): V;
|
|
320
|
-
static ɵfac: i0.ɵɵFactoryDeclaration<DaffMagentoCartTransformer<any, any>, never>;
|
|
321
|
-
static ɵprov: i0.ɵɵInjectableDeclaration<DaffMagentoCartTransformer<any, any>>;
|
|
322
|
-
}
|
|
323
|
-
|
|
324
|
-
declare class DaffMagentoCartAddressInputTransformer {
|
|
325
|
-
transform(cartAddress: Partial<DaffCartAddress>): MagentoCartAddressInput;
|
|
326
|
-
static ɵfac: i0.ɵɵFactoryDeclaration<DaffMagentoCartAddressInputTransformer, never>;
|
|
327
|
-
static ɵprov: i0.ɵɵInjectableDeclaration<DaffMagentoCartAddressInputTransformer>;
|
|
328
|
-
}
|
|
329
|
-
|
|
330
|
-
declare class DaffMagentoShippingAddressInputTransformer {
|
|
331
|
-
private cartAddressTransformer;
|
|
332
|
-
constructor(cartAddressTransformer: DaffMagentoCartAddressInputTransformer);
|
|
333
|
-
transform(cartAddress: Partial<DaffCartAddress>): MagentoShippingAddressInput;
|
|
334
|
-
static ɵfac: i0.ɵɵFactoryDeclaration<DaffMagentoShippingAddressInputTransformer, never>;
|
|
335
|
-
static ɵprov: i0.ɵɵInjectableDeclaration<DaffMagentoShippingAddressInputTransformer>;
|
|
336
|
-
}
|
|
337
|
-
|
|
338
|
-
declare class DaffMagentoBillingAddressInputTransformer {
|
|
339
|
-
private cartAddressTransformer;
|
|
340
|
-
constructor(cartAddressTransformer: DaffMagentoCartAddressInputTransformer);
|
|
341
|
-
transform(cartAddress: Partial<DaffCartAddress>): MagentoBillingAddressInput;
|
|
342
|
-
static ɵfac: i0.ɵɵFactoryDeclaration<DaffMagentoBillingAddressInputTransformer, never>;
|
|
343
|
-
static ɵprov: i0.ɵɵInjectableDeclaration<DaffMagentoBillingAddressInputTransformer>;
|
|
344
|
-
}
|
|
345
|
-
|
|
346
|
-
declare class DaffMagentoCartItemUpdateInputTransformer {
|
|
347
|
-
transform(item: Partial<DaffCartItem>): MagentoCartItemUpdateInput;
|
|
348
|
-
static ɵfac: i0.ɵɵFactoryDeclaration<DaffMagentoCartItemUpdateInputTransformer, never>;
|
|
349
|
-
static ɵprov: i0.ɵɵInjectableDeclaration<DaffMagentoCartItemUpdateInputTransformer>;
|
|
350
|
-
}
|
|
351
|
-
|
|
352
|
-
declare class DaffMagentoPaymentMethodInputTransformer {
|
|
353
|
-
transform(payment: Partial<DaffCartPaymentMethod>): MagentoPaymentMethodInput;
|
|
354
|
-
static ɵfac: i0.ɵɵFactoryDeclaration<DaffMagentoPaymentMethodInputTransformer, never>;
|
|
355
|
-
static ɵprov: i0.ɵɵInjectableDeclaration<DaffMagentoPaymentMethodInputTransformer>;
|
|
356
|
-
}
|
|
357
|
-
|
|
358
|
-
declare class DaffMagentoShippingMethodInputTransformer {
|
|
359
|
-
transform(method: Partial<DaffCartShippingRate>): MagentoShippingMethodInput;
|
|
360
|
-
static ɵfac: i0.ɵɵFactoryDeclaration<DaffMagentoShippingMethodInputTransformer, never>;
|
|
361
|
-
static ɵprov: i0.ɵɵInjectableDeclaration<DaffMagentoShippingMethodInputTransformer>;
|
|
362
|
-
}
|
|
363
|
-
|
|
364
|
-
declare const DAFF_CART_MAGENTO_EXTRA_CART_FRAGMENTS: i0.InjectionToken<DocumentNode[]>;
|
|
365
|
-
declare const provideDaffCartMagentoExtraCartFragments: <R extends DocumentNode = DocumentNode>(...values: R[]) => Array<i0.ValueProvider>;
|
|
366
|
-
declare const provideDaffCartMagentoExtraCartFragmentFactories: <R extends DocumentNode = DocumentNode>(...factories: (() => R)[]) => Array<i0.FactoryProvider>;
|
|
367
|
-
|
|
368
|
-
declare const DAFF_CART_MAGENTO_CART_ITEM_TRANSFORMS: i0.InjectionToken<DaffCartMagentoCartItemTransform[]>;
|
|
369
|
-
declare const provideDaffCartMagentoCartItemTransforms: <R extends DaffCartMagentoCartItemTransform = DaffCartMagentoCartItemTransform>(...values: R[]) => Array<i0.ValueProvider>;
|
|
370
|
-
declare const provideDaffCartMagentoCartItemTransformFactories: <R extends DaffCartMagentoCartItemTransform = DaffCartMagentoCartItemTransform>(...factories: (() => R)[]) => Array<i0.FactoryProvider>;
|
|
371
|
-
|
|
372
|
-
declare const DAFF_CART_MAGENTO_CART_TRANSFORMS: i0.InjectionToken<DaffCartMagentoCartTransform[]>;
|
|
373
|
-
declare const provideDaffCartMagentoCartTransforms: <R extends DaffCartMagentoCartTransform = DaffCartMagentoCartTransform>(...values: R[]) => Array<i0.ValueProvider>;
|
|
374
|
-
declare const provideDaffCartMagentoCartTransformFactories: <R extends DaffCartMagentoCartTransform = DaffCartMagentoCartTransform>(...factories: (() => R)[]) => Array<i0.FactoryProvider>;
|
|
375
|
-
|
|
376
|
-
declare const cartCouponFragment: apollo_angular.TypedDocumentNode<unknown, unknown>;
|
|
377
|
-
|
|
378
|
-
declare const cartAddressFragment: apollo_angular.TypedDocumentNode<unknown, unknown>;
|
|
379
|
-
|
|
380
|
-
declare const cartItemFragment: apollo_angular.TypedDocumentNode<unknown, unknown>;
|
|
381
|
-
|
|
382
|
-
declare const availablePaymentMethodFragment: apollo_angular.TypedDocumentNode<unknown, unknown>;
|
|
383
|
-
|
|
384
|
-
declare const selectedPaymentMethodFragment: apollo_angular.TypedDocumentNode<unknown, unknown>;
|
|
385
|
-
|
|
386
|
-
declare const availableShippingMethodFragment: apollo_angular.TypedDocumentNode<unknown, unknown>;
|
|
387
|
-
|
|
388
|
-
declare const selectedShippingMethodFragment: apollo_angular.TypedDocumentNode<unknown, unknown>;
|
|
389
|
-
|
|
390
|
-
declare const cartFragment: apollo_angular.TypedDocumentNode<unknown, unknown>;
|
|
391
|
-
|
|
392
|
-
declare const pricesFragment: apollo_angular.TypedDocumentNode<unknown, unknown>;
|
|
393
|
-
|
|
394
|
-
declare const magentoCartUserError: apollo_angular.TypedDocumentNode<unknown, unknown>;
|
|
395
|
-
|
|
396
|
-
interface MagentoGetCartResponse {
|
|
397
|
-
__typename: string;
|
|
398
|
-
cart: MagentoCart;
|
|
399
|
-
}
|
|
400
|
-
|
|
401
|
-
interface MagentoCartGetQueryVariables {
|
|
402
|
-
cartId: string;
|
|
403
|
-
}
|
|
404
|
-
|
|
405
|
-
declare const getCart: (extraCartFragments?: DocumentNode[]) => apollo_angular.TypedDocumentNode<MagentoGetCartResponse, MagentoCartGetQueryVariables>;
|
|
406
|
-
|
|
407
|
-
interface Response extends MagentoGetCartResponse {
|
|
408
|
-
user_errors: MagentoCartUserInputError[];
|
|
409
|
-
}
|
|
410
|
-
interface MagentoAddCartItemResponse {
|
|
411
|
-
addProductsToCart: Response;
|
|
412
|
-
}
|
|
413
|
-
|
|
414
|
-
interface MagentoCartAddItemQueryVariables {
|
|
415
|
-
cartId: string;
|
|
416
|
-
input: MagentoCartItemInput;
|
|
417
|
-
}
|
|
418
|
-
|
|
419
|
-
declare const addCartItem: (extraCartFragments?: DocumentNode[]) => apollo_angular.TypedDocumentNode<MagentoAddCartItemResponse, MagentoCartAddItemQueryVariables>;
|
|
420
|
-
|
|
421
|
-
interface MagentoApplyCouponResponse {
|
|
422
|
-
applyCouponToCart: {
|
|
423
|
-
cart: MagentoCart;
|
|
424
|
-
};
|
|
425
|
-
}
|
|
426
|
-
|
|
427
|
-
interface MagentoCartApplyCouponQueryVariables {
|
|
428
|
-
cartId: string;
|
|
429
|
-
couponCode: string;
|
|
430
|
-
}
|
|
431
|
-
|
|
432
|
-
declare const applyCoupon: (extraCartFragments?: DocumentNode[]) => apollo_angular.TypedDocumentNode<MagentoApplyCouponResponse, MagentoCartApplyCouponQueryVariables>;
|
|
433
|
-
|
|
434
|
-
declare const createCart: apollo_angular.TypedDocumentNode<unknown, unknown>;
|
|
435
|
-
|
|
436
|
-
interface MagentoCartCreateCartQueryVariables {
|
|
437
|
-
}
|
|
438
|
-
|
|
439
|
-
interface MagentoCreateCartResponse {
|
|
440
|
-
createEmptyCart: MagentoCart['id'];
|
|
441
|
-
}
|
|
442
|
-
|
|
443
|
-
interface MagentoGetBillingAddressResponse {
|
|
444
|
-
cart: {
|
|
445
|
-
__typename: string;
|
|
446
|
-
billing_address: MagentoCartAddress;
|
|
447
|
-
email: string;
|
|
448
|
-
};
|
|
449
|
-
}
|
|
450
|
-
|
|
451
|
-
interface MagentoCartGetBillingAddressQueryVariables {
|
|
452
|
-
cartId: string;
|
|
453
|
-
}
|
|
454
|
-
|
|
455
|
-
declare const getBillingAddress: (extraCartFragments?: DocumentNode[]) => apollo_angular.TypedDocumentNode<MagentoGetBillingAddressResponse, MagentoCartGetBillingAddressQueryVariables>;
|
|
456
|
-
|
|
457
|
-
interface MagentoGetSelectedPaymentMethodResponse {
|
|
458
|
-
cart: {
|
|
459
|
-
__typename: string;
|
|
460
|
-
selected_payment_method: MagentoCartPaymentMethod;
|
|
461
|
-
};
|
|
462
|
-
}
|
|
463
|
-
|
|
464
|
-
interface MagentoCartGetSelectedPaymentMethodQueryVariables {
|
|
465
|
-
cartId: string;
|
|
466
|
-
}
|
|
467
|
-
|
|
468
|
-
declare const getSelectedPaymentMethod: (extraCartFragments?: DocumentNode[]) => apollo_angular.TypedDocumentNode<MagentoGetSelectedPaymentMethodResponse, MagentoCartGetSelectedPaymentMethodQueryVariables>;
|
|
469
|
-
|
|
470
|
-
interface MagentoGetSelectedShippingMethodResponse {
|
|
471
|
-
cart: {
|
|
472
|
-
__typename: string;
|
|
473
|
-
shipping_addresses: {
|
|
474
|
-
__typename: string;
|
|
475
|
-
selected_shipping_method: MagentoCartShippingMethod;
|
|
476
|
-
}[];
|
|
477
|
-
};
|
|
478
|
-
}
|
|
479
|
-
|
|
480
|
-
interface MagentoCartGetSelectedShippingMethodQueryVariables {
|
|
481
|
-
cartId: string;
|
|
482
|
-
}
|
|
483
|
-
|
|
484
|
-
declare const getSelectedShippingMethod: (extraCartFragments?: DocumentNode[]) => apollo_angular.TypedDocumentNode<MagentoGetSelectedShippingMethodResponse, MagentoCartGetSelectedShippingMethodQueryVariables>;
|
|
485
|
-
|
|
486
|
-
interface MagentoGetShippingAddressResponse {
|
|
487
|
-
cart: {
|
|
488
|
-
__typename: string;
|
|
489
|
-
shipping_addresses: MagentoShippingAddress[];
|
|
490
|
-
email: string;
|
|
491
|
-
};
|
|
492
|
-
}
|
|
493
|
-
|
|
494
|
-
interface MagentoCartGetShippingAddressQueryVariables {
|
|
495
|
-
cartId: string;
|
|
496
|
-
}
|
|
497
|
-
|
|
498
|
-
declare const getShippingAddress: (extraCartFragments?: DocumentNode[]) => apollo_angular.TypedDocumentNode<MagentoGetShippingAddressResponse, MagentoCartGetShippingAddressQueryVariables>;
|
|
499
|
-
|
|
500
|
-
interface MagentoListCartCouponsResponse {
|
|
501
|
-
cart: {
|
|
502
|
-
applied_coupons: MagentoCart['applied_coupons'];
|
|
503
|
-
};
|
|
504
|
-
}
|
|
505
|
-
|
|
506
|
-
interface MagentoCartListCouponsQueryVariables {
|
|
507
|
-
cartId: string;
|
|
508
|
-
}
|
|
509
|
-
|
|
510
|
-
declare const listCartCoupons: (extraCartFragments?: DocumentNode[]) => apollo_angular.TypedDocumentNode<MagentoListCartCouponsResponse, MagentoCartListCouponsQueryVariables>;
|
|
511
|
-
|
|
512
|
-
interface MagentoListCartItemsResponse {
|
|
513
|
-
cart: {
|
|
514
|
-
__typename: string;
|
|
515
|
-
items: MagentoCartItem[];
|
|
516
|
-
};
|
|
517
|
-
}
|
|
518
|
-
|
|
519
|
-
interface MagentoCartListItemsQueryVariables {
|
|
520
|
-
cartId: string;
|
|
521
|
-
}
|
|
522
|
-
|
|
523
|
-
declare const listCartItems: (extraCartFragments?: DocumentNode[]) => apollo_angular.TypedDocumentNode<MagentoListCartItemsResponse, MagentoCartListItemsQueryVariables>;
|
|
524
|
-
|
|
525
|
-
interface MagentoListPaymentMethodsResponse {
|
|
526
|
-
cart: {
|
|
527
|
-
__typename: string;
|
|
528
|
-
available_payment_methods: MagentoCartPaymentMethod[];
|
|
529
|
-
};
|
|
530
|
-
}
|
|
531
|
-
|
|
532
|
-
interface MagentoCartListPaymentMethodsQueryVariables {
|
|
533
|
-
cartId: string;
|
|
534
|
-
}
|
|
535
|
-
|
|
536
|
-
declare const listPaymentMethods: (extraCartFragments?: DocumentNode[]) => apollo_angular.TypedDocumentNode<MagentoListPaymentMethodsResponse, MagentoCartListPaymentMethodsQueryVariables>;
|
|
537
|
-
|
|
538
|
-
declare const listShippingMethods: (extraCartFragments?: DocumentNode[]) => apollo_angular.TypedDocumentNode<MagentoListShippingMethodsResponse, MagentoCartListShippingMethodsQueryVariables>;
|
|
539
|
-
|
|
540
|
-
interface MagentoCartListShippingMethodsQueryVariables {
|
|
541
|
-
cartId: string;
|
|
542
|
-
}
|
|
543
|
-
|
|
544
|
-
interface MagentoPlaceOrderResponse {
|
|
545
|
-
placeOrder: {
|
|
546
|
-
order: {
|
|
547
|
-
order_number: string;
|
|
548
|
-
};
|
|
549
|
-
};
|
|
550
|
-
}
|
|
551
|
-
|
|
552
|
-
interface MagentoMergeCartsResponse {
|
|
553
|
-
mergeCarts: MagentoCart;
|
|
554
|
-
}
|
|
555
|
-
|
|
556
|
-
interface MagentoCartMergeCartsQueryVariables {
|
|
557
|
-
source: string;
|
|
558
|
-
destination?: string;
|
|
559
|
-
}
|
|
560
|
-
|
|
561
|
-
declare const magentoMergeCartsMutation: (extraCartFragments?: DocumentNode[]) => apollo_angular.TypedDocumentNode<MagentoMergeCartsResponse, MagentoCartMergeCartsQueryVariables>;
|
|
562
|
-
|
|
563
|
-
declare const placeOrder: apollo_angular.TypedDocumentNode<MagentoPlaceOrderResponse, MagentoCartPlaceOrderQueryVariables>;
|
|
564
|
-
|
|
565
|
-
interface MagentoCartPlaceOrderQueryVariables {
|
|
566
|
-
cartId: string;
|
|
567
|
-
}
|
|
568
|
-
|
|
569
|
-
interface MagentoListShippingMethodsResponse {
|
|
570
|
-
cart: {
|
|
571
|
-
__typename: string;
|
|
572
|
-
id: MagentoCart['id'];
|
|
573
|
-
shipping_addresses: {
|
|
574
|
-
__typename: string;
|
|
575
|
-
available_shipping_methods: MagentoCartShippingMethod[];
|
|
576
|
-
}[];
|
|
577
|
-
};
|
|
578
|
-
}
|
|
579
|
-
|
|
580
|
-
interface MagentoRemoveAllCouponsResponse {
|
|
581
|
-
removeCouponFromCart: {
|
|
582
|
-
cart: MagentoCart;
|
|
583
|
-
};
|
|
584
|
-
}
|
|
585
|
-
|
|
586
|
-
interface MagentoCartRemoveAllCouponsQueryVariables {
|
|
587
|
-
cartId: string;
|
|
588
|
-
}
|
|
589
|
-
|
|
590
|
-
declare const removeAllCoupons: (extraCartFragments?: DocumentNode[]) => apollo_angular.TypedDocumentNode<MagentoRemoveAllCouponsResponse, MagentoCartRemoveAllCouponsQueryVariables>;
|
|
591
|
-
|
|
592
|
-
interface MagentoRemoveCartItemResponse {
|
|
593
|
-
removeItemFromCart: MagentoGetCartResponse;
|
|
594
|
-
}
|
|
595
|
-
|
|
596
|
-
interface MagentoCartRemoveItemQueryVariables {
|
|
597
|
-
cartId: string;
|
|
598
|
-
itemId: number;
|
|
599
|
-
}
|
|
600
|
-
|
|
601
|
-
declare const removeCartItem: (extraCartFragments?: DocumentNode[]) => apollo_angular.TypedDocumentNode<MagentoRemoveCartItemResponse, MagentoCartRemoveItemQueryVariables>;
|
|
602
|
-
|
|
603
|
-
interface MagentoSetSelectedPaymentMethodWithBillingAndEmailResponse {
|
|
604
|
-
setPaymentMethodOnCart: {
|
|
605
|
-
__typename: string;
|
|
606
|
-
cart: {
|
|
607
|
-
id: MagentoGetCartResponse['cart']['id'];
|
|
608
|
-
};
|
|
609
|
-
};
|
|
610
|
-
setBillingAddressOnCart: {
|
|
611
|
-
__typename: string;
|
|
612
|
-
cart: {
|
|
613
|
-
id: MagentoGetCartResponse['cart']['id'];
|
|
614
|
-
};
|
|
615
|
-
};
|
|
616
|
-
setGuestEmailOnCart: MagentoGetCartResponse;
|
|
617
|
-
}
|
|
618
|
-
|
|
619
|
-
interface MagentoCartSetSelectedPaymentMethodWithBillingAndEmailQueryVariables {
|
|
620
|
-
cartId: string;
|
|
621
|
-
payment: MagentoPaymentMethodInput;
|
|
622
|
-
address: MagentoBillingAddressInput;
|
|
623
|
-
email: string;
|
|
624
|
-
}
|
|
625
|
-
|
|
626
|
-
declare const setSelectedPaymentMethodWithBillingAndEmail: (extraCartFragments?: DocumentNode[]) => apollo_angular.TypedDocumentNode<MagentoSetSelectedPaymentMethodWithBillingAndEmailResponse, MagentoCartSetSelectedPaymentMethodWithBillingAndEmailQueryVariables>;
|
|
627
|
-
|
|
628
|
-
interface MagentoSetSelectedPaymentMethodWithBillingResponse {
|
|
629
|
-
setBillingAddressOnCart: {
|
|
630
|
-
__typename: string;
|
|
631
|
-
cart: {
|
|
632
|
-
id: MagentoGetCartResponse['cart']['id'];
|
|
633
|
-
};
|
|
634
|
-
};
|
|
635
|
-
setPaymentMethodOnCart: MagentoGetCartResponse;
|
|
636
|
-
}
|
|
637
|
-
|
|
638
|
-
interface MagentoCartSetSelectedPaymentMethodWithBillingQueryVariables {
|
|
639
|
-
cartId: string;
|
|
640
|
-
payment: MagentoPaymentMethodInput;
|
|
641
|
-
address: MagentoBillingAddressInput;
|
|
642
|
-
}
|
|
643
|
-
|
|
644
|
-
declare const setSelectedPaymentMethodWithBilling: (extraCartFragments?: DocumentNode[]) => apollo_angular.TypedDocumentNode<MagentoSetSelectedPaymentMethodWithBillingResponse, MagentoCartSetSelectedPaymentMethodWithBillingQueryVariables>;
|
|
645
|
-
|
|
646
|
-
interface MagentoSetSelectedPaymentMethodResponse {
|
|
647
|
-
setPaymentMethodOnCart: MagentoGetCartResponse;
|
|
648
|
-
}
|
|
649
|
-
|
|
650
|
-
interface MagentoCartSetSelectedPaymentMethodQueryVariables {
|
|
651
|
-
cartId: string;
|
|
652
|
-
payment: MagentoPaymentMethodInput;
|
|
653
|
-
}
|
|
654
|
-
|
|
655
|
-
declare const setSelectedPaymentMethod: (extraCartFragments?: DocumentNode[]) => apollo_angular.TypedDocumentNode<MagentoSetSelectedPaymentMethodResponse, MagentoCartSetSelectedPaymentMethodQueryVariables>;
|
|
656
|
-
|
|
657
|
-
interface MagentoSetSelectedShippingMethodResponse {
|
|
658
|
-
setShippingMethodsOnCart: MagentoGetCartResponse;
|
|
659
|
-
}
|
|
660
|
-
|
|
661
|
-
interface MagentoCartSetSelectedShippingMethodQueryVariables {
|
|
662
|
-
cartId: string;
|
|
663
|
-
method: MagentoShippingMethodInput;
|
|
664
|
-
}
|
|
665
|
-
|
|
666
|
-
declare const setSelectedShippingMethod: (extraCartFragments?: DocumentNode[]) => apollo_angular.TypedDocumentNode<MagentoSetSelectedShippingMethodResponse, MagentoCartSetSelectedShippingMethodQueryVariables>;
|
|
667
|
-
|
|
668
|
-
interface MagentoUpdateAddressWithEmailResponse {
|
|
669
|
-
setBillingAddressOnCart: {
|
|
670
|
-
__typename?: string;
|
|
671
|
-
cart: {
|
|
672
|
-
__typename?: string;
|
|
673
|
-
id: MagentoGetCartResponse['cart']['id'];
|
|
674
|
-
};
|
|
675
|
-
};
|
|
676
|
-
setShippingAddressesOnCart: {
|
|
677
|
-
__typename?: string;
|
|
678
|
-
cart: {
|
|
679
|
-
__typename?: string;
|
|
680
|
-
id: MagentoGetCartResponse['cart']['id'];
|
|
681
|
-
};
|
|
682
|
-
};
|
|
683
|
-
setGuestEmailOnCart: MagentoGetCartResponse;
|
|
684
|
-
}
|
|
685
|
-
|
|
686
|
-
interface MagentoCartUpdateAddressWithEmailQueryVariables {
|
|
687
|
-
cartId: string;
|
|
688
|
-
email: string;
|
|
689
|
-
address?: MagentoCartAddressInput;
|
|
690
|
-
addressId?: number;
|
|
691
|
-
}
|
|
692
|
-
|
|
693
|
-
/**
|
|
694
|
-
* Update the shipping and billing address of the cart.
|
|
695
|
-
* At the time of writing, Magento 2 processes compound queries in the order they are defined.
|
|
696
|
-
* We rely on this fact and only use the return of the last query.
|
|
697
|
-
* This helps us keep query complexity down and save some server CPU cycles.
|
|
698
|
-
* Driver behavior is not guaranteed if Magento no longer processes compound queries in the order they are defined.
|
|
699
|
-
*/
|
|
700
|
-
declare const updateAddressWithEmail: (extraCartFragments?: DocumentNode[]) => apollo_angular.TypedDocumentNode<MagentoUpdateAddressWithEmailResponse, MagentoCartUpdateAddressWithEmailQueryVariables>;
|
|
701
|
-
|
|
702
|
-
interface MagentoUpdateAddressResponse {
|
|
703
|
-
setBillingAddressOnCart: {
|
|
704
|
-
__typename?: string;
|
|
705
|
-
cart: {
|
|
706
|
-
__typename?: string;
|
|
707
|
-
id: MagentoGetCartResponse['cart']['id'];
|
|
708
|
-
};
|
|
709
|
-
};
|
|
710
|
-
setShippingAddressesOnCart: MagentoGetCartResponse;
|
|
711
|
-
}
|
|
712
|
-
|
|
713
|
-
interface MagentoCartUpdateAddressQueryVariables {
|
|
714
|
-
cartId: string;
|
|
715
|
-
address?: MagentoCartAddressInput;
|
|
716
|
-
addressId?: number;
|
|
717
|
-
}
|
|
718
|
-
|
|
719
|
-
/**
|
|
720
|
-
* Update the shipping and billing address of the cart.
|
|
721
|
-
* At the time of writing, Magento 2 processes compound queries in the order they are defined.
|
|
722
|
-
* We rely on this fact and only use the return of the last query.
|
|
723
|
-
* This helps us keep query complexity down and save some server CPU cycles.
|
|
724
|
-
* Driver behavior is not guaranteed if Magento no longer processes compound queries in the order they are defined.
|
|
725
|
-
*/
|
|
726
|
-
declare const updateAddress: (extraCartFragments?: DocumentNode[]) => apollo_angular.TypedDocumentNode<MagentoUpdateAddressResponse, MagentoCartUpdateAddressQueryVariables>;
|
|
727
|
-
|
|
728
|
-
interface MagentoUpdateBillingAddressWithEmailResponse {
|
|
729
|
-
setBillingAddressOnCart: MagentoGetCartResponse;
|
|
730
|
-
setGuestEmailOnCart: {
|
|
731
|
-
__typename?: string;
|
|
732
|
-
cart: {
|
|
733
|
-
__typename?: string;
|
|
734
|
-
email: MagentoGetCartResponse['cart']['email'];
|
|
735
|
-
};
|
|
736
|
-
};
|
|
737
|
-
}
|
|
738
|
-
|
|
739
|
-
interface MagentoCartUpdateBillingAddressWithEmailQueryVariables {
|
|
740
|
-
cartId: string;
|
|
741
|
-
email: string;
|
|
742
|
-
address: MagentoBillingAddressInput;
|
|
743
|
-
}
|
|
744
|
-
|
|
745
|
-
declare const updateBillingAddressWithEmail: (extraCartFragments?: DocumentNode[]) => apollo_angular.TypedDocumentNode<MagentoUpdateBillingAddressWithEmailResponse, MagentoCartUpdateBillingAddressWithEmailQueryVariables>;
|
|
746
|
-
|
|
747
|
-
interface MagentoUpdateBillingAddressResponse {
|
|
748
|
-
setBillingAddressOnCart: MagentoGetCartResponse;
|
|
749
|
-
}
|
|
750
|
-
|
|
751
|
-
interface MagentoCartUpdateBillingAddressQueryVariables {
|
|
752
|
-
cartId: string;
|
|
753
|
-
address: MagentoBillingAddressInput;
|
|
754
|
-
}
|
|
755
|
-
|
|
756
|
-
declare const updateBillingAddress: (extraCartFragments?: DocumentNode[]) => apollo_angular.TypedDocumentNode<MagentoUpdateBillingAddressResponse, MagentoCartUpdateBillingAddressQueryVariables>;
|
|
757
|
-
|
|
758
|
-
interface MagentoUpdateCartItemResponse {
|
|
759
|
-
updateCartItems: MagentoGetCartResponse;
|
|
760
|
-
}
|
|
761
|
-
|
|
762
|
-
interface MagentoCartUpdateItemQueryVariables {
|
|
763
|
-
cartId: string;
|
|
764
|
-
input: MagentoCartItemUpdateInput;
|
|
765
|
-
}
|
|
766
|
-
|
|
767
|
-
declare const updateCartItem: (extraCartFragments?: DocumentNode[]) => apollo_angular.TypedDocumentNode<MagentoUpdateCartItemResponse, MagentoCartUpdateItemQueryVariables>;
|
|
768
|
-
|
|
769
|
-
interface MagentoUpdateShippingAddressWithEmailResponse {
|
|
770
|
-
setShippingAddressesOnCart: MagentoGetCartResponse;
|
|
771
|
-
setGuestEmailOnCart: {
|
|
772
|
-
__typename?: string;
|
|
773
|
-
cart: {
|
|
774
|
-
__typename?: string;
|
|
775
|
-
email: MagentoGetCartResponse['cart']['email'];
|
|
776
|
-
};
|
|
777
|
-
};
|
|
778
|
-
}
|
|
779
|
-
|
|
780
|
-
interface MagentoCartUpdateShippingAddressWithEmailQueryVariables {
|
|
781
|
-
cartId: string;
|
|
782
|
-
email: string;
|
|
783
|
-
address: MagentoShippingAddressInput;
|
|
784
|
-
}
|
|
785
|
-
|
|
786
|
-
declare const updateShippingAddressWithEmail: (extraCartFragments?: DocumentNode[]) => apollo_angular.TypedDocumentNode<MagentoUpdateShippingAddressWithEmailResponse, MagentoCartUpdateShippingAddressWithEmailQueryVariables>;
|
|
787
|
-
|
|
788
|
-
interface MagentoUpdateShippingAddressResponse {
|
|
789
|
-
setShippingAddressesOnCart: MagentoGetCartResponse;
|
|
790
|
-
}
|
|
791
|
-
|
|
792
|
-
interface MagentoCartUpdateShippingAddressQueryVariables {
|
|
793
|
-
cartId: string;
|
|
794
|
-
address: MagentoShippingAddressInput;
|
|
795
|
-
}
|
|
796
|
-
|
|
797
|
-
declare const updateShippingAddress: (extraCartFragments?: DocumentNode[]) => apollo_angular.TypedDocumentNode<MagentoUpdateShippingAddressResponse, MagentoCartUpdateShippingAddressQueryVariables>;
|
|
798
|
-
|
|
799
|
-
/**
|
|
800
|
-
* Transforms a single GraphQL error.
|
|
801
|
-
* Optionally accepts a request payload which can be used in certain cases
|
|
802
|
-
* to add supplemental info to the error.
|
|
803
|
-
*/
|
|
804
|
-
declare function transformMagentoCartGraphQlError(error: GraphQLFormattedError, requestPayload?: unknown): DaffError;
|
|
805
|
-
|
|
806
|
-
declare const DAFF_MAGENTO_GET_RECOVERABLE_ERRORS: (typeof DaffProductOutOfStockError)[];
|
|
807
|
-
/**
|
|
808
|
-
* A service for making Magento GraphQL queries for carts.
|
|
809
|
-
*
|
|
810
|
-
* @inheritdoc
|
|
811
|
-
*/
|
|
812
|
-
declare class DaffMagentoCartService implements DaffCartServiceInterface<DaffCart> {
|
|
813
|
-
private apollo;
|
|
814
|
-
private mutationQueue;
|
|
815
|
-
private cartTransformer;
|
|
816
|
-
private cartItemDriver;
|
|
817
|
-
private extraCartFragments;
|
|
818
|
-
constructor(apollo: Apollo, mutationQueue: DaffQueuedApollo, cartTransformer: DaffMagentoCartTransformer, cartItemDriver: DaffCartItemServiceInterface, extraCartFragments: DocumentNode[]);
|
|
819
|
-
get(cartId: DaffCart['id']): Observable<DaffDriverResponse<DaffCart>>;
|
|
820
|
-
create(): Observable<{
|
|
821
|
-
id: DaffCart['id'];
|
|
822
|
-
}>;
|
|
823
|
-
addToCart(productId: string, qty: number): Observable<DaffCart>;
|
|
824
|
-
clear(cartId: DaffCart['id']): Observable<Partial<DaffCart>>;
|
|
825
|
-
merge(guestCart: DaffCart['id'], customerCart?: DaffCart['id']): Observable<DaffDriverResponse<DaffCart>>;
|
|
826
|
-
static ɵfac: i0.ɵɵFactoryDeclaration<DaffMagentoCartService, never>;
|
|
827
|
-
static ɵprov: i0.ɵɵInjectableDeclaration<DaffMagentoCartService>;
|
|
828
|
-
}
|
|
829
|
-
|
|
830
|
-
/**
|
|
831
|
-
* A service for making Magento GraphQL queries for carts.
|
|
832
|
-
*
|
|
833
|
-
* @inheritdoc
|
|
834
|
-
*/
|
|
835
|
-
declare class DaffMagentoCartItemService implements DaffCartItemServiceInterface {
|
|
836
|
-
private apollo;
|
|
837
|
-
private mutationQueue;
|
|
838
|
-
private extraCartFragments;
|
|
839
|
-
private cartItemTransforms;
|
|
840
|
-
private cartTransformer;
|
|
841
|
-
private cartItemUpdateInputTransformer;
|
|
842
|
-
constructor(apollo: Apollo, mutationQueue: DaffQueuedApollo, extraCartFragments: DocumentNode[], cartItemTransforms: DaffCartMagentoCartItemTransform[], cartTransformer: DaffMagentoCartTransformer, cartItemUpdateInputTransformer: DaffMagentoCartItemUpdateInputTransformer);
|
|
843
|
-
list(cartId: DaffCart['id']): Observable<DaffCartItem[]>;
|
|
844
|
-
get(cartId: DaffCart['id'], itemId: DaffCartItem['id']): Observable<DaffCartItem>;
|
|
845
|
-
add(cartId: DaffCart['id'], cartItemInput: DaffCartItemInput): Observable<Partial<DaffCart>>;
|
|
846
|
-
update(cartId: DaffCart['id'], itemId: DaffCartItem['id'], changes: Partial<DaffCartItem>): Observable<Partial<DaffCart>>;
|
|
847
|
-
delete(cartId: DaffCart['id'], itemId: DaffCartItem['id']): Observable<Partial<DaffCart>>;
|
|
848
|
-
private addBundledProduct;
|
|
849
|
-
private addConfigurableProduct;
|
|
850
|
-
private addSimpleProduct;
|
|
851
|
-
private addCartItemRequest;
|
|
852
|
-
static ɵfac: i0.ɵɵFactoryDeclaration<DaffMagentoCartItemService, never>;
|
|
853
|
-
static ɵprov: i0.ɵɵInjectableDeclaration<DaffMagentoCartItemService>;
|
|
854
|
-
}
|
|
855
|
-
|
|
856
|
-
/**
|
|
857
|
-
* A service for making Magento GraphQL queries for carts.
|
|
858
|
-
*
|
|
859
|
-
* @inheritdoc
|
|
860
|
-
*/
|
|
861
|
-
declare class DaffMagentoCartPaymentService implements DaffCartPaymentServiceInterface {
|
|
862
|
-
private apollo;
|
|
863
|
-
private mutationQueue;
|
|
864
|
-
private cartTransformer;
|
|
865
|
-
private paymentTransformer;
|
|
866
|
-
private paymentInputTransformer;
|
|
867
|
-
private cartAddressInputTransformer;
|
|
868
|
-
private extraCartFragments;
|
|
869
|
-
constructor(apollo: Apollo, mutationQueue: DaffQueuedApollo, cartTransformer: DaffMagentoCartTransformer, paymentTransformer: DaffMagentoCartPaymentTransformer, paymentInputTransformer: DaffMagentoPaymentMethodInputTransformer, cartAddressInputTransformer: DaffMagentoBillingAddressInputTransformer, extraCartFragments: DocumentNode[]);
|
|
870
|
-
get(cartId: DaffCart['id']): Observable<DaffCartPaymentMethod>;
|
|
871
|
-
update(cartId: DaffCart['id'], payment: Partial<DaffCartPaymentMethod>, billingAddress?: Partial<DaffCartAddress>): Observable<Partial<DaffCart>>;
|
|
872
|
-
updateWithBilling(cartId: DaffCart['id'], payment: Partial<DaffCartPaymentMethod>, address: Partial<DaffCartAddress>): Observable<Partial<DaffCart>>;
|
|
873
|
-
remove(cartId: DaffCart['id']): Observable<void>;
|
|
874
|
-
private updateWithBillingAddress;
|
|
875
|
-
private updateWithBillingAddressAndEmail;
|
|
876
|
-
static ɵfac: i0.ɵɵFactoryDeclaration<DaffMagentoCartPaymentService, never>;
|
|
877
|
-
static ɵprov: i0.ɵɵInjectableDeclaration<DaffMagentoCartPaymentService>;
|
|
878
|
-
}
|
|
879
|
-
|
|
880
|
-
/**
|
|
881
|
-
* A service for making Magento GraphQL queries for carts.
|
|
882
|
-
*
|
|
883
|
-
* @inheritdoc
|
|
884
|
-
*/
|
|
885
|
-
declare class DaffMagentoCartPaymentMethodsService implements DaffCartPaymentMethodsServiceInterface {
|
|
886
|
-
private apollo;
|
|
887
|
-
private extraCartFragments;
|
|
888
|
-
private paymentTransformer;
|
|
889
|
-
constructor(apollo: Apollo, extraCartFragments: DocumentNode[], paymentTransformer: DaffMagentoCartPaymentTransformer);
|
|
890
|
-
list(cartId: DaffCart['id']): Observable<DaffCartPaymentMethod[]>;
|
|
891
|
-
static ɵfac: i0.ɵɵFactoryDeclaration<DaffMagentoCartPaymentMethodsService, never>;
|
|
892
|
-
static ɵprov: i0.ɵɵInjectableDeclaration<DaffMagentoCartPaymentMethodsService>;
|
|
893
|
-
}
|
|
894
|
-
|
|
895
|
-
/**
|
|
896
|
-
* A service for making Magento GraphQL queries for carts.
|
|
897
|
-
*
|
|
898
|
-
* @inheritdoc
|
|
899
|
-
*/
|
|
900
|
-
declare class DaffMagentoCartAddressService implements DaffCartAddressServiceInterface {
|
|
901
|
-
private mutationQueue;
|
|
902
|
-
private extraCartFragments;
|
|
903
|
-
private cartTransformer;
|
|
904
|
-
private cartAddressInputTransformer;
|
|
905
|
-
constructor(mutationQueue: DaffQueuedApollo, extraCartFragments: DocumentNode[], cartTransformer: DaffMagentoCartTransformer, cartAddressInputTransformer: DaffMagentoCartAddressInputTransformer);
|
|
906
|
-
update(cartId: DaffCart['id'], address: Partial<DaffCartAddress>): Observable<Partial<DaffCart>>;
|
|
907
|
-
private getAddressInput;
|
|
908
|
-
private updateAddress;
|
|
909
|
-
private updateAddressWithEmail;
|
|
910
|
-
static ɵfac: i0.ɵɵFactoryDeclaration<DaffMagentoCartAddressService, never>;
|
|
911
|
-
static ɵprov: i0.ɵɵInjectableDeclaration<DaffMagentoCartAddressService>;
|
|
912
|
-
}
|
|
913
|
-
|
|
914
|
-
/**
|
|
915
|
-
* A service for making Magento GraphQL queries for carts.
|
|
916
|
-
*
|
|
917
|
-
* @inheritdoc
|
|
918
|
-
*/
|
|
919
|
-
declare class DaffMagentoCartBillingAddressService implements DaffCartBillingAddressServiceInterface {
|
|
920
|
-
private apollo;
|
|
921
|
-
private mutationQueue;
|
|
922
|
-
private extraCartFragments;
|
|
923
|
-
private cartTransformer;
|
|
924
|
-
private billingAddressTransformer;
|
|
925
|
-
private billingAddressInputTransformer;
|
|
926
|
-
constructor(apollo: Apollo, mutationQueue: DaffQueuedApollo, extraCartFragments: DocumentNode[], cartTransformer: DaffMagentoCartTransformer, billingAddressTransformer: DaffMagentoBillingAddressTransformer, billingAddressInputTransformer: DaffMagentoBillingAddressInputTransformer);
|
|
927
|
-
get(cartId: DaffCart['id']): Observable<DaffCartAddress>;
|
|
928
|
-
update(cartId: DaffCart['id'], address: Partial<DaffCartAddress>): Observable<Partial<DaffCart>>;
|
|
929
|
-
private updateAddress;
|
|
930
|
-
private updateAddressWithEmail;
|
|
931
|
-
static ɵfac: i0.ɵɵFactoryDeclaration<DaffMagentoCartBillingAddressService, never>;
|
|
932
|
-
static ɵprov: i0.ɵɵInjectableDeclaration<DaffMagentoCartBillingAddressService>;
|
|
933
|
-
}
|
|
934
|
-
|
|
935
|
-
/**
|
|
936
|
-
* A service for making Magento GraphQL queries for a cart's shipping address.
|
|
937
|
-
*
|
|
938
|
-
* @inheritdoc
|
|
939
|
-
*/
|
|
940
|
-
declare class DaffMagentoCartShippingAddressService implements DaffCartShippingAddressServiceInterface {
|
|
941
|
-
private apollo;
|
|
942
|
-
private mutationQueue;
|
|
943
|
-
private extraCartFragments;
|
|
944
|
-
private cartTransformer;
|
|
945
|
-
private shippingAddressTransformer;
|
|
946
|
-
private shippingAddressInputTransformer;
|
|
947
|
-
constructor(apollo: Apollo, mutationQueue: DaffQueuedApollo, extraCartFragments: DocumentNode[], cartTransformer: DaffMagentoCartTransformer, shippingAddressTransformer: DaffMagentoShippingAddressTransformer, shippingAddressInputTransformer: DaffMagentoShippingAddressInputTransformer);
|
|
948
|
-
get(cartId: DaffCart['id']): Observable<DaffCartAddress>;
|
|
949
|
-
update(cartId: DaffCart['id'], address: Partial<DaffCartAddress>): Observable<Partial<DaffCart>>;
|
|
950
|
-
private updateAddress;
|
|
951
|
-
private updateAddressWithEmail;
|
|
952
|
-
static ɵfac: i0.ɵɵFactoryDeclaration<DaffMagentoCartShippingAddressService, never>;
|
|
953
|
-
static ɵprov: i0.ɵɵInjectableDeclaration<DaffMagentoCartShippingAddressService>;
|
|
954
|
-
}
|
|
955
|
-
|
|
956
|
-
/**
|
|
957
|
-
* A service for making Magento GraphQL queries for carts' shipping methods.
|
|
958
|
-
*
|
|
959
|
-
* @inheritdoc
|
|
960
|
-
*/
|
|
961
|
-
declare class DaffMagentoCartShippingMethodsService implements DaffCartShippingMethodsServiceInterface {
|
|
962
|
-
private apollo;
|
|
963
|
-
private extraCartFragments;
|
|
964
|
-
private shippingRateTransformer;
|
|
965
|
-
constructor(apollo: Apollo, extraCartFragments: DocumentNode[], shippingRateTransformer: DaffMagentoCartShippingRateTransformer);
|
|
966
|
-
list(cartId: DaffCart['id']): Observable<DaffCartShippingRate[]>;
|
|
967
|
-
static ɵfac: i0.ɵɵFactoryDeclaration<DaffMagentoCartShippingMethodsService, never>;
|
|
968
|
-
static ɵprov: i0.ɵɵInjectableDeclaration<DaffMagentoCartShippingMethodsService>;
|
|
969
|
-
}
|
|
970
|
-
|
|
971
|
-
/**
|
|
972
|
-
* A service for making Magento GraphQL queries for carts.
|
|
973
|
-
*
|
|
974
|
-
* @inheritdoc
|
|
975
|
-
*/
|
|
976
|
-
declare class DaffMagentoCartShippingInformationService implements DaffCartShippingInformationServiceInterface {
|
|
977
|
-
private apollo;
|
|
978
|
-
private mutationQueue;
|
|
979
|
-
private extraCartFragments;
|
|
980
|
-
private cartTransformer;
|
|
981
|
-
private shippingRateTransformer;
|
|
982
|
-
private shippingMethodInputTransformer;
|
|
983
|
-
constructor(apollo: Apollo, mutationQueue: DaffQueuedApollo, extraCartFragments: DocumentNode[], cartTransformer: DaffMagentoCartTransformer, shippingRateTransformer: DaffMagentoCartShippingRateTransformer, shippingMethodInputTransformer: DaffMagentoShippingMethodInputTransformer);
|
|
984
|
-
get(cartId: DaffCart['id']): Observable<DaffCartShippingRate>;
|
|
985
|
-
update(cartId: DaffCart['id'], shippingInfo: Partial<DaffCartShippingRate>): Observable<Partial<DaffCart>>;
|
|
986
|
-
delete(cartId: DaffCart['id'], id?: DaffCartShippingRate['id']): Observable<Partial<DaffCart>>;
|
|
987
|
-
static ɵfac: i0.ɵɵFactoryDeclaration<DaffMagentoCartShippingInformationService, never>;
|
|
988
|
-
static ɵprov: i0.ɵɵInjectableDeclaration<DaffMagentoCartShippingInformationService>;
|
|
989
|
-
}
|
|
990
|
-
|
|
991
|
-
declare class DaffCartMagentoDriverModule {
|
|
992
|
-
static forRoot(): ModuleWithProviders<DaffCartMagentoDriverModule>;
|
|
993
|
-
static ɵfac: i0.ɵɵFactoryDeclaration<DaffCartMagentoDriverModule, never>;
|
|
994
|
-
static ɵmod: i0.ɵɵNgModuleDeclaration<DaffCartMagentoDriverModule, never, [typeof i1.CommonModule], never>;
|
|
995
|
-
static ɵinj: i0.ɵɵInjectorDeclaration<DaffCartMagentoDriverModule>;
|
|
996
|
-
}
|
|
997
|
-
|
|
998
|
-
export { DAFF_CART_MAGENTO_CART_ITEM_TRANSFORMS, DAFF_CART_MAGENTO_CART_TRANSFORMS, DAFF_CART_MAGENTO_EXTRA_CART_FRAGMENTS, DAFF_MAGENTO_GET_RECOVERABLE_ERRORS, DaffCartMagentoDriverModule, DaffMagentoBillingAddressInputTransformer, DaffMagentoBillingAddressTransformer, DaffMagentoCartAddressInputTransformer, DaffMagentoCartAddressService, DaffMagentoCartAddressTransformer, DaffMagentoCartBillingAddressService, DaffMagentoCartItemService, DaffMagentoCartItemUpdateInputTransformer, DaffMagentoCartPaymentMethodsService, DaffMagentoCartPaymentService, DaffMagentoCartPaymentTransformer, DaffMagentoCartService, DaffMagentoCartShippingAddressService, DaffMagentoCartShippingInformationService, DaffMagentoCartShippingMethodsService, DaffMagentoCartShippingRateTransformer, DaffMagentoCartTransformer, DaffMagentoPaymentMethodInputTransformer, DaffMagentoShippingAddressInputTransformer, DaffMagentoShippingAddressTransformer, DaffMagentoShippingMethodInputTransformer, MagentoCartItemTypeEnum, MagentoCartUserInputErrorType, addCartItem, applyCoupon, availablePaymentMethodFragment, availableShippingMethodFragment, cartAddressFragment, cartCouponFragment, cartFragment, cartItemFragment, createCart, getBillingAddress, getCart, getSelectedPaymentMethod, getSelectedShippingMethod, getShippingAddress, listCartCoupons, listCartItems, listPaymentMethods, listShippingMethods, magentoCartUserError, magentoMergeCartsMutation, placeOrder, pricesFragment, provideDaffCartMagentoCartItemTransformFactories, provideDaffCartMagentoCartItemTransforms, provideDaffCartMagentoCartTransformFactories, provideDaffCartMagentoCartTransforms, provideDaffCartMagentoExtraCartFragmentFactories, provideDaffCartMagentoExtraCartFragments, removeAllCoupons, removeCartItem, selectedPaymentMethodFragment, selectedShippingMethodFragment, setSelectedPaymentMethod, setSelectedPaymentMethodWithBilling, setSelectedPaymentMethodWithBillingAndEmail, setSelectedShippingMethod, transformMagentoCartGraphQlError, updateAddress, updateAddressWithEmail, updateBillingAddress, updateBillingAddressWithEmail, updateCartItem, updateShippingAddress, updateShippingAddressWithEmail };
|
|
999
|
-
export type { DaffCartMagentoCartItemTransform, DaffCartMagentoCartTransform, MagentoAddCartItemResponse, MagentoApplyCouponResponse, MagentoBillingAddressInput, MagentoBundleCartItem, MagentoCart, MagentoCartAddItemQueryVariables, MagentoCartAddress, MagentoCartAddressInput, MagentoCartAddressInputBase, MagentoCartApplyCouponQueryVariables, MagentoCartCoupon, MagentoCartCreateCartQueryVariables, MagentoCartGetBillingAddressQueryVariables, MagentoCartGetQueryVariables, MagentoCartGetSelectedPaymentMethodQueryVariables, MagentoCartGetSelectedShippingMethodQueryVariables, MagentoCartGetShippingAddressQueryVariables, MagentoCartItem, MagentoCartItemInput, MagentoCartItemProduct, MagentoCartItemUpdateInput, MagentoCartListCouponsQueryVariables, MagentoCartListItemsQueryVariables, MagentoCartListPaymentMethodsQueryVariables, MagentoCartListShippingMethodsQueryVariables, MagentoCartMergeCartsQueryVariables, MagentoCartPaymentMethod, MagentoCartPlaceOrderQueryVariables, MagentoCartRemoveAllCouponsQueryVariables, MagentoCartRemoveItemQueryVariables, MagentoCartSetSelectedPaymentMethodQueryVariables, MagentoCartSetSelectedPaymentMethodWithBillingAndEmailQueryVariables, MagentoCartSetSelectedPaymentMethodWithBillingQueryVariables, MagentoCartSetSelectedShippingMethodQueryVariables, MagentoCartShippingMethod, MagentoCartUpdateAddressQueryVariables, MagentoCartUpdateAddressWithEmailQueryVariables, MagentoCartUpdateBillingAddressQueryVariables, MagentoCartUpdateBillingAddressWithEmailQueryVariables, MagentoCartUpdateItemQueryVariables, MagentoCartUpdateShippingAddressQueryVariables, MagentoCartUpdateShippingAddressWithEmailQueryVariables, MagentoCartUserInputError, MagentoConfigurableCartItem, MagentoCreateCartResponse, MagentoEnteredOptionInput, MagentoGetBillingAddressResponse, MagentoGetCartResponse, MagentoGetSelectedPaymentMethodResponse, MagentoGetSelectedShippingMethodResponse, MagentoGetShippingAddressResponse, MagentoListCartCouponsResponse, MagentoListCartItemsResponse, MagentoListPaymentMethodsResponse, MagentoListShippingMethodsResponse, MagentoMergeCartsResponse, MagentoPaymentMethodInput, MagentoPlaceOrderResponse, MagentoRemoveAllCouponsResponse, MagentoRemoveCartItemResponse, MagentoSetSelectedPaymentMethodResponse, MagentoSetSelectedPaymentMethodWithBillingAndEmailResponse, MagentoSetSelectedPaymentMethodWithBillingResponse, MagentoSetSelectedShippingMethodResponse, MagentoShippingAddress, MagentoShippingAddressInput, MagentoShippingMethodInput, MagentoUpdateAddressResponse, MagentoUpdateAddressWithEmailResponse, MagentoUpdateBillingAddressResponse, MagentoUpdateBillingAddressWithEmailResponse, MagentoUpdateCartItemResponse, MagentoUpdateShippingAddressResponse, MagentoUpdateShippingAddressWithEmailResponse };
|