@digital8/lighting-illusions-ts-sdk 0.0.2178 → 0.0.2180
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 -0
- package/README.md +12 -2
- package/dist/apis/OrdersApi.d.ts +15 -0
- package/dist/apis/OrdersApi.js +59 -0
- 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/CreateCartRequest.d.ts +1 -0
- package/dist/models/CreateCartRequest.js +1 -0
- package/dist/models/ExternalApiLogResource.d.ts +1 -1
- package/dist/models/ExternalApiLogResource.js +3 -1
- package/dist/models/FrontendCartResource.d.ts +144 -0
- package/dist/models/FrontendCartResource.js +121 -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/FrontendOrderResource.d.ts +174 -0
- package/dist/models/FrontendOrderResource.js +141 -0
- package/dist/models/FrontendOrderResourceArrayResponse.d.ts +33 -0
- package/dist/models/FrontendOrderResourceArrayResponse.js +50 -0
- package/dist/models/OrderFulfillmentResource.d.ts +1 -1
- package/dist/models/OrderFulfillmentResource.js +1 -3
- package/dist/models/OrderStatusId.d.ts +2 -6
- package/dist/models/OrderStatusId.js +2 -6
- package/dist/models/PaymentSource.d.ts +1 -0
- package/dist/models/PaymentSource.js +2 -1
- package/dist/models/ProductChildLineItemLiteResource.d.ts +18 -0
- package/dist/models/ProductChildLineItemLiteResource.js +12 -0
- package/dist/models/ProductChildResource.d.ts +6 -0
- package/dist/models/ProductChildResource.js +4 -0
- package/dist/models/ShippingType.d.ts +1 -0
- package/dist/models/ShippingType.js +1 -0
- 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 +1 -3
- package/dist/models/StoreSpecialDateResource.d.ts +2 -2
- package/dist/models/StoreSpecialDateResource.js +1 -3
- package/dist/models/UpdateCartRequest.d.ts +1 -0
- package/dist/models/UpdateCartRequest.js +1 -0
- package/dist/models/UpdateOrderRequest.d.ts +1 -0
- package/dist/models/UpdateOrderRequest.js +1 -0
- package/dist/models/index.d.ts +9 -0
- package/dist/models/index.js +9 -0
- package/docs/CartCouponLiteResource.md +42 -0
- package/docs/CartCouponLiteResourceArrayResponse.md +34 -0
- package/docs/FrontendCartResource.md +70 -0
- package/docs/FrontendCartResourceArrayResponse.md +34 -0
- package/docs/FrontendCartResourceCouponsInner.md +42 -0
- package/docs/FrontendLineItemResource.md +50 -0
- package/docs/FrontendLineItemResourceArrayResponse.md +34 -0
- package/docs/FrontendOrderResource.md +80 -0
- package/docs/FrontendOrderResourceArrayResponse.md +34 -0
- package/docs/OrdersApi.md +66 -0
- package/docs/ProductChildLineItemLiteResource.md +6 -0
- package/docs/ProductChildResource.md +2 -0
- package/docs/StoreSpecialDateResource.md +1 -1
- package/package.json +1 -1
- package/src/apis/OrdersApi.ts +49 -0
- 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/CreateCartRequest.ts +1 -0
- package/src/models/ExternalApiLogResource.ts +3 -2
- package/src/models/FrontendCartResource.ts +254 -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/FrontendOrderResource.ts +299 -0
- package/src/models/FrontendOrderResourceArrayResponse.ts +73 -0
- package/src/models/OrderFulfillmentResource.ts +2 -3
- package/src/models/OrderStatusId.ts +2 -6
- package/src/models/PaymentSource.ts +2 -1
- package/src/models/ProductChildLineItemLiteResource.ts +27 -0
- package/src/models/ProductChildResource.ts +9 -0
- package/src/models/ShippingType.ts +1 -0
- package/src/models/StoreFrontendResource.ts +3 -2
- package/src/models/StoreListResource.ts +2 -3
- package/src/models/StoreSpecialDateResource.ts +3 -4
- package/src/models/UpdateCartRequest.ts +1 -0
- package/src/models/UpdateOrderRequest.ts +1 -0
- package/src/models/index.ts +9 -0
package/package.json
CHANGED
package/src/apis/OrdersApi.ts
CHANGED
|
@@ -120,6 +120,10 @@ export interface IndexOrderRequest {
|
|
|
120
120
|
searchOrdersRequest?: SearchOrdersRequest;
|
|
121
121
|
}
|
|
122
122
|
|
|
123
|
+
export interface PdfOrderRequest {
|
|
124
|
+
order: number;
|
|
125
|
+
}
|
|
126
|
+
|
|
123
127
|
export interface SendPaymentLinkOrderRequest {
|
|
124
128
|
order: number;
|
|
125
129
|
}
|
|
@@ -506,6 +510,51 @@ export class OrdersApi extends runtime.BaseAPI {
|
|
|
506
510
|
return await response.value();
|
|
507
511
|
}
|
|
508
512
|
|
|
513
|
+
/**
|
|
514
|
+
* Creates request options for pdfOrder without sending the request
|
|
515
|
+
*/
|
|
516
|
+
async pdfOrderRequestOpts(requestParameters: PdfOrderRequest): Promise<runtime.RequestOpts> {
|
|
517
|
+
if (requestParameters['order'] == null) {
|
|
518
|
+
throw new runtime.RequiredError(
|
|
519
|
+
'order',
|
|
520
|
+
'Required parameter "order" was null or undefined when calling pdfOrder().'
|
|
521
|
+
);
|
|
522
|
+
}
|
|
523
|
+
|
|
524
|
+
const queryParameters: any = {};
|
|
525
|
+
|
|
526
|
+
const headerParameters: runtime.HTTPHeaders = {};
|
|
527
|
+
|
|
528
|
+
|
|
529
|
+
let urlPath = `/admin-api/orders/{order}/pdf`;
|
|
530
|
+
urlPath = urlPath.replace('{order}', encodeURIComponent(String(requestParameters['order'])));
|
|
531
|
+
|
|
532
|
+
return {
|
|
533
|
+
path: urlPath,
|
|
534
|
+
method: 'POST',
|
|
535
|
+
headers: headerParameters,
|
|
536
|
+
query: queryParameters,
|
|
537
|
+
};
|
|
538
|
+
}
|
|
539
|
+
|
|
540
|
+
/**
|
|
541
|
+
* Auto-generated: pdfOrder
|
|
542
|
+
*/
|
|
543
|
+
async pdfOrderRaw(requestParameters: PdfOrderRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<GenericResponse>> {
|
|
544
|
+
const requestOptions = await this.pdfOrderRequestOpts(requestParameters);
|
|
545
|
+
const response = await this.request(requestOptions, initOverrides);
|
|
546
|
+
|
|
547
|
+
return new runtime.JSONApiResponse(response, (jsonValue) => GenericResponseFromJSON(jsonValue));
|
|
548
|
+
}
|
|
549
|
+
|
|
550
|
+
/**
|
|
551
|
+
* Auto-generated: pdfOrder
|
|
552
|
+
*/
|
|
553
|
+
async pdfOrder(requestParameters: PdfOrderRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<GenericResponse> {
|
|
554
|
+
const response = await this.pdfOrderRaw(requestParameters, initOverrides);
|
|
555
|
+
return await response.value();
|
|
556
|
+
}
|
|
557
|
+
|
|
509
558
|
/**
|
|
510
559
|
* Creates request options for sendPaymentLinkOrder without sending the request
|
|
511
560
|
*/
|
|
@@ -36,7 +36,7 @@ export interface AddressFrontendResource {
|
|
|
36
36
|
* @type {string}
|
|
37
37
|
* @memberof AddressFrontendResource
|
|
38
38
|
*/
|
|
39
|
-
line2
|
|
39
|
+
line2?: string | null;
|
|
40
40
|
/**
|
|
41
41
|
*
|
|
42
42
|
* @type {string}
|
|
@@ -75,7 +75,6 @@ export interface AddressFrontendResource {
|
|
|
75
75
|
export function instanceOfAddressFrontendResource(value: object): value is AddressFrontendResource {
|
|
76
76
|
if (!('company' in value) || value['company'] === undefined) return false;
|
|
77
77
|
if (!('line1' in value) || value['line1'] === undefined) return false;
|
|
78
|
-
if (!('line2' in value) || value['line2'] === undefined) return false;
|
|
79
78
|
if (!('postcode' in value) || value['postcode'] === undefined) return false;
|
|
80
79
|
if (!('suburb' in value) || value['suburb'] === undefined) return false;
|
|
81
80
|
if (!('country' in value) || value['country'] === undefined) return false;
|
|
@@ -96,7 +95,7 @@ export function AddressFrontendResourceFromJSONTyped(json: any, ignoreDiscrimina
|
|
|
96
95
|
|
|
97
96
|
'company': json['company'],
|
|
98
97
|
'line1': json['line1'],
|
|
99
|
-
'line2': json['line2'],
|
|
98
|
+
'line2': json['line2'] == null ? undefined : json['line2'],
|
|
100
99
|
'postcode': json['postcode'],
|
|
101
100
|
'suburb': json['suburb'],
|
|
102
101
|
'country': json['country'],
|
|
@@ -42,7 +42,7 @@ export interface AddressResource {
|
|
|
42
42
|
* @type {string}
|
|
43
43
|
* @memberof AddressResource
|
|
44
44
|
*/
|
|
45
|
-
addresseeName
|
|
45
|
+
addresseeName: string;
|
|
46
46
|
/**
|
|
47
47
|
*
|
|
48
48
|
* @type {string}
|
|
@@ -60,7 +60,7 @@ export interface AddressResource {
|
|
|
60
60
|
* @type {string}
|
|
61
61
|
* @memberof AddressResource
|
|
62
62
|
*/
|
|
63
|
-
line2
|
|
63
|
+
line2?: string | null;
|
|
64
64
|
/**
|
|
65
65
|
*
|
|
66
66
|
* @type {string}
|
|
@@ -97,9 +97,9 @@ export interface AddressResource {
|
|
|
97
97
|
* Check if a given object implements the AddressResource interface.
|
|
98
98
|
*/
|
|
99
99
|
export function instanceOfAddressResource(value: object): value is AddressResource {
|
|
100
|
+
if (!('addresseeName' in value) || value['addresseeName'] === undefined) return false;
|
|
100
101
|
if (!('company' in value) || value['company'] === undefined) return false;
|
|
101
102
|
if (!('line1' in value) || value['line1'] === undefined) return false;
|
|
102
|
-
if (!('line2' in value) || value['line2'] === undefined) return false;
|
|
103
103
|
if (!('postcode' in value) || value['postcode'] === undefined) return false;
|
|
104
104
|
if (!('suburb' in value) || value['suburb'] === undefined) return false;
|
|
105
105
|
if (!('country' in value) || value['country'] === undefined) return false;
|
|
@@ -121,10 +121,10 @@ export function AddressResourceFromJSONTyped(json: any, ignoreDiscriminator: boo
|
|
|
121
121
|
'id': json['id'] == null ? undefined : json['id'],
|
|
122
122
|
'type': json['type'] == null ? undefined : json['type'],
|
|
123
123
|
'sourceAddressId': json['sourceAddressId'] == null ? undefined : json['sourceAddressId'],
|
|
124
|
-
'addresseeName': json['addresseeName']
|
|
124
|
+
'addresseeName': json['addresseeName'],
|
|
125
125
|
'company': json['company'],
|
|
126
126
|
'line1': json['line1'],
|
|
127
|
-
'line2': json['line2'],
|
|
127
|
+
'line2': json['line2'] == null ? undefined : json['line2'],
|
|
128
128
|
'postcode': json['postcode'],
|
|
129
129
|
'suburb': json['suburb'],
|
|
130
130
|
'country': json['country'],
|
|
@@ -0,0 +1,102 @@
|
|
|
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
|
+
* @type {number}
|
|
43
|
+
* @memberof CartCouponLiteResource
|
|
44
|
+
*/
|
|
45
|
+
discount: number;
|
|
46
|
+
/**
|
|
47
|
+
*
|
|
48
|
+
* @type {string}
|
|
49
|
+
* @memberof CartCouponLiteResource
|
|
50
|
+
*/
|
|
51
|
+
appliesTo: string;
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
/**
|
|
55
|
+
* Check if a given object implements the CartCouponLiteResource interface.
|
|
56
|
+
*/
|
|
57
|
+
export function instanceOfCartCouponLiteResource(value: object): value is CartCouponLiteResource {
|
|
58
|
+
if (!('id' in value) || value['id'] === undefined) return false;
|
|
59
|
+
if (!('code' in value) || value['code'] === undefined) return false;
|
|
60
|
+
if (!('name' in value) || value['name'] === undefined) return false;
|
|
61
|
+
if (!('discount' in value) || value['discount'] === undefined) return false;
|
|
62
|
+
if (!('appliesTo' in value) || value['appliesTo'] === undefined) return false;
|
|
63
|
+
return true;
|
|
64
|
+
}
|
|
65
|
+
|
|
66
|
+
export function CartCouponLiteResourceFromJSON(json: any): CartCouponLiteResource {
|
|
67
|
+
return CartCouponLiteResourceFromJSONTyped(json, false);
|
|
68
|
+
}
|
|
69
|
+
|
|
70
|
+
export function CartCouponLiteResourceFromJSONTyped(json: any, ignoreDiscriminator: boolean): CartCouponLiteResource {
|
|
71
|
+
if (json == null) {
|
|
72
|
+
return json;
|
|
73
|
+
}
|
|
74
|
+
return {
|
|
75
|
+
|
|
76
|
+
'id': json['id'],
|
|
77
|
+
'code': json['code'],
|
|
78
|
+
'name': json['name'],
|
|
79
|
+
'discount': json['discount'],
|
|
80
|
+
'appliesTo': json['appliesTo'],
|
|
81
|
+
};
|
|
82
|
+
}
|
|
83
|
+
|
|
84
|
+
export function CartCouponLiteResourceToJSON(json: any): CartCouponLiteResource {
|
|
85
|
+
return CartCouponLiteResourceToJSONTyped(json, false);
|
|
86
|
+
}
|
|
87
|
+
|
|
88
|
+
export function CartCouponLiteResourceToJSONTyped(value?: CartCouponLiteResource | null, ignoreDiscriminator: boolean = false): any {
|
|
89
|
+
if (value == null) {
|
|
90
|
+
return value;
|
|
91
|
+
}
|
|
92
|
+
|
|
93
|
+
return {
|
|
94
|
+
|
|
95
|
+
'id': value['id'],
|
|
96
|
+
'code': value['code'],
|
|
97
|
+
'name': value['name'],
|
|
98
|
+
'discount': value['discount'],
|
|
99
|
+
'appliesTo': value['appliesTo'],
|
|
100
|
+
};
|
|
101
|
+
}
|
|
102
|
+
|
|
@@ -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
|
+
|
|
@@ -172,6 +172,7 @@ export type CreateCartRequestSourceEnum = typeof CreateCartRequestSourceEnum[key
|
|
|
172
172
|
export const CreateCartRequestShippingTypeEnum = {
|
|
173
173
|
Pickup: 'pickup',
|
|
174
174
|
Delivery: 'delivery',
|
|
175
|
+
AuspostStandard: 'auspost_standard',
|
|
175
176
|
Express: 'express',
|
|
176
177
|
Courier: 'courier',
|
|
177
178
|
DontShip: 'dont_ship'
|
|
@@ -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,254 @@
|
|
|
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 {string}
|
|
78
|
+
* @memberof FrontendCartResource
|
|
79
|
+
*/
|
|
80
|
+
guestEmail?: string | null;
|
|
81
|
+
/**
|
|
82
|
+
*
|
|
83
|
+
* @type {CustomerListResource}
|
|
84
|
+
* @memberof FrontendCartResource
|
|
85
|
+
*/
|
|
86
|
+
customer: CustomerListResource | null;
|
|
87
|
+
/**
|
|
88
|
+
*
|
|
89
|
+
* @type {string}
|
|
90
|
+
* @memberof FrontendCartResource
|
|
91
|
+
*/
|
|
92
|
+
shippingType: string;
|
|
93
|
+
/**
|
|
94
|
+
*
|
|
95
|
+
* @type {AddressResource}
|
|
96
|
+
* @memberof FrontendCartResource
|
|
97
|
+
*/
|
|
98
|
+
shippingAddress: AddressResource | null;
|
|
99
|
+
/**
|
|
100
|
+
*
|
|
101
|
+
* @type {AddressResource}
|
|
102
|
+
* @memberof FrontendCartResource
|
|
103
|
+
*/
|
|
104
|
+
billingAddress: AddressResource | null;
|
|
105
|
+
/**
|
|
106
|
+
*
|
|
107
|
+
* @type {Array<FrontendLineItemResource>}
|
|
108
|
+
* @memberof FrontendCartResource
|
|
109
|
+
*/
|
|
110
|
+
lineItems: Array<FrontendLineItemResource> | null;
|
|
111
|
+
/**
|
|
112
|
+
*
|
|
113
|
+
* @type {Array<FrontendCartResourceCouponsInner>}
|
|
114
|
+
* @memberof FrontendCartResource
|
|
115
|
+
*/
|
|
116
|
+
coupons: Array<FrontendCartResourceCouponsInner>;
|
|
117
|
+
/**
|
|
118
|
+
*
|
|
119
|
+
* @type {number}
|
|
120
|
+
* @memberof FrontendCartResource
|
|
121
|
+
*/
|
|
122
|
+
subtotal: number;
|
|
123
|
+
/**
|
|
124
|
+
*
|
|
125
|
+
* @type {number}
|
|
126
|
+
* @memberof FrontendCartResource
|
|
127
|
+
*/
|
|
128
|
+
promotionalDiscount: number;
|
|
129
|
+
/**
|
|
130
|
+
*
|
|
131
|
+
* @type {number}
|
|
132
|
+
* @memberof FrontendCartResource
|
|
133
|
+
*/
|
|
134
|
+
couponSubtotalDiscount: number;
|
|
135
|
+
/**
|
|
136
|
+
*
|
|
137
|
+
* @type {number}
|
|
138
|
+
* @memberof FrontendCartResource
|
|
139
|
+
*/
|
|
140
|
+
couponShippingDiscount: number;
|
|
141
|
+
/**
|
|
142
|
+
*
|
|
143
|
+
* @type {number}
|
|
144
|
+
* @memberof FrontendCartResource
|
|
145
|
+
*/
|
|
146
|
+
shipping: number;
|
|
147
|
+
/**
|
|
148
|
+
*
|
|
149
|
+
* @type {number}
|
|
150
|
+
* @memberof FrontendCartResource
|
|
151
|
+
*/
|
|
152
|
+
transitInsurance: number;
|
|
153
|
+
/**
|
|
154
|
+
*
|
|
155
|
+
* @type {number}
|
|
156
|
+
* @memberof FrontendCartResource
|
|
157
|
+
*/
|
|
158
|
+
gst: number;
|
|
159
|
+
/**
|
|
160
|
+
*
|
|
161
|
+
* @type {number}
|
|
162
|
+
* @memberof FrontendCartResource
|
|
163
|
+
*/
|
|
164
|
+
grandTotal: number;
|
|
165
|
+
}
|
|
166
|
+
|
|
167
|
+
/**
|
|
168
|
+
* Check if a given object implements the FrontendCartResource interface.
|
|
169
|
+
*/
|
|
170
|
+
export function instanceOfFrontendCartResource(value: object): value is FrontendCartResource {
|
|
171
|
+
if (!('lifecycleStatus' in value) || value['lifecycleStatus'] === undefined) return false;
|
|
172
|
+
if (!('siteId' in value) || value['siteId'] === undefined) return false;
|
|
173
|
+
if (!('customer' in value) || value['customer'] === undefined) return false;
|
|
174
|
+
if (!('shippingType' in value) || value['shippingType'] === undefined) return false;
|
|
175
|
+
if (!('shippingAddress' in value) || value['shippingAddress'] === undefined) return false;
|
|
176
|
+
if (!('billingAddress' in value) || value['billingAddress'] === undefined) return false;
|
|
177
|
+
if (!('lineItems' in value) || value['lineItems'] === undefined) return false;
|
|
178
|
+
if (!('coupons' in value) || value['coupons'] === undefined) return false;
|
|
179
|
+
if (!('subtotal' in value) || value['subtotal'] === undefined) return false;
|
|
180
|
+
if (!('promotionalDiscount' in value) || value['promotionalDiscount'] === undefined) return false;
|
|
181
|
+
if (!('couponSubtotalDiscount' in value) || value['couponSubtotalDiscount'] === undefined) return false;
|
|
182
|
+
if (!('couponShippingDiscount' in value) || value['couponShippingDiscount'] === undefined) return false;
|
|
183
|
+
if (!('shipping' in value) || value['shipping'] === undefined) return false;
|
|
184
|
+
if (!('transitInsurance' in value) || value['transitInsurance'] === undefined) return false;
|
|
185
|
+
if (!('gst' in value) || value['gst'] === undefined) return false;
|
|
186
|
+
if (!('grandTotal' in value) || value['grandTotal'] === undefined) return false;
|
|
187
|
+
return true;
|
|
188
|
+
}
|
|
189
|
+
|
|
190
|
+
export function FrontendCartResourceFromJSON(json: any): FrontendCartResource {
|
|
191
|
+
return FrontendCartResourceFromJSONTyped(json, false);
|
|
192
|
+
}
|
|
193
|
+
|
|
194
|
+
export function FrontendCartResourceFromJSONTyped(json: any, ignoreDiscriminator: boolean): FrontendCartResource {
|
|
195
|
+
if (json == null) {
|
|
196
|
+
return json;
|
|
197
|
+
}
|
|
198
|
+
return {
|
|
199
|
+
|
|
200
|
+
'id': json['id'] == null ? undefined : json['id'],
|
|
201
|
+
'lifecycleStatus': json['lifecycleStatus'],
|
|
202
|
+
'siteId': json['siteId'],
|
|
203
|
+
'sessionToken': json['sessionToken'] == null ? undefined : json['sessionToken'],
|
|
204
|
+
'guestEmail': json['guestEmail'] == null ? undefined : json['guestEmail'],
|
|
205
|
+
'customer': CustomerListResourceFromJSON(json['customer']),
|
|
206
|
+
'shippingType': json['shippingType'],
|
|
207
|
+
'shippingAddress': AddressResourceFromJSON(json['shippingAddress']),
|
|
208
|
+
'billingAddress': AddressResourceFromJSON(json['billingAddress']),
|
|
209
|
+
'lineItems': (json['lineItems'] == null ? null : (json['lineItems'] as Array<any>).map(FrontendLineItemResourceFromJSON)),
|
|
210
|
+
'coupons': ((json['coupons'] as Array<any>).map(FrontendCartResourceCouponsInnerFromJSON)),
|
|
211
|
+
'subtotal': json['subtotal'],
|
|
212
|
+
'promotionalDiscount': json['promotionalDiscount'],
|
|
213
|
+
'couponSubtotalDiscount': json['couponSubtotalDiscount'],
|
|
214
|
+
'couponShippingDiscount': json['couponShippingDiscount'],
|
|
215
|
+
'shipping': json['shipping'],
|
|
216
|
+
'transitInsurance': json['transitInsurance'],
|
|
217
|
+
'gst': json['gst'],
|
|
218
|
+
'grandTotal': json['grandTotal'],
|
|
219
|
+
};
|
|
220
|
+
}
|
|
221
|
+
|
|
222
|
+
export function FrontendCartResourceToJSON(json: any): FrontendCartResource {
|
|
223
|
+
return FrontendCartResourceToJSONTyped(json, false);
|
|
224
|
+
}
|
|
225
|
+
|
|
226
|
+
export function FrontendCartResourceToJSONTyped(value?: FrontendCartResource | null, ignoreDiscriminator: boolean = false): any {
|
|
227
|
+
if (value == null) {
|
|
228
|
+
return value;
|
|
229
|
+
}
|
|
230
|
+
|
|
231
|
+
return {
|
|
232
|
+
|
|
233
|
+
'id': value['id'],
|
|
234
|
+
'lifecycleStatus': value['lifecycleStatus'],
|
|
235
|
+
'siteId': value['siteId'],
|
|
236
|
+
'sessionToken': value['sessionToken'],
|
|
237
|
+
'guestEmail': value['guestEmail'],
|
|
238
|
+
'customer': CustomerListResourceToJSON(value['customer']),
|
|
239
|
+
'shippingType': value['shippingType'],
|
|
240
|
+
'shippingAddress': AddressResourceToJSON(value['shippingAddress']),
|
|
241
|
+
'billingAddress': AddressResourceToJSON(value['billingAddress']),
|
|
242
|
+
'lineItems': (value['lineItems'] == null ? null : (value['lineItems'] as Array<any>).map(FrontendLineItemResourceToJSON)),
|
|
243
|
+
'coupons': ((value['coupons'] as Array<any>).map(FrontendCartResourceCouponsInnerToJSON)),
|
|
244
|
+
'subtotal': value['subtotal'],
|
|
245
|
+
'promotionalDiscount': value['promotionalDiscount'],
|
|
246
|
+
'couponSubtotalDiscount': value['couponSubtotalDiscount'],
|
|
247
|
+
'couponShippingDiscount': value['couponShippingDiscount'],
|
|
248
|
+
'shipping': value['shipping'],
|
|
249
|
+
'transitInsurance': value['transitInsurance'],
|
|
250
|
+
'gst': value['gst'],
|
|
251
|
+
'grandTotal': value['grandTotal'],
|
|
252
|
+
};
|
|
253
|
+
}
|
|
254
|
+
|
|
@@ -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
|
+
|