@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
|
@@ -0,0 +1,176 @@
|
|
|
1
|
+
import { MagentoBundleCartItem, MagentoCart, MagentoCartAddress, MagentoCartAddressInput, MagentoCartCoupon, MagentoCartItem, MagentoCartItemProduct, MagentoCartItemTypeEnum, MagentoCartPaymentMethod, MagentoCartShippingMethod, MagentoConfigurableCartItem, MagentoShippingAddress } from "@daffodil/cart/driver/magento/2.4.7";
|
|
2
|
+
import { DaffModelFactory } from "@daffodil/core/testing";
|
|
3
|
+
import * as i0 from "@angular/core";
|
|
4
|
+
import { MagentoDiscount, MagentoMoney } from "@daffodil/driver/magento/2.4.7";
|
|
5
|
+
export declare class MockMagentoCartAddress implements MagentoCartAddress {
|
|
6
|
+
__typename: string;
|
|
7
|
+
customer_address_id: number;
|
|
8
|
+
region: {
|
|
9
|
+
__typename: string;
|
|
10
|
+
region_id: number;
|
|
11
|
+
code: string;
|
|
12
|
+
};
|
|
13
|
+
country: {
|
|
14
|
+
__typename: string;
|
|
15
|
+
code: string;
|
|
16
|
+
label: string;
|
|
17
|
+
};
|
|
18
|
+
street: string[];
|
|
19
|
+
company: string;
|
|
20
|
+
telephone: string;
|
|
21
|
+
postcode: string;
|
|
22
|
+
city: string;
|
|
23
|
+
firstname: string;
|
|
24
|
+
lastname: string;
|
|
25
|
+
email: string;
|
|
26
|
+
}
|
|
27
|
+
export declare class MagentoCartAddressFactory extends DaffModelFactory<MagentoCartAddress> {
|
|
28
|
+
constructor();
|
|
29
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<MagentoCartAddressFactory, never>;
|
|
30
|
+
static ɵprov: i0.ɵɵInjectableDeclaration<any>;
|
|
31
|
+
}
|
|
32
|
+
export declare class MockMagentoCartAddressInput implements MagentoCartAddressInput {
|
|
33
|
+
region_id: number;
|
|
34
|
+
country_code: string;
|
|
35
|
+
street: string[];
|
|
36
|
+
company: string;
|
|
37
|
+
telephone: string;
|
|
38
|
+
postcode: string;
|
|
39
|
+
city: string;
|
|
40
|
+
firstname: string;
|
|
41
|
+
lastname: string;
|
|
42
|
+
save_in_address_book: boolean;
|
|
43
|
+
}
|
|
44
|
+
export declare class MagentoCartAddressInputFactory extends DaffModelFactory<MagentoCartAddressInput> {
|
|
45
|
+
constructor();
|
|
46
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<MagentoCartAddressInputFactory, never>;
|
|
47
|
+
static ɵprov: i0.ɵɵInjectableDeclaration<any>;
|
|
48
|
+
}
|
|
49
|
+
export declare class MockMagentoCartCoupon implements MagentoCartCoupon {
|
|
50
|
+
code: string;
|
|
51
|
+
}
|
|
52
|
+
export declare class MagentoCartCouponFactory extends DaffModelFactory<MagentoCartCoupon> {
|
|
53
|
+
constructor();
|
|
54
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<MagentoCartCouponFactory, never>;
|
|
55
|
+
static ɵprov: i0.ɵɵInjectableDeclaration<any>;
|
|
56
|
+
}
|
|
57
|
+
export declare class MockMagentoCartPaymentMethod implements MagentoCartPaymentMethod {
|
|
58
|
+
code: string;
|
|
59
|
+
title: string;
|
|
60
|
+
purchase_order_number: string;
|
|
61
|
+
}
|
|
62
|
+
export declare class MagentoCartPaymentMethodFactory extends DaffModelFactory<MagentoCartPaymentMethod> {
|
|
63
|
+
constructor();
|
|
64
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<MagentoCartPaymentMethodFactory, never>;
|
|
65
|
+
static ɵprov: i0.ɵɵInjectableDeclaration<any>;
|
|
66
|
+
}
|
|
67
|
+
export declare class MockCartShippingMethod implements MagentoCartShippingMethod {
|
|
68
|
+
carrier_code: string;
|
|
69
|
+
carrier_title: string;
|
|
70
|
+
method_title: string;
|
|
71
|
+
method_code: string;
|
|
72
|
+
amount: MagentoMoney;
|
|
73
|
+
private money;
|
|
74
|
+
}
|
|
75
|
+
export declare class MagentoCartShippingMethodFactory extends DaffModelFactory<MagentoCartShippingMethod> {
|
|
76
|
+
constructor();
|
|
77
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<MagentoCartShippingMethodFactory, never>;
|
|
78
|
+
static ɵprov: i0.ɵɵInjectableDeclaration<any>;
|
|
79
|
+
}
|
|
80
|
+
export declare class MockMagentoCart implements MagentoCart {
|
|
81
|
+
__typename: string;
|
|
82
|
+
id: string;
|
|
83
|
+
prices: {
|
|
84
|
+
__typename: string;
|
|
85
|
+
subtotal_excluding_tax: MagentoMoney;
|
|
86
|
+
grand_total: MagentoMoney;
|
|
87
|
+
subtotal_including_tax: MagentoMoney;
|
|
88
|
+
subtotal_with_discount_excluding_tax: MagentoMoney;
|
|
89
|
+
applied_taxes: {
|
|
90
|
+
__typename: string;
|
|
91
|
+
amount: MagentoMoney;
|
|
92
|
+
label: string;
|
|
93
|
+
}[];
|
|
94
|
+
discounts: {
|
|
95
|
+
__typename: string;
|
|
96
|
+
amount: MagentoMoney;
|
|
97
|
+
label: string;
|
|
98
|
+
}[];
|
|
99
|
+
};
|
|
100
|
+
applied_coupons: any[];
|
|
101
|
+
items: any[];
|
|
102
|
+
billing_address: any;
|
|
103
|
+
shipping_addresses: any[];
|
|
104
|
+
available_payment_methods: any[];
|
|
105
|
+
selected_payment_method: any;
|
|
106
|
+
email: string;
|
|
107
|
+
private money;
|
|
108
|
+
}
|
|
109
|
+
export declare class MagentoCartFactory extends DaffModelFactory<MagentoCart> {
|
|
110
|
+
constructor();
|
|
111
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<MagentoCartFactory, never>;
|
|
112
|
+
static ɵprov: i0.ɵɵInjectableDeclaration<any>;
|
|
113
|
+
}
|
|
114
|
+
export declare class MockMagentoCartItem implements MagentoCartItem {
|
|
115
|
+
__typename: MagentoCartItemTypeEnum;
|
|
116
|
+
id: string;
|
|
117
|
+
prices: {
|
|
118
|
+
__typename: string;
|
|
119
|
+
price: MagentoMoney;
|
|
120
|
+
row_total: MagentoMoney;
|
|
121
|
+
discounts: MagentoDiscount[];
|
|
122
|
+
};
|
|
123
|
+
product: MagentoCartItemProduct;
|
|
124
|
+
quantity: number;
|
|
125
|
+
private createProduct;
|
|
126
|
+
private money;
|
|
127
|
+
private discounts;
|
|
128
|
+
}
|
|
129
|
+
export declare class MagentoCartItemFactory extends DaffModelFactory<MagentoCartItem> {
|
|
130
|
+
constructor();
|
|
131
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<MagentoCartItemFactory, never>;
|
|
132
|
+
static ɵprov: i0.ɵɵInjectableDeclaration<any>;
|
|
133
|
+
}
|
|
134
|
+
export declare class MockMagentoBundleCartItem extends MockMagentoCartItem implements MagentoBundleCartItem {
|
|
135
|
+
__typename: MagentoCartItemTypeEnum;
|
|
136
|
+
bundle_options: {
|
|
137
|
+
id: number;
|
|
138
|
+
type: string;
|
|
139
|
+
label: string;
|
|
140
|
+
price: number;
|
|
141
|
+
quantity: number;
|
|
142
|
+
values: {
|
|
143
|
+
id: number;
|
|
144
|
+
label: string;
|
|
145
|
+
price: number;
|
|
146
|
+
quantity: number;
|
|
147
|
+
}[];
|
|
148
|
+
}[];
|
|
149
|
+
}
|
|
150
|
+
export declare class MagentoBundleCartItemFactory extends DaffModelFactory<MagentoBundleCartItem> {
|
|
151
|
+
constructor();
|
|
152
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<MagentoBundleCartItemFactory, never>;
|
|
153
|
+
static ɵprov: i0.ɵɵInjectableDeclaration<any>;
|
|
154
|
+
}
|
|
155
|
+
export declare class MockMagentoConfigurableCartItem extends MockMagentoCartItem implements MagentoConfigurableCartItem {
|
|
156
|
+
__typename: MagentoCartItemTypeEnum;
|
|
157
|
+
configurable_options: {
|
|
158
|
+
option_label: string;
|
|
159
|
+
value_label: string;
|
|
160
|
+
}[];
|
|
161
|
+
}
|
|
162
|
+
export declare class MagentoConfigurableCartItemFactory extends DaffModelFactory<MagentoConfigurableCartItem> {
|
|
163
|
+
constructor();
|
|
164
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<MagentoConfigurableCartItemFactory, never>;
|
|
165
|
+
static ɵprov: i0.ɵɵInjectableDeclaration<any>;
|
|
166
|
+
}
|
|
167
|
+
export declare class MockMagentoShippingAddress extends MockMagentoCartAddress implements MagentoShippingAddress {
|
|
168
|
+
__typename: string;
|
|
169
|
+
available_shipping_methods: any[];
|
|
170
|
+
selected_shipping_method: any;
|
|
171
|
+
}
|
|
172
|
+
export declare class MagentoShippingAddressFactory extends DaffModelFactory<MagentoShippingAddress> {
|
|
173
|
+
constructor();
|
|
174
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<MagentoShippingAddressFactory, never>;
|
|
175
|
+
static ɵprov: i0.ɵɵInjectableDeclaration<any>;
|
|
176
|
+
}
|