@digital8/lighting-illusions-ts-sdk 0.0.1902 → 0.0.1904
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 +12 -0
- package/README.md +8 -2
- package/dist/models/AddressFrontendResource.d.ts +2 -2
- package/dist/models/AddressFrontendResource.js +4 -4
- package/dist/models/AddressResource.d.ts +2 -8
- package/dist/models/AddressResource.js +2 -4
- package/dist/models/CartCouponLiteResource.d.ts +44 -0
- package/dist/models/CartCouponLiteResource.js +59 -0
- package/dist/models/CartCouponLiteResourceArrayResponse.d.ts +33 -0
- package/dist/models/CartCouponLiteResourceArrayResponse.js +50 -0
- package/dist/models/CartListResource.d.ts +18 -0
- package/dist/models/CartListResource.js +8 -0
- package/dist/models/CartResource.d.ts +18 -0
- package/dist/models/CartResource.js +8 -0
- package/dist/models/CustomerListResource.d.ts +6 -0
- package/dist/models/CustomerListResource.js +2 -0
- package/dist/models/CustomerResource.d.ts +6 -0
- package/dist/models/CustomerResource.js +2 -0
- 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/FrontendLineItemResource.d.ts +63 -0
- package/dist/models/FrontendLineItemResource.js +70 -0
- package/dist/models/FrontendLineItemResourceArrayResponse.d.ts +33 -0
- package/dist/models/FrontendLineItemResourceArrayResponse.js +50 -0
- package/dist/models/ProductChildCartLiteResource.d.ts +6 -0
- package/dist/models/ProductChildCartLiteResource.js +4 -0
- package/dist/models/StoreCartRequestShippingAddress.d.ts +0 -6
- package/dist/models/StoreCartRequestShippingAddress.js +0 -2
- package/dist/models/StoreFrontendResource.d.ts +1 -1
- package/dist/models/StoreFrontendResource.js +3 -1
- package/dist/models/StoreListResource.d.ts +1 -1
- package/dist/models/StoreListResource.js +3 -1
- package/dist/models/StoreResource.d.ts +1 -1
- package/dist/models/StoreResource.js +1 -3
- package/dist/models/StoreSpecialDateFrontendResource.d.ts +2 -2
- package/dist/models/StoreSpecialDateFrontendResource.js +1 -3
- package/dist/models/StoreSpecialDateResource.d.ts +2 -2
- package/dist/models/StoreSpecialDateResource.js +1 -3
- package/dist/models/StoreStoreRequestAddress.d.ts +0 -6
- package/dist/models/StoreStoreRequestAddress.js +0 -2
- package/dist/models/index.d.ts +6 -0
- package/dist/models/index.js +6 -0
- package/docs/AddressResource.md +1 -3
- package/docs/CartCouponLiteResource.md +38 -0
- package/docs/CartCouponLiteResourceArrayResponse.md +34 -0
- package/docs/CartListResource.md +6 -0
- package/docs/CartResource.md +6 -0
- package/docs/CustomerListResource.md +2 -0
- package/docs/CustomerResource.md +2 -0
- package/docs/FrontendCartResource.md +68 -0
- package/docs/FrontendCartResourceArrayResponse.md +34 -0
- package/docs/FrontendLineItemResource.md +44 -0
- package/docs/FrontendLineItemResourceArrayResponse.md +34 -0
- package/docs/ProductChildCartLiteResource.md +2 -0
- package/docs/StoreCartRequestShippingAddress.md +0 -2
- package/docs/StoreSpecialDateFrontendResource.md +1 -1
- package/docs/StoreSpecialDateResource.md +1 -1
- package/docs/StoreStoreRequestAddress.md +0 -2
- package/package.json +1 -1
- package/src/models/AddressFrontendResource.ts +5 -5
- package/src/models/AddressResource.ts +4 -12
- package/src/models/CartCouponLiteResource.ts +84 -0
- package/src/models/CartCouponLiteResourceArrayResponse.ts +73 -0
- package/src/models/CartListResource.ts +25 -0
- package/src/models/CartResource.ts +25 -0
- package/src/models/CustomerListResource.ts +8 -0
- package/src/models/CustomerResource.ts +8 -0
- package/src/models/ExternalApiLogResource.ts +3 -2
- package/src/models/FrontendCartResource.ts +246 -0
- package/src/models/FrontendCartResourceArrayResponse.ts +73 -0
- package/src/models/FrontendLineItemResource.ts +118 -0
- package/src/models/FrontendLineItemResourceArrayResponse.ts +73 -0
- package/src/models/ProductChildCartLiteResource.ts +9 -0
- package/src/models/StoreCartRequestShippingAddress.ts +0 -8
- package/src/models/StoreFrontendResource.ts +3 -2
- package/src/models/StoreListResource.ts +3 -2
- package/src/models/StoreResource.ts +2 -3
- package/src/models/StoreSpecialDateFrontendResource.ts +3 -4
- package/src/models/StoreSpecialDateResource.ts +3 -4
- package/src/models/StoreStoreRequestAddress.ts +0 -8
- package/src/models/index.ts +6 -0
|
@@ -25,24 +25,18 @@ export interface AddressResource {
|
|
|
25
25
|
* @memberof AddressResource
|
|
26
26
|
*/
|
|
27
27
|
id?: number | null;
|
|
28
|
-
/**
|
|
29
|
-
*
|
|
30
|
-
* @type {number}
|
|
31
|
-
* @memberof AddressResource
|
|
32
|
-
*/
|
|
33
|
-
sourceAddressId?: number | null;
|
|
34
28
|
/**
|
|
35
29
|
*
|
|
36
30
|
* @type {string}
|
|
37
31
|
* @memberof AddressResource
|
|
38
32
|
*/
|
|
39
|
-
|
|
33
|
+
sourceAddressId?: string | null;
|
|
40
34
|
/**
|
|
41
35
|
*
|
|
42
36
|
* @type {string}
|
|
43
37
|
* @memberof AddressResource
|
|
44
38
|
*/
|
|
45
|
-
company
|
|
39
|
+
company: string;
|
|
46
40
|
/**
|
|
47
41
|
*
|
|
48
42
|
* @type {string}
|
|
@@ -91,7 +85,7 @@ export interface AddressResource {
|
|
|
91
85
|
* Check if a given object implements the AddressResource interface.
|
|
92
86
|
*/
|
|
93
87
|
export function instanceOfAddressResource(value: object): value is AddressResource {
|
|
94
|
-
if (!('
|
|
88
|
+
if (!('company' in value) || value['company'] === undefined) return false;
|
|
95
89
|
if (!('line1' in value) || value['line1'] === undefined) return false;
|
|
96
90
|
if (!('postcode' in value) || value['postcode'] === undefined) return false;
|
|
97
91
|
if (!('suburb' in value) || value['suburb'] === undefined) return false;
|
|
@@ -113,8 +107,7 @@ export function AddressResourceFromJSONTyped(json: any, ignoreDiscriminator: boo
|
|
|
113
107
|
|
|
114
108
|
'id': json['id'] == null ? undefined : json['id'],
|
|
115
109
|
'sourceAddressId': json['source_address_id'] == null ? undefined : json['source_address_id'],
|
|
116
|
-
'
|
|
117
|
-
'company': json['company'] == null ? undefined : json['company'],
|
|
110
|
+
'company': json['company'],
|
|
118
111
|
'line1': json['line_1'],
|
|
119
112
|
'line2': json['line_2'] == null ? undefined : json['line_2'],
|
|
120
113
|
'postcode': json['postcode'],
|
|
@@ -138,7 +131,6 @@ export function AddressResourceToJSONTyped(value?: AddressResource | null, ignor
|
|
|
138
131
|
|
|
139
132
|
'id': value['id'],
|
|
140
133
|
'source_address_id': value['sourceAddressId'],
|
|
141
|
-
'addressee_name': value['addresseeName'],
|
|
142
134
|
'company': value['company'],
|
|
143
135
|
'line_1': value['line1'],
|
|
144
136
|
'line_2': value['line2'],
|
|
@@ -0,0 +1,84 @@
|
|
|
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 CartCouponLiteResource
|
|
20
|
+
*/
|
|
21
|
+
export interface CartCouponLiteResource {
|
|
22
|
+
/**
|
|
23
|
+
*
|
|
24
|
+
* @type {number}
|
|
25
|
+
* @memberof CartCouponLiteResource
|
|
26
|
+
*/
|
|
27
|
+
id: number;
|
|
28
|
+
/**
|
|
29
|
+
*
|
|
30
|
+
* @type {string}
|
|
31
|
+
* @memberof CartCouponLiteResource
|
|
32
|
+
*/
|
|
33
|
+
code: string;
|
|
34
|
+
/**
|
|
35
|
+
*
|
|
36
|
+
* @type {string}
|
|
37
|
+
* @memberof CartCouponLiteResource
|
|
38
|
+
*/
|
|
39
|
+
name: string;
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
/**
|
|
43
|
+
* Check if a given object implements the CartCouponLiteResource interface.
|
|
44
|
+
*/
|
|
45
|
+
export function instanceOfCartCouponLiteResource(value: object): value is CartCouponLiteResource {
|
|
46
|
+
if (!('id' in value) || value['id'] === undefined) return false;
|
|
47
|
+
if (!('code' in value) || value['code'] === undefined) return false;
|
|
48
|
+
if (!('name' in value) || value['name'] === undefined) return false;
|
|
49
|
+
return true;
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
export function CartCouponLiteResourceFromJSON(json: any): CartCouponLiteResource {
|
|
53
|
+
return CartCouponLiteResourceFromJSONTyped(json, false);
|
|
54
|
+
}
|
|
55
|
+
|
|
56
|
+
export function CartCouponLiteResourceFromJSONTyped(json: any, ignoreDiscriminator: boolean): CartCouponLiteResource {
|
|
57
|
+
if (json == null) {
|
|
58
|
+
return json;
|
|
59
|
+
}
|
|
60
|
+
return {
|
|
61
|
+
|
|
62
|
+
'id': json['id'],
|
|
63
|
+
'code': json['code'],
|
|
64
|
+
'name': json['name'],
|
|
65
|
+
};
|
|
66
|
+
}
|
|
67
|
+
|
|
68
|
+
export function CartCouponLiteResourceToJSON(json: any): CartCouponLiteResource {
|
|
69
|
+
return CartCouponLiteResourceToJSONTyped(json, false);
|
|
70
|
+
}
|
|
71
|
+
|
|
72
|
+
export function CartCouponLiteResourceToJSONTyped(value?: CartCouponLiteResource | null, ignoreDiscriminator: boolean = false): any {
|
|
73
|
+
if (value == null) {
|
|
74
|
+
return value;
|
|
75
|
+
}
|
|
76
|
+
|
|
77
|
+
return {
|
|
78
|
+
|
|
79
|
+
'id': value['id'],
|
|
80
|
+
'code': value['code'],
|
|
81
|
+
'name': value['name'],
|
|
82
|
+
};
|
|
83
|
+
}
|
|
84
|
+
|
|
@@ -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 { CartCouponLiteResource } from './CartCouponLiteResource';
|
|
17
|
+
import {
|
|
18
|
+
CartCouponLiteResourceFromJSON,
|
|
19
|
+
CartCouponLiteResourceFromJSONTyped,
|
|
20
|
+
CartCouponLiteResourceToJSON,
|
|
21
|
+
CartCouponLiteResourceToJSONTyped,
|
|
22
|
+
} from './CartCouponLiteResource';
|
|
23
|
+
|
|
24
|
+
/**
|
|
25
|
+
*
|
|
26
|
+
* @export
|
|
27
|
+
* @interface CartCouponLiteResourceArrayResponse
|
|
28
|
+
*/
|
|
29
|
+
export interface CartCouponLiteResourceArrayResponse {
|
|
30
|
+
/**
|
|
31
|
+
*
|
|
32
|
+
* @type {Array<CartCouponLiteResource>}
|
|
33
|
+
* @memberof CartCouponLiteResourceArrayResponse
|
|
34
|
+
*/
|
|
35
|
+
data?: Array<CartCouponLiteResource>;
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
/**
|
|
39
|
+
* Check if a given object implements the CartCouponLiteResourceArrayResponse interface.
|
|
40
|
+
*/
|
|
41
|
+
export function instanceOfCartCouponLiteResourceArrayResponse(value: object): value is CartCouponLiteResourceArrayResponse {
|
|
42
|
+
return true;
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
export function CartCouponLiteResourceArrayResponseFromJSON(json: any): CartCouponLiteResourceArrayResponse {
|
|
46
|
+
return CartCouponLiteResourceArrayResponseFromJSONTyped(json, false);
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
export function CartCouponLiteResourceArrayResponseFromJSONTyped(json: any, ignoreDiscriminator: boolean): CartCouponLiteResourceArrayResponse {
|
|
50
|
+
if (json == null) {
|
|
51
|
+
return json;
|
|
52
|
+
}
|
|
53
|
+
return {
|
|
54
|
+
|
|
55
|
+
'data': json['data'] == null ? undefined : ((json['data'] as Array<any>).map(CartCouponLiteResourceFromJSON)),
|
|
56
|
+
};
|
|
57
|
+
}
|
|
58
|
+
|
|
59
|
+
export function CartCouponLiteResourceArrayResponseToJSON(json: any): CartCouponLiteResourceArrayResponse {
|
|
60
|
+
return CartCouponLiteResourceArrayResponseToJSONTyped(json, false);
|
|
61
|
+
}
|
|
62
|
+
|
|
63
|
+
export function CartCouponLiteResourceArrayResponseToJSONTyped(value?: CartCouponLiteResourceArrayResponse | 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(CartCouponLiteResourceToJSON)),
|
|
71
|
+
};
|
|
72
|
+
}
|
|
73
|
+
|
|
@@ -47,12 +47,30 @@ export interface CartListResource {
|
|
|
47
47
|
* @memberof CartListResource
|
|
48
48
|
*/
|
|
49
49
|
id?: number | null;
|
|
50
|
+
/**
|
|
51
|
+
*
|
|
52
|
+
* @type {number}
|
|
53
|
+
* @memberof CartListResource
|
|
54
|
+
*/
|
|
55
|
+
siteId: number;
|
|
56
|
+
/**
|
|
57
|
+
*
|
|
58
|
+
* @type {number}
|
|
59
|
+
* @memberof CartListResource
|
|
60
|
+
*/
|
|
61
|
+
customerId?: number | null;
|
|
50
62
|
/**
|
|
51
63
|
*
|
|
52
64
|
* @type {string}
|
|
53
65
|
* @memberof CartListResource
|
|
54
66
|
*/
|
|
55
67
|
guestEmail?: string | null;
|
|
68
|
+
/**
|
|
69
|
+
*
|
|
70
|
+
* @type {number}
|
|
71
|
+
* @memberof CartListResource
|
|
72
|
+
*/
|
|
73
|
+
adminId?: number | null;
|
|
56
74
|
/**
|
|
57
75
|
*
|
|
58
76
|
* @type {string}
|
|
@@ -149,6 +167,7 @@ export interface CartListResource {
|
|
|
149
167
|
* Check if a given object implements the CartListResource interface.
|
|
150
168
|
*/
|
|
151
169
|
export function instanceOfCartListResource(value: object): value is CartListResource {
|
|
170
|
+
if (!('siteId' in value) || value['siteId'] === undefined) return false;
|
|
152
171
|
if (!('source' in value) || value['source'] === undefined) return false;
|
|
153
172
|
if (!('overrideShipping' in value) || value['overrideShipping'] === undefined) return false;
|
|
154
173
|
if (!('overrideInsurance' in value) || value['overrideInsurance'] === undefined) return false;
|
|
@@ -173,7 +192,10 @@ export function CartListResourceFromJSONTyped(json: any, ignoreDiscriminator: bo
|
|
|
173
192
|
return {
|
|
174
193
|
|
|
175
194
|
'id': json['id'] == null ? undefined : json['id'],
|
|
195
|
+
'siteId': json['site_id'],
|
|
196
|
+
'customerId': json['customer_id'] == null ? undefined : json['customer_id'],
|
|
176
197
|
'guestEmail': json['guest_email'] == null ? undefined : json['guest_email'],
|
|
198
|
+
'adminId': json['admin_id'] == null ? undefined : json['admin_id'],
|
|
177
199
|
'source': json['source'],
|
|
178
200
|
'shippingType': json['shipping_type'] == null ? undefined : json['shipping_type'],
|
|
179
201
|
'shippingSubtotal': json['shipping_subtotal'] == null ? undefined : json['shipping_subtotal'],
|
|
@@ -204,7 +226,10 @@ export function CartListResourceToJSONTyped(value?: CartListResource | null, ign
|
|
|
204
226
|
return {
|
|
205
227
|
|
|
206
228
|
'id': value['id'],
|
|
229
|
+
'site_id': value['siteId'],
|
|
230
|
+
'customer_id': value['customerId'],
|
|
207
231
|
'guest_email': value['guestEmail'],
|
|
232
|
+
'admin_id': value['adminId'],
|
|
208
233
|
'source': value['source'],
|
|
209
234
|
'shipping_type': value['shippingType'],
|
|
210
235
|
'shipping_subtotal': value['shippingSubtotal'],
|
|
@@ -61,6 +61,18 @@ export interface CartResource {
|
|
|
61
61
|
* @memberof CartResource
|
|
62
62
|
*/
|
|
63
63
|
id?: number | null;
|
|
64
|
+
/**
|
|
65
|
+
*
|
|
66
|
+
* @type {number}
|
|
67
|
+
* @memberof CartResource
|
|
68
|
+
*/
|
|
69
|
+
siteId: number;
|
|
70
|
+
/**
|
|
71
|
+
*
|
|
72
|
+
* @type {number}
|
|
73
|
+
* @memberof CartResource
|
|
74
|
+
*/
|
|
75
|
+
customerId?: number | null;
|
|
64
76
|
/**
|
|
65
77
|
*
|
|
66
78
|
* @type {string}
|
|
@@ -109,6 +121,12 @@ export interface CartResource {
|
|
|
109
121
|
* @memberof CartResource
|
|
110
122
|
*/
|
|
111
123
|
updatedAt?: Date | null;
|
|
124
|
+
/**
|
|
125
|
+
*
|
|
126
|
+
* @type {number}
|
|
127
|
+
* @memberof CartResource
|
|
128
|
+
*/
|
|
129
|
+
adminId?: number | null;
|
|
112
130
|
/**
|
|
113
131
|
*
|
|
114
132
|
* @type {string}
|
|
@@ -253,6 +271,7 @@ export interface CartResource {
|
|
|
253
271
|
* Check if a given object implements the CartResource interface.
|
|
254
272
|
*/
|
|
255
273
|
export function instanceOfCartResource(value: object): value is CartResource {
|
|
274
|
+
if (!('siteId' in value) || value['siteId'] === undefined) return false;
|
|
256
275
|
if (!('source' in value) || value['source'] === undefined) return false;
|
|
257
276
|
if (!('expiryDate' in value) || value['expiryDate'] === undefined) return false;
|
|
258
277
|
if (!('shippingType' in value) || value['shippingType'] === undefined) return false;
|
|
@@ -291,6 +310,8 @@ export function CartResourceFromJSONTyped(json: any, ignoreDiscriminator: boolea
|
|
|
291
310
|
return {
|
|
292
311
|
|
|
293
312
|
'id': json['id'] == null ? undefined : json['id'],
|
|
313
|
+
'siteId': json['site_id'],
|
|
314
|
+
'customerId': json['customer_id'] == null ? undefined : json['customer_id'],
|
|
294
315
|
'guestEmail': json['guest_email'] == null ? undefined : json['guest_email'],
|
|
295
316
|
'source': json['source'],
|
|
296
317
|
'sessionToken': json['session_token'] == null ? undefined : json['session_token'],
|
|
@@ -299,6 +320,7 @@ export function CartResourceFromJSONTyped(json: any, ignoreDiscriminator: boolea
|
|
|
299
320
|
'checkoutCompletedAt': json['checkout_completed_at'] == null ? undefined : (new Date(json['checkout_completed_at'])),
|
|
300
321
|
'createdAt': json['created_at'] == null ? undefined : (new Date(json['created_at'])),
|
|
301
322
|
'updatedAt': json['updated_at'] == null ? undefined : (new Date(json['updated_at'])),
|
|
323
|
+
'adminId': json['admin_id'] == null ? undefined : json['admin_id'],
|
|
302
324
|
'shippingType': json['shipping_type'],
|
|
303
325
|
'shippingSubtotal': json['shipping_subtotal'] == null ? undefined : json['shipping_subtotal'],
|
|
304
326
|
'overrideShipping': json['override_shipping'],
|
|
@@ -337,6 +359,8 @@ export function CartResourceToJSONTyped(value?: CartResource | null, ignoreDiscr
|
|
|
337
359
|
return {
|
|
338
360
|
|
|
339
361
|
'id': value['id'],
|
|
362
|
+
'site_id': value['siteId'],
|
|
363
|
+
'customer_id': value['customerId'],
|
|
340
364
|
'guest_email': value['guestEmail'],
|
|
341
365
|
'source': value['source'],
|
|
342
366
|
'session_token': value['sessionToken'],
|
|
@@ -345,6 +369,7 @@ export function CartResourceToJSONTyped(value?: CartResource | null, ignoreDiscr
|
|
|
345
369
|
'checkout_completed_at': value['checkoutCompletedAt'] == null ? value['checkoutCompletedAt'] : value['checkoutCompletedAt'].toISOString(),
|
|
346
370
|
'created_at': value['createdAt'] == null ? value['createdAt'] : value['createdAt'].toISOString(),
|
|
347
371
|
'updated_at': value['updatedAt'] == null ? value['updatedAt'] : value['updatedAt'].toISOString(),
|
|
372
|
+
'admin_id': value['adminId'],
|
|
348
373
|
'shipping_type': value['shippingType'],
|
|
349
374
|
'shipping_subtotal': value['shippingSubtotal'],
|
|
350
375
|
'override_shipping': value['overrideShipping'],
|
|
@@ -64,6 +64,12 @@ export interface CustomerListResource {
|
|
|
64
64
|
* @memberof CustomerListResource
|
|
65
65
|
*/
|
|
66
66
|
phone: string;
|
|
67
|
+
/**
|
|
68
|
+
*
|
|
69
|
+
* @type {string}
|
|
70
|
+
* @memberof CustomerListResource
|
|
71
|
+
*/
|
|
72
|
+
siteId?: string | null;
|
|
67
73
|
/**
|
|
68
74
|
*
|
|
69
75
|
* @type {SiteLiteResource}
|
|
@@ -106,6 +112,7 @@ export function CustomerListResourceFromJSONTyped(json: any, ignoreDiscriminator
|
|
|
106
112
|
'lastName': json['last_name'],
|
|
107
113
|
'email': json['email'],
|
|
108
114
|
'phone': json['phone'],
|
|
115
|
+
'siteId': json['site_id'] == null ? undefined : json['site_id'],
|
|
109
116
|
'site': SiteLiteResourceFromJSON(json['site']),
|
|
110
117
|
'addresses': (json['addresses'] == null ? null : (json['addresses'] as Array<any>).map(LiAddressResourceFromJSON)),
|
|
111
118
|
};
|
|
@@ -127,6 +134,7 @@ export function CustomerListResourceToJSONTyped(value?: CustomerListResource | n
|
|
|
127
134
|
'last_name': value['lastName'],
|
|
128
135
|
'email': value['email'],
|
|
129
136
|
'phone': value['phone'],
|
|
137
|
+
'site_id': value['siteId'],
|
|
130
138
|
'site': SiteLiteResourceToJSON(value['site']),
|
|
131
139
|
'addresses': (value['addresses'] == null ? null : (value['addresses'] as Array<any>).map(LiAddressResourceToJSON)),
|
|
132
140
|
};
|
|
@@ -64,6 +64,12 @@ export interface CustomerResource {
|
|
|
64
64
|
* @memberof CustomerResource
|
|
65
65
|
*/
|
|
66
66
|
phone: string;
|
|
67
|
+
/**
|
|
68
|
+
*
|
|
69
|
+
* @type {string}
|
|
70
|
+
* @memberof CustomerResource
|
|
71
|
+
*/
|
|
72
|
+
siteId?: string | null;
|
|
67
73
|
/**
|
|
68
74
|
*
|
|
69
75
|
* @type {SiteLiteResource}
|
|
@@ -106,6 +112,7 @@ export function CustomerResourceFromJSONTyped(json: any, ignoreDiscriminator: bo
|
|
|
106
112
|
'lastName': json['last_name'],
|
|
107
113
|
'email': json['email'],
|
|
108
114
|
'phone': json['phone'],
|
|
115
|
+
'siteId': json['site_id'] == null ? undefined : json['site_id'],
|
|
109
116
|
'site': SiteLiteResourceFromJSON(json['site']),
|
|
110
117
|
'addresses': (json['addresses'] == null ? null : (json['addresses'] as Array<any>).map(LiAddressResourceFromJSON)),
|
|
111
118
|
};
|
|
@@ -127,6 +134,7 @@ export function CustomerResourceToJSONTyped(value?: CustomerResource | null, ign
|
|
|
127
134
|
'last_name': value['lastName'],
|
|
128
135
|
'email': value['email'],
|
|
129
136
|
'phone': value['phone'],
|
|
137
|
+
'site_id': value['siteId'],
|
|
130
138
|
'site': SiteLiteResourceToJSON(value['site']),
|
|
131
139
|
'addresses': (value['addresses'] == null ? null : (value['addresses'] as Array<any>).map(LiAddressResourceToJSON)),
|
|
132
140
|
};
|
|
@@ -74,7 +74,7 @@ export interface ExternalApiLogResource {
|
|
|
74
74
|
* @type {string}
|
|
75
75
|
* @memberof ExternalApiLogResource
|
|
76
76
|
*/
|
|
77
|
-
requestPayload
|
|
77
|
+
requestPayload: string;
|
|
78
78
|
/**
|
|
79
79
|
*
|
|
80
80
|
* @type {string}
|
|
@@ -106,6 +106,7 @@ export function instanceOfExternalApiLogResource(value: object): value is Extern
|
|
|
106
106
|
if (!('exteranlApiLoggableId' in value) || value['exteranlApiLoggableId'] === undefined) return false;
|
|
107
107
|
if (!('endpoint' in value) || value['endpoint'] === undefined) return false;
|
|
108
108
|
if (!('responseCode' in value) || value['responseCode'] === undefined) return false;
|
|
109
|
+
if (!('requestPayload' in value) || value['requestPayload'] === undefined) return false;
|
|
109
110
|
if (!('responsePayload' in value) || value['responsePayload'] === undefined) return false;
|
|
110
111
|
if (!('site' in value) || value['site'] === undefined) return false;
|
|
111
112
|
return true;
|
|
@@ -128,7 +129,7 @@ export function ExternalApiLogResourceFromJSONTyped(json: any, ignoreDiscriminat
|
|
|
128
129
|
'exteranlApiLoggableId': json['exteranlApiLoggableId'],
|
|
129
130
|
'endpoint': json['endpoint'],
|
|
130
131
|
'responseCode': json['responseCode'],
|
|
131
|
-
'requestPayload': json['requestPayload']
|
|
132
|
+
'requestPayload': json['requestPayload'],
|
|
132
133
|
'responsePayload': json['responsePayload'],
|
|
133
134
|
'createdAt': json['createdAt'] == null ? undefined : json['createdAt'],
|
|
134
135
|
'site': SiteLiteResourceFromJSON(json['site']),
|
|
@@ -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 { CartCouponLiteResource } from './CartCouponLiteResource';
|
|
24
|
+
import {
|
|
25
|
+
CartCouponLiteResourceFromJSON,
|
|
26
|
+
CartCouponLiteResourceFromJSONTyped,
|
|
27
|
+
CartCouponLiteResourceToJSON,
|
|
28
|
+
CartCouponLiteResourceToJSONTyped,
|
|
29
|
+
} from './CartCouponLiteResource';
|
|
30
|
+
import type { CustomerListResource } from './CustomerListResource';
|
|
31
|
+
import {
|
|
32
|
+
CustomerListResourceFromJSON,
|
|
33
|
+
CustomerListResourceFromJSONTyped,
|
|
34
|
+
CustomerListResourceToJSON,
|
|
35
|
+
CustomerListResourceToJSONTyped,
|
|
36
|
+
} from './CustomerListResource';
|
|
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<CartCouponLiteResource>}
|
|
108
|
+
* @memberof FrontendCartResource
|
|
109
|
+
*/
|
|
110
|
+
coupons: Array<CartCouponLiteResource> | null;
|
|
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['lifecycle_status'],
|
|
196
|
+
'siteId': json['site_id'],
|
|
197
|
+
'sessionToken': json['session_token'] == null ? undefined : json['session_token'],
|
|
198
|
+
'customer': CustomerListResourceFromJSON(json['customer']),
|
|
199
|
+
'shippingType': json['shipping_type'],
|
|
200
|
+
'shippingAddress': AddressResourceFromJSON(json['shipping_address']),
|
|
201
|
+
'billingAddress': AddressResourceFromJSON(json['billing_address']),
|
|
202
|
+
'lineItems': (json['line_items'] == null ? null : (json['line_items'] as Array<any>).map(FrontendLineItemResourceFromJSON)),
|
|
203
|
+
'coupons': (json['coupons'] == null ? null : (json['coupons'] as Array<any>).map(CartCouponLiteResourceFromJSON)),
|
|
204
|
+
'subtotal': json['subtotal'],
|
|
205
|
+
'promotionalDiscount': json['promotional_discount'],
|
|
206
|
+
'couponSubtotalDiscount': json['coupon_subtotal_discount'],
|
|
207
|
+
'couponShippingDiscount': json['coupon_shipping_discount'],
|
|
208
|
+
'shipping': json['shipping'],
|
|
209
|
+
'transitInsurance': json['transit_insurance'],
|
|
210
|
+
'gst': json['gst'],
|
|
211
|
+
'grandTotal': json['grand_total'],
|
|
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
|
+
'lifecycle_status': value['lifecycleStatus'],
|
|
228
|
+
'site_id': value['siteId'],
|
|
229
|
+
'session_token': value['sessionToken'],
|
|
230
|
+
'customer': CustomerListResourceToJSON(value['customer']),
|
|
231
|
+
'shipping_type': value['shippingType'],
|
|
232
|
+
'shipping_address': AddressResourceToJSON(value['shippingAddress']),
|
|
233
|
+
'billing_address': AddressResourceToJSON(value['billingAddress']),
|
|
234
|
+
'line_items': (value['lineItems'] == null ? null : (value['lineItems'] as Array<any>).map(FrontendLineItemResourceToJSON)),
|
|
235
|
+
'coupons': (value['coupons'] == null ? null : (value['coupons'] as Array<any>).map(CartCouponLiteResourceToJSON)),
|
|
236
|
+
'subtotal': value['subtotal'],
|
|
237
|
+
'promotional_discount': value['promotionalDiscount'],
|
|
238
|
+
'coupon_subtotal_discount': value['couponSubtotalDiscount'],
|
|
239
|
+
'coupon_shipping_discount': value['couponShippingDiscount'],
|
|
240
|
+
'shipping': value['shipping'],
|
|
241
|
+
'transit_insurance': value['transitInsurance'],
|
|
242
|
+
'gst': value['gst'],
|
|
243
|
+
'grand_total': value['grandTotal'],
|
|
244
|
+
};
|
|
245
|
+
}
|
|
246
|
+
|