@digital8/lighting-illusions-ts-sdk 0.0.2022 → 0.0.2024
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/.openapi-generator/FILES +18 -6
- package/README.md +11 -5
- package/dist/models/AddressFrontendResource.d.ts +1 -1
- package/dist/models/AddressFrontendResource.js +1 -3
- package/dist/models/AddressResource.d.ts +2 -2
- package/dist/models/AddressResource.js +4 -4
- package/dist/models/CartCouponLiteResource.d.ts +56 -0
- package/dist/models/CartCouponLiteResource.js +67 -0
- package/dist/models/CartCouponLiteResourceArrayResponse.d.ts +33 -0
- package/dist/models/CartCouponLiteResourceArrayResponse.js +50 -0
- package/dist/models/CartResource.d.ts +5 -5
- package/dist/models/CartResource.js +5 -5
- package/dist/models/ExternalApiLogResource.d.ts +1 -1
- package/dist/models/ExternalApiLogResource.js +3 -1
- package/dist/models/FrontendCartResource.d.ts +138 -0
- package/dist/models/FrontendCartResource.js +119 -0
- package/dist/models/FrontendCartResourceArrayResponse.d.ts +33 -0
- package/dist/models/FrontendCartResourceArrayResponse.js +50 -0
- package/dist/models/FrontendCartResourceCouponsInner.d.ts +56 -0
- package/dist/models/FrontendCartResourceCouponsInner.js +57 -0
- package/dist/models/FrontendLineItemResource.d.ts +81 -0
- package/dist/models/FrontendLineItemResource.js +82 -0
- package/dist/models/FrontendLineItemResourceArrayResponse.d.ts +33 -0
- package/dist/models/FrontendLineItemResourceArrayResponse.js +50 -0
- package/dist/models/LineItemListResource.d.ts +3 -3
- package/dist/models/LineItemListResource.js +3 -3
- package/dist/models/ProductChildLineItemLiteResource.d.ts +106 -0
- package/dist/models/{ProductChildCartLiteResource.js → ProductChildLineItemLiteResource.js} +25 -13
- package/dist/models/ProductChildLineItemLiteResourceArrayResponse.d.ts +33 -0
- package/dist/models/ProductChildLineItemLiteResourceArrayResponse.js +50 -0
- package/dist/models/StoreResource.d.ts +1 -1
- package/dist/models/StoreResource.js +3 -1
- package/dist/models/UpdateOrderRequest.d.ts +2 -2
- package/dist/models/UpdateOrderRequest.js +6 -2
- package/dist/models/index.d.ts +9 -3
- package/dist/models/index.js +9 -3
- package/docs/CartCouponLiteResource.md +42 -0
- package/docs/{ProductChildCartLiteResourceArrayResponse.md → CartCouponLiteResourceArrayResponse.md} +5 -5
- package/docs/CartResource.md +2 -2
- package/docs/FrontendCartResource.md +68 -0
- package/docs/{OrderOmnisendEvent.md → FrontendCartResourceArrayResponse.md} +6 -4
- package/docs/FrontendCartResourceCouponsInner.md +42 -0
- package/docs/FrontendLineItemResource.md +50 -0
- package/docs/FrontendLineItemResourceArrayResponse.md +34 -0
- package/docs/LineItemListResource.md +1 -1
- package/docs/{ProductChildCartLiteResource.md → ProductChildLineItemLiteResource.md} +10 -4
- package/docs/ProductChildLineItemLiteResourceArrayResponse.md +34 -0
- package/package.json +1 -1
- package/src/models/AddressFrontendResource.ts +2 -3
- package/src/models/AddressResource.ts +5 -5
- package/src/models/CartCouponLiteResource.ts +102 -0
- package/src/models/CartCouponLiteResourceArrayResponse.ts +73 -0
- package/src/models/CartResource.ts +14 -14
- package/src/models/ExternalApiLogResource.ts +3 -2
- package/src/models/FrontendCartResource.ts +246 -0
- package/src/models/FrontendCartResourceArrayResponse.ts +73 -0
- package/src/models/FrontendCartResourceCouponsInner.ts +97 -0
- package/src/models/FrontendLineItemResource.ts +145 -0
- package/src/models/FrontendLineItemResourceArrayResponse.ts +73 -0
- package/src/models/LineItemListResource.ts +10 -10
- package/src/models/{ProductChildCartLiteResource.ts → ProductChildLineItemLiteResource.ts} +47 -20
- package/src/models/ProductChildLineItemLiteResourceArrayResponse.ts +73 -0
- package/src/models/StoreResource.ts +3 -2
- package/src/models/UpdateOrderRequest.ts +6 -4
- package/src/models/index.ts +9 -3
- package/dist/models/OrderOmnisendEvent.d.ts +0 -25
- package/dist/models/OrderOmnisendEvent.js +0 -51
- package/dist/models/ProductChildCartLiteResource.d.ts +0 -88
- package/dist/models/ProductChildCartLiteResourceArrayResponse.d.ts +0 -33
- package/dist/models/ProductChildCartLiteResourceArrayResponse.js +0 -50
- package/src/models/OrderOmnisendEvent.ts +0 -53
- package/src/models/ProductChildCartLiteResourceArrayResponse.ts +0 -73
|
@@ -0,0 +1,246 @@
|
|
|
1
|
+
/* tslint:disable */
|
|
2
|
+
/* eslint-disable */
|
|
3
|
+
/**
|
|
4
|
+
* My API
|
|
5
|
+
* API documentation for my Laravel app
|
|
6
|
+
*
|
|
7
|
+
* The version of the OpenAPI document: 1.0.0
|
|
8
|
+
*
|
|
9
|
+
*
|
|
10
|
+
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
11
|
+
* https://openapi-generator.tech
|
|
12
|
+
* Do not edit the class manually.
|
|
13
|
+
*/
|
|
14
|
+
|
|
15
|
+
import { mapValues } from '../runtime';
|
|
16
|
+
import type { FrontendLineItemResource } from './FrontendLineItemResource';
|
|
17
|
+
import {
|
|
18
|
+
FrontendLineItemResourceFromJSON,
|
|
19
|
+
FrontendLineItemResourceFromJSONTyped,
|
|
20
|
+
FrontendLineItemResourceToJSON,
|
|
21
|
+
FrontendLineItemResourceToJSONTyped,
|
|
22
|
+
} from './FrontendLineItemResource';
|
|
23
|
+
import type { CustomerListResource } from './CustomerListResource';
|
|
24
|
+
import {
|
|
25
|
+
CustomerListResourceFromJSON,
|
|
26
|
+
CustomerListResourceFromJSONTyped,
|
|
27
|
+
CustomerListResourceToJSON,
|
|
28
|
+
CustomerListResourceToJSONTyped,
|
|
29
|
+
} from './CustomerListResource';
|
|
30
|
+
import type { FrontendCartResourceCouponsInner } from './FrontendCartResourceCouponsInner';
|
|
31
|
+
import {
|
|
32
|
+
FrontendCartResourceCouponsInnerFromJSON,
|
|
33
|
+
FrontendCartResourceCouponsInnerFromJSONTyped,
|
|
34
|
+
FrontendCartResourceCouponsInnerToJSON,
|
|
35
|
+
FrontendCartResourceCouponsInnerToJSONTyped,
|
|
36
|
+
} from './FrontendCartResourceCouponsInner';
|
|
37
|
+
import type { AddressResource } from './AddressResource';
|
|
38
|
+
import {
|
|
39
|
+
AddressResourceFromJSON,
|
|
40
|
+
AddressResourceFromJSONTyped,
|
|
41
|
+
AddressResourceToJSON,
|
|
42
|
+
AddressResourceToJSONTyped,
|
|
43
|
+
} from './AddressResource';
|
|
44
|
+
|
|
45
|
+
/**
|
|
46
|
+
*
|
|
47
|
+
* @export
|
|
48
|
+
* @interface FrontendCartResource
|
|
49
|
+
*/
|
|
50
|
+
export interface FrontendCartResource {
|
|
51
|
+
/**
|
|
52
|
+
*
|
|
53
|
+
* @type {number}
|
|
54
|
+
* @memberof FrontendCartResource
|
|
55
|
+
*/
|
|
56
|
+
id?: number | null;
|
|
57
|
+
/**
|
|
58
|
+
*
|
|
59
|
+
* @type {string}
|
|
60
|
+
* @memberof FrontendCartResource
|
|
61
|
+
*/
|
|
62
|
+
lifecycleStatus: string;
|
|
63
|
+
/**
|
|
64
|
+
*
|
|
65
|
+
* @type {number}
|
|
66
|
+
* @memberof FrontendCartResource
|
|
67
|
+
*/
|
|
68
|
+
siteId: number;
|
|
69
|
+
/**
|
|
70
|
+
*
|
|
71
|
+
* @type {string}
|
|
72
|
+
* @memberof FrontendCartResource
|
|
73
|
+
*/
|
|
74
|
+
sessionToken?: string | null;
|
|
75
|
+
/**
|
|
76
|
+
*
|
|
77
|
+
* @type {CustomerListResource}
|
|
78
|
+
* @memberof FrontendCartResource
|
|
79
|
+
*/
|
|
80
|
+
customer: CustomerListResource | null;
|
|
81
|
+
/**
|
|
82
|
+
*
|
|
83
|
+
* @type {string}
|
|
84
|
+
* @memberof FrontendCartResource
|
|
85
|
+
*/
|
|
86
|
+
shippingType: string;
|
|
87
|
+
/**
|
|
88
|
+
*
|
|
89
|
+
* @type {AddressResource}
|
|
90
|
+
* @memberof FrontendCartResource
|
|
91
|
+
*/
|
|
92
|
+
shippingAddress: AddressResource | null;
|
|
93
|
+
/**
|
|
94
|
+
*
|
|
95
|
+
* @type {AddressResource}
|
|
96
|
+
* @memberof FrontendCartResource
|
|
97
|
+
*/
|
|
98
|
+
billingAddress: AddressResource | null;
|
|
99
|
+
/**
|
|
100
|
+
*
|
|
101
|
+
* @type {Array<FrontendLineItemResource>}
|
|
102
|
+
* @memberof FrontendCartResource
|
|
103
|
+
*/
|
|
104
|
+
lineItems: Array<FrontendLineItemResource> | null;
|
|
105
|
+
/**
|
|
106
|
+
*
|
|
107
|
+
* @type {Array<FrontendCartResourceCouponsInner>}
|
|
108
|
+
* @memberof FrontendCartResource
|
|
109
|
+
*/
|
|
110
|
+
coupons: Array<FrontendCartResourceCouponsInner>;
|
|
111
|
+
/**
|
|
112
|
+
*
|
|
113
|
+
* @type {number}
|
|
114
|
+
* @memberof FrontendCartResource
|
|
115
|
+
*/
|
|
116
|
+
subtotal: number;
|
|
117
|
+
/**
|
|
118
|
+
*
|
|
119
|
+
* @type {number}
|
|
120
|
+
* @memberof FrontendCartResource
|
|
121
|
+
*/
|
|
122
|
+
promotionalDiscount: number;
|
|
123
|
+
/**
|
|
124
|
+
*
|
|
125
|
+
* @type {number}
|
|
126
|
+
* @memberof FrontendCartResource
|
|
127
|
+
*/
|
|
128
|
+
couponSubtotalDiscount: number;
|
|
129
|
+
/**
|
|
130
|
+
*
|
|
131
|
+
* @type {number}
|
|
132
|
+
* @memberof FrontendCartResource
|
|
133
|
+
*/
|
|
134
|
+
couponShippingDiscount: number;
|
|
135
|
+
/**
|
|
136
|
+
*
|
|
137
|
+
* @type {number}
|
|
138
|
+
* @memberof FrontendCartResource
|
|
139
|
+
*/
|
|
140
|
+
shipping: number;
|
|
141
|
+
/**
|
|
142
|
+
*
|
|
143
|
+
* @type {number}
|
|
144
|
+
* @memberof FrontendCartResource
|
|
145
|
+
*/
|
|
146
|
+
transitInsurance: number;
|
|
147
|
+
/**
|
|
148
|
+
*
|
|
149
|
+
* @type {number}
|
|
150
|
+
* @memberof FrontendCartResource
|
|
151
|
+
*/
|
|
152
|
+
gst: number;
|
|
153
|
+
/**
|
|
154
|
+
*
|
|
155
|
+
* @type {number}
|
|
156
|
+
* @memberof FrontendCartResource
|
|
157
|
+
*/
|
|
158
|
+
grandTotal: number;
|
|
159
|
+
}
|
|
160
|
+
|
|
161
|
+
/**
|
|
162
|
+
* Check if a given object implements the FrontendCartResource interface.
|
|
163
|
+
*/
|
|
164
|
+
export function instanceOfFrontendCartResource(value: object): value is FrontendCartResource {
|
|
165
|
+
if (!('lifecycleStatus' in value) || value['lifecycleStatus'] === undefined) return false;
|
|
166
|
+
if (!('siteId' in value) || value['siteId'] === undefined) return false;
|
|
167
|
+
if (!('customer' in value) || value['customer'] === undefined) return false;
|
|
168
|
+
if (!('shippingType' in value) || value['shippingType'] === undefined) return false;
|
|
169
|
+
if (!('shippingAddress' in value) || value['shippingAddress'] === undefined) return false;
|
|
170
|
+
if (!('billingAddress' in value) || value['billingAddress'] === undefined) return false;
|
|
171
|
+
if (!('lineItems' in value) || value['lineItems'] === undefined) return false;
|
|
172
|
+
if (!('coupons' in value) || value['coupons'] === undefined) return false;
|
|
173
|
+
if (!('subtotal' in value) || value['subtotal'] === undefined) return false;
|
|
174
|
+
if (!('promotionalDiscount' in value) || value['promotionalDiscount'] === undefined) return false;
|
|
175
|
+
if (!('couponSubtotalDiscount' in value) || value['couponSubtotalDiscount'] === undefined) return false;
|
|
176
|
+
if (!('couponShippingDiscount' in value) || value['couponShippingDiscount'] === undefined) return false;
|
|
177
|
+
if (!('shipping' in value) || value['shipping'] === undefined) return false;
|
|
178
|
+
if (!('transitInsurance' in value) || value['transitInsurance'] === undefined) return false;
|
|
179
|
+
if (!('gst' in value) || value['gst'] === undefined) return false;
|
|
180
|
+
if (!('grandTotal' in value) || value['grandTotal'] === undefined) return false;
|
|
181
|
+
return true;
|
|
182
|
+
}
|
|
183
|
+
|
|
184
|
+
export function FrontendCartResourceFromJSON(json: any): FrontendCartResource {
|
|
185
|
+
return FrontendCartResourceFromJSONTyped(json, false);
|
|
186
|
+
}
|
|
187
|
+
|
|
188
|
+
export function FrontendCartResourceFromJSONTyped(json: any, ignoreDiscriminator: boolean): FrontendCartResource {
|
|
189
|
+
if (json == null) {
|
|
190
|
+
return json;
|
|
191
|
+
}
|
|
192
|
+
return {
|
|
193
|
+
|
|
194
|
+
'id': json['id'] == null ? undefined : json['id'],
|
|
195
|
+
'lifecycleStatus': json['lifecycleStatus'],
|
|
196
|
+
'siteId': json['siteId'],
|
|
197
|
+
'sessionToken': json['sessionToken'] == null ? undefined : json['sessionToken'],
|
|
198
|
+
'customer': CustomerListResourceFromJSON(json['customer']),
|
|
199
|
+
'shippingType': json['shippingType'],
|
|
200
|
+
'shippingAddress': AddressResourceFromJSON(json['shippingAddress']),
|
|
201
|
+
'billingAddress': AddressResourceFromJSON(json['billingAddress']),
|
|
202
|
+
'lineItems': (json['lineItems'] == null ? null : (json['lineItems'] as Array<any>).map(FrontendLineItemResourceFromJSON)),
|
|
203
|
+
'coupons': ((json['coupons'] as Array<any>).map(FrontendCartResourceCouponsInnerFromJSON)),
|
|
204
|
+
'subtotal': json['subtotal'],
|
|
205
|
+
'promotionalDiscount': json['promotionalDiscount'],
|
|
206
|
+
'couponSubtotalDiscount': json['couponSubtotalDiscount'],
|
|
207
|
+
'couponShippingDiscount': json['couponShippingDiscount'],
|
|
208
|
+
'shipping': json['shipping'],
|
|
209
|
+
'transitInsurance': json['transitInsurance'],
|
|
210
|
+
'gst': json['gst'],
|
|
211
|
+
'grandTotal': json['grandTotal'],
|
|
212
|
+
};
|
|
213
|
+
}
|
|
214
|
+
|
|
215
|
+
export function FrontendCartResourceToJSON(json: any): FrontendCartResource {
|
|
216
|
+
return FrontendCartResourceToJSONTyped(json, false);
|
|
217
|
+
}
|
|
218
|
+
|
|
219
|
+
export function FrontendCartResourceToJSONTyped(value?: FrontendCartResource | null, ignoreDiscriminator: boolean = false): any {
|
|
220
|
+
if (value == null) {
|
|
221
|
+
return value;
|
|
222
|
+
}
|
|
223
|
+
|
|
224
|
+
return {
|
|
225
|
+
|
|
226
|
+
'id': value['id'],
|
|
227
|
+
'lifecycleStatus': value['lifecycleStatus'],
|
|
228
|
+
'siteId': value['siteId'],
|
|
229
|
+
'sessionToken': value['sessionToken'],
|
|
230
|
+
'customer': CustomerListResourceToJSON(value['customer']),
|
|
231
|
+
'shippingType': value['shippingType'],
|
|
232
|
+
'shippingAddress': AddressResourceToJSON(value['shippingAddress']),
|
|
233
|
+
'billingAddress': AddressResourceToJSON(value['billingAddress']),
|
|
234
|
+
'lineItems': (value['lineItems'] == null ? null : (value['lineItems'] as Array<any>).map(FrontendLineItemResourceToJSON)),
|
|
235
|
+
'coupons': ((value['coupons'] as Array<any>).map(FrontendCartResourceCouponsInnerToJSON)),
|
|
236
|
+
'subtotal': value['subtotal'],
|
|
237
|
+
'promotionalDiscount': value['promotionalDiscount'],
|
|
238
|
+
'couponSubtotalDiscount': value['couponSubtotalDiscount'],
|
|
239
|
+
'couponShippingDiscount': value['couponShippingDiscount'],
|
|
240
|
+
'shipping': value['shipping'],
|
|
241
|
+
'transitInsurance': value['transitInsurance'],
|
|
242
|
+
'gst': value['gst'],
|
|
243
|
+
'grandTotal': value['grandTotal'],
|
|
244
|
+
};
|
|
245
|
+
}
|
|
246
|
+
|
|
@@ -0,0 +1,73 @@
|
|
|
1
|
+
/* tslint:disable */
|
|
2
|
+
/* eslint-disable */
|
|
3
|
+
/**
|
|
4
|
+
* My API
|
|
5
|
+
* API documentation for my Laravel app
|
|
6
|
+
*
|
|
7
|
+
* The version of the OpenAPI document: 1.0.0
|
|
8
|
+
*
|
|
9
|
+
*
|
|
10
|
+
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
11
|
+
* https://openapi-generator.tech
|
|
12
|
+
* Do not edit the class manually.
|
|
13
|
+
*/
|
|
14
|
+
|
|
15
|
+
import { mapValues } from '../runtime';
|
|
16
|
+
import type { FrontendCartResource } from './FrontendCartResource';
|
|
17
|
+
import {
|
|
18
|
+
FrontendCartResourceFromJSON,
|
|
19
|
+
FrontendCartResourceFromJSONTyped,
|
|
20
|
+
FrontendCartResourceToJSON,
|
|
21
|
+
FrontendCartResourceToJSONTyped,
|
|
22
|
+
} from './FrontendCartResource';
|
|
23
|
+
|
|
24
|
+
/**
|
|
25
|
+
*
|
|
26
|
+
* @export
|
|
27
|
+
* @interface FrontendCartResourceArrayResponse
|
|
28
|
+
*/
|
|
29
|
+
export interface FrontendCartResourceArrayResponse {
|
|
30
|
+
/**
|
|
31
|
+
*
|
|
32
|
+
* @type {Array<FrontendCartResource>}
|
|
33
|
+
* @memberof FrontendCartResourceArrayResponse
|
|
34
|
+
*/
|
|
35
|
+
data?: Array<FrontendCartResource>;
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
/**
|
|
39
|
+
* Check if a given object implements the FrontendCartResourceArrayResponse interface.
|
|
40
|
+
*/
|
|
41
|
+
export function instanceOfFrontendCartResourceArrayResponse(value: object): value is FrontendCartResourceArrayResponse {
|
|
42
|
+
return true;
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
export function FrontendCartResourceArrayResponseFromJSON(json: any): FrontendCartResourceArrayResponse {
|
|
46
|
+
return FrontendCartResourceArrayResponseFromJSONTyped(json, false);
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
export function FrontendCartResourceArrayResponseFromJSONTyped(json: any, ignoreDiscriminator: boolean): FrontendCartResourceArrayResponse {
|
|
50
|
+
if (json == null) {
|
|
51
|
+
return json;
|
|
52
|
+
}
|
|
53
|
+
return {
|
|
54
|
+
|
|
55
|
+
'data': json['data'] == null ? undefined : ((json['data'] as Array<any>).map(FrontendCartResourceFromJSON)),
|
|
56
|
+
};
|
|
57
|
+
}
|
|
58
|
+
|
|
59
|
+
export function FrontendCartResourceArrayResponseToJSON(json: any): FrontendCartResourceArrayResponse {
|
|
60
|
+
return FrontendCartResourceArrayResponseToJSONTyped(json, false);
|
|
61
|
+
}
|
|
62
|
+
|
|
63
|
+
export function FrontendCartResourceArrayResponseToJSONTyped(value?: FrontendCartResourceArrayResponse | null, ignoreDiscriminator: boolean = false): any {
|
|
64
|
+
if (value == null) {
|
|
65
|
+
return value;
|
|
66
|
+
}
|
|
67
|
+
|
|
68
|
+
return {
|
|
69
|
+
|
|
70
|
+
'data': value['data'] == null ? undefined : ((value['data'] as Array<any>).map(FrontendCartResourceToJSON)),
|
|
71
|
+
};
|
|
72
|
+
}
|
|
73
|
+
|
|
@@ -0,0 +1,97 @@
|
|
|
1
|
+
/* tslint:disable */
|
|
2
|
+
/* eslint-disable */
|
|
3
|
+
/**
|
|
4
|
+
* My API
|
|
5
|
+
* API documentation for my Laravel app
|
|
6
|
+
*
|
|
7
|
+
* The version of the OpenAPI document: 1.0.0
|
|
8
|
+
*
|
|
9
|
+
*
|
|
10
|
+
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
11
|
+
* https://openapi-generator.tech
|
|
12
|
+
* Do not edit the class manually.
|
|
13
|
+
*/
|
|
14
|
+
|
|
15
|
+
import { mapValues } from '../runtime';
|
|
16
|
+
/**
|
|
17
|
+
*
|
|
18
|
+
* @export
|
|
19
|
+
* @interface FrontendCartResourceCouponsInner
|
|
20
|
+
*/
|
|
21
|
+
export interface FrontendCartResourceCouponsInner {
|
|
22
|
+
/**
|
|
23
|
+
*
|
|
24
|
+
* @type {number}
|
|
25
|
+
* @memberof FrontendCartResourceCouponsInner
|
|
26
|
+
*/
|
|
27
|
+
id?: number;
|
|
28
|
+
/**
|
|
29
|
+
*
|
|
30
|
+
* @type {string}
|
|
31
|
+
* @memberof FrontendCartResourceCouponsInner
|
|
32
|
+
*/
|
|
33
|
+
code?: string;
|
|
34
|
+
/**
|
|
35
|
+
*
|
|
36
|
+
* @type {string}
|
|
37
|
+
* @memberof FrontendCartResourceCouponsInner
|
|
38
|
+
*/
|
|
39
|
+
name?: string;
|
|
40
|
+
/**
|
|
41
|
+
*
|
|
42
|
+
* @type {number}
|
|
43
|
+
* @memberof FrontendCartResourceCouponsInner
|
|
44
|
+
*/
|
|
45
|
+
discount?: number;
|
|
46
|
+
/**
|
|
47
|
+
*
|
|
48
|
+
* @type {string}
|
|
49
|
+
* @memberof FrontendCartResourceCouponsInner
|
|
50
|
+
*/
|
|
51
|
+
appliesTo?: string;
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
/**
|
|
55
|
+
* Check if a given object implements the FrontendCartResourceCouponsInner interface.
|
|
56
|
+
*/
|
|
57
|
+
export function instanceOfFrontendCartResourceCouponsInner(value: object): value is FrontendCartResourceCouponsInner {
|
|
58
|
+
return true;
|
|
59
|
+
}
|
|
60
|
+
|
|
61
|
+
export function FrontendCartResourceCouponsInnerFromJSON(json: any): FrontendCartResourceCouponsInner {
|
|
62
|
+
return FrontendCartResourceCouponsInnerFromJSONTyped(json, false);
|
|
63
|
+
}
|
|
64
|
+
|
|
65
|
+
export function FrontendCartResourceCouponsInnerFromJSONTyped(json: any, ignoreDiscriminator: boolean): FrontendCartResourceCouponsInner {
|
|
66
|
+
if (json == null) {
|
|
67
|
+
return json;
|
|
68
|
+
}
|
|
69
|
+
return {
|
|
70
|
+
|
|
71
|
+
'id': json['id'] == null ? undefined : json['id'],
|
|
72
|
+
'code': json['code'] == null ? undefined : json['code'],
|
|
73
|
+
'name': json['name'] == null ? undefined : json['name'],
|
|
74
|
+
'discount': json['discount'] == null ? undefined : json['discount'],
|
|
75
|
+
'appliesTo': json['appliesTo'] == null ? undefined : json['appliesTo'],
|
|
76
|
+
};
|
|
77
|
+
}
|
|
78
|
+
|
|
79
|
+
export function FrontendCartResourceCouponsInnerToJSON(json: any): FrontendCartResourceCouponsInner {
|
|
80
|
+
return FrontendCartResourceCouponsInnerToJSONTyped(json, false);
|
|
81
|
+
}
|
|
82
|
+
|
|
83
|
+
export function FrontendCartResourceCouponsInnerToJSONTyped(value?: FrontendCartResourceCouponsInner | null, ignoreDiscriminator: boolean = false): any {
|
|
84
|
+
if (value == null) {
|
|
85
|
+
return value;
|
|
86
|
+
}
|
|
87
|
+
|
|
88
|
+
return {
|
|
89
|
+
|
|
90
|
+
'id': value['id'],
|
|
91
|
+
'code': value['code'],
|
|
92
|
+
'name': value['name'],
|
|
93
|
+
'discount': value['discount'],
|
|
94
|
+
'appliesTo': value['appliesTo'],
|
|
95
|
+
};
|
|
96
|
+
}
|
|
97
|
+
|
|
@@ -0,0 +1,145 @@
|
|
|
1
|
+
/* tslint:disable */
|
|
2
|
+
/* eslint-disable */
|
|
3
|
+
/**
|
|
4
|
+
* My API
|
|
5
|
+
* API documentation for my Laravel app
|
|
6
|
+
*
|
|
7
|
+
* The version of the OpenAPI document: 1.0.0
|
|
8
|
+
*
|
|
9
|
+
*
|
|
10
|
+
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
11
|
+
* https://openapi-generator.tech
|
|
12
|
+
* Do not edit the class manually.
|
|
13
|
+
*/
|
|
14
|
+
|
|
15
|
+
import { mapValues } from '../runtime';
|
|
16
|
+
import type { ProductChildLineItemLiteResource } from './ProductChildLineItemLiteResource';
|
|
17
|
+
import {
|
|
18
|
+
ProductChildLineItemLiteResourceFromJSON,
|
|
19
|
+
ProductChildLineItemLiteResourceFromJSONTyped,
|
|
20
|
+
ProductChildLineItemLiteResourceToJSON,
|
|
21
|
+
ProductChildLineItemLiteResourceToJSONTyped,
|
|
22
|
+
} from './ProductChildLineItemLiteResource';
|
|
23
|
+
|
|
24
|
+
/**
|
|
25
|
+
*
|
|
26
|
+
* @export
|
|
27
|
+
* @interface FrontendLineItemResource
|
|
28
|
+
*/
|
|
29
|
+
export interface FrontendLineItemResource {
|
|
30
|
+
/**
|
|
31
|
+
*
|
|
32
|
+
* @type {number}
|
|
33
|
+
* @memberof FrontendLineItemResource
|
|
34
|
+
*/
|
|
35
|
+
id?: number | null;
|
|
36
|
+
/**
|
|
37
|
+
*
|
|
38
|
+
* @type {number}
|
|
39
|
+
* @memberof FrontendLineItemResource
|
|
40
|
+
*/
|
|
41
|
+
quantity: number;
|
|
42
|
+
/**
|
|
43
|
+
*
|
|
44
|
+
* @type {number}
|
|
45
|
+
* @memberof FrontendLineItemResource
|
|
46
|
+
*/
|
|
47
|
+
productPrice: number;
|
|
48
|
+
/**
|
|
49
|
+
*
|
|
50
|
+
* @type {number}
|
|
51
|
+
* @memberof FrontendLineItemResource
|
|
52
|
+
*/
|
|
53
|
+
subtotalAmount: number;
|
|
54
|
+
/**
|
|
55
|
+
*
|
|
56
|
+
* @type {number}
|
|
57
|
+
* @memberof FrontendLineItemResource
|
|
58
|
+
*/
|
|
59
|
+
totalAmount: number;
|
|
60
|
+
/**
|
|
61
|
+
*
|
|
62
|
+
* @type {number}
|
|
63
|
+
* @memberof FrontendLineItemResource
|
|
64
|
+
*/
|
|
65
|
+
promotionalSaving: number;
|
|
66
|
+
/**
|
|
67
|
+
*
|
|
68
|
+
* @type {boolean}
|
|
69
|
+
* @memberof FrontendLineItemResource
|
|
70
|
+
*/
|
|
71
|
+
isAvailable: boolean;
|
|
72
|
+
/**
|
|
73
|
+
*
|
|
74
|
+
* @type {boolean}
|
|
75
|
+
* @memberof FrontendLineItemResource
|
|
76
|
+
*/
|
|
77
|
+
isInStock: boolean;
|
|
78
|
+
/**
|
|
79
|
+
*
|
|
80
|
+
* @type {ProductChildLineItemLiteResource}
|
|
81
|
+
* @memberof FrontendLineItemResource
|
|
82
|
+
*/
|
|
83
|
+
productChild: ProductChildLineItemLiteResource | null;
|
|
84
|
+
}
|
|
85
|
+
|
|
86
|
+
/**
|
|
87
|
+
* Check if a given object implements the FrontendLineItemResource interface.
|
|
88
|
+
*/
|
|
89
|
+
export function instanceOfFrontendLineItemResource(value: object): value is FrontendLineItemResource {
|
|
90
|
+
if (!('quantity' in value) || value['quantity'] === undefined) return false;
|
|
91
|
+
if (!('productPrice' in value) || value['productPrice'] === undefined) return false;
|
|
92
|
+
if (!('subtotalAmount' in value) || value['subtotalAmount'] === undefined) return false;
|
|
93
|
+
if (!('totalAmount' in value) || value['totalAmount'] === undefined) return false;
|
|
94
|
+
if (!('promotionalSaving' in value) || value['promotionalSaving'] === undefined) return false;
|
|
95
|
+
if (!('isAvailable' in value) || value['isAvailable'] === undefined) return false;
|
|
96
|
+
if (!('isInStock' in value) || value['isInStock'] === undefined) return false;
|
|
97
|
+
if (!('productChild' in value) || value['productChild'] === undefined) return false;
|
|
98
|
+
return true;
|
|
99
|
+
}
|
|
100
|
+
|
|
101
|
+
export function FrontendLineItemResourceFromJSON(json: any): FrontendLineItemResource {
|
|
102
|
+
return FrontendLineItemResourceFromJSONTyped(json, false);
|
|
103
|
+
}
|
|
104
|
+
|
|
105
|
+
export function FrontendLineItemResourceFromJSONTyped(json: any, ignoreDiscriminator: boolean): FrontendLineItemResource {
|
|
106
|
+
if (json == null) {
|
|
107
|
+
return json;
|
|
108
|
+
}
|
|
109
|
+
return {
|
|
110
|
+
|
|
111
|
+
'id': json['id'] == null ? undefined : json['id'],
|
|
112
|
+
'quantity': json['quantity'],
|
|
113
|
+
'productPrice': json['productPrice'],
|
|
114
|
+
'subtotalAmount': json['subtotalAmount'],
|
|
115
|
+
'totalAmount': json['totalAmount'],
|
|
116
|
+
'promotionalSaving': json['promotionalSaving'],
|
|
117
|
+
'isAvailable': json['isAvailable'],
|
|
118
|
+
'isInStock': json['isInStock'],
|
|
119
|
+
'productChild': ProductChildLineItemLiteResourceFromJSON(json['productChild']),
|
|
120
|
+
};
|
|
121
|
+
}
|
|
122
|
+
|
|
123
|
+
export function FrontendLineItemResourceToJSON(json: any): FrontendLineItemResource {
|
|
124
|
+
return FrontendLineItemResourceToJSONTyped(json, false);
|
|
125
|
+
}
|
|
126
|
+
|
|
127
|
+
export function FrontendLineItemResourceToJSONTyped(value?: FrontendLineItemResource | null, ignoreDiscriminator: boolean = false): any {
|
|
128
|
+
if (value == null) {
|
|
129
|
+
return value;
|
|
130
|
+
}
|
|
131
|
+
|
|
132
|
+
return {
|
|
133
|
+
|
|
134
|
+
'id': value['id'],
|
|
135
|
+
'quantity': value['quantity'],
|
|
136
|
+
'productPrice': value['productPrice'],
|
|
137
|
+
'subtotalAmount': value['subtotalAmount'],
|
|
138
|
+
'totalAmount': value['totalAmount'],
|
|
139
|
+
'promotionalSaving': value['promotionalSaving'],
|
|
140
|
+
'isAvailable': value['isAvailable'],
|
|
141
|
+
'isInStock': value['isInStock'],
|
|
142
|
+
'productChild': ProductChildLineItemLiteResourceToJSON(value['productChild']),
|
|
143
|
+
};
|
|
144
|
+
}
|
|
145
|
+
|
|
@@ -0,0 +1,73 @@
|
|
|
1
|
+
/* tslint:disable */
|
|
2
|
+
/* eslint-disable */
|
|
3
|
+
/**
|
|
4
|
+
* My API
|
|
5
|
+
* API documentation for my Laravel app
|
|
6
|
+
*
|
|
7
|
+
* The version of the OpenAPI document: 1.0.0
|
|
8
|
+
*
|
|
9
|
+
*
|
|
10
|
+
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
11
|
+
* https://openapi-generator.tech
|
|
12
|
+
* Do not edit the class manually.
|
|
13
|
+
*/
|
|
14
|
+
|
|
15
|
+
import { mapValues } from '../runtime';
|
|
16
|
+
import type { FrontendLineItemResource } from './FrontendLineItemResource';
|
|
17
|
+
import {
|
|
18
|
+
FrontendLineItemResourceFromJSON,
|
|
19
|
+
FrontendLineItemResourceFromJSONTyped,
|
|
20
|
+
FrontendLineItemResourceToJSON,
|
|
21
|
+
FrontendLineItemResourceToJSONTyped,
|
|
22
|
+
} from './FrontendLineItemResource';
|
|
23
|
+
|
|
24
|
+
/**
|
|
25
|
+
*
|
|
26
|
+
* @export
|
|
27
|
+
* @interface FrontendLineItemResourceArrayResponse
|
|
28
|
+
*/
|
|
29
|
+
export interface FrontendLineItemResourceArrayResponse {
|
|
30
|
+
/**
|
|
31
|
+
*
|
|
32
|
+
* @type {Array<FrontendLineItemResource>}
|
|
33
|
+
* @memberof FrontendLineItemResourceArrayResponse
|
|
34
|
+
*/
|
|
35
|
+
data?: Array<FrontendLineItemResource>;
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
/**
|
|
39
|
+
* Check if a given object implements the FrontendLineItemResourceArrayResponse interface.
|
|
40
|
+
*/
|
|
41
|
+
export function instanceOfFrontendLineItemResourceArrayResponse(value: object): value is FrontendLineItemResourceArrayResponse {
|
|
42
|
+
return true;
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
export function FrontendLineItemResourceArrayResponseFromJSON(json: any): FrontendLineItemResourceArrayResponse {
|
|
46
|
+
return FrontendLineItemResourceArrayResponseFromJSONTyped(json, false);
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
export function FrontendLineItemResourceArrayResponseFromJSONTyped(json: any, ignoreDiscriminator: boolean): FrontendLineItemResourceArrayResponse {
|
|
50
|
+
if (json == null) {
|
|
51
|
+
return json;
|
|
52
|
+
}
|
|
53
|
+
return {
|
|
54
|
+
|
|
55
|
+
'data': json['data'] == null ? undefined : ((json['data'] as Array<any>).map(FrontendLineItemResourceFromJSON)),
|
|
56
|
+
};
|
|
57
|
+
}
|
|
58
|
+
|
|
59
|
+
export function FrontendLineItemResourceArrayResponseToJSON(json: any): FrontendLineItemResourceArrayResponse {
|
|
60
|
+
return FrontendLineItemResourceArrayResponseToJSONTyped(json, false);
|
|
61
|
+
}
|
|
62
|
+
|
|
63
|
+
export function FrontendLineItemResourceArrayResponseToJSONTyped(value?: FrontendLineItemResourceArrayResponse | null, ignoreDiscriminator: boolean = false): any {
|
|
64
|
+
if (value == null) {
|
|
65
|
+
return value;
|
|
66
|
+
}
|
|
67
|
+
|
|
68
|
+
return {
|
|
69
|
+
|
|
70
|
+
'data': value['data'] == null ? undefined : ((value['data'] as Array<any>).map(FrontendLineItemResourceToJSON)),
|
|
71
|
+
};
|
|
72
|
+
}
|
|
73
|
+
|
|
@@ -27,13 +27,13 @@ import {
|
|
|
27
27
|
LineItemDiscountResourceToJSON,
|
|
28
28
|
LineItemDiscountResourceToJSONTyped,
|
|
29
29
|
} from './LineItemDiscountResource';
|
|
30
|
-
import type {
|
|
30
|
+
import type { ProductChildLineItemLiteResource } from './ProductChildLineItemLiteResource';
|
|
31
31
|
import {
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
} from './
|
|
32
|
+
ProductChildLineItemLiteResourceFromJSON,
|
|
33
|
+
ProductChildLineItemLiteResourceFromJSONTyped,
|
|
34
|
+
ProductChildLineItemLiteResourceToJSON,
|
|
35
|
+
ProductChildLineItemLiteResourceToJSONTyped,
|
|
36
|
+
} from './ProductChildLineItemLiteResource';
|
|
37
37
|
|
|
38
38
|
/**
|
|
39
39
|
*
|
|
@@ -97,10 +97,10 @@ export interface LineItemListResource {
|
|
|
97
97
|
discounts: Array<LineItemDiscountResource> | null;
|
|
98
98
|
/**
|
|
99
99
|
*
|
|
100
|
-
* @type {
|
|
100
|
+
* @type {ProductChildLineItemLiteResource}
|
|
101
101
|
* @memberof LineItemListResource
|
|
102
102
|
*/
|
|
103
|
-
productChild:
|
|
103
|
+
productChild: ProductChildLineItemLiteResource | null;
|
|
104
104
|
}
|
|
105
105
|
|
|
106
106
|
/**
|
|
@@ -139,7 +139,7 @@ export function LineItemListResourceFromJSONTyped(json: any, ignoreDiscriminator
|
|
|
139
139
|
'totalDiscount': json['totalDiscount'],
|
|
140
140
|
'lineSubtotal': json['lineSubtotal'],
|
|
141
141
|
'discounts': (json['discounts'] == null ? null : (json['discounts'] as Array<any>).map(LineItemDiscountResourceFromJSON)),
|
|
142
|
-
'productChild':
|
|
142
|
+
'productChild': ProductChildLineItemLiteResourceFromJSON(json['productChild']),
|
|
143
143
|
};
|
|
144
144
|
}
|
|
145
145
|
|
|
@@ -163,7 +163,7 @@ export function LineItemListResourceToJSONTyped(value?: LineItemListResource | n
|
|
|
163
163
|
'totalDiscount': value['totalDiscount'],
|
|
164
164
|
'lineSubtotal': value['lineSubtotal'],
|
|
165
165
|
'discounts': (value['discounts'] == null ? null : (value['discounts'] as Array<any>).map(LineItemDiscountResourceToJSON)),
|
|
166
|
-
'productChild':
|
|
166
|
+
'productChild': ProductChildLineItemLiteResourceToJSON(value['productChild']),
|
|
167
167
|
};
|
|
168
168
|
}
|
|
169
169
|
|